FORUMS

[GUIDE]Newbie Resource Thread[TWRP][ROOT][Restore to Stock]

72 posts
Thanks Meter: 261
 
Post Reply Email Thread
Hi All, I am starting this thread with the very reason to educate and help newbies as well serve as a resource guide that could be used by all.

In this guide I will be explaining about the following:

1) Unlocking Bootloader
2) Flashing TWRP and Rooting
3) Restore to Stock
4) Remove unlocked bootloader warning

Please let me know if anyone needs more info/help on anything. I will try my best to help you and add it to this guide so everybody benefits from it.
The Following 28 Users Say Thank You to yeshwanthvshenoy For This Useful Post: [ View ] Gift yeshwanthvshenoy Ad-Free
26th May 2016, 09:57 AM |#2  
yeshwanthvshenoy's Avatar
OP Member
Flag Chennai
Thanks Meter: 261
 
More
Unlocking Bootloader
>>> Unlocking Bootloader will overwrite any data stored on your device, backup your files before proceeding <<<


Unlocking Bootloader:
1- Register
  • Head to Motorola website and register your E-Mail ID.
  • Open Setting on your device and go to About Phone. Next, tap 7 times on Build Number and get the Developer Options unlocked.
  • Head back to Main Settings Menu and go to Developer Options and switch the 'Allow OEM Unlock' option.

2- Getting Unique ID for each device
  • Reboot to Bootloader (power off, then press the power and volume down buttons simultaneously).
  • On your desktop, open a command prompt or terminal, and go to the directory where you installed the Android SDK tools (or make sure mfastboot is in your $PATH)
  • At the prompt, type
Code:
$ mfastboot oem get_unlock_data
  • You will get something like this:
On a Windows Desktop, the returned string format would be
Code:
$ fastboot oem get_unlock_data
 (bootloader) 0240540162024205#4C4D3556313230
 (bootloader) 30373as313630330df332323239#BD00
 (bootloader) 8A672BA4746C2CE0a328A2AC0C39F95
 (bootloader) 1A3E5#1F53280002000000000000000
 (bootloader) 0000000
On a Mac OS Desktop, the returned string format would be
Code:
 INFO0A40040192024205#4C4D3556313230
 INFO30373731363031303332323239#BD00
 INFO8A672BA4746C2CE02328A2AC0C39F95
 INFO1A3E5#1F53280002000000000000000
 INFO0000000
Paste together the 5 lines of output into one continuous string without (bootloader) or ‘INFO’ or white spaces. Your string needs to look like this:
Code:
0240540162024205#4C4D355631323030373as313630330df332323239#BD008A672BA4746C2CE0a328A2AC0C39F951A3E5#1F532800020000000000000000000000
3- Unlocking the device
  • Check if your device can be unlocked by pasting this string in the specific field on the Motorola website, and clicking “Can my device be unlocked?”
  • NOTE: If your device is unlockable, a "REQUEST UNLOCK KEY" button will now appear at the bottom of that page. Click on it and wait for the unique code to be sent to your mail.
  • After you got the code type the following :
    Code:
    mfastboot oem unlock <code>
    and wait your device to reboot !
The Following 23 Users Say Thank You to yeshwanthvshenoy For This Useful Post: [ View ] Gift yeshwanthvshenoy Ad-Free
26th May 2016, 09:57 AM |#3  
yeshwanthvshenoy's Avatar
OP Member
Flag Chennai
Thanks Meter: 261
 
More
Flashing TWRP and Rooting
Flashing TWRP:


>>> Flashing TWRP or Rooting will void your warranty. Please ask anything before doing, if your not fully confident on what to be done. <<<



Rooting Device:

>>> The old guide is outdated. Will be updated shortly. <<<
The Following 16 Users Say Thank You to yeshwanthvshenoy For This Useful Post: [ View ] Gift yeshwanthvshenoy Ad-Free
26th May 2016, 09:58 AM |#4  
yeshwanthvshenoy's Avatar
OP Member
Flag Chennai
Thanks Meter: 261
 
More
Restore Stock Firmware
>>> Please know your model number properly. I am not responsible if you flash the wrong firmware. <<<

NOTE: Flashing the wrong firmware may only leave you with no RIL temporarily but always be careful.


