ADB

From The Linux Source
Revision as of 15:29, 31 May 2017 by Support (Talk | contribs)

Jump to: navigation, search

Some Useful Docs

ADB is part of the Platform Tools software - https://developer.android.com/studio/releases/platform-tools.html
Images/Manual update steps/commands - https://developers.google.com/android/ota
USB Vendor Device ID List - https://developer.android.com/studio/run/device.html#VendorIds

Manual Update Steps

Note: requires adb tool, download an appropriate image, and verify checksum
1. With the device powered on and USB debugging enabled (in Developer mode/menu on the phone), reboot into recovery mode

# adb reboot recovery

2. Ready the device to accept an update
Hold the Power button and press Volume Up once, and a menu will appear. Select: Apply update from ADB.
3. Check if you system see the device and that it is ready, should show up with "sideload" next to its name

# adb devices

4. Update the device

# adb sideload ota_file.zip

5. Once the update finishes, reboot the device by choosing: Reboot system now 6. Disable USB debugging on the Developer menu, for security, it should not be active when the device is not being updated

Linux udev Rules

If running adb on Linux, you may need to setup udev to allow access to your android device over USB
Add a udev rules file that contains a USB configuration for each device you want to use for adb/development (you may want to view files in /etc/udev/rules.d/ to check syntax for your specific udev version). Each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. There is a list of these ID's available, but you can get this information from dmesg (dmesg|tail) after plugging in your device via USB.
As root, create /etc/udev/rules.d/51-android.rules with contents similar to this

SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"

Note: MODE specifies read/write permissions, GROUP defines which Unix group owns the device node.