[Guide] How to root and use custom kernel - Xiaomi Mi A2 / 6X Guides, News, & Discussion

So as I saw, there are a lot of users who's afraid of rooting their device, so I decided to make a thread where I write everything down step by step.
I'm not a man of words, so I try to keep it very minimalistic and simple, so newbies can do this too without any issue.
In this thread I'll guide your through on how to flash twrp, root, and use a custom kernel, which is called Hex and can be found here on XDA.
You need to be on September patch, otherwise I cannot guarantee that it will work.
Before we start the process, I need to say that if you brick your device because of something went wrong, don't point your finger at me, I just wrote this to help users who wants to enjoy a better experience on A2.
And one more thing. Bootloader unlocking will wipe every data on your phone so make sure to backup everything!
Let's start then, shall we?
1. Installing drivers & Preparing PC
- Download this and extract it
- Open and install "adb-setup-1.4.3.exe"
- When it is done, go to "Drivers" folder and start "miflash_unlock.exe"
- Click on the gear icon top right corner and click on "Check" next to "Click the button to install the drive"
- Do as the installer says
- Hopefully the drivers has been installed so we're done with it, let's head on the next step.
2. Preparing phone for unlocking
- On your phone navigate to Settings->System->About phone and tap the build number until you see "You are developer"
- Go back once and you'll see a new menu called "Developer options"
- Tap on it and search an option called "OEM Unlocking", enable it
- We're done here. Let's keep going
3. Entering fastboot and unlocking bootloader (MAKE A BACKUP of your data!)
- Hold your power button down, tap on restart and hold your volume DOWN button while it resets until you see the Mi bunny doing its thing
- Now we're in Fastboot mode, hooray:victory:
- Download this zip and extract it on your PC
- Open it and type "cmd" (without the quotations) in the file manager header where you see (This computer>somethingsomething>Mi A2 fastboot), don't be afraid just type it in, and hit enter and you'll enter into command prompt
- Now we are ready for action
- Type these commands one by one:
fastboot flashing unlock
fastboot flashing unlock_critical
After this, you will see a warning message that your bootloader is unlocked and your data is not safe, blah blah... Just ignore it everytime you power on your phone.
- Hope you can keep up with me cause we're done here, let's head to the next step.
4. Installing TWRP and Magisk (and Hex kernel which is optional)
- First we need to know what is our active slot, we can check this in fastboot with "fastboot getvar current-slot"
- Download this recovery by TingyChen and also copy this to the same location
- If you have slot A as active then flash twrp to B partition and vice versa In cmd type "fastboot flash boot_a or boot_b TWRP-3.2.3-jasmine-20180804.img" (Without quotation) - Now we have twrp on our device
- Then type: "fastboot set_active A (or) B " (Also without quotation) - Depending on where you installed TWRP
- Hold down the power button and Volume UP!(This time up) and when the phone resets release the power button and keep pressing the vol up button until you enter twrp
- If you did right, you're in TWRP now, let's start flashing
- Navigate to Reboot and select Slot A (or B) at the bottom - Select the active slot where your system is
- Flash Custom Kernel (we have Hex for now)
- Flash Magisk_a if you have system on A partition or Magisk_b if you have it on B
Reboot your device and we're done with everything. Now you have fully functional Magisk and Hex custom kernel.
Now you can enable CameraAPI2 with magisk module and use google camera and some other sweet things like substraum for example.

Is Twrp permanently or temporary?

aankvian said:
Is Twrp permanently or temporary?
Click to expand...
Click to collapse
It is permanent, but if you want to use twrp unfortunately you need pc for it to set the active slot to B (fastboot set_active b), because your system is on A and you boot on that slot by default. You cannot change the active slot on phone at the moment.

balazs312 said:
After this, you will see a warning message that your bootloader is unlocked and your data is not safe,
Click to expand...
Click to collapse
Hello. Is it possible to remove this annoying screensaver?

Serrega277 said:
Hello. Is it possible to remove this annoying screensaver?
Click to expand...
Click to collapse
I dont know?

Thank you so much. Where i have to start when device is already unlocked?

bavmouse said:
Thank you so much. Where i have to start when device is already unlocked?
Click to expand...
Click to collapse
4. part

don't work for me: https://picload.org/view/dcrolwrl/anmerkung.png.html

bavmouse said:
don't work for me: https://picload.org/view/dcrolwrl/anmerkung.png.html
Click to expand...
Click to collapse
Did you copy the image file to the folder?

Yes I did.

bavmouse said:
Yes I did.
Click to expand...
Click to collapse
it says that the file is not found, try to rename it and flash it like that with your preferred file name

Anyone managed to do it this way?
I had a lot of trouble. Mainly because fastboot won't support the "set_active" command. The second thing is, that not everybody is running on slot A, so the guide might be misleading.
So after I figured the basics (I'm not used to the A/B partitions) I had a bootloop if I installed magisk via recovery.
What I did (I'm on slot B):
- everything till step 4. ofc
- installed magisk (just the apk)
- flash recovery to slot B (the active one) and then "fastboot reboot" holding vol up, to enter recovery
- in recovery I flashed the hex kernel_b and wiped cache, reboot to system
- after completed boot, reboot to fastboot (again) and boot the patched stock boot file
- then tun magisk.apk and "direct install" magisk. after reboot, you have hex kernel and magisk (but no twrp)
if you re able to select active partitions in fastboot, you can have it all

Good evening,
@pecholino I have the same problem like you with the command "fastboot set_active b" but you are on Slot B. Please tell me how do you change the Slot from A to B. I´m still on A. Thank´s in advanced.
servus

It really doesn't matter if you are on A or B. If you're on A, you follow the guide. If you're on B, you still follow the guide, but using the opposite partition.
I ended up on slot B because I flashed the august release stock image (default on slot A) and then I updated via updater to the last release (slot B). So I have the old rom on slot A and the new one on slot B. The only way I'm able to change active slots is in twrp.

I understand. Instead off "fastboot flash boot_b TWRP-3.2.3-jasmine-20180804.img" i must write "fastboot flash boot_a TWRP-3.2.3-jasmine-20180804.img", after reboot to recovery i change to B and install magisk. Is this the right way???
servus

4. Installing patched boot image, twrp and Hex
**
- Type "fastboot boot BOOT_PATCHED_V9.6.13.0.ODIMIFE" (Without the quotations) in cmd and your device will restart, don't worry about it
Here u forgot .img in your post =) i mean thah you should type fastboot boot BOOT_PATCHED_V9.6.13.0.ODIMIFE.img

Learginy said:
4. Installing patched boot image, twrp and Hex
**
- Type "fastboot boot BOOT_PATCHED_V9.6.13.0.ODIMIFE" (Without the quotations) in cmd and your device will restart, don't worry about it
Here u forgot .img in your post =) i mean thah you should type fastboot boot BOOT_PATCHED_V9.6.13.0.ODIMIFE.img
Click to expand...
Click to collapse
Thank you, fixed it:highfive:

Hey, thanks for the tutorial!
Is the Magisk.zip customized? If yes could you please upload it to google drive? I don`t have access to mega...

inuZ said:
Hey, thanks for the tutorial!
Is the Magisk.zip customized? If yes could you please upload it to google drive? I don`t have access to mega...
Click to expand...
Click to collapse
https://drive.google.com/file/d/1YXgnJ1yibMdYL4e84OiDnqM4JUWb1K-I/view?usp=sharing

fastboot flash boot_a TWRP-3.2.3-jasmine-20180804.
Code:
target didn't report max-download-size
Sending 'boot_a' (38612 KB)...
FAILED (remote: Requested download size is more than max allowed
)
Finished. Total time: 0.003s
Any help appreciated!!

Related

[REF] [ROOT] [RECOVERY] [BOOT LOADER] Metro PCS LG K7 LGMS330 [Guide For Dummies]

I have not been on this site since posting my guide, i do want to let any future people reading this know that, I am not a professional. everything in this guide is using stuff from other peoples threads.... this thread is just step by step directions on how i rooted (and installed TWRP on) MY lg k7 (MetroPCs). Also i had to root before i unlocked the boot loader. Which is not safe, you should probably unlock the boot loader before you root, but i couldn't figure out how to unlock it without root access.
I AM NOT RESPONSIBLE FOR ANY THING THAT HAPPENS TO YOUR DEVICE!
YOU AND ONLY YOU CAN BE HELD RESPONSIBLE​
~BACK UP FILES ON PC, YOUR PHONE WILL BE RESET TO FACTORY SETTINGS DURING THIS TUTORIAL~
Step One: Enable Dev Options
A) open settings>about phone>software info then tap "Build Number" really fast about 10 times
B) open settings>Developer Options, then check the box labeled "Enable OEM Unlock", and the box Labeled "USB Debugging"
Step Two: Install Android SDK/ADB/USB drivers
A) go to http://developer.android.com/sdk/index.html in your browser, and click download...
B) go to https://www.microsoft.com/net/default.aspx in your browser, and click the big blue button that says .NET
Framework 4.6.1 or X.X.X depending on when your reading this...
C) go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html scroll down until you get to the first box, labeled Java SE Development Kit 8u91 or XuXX Depending on when your reading this, then find your OS (ex: Windows x86, Mac OS, Linux, Etc..), then select the download link
Step Three: Installing LG K7's USB Driver's
A) unlock your phone
B) plug your phone into you Computer via USB
C) pull down your notifications, Tap on the USB icon which should be labeled "Media Device (MTP)," "Send Images (PTP)," or "Charge Phone"
D) if a dialogue box pops up asking to install drivers tap install, if not proceed to step E
1) Your PC should ask you if you want to auto run, Either auto run or open the folder and run LG_PC_Programs.exe then proceed to Step Four
E) select "Media Device (PTP)," if not already selected
1) click the three vertical dots next to the magnify glass in the upper right hand corner, select install pc drivers, then tap install
Step Four: Installing Java SE
A) return to the folder where you downloaded the files in step two, install the file which contains the word java in it
Step Five: Installing Microsoft .NET 4 Framework
A) now in the same folder as step four, install the with the name "NDP461-KB3102438-Web," the name might be different then mine depending on when you are reading this
B) if it is already installed it will notify you and you can proceed to the next step
Step Six: Installing Android Studio 2.0 (SDK/ADB Drivers)
A) in the download folder from step four & five, double click the remaining file, the name should contain the words "android", and "studio" in it
B) when the dialogue box opens requesting admin rights, select allow
C) click next
D) click next
E) make sure all boxes are checked and click next
F) read the license agreement, (unless your the 99.9% that doesn't) click i agree
G) you may click next or choose where you'd like to install android studio, and where you'd like to install SDK, for this tutorial i will change make a new folder in my docs named SDK then change the SDK install dir to My Docs
H) click next
I) it will take a moment to install so just wait
(note: the progress bar will fill up, then reset, as it is installing in two separate locations)
J) when finished, click next
K) uncheck the box and click finish
Step Seven: Root your device
(Note: I rooted before i unlocked my boat loader, as i could not get it to boot into boot loader mode until i rooted it)
A) go to http://www.kingroot.net/wap on your android device and download the apk file
B) go to settings>security and check the box labeled "Unknown Sources"
C) install the apk
Video tutorial for king root here: https://www.youtube.com/watch?v=tG_ruuTPVpU
(Not my channel or video)
D) open the king root app
E) make sure you have a charged battery or your phone is plugged in as the rooting process time may vary (better safe then sorry)
F) swipe up until you see a "TRY IT" button click it
G) under "Root Access not available" tap "Get Now
H) do not turn off your phone
I) when it is done you can tap optimize now if you wish, otherwise close the app
Step Eight: Replacing KingRoot with SuperSU ~ W0lfDroid Method
A) go to http://www.w0lfdroid.com/2015/05/How-to-Remove-Replace-KingUser-KingRoot-with-SuperSU.html
B) scroll down until you see the word "download:" (should be right above the related posts
C) click on the "new link" next to "Replace_Kingroot_With_SuperSU.zip"
D) extract the .zip so that the "MRW" folder is on your internal storage
(Easiest way is to download it on PC and open up your k7 in "my computer" and select internal storage and drag the MRW folder inside the .zip there)
E) go to google play and search "terminal emulator for android" or use this link if your reading this on your phone https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
F) install the first one, or use this link if your reading this on your phone https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
G) open terminal emulator
H) type "su" without the quotations
(everything typed in the terminal is case sensative)
I) type "sh /sdcard/mrw/root.sh" without the quotations
J) you might see a few errors, that is fine
K) wait until it says finished
L) when SU opens, select "update" "install" or what ever pops up
M) when it asks to uninstall, uninstall it, it is not uninstalling SuperSU it is uninstalling Kingroot,
O) if 30 minutes pass and it is still uninstalling then exit the app and then reboot the phone
DO NOT STOP HERE ~ YOU HAVE TO UNLOCK THE BOOTLOADER, and OPTIONALLY FLASH TWRP
Step Nine: Unlocking The Bootloader
A) refer to step one and double check the OEM unlock is enabled and USB debugging is turned on
(If not then please enable them)
B) search quick boot on the google play store download the first app it should be a circle with a lightening bolt
C) open quick boot
D) when asked to "allow root access?" tap allow
E) if an add pops up close it with the ex in one of the corners
F) tap on the word boot loader
G) at the top of your phone you should see " * Welcome To Fast Boot Mode : "
H) now go to your SDK dir, in my case it is C:\Users\USER\Documents\SDK
I) hold shift, then right click on the "platform-tools" folder, then select "open command window here"
J) in the CMD window type "fastboot devices" - without quotations
(everything is case sensative)
K) then type "fastboot oem unlock" - without quotations
L) then type "fastboot getvar unlocked" if that doesn't work try "fastboot getvar" or "fastboot getvar unlock" to confirm if it is unlocked
(if non of the getvar commands work you did something wrong, and i wont be able to help you, but if you followed the tutorial you shouldn't have any issues as these are the exact steps i took)
M) then type "fastboot reboot"
LEAVE THE CMD OPEN OR YOU WILL HAVE TO REPEAT steps H-I
Step Ten: Flashing TWRP
A) go to http://forum.xda-developers.com/general/general/qa-metro-pcs-lg-k7-lgms330-t3331678 and click on the latest download for twrp for me it is BETA1
if the links on that page dont work then use the links here http://forum.xda-developers.com/showpost.php?p=66282525&postcount=42
B) extract the download into your SDK folder on your PC
C) in the sdk CMD window from Step nine
D) type "fastboot devices" - without qoutation
E) ~optional, HIGHLY RECOMENDED~
1)type fastboot "boot twrp-image-3.img" - this will boot up twrp WITHOUT flashing it, just so you can make sure everything is working right
in my case it was twrp-image-3.img check your twrp file name and replace fastboot boot twrp-image-3.img with
fastboot boot INSERT YOUR FILE NAME HERE.img
2)in twrp tap reboot>bootloader
F) when bootloader mode opens back up
G) type "fastboot flash twrp-image-3.img" or "fastboot boot INSERT FILE NAME HERE.img" depending on your file name
H) when finished flashing type "fastboot reboot"
Step eleven
A) follow instructions on step one
B) the reason you must do this is because when you flash TWRP it erases your entire phone and resets it
Congrats you have Successfully Rooted, Unlocked Your Bootloader, and Flashed TWRP, to your LG K7
Well done, my friend. Well done indeed.
[QUOTE
Congrats you have Successfully Rooted, Unlocked Your Bootloader, and Flashed TWRP, to your LG K7[/QUOTE]
is this ok with the gapps 5.1 instsall .zip for twrp install or should i use a different? also, do you have a suggested camera app? awesome thread btw. Nevermind simple twrp install fixed everything.
I have tribute 5 and can't access bootloader or install SuperSU.....always fails.
How can I get this to work?
Today backup important files you need!
Is this a real method BC everybody having problems rooting this device so I ask can u make a video and add screenshots
Sent from my LG-D800 using Tapatalk
I can confirm this method works. The only different thing i did was purchase Supersume pro from playstore. Worked like it said it would. The Ls675 is rootable. But no bootloader unlock or bootloader at all for that matter. Im running MS330 with TWRP full root and have twrp backups and fastboot flashable backups via flashfire....
---------- Post added at 02:28 AM ---------- Previous post was at 02:20 AM ----------
https://mega.nz/#!CRAVWAyI!QIbo20-0ZnVqlREs7ZXF66aB_Eh3UjCEMVQbLuP1Zec
https://mega.nz/#!zBoxGIQR!buXvorPkA14Vr2Idn7uhNPHanOL6wbvcEav3MhRdjv8
https://mega.nz/#!yQBg1ayC!r3qvWfLjCAKg0e8t91J1IEtae8_EwhvYTXjawv7b_2A
Screen shots of root, flashfire backups, and device info
While it does work I can find no method using the buttons to get into twrp all the instructions I find for recovery fail so I can only boot back to it after the phone boots, thus it's worthless at this point. Also the command is fastboot flash recovery imgagename.img and you'll need to remove kingroot from administrators to uninstall.
Anyone else been able to boot directly into twrp from the off position?
zgauthier8286 said:
I can confirm this method works. The only different thing i did was purchase Supersume pro from playstore. Worked like it said it would. The Ls675 is rootable. But no bootloader unlock or bootloader at all for that matter. Im running MS330 with TWRP full root and have twrp backups and fastboot flashable backups via flashfire....
---------- Post added at 02:28 AM ---------- Previous post was at 02:20 AM ----------
https://mega.nz/#!CRAVWAyI!QIbo20-0ZnVqlREs7ZXF66aB_Eh3UjCEMVQbLuP1Zec
https://mega.nz/#!zBoxGIQR!buXvorPkA14Vr2Idn7uhNPHanOL6wbvcEav3MhRdjv8
https://mega.nz/#!yQBg1ayC!r3qvWfLjCAKg0e8t91J1IEtae8_EwhvYTXjawv7b_2A
Screen shots of root, flashfire backups, and device info
Click to expand...
Click to collapse
can you please help me i have 2 MS330 that are bricked
callihn said:
While it does work I can find no method using the buttons to get into twrp all the instructions I find for recovery fail so I can only boot back to it after the phone boots, thus it's worthless at this point. Also the command is fastboot flash recovery imgagename.img and you'll need to remove kingroot from administrators to uninstall.
Anyone else been able to boot directly into twrp from the off position?
Click to expand...
Click to collapse
Try to do the factory hard reset trick but say no at the second screen. I haven't tried it out yet but I've been reading around several sites and that's a possible solution
zgauthier8286 said:
Try to do the factory hard reset trick but say no at the second screen. I haven't tried it out yet but I've been reading around several sites and that's a possible solution
Click to expand...
Click to collapse
Just reboots. Think we're going to have to change something? Boot image? Kernel?
callihn said:
Just reboots. Think we're going to have to change something? Boot image? Kernel?
Click to expand...
Click to collapse
I'm no developer by any means but I have Linux and windows on my laptop. I'm familiar with kernel building on bunt and have the source code for MS330 on my laptop. I have a backup of my boot img as well. If you can get to fastboot u can probably flash my boot img if you want me to send it. I have recovery img as well which is twrp. Let me know if you have any ideas on what u need or i can do as far as possibly doing a fresh build kernel later tonight and getting a zImage out of it
Does anyone know a way to successfully root this phone? Not just recover?
Sent from my LGMS330 using Tapatalk
callihn said:
Just reboots. Think we're going to have to change something? Boot image? Kernel?
Click to expand...
Click to collapse
Of other interest 5.1 is very dendent on Google apps and move app updates to the system via TB or Link2SD fails more than it succeeds, shows they moved but app inaccessible afterwards hence brick. Mine went down trying to integrate play services and reinstalling from adb didn't help. FYI if you relock the BL it'll lock the phone with a security error too. Moving play services causes unending error screens so you can't really see if it's done moving, but I waited a good 5 minutes before reboot. Issue on fails could have been the system not being r/w. Needless to say backup, backup, backup as I hadn't because I've never had a serious issue doing that and considered it a trivial task. Anyone had good success with integrating updates and cache? Anyone restored from twrp yet?
JayCouture.com said:
Does anyone know a way to successfully root this phone? Not just recover?
Sent from my LGMS330 using Tapatalk
Click to expand...
Click to collapse
Yes! Just follow the instructions here:
http://forum.xda-developers.com/showpost.php?p=66456635&postcount=1
zgauthier8286 said:
I'm no developer by any means but I have Linux and windows on my laptop. I'm familiar with kernel building on bunt and have the source code for MS330 on my laptop. I have a backup of my boot img as well. If you can get to fastboot u can probably flash my boot img if you want me to send it. I have recovery img as well which is twrp. Let me know if you have any ideas on what u need or i can do as far as possibly doing a fresh build kernel later tonight and getting a zImage out of it
Click to expand...
Click to collapse
Can you figure out why we can't boot to recovery via hardware buttons? That's critical for tinkering and testing on the go since I always have my phone but not my laptop for booting into recovery with adb. Not sure exactly where to look, probably start with a search for the words "recovery" and "safe mode" for the buttons and "security error" in the boot.img files.
callihn said:
Can you figure out why we can't boot to recovery via hardware buttons? That's critical for tinkering and testing on the go since I always have my phone but not my laptop for booting into recovery with adb. Not sure exactly where to look, probably start with a search for the words "recovery" and "safe mode" for the buttons and "security error" in the boot.img files.
Click to expand...
Click to collapse
If your rooted u can dl a reboot recovery app on the play store I have one that works like a charm. But im gonna take a look through Linux at the kernel options using make menu_config and see if there's anything I can see in there.
zgauthier8286 said:
I'm no developer by any means but I have Linux and windows on my laptop. I'm familiar with kernel building on bunt and have the source code for MS330 on my laptop. I have a backup of my boot img as well. If you can get to fastboot u can probably flash my boot img if you want me to send it. I have recovery img as well which is twrp. Let me know if you have any ideas on what u need or i can do as far as possibly doing a fresh build kernel later tonight and getting a zImage out of it
Click to expand...
Click to collapse
im having a problem w the security 9 error boot loop. only seem to b able to get it into download mode , not bootloader or recovery. would your boot and recovery img's help me at all ya think ? thanks !
goitalone said:
I have tribute 5 and can't access bootloader or install SuperSU.....always fails.
How can I get this to work?
Click to expand...
Click to collapse
Thanks again. For anyone that has a soft bricked LG K7 see this man! He brought my S#!? To life through teamveiwer. Thanks again. From my LG K7.
Maybe just my experience, but regarding step 10. I had to have the twrp image in SDK>platform tools, also when you get to fastboot flash twrp-image-3.img, I couldn't get it to work, until I typed it as fastboot flash recovery twrp-image-3.img. Hope this helps anyone else getting errors during this part. Thanks for the writeup.

ROOT Lg K10 MTK Chipset (95% working method)

This method is only for devices with MTK chipset. CONFIRMED WORKING ON K430T, K430DSY and K430dsE
It is based on the gottlasz method published in: http://forum.xda-developers.com/lg-k10/how-to/twrp-root-lg-k8-k350n-t3475807"
Required files:
- Carliv Image Kitchen (search in google)
- SuperSU 2.65 available in: http://downloadmirror.co/L2/BETA-SuperSU-v2.65.zip
- TWRP ported by berkantkz at: http://forum.xda-developers.com/lg-k10/development/teamwinrecoveryproject-3-0-0-0-lg-k10-t3404434
- Time and patience (a lot of patience)
Steps:
1. Enable developer options on the lg K10
2. Enable OEM unlocking and USB debugging
3. Copy twrp.img to disk C: /
3. Go to C: / and open command window. Enter: adb reboot bootloader (phone will start in fastboot mode)
4. Once in the fastboot mode enter the command: fastboot boot twrp.img
5. Once inside TWRP press cancel and then slide to allow modifications.
6. Mount System, data and sdcard.
7. Make BOOT-only backup (uncheck all other partitions)
8. Mount MTP
9. Copy BOOT backup from TWRP folder in our SD card (Boot.emmc.win) and rename bootlz4.img
10. Copy to Boot-resources of CARLIV IMAGE KITCHEN
11. Decompress with Carliv
12. Open bootlz4 folder and find the file "boot.img-ramdisk-compress".
13. Edit "boot.img-ramdisk-compress" with notepad ++ and change "lz4" to "gz"
14. Save
15. Recompress bootlz4.img
16. Go to output folder and look for bootlz4xxxxx.img and rename it as bootgz.img
17. Go to TWRP and restart in bootloader mode
18. Write in command window: fastboot flash boot bootgz.img
18. Then write in command window: fastboot boot twrp.img to return to TWRP
19. Install superSU 2.65
20. Backup BOOT (boot partition only)
21. Copy BOOT backup again (Boot.emmc.win) and rename it to bootgzroot.img
22. Copy to Boot-resources of CARLIV IMAGE KITCHEN
23. Unzip with Carliv
24. Open bootgzroot folder and find the file "boot.img-ramdisk-compress".
25. Edit "boot.img-ramdisk-compress" with notepad ++ and change "gz" to "lz4"
26. Save
27. Recompress bootgzroot.img
28. Go to folder output and rename "bootgzrootxxx.img" to "bootlz4root.img"
29. Copy "bootlz4root.img" to disk C: /
30. Copy bootlz4.img from boot-resources folder into C:/ too
31. Go to TWRP and reboot into bootloader
32. Write in command prompt fastboot flash boot bootlz4.img (this is to avoid bootloops)
33. Write in command window fastboot boot bootlz4root.img (there will be a bootloop and then boot normally)
34. Write in command window adb reboot bootloader
35. Write in command window fastboot boot bootlz4root.img, after boot write in command window adb reboot bootloader (fast because the phone will reboot after some seconds)
36. Write in command window fastboot flash boot bootlz4root.img
37. Start normally.
Ready, you have ROOT!
I am not responsible for any damage caused to your phone, your grandma or your hamster. Cheers!
waiting for ramdump
cpatrick3000 said:
This method is only for devices with MTK chipset.
It is based on the gottlasz method published in: http://forum.xda-developers.com/lg-k10/how-to/twrp-root-lg-k8-k350n-t3475807
Required files:
- Carliv Image Kitchen (search in google)
- SuperSU 2.65 available in: http://downloadmirror.co/L2/BETA-SuperSU-v2.65.zip
- TWRP ported by berkantkz at: https://drive.google.com/open?id=0B0BUe3iVMnzKQnBpeDdTM1plc3c
- Time and patience (a lot of patience)
Steps:
1. Enable developer options on the lg K10
2. Enable OEM unlocking and USB debugging
3. Copy twrp.img to disk C: /
3. Go to C: / and open command window. Enter: adb reboot bootloader (phone will start in fastboot mode)
4. Once in the fastboot mode enter the command: fastboot boot twrp.img
5. Once inside TWRP press cancel and then slide to allow modifications.
6. Mount System, data and sdcard.
7. Make BOOT-only backup (uncheck all other partitions)
8. Mount MTP
9. Copy BOOT backup from TWRP folder in our SD card (Boot.emmc.win) and rename bootlz4.img
10. Copy to Boot-resources of CARLIV IMAGE KITCHEN
11. Decompress with Carliv
12. Open bootlz4 folder and find the file "boot.img-ramdisk-compress".
13. Edit "boot.img-ramdisk-compress" with notepad ++ and change "lz4" to "gz"
14. Save
15. Recompress bootlz4.img
16. Go to output folder and look for bootlz4xxxxx.img and rename it as bootgz.img
17. Go to TWRP and restart in bootloader mode
18. Write in command window: fastboot flash boot bootgz.img
18. Then write in command window: fastboot boot twrp.img to return to TWRP
19. Install superSU 2.65
20. Backup BOOT (boot partition only)
21. Copy BOOT backup again (Boot.emmc.win) and rename it to bootgzroot.bin
22. Copy to Boot-resources of CARLIV IMAGE KITCHEN
23. Unzip with Carliv
24. Open bootgzroot folder and find the file "boot.img-ramdisk-compress".
25. Edit "boot.img-ramdisk-compress" with notepad ++ and change "gz" to "lz4"
26. Save
27. Recompress bootgzroot.img
28. Go to folder output and rename "bootgzrootxxx.img" to "bootlz4root.img"
29. Copy "bootlz4root.img" to disk C: /
30. Copy bootlz4.img from boot-resources folder into C:/ too
31. Go to TWRP and reboot into bootloader
32. Write in command prompt fastboot flash boot bootlz4.img (this is to avoid bootloops)
33. Write in command window fastboot boot bootlz4root.img (there will be a bootloop and then boot normally)
34. Write in command window adb reboot bootloader
35. Write in command window fastboot boot bootlz4root.img (there will be an error related to NFC, accept and allow USB connection)
36. Write in command window adb reboot bootloader
37. Write in command window fastboot flash boot bootlz4root.img
38. Start normally.
Ready, you have ROOT!
I´m not responsible for any damage caused to your phone, your grandma or your hamster. Cheers!
Click to expand...
Click to collapse
sorry for my English. I tried to follow the tutorial, however the Get on the (4. Once in fastboot mode enter the command: fastboot boot twrp.img) The Reset one cell features a Next Message: waiting for ramdump. Is there something I can do to get rid of it? thanks for the help in MTK
MarkiinBRz said:
sorry for my English. I tried to follow the tutorial, however the Get on the (4. Once in fastboot mode enter the command: fastboot boot twrp.img) The Reset one cell features a Next Message: waiting for ramdump. Is there something I can do to get rid of it? thanks for the help in MTK
Click to expand...
Click to collapse
Mmm remove battery and try to turn on again. If It doesnt works reflash stock kdz and before doing the root use adb reboot bootloader and then fastboot oem unlock
MarkiinBRz said:
sorry for my English. I tried to follow the tutorial, however the Get on the (4. Once in fastboot mode enter the command: fastboot boot twrp.img) The Reset one cell features a Next Message: waiting for ramdump. Is there something I can do to get rid of it? thanks for the help in MTK
Click to expand...
Click to collapse
my phone is lg k10 430dsy mtk
I had the same problem
after flash twrp.img
show message: waiting for ramdump
---------- Post added at 08:43 AM ---------- Previous post was at 08:33 AM ----------
cpatrick3000 said:
Mmm remove battery and try to turn on again. If It doesnt works reflash stock kdz and before doing the root use adb reboot bootloader and then fastboot oem unlock
Click to expand...
Click to collapse
remove battery and switch on phone work device without problem
but not work recovery twrp on the 430dsy.
fastboot boot twrp.img in the terminal show message success but show error message: waiting for ramdump in the device
#sorry for my bad english
i got unlocked fastboot
I goto fastboot this command
# adb reboot bootloader
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Click to expand...
Click to collapse
then flash twrp
# fastboot boot twrp.img
downloading 'boot.img'...
OKAY [ 0.596s]
booting...
OKAY [ 0.051s]
finished. total time: 0.648s
Click to expand...
Click to collapse
but show this error waiting for ramdump in the device
i waiting 30 min but nothing happened
please view Attached image
Hi, can you tell us, what is the difference between gottlasz' method and your method? I guess you added a few final flashing and booting steps.
123xdagsm said:
i got unlocked fastboot
I goto fastboot this command
then flash twrp
but show this error waiting for ramdump in the device
i waiting 30 min but nothing happened
please view Attached image
Click to expand...
Click to collapse
This error persists after the fourth step same, I think it must be the twrp or something is passing unperceived. Anyway I'll try another way.
I believe this ramdump thing is TWRP related. There is a 3.0.2 TWRP on berkantkz TWRP thread so the ones who get this error could also try that other one.
Where is that twrp 3.0.2?
wizzardsk said:
Where is that twrp 3.0.2?
Click to expand...
Click to collapse
there
http://forum.xda-developers.com/showpost.php?p=69381986&postcount=126
I still have those bootloop... When I flash with fastboot, the device freezes. When I flashed in TWRP, I got bootloop after restart...
wizzardsk said:
I still have those bootloop... When I flash with fastboot, the device freezes. When I flashed in TWRP, I got bootloop after restart...
Click to expand...
Click to collapse
I believe you need a fresh start... lg up or lg flashtool and full firmware reintall. Lg bridge and hard reset is not enough.
Of course it's just guessing so don't take it for granted.
---------- Post added at 06:46 PM ---------- Previous post was at 06:14 PM ----------
@cpatrick3000, did you manage to make it work after any unsuccesful or succesful attempts on root? I mean if you were rooted before but lost it and you had to make a hard reset or you used lg bridge update error recovery? Or your k10 was fully stock when you rooted it this way, no earlier attempts on root?
wizzardsk said:
Hi, can you tell us, what is the difference between gottlasz' method and your method? I guess you added a few final flashing and booting steps.
Click to expand...
Click to collapse
Hi. The difference is that I found a way to "force" boot of k10. If i don't do these final steps the phone stays on black screen after device corrupt warning (red triangle)
cpatrick3000 said:
Hi. The difference is that I found a way to "force" boot of k10. If i don't do these final steps the phone stays on black screen after device corrupt warning (red triangle)
Click to expand...
Click to collapse
I tried "fastboot flash boot bootlz4.img" and then my phone just freezed. After removing battery I just had something like bootloop. Device corrupt warning, then blank screen. I guess you had not these problems.
wizzardsk said:
I tried "fastboot flash boot bootlz4.img" and then my phone just freezed. After removing battery I just had something like bootloop. Device corrupt warning, then blank screen. I guess you had not these problems.
Click to expand...
Click to collapse
Mmmm thats strange. I think u better flash kdz (ill check my method again)
cpatrick3000 said:
Mmmm thats strange. I think u better flash kdz (ill check my method again)
Click to expand...
Click to collapse
Okay, which kdz do you mean?
wizzardsk said:
Okay, which kdz do you mean?
Click to expand...
Click to collapse
You hace to put your phone into download mode and restore by lg bridge. Here in the forums there's a tutorial. Btw always be sure that u can go back to normal before doing root related stuff (there's always bricking risk)
cpatrick3000 said:
You hace to put your phone into download mode and restore by lg bridge. Here in the forums there's a tutorial. Btw always be sure that u can go back to normal before doing root related stuff (there's always bricking risk)
Click to expand...
Click to collapse
I see. I have no prob going back, thx for your care. I even do not loose my data after restore in lg bridge.
wizzardsk said:
I see. I have no prob going back, thx for your care. I even do not loose my data after restore in lg bridge.
Click to expand...
Click to collapse
Np dude, i was trying to root like during a month, finally i used this method and works always for me (last night i rooted and works fine) hope u find a way to root!
cpatrick3000 said:
Np dude, i was trying to root like during a month, finally i used this method and works always for me (last night i rooted and works fine) hope u find a way to root!
Click to expand...
Click to collapse
You only used lg bridge to recover after root attempts or you tried lg up or lg flashtool?