Flashing Stock Firmware:

1) Download the correct firmware for your device from http://www.filefactory.com/folder/c6cdedc45a775d27
2) Download adb and fastboot from https://drive.google.com/file/d/0B5j...ew?usp=sharing
3) Extract the firmware into the folder containing abd and fastboot.
4) Reboot the phone into Bootloader (power off, then press the power and volume down buttons simultaneously).
5) Execute these commands and make sure you receive an 'OKAY' after each command.
Code:
mfastboot oem fb_mode_set
mfastboot flash partition gpt.bin
mfastboot flash bootloader bootloader.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash dsp adspso.bin
mfastboot flash oem oem.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash system system.img_sparsechunk.6
mfastboot flash system system.img_sparsechunk.7
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1 
mfastboot erase modemst2 
mfastboot flash fsg fsg.mbn
mfastboot erase cache 
mfastboot erase userdata 
mfastboot erase customize
mfastboot erase clogo
mfastboot oem fb_mode_clear
mfastboot reboot
OR

5) You can use the script I have attached below(Windows only) to flash it for you. Just download the zip and extract it into same folder and run it.

Device will now Reboot into Stock.
Attached Files
File Type: zip flashstock.zip - [Click for QR Code] (351 Bytes, 14016 views)
The Following 26 Users Say Thank You to yeshwanthvshenoy For This Useful Post: [ View ] Gift yeshwanthvshenoy Ad-Free
26th May 2016, 09:58 AM |#5  
yeshwanthvshenoy's Avatar
OP Member
Flag Chennai
Thanks Meter: 261
 
More
>>> Irritated by the Unlocked Bootloader Warning? <<<
  • Download the attached file.
  • Download adb and fastboot from here : https://drive.google.com/file/d/0B5j...ew?usp=sharing
  • Extract the downloaded file into the same folder as adb and fastboot is extracted to
  • Open a command prompt and type in the following:
    Code:
    mfastboot flash logo logo.bin
  • Reboot
Attached Files
File Type: zip logo.zip - [Click for QR Code] (524.3 KB, 19272 views)
The Following 20 Users Say Thank You to yeshwanthvshenoy For This Useful Post: [ View ] Gift yeshwanthvshenoy Ad-Free
26th May 2016, 12:07 PM |#7  
Senior Member
Flag Mumbai
Thanks Meter: 267
 
More
Flash this- LazyFlasher - https://goo.gl/dBzV6q After flashing SuperSU! Device should reboot fine!
Or else we can create modified boot image and flash it and then flash SuperSU
The Following User Says Thank You to TheDj408 For This Useful Post: [ View ] Gift TheDj408 Ad-Free
yeshwanthvshenoy
26th May 2016, 01:18 PM |#8  
Guest
Thanks Meter: 0
 
More
Quote:
Originally Posted by TheDj408

Flash this- LazyFlasher - https://goo.gl/dBzV6q After flashing SuperSU! Device should reboot fine!
Or else we can create modified boot image and flash it and then flash SuperSU

We need modified boot.img for now but I am busy with work so can't get full time on it. Will try to get root asap!
The Following 2 Users Say Thank You to For This Useful Post: [ View ] Gift Ad-Free
26th May 2016, 02:55 PM |#9  
Member
Flag Novomoskovsk
Thanks Meter: 27
 
More
boot.img need to disable selinux it interferes with root

Please download the TWRP to another site, Android File Host is updated.
26th May 2016, 03:21 PM |#10  
carreddy's Avatar
Senior Member
Flag San Francisco
Thanks Meter: 19
 
More
Quote:
Originally Posted by TheDj408

Flash this- LazyFlasher - https://goo.gl/dBzV6q After flashing SuperSU! Device should reboot fine!
Or else we can create modified boot image and flash it and then flash SuperSU

Did you try with lazy flasher? TWRP and Root worked?
26th May 2016, 03:23 PM |#11  
Member
Flag Novomoskovsk
Thanks Meter: 27
 
More
Quote:
Originally Posted by carreddy

Did you try with lazy flasher? TWRP and Root worked?

you had to download the TWRP before the site went to repair?
Post Reply Subscribe to Thread

Tags
development, guide, help !, moto g4 plus, unlock bootloader

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes