Manually Patch Device Boot Img - LG G6 Questions and Answers

Hi everyone,
Having soft bricked my test LG G6 (US997) a few times over the past few years with various versions of TWRP, I'm a bit reticent to try it again. I'm happy with the stock ROM, and only interested in rooting so I can save user data and run certain apps. I'd like to have this worked out before I move on to root my (currently in use) LG G8 (LM-G820QM7)
On https://www.xda-developers.com/how-to-install-magisk-and-safely-root-your-phone/
RE: Magisk, "In case your device lacks a custom recovery, you can either :
Manually patch your device’s boot image and flash it, or
Use the Direct Install option"
Up to date / applicable TWRP recommendations are welcome, but I'd like to try my hand at manually patching the boot image and flashing. Has anyone done this? Does anyone have a procedure posted around here somewhere?
Thanks

The first option means this:
1. get your device's boot image. Usually by finding the corresponding firmware on the Internet, downloading it, and extracting just the boot image.
2. copy the boot image to your phone.
3. Have the magisk app patch it.
4. copy the patched boot image to your PC
5. flash the patched boot image with ADB

Related

Root lg k8 k350xx and k10 k430xx (MTK)

This thread is out of date since there is my new thread with an easier method: https://forum.xda-developers.com/lg-k10/how-to/friendly-root-method-lg-k8-k10-t3531223
However i keep this one for troubleshooting and deeper understanding...
This description was originally made for the k8, however it seems to work on k10 k430 devices
LG K8:
OS Android v6.0 (Marshmallow)
Chipset Mediatek MT6735
CPU Quad-core 1.3 GHz Cortex-A53
GPU Mali-T720
1.5GB of RAM
8GB ROM
LG K10 K430...:
quite similar to k8
Rooting the k8 (and the k10) is rather difficult since it's using "lz4" compression for the partition images not the usual "gzip" method.
Systemless supersu is still unable to patch lz4 boot images so we need to have a little trick. Not to mention porting a working TWRP is also a pian in the ass...
Before posting any questions/errors please read the troubleshooting guide and also read back in the thread!
Steps:
0.
Remove the back panel of the phone because you'll have to be able to reach your sd card, watch out for your battery - must not fall out!
If your TWRP supports mtp connection under "mount" you can skip this part and you don't have to put your sd card in and out - maybe you have to fix the driver in windows!
1.
Unlock your bootloader (all your data will be lost!!!) via ADB then boot up normally
http://forum.xda-developers.com/lg-k10/how-to/unlock-bootloader-lg-k10-mtk-devices-t3486302
if there is no warnning message during boot up after unlocking your bootloader read this:
http://forum.xda-developers.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879
2.
Boot to TWRP (you have to stay in TWRP during the whole process!!!) via ADB and fastboot
3.
Mount sd card
Backup your boot image (find boot.emmc.win in TWRP folder on your sdcard - rename it on PC to bootlz4_0.img)
or use your boot image taken from your kdz as it is written in the end of this thread:
http://forum.xda-developers.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879
4. Tweak bootlz4_0.img with Carliv Image Kitchen (Carliv download: http://viid.me/qe7BDp)
-Unpack it, open "boot.img-ramdisk-compress" file with a text editor (notepad++) and change the first (and only) line from "lz4" to "gz"
-Repack image - rename the repacked image to bootgz_0
5. Flash bootgz_0.img in TWRP
6. Install SuperSU (and xposed if you wish or you can istall xposed later) - do not quit TWRP from now until last step - that would brick your device
7. Backup boot image again - you need to remove sd card (unmount first) and put it in PC - it means you have to remove the usb cable from the phone and remove back panel - maybe before getting into TWRP!
- or enable mtp in TWRP and copy/paste the boot image from sd card.
8. Tweak boot image in Carliv
-Unpack it, open "boot.img-ramdisk-compress" file and change the first line from "gz" to "lz4"
-Repack image
9. Flash boot image in TWRP
10. Restart (this will take a bit longer and also expect bootloop a few times)
you can find a rather detailed description here:
http://viid.me/qe7Zoh - don't forget that you can use mtp connection instead of taking in and out the sd card if your TWRP supports it.
If you prefer using adb/fastboot commands instead removing your sdcard all the time you can use salaigeethan666's guide:
http://forum.xda-developers.com/showpost.php?p=69415205&postcount=34
but some reported problems with flashing the boot image and getting back to TWRP this way.
If you have problems booting up after installing supersu maybe you can force boot described by cpatrick3000:
http://forum.xda-developers.com/lg-k10/how-to/root-lg-k10-mtk-chipset-95-method-t3498166
or the problem might be:
http://forum.xda-developers.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879
If you ever lose root and try again consider Darkos333's guide: http://forum.xda-developers.com/showpost.php?p=69713043&postcount=99
or use lg up to get back to full stock:
http://forum.xda-developers.com/lg-k10/how-to/flashing-firmware-using-lg-t3517839
Unbrick guide by Berkantkz:
http://forum.xda-developers.com/lg-k10/how-to/guide-unbricking-flashing-firmware-due-t3380529
Unbrick by lg up:
http://forum.xda-developers.com/lg-k10/how-to/flashing-firmware-using-lg-t3517839
TWRPs for the different models:
TWRP of the k8:
http://forum.xda-developers.com/lg-k10/development/recovery-twrp-3-0-2-lg-k8-k350-mtk-t3517894
As for the k10 TWRP 3.0.0 you should use http://forum.xda-developers.com/lg-k10/development/teamwinrecoveryproject-3-0-0-0-lg-k10-t3404434 by berkantkz.
or TWRP 3.0.2 by Singular777: http://forum.xda-developers.com/showpost.php?p=69381986&postcount=126
In case of k10 430dsy try 123xdagsm's recovery: http://forum.xda-developers.com/showpost.php?p=69706581&postcount=154
Please, before you proceed read and practice the methods of each steps! A few hours of preparation (google + xda + tests) might save your device getting hard bricket and it's also better for you to know what you're doing! Look for fastboot commands, systemless supersu, TWRP usage, Carliv image kitchen, ... (google + xda)! You better not leave TWRP during the whole process! Keep in mind that after the supersu is installed you must be able to recompress your boot image to "lz4" otherwise you get soft bricked and you need to use lg up to refirbish...!!!
Read each steps twice and follow them stricktly!
Also keep in mind that if you want to uninstall supersu/remove root you have to reflash stock firmware with lg bridge + hard reset or lg up.
Troubleshooting
"your device is corrupt. It can't be trusted and may not work properly"
- this message is normal when you have an opened bootloader
- phone shuts down right after this message: http://forum.xda-developers.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879
no ADB connection (command: "adb devices" - your device is not in the output list):
- turn-on USB Debugging (settings - developer opions)
- install drivers
no fastboot connection (command: "fastboot devices" - your device is not in the output list):
- install drivers
- check device manager
- you may try to install android SDK if the connection is not working
unable to unlock bootloader (command "fastboot oem unlock"):
- allow oem unlock (settings - developer opions)
device is not booting into TWRP:
- unlock bootloader
- the TWRP is not compatible with your device (there is a list of TWRPs for different devices, if you cant find yours you can try the next guide: http://www.chinaphonearena.com/foru...752-MT6753-MT6795-MT6797-TWRP-MT67xx-tutorial)
unable to unpack boot image in carliv
- your TWRP is not compatible with your device (at least it didn't backup your boot image properly)
unable to repack boot image in carliv
- check the unpacked boot image "ramdisk" folder, if there are all the necessary files and folders, find a list attached at posts #107 and #124: (doesn't have to be the exact same since k8 and k10 migth differ - there is no "boot" folder in case of the k8 and also before installing supersu the su folders are not to be there - normally 5+ folders and 20+ files)
- see if "boot.img-ramdisk-compress" file exists
- maybe you messed up something in carliv
supersu failed to patch the ramdisk (even if it sais installed succesfully)
- you can try just unpack and repack your stock boot image install/flash it and see if it boots up - so you can be sure you are a "master" of carliv and TWRP
- your boot image is not gzip compressed - open "boot.img-ramdisk-compress" as text. It should only have one line: "gz"
supersu failed to install
- you can try just unpack and repack your stock boot image install/flash it and see if it boots up - so you can be sure you are a "master" of carliv and TWRP
- your TWRP is not compatible with your device (or you need a newer version)
device is not booting up after the final step (boot loops for more then 2 minutes)
- http://forum.xda-developers.com/lg-k10/how-to/rid-shutting-device-corrupt-message-t3517879
- use Berkantkz guide to flash back the original firmware: http://forum.xda-developers.com/lg-k10/how-to/guide-unbricking-flashing-firmware-due-t3380529
- after getting back to stock you can try just unpack and repack your stock boot image install/flash it and see if it boots up - so you can be sure you are a "master" of carliv and TWRP
- duble check your final boot image (uncompress and compare files and folders to the one attached in posts #107 and #124 - has to be reasonably/more or less the same)
- consider step 6 in Darkos333 guide: http://forum.xda-developers.com/showpost.php?p=69713043&postcount=99
- also consider cpatrick3000's force boot guide: http://forum.xda-developers.com/lg-k10/how-to/root-lg-k10-mtk-chipset-95-method-t3498166
if none of these helps make a recovery log (in TWRP under advanced menu) before final restart and post it or send it to me
This method works for the LG K10 k430Y as well. Thanks very much brah, so far I have changed a couple of thing in the build.prop like activating the multi window setting and so far it is functioning properly besides the annoying 'device is corrupt' message everything seems to be fine thanks a lot bro :good: :good:
Judroidz said:
This method works for the LG K10 k430Y as well. Thanks very much brah, so far I have changed a couple of thing in the build.prop like activating the multi window setting and so far it is functioning properly besides the annoying 'device is corrupt' message everything seems to be fine thanks a lot bro :good: :good:
Click to expand...
Click to collapse
"device corrupt" message cames rigth after unlocking the bootloader (in my case at least...) however i believe there is a way to tweak boot logo and remove the message, Ill look into it.
Anyways your welcome
Judroidz said:
This method works for the LG K10 k430Y as well. Thanks very much brah, so far I have changed a couple of thing in the build.prop like activating the multi window setting and so far it is functioning properly besides the annoying 'device is corrupt' message everything seems to be fine thanks a lot bro :good: :good:
Click to expand...
Click to collapse
Can i ask whitch TWRP you used? Did you maybe tried it with the one i ported for the k8 or is this the one by berkantkz?
I used the twrp made by berkantkz, do you think it would be safe if I flashed it on my k10.
Judroidz said:
I used the twrp made by berkantkz, do you think it would be safe if I flashed it on my k10.
Click to expand...
Click to collapse
Actually the recovery partitions size is approx. 16Mb. Berkantkz's TWRP is almost 17Mb so there is little chance you can flash it. There is no problem if you try it would give you an error message if the size is too big and nothing's gonna change. I recompressed berkantkz's TWRP to gzip (https://drive.google.com/open?id=0BwyMOazoSp8TdnhBbWpobEk0V0E) so it is smaller, you can try to flash that but you have to try it before. I mean just boot into it (fastboot boot ...) don't flash it first.
Keep me updated please!
About the multiwindow, did you use "ro.build.type" -> userdebug or "persist.splitwindow.support_all" -> true ?
I flashed back to stock with lg bridge and also did factory format with hard buttons. There is no way to root again and boot up succesfully. Somehow lg bridge and also factory format leaves some partions untouched that still have something from supersu. So i erased all partitions in fastboot...
I shouldn't have cause now my phone can't connect at all. Not even in download mode.
I suggest if anyone tried any method to root unsuccesfully that should not try this method. It will not boot up...:S
Thats all for now. I'll try to exchange my phone and then start again...
I can't make lg up to work with the k8. There is no lgup...dll.msi to install. Any ideas?
Maybe the boot image is not turned back to stock not by factory format nor by lg bridge... this migth cause the mess with Supersu install after turnig back to stock... With lg up we could reflash the full stock system and try rooting again...
If anyone plans to root save your stock boot image first, might come handy later...
hilp for root lgk10 439dsy
ha118814kh said:
hilp for root lgk10 439dsy
Click to expand...
Click to collapse
439? Are you sure? I guess it must be 430... however i belive the only method is the above described one. If you ever attempted rooting the device i suggest not to do that unless you can flash it back to fully stock.
Theese might help for unsuccesful root attempts... i wish i found this before erasing all my partitions...:S
http://forum.xda-developers.com/showpost.php?p=63816659&postcount=2769
and
http://forum.xda-developers.com/apps/supersu/unroot-systemless-root-t3249542
Are there any easier ways to root it? It seems a bit of difficult to me(k430)
xdarootxda said:
Are there any easier ways to root it? It seems a bit of difficult to me(k430)
Click to expand...
Click to collapse
I'm afraid until SuperSU is not "lz4" compatible there is no easier method. I't not so difficult anyways as long as you can make a fastboot connection. There is always download mode and lg bridge if anything goes wrong...
PS. if you ever attempted to root this device before then most likely it's not gonna work... unless you can make LgUP see your k430 and reflash the whole firmware.
gottlasz said:
I'm afraid until SuperSU is not "lz4" compatible there is no easier method. I't not so difficult anyways as long as you can make a fastboot connection. There is always download mode and lg bridge if anything goes wrong...
PS. if you ever attempted to root this device before then most likely it's not gonna work... unless you can make LgUP see your k430 and reflash the whole firmware.
Click to expand...
Click to collapse
Thanks for the information, but i'm new to bootloader and recovery, so are there any video guides about this process?
xdarootxda said:
Thanks for the information, but i'm new to bootloader and recovery, so are there any video guides about this process?
Click to expand...
Click to collapse
There are many video guides on youtube but not for this particular case. I guess you can search each step separately and put the whole picture together.
gottlasz said:
There are many video guides on youtube but not for this particular case. I guess you can search each step separately and put the whole picture together.
Click to expand...
Click to collapse
Thanks, I'll have a look.
I'm so glad to see people working on this phone. Has anyone gotten this method to work?
Sent from my VS500 using XDA Free mobile app
chopperchez said:
I'm so glad to see people working on this phone. Has anyone gotten this method to work?
Sent from my VS500 using XDA Free mobile app
Click to expand...
Click to collapse
Guys,root is successfully received!
see details on the Russian forum
4pda in the subject LG K10 LTE.
Sent from my LG-K430 using xda premium
lg_l7_p700 said:
Guys,root is successfully received!
see details on the Russian forum
4pda in the subject LG K10 LTE.
Sent from my LG-K430 using xda premium
Click to expand...
Click to collapse
Unfortunately i speak no russain.. Is it somewhat similar to the method described in the OP?
It also uses carliv so i guess its basically the same, isn't it?
lg_l7_p700 said:
Guys,root is successfully received!
see details on the Russian forum
4pda in the subject LG K10 LTE.
Sent from my LG-K430 using xda premium
Click to expand...
Click to collapse
The principle of obtaining root.
Install SuperSU via TWPR.
We have the boot ramdisk
compression in lz4,it is not
supported so first comes the
installation boot with
compression gz,then install SuperSU,
and boot back lz4
Sorry for my bad English.
Sent from my LG-K430 using xda premium
I would love to try this.. but I tried flashing the supersu package previously and it didn't work.. my phone boots up properly.. but my usb isn't working anymore. I can't get into fastboot anymore cos there is no hardware shortcut to enter into that and Without ADB i can't go into fastboot. is there any way to fix this? pls help

Problems with rooting, loading ROM then recovery & download images -some solutions

Problems with rooting, loading ROM then recovery & download images -some solutions
I started with stock LG v20 T-Mobile H91810P and followed this step by step & the original threads. I loaded the latest stock Oreo from H91820H from here instead of latest Nougat H91810U - Pie & some other versions had too many things not working.
In the process there were a few problems -the major ones are following with solutions, some from here:
1) The file H91810p rom (H91810p_00_0717.kdz) downloaded from here.
2) I lost root several times, but had TWRP. So I used adb sideload like:
Boot/start TWRP and the start ADB Sideload
Download Magisk-v16.0.zip and copy to adb directory.
On Windows PC connect Cell with USB and in CMD window type (copy/paste):
adb start-server
adb sideload "Magisk-v16.0.zip"​And never update migisk after installing from above or will lose root. Also no need for SU.
3. Camera did not work and people could not hear me nor could I hear them when I picked up a call - A reboot/restart fixed it.
4. No need to download UPPERCUT (that is hard to download), because LGUP works fine without UPPERCUT.
I have 4 problems remaining -any help for solutions here is appreciated - especially exact type help please:
1) On LAF/Boot (original download) partition: Vol+ & connect to USB caused the download mode to come on for about 2 seconds and then TWRP (however I am glad that TWRP is here) -Prefer this to be the original download mode.
2) On Recovery patition: Vol- & connect to USB causes fastboot to come up. Flashed the recovery-twrp-h918-2018-10-18.img (renamed to recovery.img) to recovery partition using flashify and TWRP unsuccessfully. -Prefer this to be TWRP.
3) TWRP cannot access the Data partition. Rebuilt and reformatted Data from TWRP without success. -Prefer access to Data from TWRP.
4) At boot time: I like to get rid of the warning that my bootloader is unlocked. -I can live with this one.
After thoughts: Now that I am rooted on the latest stock Oreo H91820H -I am not sure what I want to load that I could not before?! overclocking the CPU or changing the hue on the display is not a big deal for me at all. & Yes I will uninstall some bloatware - but that is not so bad on this phone anyhow. Any good ideas or a better/later rom than H91820H that has all things working, do please let me know. I am glad that I rooted, ahh the challenge, but if I have no other reason such as to load a program then I think I will revert back to stock and unlock the bootloader & let the ROM updates come from T-Mobile & LG.
-Shahin
shahinman said:
I started with stock LG v20 T-Mobile H91810P and followed this step by step & the original threads. I loaded the latest stock Oreo from H91820H from here instead of latest Nougat H91810U - Pie & some other versions had too many things not working.
In the process there were a few problems -the major ones are following with solutions, some from here:
1) The file H91810P that needs to be reloaded was missing in original links - I think I downloaded from here.
2) I lost root several times, but had TWRP. So I used adb sideload like:
Boot/start TWRP and the start ADB Sideload
Download Magisk-v16.0.zip and copy to adb directory.
On Windows PC connect Cell with USB and in CMD window type (copy/paste):
adb start-server
adb sideload "Magisk-v16.0.zip"
And never update migisk after installing. Also no need for SU.
3. Camera did not work and people could not hear me nor could I hear them when I picked up a call - A reboot/restart fixed it.
I have 4 problems remaining -any help for solutions here is appreciated - especially exact type help please:
1) On LAF/Boot (original download) partition: Vol+ & connect to USB caused the download mode to come on for about 2 seconds and then TWRP (however I am glad that TWRP is here) -Prefer this to be the original download mode.
2) On Recovery patition: Vol- & connect to USB causes fastboot to come up. Flashed the recovery-twrp-h918-2018-10-18.img (renamed to recovery.img) to recovery partition using flashify and TWRP unsuccessfully. -Prefer this to be TWRP.
3) TWRP cannot access the Data partition. Rebuilt and reformatted Data from TWRP without success. -Prefer access to Data from TWRP.
4) At boot time: I like to get rid of the warning that my bootloader is unlocked. -I can live with this one.
After thoughts: Now that I am rooted on the latest stock Oreo H91820H -I am not sure what I want to load that I could not before?! overclocking the CPU or changing the hue on the display is not a big deal for me at all. & Yes I will uninstall some bloatware - but that is not so bad on this phone anyhow. Any good ideas or a better/later rom than H91820H that has all things working, do please let me know. I am glad that I rooted, ahh the challenge, but if I have no other reason such as to load a program then I think I will revert back to stock and unlock the bootloader & let the ROM updates come from T-Mobile & LG.
-Shahin
Click to expand...
Click to collapse
You can restore download mode by flashing the zip in the original lafexploit thread, but make sure you have twrp on the recovery partition. Make sure you are on the latest version of twrp, when you flashed twrp, you were supposed to format the data partition before flashing the rom.
Sent from my LG-H910 using XDA Labs
For access to Data in TWRP: In the original thread there is nothing about formatting, but in step by step guide there is and I followed - however it does not specify what partition to format. I also ran ./step2.sh script per instructions.
Anyhow as I mentioned above I rebuilt and reformatted the Data partition and that did not give me access. I am on the TWRP 3.2.1-3. What partitions do I need to reformat anyhow?
To flash recovery: I used TWRP and flashify to flash recovery-twrp-h918-2018-10-18.img and it flashes but does not work - I get to fastboot with Vol- & USB.
shahinman said:
Problems with rooting, loading ROM then recovery & download images -some solutions
I started with stock LG v20 T-Mobile H91810P and followed this step by step & the original threads. I loaded the latest stock Oreo from H91820H from here instead of latest Nougat H91810U - Pie & some other versions had too many things not working.
In the process there were a few problems -the major ones are following with solutions, some from here:
1) The file H91810p rom (H91810p_00_0717.kdz) downloaded from here.
2) I lost root several times, but had TWRP. So I used adb sideload like:
Boot/start TWRP and the start ADB Sideload​Download Magisk-v16.0.zip and copy to adb directory.​On Windows PC connect Cell with USB and in CMD window type (copy/paste):​adb start-server​adb sideload "Magisk-v16.0.zip"​
And never update migisk after installing from above or will lose root. Also no need for SU.
3. Camera did not work and people could not hear me nor could I hear them when I picked up a call - A reboot/restart fixed it.
4. No need to download UPPERCUT (that is hard to download), because LGUP works fine without UPPERCUT.
I have 4 problems remaining -any help for solutions here is appreciated - especially exact type help please:
1) On LAF/Boot (original download) partition: Vol+ & connect to USB caused the download mode to come on for about 2 seconds and then TWRP (however I am glad that TWRP is here) -Prefer this to be the original download mode.
2) On Recovery patition: Vol- & connect to USB causes fastboot to come up. Flashed the recovery-twrp-h918-2018-10-18.img (renamed to recovery.img) to recovery partition using flashify and TWRP unsuccessfully. -Prefer this to be TWRP.
3) TWRP cannot access the Data partition. Rebuilt and reformatted Data from TWRP without success. -Prefer access to Data from TWRP.
4) At boot time: I like to get rid of the warning that my bootloader is unlocked. -I can live with this one.
After thoughts: Now that I am rooted on the latest stock Oreo H91820H -I am not sure what I want to load that I could not before?! overclocking the CPU or changing the hue on the display is not a big deal for me at all. & Yes I will uninstall some bloatware - but that is not so bad on this phone anyhow. Any good ideas or a better/later rom than H91820H that has all things working, do please let me know. I am glad that I rooted, ahh the challenge, but if I have no other reason such as to load a program then I think I will revert back to stock and unlock the bootloader & let the ROM updates come from T-Mobile & LG.
-Shahin
Click to expand...
Click to collapse
I had this same situation and ended up bricking the phone, can't get into recovery, stuck in boot loop. This was months ago, just got another v20 and ready to try again. Previously I'd successfully done 3 v20's.

