XT1955-5 bootloader unlock install TWRP & Root with Magisk

Search This thread

wbill2k

Member
Feb 1, 2013
15
0
45
Grass Valley
Motorola Edge (2021)
So when I got this device I went to root it and found there's not very good documentation on what to do to get root and recovery installed so after many boot loops and reinstall of firmware here is what I did to gain root and TWRP and have a stable environment. You will need to use ADB & Fastboot commands please install either this : https://forum.xda-developers.com/showthread.php?t=2317790 or https://forum.xda-developers.com/showthread.php?t=2588979 or you can install from here: https://developer.android.com/studio/releases/platform-tools. you will also need the Motorola drivers located here: https://support.motorola.com/us/en/solution/MS88481. Once you have obtained these you can proceed with the bootloader unlock. I have the unlocked version of the Motorola G7 Power so I was able to fallow the sets here: https://support.motorola.com/us/en/bootloader/unlockyourdeviceb. If you have a different variant I'm not sure if your able to unlock your bootloader please try and let me know in this thread. I AM NOT RESPONSIBLE IF YOU SCREW YOUR DEVICE UP OR FOR ANY DAMAGE TO YOUR DEVICE

Bootloader unlock steps:
1. On your device go to Settings and to System, Then About phone and click " Build Number " until you unlock developer options.
2. Back out one step and click the Advanced tab and then click " Developer Options ".
3. Once in developer options " OEM Unlocking " turn off " Automatic Updates " and enable "USB Debugging".
4. Once you have done USB Debugging open the start button type "CMD" and open a command prompt.
5. Once in command prompt type " adb devices " make sure you authorize the pc on the phone. then type in command prompt " adb reboot bootloader "
6. Once in bootloader type in command prompt " fastboot oem get_unlock_data " from here fallow the directions on the Motorola Bootloader Unlocking page: https://support.motorola.com/us/en/bootloader/unlockyourdevice
7. Take the number given to you by Motorola and type in command prompt " fastboot oem unlock CODE FROM MOTO " then enter the same command again and your device will be bootloader unlocked.

TWRP & Magisk install:
This is where I found it to be difficult to get things right either I would bootloop or I wouldn't be able to unencrypt my sd card in TWRP so I couldn't read things right all sorts of dumb issues. All the files I used are attached so please let me know if this works as well as it did for me. Please download the TWRP .img file it was too large to attach: https://dl.twrp.me/ocean/ Also make sure that your command prompt is in the directory of your stored files.

Here are a list of commands to get TWRP and install Root please be in bootloader mode to start this process.
1. fastboot boot twrp-3.3.1-2-ocean.img
2. In TWRP go to the wipe option and select the format and type " yes " once it has done that go back to the main TWRP page by hitting the home bottom and select Reboot and select Reboot Bootloader.
3. fastboot boot twrp-3.3.1-2-ocean.img
4. Once in TWRP adb push twrp-installer-3.3.1-2-ocean.zip /tmp/ then click install and navigate to the /tmp folder and install the TWRP .zip file
5. After you install TWRP do this : adb push Magisk-v20.1(20100).zip /tmp/ then navigate to your /tmp folder and install Magisk .zip file
6. After you install magisk you can reboot the system and let it sit it might loop once or twice but it will boot. I did the force encrypt disable with the attached zip file then i rebooted.

Also I found it best to do this with a fresh installed firmware that hasn't been booted yet I downloaded the firmware/ROM from here: https://mirrors.lolinet.com/firmware/moto/ocean/official/RETUS/ here is a list of commands to copy and paste into command prompt please make sure your device is in bootloader/ fastboot mode.

fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.1
fastboot flash system_b system_b.img_sparsechunk.2
fastboot flash vendor vendor.img_sparsechunk.0
fastboot flash vendor vendor.img_sparsechunk.1
fastboot flash oem oem.img
fastboot flash oem_b oem_other.img
fastboot erase userdata
fastboot erase DDR
fastboot oem fb_mode_clear


Cant u just install twrp and magisk and not install a fresh copy of the firmware? Having to do that sux and takes a lot more time.... Thanks :cool:
 

kgirlx

Senior Member
Nov 26, 2010
387
95
hey guys, ive got my unlock code and have run it but it doesnt reboot while in bootloader mode, it says goes into developer mode and check oem unlock...but when i reboot back into system and go into it, its still greyed out. Any ideas?
 

roadkill42

