Currently, all official CyanogenMod ROMs use loki tool to install the kernel on the LG G Pad 8.3 v500. Unfortunately, using loki tool causes a benign "secure boot error message" upon startup.
Here are some scripts that can be flashed in the recovery to convert a loki kernel to a bumped (permissive) kernel. The kernel will remain permissive until a new ROM or kernel is flashed again.
When making a kernel permissive, the following commands will be appended to the kernel boot command line:
Code:
androidboot.selinux=permissive selinux=0
Note: Only apply these scripts one time when setting the kernel to permissive mode or the command line above will be appended twice.
Instructions:
1) Flash ROM
2) Flash one of the scripts below, depending on what you want.
1) Convert a loki kernel to a bumped kernel
v500-loki-kernel-to-bumped-kernel-signed.zip
2) Convert a loki kernel to a bumped permissive kernel (turns off selinux)
v500-loki-kernel-to-bumped-permissive-kernel-signed.zip
3) Convert an already bumped kernel to a permissive bumped kernel (turns off selinux)
v500-bumped-kernel-to-bumped-permissive-kernel-signed.zip
Thanks to @Skin1980 for the bash bump code.
Thanks to @aicjofs for the script base.
This is amazing, thanks for your work.
This is really great, we all love what your doing for us - thanks again. I'm gonna take a stab in the dark and guess that its probably a bad idea to use the CM updater due to these having to be flashed along with an update?
annoyingduck said:
This is really great, we all love what your doing for us - thanks again. I'm gonna take a stab in the dark and guess that its probably a bad idea to use the CM updater due to these having to be flashed along with an update?
Click to expand...
Click to collapse
It's fine to use the cm updater, but you will have to reboot into the recovery twice to apply the patch. Also, if you want your Bluetooth pairings to remain intact, then you want to keep the kernel in permissive mode and never let it boot with selinux enabled (at least until the selinux denials are fixed).
@annoyingduck
You can let cm updater download and verify the update and then hit cancel when it asks to install it. Then manually reboot to recovery and install from the cm updater download directory.
Amazing job @Deltadroid! I applied the first patch, rebooted and the warning message was gone!
Thank you very much for your outstanding work!
[]'s
So... This just removes the warning message when booting?
jesuita said:
So... This just removes the warning message when booting?
Click to expand...
Click to collapse
Yes
jesuita said:
So... This just removes the warning message when booting?
Click to expand...
Click to collapse
That is the only visible effect. It provides a cleaner way of mounting the boot.img
Ok thanks
Works fine with last Infected build.
I assume we have to flash this script after each update.
ledabe974 said:
Works fine with last Infected build.
I assume we have to flash this script after each update.
Click to expand...
Click to collapse
Yes, after each rom or kernel you flash.
Yay! thanks to the permissive script, SuperSU works on CM13! =)
nytral said:
Yay! thanks to the permissive script, SuperSU works on CM13! =)
Click to expand...
Click to collapse
That is good to hear.
The reason systemless supersu does not work with our device is because it breaks the signature on our bumped boot image.
If you choose option #1 on the op after flashing supersu, you should be able to keep selinux in enforcing mode and just rebump the boot image to fix the signature that supersu breaks.
Edit: you will need to dirty flash the rom again to put the device back into enforcing mode.. Then flash supersu and finally the script to bump the boot image over again.
Deltadroid said:
That is good to hear.
The reason systemless supersu does not work with our device is because it breaks the signature on our bumped boot image.
If you choose option #1 on the op after flashing supersu, you should be able to keep selinux in enforcing mode and just rebump the boot image to fix the signature that supersu breaks.
Edit: you will need to dirty flash the rom again to put the device back into enforcing mode.. Then flash supersu and finally the script to bump the boot image over again.
Click to expand...
Click to collapse
Well, that's what I thought and what I did first, but actually latest beta SuperSU (2.68) is not breaking the boot sig for some reason (no bootloader error as with previous builds). Looking at logcat during the stuck boot I noticed some zygote process failing because of selinux and that's when I decided to try to disable it -> success! Now a cleaner way would probably be to give the logs to @Chainfire so he can have a look but given the non-popularity of V500 he probably won't care/not be able to fix it without one. Oh well, at least I have something working although not as secure as it should be. So thank you for this :good:
Thank you for this great job!!! I was stuck on the LG logo with the know loki message... I though that my v500 was bricked for good.
I used the first file after cleaning everything in twrp 3.0.0 (not usb and external) and installing a)6.0 mmb29v, b) su v2.65 and c) your 1st file.
2 questions. 1) whenever I flash and update should I flash it through twrp with the above mentioned order? 2) Should I flash other version (older like 2..8.7.x) and philz zip?
Thank you again for your great job!!!
glyrakos said:
Thank you for this great job!!! I was stuck on the LG logo with the know loki message... I though that my v500 was bricked for good.
I used the first file after cleaning everything in twrp 3.0.0 (not usb and external) and installing a)6.0 mmb29v, b) su v2.65 and c) your 1st file.
2 questions. 1) whenever I flash and update should I flash it through twrp with the above mentioned order? 2) Should I flash other version (older like 2..8.7.x) and philz zip?
Thank you again for your great job!!!
Click to expand...
Click to collapse
You did it correctly. Every time you flash SuperSU over again, you will need to flash this script directly after that to bump the kernel over again and fix the boot signature. Any recovery should work, but I recommend using the latest official TWRP.
Deltadroid said:
You did it correctly. Every time you flash SuperSU over again, you will need to flash this script directly after that to bump the kernel over again and fix the boot signature. Any recovery should work, but I recommend using the latest official TWRP.
Click to expand...
Click to collapse
Sorry, but as a nobbie let me ask you something more. Do you have a link for the latest official TWRP. How to flash it? Through TWRP 3.0.0 that I have now, or through sideload? Also I cannot enter TWRP with the combination of the 3 buttons. I get Factory Reset menu.
Thank you.
glyrakos said:
Sorry, but as a nobbie let me ask you something more. Do you have a link for the latest official TWRP. How to flash it? Through TWRP 3.0.0 that I have now, or through sideload? Also I cannot enter TWRP with the combination of the 3 buttons. I get Factory Reset menu.
Thank you.
Click to expand...
Click to collapse
The official TWRP for device is here
http://forum.xda-developers.com/showthread.php?p=61363260
You can flash the new recovery image from within TWRP.
When you use the 3 buttons to get to recovery, it asks to factory reset, but it goes to TWRP instead. It is a hack because our recoveries were never actually unlocked. Just say, yes and TWRP will open.
Deltadroid said:
The official TWRP for device is here
http://forum.xda-developers.com/showthread.php?p=61363260
You can flash the new recovery image from within TWRP.
When you use the 3 buttons to get to recovery, it asks to factory reset, but it goes to TWRP instead. It is a hack because our recoveries were never actually unlocked. Just say, yes and TWRP will open.
Click to expand...
Click to collapse
Maybe I am not doing something good but when using the 3 button method it goes to factory reset and stays there endless if I do not press something .... but power whipes everything (i've re-setup my v500 for about 15 times already....) ... and volume up/down exits the menu and reboots......
Related
If any questions or need some open discussion regarding the rom feel free to ask.
Q: Is this ROM really S-OFF only? No option for S-On phones?
Click to expand...
Click to collapse
If flashing the aroma build, say no to reboot in aroma. If using twrp and reboot to bootloader manually. The installer forces s on ph98img creation.
You also have the option of using flashify to flash the boot.IMG prior and then reboot to recovery to finish flash. The installer will detect you as s off.
Is this ROM really S-OFF only? No option for S-On phones?
If not I guess I'll go learn how to S-OFF my phone.
Also TWRP is not a supported recovery? The only recovery that works is Philz?
Most recoveries should work fine. S-on flashing process is to extract the boot.IMG from the ROM.zip, flash the ROM.zip, reboot to fastboot, plug into computer, then "fastboot flash boot.img"
signupstuffid said:
Is this ROM really S-OFF only? No option for S-On phones?
If not I guess I'll go learn how to S-OFF my phone.
Also TWRP is not a supported recovery? The only recovery that works is Philz?
Click to expand...
Click to collapse
If using twrp, say no to reboot in aroma and reboot to bootloader. The installer forces s on ph98img creation.
And no, I've done quite a bit of updates and this works with all the custom recoveries available. You also have the option of using flashify to flash the boot.IMG prior and then reboot to recovery to finish flash. The installer will detect you as s off.
Snuzzo said:
If using twrp, say no to reboot in aroma and reboot to bootloader. The installer forces s on ph98img creation.
And no, I've done quite a bit of updates and this works with all the custom recoveries available. You also have the option of using flashify to flash the boot.IMG prior and then reboot to recovery to finish flash. The installer will detect you as s off.
Click to expand...
Click to collapse
Cool, Thanks for the tips.
Flashify is usually what I use, unless I forget then I just fastboot flash the boot.img.
One last question, does this ROM have the camcorder bug where you can only take about 3 videos before it requires a reboot to take more?
signupstuffid said:
Cool, Thanks for the tips.
Flashify is usually what I use, unless I forget then I just fastboot flash the boot.img.
One last question, does this ROM have the camcorder bug where you can only take about 3 videos before it requires a reboot to take more?
Click to expand...
Click to collapse
Yes. Its a device wide bug. It either records 3, 6, or none at all. Please if none, let me know, I only test for boot since this is no longer my daily device.
Yw on the few tips.
i made a mistake ....help
i think that i made a mistake. i installed from recovery => install from sc card a zip, directly. for the first zip: Plain-Andy-4.4.4-20141001-vigor-EXPERIMENTAL ...... after gapps-ds-ERE36B-signed
result; no gsm service (no signal)
second zip: Release-v14.2-vigor ................ the phone dont start to android systeme after booting => many msg of errors
if someone can save me from this probleme.....please
thankkkks
I'll have to get you some good gapps for 14.2
CamCorder and Camera no works
Hi ,
I have installed yesterday Plain-Andy, that's it's great job, so smooth and so fast
I like it.
The only problem is camera and camcorder doesn't work
how can I fix this
Thanks for answer
NilkNarf80 said:
Hi ,
I have installed yesterday Plain-Andy, that's it's great job, so smooth and so fast
I like it.
The only problem is camera and camcorder doesn't work
how can I fix this
Thanks for answer
Click to expand...
Click to collapse
The ROM will need rebuilt but unfortunately I no longer have the ROM source available locally.
This thread was originally for Pixel-specific rooting instructions, but by now the SuperSU ZIP and TWRP are fully supported:
- Fastboot boot TWRP
- Install latest SuperSU ZIP (v2.79-SR3 at the time of writing)
Note that at this time I recommend against fastboot flashing TWRP. With the Pixel's new partition layout, the recovery files are inside the boot partition, and so is SuperSU. If you flash both, SuperSU's internal boot image backup will not be of the original boot image, but of TWRP. This means that neither the 'full unroot' option in SuperSU, nor incremental OTA update through FlashFire, will work as expected.
OR
- Use CF-Auto-Root for Pixel (not released at the time of writing, but should be released soon)
Nice work!
Hell Yeah!!! Thanks @Chainfire, your time as well as others that have made this and the bootloader unlock happen is appreciated very much.
Sent from my Pixel XL using Tapatalk
can we flash another kernel such as elementalX on top of this?
diabl0w said:
can we flash another kernel such as elementalX on top of this?
Click to expand...
Click to collapse
How does this relate?
Ker~Man said:
How does this relate?
Click to expand...
Click to collapse
because I attempted to not really thinking about that its systemless and wasnt sure if root would persist. after attempting to flash boot elementalX's kernel my device just powered off so i immediately reflashed root and all is okay now
diabl0w said:
can we flash another kernel such as elementalX on top of this?
Click to expand...
Click to collapse
Lol if you read chainfires instructions you would have e your answer,but it short no, not until they add it
I did read the readme.. so not sure what your getting at
cwalker0906 said:
Lol if you read chainfires instructions you would have e your answer,but it short no, not until they add it
Click to expand...
Click to collapse
chainfire said:
- If you want to use a custom kernel, simply 'fastboot boot' the root image again after flashing the custom kernel. This has been tested with a few custom kernels and found to work well so far.
Click to expand...
Click to collapse
It was a valid question since this flashing method is different than what we are used to due to the difference in partitions and the file system.
lexcyn said:
It was a valid question since this flashing method is different than what we are used to due to the difference in partitions and the file system.
Click to expand...
Click to collapse
okay thanks, so i guess the answer is actually yes
Thanks @Chainfire - booted and working well!
thanks..emoji..root explorer.. viper.. naptime.. titanium.. yes..
if new kernel must boot boot to root again..
Seems I cannot remount /system_root as rw (to copy Emoji font over).
marlin://system_root/system/fonts # mount -o remount,rw /system_root
mount: '/dev/block/bootdevice/by-name/system_a'->'/system_root': Device or resource busy
Edit: Nevermind, used Solid Explorer and granted it SuperUser and seemed to work. Strange.
Does anyone have the stock boot.img for the pixel xl? I don't have the data to download the full factory image.
Life is good!
Thanks to all involved, especially Chainfire.
You Rock!
Worked like a charm. Thanks @Chainfire!
Can't thank you enough. Works perfectly.
can someonone please post the exact steps they are using?
I just unlocked my bootloader. then tried flashing the root-boot img file, it did the reboots, but when i complete android setup, theres no SuperSU and if i install the .apk, it still does not detect root...
just reflashed stock boot.img, locked and unlocked bootloader. waiting for instrustion.
thanks!
spunks3 said:
can someonone please post the exact steps they are using?
I just unlocked my bootloader. then tried flashing the root-boot img file, it did the reboots, but when i complete android setup, theres no SuperSU and if i install the .apk, it still does not detect root...
just reflashed stock boot.img, locked and unlocked bootloader. waiting for instrustion.
thanks!
Click to expand...
Click to collapse
fastboot boot boot-to-root.img
lexcyn said:
fastboot boot boot-to-root.img
Click to expand...
Click to collapse
what about superSU?
Samsung Galaxy S8 Active (Snapdragon)
PLEASE READ READ READENTIRE OP
"ALL MAJOR WORK DONE BY HASHCODE SO GO GIVE HIM SOM THANKS.DO NOT POST ANY BUG OR ISSUE COUSED BY THIS RECOVERY IN ORIGINAL THREAD BY HASHCODE, POST HERE AND I WILL HELP YOU."
CURRENT PROJECT STATUS:
BETA v4.11-B01 [Nougat:7.0]
WHAT IS SAFESTRAP?
Safestrap is a Bootstrap / Recovery for locked bootloader phones. The goal is to avoid touching your primary system (I'll call this "stock" system) and only flash or make large changes to another place on your phone that Safestrap treats as a "2nd system" (in this case, it's a series of virtual ROM slots located on the internal emmc area: "/sdcard"). Once installed, you will see a "Splashscreen" giving you the option to hit "menu" to enter recovery. The recovery portion of Safestrap is now based on TWRP 3.3.0 (a touch based recovery) and you can perform .zip installs, backups and restores here. The additional features I've added to TWRP are mostly located under the "Boot Options" menu:
Here you can create virtual ROM-slots for flashing ROMs. NOTE: The bigger you make the /data partition the less room you will have to make other ROM-slots.
You can activate a new ROM-slot by choosing the slot you wish to make active and then selecting the "Activate" button. Once active, you will see the "rom-slot#" up in the top of the screen shown in green. If you make the "stock" ROM active, then you can see it in the top shown in red.
Once a ROM-slot is active, all actions you would normally perform using TWRP are directed to that ROM-slot. For example, "Install" to flash a .zip, backup and restore.
HOW DO I INSTALL SAFESTRAP?
Requirement: Root
APK install:
Once installed, open up the Safestrap application, Agree to the disclaimer that you won't try to sue me and hunt me down with a rifle if you manage to break your phone..
Then use the "Install Recovery" button. You should see the current version down in the lower left corner of the window. And the "Status:" should say "Installed" when you're done.
From there you can reboot and you *should* see a new splash screen during the boot up. While this is showing you can enter Safestrap Recovery using the [ menu ] button.
Flashable zip:
Flash using Safestrap recovery or FlashFire.
HOW DO I ENTER RECOVERY?
During each reboot a splashscreen will be displayed showing whether the device is running a rom-slot or on the "Stock ROM".
Press the button shown on the screen to either enter "RECOVERY" or "CONTINUE" booting (or the hard button underneath each option).
HOW DO I UPGRADE SAFESTRAP?
APK:
Push the APK up to your sdcard.
Boot back into the "stock" rom-slot.
Open your old Safestrap app and use the "Uninstall Recovery" button
Browse to where you pushed the APK
Click on it and install like normal
Once installed, open the APK, Grant SU access, Use the "Install Recovery" button.
Flashable zip:
Flash using Safestrap recovery or FlashFire.
KNOWN ISSUES:
- Sometimes the installation doesn't work correctly. If you don't see the splashscreen after a rebooting. Install Safestrap again.
DOWNLOADS:
CONFIRM THAT YOU ARE USING A SAMSUNG GALAXY S8 Active G892U (Snapdragon) [Nougat:7.0]
LATEST ZIP: Safestrap-4.11-B01-CRUISERLTE-SS-FF-flashable.zip
LATEST APK: Safestrap-4.09-B01-CRUISERLTE.apk
androidfilehost
CONFIRM THAT YOU ARE USING A SAMSUNG GALAXY S8 Active G892A (Snapdragon) [Nougat:7.0]
LATEST ZIP: Safestrap-4.11-B01-CRUISERLTEATT-SS-FF-flashable.zip
LATEST APK: None
androidfilehost
WARNING: Safestrap is heavily modified to be "Safe" for your device. Do not download TWRP from their website and expect it to work the same way. Also TWRP does not support Safestrap, tho some issues that may come up will be TWRP dependant, please try and contact myself or look on the forums for your device for answers before hunting down TWRP people. They won't be able to help w/ Safestrap specific questions.
Special Thanks To
@Hashcode, DeesTroy & TeamWin for all their hard work making TWRP such a fantastic recovery.
@jrkruse for pointing me that S8 has permissive root. @partcyborg for getting root on S8.
CHANGELOG:
4.11-B01 [2019-04-19]
- TWRP updated to 3.3.1.
- Add proper G892A device support.
- Clean up hijack.
- Fix datamedia mount.
- Enhanced Safestrap logo.
- More stuff I forgot, lol
4.09-B01 [2019-04-19]
- TWRP updated to 3.3.0.
- Fix reboot function
- Add reboot to safestrap button in reboot menu
- Add Edl button in reboot menu
- Move Boot Options to advanced menu items.
- Safestrap app: Update topjohnwu's libsu to 2.4.0.
- Safestrap app: Update install recovery function.
4.08-B01 [2019-03-01]
- TWRP updated to 3.2.3.
- Fix datamedia mount.
- Add hijack-backup during image flashing.
- Major code clean up
- Initial release.
BUGS:
- ROM-slots not working for now.
Great job. I will try to flash stock oreo and this safestrap via this safestrap. So i review to keep it on stock oreo.
After test, it works fine. But I can't keep it with stock oreo.
Can you enable adbd insecure on twrp? Thanks.
quanqw said:
Can you enable adbd insecure on twrp? Thanks.
Click to expand...
Click to collapse
Not sure.
does it work on s8 sc-02j docomo it just say safestrap is disabled recovery and continue but when i choose recovery its still TWRP
epiphany74721 said:
does it work on s8 sc-02j docomo it just say safestrap is disabled recovery and continue but when i choose recovery its still TWRP
Click to expand...
Click to collapse
That's normal click recovery to go-to safestrap. Bte this is supposed to be for US variants kinda lucky you didn't brick as the model it's for is listed in the title
epiphany74721 said:
does it work on s8 sc-02j docomo it just say safestrap is disabled recovery and continue but when i choose recovery its still TWRP
Click to expand...
Click to collapse
You device is unlocked right? why you need safestrap?
afaneh92 said:
You device is unlocked right? why you need safestrap?
Click to expand...
Click to collapse
i got data mount issue on twrp cant install rom i want to replace it with safestrap recovery
epiphany74721 said:
i got data mount issue on twrp cant install rom i want to replace it with safestrap recovery
Click to expand...
Click to collapse
Type this in terminal or in twrp terminal then copy output or take screen shot.
"ls -al /dev/block/platform/soc/1da4000.ufshc/by-name"
I will make twrp for you.
afaneh92 said:
Type this in terminal or in twrp terminal then copy output or take screen shot.
"ls -al /dev/block/platform/soc/1da4000.ufshc/by-name"
I will make twrp for you.
Click to expand...
Click to collapse
here sorry for the late reply a little busy ang my imei is corrupted also cant install s8 docomo 8.0 all corrupted in samfirm wont install oreo also
epiphany74721 said:
here sorry for the late reply a little busy ang my imei is corrupted also cant install s8 docomo 8.0 all corrupted in samfirm wont install oreo also
Click to expand...
Click to collapse
First safestrap not working on oreo/pie without permissive kernel. Try this
https://www.google.com/amp/s/forum....rnel-permissive-patcher-android-t3506338/amp/
I will make you twrp soon. Will pm you when its ready.
Edit: no need to build new twrp for your device, data encrypted on oreo/pie.
After booting in TWRP download and flash no-verity-opt-encrypt-6.0 zip to disable data partition encryption
afaneh92 said:
First safestrap not working on oreo/pie without permissive kernel. Try this
https://www.google.com/amp/s/forum....rnel-permissive-patcher-android-t3506338/amp/
I will make you twrp soon. Will pm you when its ready.
Edit: no need to build new twrp for your device, data encrypted on oreo/pie.
After booting in TWRP download and flash no-verity-opt-encrypt-6.0 zip to disable data partition encryption
Click to expand...
Click to collapse
I switched to s8 dual g9500. It has twrp from @jesen but it has an issue. Can you fix it?
https://forum.xda-developers.com/ga...ecovery-twrp-galaxy-s8-s8-snapdragon-t3636718
quanqw said:
I switched to s8 dual g9500. It has twrp from @jesen but it has an issue. Can you fix it?
https://forum.xda-developers.com/ga...ecovery-twrp-galaxy-s8-s8-snapdragon-t3636718
Click to expand...
Click to collapse
You should ask in that thread
4.09-B01 is up
- TWRP updated to 3.3.0.
- Fix reboot function.
- Add reboot to safestrap button in reboot menu.
- Add Edl button in reboot menu.
- Move Boot Options to advanced menu items.
- Safestrap app: Update topjohnwu's libsu to 2.4.0.
- Safestrap app: Update install recovery function.
Damn, needs root. I misread the post at first so ignore my previous question.
Hi,
I just installed this on my g892a, however it fails to mount /data. It looks like it's trying to mount /dev/block/sda24, however, on my phone it's actually /dev/block/sda23:
I tried changing the partition in /etc/safestrap/ss.config but that didn't do anything
Is there anything I can do to get it to mount, or do you need to recompile twrp?
Thanks!
cd109876 said:
Hi,
I just installed this on my g892a, however it fails to mount /data. It looks like it's trying to mount /dev/block/sda24, however, on my phone it's actually /dev/block/sda23:
I tried changing the partition in /etc/safestrap/ss.config but that didn't do anything
Is there anything I can do to get it to mount, or do you need to recompile twrp?
Thanks!
Click to expand...
Click to collapse
You need to edit twrp.fstab and ss.config in twrp recovery too.
I will try to add support for G892A in the next build.
afaneh92 said:
You need to edit twrp.fstab and ss.config in twrp recovery too.
I will try to add support for G892A in the next build.
Click to expand...
Click to collapse
Alright, I haven't built twrp / safestrap before so I'm having some trouble figuring it out, but I don't want to bug you with that. I do have a question though - when i get this working, could i flash a rom (to the stock rom slot) like a stock oreo rom with the same bootloader revision and keep safestrap installed? And then if I wanted to I could restore the backup of the nougat rooted rom? It looks like it can be done with the regular s8, but I'm confused as to whether it would work here or what I would need to do.
cd109876 said:
Alright, I haven't built twrp / safestrap before so I'm having some trouble figuring it out, but I don't want to bug you with that. I do have a question though - when i get this working, could i flash a rom (to the stock rom slot) like a stock oreo rom with the same bootloader revision and keep safestrap installed? And then if I wanted to I could restore the backup of the nougat rooted rom? It looks like it can be done with the regular s8, but I'm confused as to whether it would work here or what I would need to do.
Click to expand...
Click to collapse
Rom slot is broken on arm64 devices.
You can use stock slot only.
Last updated May 2020
Keeping it short. This is a simple way to root your device. You will need a computer and a data cable for this.
Objectives :
Have root using Magisk
Be able to install OTA from the settings without bootloops
Avoid boot loop
Very important :
This will work with ANY Xiaomi phone, and should work with ANY ANDROID phone as well. The difference between phones would be in where you can get your boot image from.
Your phone has to have an unlocked bootloader
Your phone has to have stock recovery. TWRP WILL cause bootloop for root and/or OTA updates from system.
I like to have root with magisk and don't want to install TWRP because I want to be able to install OTA from system without boot loops. This guide will help you achieve this with ease.
Steps:
Download the ROM full zip file. This could be the ROM ALREADY installed on your phone or you are updating your phone to it. Here is a video of one way to get your ROM file.
https://youtu.be/KsxHial1v1U
Open the file and extract "boot.img" on your phone or Computer.
Move the boot.img file to your phone
Download and install the latest Magisk official manager app from here: https://github.com/topjohnwu/Magisk/releases/download/manager-v7.4.0/MagiskManager-v7.4.0.apk
Open Magisk manager and click install then "select and patch a file" like in this video
https://youtu.be/USHcCMYlexM
Copy the Patched image from the download folder to your computer adb/fastboot folder
Reboot your phone into fastboot (press and hold power and vol down) and connect it to the computer
Flash that patches image file using fastboot
fastboot flash boot magisk_patched.img
Click to expand...
Click to collapse
fastboot reboot
Click to expand...
Click to collapse
Open Magisk manager and complete the installation if needed. The app will prompt you for action.
Enjoy
Update May 2020
Hello again,
Sorry for being away for so long. Here are some of the things I have noticed people are confused with and need to make them clear:
This method works for ANY Android phone. As long as you have the Correct boot.img and can unlock the bootloader
MAKE SURE 100% you have the correct boot.img file for your CURRENT ROM
MAKE 100% SURE, the boot.img file you get from the FULL ROM zip file, not an OTA update zip file
Make sure you check the date and time of the "magisk_patched.img" file to make sure that is the one you made
Make sure you use the LATEST magisk manager
Make sure you open magisk after flashing the magisk_patched.img as boot image. Magisk manager will tell you if there is another step needed, just click yes and it will be done in seconds
Make sure to enable "Hide Magisk" to allow you to have your BANK apps working as well as security checks
If any app you use gives you an error "YOU ARE Rooted bla bla bla" Use magisk manager to hide the root for this specific app (in the settings)
That's all I can remember, good luck
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Kiwironic said:
Keeping it short. This is a simple way to root your device. You will need a computer and a data cable for this.
Steps:
Download the ROM full zip file. This could be the ROM ALREADY installed on your phone or you are updating your phone to it. Here is a video of one way to get your ROM file.
Open the file and extract "boot.img" on your phone or Computer.
Move the boot.img file to your phone
Download and install the latest Magisk official manager app from here: https://github.com/topjohnwu/Magisk/releases/download/manager-v7.4.0/MagiskManager-v7.4.0.apk
Open Magisk manager and click install then "select and patch a file" like in this video
Copy the Patched image from the download folder to your computer adb/fastboot folder
Reboot your phone into fastboot (press and hold power and vol down) and connect it to the computer
Flash that patches image file using fastboot
Open Magisk manager and complete the installation if needed. The app will prompt you for action.
Enjoy
Click to expand...
Click to collapse
After fastboot flash, reboot, open magisk manager, tap INSTALL beside "magisk is up to date". Then select direct install; reboot.
Works on MIUI 11.0.2; davinciin. ??
I know that when I unlock the bootloader,the phone is going to reset...but,is it going to happen immediately or after that 168 hours of waiting?
Sent from my Xiaomi Mi 9T using XDA Labs
welder73 said:
I know that when I unlock the bootloader,the phone is going to reset...but,is it going to happen immediately or after that 168 hours of waiting?
Sent from my Xiaomi Mi 9T using XDA Labs
Click to expand...
Click to collapse
People report different amounts of wait time, depends on the mi account I think
welder73 said:
I know that when I unlock the bootloader,the phone is going to reset...but,is it going to happen immediately or after that 168 hours of waiting?
Sent from my Xiaomi Mi 9T using XDA Labs
Click to expand...
Click to collapse
Phone is reset when the bootloader is unlocked, not before/during the waiting time.
Can do with locked bootloader?
Micdu70 said:
Phone is reset when the bootloader is unlocked, not before/during the waiting time.
Click to expand...
Click to collapse
Thank you man :good:
Sent from my Xiaomi Mi 9T using XDA Labs
Cabeção-Flu said:
Can do with locked bootloader?
Click to expand...
Click to collapse
No, bootloader has to be unlocked.
@Kiwironic followed your guide and worked very well, although I had to wipe data through the stock recovery to get the phone to boot, I believe that's just how newer Xiaomi phones work. I do have one question though, now that I'm rooted with stock recovery, would I be able to install OTA updates? I'm assuming I would of course lose root and have to redo the process from scratch if that's the case.
Lazer Bear said:
@Kiwironic followed your guide and worked very well, although I had to wipe data through the stock recovery to get the phone to boot, I believe that's just how newer Xiaomi phones work. I do have one question though, now that I'm rooted with stock recovery, would I be able to install OTA updates? I'm assuming I would of course lose root and have to redo the process from scratch if that's the case.
Click to expand...
Click to collapse
I had root on MIUI10 and updated the ROM to MIUI11 then did my root again the way mentioned and did NOT have to wipe. You can get OTA anyway, it will try the update first, it will fail, then it download and install a full ROM zip automatically. You have to wait for it to do that twice, that's all. The first boot after the update takes some time.
@Kiwironic First, thank you so your simple guide!
Can this cause bootloop on my device? If yes, can I simply flash the original boot.img to boot without any data loss?
Also another question: my device is rootless and bootloader unlocked, so my Google Pay doesn't work. When installing Magisk it goes back to work immediately or I have to do something to work?
kryzeK said:
@Kiwironic First, thank you so your simple guide!
Can this cause bootloop on my device? If yes, can I simply flash the original boot.img to boot without any data loss?
Also another question: my device is rootless and bootloader unlocked, so my Google Pay doesn't work. When installing Magisk it goes back to work immediately or I have to do something to work?
Click to expand...
Click to collapse
If you flash the full rom, chances of bootloop is minimal. And should have stock experience except for being unlocked.
I got bootloop, using indian global V11.0.2.0.
After flashing patched boot, it gets bootloop recovery, only way is to wipe all data and reboot
After booting up and opeing magisk it shows a recommendation to install some ZIP
Accepting the recommendation results in bootloop,
Rejecting the recommendation and trying to Install > Direct Install results in bootloop as well
Posted a thread with this issue here
stone_henge said:
I got bootloop, using indian global V11.0.2.0.
After flashing patched boot, it gets bootloop recovery, only way is to wipe all data and reboot
After booting up and opeing magisk it shows a recommendation to install some ZIP
Accepting the recommendation results in bootloop,
Rejecting the recommendation and trying to Install > Direct Install results in bootloop as well
Posted a thread with this issue here
Click to expand...
Click to collapse
This
I got the exact same issue, every time it asked me to install additional zip files it went into recovery immediately after booting up.
Anyone know why this happened?
oblyvision said:
This
I got the exact same issue, every time it asked me to install additional zip files it went into recovery immediately after booting up.
Anyone know why this happened?
Click to expand...
Click to collapse
Do you have stock recovery or TWRP? Which version of Magisk are you using?
I have patched my boot stock image, installed full ROM, then flashed the patched boot image. Magisk did not show any recommendation installation.
There are a few guides online on how to deal with Magisk Bootloop without the need to wipe data.
Kiwironic said:
Do you have stock recovery or TWRP? Which version of Magisk are you using?
I have patched my boot stock image, installed full ROM, then flashed the patched boot image. Magisk did not show any recommendation installation.
There are a few guides online on how to deal with Magisk Bootloop without the need to wipe data.
Click to expand...
Click to collapse
TWRP 3.3.1-8, magisk 20.1
Patching boot image with magisk wasn't a problem. The Superuser itself works normally, module doesn't. The magisk manager suggested to download additional files for the magisk to be working properly.
I'm on MIUI 11.0.1 Global
Was TWRP the cause in the fist place?
oblyvision said:
TWRP 3.3.1-8, magisk 20.1
Patching boot image with magisk wasn't a problem. The Superuser itself works normally, module doesn't. The magisk manager suggested to download additional files for the magisk to be working properly.
I'm on MIUI 11.0.1 Global
Was TWRP the cause in the fist place?
Click to expand...
Click to collapse
On first installation MM asks to download what it needs e.g. to verify SafetyNet. Allow and there is no problem about. TWRP is generally not needed to install Magisk. Things are documented in Magisk guides
https://topjohnwu.github.io/Magisk/
https://www.didgeridoohan.com/magisk/HomePage
oblyvision said:
TWRP 3.3.1-8, magisk 20.1
Patching boot image with magisk wasn't a problem. The Superuser itself works normally, module doesn't. The magisk manager suggested to download additional files for the magisk to be working properly.
I'm on MIUI 11.0.1 Global
Was TWRP the cause in the fist place?
Click to expand...
Click to collapse
Yes, as the title suggests "without TWRP". The reason is, you cannot install OTA and magisk easily without using the stock recovery. Any attempt to update OTA or use any recovery script on the phone will result in a boot loop.
The solution to get out of the boot loop is simple. Actually a couple of solutions.
One, flash your stock recovery, or
Two, flash a full ROM that includes the stock recovery.
No need to wipe data
That's the only reason I made this post and the other about OTA on root. I don't like to use TWRP because I want OTA install without boot loop. At the same time I want root. Hence the solutions I provided
Kiwironic said:
Yes, as the title suggests "without TWRP". The reason is, you cannot install OTA and magisk easily without using the stock recovery. Any attempt to update OTA or use any recovery script on the phone will result in a boot loop.
The solution to get out of the boot loop is simple. Actually a couple of solutions.
One, flash your stock recovery, or
Two, flash a full ROM that includes the stock recovery.
No need to wipe data
That's the only reason I made this post and the other about OTA on root. I don't like to use TWRP because I want OTA install without boot loop. At the same time I want root. Hence the solutions I provided
Click to expand...
Click to collapse
I've tried flashing magisk via recovery and didn't work, the same bootloop. Here's the thread: https://forum.xda-developers.com/mi-9t/how-to/guide-miui-11-v11-0-1-0-pfjmixm-rooted-t3997299
I thought this might be a working alternative.
Gotta try installing magisk with stock recovery then, and if it still didn't work, well, more research for me..
oblyvision said:
I've tried flashing magisk via recovery and didn't work, the same bootloop. Here's the thread: https://forum.xda-developers.com/mi-9t/how-to/guide-miui-11-v11-0-1-0-pfjmixm-rooted-t3997299
I thought this might be a working alternative.
Gotta try installing magisk with stock recovery then, and if it still didn't work, well, more research for me..
Click to expand...
Click to collapse
You have to understand the requirements :
- stock recovery
- install magisk manager app
- patch the boot image for your stock ROM (same version on your phone)
- flash that Patched boot image.
- reboot
- done, that's magisk installed
Official TWRP is now available: https://twrp.me/asus/zenfone9.html
IMPORTANT NOTES:
CleanSlate custom kernel is not currently compatible with TWRP for this device (Kirisakura is compatible as of v2.0.6).
This device has a recovery partition (2, in fact), and fastboot boot is disabled in the bootloader. Flashing TWRP to the recovery partition is the only way to use it.
If you attempt to fastboot boot the TWRP image, your device may end up unbootable. YOU'VE BEEN WARNED.
Any questions, comments, feedback, or concerns should always be accompanied by logs (recovery log, logcat, dmesg)
TWRP Trees
Common: https://github.com/TeamWin/android_device_asus_sm84xx-common
Device: https://github.com/TeamWin/android_device_asus_AI2202
Thanks for your work!
Installed as on twrp.me described wont boot (https://twrp.me/asus/zenfone9.html)
Had to flash stock recovery again.
Rooted device on 32.2050.2050.29 with kirisakura-kernel.
Any idea what im doing wrong?
Hermann2306 said:
Thanks for your work!
Installed as on twrp.me described wont boot (https://twrp.me/asus/zenfone9.html)
Had to flash stock recovery again.
Rooted device on 32.2050.2050.29 with kirisakura-kernel.
Any idea what im doing wrong?
Click to expand...
Click to collapse
If you're not on stock kernel, then that's probably the problem. I know the custom kernel situation is different on this device than previous ones. This may be something that @Freak07 & I have to look into together. In the meantime, can you restore back to stock kernel and confirm that TWRP works, and then install Kirisakura and see if everything still works?
Restored stock kernel with kernelflasher but now it wont boot. Tried to change the slot to a but isnt allowed in fastboot.
Have to find out now how to change the slot or install stock kernel via fastboot...
Hermann2306 said:
Restored stock kernel with kernelflasher but now it wont boot. Tried to change the slot to a but isnt allowed in fastboot.
Have to find out now how to change the slot or install stock kernel via fastboot...
Click to expand...
Click to collapse
It doesn't sound like you followed the procedure in the Kirisakura thread FAQ to fully return to stock. Can you confirm exactly what you did?
just restored the backup i made with kernelflasher befor i installed the custom kernel and rebooted.
Hermann2306 said:
just restored the backup i made with kernelflasher befor i installed the custom kernel and rebooted.
Click to expand...
Click to collapse
I'm not familiar with that app, sorry. I just know that's not the process mentioned in his thread, so until you do that, I can't really confirm what the problem could be.
ok, im back on stock. flashing following files helped. i will test twrp again later and report. thanks for your replies.
fastboot flash boot boot.img
fastboot flash vendor_boot vendor_boot.img
fastboot flash dtbo dtbo.img
fastboot reboot fastboot
fastboot flash vendor_dlkm vendor_dlkm.img
fastboot reboot
With stock kernel twrp works. Just installed as described on twrp.me. The official twrp app from playstore crashes after root allowing.
For everyone who comes from custom kernel flash the files from your actual firmware (payload-dumper) as described in the post above.
Are you working on custom kernel support?
Hermann2306 said:
With stock kernel twrp works. Just installed as described on twrp.me. The official twrp app from playstore crashes after root allowing.
For everyone who comes from custom kernel flash the files from your actual firmware (payload-dumper) as described in the post above.
Are you working on custom kernel support?
Click to expand...
Click to collapse
From stock, I just flashed the Kirisakura zip in TWRP and my device booted up fine.
EDIT: While the above is true, TWRP no longer functions after installing the kernel, and the device won't reboot again after installing it. So something is definitely wrong somewhere.
For now, I can only suggest not using it with a custom kernel until we figure this out.
Ok, flashing with EXKernelManager works also.
update
I can do reboots but twrp doesnt work anymore
Hermann2306 said:
Ok, flashing with EXKernelManager works also.
update
I can do reboots but twrp doesnt work anymore
Click to expand...
Click to collapse
Yes, there seems to be an issue in the kernel that's preventing TWRP from working. I'm not sure what the issue is, unfortunately.
So every time I restore a back up, do I have to delete all lock screen requirements ?
If that's the case, I would have to redo my fingerprints every time
c19932 said:
So every time I restore a back up, do I have to delete all lock screen requirements ?
If that's the case, I would have to redo my fingerprints every time
Click to expand...
Click to collapse
Yes.
Quick PSA for anyone using this TWRP that also wants to use a custom kernel:
As of Kirisakura 2.0.6, the custom kernel and TWRP can now co-exist. This is due to the changes that allowed a monolithic kernel build. Presently, CleanSlate has not adopted those changes, but if/when it does, I will remove that disclaimer from the OP.
Thanks to @arter97, @Freak07, & @tbalden for supporting this device!
Is the twrp compatible with android 13?
NisseGurra said:
Is the twrp compatible with android 13?
Click to expand...
Click to collapse
There's a really easy way to find out...
Captain_Throwback said:
There's a really easy way to find out...
Click to expand...
Click to collapse
I getting decrypt errors that why the q
NisseGurra said:
I getting decrypt errors that why the q
Click to expand...
Click to collapse
Then you should post some logs
Will do