[AIO GUIDE] Install Magisk with OTA +Make your own patched_boot...

Hey ! Today i will give you all the different ways/steps for root your Mi A2 easily.
+ How to manually create patched_boot.img for your version (beta...) without extrernal help.​
Code:
Your warranty is now void.
We are not responsible for bricked devices, dead
SD cards... Please do some
research if you have any concerns about features
included in this GUIDE before using it! YOU are
choosing to make these modifications.
Summary
- Part 1 : Install drivers and unlock bootloader. Credit to @balazs312
- Part 2 : Root with 2 ways
- Bonus : Backup boot.img and make patched_boot.img
- Part 3 : OTA
Part 1 :
So, First you need to install drivers and unlock your phone bootloader. Skip to part 2 if already done.
1. Installing drivers & Preparing PC
- Download this and extract it
- Open and install "adb-setup-1.4.3.exe"
- When it is done, go to "Drivers" folder and start "miflash_unlock.exe"
- Click on the gear icon top right corner and click on "Check" next to "Click the button to install the drive"
- Do as the installer says
- Hopefully the drivers has been installed so we're done with it, let's head on the next step.
2. Preparing phone for unlocking
- On your phone navigate to Settings->System->About phone and tap the build number until you see "You are developer"
- Go back once and you'll see a new menu called "Developer options"
- Tap on it and search an option called "OEM Unlocking", enable it
- We're done here. Let's keep going
3. Entering fastboot and unlocking bootloader (MAKE A BACKUP of your data!)
- Hold your power button down, tap on restart and hold your volume DOWN button while it resets until you see the Mi bunny doing its thing
- Now we're in Fastboot mode, hooray
- Download this zip and extract it on your PC
- Open it and type "cmd" (without the quotations) in the file manager header where you see (This computer>somethingsomething>Mi A2 fastboot), don't be afraid just type it in, and hit enter and you'll enter into command prompt
- Now we are ready for action
- Type these commands one by one:
fastboot flashing unlock
fastboot flashing unlock_critical
After this, you will see a warning message that your bootloader is unlocked and your data is not safe, blah blah... Just ignore it everytime you power on your phone.
Part 2 :
So there are currently two ways to root his phone. Let's start with the first.
Methode 1 : We will use the new temp twrp. Method by me.
1. Download files...
- Download this TWRP.
- Place it in your adb folder.
- Download Magisk-v17.2_a and Magisk-v17.2_b.
- Copy these 2 zips in your phone internal storage.
2. Check current-slot...
- Plugin your phone to you pc
- Navigate to your settigs on your phone.
- Open Developer settings
- Enable Usb Debugging
- A pop up should appear on your phone scren, hit and box and autorize the pc.
- on your pc, open fastboot command prompt, and type "adb reboot bootloader" , your device should reboot to fastboot
- type "fastboot getvar current-slot". Remember if the result is a or b.
3. Root using temporally twrp
- Reboot your phone in fastboot.
- On your pc, open fastboot command prompt, and type "fastboot boot twrp-3.2.3-jasmine-20181020.img"
- Your phone now reboot into twrp, it down't flash it, so after a reboot twrp will be gone.
- If twrp ask a password for decrypt data put your phone PIN and validate.
- Click on install and select Magisk-v17.2_a if the result in Step 2. is A, and Magisk-v17.2_b if result is B and swipe to install.
- Then select Reboot.
Now you have Magisk 17.2 installed on your phone, and twrp is gone after reboot. You can select beta in Magisk settings and update to 17.3 if you want.
Methode 2 : We will use patched_boot.img.
1. Where to find patched_boot.img ?
- Go here and check if there is your build version. If yes dowload the patched_boot.img file ( need to be on pc ) and skip to step 2. If not continue.
- If you can't find your correct build patched_boot.img (Because you are on the beta, and nobody share the file or something like that....) you can easily make your own using temp twrp. Go to Bonus part, make your patched_boot.img and continue.
2. Pepare files.
- Copy the patched_boot.img in your adb folder
- Be sure to rename it to "patched_boot.img"
- Download latest Magisk Manager apk here (currently v6.0.1)
- Copy the apk on your phone storage.
3. Install Magisk
- Reboot your phone in fastboot.
- Open a fastboot command prompt on your pc.
- Type "fastboot boot patched_boot.img"
- Your phone will reboot, put your pin....
- Go in your prefer file explorer and Install the magisk apk.
- Now open Magisk Manager app
- Click Install, direct install. Wait for the process
- And click reboot.
Now you have Magisk 17.2 installed on your phone. You can select beta in Magisk settings and update to 17.3 if you want.
Bonus
So, i will show you how to backup your current bot img. And how to make your own patched_boot.img, so people who are on Beta OTA can root there phone without any external help...
1. Backup the boot.img
- Download this TWRP.
- Place it in your adb folder.
- Reboot your phone in fastboot.
- On your pc, open fastboot command prompt, and type "fastboot boot twrp-3.2.3-jasmine-20181020.img"
- Your phone now reboot into twrp, it down't flash it, so after a reboot twrp will be gone.
- If twrp ask a password for decrypt data put your phone PIN and validate.
- In TWRP, click on "Advanced"
- Click "File Manager"
- Navigate to /dev/block/platform/soc/c0c4000.sdhci/by-name
- You will se a lot of files, and if you look you will see 3 important files, boot, boot_a and boot_b.
- Click on the "boot" file
- Click "Copy File"
- Navigate to /sdcard
- Click the blue arrow and swipe to confirm
- Click reboot
- Copy the file on your pc, and rename it to "boot.img" instead of "boot".
Now you have backup your stok boot.img you can use it for stock or whatever you want....
2. Create the patched_boot.img file
- Download latest Magisk Manager apk here (currently v6.0.1)
- Install the apk on your phone
- Open Magisk Manager
- Go to settings , click Update Channel and select Beta
- Return to home of Magisk Manager
- Click Install, then Boot image file patch ( don't know the correct typo because for me the app is in french, champion du monde !! xD ) and wait for the end of the process.
Done you now create your own patched_boot.img ! Enjoy !!
Part 3 :
So, now i will explain you how to install OTA when you have magisk.
- First, disable Automatic system updates in developer options, so it won't install OTAs without your acknowledgement.
- Open Magisk Manager, click Uninstall, then Restore Images. Don't reboot !
- Now Search for update and wait for the process. BUT do not press the "Restart now" or "Reboot" button !
- Open Magisk Manager, hit Install, then Install to inactive slot.
- Reboot when it's done.
If it don't work (strange) and ota failed, you can find your stock boot.img for your build version here, or backup your boot.img using the[ B]1.[/B] of the Bonus part and flash it using the command "fastboot flash boot_( your current slot) boot.img" (you can check your current slot with command "fastboot getvar current-slot).
If you have issues or something like that, here are some telegram group :
MiA2dev
MiA2OffTopic
HexKernel
Work perfect with october update
Thanks 4 your great work
nnexuss said:
Work perfect with october update
Thanks 4 your great work
Click to expand...
Click to collapse
Your wellcome, enjoy
Thx for your very, very good work. No Problems at all with October update. :good:
mahalo
yorkberliner said:
Thx for your very, very good work. No Problems at all with October update. :good:
mahalo
Click to expand...
Click to collapse
nice, enjoy
What to do when Magisk prompts that "Stock Image does not exist"?
Couldn't find a folder to put stock image.
0firuz said:
What to do when Magisk prompts that "Stock Image does not exist"?
Couldn't find a folder to put stock image.
Click to expand...
Click to collapse
can you explain which part you try to do, and on which steps you got this error? for more support you can join telegram groups from the bottom of the guide.
*edit* you can flash stock boot.img for future OTA. check the Part 3 : OTA
Hi
Right now im on OPM1.171019.011.V9.6.13.0ODIMIFE (5 sept 2018) rooted with magisk
I just want to update and re-root, the painless style. I dont want to flash a ****load of stuff to have a functionning phone.
Can anyone confirm that step 3 is ok? Thats the same method than for MI A1, and it was only half functionnal, i dont want to play with fire.
After having killed the IMEI numbers and the persist partition of the A1, it took me 2 weeks to repair, I dont want to **** up this one too. Hell no.
kaott said:
Hi
Right now im on OPM1.171019.011.V9.6.13.0ODIMIFE (5 sept 2018) rooted with magisk
I just want to update and re-root, the painless style. I dont want to flash a ****load of stuff to have a functionning phone.
Can anyone confirm that step 3 is ok? Thats the same method than for MI A1, and it was only half functionnal, i dont want to play with fire.
After having killed the IMEI numbers and the persist partition of the A1, it took me 2 weeks to repair, I dont want to **** up this one too. Hell no.
Click to expand...
Click to collapse
this is safe. but if you want to can just use patched boot method.
I used the method described in Step 3 to install the September OTA (V9.6.13.0) and re-install Magisk. It worked like a charm, but I am trying to repeat the method to install the October update without success. The OTA updater downloads the update, and starts installing it, but it fails miserably every time.
I have even completely uninstalled Magisk and flashed the img from here: https://sourceforge.net/projects/others/files/MiA2/
But It does not work, the OTA installer always fails.
I'm clueless, what can I do?
doragasu said:
I used the method described in Step 3 to install the September OTA (V9.6.13.0) and re-install Magisk. It worked like a charm, but I am trying to repeat the method to install the October update without success. The OTA updater downloads the update, and starts installing it, but it fails miserably every time.
I have even completely uninstalled Magisk and flashed the img from here: https://sourceforge.net/projects/others/files/MiA2/
But It does not work, the OTA installer always fails.
I'm clueless, what can I do?
Click to expand...
Click to collapse
it's because during the ota process, the current slot change. but you can back to stock September ROM, then update. and after that root using my second post https://forum.xda-developers.com/mi-a2/how-to/guide-2-minutes-magisk-installation-t3856980/amp/
Thread closed at OP request

Root & TWRP!

Note: I am no expert at this. I used this to get TWRP and root, but it there is no guarentee it won't brick your phone. Only do this if you know what your doing. Before you start you must have an unlocked bootloader, which will delete all your data. Here's the instructions (If you need help, feel free to post a comment):
Download Magisk's installer zip on your phone from https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445 (Google Pay only works with Magisk v19.0+)
Download arter97's kernel .img to your PC. This kernel currently is the only reliable way to get TWRP. https://forum.xda-developers.com/razer-phone-2/development/arter97-kernel-razer-phone-2-t3914996
Reboot your phone into bootloader mode (Turn off then back on while holding vol down).
Make sure your phone is recognized by Windows before proceeding. Follow this guide to setup the proper drivers and fastboot.
Flash arter97's kernel by running
Code:
fastboot flash boot arter97-kernel-*.img
If you run into any issues, then you will probably need to specify the slot to flash. Reboot back into your system.
Turn on Android Debugging and run
Code:
adb shell getprop ro.boot.slot_suffix
and make note if the output is _a or _b
Reboot back into bootloader
If _a use
Code:
fastboot flash boot_a arter97-kernel-*.img
if _b use
Code:
fastboot flash boot_b arter97-kernel-*.img
Reboot to recovery (either through bootloader mode or hold vol up while rebooting).
Install the Magisk .zip from TWRP.
Be amazed by the possibilities.
Old instructions (Should always work to get root):
Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
Extract and copy the boot.img file to your device
Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
Tap install, select Patch Boot Image File, and select the boot.img (If using the default file manager click the overflow menu and show internal storage)
Copy the patched_boot.img back over to your PC
Flash the patched_boot.img to your device via fastboot (Turn off then back on while holding vol down) and run
Code:
fastboot flash boot patched_boot.img
.
If you run into any issues, then you will need to specify the slot to flash.
Turn on Android Debugging and run
Code:
adb shell getprop ro.boot.slot_suffix
and make note if the output is _a or _b
Reboot back into bootloader
If _a use
Code:
fastboot flash boot_a patched_boot.img
if _b use
Code:
fastboot flash boot_b patched_boot.img
Reboot, and open up magisk manager to confirm everything is working. After an OTA update you may have to re-apply due to it using a different slot.
Note: the phone wasn't properly recognized by my computer when in bootloader mode so I had to install the Google adb drivers and manually set the driver used to Google Bootloader Interface (or something like that)
I found you needed to specify boot_a or boot_b specifically as the bootloader tended to mess up the suffix(it tried "bootb_b"????). So I had to first run "fastboot getvar all" to check the current slot.
I also found the commands are executed much more reliably if you enter the command first and press enter so fastboot goes into the "waiting for device" state and then boot into the bootloader and afterwards plug in the cable so fastboot executes the command as soon as it connects.
figured itd be as easy as that. this will be my first up to date device in years, att sending it to me in the mail. should get it by the 6th . but glad to see theres root! hopefully lineage to follow <3
Twiggy000b said:
figured itd be as easy as that. this will be my first up to date device in years, att sending it to me in the mail. should get it by the 6th . but glad to see theres root! hopefully lineage to follow <3
Click to expand...
Click to collapse
I know the feeling, my last device was the Nexus 5
my last "decent" device was the essential phone. then i went to the xperia xa2 ultra, then the iphone 6 then.... zte quest. -.-
CurtisMJ said:
I found you needed to specify boot_a or boot_b specifically as the bootloader tended to mess up the suffix(it tried "bootb_b"????). So I had to first run "fastboot getvar all" to check the current slot.
I also found the commands are executed much more reliably if you enter the command first and press enter so fastboot goes into the "waiting for device" state and then boot into the bootloader and afterwards plug in the cable so fastboot executes the command as soon as it connects.
Click to expand...
Click to collapse
Lol, bootb_b:laugh:. For me at least it worked fine without specifying the slot, though I may change the instructions to specify the slot
CalebQ42 said:
With the release of the factory images we can achieve root via Magisk boot image patching. Note: I am no expert at this. I used this to achieve root, but it there is no guarentee it won't brick your phone. Only do this if you know what your doing. Before you start you must have an unlocked bootloader. Here's the instructions (If you need help, feel free to post a comment):
Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
Extract and copy the boot.img file to your device
Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
Tap install, select Patch Boot Image File, and select the boot.img (If using the default file manager click the overflow menu and show internal storage)
Copy the patched_boot.img back over to your PC
Flash the patched_boot.img to your device via fastboot (Turn off then back on while holding vol down and run `fastboot flash boot patched_boot.img`.
Reboot, and open up magisk manager to confirm everything is working.
Note: the phone wasn't properly recognized by my computer so I had to install the Google adb drivers and manually set the driver to Google Bootloader interface (or something like that)
I also tried to install some Android Pie GSIs, but none of them worked.
Click to expand...
Click to collapse
Does this destroy all data? Do I need to unlock bootloader? Does it matter where I place the boot.img on my device?
CalebQ42 said:
Lol, bootb_b:laugh:. For me at least it worked fine without specifying the slot, though I may change the instructions to specify the slot
Click to expand...
Click to collapse
Interesting. The bootloader isn't exactly what I'd call a masterpiece of coding (weird cause I still maintain the ROM is excellent) so it might have just been a momentary glitch.
---------- Post added at 10:54 PM ---------- Previous post was at 10:53 PM ----------
ctakah27 said:
Does this destroy all data? Do I need to unlock bootloader? Does it matter where I place the boot.img on my device?
Click to expand...
Click to collapse
Yes, yes and not really (you get a file chooser so you just need to locate it)
I updated the post a bit with instructions on how to flash to a specific slot.
Tonight I'm going to try compiling TWRP for the first time ever (unless someone beats me to in). Wish me luck!
CalebQ42 said:
I updated the post a bit with instructions on how to flash to a specific slot.
Tonight I'm going to try compiling TWRP for the first time ever (unless someone beats me to in). Wish me luck!
Click to expand...
Click to collapse
Good luck it's a easier process compare to years ago. I would do it but I have no need for root or custom recovery. If you fail on the TWRP I will do it in time for people.
Is this working on the AT&T version of this phone? Or would you need to flash the global firmware in order for this to work? Looking to upgrade to this phone and I want to be sure I can get root. The rest looks to be coming fairly quickly.
CalebQ42 said:
I updated the post a bit with instructions on how to flash to a specific slot.
Tonight I'm going to try compiling TWRP for the first time ever (unless someone beats me to in). Wish me luck!
Click to expand...
Click to collapse
jonchance_84 said:
Is this working on the AT&T version of this phone? Or would you need to flash the global firmware in order for this to work? Looking to upgrade to this phone and I want to be sure I can get root. The rest looks to be coming fairly quickly.
Click to expand...
Click to collapse
They have the image for AT&T
EAIaIQobChMIwYzbk7j_3gIVRZRpCh0RMwdoEAEYASAAEgLPifD_BwE
Warrior1988 said:
They have the image for AT&T
EAIaIQobChMIwYzbk7j_3gIVRZRpCh0RMwdoEAEYASAAEgLPifD_BwE
Click to expand...
Click to collapse
I see the separate firmware. I'm only asking because of past shadyness from AT&T trying to tell manufacturers what to do. Years ago on my Xperia x10, if on AT&T firmware, you needed to flash the global generic firmware to get around their crap.
CalebQ42 said:
With the release of the factory images we can achieve root via Magisk boot image patching. Note: I am no expert at this. I used this to achieve root, but it there is no guarentee it won't brick your phone. Only do this if you know what your doing. Before you start you must have an unlocked bootloader, which will delete all your data. Here's the instructions (If you need help, feel free to post a comment):
Download the factory image from here: https://developer.razer.com/razer-phone-dev-tools/
Extract and copy the boot.img file to your device
Download and install Magisk Manager. If you have an SD card make sure it's installed on your internal storage, not the SD card.
Tap install, select Patch Boot Image File, and select the boot.img (If using the default file manager click the overflow menu and show internal storage)
Copy the patched_boot.img back over to your PC
Flash the patched_boot.img to your device via fastboot (Turn off then back on while holding vol down) and run
Code:
fastboot flash boot patched_boot.img
.
If you run into any issues, then you will need to specify the slot to flash.
Turn on Android Debugging and run
Code:
adb shell getprop ro.boot.slot_suffix
and make note if the output is _a or _b
Reboot back into bootloader
If _a use
Code:
fastboot flash boot_a patched_boot.img
if _b use
Code:
fastboot flash boot_b patched_boot.img
Reboot, and open up magisk manager to confirm everything is working. After an OTA update you may have to re-apply due to it using a different slot.
Note: the phone wasn't properly recognized by my computer so I had to install the Google adb drivers and manually set the driver to Google Bootloader interface (or something like that)
I also tried to install some Android Pie GSIs, but none of them worked.
Click to expand...
Click to collapse
Would this procedure be the same as far as mac/win?
I understand all of that, I am simply asking if someone has tried this with the AT&T variant yet. I want to know before I go order this phone.
I love a rooted phone, but as far as I know, if you unlock the bootloader, Netflix will no longer work in HD mode. To me, this is a deal-breaker. If anyone knows about a work-around, I'd love to know.
Razer phone 2 root
so im kinda new to rooting this type of phone and to the android boot scheme in general. i have a razer phone 2 and have attempted (febaly) to root it using this meathod. after installing the google adb drivers i was unable to see the device from my pc when it was in fastboot and unable to send commands, after installing the drivers again with windows update it ran even though no device was detected with this message
">fastboot flash boot patched_boot.img
Sending 'boot_b' (19268 KB) OKAY [ 0.523s]
Writing 'boot_b' OKAY [ 0.179s]
Finished. Total time: 0.718s"
it then blackscreened, i then tried a factory reset from recovery, and it is now in a bootloop... any advice?
update: no longer in boot loop but now is full blackscreen after a glitchy install screen
andy1011 said:
so im kinda new to rooting this type of phone and to the android boot scheme in general. i have a razer phone 2 and have attempted (febaly) to root it using this meathod. after installing the google adb drivers i was unable to see the device from my pc when it was in fastboot and unable to send commands, after installing the drivers again with windows update it ran even though no device was detected with this message
">fastboot flash boot patched_boot.img
Sending 'boot_b' (19268 KB) OKAY [ 0.523s]
Writing 'boot_b' OKAY [ 0.179s]
Finished. Total time: 0.718s"
it then blackscreened, i then tried a factory reset from recovery, and it is now in a bootloop... any advice?
update: no longer in boot loop but now is full blackscreen after a glitchy install screen
Click to expand...
Click to collapse
Since it's already wiped the easiest way to fix it is to probably flash the full factory image. Did you happen to update to the MR2 update prior to following this guide? Doing this on MR2 will soft brick. Not entirely sure in what way, but I assume it would be similar to what you experienced. If you were still on MR0 you can actually just fastboot flash the original kernel image to fix it. I just finished rooting MR2 so I'll post that next
CurtisMJ said:
Since it's already wiped the easiest way to fix it is to probably flash the full factory image. Did you happen to update to the MR2 update prior to following this guide? Doing this on MR2 will soft brick. Not entirely sure in what way, but I assume it would be similar to what you experienced. If you were still on MR0 you can actually just fastboot flash the original kernel image to fix it. I just finished rooting MR2 so I'll post that next
Click to expand...
Click to collapse
this is what im trying to do. however i have no way of flashing to the device as adb is unable to see the device.
andy1011 said:
this is what im trying to do. however i have no way of flashing to the device as adb is unable to see the device.
Click to expand...
Click to collapse
Adb and fastboot are separate things. You should only need download mode and fastboot. What are you trying to use ADB for? If in doubt, the guide on Razer's website should be quite sufficient
EDIT: You can get to download mode by holding Vol Down and Power Button while the device is off. You can force reboot by holding down power for approx 15s as well

Tutorial to Flash Lineage on Oneplus8t with magisk. Works with devices with originally locked bootloader (tmobile locked models)

READ THIS WHOLE THING BEFORE STARTING. THERE ARE SEVERAL WARNINGS.
Flash eu firmware using msmtool mod (https://www.xda-developers.com/t-mobile-oneplus-8t-rebrand-without-bootloader-unlocking/) (if msmtool doesn’t work make sure windows is in test mode with proper qualcomm drivers) (if your device bootloops and you can’t recover it just flash it again with msmtool, power it off and power it back on holding both volume up and down) Recommended to use Command Prompt commands instead of powershell (type cmd in platform-tools directory) https://developer.android.com/studio/releases/platform-tools
Unlock oem bootloader
Enable developer options (click build number several times)(make sure you’re connected to internet)
Enable oem unlocking, advanced reboot, usb debugging
Reboot to bootloader/fastboot
fastboot oem unlock
Unlock bootloader
Boot back into oos, (repeat steps I. ii. And iii.) or (boot directly into fastboot by holding volume down while
booting)
Flash boot, dtbo, and recovery (https://mirror.math.princeton.edu/pub/lineageos/full/kebab/20220818/)
fastboot flash boot (path to boot.img)
fastboot flash dtbo (path to dtbo.img)
fastboot flash recovery (path to recovery.img)
Download firmware (https://kremowka.xyz/files/8fw/)
Enter recovery mode, enter fastbootd
Advanced > enter fastboot
Follow https://wiki.lineageos.org/devices/kebab/fw_update to flash it, and without rebooting sideload
LineageOS 19.1, sideload mindthegapps, then reboot. https://wiki.lineageos.org/devices/kebab/install fits in
there somewhere
Open notepad, copy commands from lineage, save as (file name).bat, drag into powershell from file explorer
(flash ram separately for safety) I named mine “flashfirmwareforoneplus8t.bat”
Be careful with ddr4 vs 5. do not brick your phone. Ddr4x is ddr4 for these purposes.
Without rebooting, enter recovery > apply update > apply from adb (it should say version 18.1 in the top left)
adb devices (to confirm phone is connected properly and device drivers are configured properly)
adb sideload (path to lineage 19.1 .zip)
Sideload will likely get stuck at 47%. This is normal. Just wait.
Volume up to go to back arrow, advanced, reboot to recovery (make sure it says version 19.1 now)
adb sideload (path to mindthegapps .zip) note that most gapps packages will not install properly as they are
too large. Just download them all from google play store once booted.
Signature verification failed will pop up, just confirm “yes”
Reboot recovery?
adb sideload (path to copy partitions .zip)
Back > Reboot system now
It may say “can’t load android system your data may be corrupt” just factory data reset it’s fine unless you have
data you want to keep then you’ll have to google it, I don’t know how to recover that and you should’ve done
that before this step (do it in fastboot, search up adb shell pull)
If the start page has clouds and blue then good job you loaded gapps properly. If it’s not then something
happened.
OPTIONAL (if you want magisk/root)
Go into settings, enable developer options (tap build number repeatedly) make sure usb debugging is on
Search in settings for “advanced”, click “advanced restart” and enable
Hold power button, restart, recovery
Apply update > apply from adb
adb devices
adb sideload (path to magisk .apk)
Signature verification failed, install anyway
Volume up to go to back arrow, reboot system now
Boot into device, reboot, magisk should appear, click on it and click accept on whatever it prompts
Open magisk, do whatever it prompts. To install a file, drag whatever module .zip you want in, make sure file
transfer is on
DO NOT USE ACC OR ACCA (battery manager) FROM F-DROID IT SOFT BRICKED MY PHONE
What I use: Safetynet universal fix and raven.A12L (spoofs as pixel 6 pro to let safetynet work)
Install from storage
Order I did it in was safetynet then raven, rebooting between each one but I'm not sure if it matters
Install safetynetfix, then go into settings, click zygisk, click enforce denylist, click 3 dots, show system apps, click
google play services, google play store, and carrier services (the square check box next to the name, make sure
every check below when you open it as a dropdown menu is checked
Reboot phone
Now you can download whatever you want
If you install twrp, make sure you are using android 12 version and not android 11, android 11 twrp will destroy
your recovery if you try to use it on android 12.
Add on: If your phone is not detected by your pc, or is detected as “MTP” with an exclamation mark, you do not
have the right drivers. There are plenty of resources online to fix this, but one that I had trouble with was that I
was on windows 10 N instead of whatever the other version is, which doesn’t come with “mediafeaturepack.”
You need to install that on your own from https://www.microsoft.com/en-us/software
download/mediafeaturepack, or, if your device isn’t listed, go to windows application “optional features” and
add it from there.
If your computer won’t download qdloader 9008 qualcomm drivers through device manager, there are a few
things i’ve tried to fix it. Make sure you have correct drivers
from https://www.catalog.update.microsoft.com/Search.aspx?q=qualcomm hs usb 9008
“The system cannot find the file specified”
Open command prompt as administrator
Type DISM /Online /Add-Package /PackagePath:"Full path of .cab file"
I put mine in C: drive folder but I'm not sure it matters
Also I'm not sure which one of the three I downloaded from the website. Did not cause any issue downloading
and trying to install all three, let me know if you figure out which one works. Maybe you need all three, I don’t
know.
If that doesn’t work, do sfc /scannow
Open windows update, make sure all updates are applied and restart windows (make sure you go to optional
updates and select qualcomm drivers)
Fastboot won’t connect
Make sure you’re using a usb 2.0 port instead of a usb 3.0 port, and make sure your usb cable is a data cable.
Google the difference if you don’t know what it is. Download usb drivers
from https://developer.android.com/studio/run/win-usb, open device manager, see if anything is there, if it
shows something in “other devices” click on it, click update drivers, browse my computer, let me pick, have disk,
and then browse to android_winusb.inf and click update, click bootloader interface. If you get “error 10 device
won’t start” when installing bootloader interface, one possible solution is to disable driver signing.
Open command prompt as an administrator (doesn’t have to be in platform tools directory)
bcedit /set testsigning on
Reboot, try to install driver again.
If your device is bootlooping, and you enter fastboot after updating to a12 firmware AND you have magisk\
modules downloaded AND you have twrp installed, do not press the up volume button, only cycle through
options with volume down, because it may enter an option cycle and you won’t be able to do anything unless
you fastboot flash boot twrp.img.
It’s recommended that as soon as you root, you backup persist.img, which contains imei info (you don’t want
that to get destroyed) I am unsure if there’s anything else device specific you need to backup, I've heard
vendor_image may be but it’d not as important as persist.
To backup persist.img, put phone in recovery, type in command prompt or powershell
adb shell dd if=/dev/block/bootdevice/by-name/persist of=/tmp/persist.img
adb pull /tmp/persist.img persist.img
This should save persist.img to your computer. Back it up somewhere you keep important things. Also don’t
give it out at random as it contains your imei number, not sure what the consequences of that could be but
nothing good is likely to come of it.
Important shortcuts:
Power + vol up – boot into system
Power + vol down – boot into fastboot
Power + vol up + vol down – boot into edl
IF DEVICE IS BOOTLOOPING AND YOU CAN’T ENTER ANY DIFFERENT MODES, CONTINUE HOLDING POWER +
VOL DOWN IN RANDOM PATTERNS. IT HAS TAKEN ME 20 MINUTES OF RANDOM BUTTON COMBINATIONS TO
GET INTO FASTBOOT FROM A BOOTLOOP. YOU WILL ALWAYS BE ABLE TO EXIT A BOOTLOOP IF YOUR PHONE
IS PHYSICALLY UNDAMAGED.
If VoWifi doesn’t work, pixelify dialer can get it working. Probably also just any custom dialer, but I like Google
dialer. Wait for the interface to change slightly, don’t clear data until you’ve waited at least a minute or two and
closed and reopened it a few times, but if it doesn’t change after installing pixelify then force close, clear data,
and wait a minute or two, reopen, and then wait. If it continuously doesn’t change you can reflash pixelify.
Note – If using pixelify module, disable auto update for android system intelligence, it will break gboard
translate and possibly slow down device.
You can also use magisk module “mindetach” to detach com.google.android.as from play store, which will fix
any auto update bugs. Credit to vewu for showing me that
https://github.com/j-hc/mindetach-magisk
https://github.com/Pixel-Props/raven/releases
https://github.com/kdrag0n/safetynet-fix
Dm me on here if you have any questions. I am not a dev, I learned these steps from others in the community.
Shoutout pizzalovingnerd, Luk1337, raven, poang, and nvcore for helping me out a lot.
Apologies for formatting, this is copied from a word doc. Please feel free to indent and number list yourself and
send me a better version
Does the third option work?
INTseed said:
Does the third option work?
Click to expand...
Click to collapse
did you configure the denylist? try clearing cache and data for google play services, google play store, and carrier services and rebooting
Mrmcfeffers said:
READ THIS WHOLE THING BEFORE STARTING. THERE ARE SEVERAL WARNINGS.
Flash eu firmware using msmtool mod (https://www.xda-developers.com/t-mobile-oneplus-8t-rebrand-without-bootloader-unlocking/) (if msmtool doesn’t work make sure windows is in test mode with proper qualcomm drivers) (if your device bootloops and you can’t recover it just flash it again with msmtool, power it off and power it back on holding both volume up and down)
a. Unlock oem bootloader
i. Enable developer options (click build number several times)(make sure you’re connected to internet)
ii. Enable oem unlocking, advanced reboot, usb debugging
iii. Reboot to bootloader/fastboot
iv. .\fastboot oem unlock
v. Unlock bootloader
b. Boot back into oos, (repeat steps I. ii. And iii.) or (boot directly into fastboot by holding
volume down while booting)
2. Flash boot, dtbo, and recovery (https://mirror.math.princeton.edu/pub/lineageos/full/kebab/20220818/)
a. .\fastboot flash boot (path to boot.img)
b. .\fastboot flash dtbo (path to dtbo.img)
c. .\fastboot flash recovery (path to recovery.img)
3. Download firmware (https://kremowka.xyz/files/8fw/)
4. Enter recovery mode, enter fastbootd
a. Advanced > enter fastboot
5. Follow https://wiki.lineageos.org/devices/kebab/fw_update to flash it, and without rebooting sideload LineageOS 19.1, sideload mindthegapps, then reboot. https://wiki.lineageos.org/devices/kebab/install fits in there somewhere
a. Open notepad, copy commands from lineage, add .\ before each line, save as (file name).bat, drag into powershell from file explorer (flash ram separately for safety) I named mine “flashfirmwareforoneplus8t.bat”
b. Be careful with ddr4 vs 5. do not brick your phone. Ddr4x is ddr4 for these purposes.
c. Without rebooting, enter recovery > apply update > apply from adb (it should say version 18.1 in the top left)
i. .\adb devices (to confirm phone is connected properly and device drivers are configured properly)
ii. .\adb sideload (path to lineage 19.1 .zip)
Sideload will likely get stuck at 47%. This is normal. Just wait.
d. Volume up to go to back arrow, advanced, reboot to recovery (make sure it says version 19.1 now)
i. .\adb sideload (path to mindthegapps .zip) note that most gapps packages will not install properly as they are too large. Just download them all from google play store once booted.
Signature verification failed will pop up, just confirm “yes”
e. Reboot recovery?
i. .\adb sideload (path to copy partitions .zip)
6. Back > Reboot system now
a. It may say “can’t load android system your data may be corrupt” just factory data reset it’s fine unless you have data you want to keep then you’ll have to google it, I don’t know how to recover that and you should’ve done that before this step (do it in fastboot, search up adb shell pull)
7. If the start page has clouds and blue then good job you loaded gapps properly. If it’s not then something happened.
8. OPTIONAL (if you want magisk/root)
9. Go into settings, enable developer options (tap build number repeatedly) make sure usb debugging is on
a. Search in settings for “advanced”, click “advanced restart” and enable
b. Hold power button, restart, recovery
10. Apply update > apply from adb
a. .\adb devices
b. .\adb sideload (path to magisk .apk)
i. Signature verification failed, install anyway
ii. Volume up to go to back arrow, reboot system now
11. Boot into device, reboot, magisk should appear, click on it and click accept on whatever it prompts
a. Open magisk, do whatever it prompts. To install a file, drag whatever module .zip you want in, make sure file transfer is on
12. DO NOT USE ACC OR ACCA (battery manager) FROM F-DROID IT SOFT BRICKED MY PHONE
a. What I use: Safetynet universal fix, disableflagsecure (lets you screenshot netflix lol), and raven.A12L (spoofs as pixel 6 pro to let safetynet work)
i. Install from storage
ii. Order I did it in was safetynet, then raven, then flag secure rebooting between each one but I'm not sure if it matters
b. Install safetynetfix, then go into settings, click zygisk, click enforce denylist, click 3 dots, show system apps, click google play services, google play store, and carrier services (the square check box next to the name, make sure every check below when you open it as a dropdown menu is checked
c. Reboot phone
13. Now you can download whatever you want
https://github.com/Pixel-Props/raven/releases
https://github.com/kdrag0n/safetynet-fix
https://forum.xda-developers.com/t/disable-flag-secure-magisk-module-v3-0-by-mehedi-hjoy.4490475/
Dm me on here if you have any questions. I am not a dev, I learned these steps from others in the community. Shoutout pizzalovingnerd, Luk1337, raven, poang, and nvcore for helping me out a lot.
Apologies for the ****ty formatting, i copied this from a word document. I don't know how to paste the indents.
Click to expand...
Click to collapse
How can you claim this 'works on locked bootloader', when right at your ( 2) you say 'unlock bootloader'. And if your instructions require unlocked bootloader (which they surely do), then they are useless, because once your bootloader is unlocked, you can simply flash Magisk with recovery.
optimumpro said:
How can you claim this 'works on locked bootloader', when right at your ( 2) you say 'unlock bootloader'. And if your instructions require unlocked bootloader (which they surely do), then they are useless, because once your bootloader is unlocked, you can simply flash Magisk with recovery.
Click to expand...
Click to collapse
modded msm tool allows bootloader unlocking
Mrmcfeffers said:
modded msm tool allows bootloader unlocking
Click to expand...
Click to collapse
What does this have to do with your 'working on locked bootloader'? That statement is false. You can't flash anything on locked bootloader, and if you unlock bootloader, then you can simply flash Magisk via recovery without the need for your 'method'.
optimumpro said:
What does this have to do with your 'working on locked bootloader'? That statement is false. You can't flash anything on locked bootloader, and if you unlock bootloader, then you can simply flash Magisk via recovery without the need for your 'method'.
Click to expand...
Click to collapse
seems to have worked for me. i meant "working on locked bootloader" as in it include steps to unlock. it's also a guide to installing lineage, not just magisk. i'm not sure what issue you have here, it's a specific tutorial for a specific problem.
Mrmcfeffers said:
seems to have worked for me. i meant "working on locked bootloader" as in it include steps to unlock. it's also a guide to installing lineage, not just magisk. i'm not sure what issue you have here, it's a specific tutorial for a specific problem.
Click to expand...
Click to collapse
It's just a decription in thread name that is a bit misleading.
At first it appears like it can be done on locked bootloader.
And it's obviously not, as stated in your instruction point #2.
Otherwise, nice tutorial.
Mrmcfeffers said:
DO NOT USE ACC OR ACCA (battery manager) FROM F-DROID IT SOFT BRICKED MY PHONE
Click to expand...
Click to collapse
So is acc incompatible with this device? Or is this a warning only at that step in the tutorial?
jinncarry said:
So is acc incompatible with this device? Or is this a warning only at that step in the tutorial?
Click to expand...
Click to collapse
Don't use acca from f-droid. Acc from the official GitHub (https://github.com/VR-25/acc) is fine and works perfectly

Categories

Resources