Category Archives: Android

Rooting my Moto E2 (Otus)

Phone model: Moto E 2nd Gen Dual Sim 3G (XT1506)
Codename: Otus
For specs check here

1. Enable USB debug (adb) in phone
Click About > Build number seven times. Developer Options menu appears and enable USB debugging. Connect the phone to the PC.

2. Setup adb and fastboot in PC (Fedora)

[root@localhost ~]#  dnf install android-tools
...
Installed:
  android-tools.x86_64                                             

Complete!
[root@localhost ~]# adb start-server
[root@localhost ~]# adb devices
List of devices attached
[none is displayed]

Phone not detected. Set up the adb. (Check this tutorial for explanations on below steps)

Create the file /etc/udev/rules.d/99-android-debug.rules as root and and add the line
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e83", GROUP="androiddev", MODE="0664"

[root@localhost ~]#  groupadd androiddev
[root@localhost ~]#  usermod -aG androiddev tony

Log off and log in

[root@localhost ~]#  udevadm control --reload
[root@localhost ~]#  systemctl restart systemd-udevd.service

Disconnect and reconnect phone.

[tony@localhost ~]# adb devices
List of devices attached
TA05409C3Z    unauthorised 

Phone is detected, but shown unauthorised.
Check phone and click OK to accept the notification for permission for adb from this computer.

[tony@localhost ~]$ adb devices
List of devices attached
TA05409C3Z    device

Done!

3. Unlock the bootloader

This factory resets the phone. Images, apps, settings and other data will be lost.

Go To Settings > Developer options, And Select Allow OEM Unlock

[tony@localhost ~]$ adb shell
[tony@localhost ~]$ adb reboot fastboot

[tony@localhost ~]# fastboot devices
TA05409C3Z    fastboot
[tony@localhost ~]$ fastboot oem get_unlock_data
...
(bootloader) 3A35230386907906#54235755323039
(bootloader) 52335A004F746F4FF4G5000000#3813
(bootloader) 73DDAE8FF6037D2H3HBJE39DJB31DDB
(bootloader) 42894#887A8E0812000000000000000
(bootloader) 0000000
OKAY [  0.222s]
finished. total time: 0.222s

Copy the string returned. Remove space(if any) and combine the lines.
Sign in to this motorola page using gmail account, submit the above string and get the Unlock_Key emailed to you.

[tony@localhost ~]$ fastboot oem unlock Unlock_Key
...
(bootloader) Phone is unlocked successfully!

Done!

(Follow these steps if you want to remove the “Bootloader Unlocked” warning image during every reboot.)

4. Flash the recovery

Using the below given recovery image for any other phone may brick it.

Download the TWRP recovery from xda-developers for Moto E XT1506 Otus

[tony@localhost ~]$ fastboot flash recovery twrp-otus-3.0.2-r5.img
target reported max download size of 299892736 bytes
sending 'recovery' (6852 KB)...
OKAY [  0.246s]
writing 'recovery'...
OKAY [  0.351s]
finished. total time: 0.597s

[tony@localhost ~]$ fastboot reboot

Done!

5. Root the phone

Download SuperSU from here and copy it to the SD Card/Internal memory.

[tony@localhost ~]$  adb reboot recovery

Check the phone, phone reboots to the above installed TWRP recovery.

Select Install and choose the SuperSU package and Swipe to install it.

Select Reboot > System

You will see the SuperSU app installed and functional!

Done!

References
http://forums.fedoraforum.org/showthread.php?t=298965
https://forum.xda-developers.com/moto-e-2015/general/guide-unlock-bootloader-moto-e-2015-t3045748
https://forum.xda-developers.com/moto-e-2015/general/guide-moto-e-2015-3g-t3084971
https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-b
https://forum.xda-developers.com/showpost.php?p=59210191&postcount=2