- Make
- Motorola/Google
- Model
- Moto G
- Model Code
- XT1039?
- Purchased
- 2013-11-24
- Storage
- 8GB
Developer Mode
link
- "Settings | About phone"
- Press Build Number 7 times
It will tell you when you're a "developer". Can now enable USB debugging.
Mounting
- Use go-mtpfs to mount as fuse filesystem
Backup
Backs up to local backup.ab in local folder. Requires confirmation on the phone itself.
android-sdk/platform-tools/adb backup -all -f backup.ab
Backup with adb su and tar
adb shell su -c "cd /system && busybox tar cvf - * | gzip -c > /sdcard/dump/system.tgz"
Backup without busybox
./adb shell ls -l -a | grep '^[^l]' | sed -e 's/^d.* \([^ ]*\)\r$/mkdir sav\/\1; .\/adb pull \/\1 sav\/\1/' -e 's/-.* \([^ ]*\)\r$/.\/adb pull \/\1 sav\/\1/' | /bin/bash
or
time adb shell ls -l -a | grep '^[^l]' | sed -e 's/^d.* \([^ ]*\)\r$/mkdir -p sav\/\1; adb pull \/\1 sav\/\1/' -e 's/-.* \([^ ]*\)\r$/adb pull \/\1 sav\/\1/' | /bin/bash
Engineering Mode
*#*#4636#*#*
Rooting
- Install android SDK
- Connect device via USB and switch it to fastboot mode
- power off, then hold power and volume-down button
- Extract unlock key
(bootloader) 0123456789ABCDEF#0123456789ABCD
(bootloader) EF0123456789ABCDEF01234567#0123
...
- Login to Motorola unlock page and enter key to retrieve unlock code.
- Code is 20-character alphanumeric
- There's nowhere to set
Unlock Bootloader
sudo fastboot oem unlock UNLOCK_CODE
https://wiki.cyanogenmod.org/w/Install_CM_for_peregrine
Failed with Bootloader Version error
install failed this device has bootloader 4113
Update bootloader
http://forum.xda-developers.com/moto-g/help/rc-faq-cm12-frequently-questions-t2996087/page24#post59520890
adb reboot bootloader
fastboot getvar version-bootloader
fastboot flash motoboot motoboot.img
fastboot reboot-bootloader
fastboot getvar version-bootloader # verify version
No SIM detected
Need to update Radio firmware
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
Post-flash config