This is not going to be a drawing post, but until I open my new blog about “the journey of the newbie dev” (that I am) I need to post this somewhere just in case it could help someone else. I’m operating on Windows so not everything is exactly the same for MAC or Linux users.
I recently bought a little android tablet for tests purpose (Asus Memo Pad 7 (ME176CX)) and discover how harsh it can be to setup everything in order to have free access to the device.
So here is a list of advices I found (too late) :
1. before spending money on your dev device, check if there are any USB drivers for your PC
You want to read this article about it : http://www.kraigbrockschmidt.com/2014/09/16/choosing-android-dev-device/
In short : if you can’t find some, be aware you may have to “hack” a driver and create a homemade certificate so your hacky-driver will be accepted by Windows. Or you can try the universal ADB driver that cover a very large number of devices, it seemed to be enough for the Asus Memo Pad.
Plus (but that have to be double checked) with asus PCLink, (an app provided on every android asus device) if you connect it to your PC, this should be enough to install it’s own drivers this way. It’s worth a try !
2. enable developer mode and usb debugging
Yes, now your device and your PC can share files, thank you Mr USB driver ! But Android Studio nor Ecclipse doesn’t see it, that’s normal : your device needs a bit more of a setup. This part is like finding an easter egg, it’s quite amusing.
Just go in settings > about > version (on the asus it’s one step more > software information) then tap on the version build. After 3, you will see a toast saying “X more steps to become developer” (or something like that). Continue until you are toasted (joke) “you are now a developer”.
I don’t remember if it take 7 or 10 tap, just tap until you are good !
Congrats, now you can go back to “Settings” and look to the “Developer Options” panel, that appeared. In there, allow “debug USB”.
Now Ecclipse / Android Studio should see your device and launch your apps on it ! Yeah !
3. For more indepth, root your device
You can launch app, but you will notice when using the DDMS you cannot browse files, like access/pull the databases (in the explorer it’s in the “data/data/your.app.name/databases” ), sadly without rooted device the data folder will not expand nor populate.
Bad new is : there is no easy way to get this access, exept by rooting your device. There are plenty of tutorials and tools, you should find one that suit you. It seem you can “unRoot” if you want to send back your device so warranty may come unarmed, this will depend on the root pack and the device of course.
Only google can help you at this point to find your root pack. For the asus memo pad here is the link : https://www.youtube.com/watch?v=Mmd-HxRRie8
It worked fine and at the end the Root Checker app was happy to announce I have a fully rooted device in my hands !
At this point, your device is nearly done to become your best development companion.
4. Hey I still can’t access my databases ?! And data still do not populate ?
Last bad new : your super user created by the root may not grant privileges to the ADB.
At this point, there are two solutions :
– browse in your Settings > Developer Option > root access and change this access so ADB and apps can use can use the root privileges.
– if you cannot find this option (it’s not on the Asus Memo Pad either), check these two links :
Honestly at this step, I feel like my grandma when she asks “where is the power button ?” on a coffee machine. I use Android Studio and was just like a dummy trying to understand why the terminal wouldn’t cooperate, even with the platform-tool path added in Environment Variable.
Finally I did everything using the Windows cmd prompt (like descrived in the second link) and the accepted answer from stackoverflow.
So a few “chmod 777 /data /data/data /data/data/* /data/data/*/databases /data/data/*/databases/* ” (etc…) I can now open the data folder, pull the databases out of every app I need to and use any SQLite reader (like SQLite Manager fro FireFox) to see what’s happening down there.
That’s not a big deal for those who know all the steps, but I have to admit, for a first time rooting/installing a development device I really feel like an idiot trying to figure out how make hot water.
Hope this can help other newbies !