Random Notes On Android
Android SDK
Get the Android SDK, you really only need the adb
platform-tools.
Android USB Debugging
- Access Developer Options
- Enable USB Debugging
- Change USB options from charging to some file transfer option (PTP or MTP)
- Run command prompt in Administrator Mode
- Navigate to ADB
platform-tools
and runadb devices
(this will run ADB server if not already running)- this should show the device, if not see special instructions below
- Type
adb reboot bootloader
to boot phone into fastboot mode (same as holding down power and volume down) - Type
fastboot devices
to confirm device still available
Special instructions to get ADB working with latest Windows versions and Intel drivers
You most likely need to download device-specific drivers from OEM site as well.
Recovery
You will need a recovery to be able to install custom software. The most popular choices being ClockworkMod (CWM) or TeamWin Recovery Project (TWRP).
The rest of the examples given below are from the context of using TWRP.
Install Recovery
- Go into Fastboot Mode with
adb reboot bootloader
or holding power and volume down fastboot flash recovery PATH-TO-LOCAL-FILE.img
fastboot reboot bootloader
- Select “Reboot Recovery” from options (using volume down for menu and power to select)
Cases
Copy to PC for Backing Up
- Reboot into Recovery
- Select “Backup” > swipe to backup
- from PC, run
adb pull /sdcard/TRWP/
, this will copy the entire TWRP directory with all backups
Copy to Device for Flashing
- Reboot into recovery
adb push PATH-TO-LOCAL-FILE.zip /sdcard/
- Select “Install”, find file, and swipe to install
Flash Directly from PC
- Reboot into Recovery
- (TRWP) Select “Advanced” > “ADB Sideload”
- from PC, run
adb sideload PATH-TO-LOCAL-FILE.zip
source: https://twrp.me/faq/ADBSideload.html
No OS?
Here is some helpful advice from TWRP https://twrp.me/faq/noos.html
Stories
Flash ROM With Encryption Issue
I had an issue with the latest version of multiple ROMS being stuck in bootloop after a CLEAN install. The issue seemed to be due to encryption of the internal storage, standard in new Android versions with lockscreen lock, and the new ROM not being able to decrypt during boot. The solution was to reformat the internal storage and do a fresh install by sideloading the ROM.
- Reboot Recovery
- Format Data
- Reboot Recovery
- ADB Sideload latest version
- Reboot Recovery
Google Device Factory Reset
I recently needed to restore my Nexus 5x back to factory settings. Below are my notes on how I did this.
Boot into Fastboot. Refer to instructions on how to boot into fastboot mode.
Check for device:
fastboot devices
Flash factory images like this:
fastboot flash bootloader C:\bullhead\images\bootloader-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash radio C:\bullhead\images\radio-bullhead-bullhead-xx.xx.img
fastboot reboot-bootloader
fastboot flash boot C:\bullhead\images\boot.img
fastboot erase cache
fastboot flash cache C:\bullhead\images\cache.img
fastboot flash recovery C:\bullhead\images\recovery.img
fastboot flash system C:\bullhead\images\system.img
fastboot flash vendor C:\bullhead\images\vendor.img
Random Notes
XDA
Search your device on XDA and just start reading.
TWRP
Personally recommended Team Win Recovery Project (TWRP) is a custom recovery you probably need
Find your device, download, and fastboot flash recovery twrp.img
ROM
Personally recommended custom ROMS
GApps
Community standard Open GApps
Flash in recovery
Fastboot Commands
find device, not in fastboot mode
adb devices
reboot into fastboot mode
adb reboot-bootloader
push file from pc to device
adb push <LOCAL> <REMOTE>
pull file from device to pc
adb pull <REMOTE> <LOCAL>
wipe user data and cache
fastboot -w
wipe system, user data, and cache
fastboot erase system -w