Moto G7 root and TWRP - Moto G7 Guides, News, & Discussion

This thread contains known working root and custom recovery, along with any other verified working mods for this device
Thanks to anyone who is willing to help out in advance. You are awesome
Code:
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards, fires, rigged elections,
* thermonuclear war, or you getting fired because the alarms failed and you
* could not call in.
*
* Please ensure you have an advanced understanding of this device before
* flashing it! YOU are choosing to make these modifications of your own free will
THIS REQUIRES AN UNLOCKED BOOTLOADER!!! DO NOT ATTEMPT ON A LOCKED BOOTLOADER. YOU ALSO NEED APPROPRIATE DRIVERS AND ADB TOOLS. THIS GUIDE IS ONLY FOR THE MOTO G7 SERIES, DO NOT ATTEMPT ON ANY OTHER DEVICE
Also check under developer options USB debugging and OEM unlock is checked. Tap build number 7x under settings -> about phone to enable developer options. Please note that some carrier locked variants do not permit OEM unlocking and as such currently have no method to unlock the bootloader
Follow the instructions here to unlock your bootloader
Confirmed Magisk working with boot image, patched through Magisk app.
TWRP needs some work but basic functionality is up
Magisk
Download the appropriate firmware from here, making sure to match build number and variant, found under Settings -> System -> About Phone. Even if you use boot images given to you, I recommend you do this just in case something messed up
Extract the boot.img file
Copy it to the internal storage of your device
Install magisk manager app, found here and open it.
Make sure under advance setting both keep dm-verity and keep force encryption are checked, otherwise you may get stuck in a bootloop
Tap install beside "Magisk is not installed" on the first card
Tap patch boot image
Select your boot image
Once magisk creates the image, copy it to the folder that contains the adb tools
The output can be flashed via fastboot on an unlocked bootloader via
Code:
adb reboot bootloader
fastboot flash boot boot.img
After initial setup/first boot, reboot your device again. Magisk Manager stub should now show up under apps. If you have previously installed it, you'll still need to reboot after the initial boot with magisk for the app to recognize you have it
The stub will download the actual app (if necessary). Once that's installed, open it and tap yes when it asks you to set up environment. If that failed, just close the app and reopen, tapping yes on the prompt. Do that until it says setup done
We now have twrp so theoretically the magisk zip can be flashed. I personally have experienced a lot of problems with this method so I'd recommend against it, but if you want to here's how:
See below instructions to flash twrp if you haven't already
Download the latest magisk zip here and save it to your SD card if you have one
Reboot to TWRP via volume down + power, which will get you to bootloader. In bootloader, use the volume keys to scroll to recovery mode, then press power to select. I personally prefer adb via
Code:
adb reboot recovery
Type in you screen lock if prompted, then hit the check mark on keyboard when done
Tap install
Navigate to where you saved the zip and select it
Swipe to install
Follow the last two steps of the other method
TWRP
A beta version of TWRP is now available here. Credit to @Alberto97
Download the file and copy to your adb tools folder
Reboot to bootloader
Code:
adb reboot bootloader
Boot it with
Code:
fastboot boot twrp-version-build-river.img
Put the TWRP image in your external SD Card or, in case you don't have one, push it to /data with adb this way:
Code:
adb push twrp-version-build-river.img
Tap Advanced -> Install Recovery Ramdisk -> Navigate to /data or /external_sd and select TWRP -> Swipe to Install
Select Fix Recovery Bootloop from Advanced tab, and swipe to fix
In case of emergency (eg, soft brick), follow these instructions to get back to stock before reattempting. They may say for updating, but they work to get back to stock

I Have two G7 rooted with Magisk indeed

if you look at the full firmware there seems to be no stock recovery included in it. we definitely need twrp to even flash a custom gsi rom. id help but i have no time or idea how to build twrp.

mingkee said:
I Have two G7 rooted with Magisk indeed
Click to expand...
Click to collapse
Can you please provide evidence? A screenshot of the main page of Magisk app and a screenshot of root checker will do

fix-this! said:
if you look at the full firmware there seems to be no stock recovery included in it. we definitely need twrp to even flash a custom gsi rom. id help but i have no time or idea how to build twrp.
Click to expand...
Click to collapse
I know how, but I'd need the stock recovery

clcombs262 said:
Can you please provide evidence? A screenshot of the main page of Magisk app and a screenshot of root checker will do
Click to expand...
Click to collapse
OK
You asked for it

clcombs262 said:
I know how, but I'd need the stock recovery
Click to expand...
Click to collapse
There's a possibility recovery is merged into boot.img
I found patched boot is significantly smaller than original
I will look more into original boot.img to find required parameters for boardconfig.mk, but probably you can only boot with TWRP not flashing it.

mingkee said:
OK
You asked for it
Click to expand...
Click to collapse
Can you share step by step how you did it?
Like patch boot img with magisk, flash magisk zip, use TWRP, etc?

mingkee said:
There's a possibility recovery is merged into boot.img
I found patched boot is significantly smaller than original
I will look more into original boot.img to find required parameters for boardconfig.mk, but probably you can only boot with TWRP not flashing it.
Click to expand...
Click to collapse
Thanks for the effort!

clcombs262 said:
Can you share step by step how you did it?
Like patch boot img with magisk, flash magisk zip, use TWRP, etc?
Click to expand...
Click to collapse
He described it in
https://forum.xda-developers.com/moto-g7/how-to/root-g7-magisk-t3907084/page4
I'm trying to gather enough courage to root my G7. Scary. But I need it for things like titanium backup, AfWall, etc.
Besides I believe twrp is not yet available. Need it for the nandroid backup to restore if things go bad.

