Sunday, January 5, 2014

Android development - Fedora 20 and Nexus 7

On Nexus 7

Follow this post to enable USB debugging on the Nexus 7

If you do not see "Developer Options", go into "About device" in Settings and tap on the "Build number" entry seven times, which will unlock "Developer Options".

Then, to get the ADB to recognize the device -

[steve@localhost ~]$ sudo Development/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb devices
List of devices attached
????????????    no permissions


Following this post -

[steve@localhost ~]$ lsusb |grep Nexus
Bus 002 Device 014: ID 18d1:4e42 Google Inc. Nexus 7 (debug)


Edit as below -

[steve@localhost ~]$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"

[steve@localhost ~]$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
 
Restart udev and adb server -
 
[steve@localhost ~]$ sudo systemctl restart systemd-udevd.service
[steve@localhost ~]$ sudo Development/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb kill-server
 
[steve@localhost ~]$ sudo Development/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
015d3f18d1281012 unauthorized

Authorize the PC on the device, and re-check -

[steve@localhost ~]$ sudo Development/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb devices
List of devices attached 
015d3f18d1281012 device