Motorola Moto G hacking

Archived

This page has been archived and will receive no further updates.

Note: The notes here apply to the following phones:

  • Moto G 2013 (1st gen)
  • Moto G 2014 (2nd gen)
  • Moto G 2015 (3rd gen)

Boot to fastboot mode

Power off the phone, press and hold volume down button, press and hold power button, wait for about 4 seconds and then release both buttons

Boot to recovery mode

  1. Boot to fastboot mode (see above)
  2. Boot to recovery mode

    Note: recovery mode may be a little slow to load, just wait a minute or two and it should load

    • Moto G 2015

      1. Press volume down until you see RECOVERY MODE
      2. Press power
    • Moto G 2013

      1. Press volume down and select Recovery
      2. Press volume up
  3. If you get to a screen that says “No command”
    1. Press and hold the power button for 2-3 seconds
    2. Without releasing power button, press volume up button and release the volume up button
    3. Release the power button

Rooting

  1. Unlock the bootloader (see below)

  2. Download:

    1. Compatible recovery

    2. Latest stable SuperSU

      https://forum.xda-developers.com/apps/supersu

  3. Boot into fastboot mode (see above)
  4. Boot the recovery
    sudo /path/to/android-sdk-linux/platform-tools/fastboot boot twrp-2.8.7.0.-falcon_STOCK_NOTHEME.img
    
  5. Prepare the recovery for flashing SuperSU

    • TWRP

      1. Advanced > ADB Sideload
      2. Swipe to Start Sideload
    • CWM

      1. Go to install zip > install zip from sideload
  6. Flash SuperSU

    sudo adb sideload UPDATE-SuperSU-vX.XX.zip
    
    • If you see this error:
      error: insufficient permissions for device
      

      Run this command and try again:

      sudo adb kill-server
      
  7. Reboot

Installing Android OTA updates on a modified device

Note that this will only work if you have stock firmware. If you have installed a custom ROM (Cyanogenmod, etc), you will first need to flash the stock ROM.

  1. If the OTA fails, get it working

    1. Look at the latest last_log in /cache/recovery to see which file is causing the update to fail
    2. Download the latest SuperSU

      http://download.chainfire.eu/supersu

    3. Unzip it and look at /META-INF/com/google/android/update-binary to determine how to restore stock files
      1. Update to 5.1
        1. Try:
          mv /system/bin/app_process32_original /system/bin/app_process32
          
      2. Update to 5.0
        1. Try:
          mv /system/etc/install-recovery_original.sh /system/etc/install-recovery.sh
          
    4. If that doesn’t work, try the steps here:

      http://laviefrugale.blogspot.ca/2015/05/moto-g-ota-update-error.html

  2. Restore root

    1. If you flashed recovery.img, just follow the usual rooting instructions (see above)

    2. If you didn’t flash recovery.img, follow the usual rooting instructions, but you don’t need to download or flash the recovery. You just need to flash SuperSU

  3. Remove boot logo warning message (see below)

Boot animations/logos

  1. Download the desired boot logo (normally this is a file named logo.bin)

  2. Boot to fastboot (see above)
  3. Flash the logo
    sudo /path/to/android-sdk-linux/platform-tools/fastboot flash logo logo.bin
    

Remove boot logo warning message

If you’ve unlocked the bootloader, you’ll get an ugly warning message when booting your phone. To get rid of the warning message:

  1. Download the fixed boot logo and unzip it

  2. Flash the fixed logo (see above)

Motorola has released a variety of boot animations for the Moto G. To change to one of the other boot animations, follow the instructions here: https://github.com/bmaupin/motorola-boot-animations/wiki/Installation

One-time tasks

Unlock bootloader

This will allow you to make modifications to your phone. It only needs to be done once. Be aware that it will void your warranty.

  1. Enable developer options

    1. See: Android hacking
  2. Enable OEM unlock

    1. Settings > Developer options > check Enable OEM unlock
  3. Follow instructions here:

    https://motorola-global-portal.custhelp.com/app/standalone/bootloadeEnable OEM unlockr/unlock-your-device-a

  4. (Optional) Remove boot logo warning message (see above)