Senior Member
Jul 13, 2013
848
103
Moto G7 Power
hey guys, ive got my unlock code and have run it but it doesnt reboot while in bootloader mode, it says goes into developer mode and check oem unlock...but when i reboot back into system and go into it, its still greyed out. Any ideas?
Have u tried to flash twrp mine is greyed out to after unlock bootloader I think that is normal try to flash a recovery or flash a rom
 

kgirlx

Senior Member
Nov 26, 2010
387
95
oem greyed out

Have u tried to flash twrp mine is greyed out to after unlock bootloader I think that is normal try to flash a recovery or flash a rom

i had to change the date back like 8 days then reset phone, turn on wifi and watched the grey out turn on to flick the switch to on. then turned wifi back off then went back into bootloader mode with code and had success.....bootloader is unlocked but it shows greyed out now though...but its unlocked, twrp 3.4.0.1 installed and Magisk. Thanks.
 

roadkill42

Senior Member
Jul 13, 2013
848
103
Moto G7 Power
i had to change the date back like 8 days then reset phone, turn on wifi and watched the grey out turn on to flick the switch to on. then turned wifi back off then went back into bootloader mode with code and had success.....bootloader is unlocked but it shows greyed out now though...but its unlocked, twrp 3.4.0.1 installed and Magisk. Thanks.
Try this one I use it no prob but it depends on the driver in the rom u using too if touch frezes
 

Attachments

  • TWRP-ocean-3.4.0-2-installer.zip
    15.2 MB · Views: 24

roadkill42

Senior Member
Jul 13, 2013
848
103
Moto G7 Power
i had to change the date back like 8 days then reset phone, turn on wifi and watched the grey out turn on to flick the switch to on. then turned wifi back off then went back into bootloader mode with code and had success.....bootloader is unlocked but it shows greyed out now though...but its unlocked, twrp 3.4.0.1 installed and Magisk. Thanks.
Try this one works fine as long got right rom that is what causes the touch not working
 

Attachments

  • TWRP-ocean-3.4.0-2-installer.zip
    15.2 MB · Views: 29

kgirlx

Senior Member
Nov 26, 2010
387
95
thanks for this thread. i just recently just adb'd to the last update to september 2020, android 10, using the update batfile zip. flashed twrp, then Magisk then the copy patitions A,B zip. i hope i did it right cause so far, the phone appears to be working fine.
 

DJBhardwaj

Recognized Contributor
Apr 23, 2011
5,055
2,723
28
Delhi
@dirtyscout The part where TWRP and Magisk installation happens, you could reduce the roundtrip of booting TWRP image twice.

Instead of this:
1. fastboot boot twrp-3.3.1-2-ocean.img
2. In TWRP go to the wipe option and select the format and type " yes " once it has done that go back to the main TWRP page by hitting the home bottom and select Reboot and select Reboot Bootloader.
3. fastboot boot twrp-3.3.1-2-ocean.img

It could be this:
1. fastboot -w
2. fastboot boot twrp-3.3.1-2-ocean.img

No need to get into TWRP the first time just to format the /data partition.
 

Quark^2

Senior Member
Sep 3, 2011
219
7
I've been running for quite some time with an unlocked + rooted Ocean.

I am now looking into installing TWRP (I want to install "detach" though TWRP), but am confused about the wiping of SDcard or data.
Can't I just install the TWRP image?

Fastboot boot + install the installer from within TWRP?
 
Last edited:

ummkiper

Senior Member
Jun 11, 2009
754
95
Denton,TX
oh man this guide was great thnks just rooted my g7 power after failing on other ways. had to go about the way you did had some issues in red while installing twrp unable to mount storage among others hoping this doesnt cause issue cause magisk installed and should be rooted and in phone now will update how it works thank again 5 starred the rating for you.

edit:so far so good and root status is a go.
 
Last edited:

tmiller101

Senior Member
Nov 12, 2010
118
34
Savannah
I've been running for quite some time with an unlocked + rooted Ocean.

I am now looking into installing TWRP (I want to install "detach" though TWRP), but am confused about the wiping of SDcard or data.
Can't I just install the TWRP image?

Fastboot boot + install the installer from within TWRP?

Ate you running the stick ROM or a custom ROM?
 

archstar1982

Member
Oct 13, 2017
24
6
Hi, I am going to flash LineageOS to my ocean. It's the first time doing this and the first nightly build for 17.1 on ocean was just released today.

I'm curious about Magisk. It seems like a very powerful tool but I don't know if I need it at all, or will need it down the road.