HOW TO: Android 10 Stock with Root via Magisk

Full disclosure- many of these steps are just copy/pasted from the Magisk install instructions and other areas online, just thought I'd post a full set of instructions for our device. There might be easier steps or I might have added additional unnecessary steps, please let me know and I can update. I'm just posting what worked for me. I also don't like installing things from sketchy fileshare sites, so I provide the way to get everything from official sources.
This is to get root via Magisk on a stock Moto Z4 (I have the Retail model, don't know anything about Verizon or other models). You will need to have a knowledge of how to do some advanced tasks, such as using ADB/Fastboot, installing APKs from unknown sources, and installing drivers on your computer. Google is your friend (or DuckDuckGo in my opinion) I am not responsible for bricked phones, thermonuclear war, etc. This is just a helpful guide.
You might as well start on the latest OTA since during the unlock process you'll have no choice but to erase all your data, make sure you're fully updated and backup your data.
HOW TO ROOT FROM STOCK:
First, you must unlock your bootloader. WARNING: THE UNLOCK PROCESS WILL ERASE ALL OF YOUR DATA!
Follow the instructions on the Motorola website to check if your bootloader can be unlocked and retrieve the ID codes
One step Motorola doesn't mention is that you must enable OEM unlocking from the Developer Options. If you don't know how to get to Developer Options, you'll need to google it. It's very easy, and I think it's a good "test" to figure out if you should even be trying to root your phone
Once you have your unlock code, unlock your bootloader according to the instructions here. EVERYTHING ON YOUR PHONE WILL BE DELETED AT THIS POINT!
Next, you must patch the stock boot image.
You will need to retrieve the boot image, please follow the instructions at the bottom of this post on how to download the full OTA archives.
Once you have the stock boot image, copy it to your phone's storage
You need to install Magisk Manager on your phone (it doesn't need to be rooted at this point- it's just needed to patch the boot image) Download the latest Magisk Manager from the official Magisk thread here
Tap "Advanced Settings" in Magisk Manager and check "Recovery Mode"
Press Install → Install → Select and Patch a File, and select your stock boot/recovery image file
Magisk Manager will patch the image, and store it in [Internal Storage]/Download/magisk_patched.img
Copy the patched image from your device to your PC. If you can’t find it via MTP, you can pull the file with ADB:
adb pull /sdcard/Download/magisk_patched.img
Now, flash the modified boot image
Plug your phone in, make sure USB debugging is enabled, open a command line in the same folder that your patched image is in (or, you can put in the full path on step 3 rather than just the filename).
Easiest way to get to fastboot mode is the command (you can also use the volume key trick if you'd rather or if you're having trouble with ADB):
Code:
adb reboot bootloader
Then all you have to do is:
Code:
fastboot flash boot magisk_patched.img
To reboot:
Code:
fastboot reboot
You should be done now! You can check the status of root from Magisk Manager and refer to Magisk documentation for any help with that. You may also want to disable Automatic System Updates from Developer options to prevent issues when updates are released.
HOW TO DOWNLOAD STOCK OTA ZIP & RETRIEVE BOOT IMAGE:
First, you need to download LSMA, Moto/Lenovo's software for managing and recovering phones
Once the software is installed, open it and go to the "Flash" tab, hit "Switch to Upgrade", and connect your phone
When you connect, it will check for an update (Sometimes it will not have the latest update even if you are offered an update on your phone. You'll need to wait until it shows up here)
Download the update
LSMA will download a zip file to C:\ProgramData\LMSA\Download\RomFiles, and once completed it will automatically extract the ZIP. (If you want the full ZIP image for any reason, you must copy it to a different location before the extraction completes, LSMA deletes the zip once the extraction finishes. Just have the window open until the download completes, as soon as the ZIP file appears copy it to another folder, it will not interfere with extraction.)
Retrieve the boot.img from the download folder
HOW TO UPGRADE TO NEW OTA, PRESERVING ROOT & DATA:
Now you can try following the Magisk instructions since our device has an A/B partition layout, but I wasn't able to get it to work, usually the upgrade fails validating the current image so I have an alternate set of steps that did work for me. Backup your data just in case though.
First, you need to download LSMA, Moto/Lenovo's software for managing and recovering phones
Once the software is installed, open it and go to the "Flash" tab, hit "Switch to Upgrade", and connect your phone
When you connect, it will check for an update (Sometimes it will not have the latest update even if you are offered an update on your phone. You'll need to wait until it shows up here)
Download the update, but don't install it yet. The program will download a zip file to C:\ProgramData\LMSA\Download\RomFiles, and once completed it will automatically extract the ZIP.
Retrieve the boot.img from the download folder and copy it to your phone
Patch the boot.img in Magisk Manager per the steps above
Now proceed with installing the update in LSMA (It will say it's going to erase your data, but it does not).
Your phone will reboot to the bootloader and LSMA will flash the update
Once the update is finished and your phone reboots for the final time, close LSMA.
Reboot to the bootloader again:
Code:
adb reboot bootloader
Flash boot:
Code:
fastboot flash boot magisk_patched.img
Reboot:
Code:
fastboot reboot
Upon reboot, you're now updated, and root & data is preserved.
hey there i cant download the recovery.img for get mod
when triying to flash and download it said device incompatible
anyone have the moded recovery already patch that can share if can of course
I have Android 10 already
Need some help I conect my phone tomthe app for downloading the full ota file but gives me an error. The recognize the phone but I can't download the img file can some one share me the .img patched.
Can I use a .img that some in this forum did ?
I read Android has new fastbootd and I had to manually install ROM and root using fastbootd on One Hyper
Z4 doesn't need fastbootd, does it?
mingkee said:
I read Android has new fastbootd and I had to manually install ROM and root using fastbootd on One Hyper
Z4 doesn't need fastbootd, does it?
Click to expand...
Click to collapse
No, the Z4 does not use fastbootd.
Running this command with the device connected in fastboot mode will return yes if it uses fastbootd and no if it doesn't
Code:
fastboot getvar is-userspace
https://source.android.com/devices/bootloader/fastbootd
Do I have to download LSMA or can I use the boot.img from the Android 10 firmware I got from lolinet?
G.I. Jew said:
Do I have to download LSMA or can I use the boot.img from the Android 10 firmware I got from lolinet?
Click to expand...
Click to collapse
The firmware packages from lolinet are identical to the ones downloaded by LMSA
Sigh, not possible on verizon due to the locked bootloader
zander21510 said:
Full disclosure- many of these steps are just copy/pasted from the Magisk install instructions and other areas online, just thought I'd post a full set of instructions for our device. There might be easier steps or I might have added additional unnecessary steps, please let me know and I can update. I'm just posting what worked for me. I also don't like installing things from sketchy fileshare sites, so I provide the way to get everything from official sources.
This is to get root via Magisk on a stock Moto Z4 (I have the Retail model, don't know anything about Verizon or other models). You will need to have a knowledge of how to do some advanced tasks, such as using ADB/Fastboot, installing APKs from unknown sources, and installing drivers on your computer. Google is your friend (or DuckDuckGo in my opinion) I am not responsible for bricked phones, thermonuclear war, etc. This is just a helpful guide.
You might as well start on the latest OTA since during the unlock process you'll have no choice but to erase all your data, make sure you're fully updated and backup your data.
HOW TO ROOT FROM STOCK:
First, you must unlock your bootloader. WARNING: THE UNLOCK PROCESS WILL ERASE ALL OF YOUR DATA!
Follow the instructions on the Motorola website to check if your bootloader can be unlocked and retrieve the ID codes
One step Motorola doesn't mention is that you must enable OEM unlocking from the Developer Options. If you don't know how to get to Developer Options, you'll need to google it. It's very easy, and I think it's a good "test" to figure out if you should even be trying to root your phone
Once you have your unlock code, unlock your bootloader according to the instructions here. EVERYTHING ON YOUR PHONE WILL BE DELETED AT THIS POINT!
Next, you must patch the stock boot image.
You will need to retrieve the boot image, please follow the instructions at the bottom of this post on how to download the full OTA archives.
Once you have the stock boot image, copy it to your phone's storage
You need to install Magisk Manager on your phone (it doesn't need to be rooted at this point- it's just needed to patch the boot image) Download the latest Magisk Manager from the official Magisk thread here
Tap "Advanced Settings" in Magisk Manager and check "Recovery Mode"
Press Install → Install → Select and Patch a File, and select your stock boot/recovery image file
Magisk Manager will patch the image, and store it in [Internal Storage]/Download/magisk_patched.img
Copy the patched image from your device to your PC. If you can’t find it via MTP, you can pull the file with ADB:
adb pull /sdcard/Download/magisk_patched.img
Now, flash the modified boot image
Plug your phone in, make sure USB debugging is enabled, open a command line in the same folder that your patched image is in (or, you can put in the full path on step 3 rather than just the filename).
Easiest way to get to fastboot mode is the command (you can also use the volume key trick if you'd rather or if you're having trouble with ADB):
Code:
adb reboot bootloader
Then all you have to do is:
Code:
fastboot flash boot magisk_patched.img
To reboot:
Code:
fastboot reboot
You should be done now! You can check the status of root from Magisk Manager and refer to Magisk documentation for any help with that. You may also want to disable Automatic System Updates from Developer options to prevent issues when updates are released.
HOW TO DOWNLOAD STOCK OTA ZIP & RETRIEVE BOOT IMAGE:
First, you need to download LSMA, Moto/Lenovo's software for managing and recovering phones
Once the software is installed, open it and go to the "Flash" tab, hit "Switch to Upgrade", and connect your phone
When you connect, it will check for an update (Sometimes it will not have the latest update even if you are offered an update on your phone. You'll need to wait until it shows up here)
Download the update
LSMA will download a zip file to C:\ProgramData\LMSA\Download\RomFiles, and once completed it will automatically extract the ZIP. (If you want the full ZIP image for any reason, you must copy it to a different location before the extraction completes, LSMA deletes the zip once the extraction finishes. Just have the window open until the download completes, as soon as the ZIP file appears copy it to another folder, it will not interfere with extraction.)
Retrieve the boot.img from the download folder
HOW TO UPGRADE TO NEW OTA, PRESERVING ROOT & DATA:
Now you can try following the Magisk instructions since our device has an A/B partition layout, but I wasn't able to get it to work, usually the upgrade fails validating the current image so I have an alternate set of steps that did work for me. Backup your data just in case though.
First, you need to download LSMA, Moto/Lenovo's software for managing and recovering phones
Once the software is installed, open it and go to the "Flash" tab, hit "Switch to Upgrade", and connect your phone
When you connect, it will check for an update (Sometimes it will not have the latest update even if you are offered an update on your phone. You'll need to wait until it shows up here)
Download the update, but don't install it yet. The program will download a zip file to C:\ProgramData\LMSA\Download\RomFiles, and once completed it will automatically extract the ZIP.
Retrieve the boot.img from the download folder and copy it to your phone
Patch the boot.img in Magisk Manager per the steps above
Now proceed with installing the update in LSMA (It will say it's going to erase your data, but it does not).
Your phone will reboot to the bootloader and LSMA will flash the update
Once the update is finished and your phone reboots for the final time, close LSMA.
Reboot to the bootloader again:
Code:
adb reboot bootloader
Flash boot:
Code:
fastboot flash boot magisk_patched.img
Reboot:
Code:
fastboot reboot
Upon reboot, you're now updated, and root & data is preserved.
Click to expand...
Click to collapse
for those who try to install security patch...
I recommend you do the following in case you wish to keep your root and others in the phone.
as usual, back it up in case...
connect to the lenovo software (above) and download the security patch (you can do it thru the rescue step as the program will prompt "no new software" if you try to check "upgrade software".
once the security patch download is complete, keep a copy of the boot.img and load it on the phone to do usual magisk thing.
but be patient...
keep this new magisk edited boot elsewhere and reflash the original boot to your phone so that the error message in making the patch update disappears.
once you reverted to the original boot (it goes without saying the usual fastboot reboot), make the OTA security patch update.
you will find that the root is gone but the phone (everything).
now is the time to flash the magisk edited boot (the new boot from the update patch) to your phone and voilaaaaa!
your root is back + the security patch applied.
beefytr said:
for those who try to install security patch...
I recommend you do the following in case you wish to keep your root and others in the phone.
as usual, back it up in case...
connect to the lenovo software (above) and download the security patch (you can do it thru the rescue step as the program will prompt "no new software" if you try to check "upgrade software".
once the security patch download is complete, keep a copy of the boot.img and load it on the phone to do usual magisk thing.
but be patient...
keep this new magisk edited boot elsewhere and reflash the original boot to your phone so that the error message in making the patch update disappears.
once you reverted to the original boot (it goes without saying the usual fastboot reboot), make the OTA security patch update.
you will find that the root is gone but the phone (everything).
now is the time to flash the magisk edited boot (the new boot from the update patch) to your phone and voilaaaaa!
your root is back + the security patch applied.
Click to expand...
Click to collapse
Hey, I found that using root on the latest security patch makes the WiFi stop working. Like the switch won't even turn on, and it can't scan for new networks. I know that it's not a hardware problem, because I reverted to the March security update and WiFi works. Is anyone else having the no WiFi issue on the latest security patch while using root?
Fazwalrus said:
Hey, I found that using root on the latest security patch makes the WiFi stop working. Like the switch won't even turn on, and it can't scan for new networks. I know that it's not a hardware problem, because I reverted to the March security update and WiFi works. Is anyone else having the no WiFi issue on the latest security patch while using root?
Click to expand...
Click to collapse
Nope!

Nokia x6.1 bootloops to twrp.

So it had been a while since I had tried getting into recovery twrp but I figured I could remember how so I did
fastboot flash boot twrp etc.img
This was a mistake according to the site here > https://twrp.me/nokia/nokia6_1.html
WARNING: If you accidently flash TWRP to your device using fastboot instead of temporarily booting the image, you will need to download the latest factory image for your device and reflash the boot image.
Click to expand...
Click to collapse
Which is exactly what I did
So now my phone is either stuck on the Nokia logo, or I can load twrp.
They provide some info on fixing it but I'm not sure I understand what they are saying. Can anyone help with this?
The phone was running Oreo (not sure which version unfortunately) and it was fully rooted and running magisk/xposed/su just fine before my mistake.
I don't have access to fastboot. Only Twrp and adb commands.
Edit, I can get to fastboot/download mode through the twrp terminal.
[SOLVED]
So I was able to use twrp to copy all of my internal files onto an sd card.
Then I set about getting this tool here > https://github.com/RaghuVarma331/Nokia-Tool the firmware specific to my phone, and modifying the bat file found here > https://github.com/RaghuVarma331/Nokia-Tool/blob/master/batscripts/Nokia-Tool-DRG-B2N-PL2-CTL.bat (because windows for some reason gave me a 16 bit application warning when I tried to use the tool exe)
My phone flashed a bunch of time and I was able to load up an almost entirely stock android 10, still capable of using magisk, edxposed, etc.
And now all there is to do is to get everything back onto it and set up which is at this point, the best case scenario.

One Plus 8 Pro features (Wifi / Camera) stopped working after root

I rooted my OP8-Pro. I followed the instructions in this video:
https://www.youtube.com/watch?v=UVABAEGRgew.
To summarize, his steps were as follows:
1. Unlock the bootloader
2. Extract boot.img file from payload bin file (on Windows)
3. Install Magisk Canary 2020 app on the phone
4. Install the boot.img file through Magisk
5. Download Fastboot.zip in Windows and extract files
6. Download and place magisk.patched file in Fastboot folder
7. Connect the phone to Windows, use cmd to boot into bootloader
8. Flash the magisk.patched file on the device and reboot
This is a new method to me. In the past rooting always involved TWRP. Root checker shows that the phone is rooted but other features have stopped working.
WiFi no longer works. Even if I turn it on, it turns itself off. Camera keeps crashing and I can't even change the camera mode once I launch the app. My phone also rebooted itself a couple of times while I was testing it after root.
I also rooted my One Plus 6 in 2019 but had to use a custom TWRP (Bluspark) for it to be stable.
I rather start over with a factory reset than try to repair the device in it's current state (but will try to repair it if it's easier). I prefer to stick with the factory ROM and only need root for one app.
Try latest stable magisk instead of canary. Mine works perfectly with regular magisk
I used the all in one tool by mauronafrio here. Worked flawlessly.
shagexpert said:
I rooted my OP8-Pro. I followed the instructions in this video:
https://www.youtube.com/watch?v=UVABAEGRgew.
To summarize, his steps were as follows:
1. Unlock the bootloader
2. Extract boot.img file from payload bin file (on Windows)
3. Install Magisk Canary 2020 app on the phone
4. Install the boot.img file through Magisk
5. Download Fastboot.zip in Windows and extract files
6. Download and place magisk.patched file in Fastboot folder
7. Connect the phone to Windows, use cmd to boot into bootloader
8. Flash the magisk.patched file on the device and reboot
This is a new method to me. In the past rooting always involved TWRP. Root checker shows that the phone is rooted but other features have stopped working.
WiFi no longer works. Even if I turn it on, it turns itself off. Camera keeps crashing and I can't even change the camera mode once I launch the app. My phone also rebooted itself a couple of times while I was testing it after root.
I also rooted my One Plus 6 in 2019 but had to use a custom TWRP (Bluspark) for it to be stable.
I rather start over with a factory reset than try to repair the device in it's current state (but will try to repair it if it's easier). I prefer to stick with the factory ROM and only need root for one app.
Click to expand...
Click to collapse
I used the all in one tool by mauronafrio here. Worked flawlessly.
Click to expand...
Click to collapse
So I tried that tool. I tried to flash factory image downloaded directly from One Plus website and kept getting the following error message:
"Error: flash-all.exe or flash-all.bat or flash_all.bat or flashall.bat not found!!!"
I think this has to do with the fact that I am using a secondary hard drive on my computer to store all the downloaded files and the bat file is supposed to be in the same folder as the zip file.
I also reset it to factory settings from the recovery mode but that didn't fix the WiFi issue.
Then I ran TWRP from the All in one Tool and installed the factory firmware from phone's internal memory. This soft bricked my phone.
After getting soft-bricked I installed Magisk through the tool but that didn't fix the issue.
Now it is stuck in a boot loop and keeps going into recovery mode. I can also boot into Fastboot mode and install zips through there but I would like to unbrick it first. Is there an alternative ROM that can unbrick it?
I think I am going to try and use the unbrick tool first and if that doesn't work I will try the Fastboot ROM, that already comes with the bat file.
I am a little confused as to which version goes on my phone though. They have Indian, Global and European versions but I live in the U.S. Global seems to be the most appropriate for my phone but I don't want to install the wrong ROM on it.
I remember reading that you can run into WiFi issues if you flashed the wrong version (from a different region) for your phone
I've rooted for many years and this is the first time I didn't go through TWRP as well.
If you use the unbrick tool you'll probably get issues with the fingerprint reader. But that's fixable, after you've rooted.
The easiest way to get root is to just unlock the bootloader, fastboot boot twrp (not flash), and then flash magisk 20.4 stable.
Before TWRP you had to patch the boot.img and fastboot flash it, but with twrp there is no need for it.
If you use the unbrick tool you'll probably get issues with the fingerprint reader. But that's fixable, after you've rooted.
The easiest way to get root is to just unlock the bootloader, fastboot boot twrp (not flash), and then flash magisk 20.4 stable.
Before TWRP you had to patch the boot.img and fastboot flash it, but with twrp there is no need for it.]
Click to expand...
Click to collapse
Thanks for letting me know. I attempted to use the unbrick tool but it had problems connecting to the phone. And I also didn't want to run into finger print issues.
I downloaded the patched Rom (with flash-all.bat file included) and installed it via All in one tool. That unbricked the phone and I reset the system to start from scratch. I used the global / international version for my North American phone.
After setting up the phone, I rebooted into Fastboot and loaded TWRP via All in one tool and installed Magisk 20.4 and got the phone rooted.
Root checker shows the phone is now rooted. WiFi and camera also work. I am ready to transfer data from the old phone.
This would have gone smoother if I had just used the correct version of Magisk from the start.

Categories

Resources