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

Search This thread

Harfounet

Member
Jan 26, 2015
6
0
Hi there !

I'm trying to update a Moto G4 Plus XT1641 with Android 8 Oreo stuff.
I made searchs, found a lots of threads, but none helped. And I finally ended here.
Because I want to use the TWRP method, as it's better as said by the OP.

The bootloader is unlocked as I can see in the fastboot menu.
I have ADB, fastboot & mfastboot. A TWRP image aswell, 3.3.1 found here too.

Phone connected on computer USB 2 port.
USB debugging enabled.
So, I type : adb reboot bootloader
The phone shows now some informations, including "flashing allowed". Nice.

But "fastboot flash recovery twrp331.img" OR "fastboot boot twrp331.img" just give a message in command prompt : "waiting for device".
I don't understand what I need to do there :/
Disconnecting then reconnecting the USB cable does nothing at all...

What am I doing wrong ?
 

Harfounet

Member
Jan 26, 2015
6
0
Well...I finally did it.
TWRP is now installed and fully operational : I did a phone full backup, in case of bad things happening.

Now, what's the best and easier method to root it ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    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/0B5jlU9JnLAZGbVU0UzJ3N3p4X2M/view?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.
    17
    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.
    16
    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 !
    15
    >>> 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
    11
    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. <<<