maybeme2 said:
He described it in
https://forum.xda-developers.com/moto-g7/how-to/root-g7-magisk-t3907084/page4
I'm trying to gather enough courage to root my G7. Scary. But I need it for things like titanium backup, AfWall, etc.
Besides I believe twrp is not yet available. Need it for the nandroid backup to restore if things go bad.
Click to expand...
Click to collapse
That's a generic set of instructions, with no links or evidence provided that it works
I could literally use those instructions to root any device with magisk. (Excluding device that can't unlock bootloader and such)
I'm looking for confirmation, instructions tailored to our device, links to appropriate files, what's working on what model/firmware/variant, etc
Also we should figure out TWRP. Very handy in rooting and unrooting

clcombs262 said:
That's a generic set of instructions, with no links or evidence provided that it works
I could literally use those instructions to root any device with magisk. (Excluding device that can't unlock bootloader and such)
I'm looking for confirmation, instructions tailored to our device, links to appropriate files, what's working on what model/firmware/variant, etc
Also we should figure out TWRP. Very handy in rooting and unrooting
Click to expand...
Click to collapse
I have my Moto G7 xt1962-1 US Retail rooted with magisk. It works. You can use my patched boot image if your're running the same on ppo29.114-16-5 and don't want to do it yourself. Flash with:
Code:
fastboot flash boot patched_boot.img

mingkee said:
There's a possibility recovery is merged into boot.img
I found patched boot is significantly smaller than original
I will look more into original boot.img to find required parameters for boardconfig.mk, but probably you can only boot with TWRP not flashing it.
Click to expand...
Click to collapse
Of course its merged. I did not realize this, but it is a arm64 A/B partition device. that means that recovery is merged into boot

clcombs262 said:
That's a generic set of instructions, with no links or evidence provided that it works
I could literally use those instructions to root any device with magisk. (Excluding device that can't unlock bootloader and such)
I'm looking for confirmation, instructions tailored to our device, links to appropriate files, what's working on what model/firmware/variant, etc
Also we should figure out TWRP. Very handy in rooting and unrooting
Click to expand...
Click to collapse
I can work on providing the steps I take with river_amz later today and document each step. Will edit this reply when I do so.

Ni
clcombs262 said:
That's a generic set of instructions, with no links or evidence provided that it works
I could literally use those instructions to root any device with magisk. (Excluding device that can't unlock bootloader and such)
I'm looking for confirmation, instructions tailored to our device, links to appropriate files, what's working on what model/firmware/variant, etc
Also we should figure out TWRP. Very handy in rooting and unrooting
Click to expand...
Click to collapse
cclombs, you are correct. ANY device that can be bootloader unlocked can be rooted with Magisk in this way. Magisk works by inserting itself into the boot image so you just need access to the boot image. However, this method requires you to have access to the Stock ROM. Luckily, Moto seems to be very good about supplying this.
EDIT: Section removed. Access to read boot.img requires root. I was wrong!
And yes, I have successfully achieved root using the above methods. I used it on my Moto G7 Power, and on my Nexus E4 plus before TWRP was available.

zerogun said:
cclombs, you are correct. ANY device that can be bootloader unlocked can be rooted with Magisk in this way. Magisk works by inserting itself into the bootloader so you just need access to the bootloader image. However, this method requires you to have access to the Stock ROM. Luckily, Moto seems to be very good about supplying this.
Theoretically, even if you did not have access to the stock ROM, you can enable ADB debug in Developer Options, go into an ADB shell, and then do this:
dd if=/dev/block/[boot location] of=/data/downloads/boot.img
This would do a full image backup of your boot.img and put into your downloads folder. And yes, I have successfully achieved root using the above methods. I used it on my Moto G7 Power, and on my Nexus E4 plus before TWRP was available.
Click to expand...
Click to collapse
I thought dd required root?
And I think you mean boot image, not bootloader. Bootloader is very different, and should NEVER be modified

You are correct. I meant to say boot image. I'll edit to not confuse people.
I'll have to check later on if dd requires root. I thought it only needed adb debig access.

Thank you zerogun. I'm trying to learn.
zerogun said:
However, this method requires you to have access to the Stock ROM. Luckily, Moto seems to be very good about supplying this.
Click to expand...
Click to collapse
Where do they supply these stock ROMs?
zerogun said:
Theoretically, even if you did not have access to the stock ROM, you can enable ADB debug in Developer Options, go into an ADB shell, and then do this:
dd if=/dev/block/[boot location] of=/data/downloads/boot.img
This would do a full image backup of your boot.img and put into your downloads folder. And yes, I have successfully achieved root using the above methods. I used it on my Moto G7 Power, and on my Nexus E4 plus before TWRP was available.
Click to expand...
Click to collapse
When you 'go into an adb shell' do you mean use adb from a connected PC or is there an adb shell app on the phone itself?

Anybody interested in partially working TWRP? My plan was to release it once fully working but I'm stuck on decryption since days (I can't understand what keymaster 4 is still missing since it wants to upgrade the key) and I might change idea.
With broken decryption you can't use your internal storage but you will be still able to flash things from sdcard or usb otg.

Alberto97 said:
Anybody interested in partially working TWRP? My plan was to release it once fully working but I'm stuck on decryption since days (I can't understand what keymaster 4 is still missing since it wants to upgrade the key) and I might change idea.
With broken decryption you can't use your internal storage but you will be still able to flash things from sdcard or usb otg.
Click to expand...
Click to collapse
You can wipe with TWRP to remove encryption once, but you have to reboot in TWRP

Related

[GUIDE] Rooting your Essential PH-1

WARNING: Before attempting to root your device, do note that by unlocking your bootloader and modifying your device with root, ROMs, etc... you are risking voiding your warranty! I am NOT responsible for what you do to your device either, so follow these instructions at your own risk. Make sure you know what you're doing, it's best to understand the process rather than just copy and paste commands and such.
Useful and important general information can be found in the second post here.
NOTES
1. If you flash the TWRP Installer when you've already got Magisk installed, your device will keep booting to the recovery. You should be able to fix this by just simply reflashing Magisk.
2. If you have TWRP installed via the TWRP Installer, you will not be able to install stock OTA updates. You will have to reflash the stock boot image for whatever build you're running beforehand.
3. The prebuilt TWRP image may not have touch functionality if you're using the September 2018 Update or newer. Patching the boot image, however, for these builds with the TWRP Installer will allow touch to work flawlessly. Here is a pre-patched September 2018 Boot Image with TWRP. It should also work with builds newer than September. Since it's based off the September 2018 update, I suggest not using this as your main boot image but rather just as a replacement for the pre-built TWRP image from the official TWRP thread.
4. Simple "flash and forget" boot images pre-patched with Magisk and TWRP are provided by @aer0zer0 and are available here. They are based on ianmacd's variant of Magisk. If you are running stock, you can flash these boot images to get root and TWRP instead of following the guide to patch it yourself. Here is January's.
If you don't care about TWRP and simply want to just root your device, you can just simply patch the boot image for your ROM with the Magisk Manager and flash it in fastboot with
Code:
fastboot flash boot patched_boot.img
The link to the boot images for most stock builds can be grabbed from my Google Drive link in the second post or from the back-to-stock zips.
REQUIREMENTS
An unlocked bootloader
Working adb and fastboot environment, along with knowledge on how they work.
The latest build of TWRP along with the TWRP Installer. Read Note 3 above beforehand.
1. Download the latest build of TWRP and the TWRP Installer. Transfer the TWRP Installer zip to your device.
2. Reboot your phone into fastboot. Once in fastboot, change your device's current slot using the command
Code:
fastboot set_active other
If the command above doesn't work for you, use fastboot getvar current-slot followed by fastboot -aX, replacing "X" with the slot opposite (a or b) from your current slot.
3. Once your device's current slot has been switched, flash the TWRP image you downloaded earlier using the command
Code:
fastboot flash boot twrp.img
Depending on your version of fastboot, the above command might not work either. In that case, you can enter the following command, replacing "X" with your current slot (a or b).
Code:
fastboot flash boot_X twrp.img
4. Once TWRP has been flashed, boot into the recovery.
5. Once you have booted into TWRP, simply flash the TWRP Installer zip.
6. Once you have finished flashing the TWRP Installer zip, boot to recovery on the OPPOSITE slot. You can do this from TWRP by going to "Reboot", then selecting the opposite of the current slot (if on A, select Slot B. If on B, select Slot A), then select "Recovery." You can also do this through fastboot by running the same command from step 2.
7. Once you have booted back into TWRP, simply flash the Magisk zip and you are now good to go! Feel free to flash anything else like kernels while you're at it.
8. Reboot. :good:
NOTE: TWRP WILL remain installed on your device so long as you reflash the installer zip after every update.
Important Information for the Essential PH-1 can be found here. Keep it bookmarked.
Tips on updating via OTA after rooting can be found here.
In the case that you mess something up on your device, you may find it helpful to revert back to stock with the unofficial factory images graciously provided by @invisiblek and @aer0zer0 over here.
Official TWRP XDA Thread for the Essential PH-1
Join the Essential PH-1 Discord Server! -- Lots of cool people here!
Join the Essential PH-1 Development Telegram Channel!
Stock Boot Images for most builds can be found at my Google Drive link here.
Have a Red Verity Warning when booting your device? Click here.
If the link to the boot.fix.red image isn't working, you can also find it here or in my Google Drive link in the first post.
Essential Phone (PH-1) Partition Layout
Dumping Boot Images
1. Find the current slot with
Code:
fastboot getvar current-slot
or
Code:
adb shell getprop ro.boot.slot_suffix
2. Switch to the opposite slot in Fastboot using the command
Code:
fastboot set_active other
3. Flash TWRP using the command
Code:
fastboot flash boot twrp.img
4. Now, boot into TWRP and use the following command from your PC, replacing X in "boot_X" with the original slot from step 1 (a or b). TRIPLE CHECK:
Code:
adb shell dd if=/dev/block/bootdevice/by-name/boot_X of=/sdcard/boot.img
5. Profit! Don't forget to switch back to the original partition with the same command from step 2!
extractTarFork() error when restoring data from a TWRP backup
1. Reinstall the ROM from which the backup is based on.
2. Wipe your data. You can do this from the recovery or from fastboot using the command
Code:
fastboot -w
3. Boot into the ROM. When going through the initial setup, use the EXACT same security setup as the one from your backup. For example, if you used a Fingerprint + Password in the backed up ROM, use the exact same combo along with the exact same password as well. There is no need to set up anything else, like accounts.
4. Flash, install, and reboot into TWRP. You should now be able to restore the data backup without any issues.
AFH mirrors for images:
Build NMJ32F
NMJ32F patched boot image
NMJ32F factory image
Build NMJ20D
NMJ20D patched boot image
NMJ20D factory image
TWRP (alpha v4)
Thanks for getting the latest boot image up so quickly.
Thanks for the detailed guide, it worked great!
Any idea how to install xposed sdk 25? I tried the adb sideload function and the Magsik Module but both failed. Any ideas?
how to install the NMJ32F ota update when you are already rooted on NMJ20D?
Tried adb sideload but cannot install obviously because boot-loader is unlocked and is rooted.
prgopala said:
how to install the NMJ32F ota update when you are already rooted on NMJ20D?
Tried adb sideload but cannot install obviously because boot-loader is unlocked and is rooted.
Click to expand...
Click to collapse
You need to flash the system and boot images from Invisiblek's stock ROM dump. You'll then be unrooted and will be able to accept the update.
Factory reset no longer required if your bootloader is already unlocked? Does TWRP read encypted storage now? Or is that still a problem?
@bmg1001 , good looks, here are more free XDA points to trade in for that pool table, lol.
gk1984 said:
Factory reset no longer required if your bootloader is already unlocked? Does TWRP read encypted storage now? Or is that still a problem?
Click to expand...
Click to collapse
As far as I know, TWRP still doesn't have decryption fully working just yet, but installing Magisk works fine without any factory resets.
prozo said:
Thanks for the detailed guide, it worked great!
Any idea how to install xposed sdk 25? I tried the adb sideload function and the Magsik Module but both failed. Any ideas?
Click to expand...
Click to collapse
Xposed works fine for me. Make sure you installed the correct Xposed Installer/Manager apk linked in the thread for the Xposed Module. Also, it may take a reboot or two for Xposed to fully activate.
Did anyone manage to disable encryption? I tried everything and failed
bmg1001 said:
Xposed works fine for me. Make sure you installed the correct Xposed Installer/Manager apk linked in the thread for the Xposed Module. Also, it may take a reboot or two for Xposed to fully activate.
Click to expand...
Click to collapse
Maybe I'm not gathering the information correctly, using the Magisk Module itself doesn't work, sideloading the zip file via the adb fastboot TWRP.img doesn't work either, using the actual Xposed APK installer doesn't work either. I rebooted the phone about 4 times before removing it entirely.
Any chance you can walk me through how you got it installed without the TWRP recovery fully installed?
prozo said:
Maybe I'm not gathering the information correctly, using the Magisk Module itself doesn't work, sideloading the zip file via the adb fastboot TWRP.img doesn't work either, using the actual Xposed APK installer doesn't work either. I rebooted the phone about 4 times before removing it entirely.
Any chance you can walk me through how you got it installed without the TWRP recovery fully installed?
Click to expand...
Click to collapse
All I did was install the Xposed APK and then the Xposed Magisk Module. After two reboots, the apk said everything was working. This is the apk I used: https://drive.google.com/file/d/16-OHpswcngp1KLtkWCBDwwl8AvFafR5H/view?usp=drivesdk
bmg1001 said:
All I did was install the Xposed APK and then the Xposed Magisk Module. After two reboots, everything was working. This is the apk I used: https://drive.google.com/file/d/16-OHpswcngp1KLtkWCBDwwl8AvFafR5H/view?usp=drivesdk
Click to expand...
Click to collapse
Thanks for replying so quickly I appreciate it, the file you linked keeps opening on my end and fails to install saying it's corrupt
prozo said:
Thanks for replying so quickly I appreciate it, the file you linked keeps opening on my end and fails to install saying it's corrupt
Click to expand...
Click to collapse
The apk should be the same one found here: https://forum.xda-developers.com/xposed/unofficial-systemless-xposed-t3388268
bmg1001 said:
All I did was install the Xposed APK and then the Xposed Magisk Module. After two reboots, the apk said everything was working. This is the apk I used: https://drive.google.com/file/d/16-OHpswcngp1KLtkWCBDwwl8AvFafR5H/view?usp=drivesdk
Click to expand...
Click to collapse
Alright I got it to work
So I didn't use the APK instead I downloaded the zip from the XDA thread that is specifically for Magisk Module and then added via the modules tab on the left side of the Magisk Module APK.
After I restarted I had the newly installed APK to download and install the proper version of Xposed 88.2 sdk25
Another restart and boom I got the active module notification in green.
Thanks man!
Thread for downloads can be found here:
https://www.google.com/amp/s/forum....ed/unofficial-systemless-xposed-t3388268/amp/
Thank you for this!
My PH-1 is arriving today. SooOoo excited!
spotmark said:
You need to flash the system and boot images from Invisiblek's stock ROM dump. You'll then be unrooted and will be able to accept the update.
Click to expand...
Click to collapse
Would using flashfire work to install the ota?
drocny87 said:
Would using flashfire work to install the ota?
Click to expand...
Click to collapse
Couldn't tell you. I just used TWRP to flash the system and boot, and then took the update, and then rerooted.

[Guide]How to Root OnePlus 6 Guide! [Video Tutorial][Windows/Mac/Linux]

For those of you who want to root your OnePlus 6, here is the easiest root method even a 10-year old can follow that works on all Windows, Mac, and Linux. Now, before I begin, you will have to unlock the bootloader. If you have not unlocked your bootloader or don’t know what that is, please follow How to Unlock Bootloader on OnePlus 6 first!
Here's a full step-by-step video tutorial:
First, I want to thank those who made root tutorials but I found an easier way to root that does not involve switching any slots, took me a quite awhile to figure this out but well worth the effort. You only have to flash TWRP image to boot, then with TWRP flash boot.img, TWRP installer, and Magisk with this tutorial. You can do it easily on all Windows, Mac, Linux, or even Chromebook(just install Chrome ADB on Chrome Web store)
Special thanks to magnamentis, his method didn't work for me as I lost my Wifi but after few hours of tinkering, found you can just reflash boot.img then the TWRP installer zip file he provided, and voila! Flawless root everytime, I've tested this about 10 times now, thanks again for the post here:
https://forum.xda-developers.com/showpost.php?p=76687704&postcount=212
Step 1. Once you have unlocked your bootloader, make sure to SIGN IN as if you do not sign into your phone, you will end up in a nasty bootloop.
Step 2. Check your Android version in Settings->About Phone just in case you are reading this in the future when Android 9.0 comes out but this tutorial is future-proof and will work on future Android versions so long as you use the correct boot image file.
Step 3. Power off your phone and hold down Volume Up and Power buttons for about 3 seconds until you enter the Fastboot mode. When doing this, make sure your USB cable is disconnected otherwise you may enter another special mode for unbricking. If you mess up and get into that special mode, simply reboot your device by holding down Volume Down and Power buttons for about 20 seconds.
Step 4. Once in fastboot mode, connect a USB cable from your OnePlus 6 to your computer. You can use Windows, Mac, or Linux. For my video tutorial, I will be using Windows 10 but you can go ahead and use the substitute code for Mac or Linux as most of the steps are nearly identical.
Step 5. You will need to download:
NOTE: All the download links are at the BOTTOM OF THE PAGE, wait 5 secs and click on "CLICK HERE TO DOWNLOAD", don't click on the ads!!!
Download fastboot.zip:
https://download.highonandroid.com/file/Tools/fastboot.zip
Android USB Drivers for Windows:
https://download.highonandroid.com/file/Drivers/UniversalAdbDriverSetup.msi
Download Magisk:
https://download.highonandroid.com/file/Tools/Magisk/Magisk-v16.4.zip
Download TWRP image:
https://download.highonandroid.com/file/TWRP/OnePlus6/twrp-3.2.1-oneplus6.img
Download TWRP installer zip:
https://download.highonandroid.com/file/TWRP/OnePlus6/twrp-installer-oneplus6-3.2.1.zip
Download and boot.img for OnePlus 6T Android 8.1:
https://download.highonandroid.com/file/TWRP/OnePlus6/boot/8.1/boot.img
Step 6. If you have followed my bootloader unlock tutorial and installed drivers for Windows, you can skip that step. If not, you can go head and run the Android USB Driver program and install drivers. For Mac or Linux, no drivers are needed!
Step 7. Unzip fastboot.zip and move over the TWRP image file you downloaded earlier to the fastboot folder.
Step 8. Open a command prompt for Windows by typing “cmd” in the search bar. For Mac or Linux, open a terminal, if you don’t know how, please Google it.
Step 9. Type the following.
For Windows:
cd Downloads
cd fastboot
fastboot flash boot twrp twrp-3.2.1-oneplus6.img
For Mac:
cd Downloads
cd fastboot
chmod 755 *
./fastboot-mac flash boot twrp twrp-3.2.1-oneplus6.img
Note: CHMOD command basically changes file permissions so you can run the files.
For Linux:
cd Downloads
cd fastboot
chmod 755 *
sudo ./fastboot-linux flash boot twrp twrp-3.2.1-oneplus6.img
Note: CHMOD command basically changes file permissions so you can run the files.
This will flash the TWRP image to your boot partition. Normally, we can simply boot TWRP image but since we don’t have official TWRP recovery(as of writing this), you will have to flash TWRP image to the boot partition, which allows us to boot TWRP recovery.
Step 10. Choose “Recovery” using the Volume keys and hit Power button to enter TWRP recovery.
Step 11. Recovery will probably be in Chinese, hit the “Read Only” button, top button on left middle.
Step 12. You can change the language back to English by hitting the second box from bottom right then hit the globe icon on top right.
Step 13. Go back to your computer and copy over the TWRP install zip file, Magisk zip file, and boot.img file.
Step 14. You don’t need the USB cable connected anymore. Go ahead and install the boot.img file using the image option in Install menu. This will flash back your regular boot image to the boot partition.
Step 15. Next, install the TWRP install zip and Magisk zip file. This will give you permanent TWRP recovery and full root.
Step 16. Reboot and you should see everything working including WiFi, 4G LTE, yadayadayada. Open Magisk Manager app and find you have full root with SafetyNet pass also so you can hide root.
Verify you have full root by installing Titanium Backup app(free app) on the Play Store, you should see a Superuser request window.
That’s it! Enjoy folks!
OnePlus 6T? How is this supposed to be easier? You have sixteen steps here. The other method from wuxianlin is very simple I did it in five minutes with no issues at all including WiFi still working. And how can you say you don't have to switch slots. It is required to flag TWRP to both a and b for it to work properly. You don't even mention that in this tutorial.
se7ensde said:
OnePlus 6T? How is this supposed to be easier? You have sixteen steps here. The other method from wuxianlin is very simple I did it in five minutes with no issues at all including WiFi still working. And how can you say you don't have to switch slots. It is required to flag TWRP to both a and b for it to work properly. You don't even mention that in this tutorial.
Click to expand...
Click to collapse
I got lost trying to do that root method, I was following this one here:
https://forum.xda-developers.com/oneplus-6/how-to/oneplus-6-unlock-bootloader-flash-twrp-t3792643
But yeah you don't have to switch slots for my root tutorial, which can cause havoc if you flash to the wrong one. If you don't believe me just watch the video. It doesn't hurt to have multiple root methods so long as they work. But my Wifi kept dying everytime I used the slot switch method until I found this way to do it.
I am only trying to make a tutorial that even a kid follow but I've broken down a few steps into maybe 10+ steps, probably helpful for noobs who are trying to root. If you are advanced XDA user, great job though, took me a few hours myself to get a flawless root method. Believe me, I love shortcuts and any method that works the first time out but sucks if people don't explain every little detail as not everyone is an expert. I've been rooting phones for awhile now and it was not easy task with OP6.
Can i use this method over patched boot image? I now rooted from https://forum.xda-developers.com/oneplus-6/how-to/oneplus-6-magisk-root-oos-5-1-5-t3794440 this guide…i wonder
galza said:
Can i use this method over patched boot image? I now rooted from https://forum.xda-developers.com/oneplus-6/how-to/oneplus-6-magisk-root-oos-5-1-5-t3794440 this guide…i wonder
Click to expand...
Click to collapse
Yes, since this root method flashes a stock boot image after installing TWRP, you can follow it fine. But make a backup of everything just in case.
Basically, this root method, you flash TWRP to boot partition, then flash stock boot image in TWRP, flash TWRP installer for permanent TWRP, then flash Magisk, and reboot. It's actually just 4 steps, I had to make it much longer for noobs because they will mess up.
zedomax said:
Yes, since this root method flashes a stock boot image after installing TWRP, you can follow it fine. But make a backup of everything just in case.
Basically, this root method, you flash TWRP to boot partition, then flash stock boot image in TWRP, flash TWRP installer for permanent TWRP, then flash Magisk, and reboot. It's actually just 4 steps, I had to make it much longer for noobs because they will mess up.
Click to expand...
Click to collapse
I didn't have to switch slots to root at all and I used the very first method to gain root that was posted here on op6 forums.
https://forum.xda-developers.com/oneplus-6/how-to/oneplus-6-magisk-root-oos-5-1-5-t3794440
se7ensde said:
I didn't have to switch slots to root at all and I used the very first method to gain root that was posted here on op6 forums.
https://forum.xda-developers.com/oneplus-6/how-to/oneplus-6-magisk-root-oos-5-1-5-t3794440
Click to expand...
Click to collapse
Yes, that root method is great but it does not give you TWRP recovery, meaning you can't install custom ROMs with it. But if you need TWRP recovery, you will need to install TWRP recovery thru one of the tutorials here.
zedomax said:
Yes, that root method is great but it does not give you TWRP recovery, meaning you can't install custom ROMs with it. But if you need TWRP recovery, you will need to install TWRP recovery thru one of the tutorials here.
Click to expand...
Click to collapse
The current method of installing TWRP is not noob friendly. Nor is yours in fact after reading yours or seems not complicated than it needs to be. You also need to give credit to the creators of our TWRP and there guides.
galza said:
Can i use this method over patched boot image? I now rooted from https://forum.xda-developers.com/oneplus-6/how-to/oneplus-6-magisk-root-oos-5-1-5-t3794440 this guide…i wonder
Click to expand...
Click to collapse
Did it work for you?
Thanks @zedomax!! Never hurts to have different methods, opinions, or guides! Jeep rockin! #neversettle
@zedomax Thank you for these amazing tutorials. I watched both your videos. In that you mentioned that OnePlus ota updates are twrp compatible but then if I root will I have to unroot the phone or flash the stock rom first then install that ota update and then root again or there's some other method to install OTA on a rooted device?
Aashay said:
@zedomax Thank you for these amazing tutorials. I watched both your videos. In that you mentioned that OnePlus ota updates are twrp compatible but then if I root will I have to unroot the phone or flash the stock rom first then install that ota update and then root again or there's some other method to install OTA on a rooted device?
Click to expand...
Click to collapse
You can accept OTA, but you will have to reflash Magisk.img. Most OTAs do not overwrite boot.img I think unless they are major updates(like to Android P 9.0 when available). So, just flash OTA and if you lose root, reboot into TWRP and flash Magisk.
HI, thanks for the guide but my phone just blocked at recovery launch. Ho can i do?
Same
Edit: It's ok, probably a bug
Thank you zedomax for taking the time to create this guide. I'm gonna try it!
I assume this will work for both A6000 and A6003 right?
Hi Admin,
I lost my Wifi as soon as i rooted my device, please help?
Prabhjeet Bagga said:
Hi Admin,
I lost my Wifi as soon as i rooted my device, please help?
Click to expand...
Click to collapse
Me too. How can this be fixed?
I think I bricked my phone.
This is what I did:
- Bought OnePlus 6 (I think it was A6000)
- Installed OTA, so I was on Android 8.1.0 and OOS 5.1.8
- Followed this tutorial, which broke wifi
- I followed mixtapes02's advice on the video and reflashed OOS 5.1.8
- Now I cannot boot into Android anymore, I can only get to TWRP
EDIT: I managed to install OOS 5.1.5 successfully
aximili said:
I think I bricked my phone.
This is what I did:
- Bought OnePlus 6 (I think it was A6000)
- Installed OTA, so I was on Android 8.1.0 and OOS 5.1.8
- Followed this tutorial, which broke wifi
- I followed mixtapes02's advice on the video and reflashed OOS 5.1.8
- Now I cannot boot into Android anymore, I can only get to TWRP
EDIT: I managed to install OOS 5.1.5 successfully
Click to expand...
Click to collapse
I had the same issues and went through the same process. Took a whole day to get it back to stock.
I am sorry to ask such a noob question, but i am very confused by the command you say to use in Step 9:
>fastboot flash boot twrp twrp-3.2.1-oneplus6.img
what is the meaning of the first "twrp" in that command?
shouldn't it be simply:
fastboot flash boot twrp-3.2.1-oneplus6.img
Thank you in advance for the explanation

[GUIDE] [ELI5] [Root] [TWRP] [Moto E5] Root and TWRP for Moto E5 Play Explained

Explain It like I'm 5 - TWRP and Root for Moto E5 Play (and other E5 variants)
Step-by-Step explanation of the Root procedure found in @CodyF86 TWRP and Root thread for the Moto E5 Play
Because there are some entry-level users out there, I wanted to break down the steps for those of us who might not have as much experience in working with phones.
12/02/18 - THREAD UPDATE!
PLEASE READ BEFORE CONTINUING
Procedure should be safe for all E5 devices.
DO NOT FLASH ANY NO-VERITY KERNELS LISTED IN XDA
Expand for details...
This guide was originally written for James specific devices.
HOWEVER.. many have asked if this will work on their specific devices, and after answering questions and doing some brief research, I am convinced that this procedure SHOULD BE safe for ALL Moto E5 devices.
BEWARE.. The TWRP port provided for this procedure is not fully ported for the E5. I have confirmed flashing zip or image files, and making/restoring backups of boot, system and data are successful with James. These basic features of TWRP will work on all E5 phones, BUT this TWRP build will cause your phone to be identified as a PERRY device when checked by ROMs or flashable zips that do assert checks on the device name or id.
Prerequisites
ADB and Fastboot installed on PC
Motorola USB Drivers installed for your device
TWRP and fstab files from E5 Play Root / Recovery thread.
Latest Magisk
DISCLAIMER
Unlocking your bootloader is not for the faint of heart. Unlocking your device and installing your own software might cause the device to stop working, disable important features and functionality, and even make the device unsafe to the point of causing you harm. Neither Motorola, nor your wireless carrier or retailer from whom you purchased the device, will be responsible for such damage, so please do not unlock or load any software unless you know what you are doing.
You have only yourself to blame. Unless you have a Developer Edition device, once you get the unlock code, your device is no longer covered by the Motorola warranty; in other words, please don't blame us if things go wrong, even if they appear unrelated to unlocking the bootloader.
The law still applies. You still need to operate your device in compliance with all applicable laws, rules and regulations prescribed by the FCC, and any other governmental agency for that matter. Your wireless carrier may prohibit unlocked devices from operating on their network.
Steps from Stock Device
1 - Unlock Bootloader
Procedure
Enable Developer Options on your Device (Settings -> About Device -> Software -> Tap Build No. until Dev. Options are enabled.
Enable USB Debugging under Developer Options.
Enable OEM Unlock under Dev Options
Follow the Motorola Bootloader Unlock Prodecure on Motorola's Customer Support Portal
2 - Flash TWRP
DISCLAIMER
This process will overwrite your recovery partition. It is wise to make a complete nandroid backup of your device prior to performing any of the steps below.
Procedure
Download Magisk zip package, TWRP 3.2.1 E5 Play and fstab.qcom files from the E5 Play Root Recovery thread.
Put these 3 files in your adb/fastboot directory on your pc
With your phone on and booted to android, connect to your PC using your USB cable.
Open Command Prompt and cd to your ADB/Fastboot directory
run "adb devices" to make sure your device is connected to adb (you will need to approve the initial connection on your device)
manually copy twrp_james.img to your phone's external sd card or
Code:
adb push twrp_james.img /sdcard/
run "adb reboot bootloader" to reboot to fastboot mode
boot directly to TWRP with
Code:
fastboot boot twrp_james.img
make a full backup and store the backup on your phone's external sd card or transfer to your PC.
in TWRP, Reboot->Reboot Bootloader
When back in fastboot mode, flash TWRP to your recovery partition.
Code:
fastboot flash recovery twrp_james.img
fastboot reboot recovery
your phone should reboot to TWRP now on your recovery partition.
3 - Disable Force-Encryption and Root device with Magisk
Procedure
while in TWRP, run the following in your ADB terminal
Code:
adb shell mount -o,rw /dev/block/bootdevice/by-name/vendor /vendor
adb push fstab.qcom /vendor/etc/fstab.qcom
from TWRP menu: Wipe-> Format Data
copy magisk zip to newly formatted data partition
Code:
adb push Magisk-v17.2.zip /sdcard/
From TWRP, Install Magisk zip
You now are rooted and have TWRP on your Recovery partition. After rebooting to Android, make sure you install the latest Magisk Manager first thing.
Great tutorial. Worked like a charm on my James.
Thanks for posting this. Ive been rooting and messing with phones for years but never really got comfortable with adb and fastboot commands and the other post makes no mention of unlocking the bootloader even though it was obvious i needed to. I considered doing it this way same way i unlocked my e4 Qualcomm but wasn't 100% sure that was what was needed until i read this. Very easy to follow guide that ensures i didn't miss anything.
AesopRock127 said:
Thanks for posting this. Ive been rooting and messing with phones for years but never really got comfortable with adb and fastboot commands and the other post makes no mention of unlocking the bootloader even though it was obvious i needed to. I considered doing it this way same way i unlocked my e4 Qualcomm but wasn't 100% sure that was what was needed until i read this. Very easy to follow guide that ensures i didn't miss anything.
Click to expand...
Click to collapse
My pleasure. Thank you very much. I'm happy to help.
Working like a charm on my Moto E5 PLAY XT1920-16
HI,
After a few attempts i've managed to root my Moto E5 PLAY XT1920-16. I did not flashed twrp_james.img (boot error) just boot directly to TWRP (fastboot boot twrp_james.img) and followed the instructions from step 3. Flashed boot logo from here to "hide" N/A, Bad Key message.
Thanks for this, as it's easy to understand and follow - especially the ADB in TWRP for FSTAB which I previously messed up and got into all sorts of horrible boot loops / errors and had to run away and hide for 36 hours as my wife threatened to chop off something if she heard me scream "B*******" one more time.
No drama this time, it just worked :laugh:
Will this work on a regular E5?
diaconu.silviu said:
HI,
After a few attempts i've managed to root my Moto E5 PLAY XT1920-16. I did not flashed twrp_james.img (boot error) just boot directly to TWRP (fastboot boot twrp_james.img) and followed the instructions from step 3. Flashed boot logo from here to "hide" N/A, Bad Key message.
Click to expand...
Click to collapse
Thanks for this! I've been trying to figure out how to hide the N/A forever on this phone
bubba1601 said:
Thanks for this, as it's easy to understand and follow - especially the ADB in TWRP for FSTAB which I previously messed up and got into all sorts of horrible boot loops / errors and had to run away and hide for 36 hours as my wife threatened to chop off something if she heard me scream "B*******" one more time.
No drama this time, it just worked :laugh:
Click to expand...
Click to collapse
Awesome lol. Thanks for your comment
Slavois said:
Will this work on a regular E5?
Click to expand...
Click to collapse
TWRP version excluded, yes, it should. First make sure you get a TWRP image that is compatible with E5 model you are working with. I wouldn't use the twrp_james.img file linked in this thread if you dont have a james device. I dont know if the regular E5 is james, nora or rhannah. You should have information related to this on your fastboot screen.
If I recall correctly, the fstab.qcom file linked in this thread, which is needed to disable encryption, should work on your phone. There was another member who used it on their E5 Plus without issue.
weakNPCdotCom said:
TWRP version excluded, yes, it should. First make sure you get a TWRP image that is compatible with E5 model you are working with. I wouldn't use the twrp_james.img file linked in this thread if you dont have a james device. I dont know if the regular E5 is james, nora or rhannah. You should have information related to this on your fastboot screen.
If I recall correctly, the fstab.qcom file linked in this thread, which is needed to disable encryption, should work on your phone. There was another member who used it on their E5 Plus without issue.
Click to expand...
Click to collapse
Also a warning about twrp.....
I'm using the XT1920-15 E5 play (PETTYL) and the alleged twrp version for that device (not available here on XDA) doesn't work on that device.
The James version works on PETTYL.
There's two or three E5 play and plus twrp versions floating around here, just a heads up for users to be cautious.....
bubba1601 said:
There's two or three E5 play and plus twrp versions floating around here, just a heads up for users to be cautious.....
Click to expand...
Click to collapse
I would love a TWRP build for this phone that supports backups for all the major partitions and not just basic system/data/cache
Would also be nice if it could wipe lock screen security.
If I knew how to port twrp I would build some
Error msg.
When I run this command I get the following message below. I used both command prompt and powershell. Powershell gives me that error message while command prompt just goes through, but it doesnt give me any confirmation. What must I do?
PS C:\Users\Lit\Desktop\Moto E5 play root> adb shell mount -o,rw /dev/block/bootdevice/by-name/vendor /vendor
Error msg:
At line:1 char:19
+ adb shell mount -o,rw /dev/block/bootdevice/by-name/vendor /vendor
+ ~
Missing argument in parameter list.
+ CategoryInfo : ParserError: ) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingArgument
Im using moto e5 play for TMobile xt1921-3 and was wondering if someone can point me in the right direction for twrp installation? And the proper img file? The one I flashed, twrp_james.img, stuck for like a day but now its gone?? Wat am i doin wrong?
Swagnutz34 said:
Im using moto e5 play for TMobile xt1921-3 and was wondering if someone can point me in the right direction for twrp installation? And the proper img file? The one I flashed, twrp_james.img, stuck for like a day but now its gone?? Wat am i doin wrong?
Click to expand...
Click to collapse
If you follow these directions in the op exactly you will be fine and twrp will stick after you boot. The twrp linked here in the op is the one. I used it and I have same exact device as you, same model and all. From my experience tinkering with it you gotta decrypt for twrp to stay. Otherwise if you wanna stay encryted you just use fastboot and fastboot boot twrp.img from your computer every time you use recovery. Hope that helps.
Sent from my XT1921-3
SM210 said:
If you follow these directions in the op exactly you will be fine and twrp will stick after you boot. The twrp linked here in the op is the one. I used it and I have same exact device as you, same model and all. From my experience tinkering with it you gotta decrypt for twrp to stay. Otherwise if you wanna stay encryted you just use fastboot and fastboot boot twrp.img from your computer every time you use recovery. Hope that helps.
Click to expand...
Click to collapse
I got twrp to stick but cant back up data? N magisk flashed no problem....here are some screenshots. Im tryin to flash lineage rom n im gettin no where lol. Sorry im a noob!
Swagnutz34 said:
I got twrp to stick but cant back up data? N magisk flashed no problem....here are some screenshots. Im tryin to flash lineage rom n im gettin no where lol. Sorry im a noob!
Click to expand...
Click to collapse
As 1st post states: see my screenshot attached from the original post... Follow that exactly
then flash magisk 17.2 zip in twrp recovery and reboot and you then can see your data partition in recovery and twrp will hold perminately.
Hope that helps. Always read up alot , I always try to. As specially these days. TONS of new things to learn. Hope that helps. Cheers.
Sent from my james using XDA Labs
for some reason i can flash the hannah twrp 3.2.3 for my moto e5 plus and i can boot intp twp recovery. i made a back up and now its just stuck on the start up loop. and when i get to the adb part of this tutorial i cant push none of the files using the sideload option in twrp so i can decrypt twrp.
Failed at 'fastboot reboot recovery' with the following:
rebooting into recovery FAILED (remote: 'Unknown command')
Continued from step 3 after bring it back to TWRP as [email protected] suggested. However, did not get root. Any suggestions what to try next? The device is XT1921-2.
Thanks!
Hi! I have the xt1920-18 version and TWRP doesn't recognize touch. In case anyone else has this problem, I used the mouse with OTG and it works perfect.Hi! I have the xt1920-18 version and TWRP doesn't recognize touch. In case anyone else has this problem, I used the mouse with OTG and it works perfectly.

[GUIDE] STEP-BY-STEP Instructions to Install Monthly OTA updates on Rooted Essential

[GUIDE] NOOB-Friendly STEP-BY-STEP Instructions to Install Monthly OTA updates on Rooted Essential PH-1
Introduction: I know there are many threads already posted that answer how to install OTA on rooted devices but unfortunately they get lost in massive threads that are often not NOOB friendly. I do not claim to be an expert but I have spent a long time reading threads and found the method I will detail below the easiest for me to follow on a monthly basis. I will do my best to give credit where credit is due to the original authors but my apologies in advance if I miss anything.
Just to start the prerequisites I have are a Windows 10 PC, Essential PH-1, with Stock OS and stock unlocked Bootloader. I have tried using TWRP in the past but I found this method simpler. I don't know whether my instructions will work for you or not if you already have TWRP installed but I can let one of the experts respond and I will be happy to update the guide based on feedback.
Part 1 - Downloads
Start by downloading the following items and storing them locally on your PC if you don't have them already
Download the latest OTA Monthly build from here: https://www.essential.com/developer/current-builds Note: Just check off that you are looking for "Current Builds" and click "Submit Form" and then click "Download (OTA)" link beneath the newest release you want.
Download the newest stock boot image here from bmg1001's google drive Credit:bmg1001
(FIRST TIME ONLY) Download and install the Windows driver (if you don't already have on your computer) from here: https://storage.googleapis.com/essential-static/Essential-PH1-WindowsDrivers.exe
(FIRST TIME ONLY) Download ADB tool (if you don't have already on your computer) from here: https://developer.android.com/studio/releases/platform-tools.html This link is directly from Essentials site here in their "Before Sideloading" section it is the link entitled "You'll need the latest ADB tool"
To continue you must have developer options USB Debugging enabled which I presume was already done previously if your phone is rooted but if not you must do so before proceeding.
To Enable Developer Options: Settings App> System> About Phone> Scroll Down to Bottom and tap 7 times on the "Build Number"
To Enable USB Debugging: Settings App> Developer Options> USB Debugging (Set to Enabled)
Part 2 - Sideload the OTA Update
DISCLAIMER: This method if done properly should not wipe any of your data, however I take no responsibility and it is always advisable to back up your data before proceeding with any updates if you wish. I will be honest that I have now done this several times and never had any issues.
Unzip the ADB tool (link above in downloads section is for "platform-tools") and save it to a folder easily accesible on your computer (for this demonstration I will use "C:\platform-tools")
Copy the OTA update file to your ADB folder i.e. "C:\platform-tools" and rename it "OTAupdate.zip" (it is not necessary to rename it, just makes this simpler for the guide)
Verify the checksum of the image. I use hashtab which allows you to right click on any file and click properties and see the hashes as a tab in the properties menu. The SHA-256 is listed right under the OTA download link just copy and paste it in to the hashtab to verify
Remove your PIN / Password before sideloading by going to Settings> Security & Location> Screen Lock> Set it to None (this probably isn't necessary I just do it as a precaution)
Plug Essential Phone into computer and make sure that it says USB Debugging Enabled
Open the folder "C:\platform-tools" in Windows File Explorer and hold shift and right click in the window and you select the option "Open Powershell window here" from the context menu (works in Windows 10 can't speak for earlier Windows versions). If you don't see it the first time Shift+right click on a different part of the empty white window and you should see it appear.
Verify your device is properly connected by typing
Code:
adb devices
and you should see your device listed
Type
Code:
adb reboot recovery
Note:If you're unable to use ADB to reboot into recovery, you can use the key combination for your device. While device is off to boot into Recovery mode, press and hold Volume-Up button while pushing Power button to boot.
Your device is now in Recovery mode. An Android logo with red exclamation mark should appear on screen. Hold the Power button, then press the Volume-Up button one time. When the menu appears, select Apply update from ADB.
Run the following command:
Code:
adb devices
Then check that your device shows up with “sideload” next to its name
Run the following command:
Code:
adb sideload OTAupdate.zip
where OTAupdate.zip is the name of the file you downloaded and verified
Once the update finishes, select Reboot system now to reboot your phone
At this point you should have a stock updated essential device but without root. The remainder of this guide will use Magisk to restore your device to root.
Part 3 - Re-root your Device with Magisk
Copy newest boot image from here that you downloaded earlier to a folder directly on your phone. I personally put it in my "Download" folder on my phone so I can find it easily
Open Magisk Manager and click Install>Install>Patch Boot Image
Select the boot image from step 1 and then let Magisk proceed in creating a patched image file
Copy the file "magisk_patched.img" file that Magisk just created from your device back to the computer and put it in the ADB folder "C:\platform-tools"
Plug in phone and open powershell same as before (shift+ right click> Open Powershell window here)
Type
Code:
adb reboot bootloader
to reboot your phone into fastboot
Confirm your phone is in fastboot by typing
Code:
fastboot devices
Then check that your device shows up with “fastboot” next to its name
Execute the command
Code:
fastboot flash boot magisk_patched.img
Restart your phone and you are done! Don't forget to put your phone PIN/Password back if you disabled security in the earlier step.
You should now have a successfully updated phone with full ROOT access with Magisk. I know that this guide seems like a lot of steps but it really goes very quickly, I just tried to be detailed and NOOB-Friendly.
Hope this helps all of my fellow XDA members!! Please share any and all feedback. Thanks!
Full credit goes to this thread for helping me with everything: [GUIDE] Rooting your Essential PH-1
The way I do *updates* is different (not the initial TWRP/ root).
I use the same Essential developer link as in part 1-1. I also have a copy of twrp-installer-mata-3.2.3-0 zip file on my device.
Boot to TWRP, and do a complete nandroid.
Then install the OTA file just like it's any other zip and when it's done, install the twrp-installer-mata-3.2.3-0 zip file. You can simply put them both into the flash queue before starting the flash.
This TWRP installer will install to both slots ensuring that the inactive slot has it installed. Wipe dalvik and then reboot to system which will be in the opposite slot from the one you started at.
The OTA will always flash to the inactive slot and the bootloader will switch to the slot the OTA was flashed to.
The initial boot takes a few minutes. Once I verify the ROM boots correctly, then I reboot to TWRP and flash Magisk. This ensures that Magisk get installed to the same slot that is now active.
I agree it's safer to remove screen pin, so far I have gotten away with never remembering to do that [emoji16]
If the flash fails, the bootloader should just switch you back to the original slot. I would expect that to boot fine, with one exception... The bootloader was changed between 8.1.1 and 9.0. So if you are going between major versions, the original slot will bootloop after the update.
One more note, a pet peeve of mine; when referencing a post that is older, make sure that you review the forums for changes. TWRP might have a required newer release, the methods that once worked may no longer work. If you are not sure or comfortable recovering, then don't be an early adopter. [emoji6]
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
ktmom said:
The way I do *updates* is different (not the initial TWRP/ root).
I use the same Essential developer link as in part 1-1. I also have a copy of twrp-installer-mata-3.2.3-0 zip file on my device.
Boot to TWRP, and do a complete nandroid.
Then install the OTA file just like it's any other zip and when it's done, install the twrp-installer-mata-3.2.3-0 zip file. You can simply put them both into the flash queue before starting the flash.
This TWRP installer will install to both slots ensuring that the inactive slot has it installed. Wipe dalvik and then reboot to system which will be in the opposite slot from the one you started at.
The OTA will always flash to the inactive slot and the bootloader will switch to the slot the OTA was flashed to.
The initial boot takes a few minutes. Once I verify the ROM boots correctly, then I reboot to TWRP and flash Magisk. This ensures that Magisk get installed to the same slot that is now active.
I agree it's safer to remove screen pin, so far I have gotten away with never remembering to do that [emoji16]
If the flash fails, the bootloader should just switch you back to the original slot. I would expect that to boot fine, with one exception... The bootloader was changed between 8.1.1 and 9.0. So if you are going between major versions, the original slot will bootloop after the update.
One more note, a pet peeve of mine; when referencing a post that is older, make sure that you review the forums for changes. TWRP might have a required newer release, the methods that once worked may no longer work. If you are not sure or comfortable recovering, then don't be an early adopter. [emoji6]
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
you know i just finished writing my own guide to do it after i had trouble with the sticky posts. for me, magisk couldnt find the stock boot so i had to pretty much redo it. i did most things with back-to-stock and fastboot. but now i really wanna try your method through twrp. i been using the patched_twrp_magisk_stock.img images which have twrp and magisk in the same image. using your method, in twrp, could i flash the ota, the patched_twrp_magisk_stock.img, switch slots in twrp, flash patched_twrp_magisk_stock.img again, then switch back to the original slot and reboot system? thanks!
this thread has the patched_twrp_magisk_stock.img images
https://forum.xda-developers.com/essential-phone/development/stock-7-1-1-nmj20d-t3701681
@andypiznti
There's no need to manually switch slots. And no reason to flash the TWRP *installer* file twice. The first time it runs, it patches both slots.
IMHO, trying to control slots is what gets people into trouble.
I do pay attention to what slot I'm on before I start though. In TWRP, if you go to the reboot menu, it will tell you. But the way I flash, I stay on the slot I started with. The OTA will always flash to the opposite slot - which should be the inactive slot. Flashing the TWRP *installer* file just once, patches both slots.
Just wipe dalvik (and cache but there is no cache partition so it will error - just ignore the error) then reboot to system like we've done after custom ROMs for years.
The next boot, the bootloader knows to switch to the slot with the newest OS.
After a successful boot, when you return to TWRP, you'll see the slot is the opposite one from when you started. But you didn't need to do any slot switching.
Don't force things. Let the slots take care of themselves.
I also think, there is less likely to be trouble with Magisk and the boot.img, if you boot fully after an update, before returning to recovery to flash Magisk. Remember that both TWRP and Magisk are making changes to the boot.img.
Final thought, unless I seriously misunderstand Magisk, if you rooted using an all-in-one boot.img you won't have a back up of the "stock" boot.img to restore, making the Magisk uninstaller useless. The backup made when installing Magisk is stored on the data partition, not the boot partition. This is why the instructions in BTS tell you to flash the stock boot.img and provide a copy of it.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
The beauty of my method in the OP is you don't need to worry at all about the correct "slots" like you have to with TWRP...
ktmom said:
@andypiznti
I also think, there is less likely to be trouble with Magisk and the boot.img, if you boot fully after an update, before returning to recovery to flash Magisk. Remember that both TWRP and Magisk are making changes to the boot.img.
Final thought, unless I seriously misunderstand Magisk, if you rooted using an all-in-one boot.img you won't have a back up of the "stock" boot.img to restore, making the Magisk uninstaller useless. The backup made when installing Magisk is stored on the data partition, not the boot partition. This is why the instructions in BTS tell you to flash the stock boot.img and provide a copy of it.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
ok that answers a lot. thanks! the guide i made for myself had me flashing the stock image with bts. i was curious about the full boot after an update, i was thinking the same thing in that it might cause problems with magisk, but i also thought twrp would cause problems too. the reason i mentioned switching slots and flashing is the all-in-one img only flashes to one slot at a time, i believe.
heres my guide for reference, its kinda long. but these were the exact steps i followed and was successful. had to flash the img twice, kept rebooting into recovery if i didnt.
Applying OTA for Essential Phone when Magisk doesn't have stock boot
Boot to recovery with Magisk
Back up at least system and boot
Boot to bootloader with TWRP
Extract back to stock (BTS) for CURRENT INSTALLED VERSION, not the update BTS version
Once in bootloader, connect phone->old phone plug, SSD plug
Run flashallnowipe.bat, once bootloader reboots, select Start, unplug phone
Uninstall Magisk like a regular app
Do OTA->settings->advanced->system update
after reboot->reboot while holding volume down until in download/fastboot mode
***REMEMBER!! Flash on the opposite slot of the current slot
***so if im on slot a, flash slot b.
make sure to extract Essential_ADB_and_FASTBOOT.zip in BTS folder then->cmd-here.exe
fastboot getvar current-slot
***
fastboot flash boot_a dec_patched_twrp_magisk_stock.img
fastboot flash boot_b dec_patched_twrp_magisk_stock.img
***Switch to other slot
fastboot --set-active=a
fastboot --set-active=b
***Just to double check, REMEMBER!! Flash on the opposite slot of the current slot
fastboot getvar current-slot
***
fastboot flash boot_a dec_patched_twrp_magisk_stock.img
fastboot flash boot_b dec_patched_twrp_magisk_stock.img
***Switch back to orig slot
fastboot --set-active=a
fastboot --set-active=b
On the phone fastboot menu, select Start, unplug phone
Manager asks if you wanna install it, no, it downloads the wrong one, maybe works now?
Install Magisk Manager->https://github.com/ianmacd/MagiskBuilds
IT HAS TO BE THIS APK, Download any apk version from above github, install
when you open Manager, then download the newest apk, dont update image
Manager and Image update daily, ignore till next month OTA
Click to expand...
Click to collapse
hssxda said:
The beauty of my method in the OP is you don't need to worry at all about the correct "slots" like you have to with TWRP...
Click to expand...
Click to collapse
I don't know what more I could do to make the point it's not necessary to worry about slots in TWRP.
@andypiznti. The all-in-one is Fastboot flashed to either slot one at a time. All of this makes life harder than it needs to be.
My post was suggesting an alternative. Use the OTA, no Fastboot, no PC just have the TWRP installer file I linked so you don't lose TWRP.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
ktmom said:
I don't know what more I could do to make the point it's not necessary to work about slots in TWRP.
Click to expand...
Click to collapse
Well, all of your posts describing your method contains the word "slot" multiple times so it is obviously a relevant concern otherwise you wouldn't have mentioned it. My post did not contain the word even once...
I see no need to use TWRP. What advantage does it have?
ktmom said:
I don't know what more I could do to make the point it's not necessary to worry about slots in TWRP.
@andypiznti. The all-in-one is Fastboot flashed to either slot one at a time. All of this makes life harder than it needs to be.
My post was suggesting an alternative. Use the OTA, no Fastboot, no PC just have the TWRP installer file I linked so you don't lose TWRP.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
oh yes, definitely doing that next time. thanks!! i found this post thats exactly your method in a little less words.
https://forum.xda-developers.com/es...1-1-nmj20d-t3701681/post78194778#post78194778
Jeebus...
We didn't like the other 15 goddamn threads with the same topic...
XDA is cancer
what works for me at the time to flash the patched image was
fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
note: i am on pie
thanks for the guide.
Really helped lots, thank you.
January update is out, who might like to patch boot.img with TWRP and Magisk?
kma_29 said:
January update is out, who might like to patch boot.img with TWRP and Magisk?
Click to expand...
Click to collapse
Go to the stock room thread
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
OP, if you want to avoid having to sideload the whole OTA, you can have it done directly by your phone by flashing the stock boot image for the current version that you are one and then updating from the settings (or notification). Then just continue with flashing the rooted boot image for the new update. I feel like that is safer than both TWRP and sideloading the full OTA (in reference to keeping data safe).
https://forum.xda-developers.com/showpost.php?p=76828139&postcount=1264
morphius88 said:
OP, if you want to avoid having to sideload the whole OTA, you can have it done directly by your phone by flashing the stock boot image for the current version that you are one and then updating from the settings (or notification). Then just continue with flashing the rooted boot image for the new update. I feel like that is safer than both TWRP and sideloading the full OTA (in reference to keeping data safe).
https://forum.xda-developers.com/showpost.php?p=76828139&postcount=1264
Click to expand...
Click to collapse
Thanks
@bmg1001 are you still providing the stock boot images on your google drive. I am looking for the Feb stock boot image or can someone tell me how to get it. I tried extracting from the Feb OTA but did not see it listed in that zip
jionny said:
@bmg1001 are you still providing the stock boot images on your google drive. I am looking for the Feb stock boot image or can someone tell me how to get it. I tried extracting from the Feb OTA but did not see it listed in that zip
Click to expand...
Click to collapse
Yep, I have it in the same Google Drive folder where the other month's images are posted.
bmg1001 said:
Yep, I have it in the same Google Drive folder where the other month's images are posted.
Click to expand...
Click to collapse
Sorry chalk that up to me not paying attention. I was looking for it after Jan but its actually the first one listed. Thanks!
bmg1001 said:
Yep, I have it in the same Google Drive folder where the other month's images are posted.
Click to expand...
Click to collapse
Hi one more thing, this is my third time updating and rooting via this method. The last two times worked flawlessly however this time I did update the OTA but when I try to reroot and go to adb devices I see my phone listed then when I reboot recovery it does however when I try fastboot devices my phone does not show and nothing happens, any help will be appreciated

Problems in rooting after flashing patched boot.img

Hi everyone sorry for the truble and probably the bad english this is not my main language .
I have an old Samsung s7 with android 8.0 that i wanted to root with magisk.
I first tried with twrp but i don't know why i couldn't "install" it, when flashing with odin it failed and made my phone go in like"emergency recovery mode ".
Next i tried without TWRP which i founded is the recommended method.
I did everything the guides i found said but when i am flashing the patched boot.img after the phone boot and i open magisk it isn't installed.
Ramdisk went from yes to no.
I don't know what to do i am sure i used the correct boot img. I transferred them via google driver in .tar maybe this broke something?
paoloooooo said:
I did everything the guides i found said
Click to expand...
Click to collapse
please mention the exact steps, we don't have crystal ball.
sorry,
I extracted boot.img from the ap file (it's the correct one i am sure because i used it to flash stock firmware).
Then i transferred the boot.img via google drive to the phone and used magisk to patch it, it said no error and everything worked fine . After that via google drive i brought back the patched file to the pc and used odin to flash it with BL CP HOME-CSC.
When i flash it with BL CP HOME-CS and the patched file the phone boot and ask me to go to factory reset i say yes, then after everything i reinstall magisk and ramdisk went from yes to no but it still says magisk not installed.
I don't know if i made myself clear
so I understood you enabled OEM unlocking, unlocked bootloader in download mode (what was factory resetting device) and after finishing initial welcome setup, you again ensured OEM is unlocked in developer settings. only then, you flashed Magisk, device is still working but Magisk provides no root, because ramdisk is gone.
What is the Samsung ROM version (for example G930FXXU8EVG3)?
What Magisk version you installed?
What options you set in Magisk before patching boot.img? Haven't used Magisk for a while, maybe no options have been asked.
i have enabled OEM unlocking but bootloader mode i don't have the option to activate it (in the passage before going to dowload mode) but the guide i looked said it wasn't needed if there wasn't the option.
I am using magisk 25.2 and they ask no option when patching .
download platform-tools, enable usb-debugging, install ADB drivers, confirm 'adb devices' on phone and push the ROM to phone storage.
Code:
adb devices
adb push path\to\pc\AP_[device_model_sw_ver].tar.md5 /sdcard/Download
uninstall Magisk and install older version Magisk-v24.2.apk
In case you want to use TWRP later, disable the encryption checkbox (only when asked) and disable avb/dm-verity checkbox (only when asked) in the options before patching (not sure these options exist though).
Device should have ramdisk, so do not enable the recovery option for now.
patch the whole AP_[device_model_sw_ver].tar.md5 file with Magisk. notice the file name when finished.
copy the patched file back to PC and rename it AP_[device_model_sw_ver]_magisk_patched_boot.tar
Code:
adb pull /sdcard/Download/magisk_patched.tar path\to\pc\AP_[device_model_sw_ver]_magisk_patched_boot.tar
flash the patched AP file together with BL CP CSC (will factory reset) and wait long time for first boot. finish the initial setup and install (older) Magisk apk again.
if rooting was successful, update Magisk from within the Magisk app.
i tried and did everything but when i try to flash with odin it crashes
please understand I won't answer "please help" or "tried everything" posts. give more information. the patched firmware does not flash? or is that general odin issue?
edit: given instructions were straight from magisk documentation
https://topjohnwu.github.io/Magisk/install.html#instructions
except for using older Magisk. I forgot to tell you how to install. did you figure it out yourself?
In the Magisk-v24.2.apk, do not update to recent version (yet).
In the settings, select Update Channel: custom. then select Custom Channel, copy-paste this link.
https://raw.githubusercontent.com/topjohnwu/magisk-files/4868c83/beta.json
you can now patch the rom file with older Magisk.
ok i managed to do every step you told me i patched the file with v24.2 of magik and falshed with odin, everything went fine. But there is still the same problem the app says that is not installed but ramdisk went from yes to no
You're more likely to get the help you need if you ask your question in the right place. We have a Galaxy S7 section. This is why Rule #1 is to search before posting! We will move your thread there.
An unlocked bootloader is absolutely necessary to root. Rooting means you're modifying images on the device; a locked bootloader will prevent flashing modified images. If you haven't unlocked your bootloader, that's your first step.
I personally haven't had any luck patching the AP file in Magisk either. My suggestion is to flash a custom recovery such as TWRP, then flash Magisk in TWRP. Use the latest version of Magisk - 25.2.
paoloooooo said:
But there is still the same problem the app says that is not installed but ramdisk went from yes to no
Click to expand...
Click to collapse
Hm.. then maybe it's true your device does not have boot ramdisk? or the patching failed and removed ramdisk somehow?
try again with "Recovery Mode" option enabled when patching. note you have to press the volume button for recovery mode each time you boot.
@V0latyle recent versions of Magisk running Zygisk may have incompatibilities
https://forum.xda-developers.com/t/...ices-with-old-kernel-3-19-s7-included.4447029
Magisk-v23.0.apk is last version without Zygisk (but afaik you still can disable Zygisk in recent Magisk).
https://raw.githubusercontent.com/topjohnwu/magisk-files/afe2c30/stable.json
aIecxs said:
Hm.. then maybe it's true your device does not have boot ramdisk? or the patching failed and removed ramdisk somehow?
try again with "Recovery Mode" option enabled when patching. note you have to press the volume button for recovery mode each time you boot.
@V0latyle recent versions of Magisk running Zygisk may have incompatibilities
https://forum.xda-developers.com/t/...ices-with-old-kernel-3-19-s7-included.4447029
Magisk-v23.0.apk is last version without Zygisk (but afaik you still can disable Zygisk in recent Magisk).
https://raw.githubusercontent.com/topjohnwu/magisk-files/afe2c30/stable.json
Click to expand...
Click to collapse
Zygisk is disabled by default, you have to manually enable it when setting up Magisk after root
V0latyle said:
You're more likely to get the help you need if you ask your question in the right place. We have a Galaxy S7 section. This is why Rule #1 is to search before posting! We will move your thread there.
An unlocked bootloader is absolutely necessary to root. Rooting means you're modifying images on the device; a locked bootloader will prevent flashing modified images. If you haven't unlocked your bootloader, that's your first step.
I personally haven't had any luck patching the AP file in Magisk either. My suggestion is to flash a custom recovery such as TWRP, then flash Magisk in TWRP. Use the latest version of Magisk - 25.2.
Click to expand...
Click to collapse
OEM unlocking should be like the boot loader.
i tried using TWRP and i followed this video doing all the steps
but after the final reboot magisk app is not there and if i try to install it manually it's the same as the immage i already posted.
I found out searching online that after root ramdisk should go from yes to no and that worked. But i don't know why it never says that's installed
paoloooooo said:
OEM unlocking should be like the boot loader.
i tried using TWRP and i followed this video doing all the steps
but after the final reboot magisk app is not there and if i try to install it manually it's the same as the immage i already posted.
I found out searching online that after root ramdisk should go from yes to no and that worked. But i don't know why it never says that's installed
Click to expand...
Click to collapse
It seems like you misunderstand several critical concepts.
First, OEM unlocking DOES NOT unlock the bootloader itself. It simply allows you to. After enabling OEM unlocking, you have to follow the process to boot the device into unlock mode, then you have to follow the prompts to unlock the bootloader, which will wipe the device.
Second, the Ramdisk indication in Magisk simply indicates whether or not the device has ramdisk. This does not change, regardless of whether or not the boot image or system has been patched with Magisk. The only thing you need to look for is Installed: <Magisk version>. If Installed: N/A then you do not have root.
All you need to do is install TWRP, and if you're going to be using the factory firmware, flash the Multidisabler. Then, install Magisk through TWRP. When you reboot to system, you should have root; you'll need to install the Magisk app, but once you do, you should see the version of Magisk next to Installed as described above.
@V0latyle I think paoloooooo is right (see his screenshot) and bootloader is unlocked (otherwise phone wouldn't boot after flashing magisk_patched.tar)
aIecxs said:
@V0latyle I think paoloooooo is right (see his screenshot) and bootloader is unlocked (otherwise phone wouldn't boot after flashing magisk_patched.tar)
Click to expand...
Click to collapse
I thought a locked bootloader will prevent flashing anything custom?
right. but afaik it's possible to flash on semi-locked bootloader after the OEM toggle was enabled, but vaultkeeper still armed. at least that is the mistake you're refering to, many people struggle with...
guys thanks for everything i literally don't know why but i tried one last time with patching immages and it had the same error as the immages.
2 days after, i looked into it again and i don't know how but magisk was installed.
Thanks for everything and sorry choosing wrong section and not being very explicative.
aIecxs said:
right. but afaik it's possible to flash on semi-locked bootloader after the OEM toggle was enabled, but vaultkeeper still armed. at least that is the mistake you're refering to, many people struggle with...
Click to expand...
Click to collapse
Yeah, it would seem that a user would have to do things one of two ways:
Unlock bootloader, flash custom recovery, IMMEDIATELY boot into recovery (do not allow boot to system), wipe /system and format /data, install custom OS...this should prevent KG from interfering
Unlock bootloader, flash multidisabler, wipe data, boot to system, connect to Internet, ensure OEM Unlocking toggle is still visible, if it is KG should be disabled
paoloooooo said:
Hi everyone sorry for the truble and probably the bad english this is not my main language .
I have an old Samsung s7 with android 8.0 that i wanted to root with magisk.
I first tried with twrp but i don't know why i couldn't "install" it, when flashing with odin it failed and made my phone go in like"emergency recovery mode ".
Next i tried without TWRP which i founded is the recommended method.
I did everything the guides i found said but when i am flashing the patched boot.img after the phone boot and i open magisk it isn't installed.
Ramdisk went from yes to no.
I don't know what to do i am sure i used the correct boot img. I transferred them via google driver in .tar maybe this broke something?
Click to expand...
Click to collapse
i have the exact problem I just want to install twrp but when flashing with odin it fails. can anyone help me install twrp?

Categories

Resources