I bought my Moto G7 Power last week, it has been updated to Android 10. I have not flashed Lineage 17.1 yet but I intend to. I have a few questions:



  1. Is it best to install Magisk at the same time?
  2. Can I install Magisk at a later date after I flash LineageOS?
  3. I have read several posts saying you need to flash back to stock ROM before flashing Magisk, so if I'm coming from stock ROM on a brand new device, is that necessary?
HOW TO FLASH LINEAGE OS 17 WITH TWRP FOR XT1955-5 (WINDOWS PC)

1. Boot phone into bootloader
To get to Fastboot: Hold Vol Down + power button for more than 5 ~ 10 seconds

2. Temporarily booting a custom recovery using fastboot
Connect phone to PC, then use the command in Windows
"fastboot boot (file name of twrp)" ( e.g. "fasboot boot twrp-x.x.x-x-ocean.img")

2-a. !!IMPORTANT!! Pre-install instructions
If you are coming from stock ROM you must install copy-partitions zip file.
Within recovery go to Advanced >> ADB SIDELOAD >> swipe
In windows command "adb sideload (file name of copy partition)" ( e.g. "adb sideload copy-partitions-2020xxxx_xxxx.zip")
After install copypartition.zip, go to REBOOT >> BOOTLOADER
In windows command "fastboot -w" in Bootloader mode,, then go to step 3

2-b. If you are not coming from stock rom proceed to 3
Make sure to remove all Google account and security lock

3. Erase all data on both slots A/B
Go to bootloader mode, type "fastboot -w" in windows command (IGNORE ERROR/REMOTE FAILURE/ ITS OK!)
then boot into recovery by using command "fastboot boot (file name of twrp)" ( e.g. "fasboot boot twrp-x.x.x-x-ocean.img") in windows command

4. Formatting data and wipe Slot A or B
In recovery mode go to WIPE >> FORMAT DATA >> type "yes" then go back, then WIPE >>
check Dalvik/Art Cache, Data, Internal Storage, System >> SWIPE

5. Formatting data and wipe Slot A or B
Back to home by pressing back or home button then go to REBOOT(Don't reboot yet!!)
>> SLOT A(If you are coming from B in step 4) SLOT B(If you are coming from A in step 4) then go back to
>> WIPE >> Dalvik/Art Cache, Data, Internal Storage, System >> SWIPE. Back to REBOOT >> BOOTLOADER >> SWIPE

7. Boot back to recovery mode
Boot into recovery mode again use the command in Windows
"fastboot boot (file name of twrp)" ( e.g. "fasboot boot twrp-x.x.x-x-ocean.img") same as step 2

8. Install Lineage OS 17
In my case I was able to install without issue while I'm in Slot "A".
If you choose slot "A", custom rom will install to slot "B"
Within recovery go to REBOOT >> SLOT A >> back to home >> ADVANCED >> ADB SIDELOAD >> SWIPE
In windows command "adb sideload (file name of lineage os rom zip)" ( e.g. "adb sideload lineage-17.1-2020xxxx-nightly-ocean-signed.zip")
Installation now starts in slot B. When installed successfully >> REBOOT SYSTEM.

9. Bootloop or normal initial boot and back to bootloader
May bootloop twice, it will indicate corrupted need Factory Reset, Do the Reset..Rom will restart and boot..
When the rom boots up do not setup anything.
Just turn off the dvice and back to bootloader by "Hold Vol Down + power button for more than 5 ~ 10 seconds"

10. Installiing Google App
Boot into recovery mode again use the command in Windows
"fastboot boot (file name of twrp)" ( e.g. "fasboot boot twrp-x.x.x-x-ocean.img") same as step 2
Then go back to REBOOT to double check which slots you are in. It should switch to slot "B" automatic if not just press Slot "B".
Now back to home then go to >> ADVANCED >> ADB SIDELOAD >> SWIPE
In windows command "adb sideload (file name of G Apps zip)" ( e.g. "adb sideload open_gapps-arm64-10.0-nano-2020xxxx.zip")
!!At this moment DO NOT INSTALL MAGISK YET!!

11. Clean up and initial boot
Go to REBOOT >> BOOTLOADER
In windows command type "fastboot -w" in windows command (IGNORE ERROR/REMOTE FAILURE/ ITS OK!)
and type "fastboot reboot". Finally Lineage should starts now.

12. Magisk installation
After setting up your phone turn the developer mode and enable USB debugging.
Turn off your phone and back to bootloader again Hold Vol Down + power button for more than 5 ~ 10 seconds.
Boot into recovery mode again use the command in Windows
"fastboot boot (file name of twrp)" ( e.g. "fasboot boot twrp-x.x.x-x-ocean.img") same as step 2
Go to >> ADVANCED >> ADB SIDELOAD >> SWIPE
In windows command "adb sideload (file name of Magisk)" ( e.g. "adb sideload Magisk-vxx.x.zip")
After install back to home go to WIPE >> Dalvik/Art Cache >> back to home >> REBOOT >> SYSTEM.

At this moment my Favorite Game Pokemon Go works perfect!
 
  • Like
Reactions: vegaluvsvagina

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    So when I got this device I went to root it and found there's not very good documentation on what to do to get root and recovery installed so after many boot loops and reinstall of firmware here is what I did to gain root and TWRP and have a stable environment. You will need to use ADB & Fastboot commands please install either this : https://forum.xda-developers.com/showthread.php?t=2317790 or https://forum.xda-developers.com/showthread.php?t=2588979 or you can install from here: https://developer.android.com/studio/releases/platform-tools. you will also need the Motorola drivers located here: https://support.motorola.com/us/en/solution/MS88481. Once you have obtained these you can proceed with the bootloader unlock. I have the unlocked version of the Motorola G7 Power so I was able to fallow the sets here: https://support.motorola.com/us/en/bootloader/unlockyourdeviceb. If you have a different variant I'm not sure if your able to unlock your bootloader please try and let me know in this thread. I AM NOT RESPONSIBLE IF YOU SCREW YOUR DEVICE UP OR FOR ANY DAMAGE TO YOUR DEVICE

    Bootloader unlock steps:
    1. On your device go to Settings and to System, Then About phone and click " Build Number " until you unlock developer options.
    2. Back out one step and click the Advanced tab and then click " Developer Options ".
    3. Once in developer options " OEM Unlocking " turn off " Automatic Updates " and enable "USB Debugging".
    4. Once you have done USB Debugging open the start button type "CMD" and open a command prompt.
    5. Once in command prompt type " adb devices " make sure you authorize the pc on the phone. then type in command prompt " adb reboot bootloader "
    6. Once in bootloader type in command prompt " fastboot oem get_unlock_data " from here fallow the directions on the Motorola Bootloader Unlocking page: https://support.motorola.com/us/en/bootloader/unlockyourdevice
    7. Take the number given to you by Motorola and type in command prompt " fastboot oem unlock CODE FROM MOTO " then enter the same command again and your device will be bootloader unlocked.

    TWRP & Magisk install:
    This is where I found it to be difficult to get things right either I would bootloop or I wouldn't be able to unencrypt my sd card in TWRP so I couldn't read things right all sorts of dumb issues. All the files I used are attached so please let me know if this works as well as it did for me. Please download the TWRP .img file it was too large to attach: https://dl.twrp.me/ocean/ Also make sure that your command prompt is in the directory of your stored files.

    Here are a list of commands to get TWRP and install Root please be in bootloader mode to start this process.
    1. fastboot boot twrp-3.3.1-2-ocean.img
    2. In TWRP go to the wipe option and select the format and type " yes " once it has done that go back to the main TWRP page by hitting the home bottom and select Reboot and select Reboot Bootloader.
    3. fastboot boot twrp-3.3.1-2-ocean.img
    4. Once in TWRP adb push twrp-installer-3.3.1-2-ocean.zip /tmp/ then click install and navigate to the /tmp folder and install the TWRP .zip file
    5. After you install TWRP do this : adb push Magisk-v20.1(20100).zip /tmp/ then navigate to your /tmp folder and install Magisk .zip file
    6. After you install magisk you can reboot the system and let it sit it might loop once or twice but it will boot. I did the force encrypt disable with the attached zip file then i rebooted.

    Also I found it best to do this with a fresh installed firmware that hasn't been booted yet I downloaded the firmware/ROM from here: https://mirrors.lolinet.com/firmware/moto/ocean/official/RETUS/ here is a list of commands to copy and paste into command prompt please make sure your device is in bootloader/ fastboot mode.

    fastboot oem fb_mode_set
    fastboot flash partition gpt.bin
    fastboot flash bootloader bootloader.img
    fastboot flash dsp adspso.bin
    fastboot flash logo logo.bin
    fastboot flash boot boot.img
    fastboot flash dtbo dtbo.img
    fastboot flash system system.img_sparsechunk.0
    fastboot flash system system.img_sparsechunk.1
    fastboot flash system system.img_sparsechunk.2
    fastboot flash system system.img_sparsechunk.3
    fastboot flash system system.img_sparsechunk.4
    fastboot flash system system.img_sparsechunk.5
    fastboot flash system system.img_sparsechunk.6
    fastboot flash system system.img_sparsechunk.7
    fastboot flash system system.img_sparsechunk.8
    fastboot flash system system.img_sparsechunk.9
    fastboot flash system_b system_b.img_sparsechunk.0
    fastboot flash system_b system_b.img_sparsechunk.1
    fastboot flash system_b system_b.img_sparsechunk.2
    fastboot flash vendor vendor.img_sparsechunk.0
    fastboot flash vendor vendor.img_sparsechunk.1
    fastboot flash oem oem.img
    fastboot flash oem_b oem_other.img
    fastboot erase userdata
    fastboot erase DDR
    fastboot oem fb_mode_clear
    1
    I give up, SIM stopped working after multiple failed attempts at installing Custom ROMs, even so much as installing Magisk+force encrypt disable brings up Factory data reset screen. Now my SIM doesn't even work on another stock phone for some reason, since the ban that apparently exists, if applied, should be IMEI-only, and somehow it works on a Custom ROM+Magisk device of mine. Going back to stock with locked bootloader I guess
    SIM stopped working on G7 Power = neither SIM from two different carriers, one that's never been on a rooted/unlocked bootloader phone, don't even show up as a grey signal icon, tried both slots.
    My SIM not working on another stock phone (G7 Play) = not recognized at all, but at least it recognizes there's a SIM card in there, grey signal.
    Working fine on G5 with Magisk, Xposed and OmniROM

    So maybe I banned both the chip (?) and IMEI, but still for some reason it works on another bootloader unlocked phone

    From what I've been able to tell, the SIM cards are locked via IMEI (from MetroPCS I assume?, cause that's what they do), and will appear invalid, but should show the phone number in the settings. It should also say out of service, unless inserted into the phone that it originally belonged to.

    I have an E5 Play, and unlocked it using the device unlock app built-in from MetroPCS, after 3 months of service (maybe 6 I forget). After that, I could throw in other SIMs. But the phones those SIMs would come out of, they couldn't read the metro card. They said invalid. But it still recognized it was a card, and showed phone number in settings. Said out of service.

    After realizing this, I found out you can change devices in the website real quick, and that should solve the "invalid SIM" issue.

    Possibly some custom ROMs lack what restricts all this in the first place, and the Sim must be valid because it's a SIM, in service, and the proper network. No clue there. What carrier are you on?
    1
    same thing as always.. no matter what lol
    If it's same thing as always then you're still using "adb push magisk adb push Magisk-v20.1(20100).zip /tmp/". There's no "but I'm not", if it's indeed the same error as before you're messing up on the syntax. Make sure you've put Magisk inside Minimal ADB folder, rename it to magisk.zip and run "adb push magisk.zip /tmp/"
    1
    Excellent guide, rooted my Moto G7 from Metro PCS.
    1
    Sim not found issue resolution

    I give up, SIM stopped working after multiple failed attempts at installing Custom ROMs, even so much as installing Magisk+force encrypt disable brings up Factory data reset screen. Now my SIM doesn't even work on another stock phone for some reason, since the ban that apparently exists, if applied, should be IMEI-only, and somehow it works on a Custom ROM+Magisk device of mine. Going back to stock with locked bootloader I guess
    SIM stopped working on G7 Power = neither SIM from two different carriers, one that's never been on a rooted/unlocked bootloader phone, don't even show up as a grey signal icon, tried both slots.
    My SIM not working on another stock phone (G7 Play) = not recognized at all, but at least it recognizes there's a SIM card in there, grey signal.
    Working fine on G5 with Magisk, Xposed and OmniROM

    So maybe I banned both the chip (?) and IMEI, but still for some reason it works on another bootloader unlocked phone

    I had this issue as well. copy the stock rom files into the same folder as the adb and fastboot tools then use the powershell terminal with the following commands to re-flash the modem firmware:

    fastboot flash modem NON-HLOS.bin
    fastboot erase modemst1
    fastboot erase modemst2
    fastboot flash fsg fsg.mbn

    Cleared my issued right up. Also worth noting that I reflashed my phone with the stock retail rom before doing it.