Dilemma: Magisk and Xposed boot loop - Honor 8 Questions & Answers

Dear all,
I'm in quite a dilemma. I have an FRD-L09 with the following environment:
Oreo Firmware (FRD-L09C432B521)
Unlocked FRD and Bootloader
TWRP 3.2.1 from 7to.cn (the one which can mount /system writable) (this one: https://forum.xda-developers.com/ho...p-ish-twrp-3-2-1-honor-9-running-gsi-t3818442)
I did not go the "Fix DataEncryption" way because, to me, it's pretty convenient that nobody is able to access /data even with TWRP, so if the phone gets stolen, my data is protected
I installed Magisk 17.1 and Magisk Manager which worked perfectly fine.
Then I downloaded and installed the corresponding Xposed Module for Magisk (apparently system-less, so Xposed-Uninstaller.zip doesn't work). This resulted in a boot loop.
I'm not able to suppress Xposed loading with the usual "press a device button many times in a row".
If I uninstall Magisk (i.e. flash stock recovery.img extracted from update.app), the system boots up normally, so it's Magisk+Xposed that causes the boot loop
BUT: Now I'm unable to remove the Xposed module from /data/magisk.img because 1. of course I can't access /data from a booted system without root and 2. I can't access /data from TWRP because I want to leave it protected.
Also, the "Fix DataEncryption" option apparently wipes the /data partition which I'd really like to avoid.
With other TWRP releases, I cannot access /data even after entering my lockscreen PIN or the "default_password" as decryption password, so I'm pretty certain that the encryption key is derived by other means - I think I remember reading that it's stored somewhere in hardware, which is also why, for Custom ROMs, encryption on Honor 8 is always an issue.
So does anyone have any clue how I can either access /data from TWRP while keeping it encrypted, or delete magisk.img via any other way?
I'll be happy about any hint!

EdRoxter said:
Dear all,
I'm in quite a dilemma. I have an FRD-L09 with the following environment:
Oreo Firmware (FRD-L09C432B521)
Unlocked FRD and Bootloader
TWRP 3.2.1 from 7to.cn (the one which can mount /system writable) (this one: https://forum.xda-developers.com/ho...-ish-twrp-3-2-1-honor-9-running-gsi-t3818442)
I did not go the "Fix DataEncryption" way because, to me, it's pretty convenient that nobody is able to access /data even with TWRP, so if the phone gets stolen, my data is protected
I installed Magisk 17.1 and Magisk Manager which worked perfectly fine.
Then I downloaded and installed the corresponding Xposed Module for Magisk (apparently system-less, so Xposed-Uninstaller.zip doesn't work). This resulted in a boot loop.
I'm not able to suppress Xposed loading with the usual "press a device button many times in a row".
If I uninstall Magisk (i.e. flash stock recovery.img extracted from update.app), the system boots up normally, so it's Magisk+Xposed that causes the boot loop
BUT: Now I'm unable to remove the Xposed module from /data/magisk.img because 1. of course I can't access /data from a booted system without root and 2. I can't access /data from TWRP because I want to leave it protected.
Also, the "Fix DataEncryption" option apparently wipes the /data partition which I'd really like to avoid.
With other TWRP releases, I cannot access /data even after entering my lockscreen PIN or the "default_password" as decryption password, so I'm pretty certain that the encryption key is derived by other means - I think I remember reading that it's stored somewhere in hardware, which is also why, for Custom ROMs, encryption on Honor 8 is always an issue.
So does anyone have any clue how I can either access /data from TWRP while keeping it encrypted, or delete magisk.img via any other way?
I'll be happy about any hint!
Click to expand...
Click to collapse
Re-install EMUI 8 with eRecovery.

ThePS4Gamer said:
Re-install EMUI 8 with eRecovery.
Click to expand...
Click to collapse
Yeah, I really hoped I could do something without wiping my /data partition, but I guess I'll have to back up my data and do a factory reset and start over...
PS: eRecovery only offers EMUI 5 on the Honor 8 - EMUI 8 is only installable via HiSuite.

EdRoxter said:
Yeah, I really hoped I could do something without wiping my /data partition, but I guess I'll have to back up my data and do a factory reset and start over...
PS: eRecovery only offers EMUI 5 on the Honor 8 - EMUI 8 is only installable via HiSuite.
Click to expand...
Click to collapse
Solution is simple.
Requirement:
TWRP(which Twrp? honor view 10's. Research how to install)
Solution:
-install magisk pached boot img to ramdisk and twrp to recovery_ramdisk
-boot in Twrp
-then navigate to Advance->Terminal
-write below command:
touch /cache/.disable_magisk && chmod 0777 /cache/.disable_magisk && sync && reboot
Behind the scene: It will enable magisk core only mode, then uninstall malfunctioning modules from magisk manager and disable core only mode, reboot and mtv enjoy

spica1234 said:
touch /cache/.disable_magisk && chmod 0777 /cache/.disable_magisk && sync && reboot
Behind the scene: It will enable magisk core only mode, then uninstall malfunctioning modules from magisk manager and disable core only mode, reboot and mtv enjoy
Click to expand...
Click to collapse
Thank you so much! This was exactly was I was looking for, but googling for "disable Magisk boot" and the like didn't bring up any results other than a bunch of tutorials on how to remove Magisk modules from TWRP with uninmod, which obviously didn't work for me because I couldn't mount /data from TWRP.

Related

[Solved] Any Possible way to have Magisk and any kind of data encryption in S7?

Hi,
I been searching for a way to encrypt the data partition with magisk and i didn't succeded at all. No matter if flash magisk in an already encrypted system (it says "using cache walkaround" but it gets stuck in the glowing samsung boot logo) or if i try to encrypt the terminal after having a magisk working system. I even tried to mark in magisk "Keep Forced Encryption" in MagiskManager with no success. It makes the system hang again in the boot secuence after reflashing magisk and rebooting.
I just want root in the stock firmware to be able to debloat and use titanium and a couple of apps.
Any way to have encrypted data and root in nougat?
Yes.
There are two requirements to support rooted stock firmware and encryption:
- You MUST use the stock kernel binary. Custom kernel binaries are blocked by TIMA, which handles encryption.
- You need to change "ro.config.tima" in the system build.prop to 0. This doesn't entirely disable TIMA, but seems to relax the encryption requirements a bit(less salting?) which will allow a modified ramdisk to work properly. It's slightly less secure, but still more secure than going unencrypted
Notes: You will need to wipe /data initially after making the build.prop change. You'll need to disable dm-verity after modifying /system. If you installed a custom kernel before you should reflash the entire firmware as the kernel installer likely deleted the TIMA trustlet binary. Some success was had before with getting custom kernels past TIMA by killing the TIMA service soon after boot, but this had the tendency to brick the data partition. Perhaps in future...
Edit: attached a flashable zip to make the build.prop change from TWRP
CurtisMJ said:
Yes.
There are two requirements to support rooted stock firmware and encryption:
- You MUST use the stock kernel binary. Custom kernel binaries are blocked by TIMA, which handles encryption.
- You need to change "ro.config.tima" in the system build.prop to 0. This doesn't entirely disable TIMA, but seems to relax the encryption requirements a bit(less salting?) which will allow a modified ramdisk to work properly. It's slightly less secure, but still more secure than going unencrypted
Notes: You will need to wipe /data initially after making the build.prop change. You'll need to disable dm-verity after modifying /system. If you installed a custom kernel before you should reflash the entire firmware as the kernel installer likely deleted the TIMA trustlet binary. Some success was had before with getting custom kernels past TIMA by killing the TIMA service soon after boot, but this had the tendency to brick the data partition. Perhaps in future...
Edit: attached a flashable zip to make the build.prop change from TWRP
Click to expand...
Click to collapse
Hey , thanks a lot for the info and the file . I learned more from it than 2 days on the internet struggling with this "issue"!
Actually I already tried another way and it worked!
I'll try to explain for the record.
I just installed TWRM and formated /data (not wiping. cause you have to write a file there afterwards) and from there I opened the terminal of TWRM and created /data/.magisk (as in magisk FAQ is explained) with KEEPFORCEENCRYPT=true in it . Then installed a rom (ambasadii's one with magisk 13.6 root ) and... that's it. it worked.
Afterwards i did a lot of automatic tasks of secure network daily backups since when you're encrypted it's kind of easy to f^ckup the system and lose everything and now I'm happy.
Probably i was lucky since the kernel probably is the stock one as you said in this ROM.
I still have to try more stuff to be sure everything is working and the data is safe (safe enough at least)
one question:
do you think it would work if i activate dm-verity or this firmware and or magisk modify the ramdisk (so it wont.) ?
forocarlos said:
Probably i was lucky since the kernel probably is the stock one as you said in this ROM.
I still have to try more stuff to be sure everything is working and the data is safe (safe enough at least)
one question:
do you think it would work if i activate dm-verity or this firmware and or magisk modify the ramdisk (so it wont.) ?
Click to expand...
Click to collapse
dm-verity likely won't work on a custom ROM(unless the ROM maker specifically re-signed it, but that's unlikely and bloody difficult). Making any changes to /system (including the build.prop tweak I mentioned!) will necessitate disabling it and there are a bunch of changes in custom Roms. Ambasadii's nougat ROM does indeed make use of the stock kernel and most likely has the TIMA prop already toggled. So an ideal setup I think. The data should be pretty solid provided the TIMA trustlet never goes missing(encryption keys basically self-destruct, which bricks the partition )
EDIT: You also might want to check in TWRP if the data was genuinely encrypted. Android generally won't complain if it isn't. If TWRP can mount it it isn't encrypted.
EDIT: You also might want to check in TWRP if the data was genuinely encrypted. Android generally won't complain if it isn't. If TWRP can mount it it isn't encrypted.
Click to expand...
Click to collapse
checked.
/data unmountable.
So wrapping things up:
- Magisk root
- CTC passed
- Encryption
- Custom Rom
- Lastest Nougat
:good::good::good::good::good:
the only thing left is figuring out how to update the rom without losing data or everything actually.
forocarlos said:
checked.
/data unmountable.
So wrapping things up:
- Magisk root
- CTC passed
- Encryption
- Custom Rom
- Lastest Nougat
:good::good::good::good::good:
the only thing left is figuring out how to update the rom without losing data or everything actually.
Click to expand...
Click to collapse
Hey, have you figured out a way of updating without losing data?
charliebigpot said:
Hey, have you figured out a way of updating without losing data?
Click to expand...
Click to collapse
Little late sorry, but if you keep the TIMA prop disabled you can flash the full firmware with HOME_CSC and it will keep the data. Just reflash twrp after it does the update(needs full reboot into stock recovery first to finish update) and flash the TIMA zip in this thread with a root zip.
Step-by-Step-Guide to a S7 with Nougat+Root+Magisk+Encryption
Hi there,
I am glad that there is a way to use Nougat, Root and Magisk on an encrypted S7. For the last months I have tried every so-called-solution (TWRP, CF-AutoRoot, reflash Stock boot.img, Helios' Stock kernel) but always ended up in bootloops or an unencrypted device.
Can someone provide me with a step-by-step-guide how to achieve a rooted-magisked-encrypted S7 running Nougat?f I am now running unrooted stock 7.0 with VIA CSC, Build G930FXXU1DQH9.
Thanks in advance!
A step by step for this would be great.
i tried several variations of the proposed methods and did not succeed in any way, please clarify
i tried these variations, and many many more:
flash stock
reboot
flash twrp
wipe system
format data
terminal: KEEPFORCEENCRYPT=true >> /data/.magisk
flash ambassadi rom, dirty flash, magisk root, wipe cache
reboot
set fingerprint & password + fast encrypt
bootloop
format data
wipe sys caches
terminal: KEEPFORCEENCRYPT=true >> /data/.magisk
flash ambassadi rom, clean, magisk root, wipe cache
reboot
set fingerprint & password
reboot
encrypt
bootloop
flash stock
reboot
set fingerprint&pw
reboot
flash twrp
tima
format data
magisk
no-veri opt enc
reboot
set up fingerprint + pw
reboot
encrypt
unsucessful but bootable
The most sucess i had with the stock rom, though i dont remember how exactly. I didnt take my password, which i suspect to be a verification error since the password was the right one
On the batman rom the ui hanged itself on first encrypted startup.
On ambassadi rom i got into bootloop every time.
Did i miss something??
Regarding stock rooted encryption there are some notes, in addition to the requirements in my post above(stock kernel etc):
- Samsung's encryption never handles post setup encryption that well. At least from my experience. You need to be encrypted from the get-go. This implies re-wiping data the moment you're finished flashing the custom ROM as TIMA won't encrypt unless the partition is blank(which it won't be with the leftover magisk config file).
- The TIMA prop must be changed before first boot. Data encrypted with prop in either state is incompatible with data encrypted during the other state. State "1" bootloops on rooting. State "0" allows it.
So for stock the step-by-step would be:
- Flash full stock and use CSC(NOT HOME_CSC), let it reboot to the initial setup screen. This is important to apply the CSC settings from the firmware package, which if not done will result in an unusable secure keyboard and cause various other issues.
- Flash TWRP
- Flash the TIMA prop zip in the post above
- Flash a verity disable zip which DOESN'T disable Force Encryption. For convenience I have attached a modified version which doesn't.
- Format /data
- Reboot into setup and run through the wizard.
- Reboot back to TWRP and flash a root solution like Magisk. Don't worry about force encryption now as the data partition should be encrypted already by this stage. Magisk should revert to the /cache workaround.
To update:
- Flash the latest full stock firmware package but this time use HOME_CSC
- Let it reboot into stock recovery and do the upgrade process.
- It should end up on the secure Startup page asking for your password. No password will work at this point because your data was encrypted in TIMA state "0".
- Reboot to download mode and flash TWRP.
- Reboot to TWRP
- Flash the TIMA prop and verity zips.
- Reboot into to Android (password should work now)
- Let it finish the upgrade.
- Reboot to TWRP and flash your root solution.
These are the basic processes which worked for me.
CurtisMJ said:
Regarding stock rooted encryption there are some notes, in addition to the requirements in my post above(stock kernel etc):
- Samsung's encryption never handles post setup encryption that well. At least from my experience. You need to be encrypted from the get-go. This implies re-wiping data the moment you're finished flashing the custom ROM as TIMA won't encrypt unless the partition is blank(which it won't be with the leftover magisk config file).
- The TIMA prop must be changed before first boot. Data encrypted with prop in either state is incompatible with data encrypted during the other state. State "1" bootloops on rooting. State "0" allows it.
So for stock the step-by-step would be:
- Flash full stock and use CSC(NOT HOME_CSC), let it reboot to the initial setup screen. This is important to apply the CSC settings from the firmware package, which if not done will result in an unusable secure keyboard and cause various other issues.
- Flash TWRP
- Flash the TIMA prop zip in the post above
- Flash a verity disable zip which DOESN'T disable Force Encryption. For convenience I have attached a modified version which doesn't.
- Format /data
- Reboot into setup and run through the wizard.
- Reboot back to TWRP and flash a root solution like Magisk. Don't worry about force encryption now as the data partition should be encrypted already by this stage. Magisk should revert to the /cache workaround.
These are the basic processes which worked for me.
Click to expand...
Click to collapse
when first reboot into TWRP wich option should get? "keep read only" or "allow modifications"?
if I select "allow mods" when I try to flash TIMA.prop file I get an error about mount\data
is it necesary to format data before?
thanks
xbizkuit said:
when first reboot into TWRP wich option should get? "keep read only" or "allow modifications"?
if I select "allow mods" when I try to flash TIMA.prop file I get an error about mount\data
is it necesary to format data before?
thanks
Click to expand...
Click to collapse
Actually the TIMA prop zip doesnt even need data. Not sure why I made it try to mount, but any error about mounting can probably be ignored. It modifies /system so you should swipe to allow.
CurtisMJ said:
Actually the TIMA prop zip doesnt even need data. Not sure why I made it try to mount, but any error about mounting can probably be ignored. It modifies /system so you should swipe to allow.
Click to expand...
Click to collapse
First of all, thanks for your reply and for your small guide
What I did was flash lastest full stock official rom from sammobile with odin and let it reboot to the initial setup screen
Reboot to download mode and then I flashed TWRP also with odin and reboot manually to recovery
When first time entered into recovery just selected "allow modifications"
After I flashed the TIMA prop zip and verity disable zip modified version
In both cases, I received error messages about mount/data on the screen but the installation seems to be complete
Finally format/data, reboot and complete the wizard and the installation
The last step, reboot again into recovery and flash magisk v14
At the end of this procedure, all seems ok, magisk is running, safetynet test is OK, superuser is OK and root apps with no problem
Also a couple of mods flashed with recovery (zero camera mod and sound mod by zubi) gave me error messages about format/data but both of them were done
So, the question is how can I check now if my phone encryption is OK and working ??
The only thing seems not work is the OTA firmware updates, it doesnt work, error message about modified phone
I tried to hide root with magisk for the apps in relation with the ota updates but no work for me
Is there any solution for that??
Thanks for all and very appreciated for your help
And sorry for my english hehe
xbizkuit said:
First of all, thanks for your reply and for your small guide
What I did was flash lastest full stock official rom from sammobile with odin and let it reboot to the initial setup screen
Reboot to download mode and then I flashed TWRP also with odin and reboot manually to recovery
When first time entered into recovery just selected "allow modifications"
After I flashed the TIMA prop zip and verity disable zip modified version
In both cases, I received error messages about mount/data on the screen but the installation seems to be complete
Finally format/data, reboot and complete the wizard and the installation
The last step, reboot again into recovery and flash magisk v14
At the end of this procedure, all seems ok, magisk is running, safetynet test is OK, superuser is OK and root apps with no problem
Also a couple of mods flashed with recovery (zero camera mod and sound mod by zubi) gave me error messages about format/data but both of them were done
So, the question is how can I check now if my phone encryption is OK and working ??
The only thing seems not work is the OTA firmware updates, it doesnt work, error message about modified phone
I tried to hide root with magisk for the apps in relation with the ota updates but no work for me
Is there any solution for that??
Thanks for all and very appreciated for your help
And sorry for my english hehe
Click to expand...
Click to collapse
If the recovery is giving errors about /data mount then the phone is encrypted. TWRP simply cannot work with Samsung encryption at all at the moment. Also: If there is no "Encrypt" option for the internal storage in the Security section of the settings app, then the device is encrypted(There may still be one for the external SD). There's no way I know of to fool OTA into working, I've always just fully flashed the latest firmware. Samsung firmware is really easy to get so I've never really looked into using OTAs to update. They'd probably fail horribly anyway due to the modified system in which case the OTA tool is probably correct to block the update. (Newer Android standard requires updates to be done via raw block writes so dm-verity remains intact. Could lead to corruption if done wrong...)
CurtisMJ said:
If the recovery is giving errors about /data mount then the phone is encrypted. TWRP simply cannot work with Samsung encryption at all at the moment. Also: If there is no "Encrypt" option for the internal storage in the Security section of the settings app, then the device is encrypted(There may still be one for the external SD). There's no way I know of to fool OTA into working, I've always just fully flashed the latest firmware. Samsung firmware is really easy to get so I've never really looked into using OTAs to update. They'd probably fail horribly anyway due to the modified system in which case the OTA tool is probably correct to block the update. (Newer Android standard requires updates to be done via raw block writes so dm-verity remains intact. Could lead to corruption if done wrong...)
Click to expand...
Click to collapse
OK so it seems my phone is finally encrypted and rooted!!!
anyway, I forgot about OTAs and I´ll continue installing updates manually,
so can I flash the full firmware with HOME_CSC without losing the data?
Only reflash TWRP after the update and flash the TIMA prop zip ???
Thank you very much for your help!!!
Thank you CurtisMJ! It finally works!
xbizkuit said:
OK so it seems my phone is finally encrypted and rooted!!!
anyway, I forgot about OTAs and I´ll continue installing updates manually,
so can I flash the full firmware with HOME_CSC without losing the data?
Only reflash TWRP after the update and flash the TIMA prop zip ???
Thank you very much for your help!!!
Click to expand...
Click to collapse
Whoops. Didn't see those were questions. Yes, full flash with HOME_CSC will keep data intact. The TIMA prop will need to be in state "0" to decrypt, so yes again, reflash TWRP and the TIMA and verity zips and you should be good. Just make sure to have "Auto Reboot" checked in Odin. It will do some stuff in stock recovery first (including a screen with "Erasing..." Don't worry! It's just cleaning up the working files in /cache ).
CurtisMJ said:
Whoops. Didn't see those were questions. Yes, full flash with HOME_CSC will keep data intact. The TIMA prop will need to be in state "0" to decrypt, so yes again, reflash TWRP and the TIMA and verity zips and you should be good. Just make sure to have "Auto Reboot" checked in Odin. It will do some stuff in stock recovery first (including a screen with "Erasing..." Don't worry! It's just cleaning up the working files in /cache ).
Click to expand...
Click to collapse
Thanks again mate!!!!!!
WyRM
Hello Guys
Do you think it would work also on Note8 ?
Im stuck on step when i flash 2 files via TWRP, it shows erros with cant mount Data because it is already encrypted somehow, it wouldnt be issue as you said as it does to system.
But when i finish the installation of the Firmware and came back to TWRP for flashing Root solution it is encrypted and cantbe flashed.
Any idea?
WyRmiE said:
Hello Guys
Do you think it would work also on Note8 ?
Im stuck on step when i flash 2 files via TWRP, it shows erros with cant mount Data because it is already encrypted somehow, it wouldnt be issue as you said as it does to system.
But when i finish the installation of the Firmware and came back to TWRP for flashing Root solution it is encrypted and cantbe flashed.
Any idea?
Click to expand...
Click to collapse
That sounds about right actually. The data is supposed to be already encrypted by the time you flash root. TWRP on the S7 and it appears any recent Samsung device cannot decrypt the stock ROMs encryption. The root solution should revert to using the cache workaround. Both Magisk and SuperSU support this setup. Just flash and ignore the /data mount errors.

decrypt /data

move fstab using official recovery ( adbpull /vendor/etc/fstab.kirin970 and fstab.kirin970.data - remove "avb" and encryption from userdata, replace the encryption line on data with 'encryptable')
format /data in unofficial recovery
install magisk in official recovery
for some reason it only works in that order, if you try and do it all in official or unofficial recovery it doesnt work and magisk recognizes encryption on data.
after each step reboot bootloader and flash respective recovery, then fastboot reboot unplug and hold power and vol up to go straight into recovery and continue, if you boot you have to start over)
when installing magisk zip you should see that it doesnt say keep force encrypt.
and if you go in settings you have the option to encrypt.
virtyx said:
move fstab using official recovery ( adbpull /vendor/etc/fstab.kirin970 and fstab.kirin970.data - remove "avb" and encryption from userdata, replace the encryption line on data with 'encryptable')
format /data in unofficial recovery
install magisk in official recovery
for some reason it only works in that order, if you try and do it all in official or unofficial recovery it doesnt work and magisk recognizes encryption on data.
after each step reboot bootloader and flash respective recovery, then fastboot reboot unplug and hold power and vol up to go straight into recovery and continue, if you boot you have to start over)
when installing magisk zip you should see that it doesnt say keep force encrypt.
and if you go in settings you have the option to encrypt.
Click to expand...
Click to collapse
Hi there
I´m struggling to get lineage 15.1 to install without google framework errors
You mention offical and unofficial recovery. I guess you are talking about twrp
when you say move fstab do you mean remove?
Could this encryption be my problem with lineage and gapps not installing as it should?
buenso80 said:
Hi there
I´m struggling to get lineage 15.1 to install without google framework errors
You mention offical and unofficial recovery. I guess you are talking about twrp
when you say move fstab do you mean remove?
Could this encryption be my problem with lineage and gapps not installing as it should?
Click to expand...
Click to collapse
After you install lineage format /data that should work
Totally irrelevant to OP
If i hadn't tried that i wouldn't ask here.
Not TOTALLY irrelevant, as my question is about the official and unofficial twrp having trouble mounting and wiping before flashing rom..
Please stop trolling
virtyx said:
move fstab using official recovery ( adbpull /vendor/etc/fstab.kirin970 and fstab.kirin970.data - remove "avb" and encryption from userdata, replace the encryption line on data with 'encryptable')
format /data in unofficial recovery
install magisk in official recovery
for some reason it only works in that order, if you try and do it all in official or unofficial recovery it doesnt work and magisk recognizes encryption on data.
after each step reboot bootloader and flash respective recovery, then fastboot reboot unplug and hold power and vol up to go straight into recovery and continue, if you boot you have to start over)
when installing magisk zip you should see that it doesnt say keep force encrypt.
and if you go in settings you have the option to encrypt.
Click to expand...
Click to collapse
If you format data, isn't the device going to be empty?
Only time I've done this before I had to copy a ROM via MTP in recovery and then flash with no Verity.
So forgive me if I'm wrong but if I format data, won't I end up with no operating system?
dladz said:
If you format data, isn't the device going to be empty? J
Only time I've done this before I had to copy a ROM via MTP in recovery and then flash with no Verity.
So forgive me if I'm wrong but if I format data, won't I end up with no operating system?
Click to expand...
Click to collapse
/system is where the system lives
/data is userdata and applications
Noting wrong with formatting, you will lose all apps and data though
virtyx said:
/system is where the system lives
/data is userdata and applications
Noting wrong with formatting, you will lose all apps and data though
Click to expand...
Click to collapse
Legend, thanks for clearing that up.
:good:
I know off topic, but out of interest with the p20 pro, if you did find yourself with no OS how would you get back to a functional phone?
There's no custom ROMs to flash, just never been in this situation before.
Hypothetically
dladz said:
Legend, thanks for clearing that up.
:good:
I know off topic, but out of interest with the p20 pro, if you did find yourself with no OS how would you get back to a functional phone?
There's no custom ROMs to flash, just never been in this situation before.
Hypothetically
Click to expand...
Click to collapse
You can use hurupdater and download the firmware from firmwarefinder on your of
Happened a lot of times for me
Just as a headsup, you dont need to decrypt anything when you just wanna do some changes once and are proper admin level on your desktop machine, ive moved a whatsapp message history from previous phone (also taken from protected space there) to P20P just by attaching it to pc in file transfer mode and then adding myself as full control user in the security tabs of the several system folder properties i went in to, worked like a charm.
The point im trying to make: Android and Windows finally understand each others permission systems (not sure since how long as ive been away from android for a few years) so you can just attach it and use Windows perm system to give yourself access where needed, lots easier & faster then making a bunch of changes to your phone in effect disabling encryption, something you in most cases dont really want to do permanently anyway, so this is a nice workaround that doesn't touch your phone's encryption settings but still lets you mess about with system files.
Just my 2 cents.
virtyx said:
move fstab using official recovery ( adbpull /vendor/etc/fstab.kirin970 and fstab.kirin970.data - remove "avb" and encryption from userdata, replace the encryption line on data with 'encryptable')
format /data in unofficial recovery
install magisk in official recovery
for some reason it only works in that order, if you try and do it all in official or unofficial recovery it doesnt work and magisk recognizes encryption on data.
after each step reboot bootloader and flash respective recovery, then fastboot reboot unplug and hold power and vol up to go straight into recovery and continue, if you boot you have to start over)
when installing magisk zip you should see that it doesnt say keep force encrypt.
and if you go in settings you have the option to encrypt.
Click to expand...
Click to collapse
I did everything step by step, the encryption is gone and yet I still get that stupid permission denied error when I try to do a backup in TWRP. So. F*cking. Annoying.
Update: when I press the "Install" button in TWRP, it shows giberish, but if I go to Advanced>File Manager everything has it's proper name. WTF?!
Hmmm, If I don't tick "Vendor" in the backup, I get this error:
Can not create 'data/media/0/2021-01-20--07-26-51' folder (No such file or directory).
Failed to make backup folder.
Update on update: oof, now everything that's in the internal storage is gibberish, even in the OS.

Guide: How to decrypt data in TWRP for Le Pro 3 AI

As you all know we have been searching for ways to root the Le Pro 3AI but failed. There are even 2 twrp but you can't really do much with them. TWRP 3.1 did not even start for me but 3.0.3 worked but what's the real problem? You can't mount /data and also i found another partition named /custom. It always fails to mount and there is no way to format it.
When you enter TWRP it ask for a password to decrypt. Simply click cancel and go to wipe, advanced wipe and check the data partition. Select repair file system and change it to ext2 and then back to ext4. Reboot to twrp again I don't think this is necessary but better take precautions. Now go to mount and select data you will see that you can actually mount it(~24000mb) .
You can also enable MTP to copy files to your phone in recovery such as .zips. I hope this helps you in way. I hope the devs find a way to make it possible to flash custom ROMs for this phone without any message appearing during boot and that there is no problem with imei. Thanks for reading and don't give up with this phone else it will be money down the drain. If I helped press the thanks button.
how did you install the TWRP?
im a noob in this
okay! so after attempting to install TWRP my phone bricked haha
i had to flash again the rom. geez!
i better not attempt again.
twrp isn't really a problem. it works for the most part, just cant be perma flashed, only booted. you can still flash zips via sideload as it is though, so that was never a *huge issue*. thing is, modifying system partition on official builds (25, 28) will cause security lockup. kernel needs to be patched, and prolly bootloader for this to be bypassed, and it seems its not easy. consequently root will fail too. on 27 though, you can easily boot twrp and flash a custom zip (except root), so there is nothing preventing you from removing bloat. even xposed works. you can even flash 27 kernel on both 25/28 and clean them too using same flashable zips. as far as custom rom goes, yeah, no, mtk device. prolly not gonna happen. be happy if you get root eventually.
sikica133 said:
twrp isn't really a problem. it works for the most part, just cant be perma flashed, only booted. you can still flash zips via sideload as it is though, so that was never a *huge issue*. thing is, modifying system partition on official builds (25, 28) will cause security lockup. kernel needs to be patched, and prolly bootloader for this to be bypassed, and it seems its not easy. consequently root will fail too. on 27 though, you can easily boot twrp and flash a custom zip (except root), so there is nothing preventing you from removing bloat. even xposed works. you can even flash 27 kernel on both 25/28 and clean them too using same flashable zips. as far as custom rom goes, yeah, no, mtk device. prolly not gonna happen. be happy if you get root eventually.
Click to expand...
Click to collapse
can you tell me the procedure on installing twrp?
i really wanted to enable multi window via adb when on recovery mode.
thanks
sikica133 said:
twrp isn't really a problem. it works for the most part, just cant be perma flashed, only booted.
Click to expand...
Click to collapse
I could flash only 3.0.3 . 3.1 never worked for me. Can't even boot.
i never said it could be flashed. it could be booted into. there are plenty of guides around how to boot recovery using fastboot (google fastboot boot recovery.img). once there, you can simply use adb sideload, or integrated file manager to clean system apps and reboot back into os. if you are using 25/28 u'll need to play a bit more to get everything up and running (imei issues), on 27S (multilanguage rom) this is pretty straightforward and no fixing is required
adb devices and uninstall system app
adb devices and uninstall system app
minimal_adb_fastboot_1.4.3_portable --- download androidfilehostcom/?fid=457095661767103465
cmd-here.exe
adb devices
adb shell
pm uninstall -k --user 0 [apk name]
com.letv.agnes
com.icoolme.android.weather
com.letv.android.bugreporter
com.letv.android.carservice
com.letv.android.ecoProvider
com.letv.android.letvyellowpage
com.letv.android.ota
com.letv.android.client
com.letv.android.quicksearchbox
com.letv.android.telextra
com.letv.android.usermanual
com.letv.app.appstore
com.letv.bsp.crashhandler
com.letv.bugpostbox
com.letv.lesophoneclient
com.letv.letvshop
com.singulariti.niapp
com.sohu.inputmethod.sogou.leshi
com.tencent.android.location
sina.mobile.tianqitongletv
com.autonavi.minimap
com.tencent.reading
com.le.share.pro3ai
com.letv.games
com.android.calendar
com.android.noisefield
youtubecom/watch?v=TSwBsw6MgiA
Gapps apk
fex-net/934605209940/246920922 - 4pda
lucky patcher.apk install -- delete all google applications
1-GoogleBackupTransport.apk install and Give all permissions in menu applications
2-GoogleLoginService.apk install and Give all permissions in menu applications
3-GoogleServicesFramework.apk install and Give all permissions in menu applications
4-Phonesky.apk install and Give all permissions in menu applications
5-PrebuiltGmsCore.apk install and Give all permissions in menu applications
İ LOVE TURKEY
Monster 00 said:
As you all know we have been searching for ways to root the Le Pro 3AI but failed. There are even 2 twrp but you can't really do much with them. TWRP 3.1 did not even start for me but 3.0.3 worked but what's the real problem? You can't mount /data and also i found another partition named /custom. It always fails to mount and there is no way to format it.
When you enter TWRP it ask for a password to decrypt. Simply click cancel and go to wipe, advanced wipe and check the data partition. Select repair file system and change it to ext2 and then back to ext4. Reboot to twrp again I don't think this is necessary but better take precautions. Now go to mount and select data you will see that you can actually mount it(~24000mb) .
You can also enable MTP to copy files to your phone in recovery such as .zips. I hope this helps you in way. I hope the devs find a way to make it possible to flash custom ROMs for this phone without any message appearing during boot and that there is no problem with imei. Thanks for reading and don't give up with this phone else it will be money down the drain. If I helped press the thanks button.
Click to expand...
Click to collapse
can you help me enable multi window?
It says that I need to mount system first at the recovery.
Please help me. Thanks a lot.

Advanced OTA keeping Magisk and TWRP (needs a computer)

History...
I originally wrote this guide to upgrade from 10.0.4.0 to 10.0.7.0.
I have also used this same guide to install every OTA from 10.0.7.0 to 11.0.11.0.
This guide assumes you have both Magisk and TWRP, that Magisk cannot "uninstall" (because of TWRP installation) and that you want to keep both Magisk and TWRP after installation. Parts of this guide may still be useful if you aren't in this exact situation.
If you only have Magisk, you should be able to follow these much simpler instructions: https://forum.xda-developers.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
Things to have on hand:
- vanilla_boot.img (for the version you currently have)
- patched_boot.img (your current boot image with Magisk)
- TWRP img and zip (see version info below)
I think that TWRP also causes the vendor partition to be modified. It may also touch system but I have a modified bootanimation.zip which modifies system, so I can't be sure. In any case, I also have a backup of system.img and vendor.img.
Because Magisk is installed after TWRP, Magisk's "backup" of the "stock boot image" is not vanilla. This means that in order to take the OTA, I have to flash the vanilla boot image.
0 - Update your patched_boot.img
If you don't have a patched_boot.img for your current Magisk (eg. my patched_boot.img was old, since I had installed several Magisk updates), you should build a new patched_boot.img so that when you boot it, the system will continue to work.
Push the vanilla image to the phone.
Code:
adb push vanilla_boot.img /sdcard
Then get Magisk to install using the "Select and Patch a File" method, select the file you uploaded. Then pull down the patched image.
Code:
adb pull /sdcard/Download/magisk_patched.img patched_boot.img
1 - Prepare to OTA
For some reason, my carrier does not like the OTA process so I always turn on Airplane mode + Wifi.
Get to fastboot and check the current slot.
Code:
adb reboot bootloader
fastboot getvar current-slot
My current slot was b
Flash the system and vendor partitions (if necessary).
Code:
fastboot flash system_b vanilla_system.img
fastboot flash vendor_b vanilla_vendor.img
Flash vanilla and boot the patched image (so that Magisk is active and the OTA can be applied).
Code:
fastboot flash boot_b vanilla_boot.img
fastboot boot patched_boot.img
2 - Do the OTA
Install OTA (DO NOT REBOOT)
If the OTA fails
If the OTA fails, you can find out which partitions it doesn't like from the logcat. If you have a fastboot image, you can reflash the affected partitions. As previously mentioned, I've had to flash all of boot, vendor and system for each OTA.
Code:
adb logcat | grep update_engine
...
07-01 06:52:38.470 E/update_engine(935): [0701/065238.470683:ERROR:delta_performer.cc(990)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
07-01 06:52:38.470 E/update_engine(935): [0701/065238.470931:ERROR:delta_performer.cc(995)] Expected: sha256|hex = A4AD686D7BF628486668446221D0089BF5915DBC1158C83D30A06222FE7D2ACB
07-01 06:52:38.471 E/update_engine(935): [0701/065238.471002:ERROR:delta_performer.cc(998)] Calculated: sha256|hex = 4CADBE88EC1C019913A0B416EB9031840D4BA6B2287A3FC814A2B8B7F9871F7D
07-01 06:52:38.473 E/update_engine(935): [0701/065238.471072:ERROR:delta_performer.cc(1009)] Operation source (offset:size) in blocks: 0:5221,5461:405,5869:1,5873:343,6221:589
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473233:ERROR:delta_performer.cc(1191)] ValidateSourceHash(source_hash, operation, source_fd_, error) failed.
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473340:ERROR:delta_performer.cc(298)] Failed to perform BROTLI_BSDIFF operation 187, which is the operation 0 in partition "boot"
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473411:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
07-01 06:52:38.739 E/SystemUpdate(15410): [Execution,NonStreamingAbApplyAction] Installation failed with error code: 20.
3 - Backup the vanilla boot image
Note that you need to pull from the other slot (in my case, a).
Code:
adb shell
su
dd if=/dev/block/by-name/boot_a of=/sdcard/vanilla_boot.img bs=1024k
Backup system.img and vendor.img too (if required).
Code:
dd if=/dev/block/by-name/system_a of=/sdcard/vanilla_system.img bs=1024k
dd if=/dev/block/by-name/vendor_a of=/sdcard/vanilla_vendor.img bs=1024k
4 - Magisk patch the other slot
Use Magisk to "Install to Inactive Slot (After OTA)" (DO NOT REBOOT)
5 - Backup the patched boot image
Note that you need to pull from the other slot (in my case, a).
Code:
dd if=/dev/block/by-name/boot_a of=/sdcard/patched_boot.img bs=1024k
exit
exit
# back on your computer
adb pull /sdcard/vanilla_boot.img
adb pull /sdcard/patched_boot.img
Pull down system and vendor images too (if required).
Code:
adb pull /sdcard/vanilla_system.img
adb pull /sdcard/vanilla_vendor.img
Now you can let Magisk reboot. This is the moment of truth...
At this point you should have an upgraded, Magisk-enabled system and backups of the vanilla and patched boot images. Congratulations on completing the OTA!
If the system fails to boot
There's a few things to try before giving up if the system fails to boot...
1) Boot without Magisk (fastboot boot vanilla_boot.img). Probably indicates that a Magisk module you have is no longer compatible.
2) Boot TWRP (fastboot boot twrp.img) and poke at things. As an example, I used the /sdcard/mm program (part of Magisk Manager for recovery) to disable EdXposed when the OTA to Android 10 failed to boot.
6 - Restore TWRP
It is possible to boot TWRP from fastboot so you don't strictly need to install TWRP. I like to have it available anyway.
Old version info...
I had been using the official TWRP 3.2.3, which worked great up until 10.0.9.0. With 10.0.9.0, I couldn't get to TWRP, I just got the system destroyed screen. I could fastboot boot it, but it couldn't mount /data (a problem it has always had).
I figured out that TWRP 3.3.1-dees_troy (from the official TWRP site) works with 10.0.9.0 and up. What's more, it works (can decrypt /data) if you fastboot boot it, not just after install. So you could in theory simply not install TWRP and fastboot boot if in the event that you actually need it.
I know that people have their own favourite versions, with the offain version being popular (didn't work for me). There's OrangeFox too (also didn't work for me).
In summary, I recommend Official TWRP 3.3.1-dees_troy but if you have a favourite alternative, feel free to use it instead.
TWRP thread: https://forum.xda-developers.com/mi-a2-lite/development/official-twrp-daisy-t3855396
Download link: https://dl.twrp.me/daisy/
Restoring TWRP is the same as installing it the first time. This is the process that I use.
Flash vanilla boot, then install TWRP to it.
Code:
adb reboot bootloader
fastboot boot twrp-3.3.1-dees_troy-daisy.img
Install TWRP
Code:
adb push twrp-installer-3.3.1-dees_troy-daisy.zip /sdcard
Use TWRP to install twrp-installer-3.3.1-dees_troy-daisy.zip
I install my modified bootanimation.zip at this time.
Mount System from TWRP (it is normally already mounted for me).
From a shell:
Code:
adb shell
cd /sdcard
cp bootanimation.zip /system/system/media/bootanimation.zip
Umount System
You must re-install Magisk after installing TWRP.
Code:
adb reboot bootloader
fastboot boot patched_boot.img
Use Magisk to "Direct Install (Recommended)"
Reboot
For some reason, my carrier does not like the OTA process so at this point I normally power off the phone rather than just rebooting. When the phone boots, I can turn off airplane mode and check that a mobile data connection can be made.
7 - Confirm that everything works
Make sure the system comes up and Magisk Manager says that Magisk is installed.
Make sure you can get to TWRP. Boot while holding VOL+ or
Code:
adb reboot recovery
Make sure TWRP can see your files.
Congratulations! You have installed an OTA while keeping Magisk and TWRP!
8 - Backup boot.img with TWRP + Magisk (optional)
If you want a copy of the boot.img with both Magisk and TWRP. This pulls from the now-current slot (in my case, a). I'm not totally sure of the value of this, since I can't get fastboot to boot this image. It may come in handy if you upgrade TWRP and that breaks (since you can flash this back rather than having to install the old TWRP again).
Code:
adb shell
su
cd /sdcard
dd if=/dev/block/by-name/boot_a of=twrp_boot.img bs=1024k
exit
exit
# back on the computer
adb pull /sdcard/twrp_boot.img
Thanks. Could you upload or indicate where we can get the necessary files?
Will i loose all user data and internal storage wiped if i do this?
Thanks for sharing, looks complicated, also i think you should use a fixed twrp, since the official dont have acces to sdcard.
rossarnie said:
Thanks. Could you upload or indicate where we can get the necessary files?
Click to expand...
Click to collapse
If you have Magisk, you should already have the vanilla and patched boot.img files.
Of you don't already have Magisk, just follow the install procedure here. https://forum.xda-developers.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
If you're running 10.0.4.0 without magisk and need to extract your vanilla boot.img. Use fastboot to boot into twrp and then you can do the DD command to extract boot. Use adb pull to save it to PC.
I used official TWRP from here.
https://forum.xda-developers.com/mi-a2-lite/development/official-twrp-daisy-t3855396
Apparently there's a different twrp that can access the external SD card. I don't have an external SD card so I don't need it.
dr.bahaeddin said:
Will i loose all user data and internal storage wiped if i do this?
Click to expand...
Click to collapse
I didn't lose any data.
I've never had a problem with Magisk. TWRP does tend to bootloop after install, which is why I install magisk again.
You should be able to flash the patched or vanilla boot if twrp is boot looping to fix it too. Just won't have twrp anymore.
a1291762 said:
I didn't lose any data.
Click to expand...
Click to collapse
Mind you. I have a backup of my apps and data that's off of my phone so even if I do need to factory reset I can get it back. That's a longer and more complicated guide.
Txatxiquesi said:
looks complicated.
Click to expand...
Click to collapse
Before I had twrp the standard Magisk ota process was enough. But that loses twrp and with twrp in my magsik backup, the uninstall didn't work. So extra steps are needed. Plus some extra steps to make backups of important files for the next OTA
a1291762 said:
If you have Magisk, you should already have the vanilla and patched boot.img files.
Click to expand...
Click to collapse
Hmm... This may not be the case. I'm careful to make backups but it's easy to skip this.
If you don't have a patched boot image you can backup your current boot partition from a root shell. You need to find out if you are booting a or b slot. Then
dd if=/dev/block/by-name/boot_a of=/sdcard/patched_boot.img bs=1024k
Magisk puts old stock backups into /data. I had 4 files in there which makes it hard to know what each file is.
That's why I made sure to backup my vanilla boot image immediately.
If you're stuck without a vanilla 10.0.4.0 boot you can't do the OTA. I can upload mine somewhere when I get home tonight if it's not already online.
a1291762 said:
...If you're stuck without a vanilla 10.0.4.0 boot you can't do the OTA. I can upload mine somewhere when I get home tonight if it's not already online.
Click to expand...
Click to collapse
This would be very helpful, please
FunkmasterC said:
This would be very helpful, please
Click to expand...
Click to collapse
Here is the backup I made of the 10.0.4.0 vanilla boot.img. You'll need to decompress this before flashing.
URL REMOVED
What's new on 10.0.7.0 bro? Should me wait for 10.1 update if im on 10.0.4.0 rooted?
10.0.7.0 has the March security patches. I haven't noticed any actual changes.
Thank you, your Linux commands are sick, I never know I can get the vanilla and patched boot.img like that.
Cheer~
is there an update for file version 10.0.8.0??
I only just got the notification this morning. I'll do the upgrade tonight but I expect the same process will work.
I just used the same process to go from 10.0.7.0 to 10.0.8.0. This time I was installing to slot b instead of slot a, but otherwise, things were the same.
A side note... I hadn't got around to installing TWRP 3.3.0 so I did that but it couldn't mount /data. TWRP 3.2.3 can mount /data, so I installed that again.
a1291762 said:
I just used the same process to go from 10.0.7.0 to 10.0.8.0. This time I was installing to slot b instead of slot a, but otherwise, things were the same.
A side note... I hadn't got around to installing TWRP 3.3.0 so I did that but it couldn't mount /data. TWRP 3.2.3 can mount /data, so I installed that again.
Click to expand...
Click to collapse
I have successfully updated to 10.0.8.0 with Magisk 18.1, now on Magisk 19.1, everything is running fine. I'd like to also install TWRP but refrain from doing so because of the problems (bootloops, crashes, etc) the official TWRP 3.2.3 shows with decryption in Pie and mounting external or even internal sdcard. I wonder if the latter is fixed in the inofficial fixed version. I think the benefit of TWRP is not worth the effort of repeating a1291762 wonderful tricky procedure on the monthly OTA update basis.
However the procedure is very smart, a back-to-the-roots approach of former days... great, I like it.
But I don't understand how a patched_boot.img can be created from an empty file (boot_a)?
[dd if=/dev/block/by-name/boot_a of=patched_boot.img bs=1024k] Locating the boot_a in </dev/block/by-name/> reveals a boot_a file with 0 bytes. Moreover, to unzip the zipped stock boot Image in </data/stock_boot*.img> or </sbin/.magisk/mirror/data/> I am looking for a command that just returns the boot file rather than expanding it to the full partition. Weird, can anybody help?
Thanks again to a1291762
grufty47
It appears that it is not possible to add some boot.img as attachment
grufty47 said:
I'd like to also install TWRP but refrain from doing so because of the problems (bootloops, crashes, etc) the official TWRP 3.2.3 shows with decryption in Pie and mounting external or even internal sdcard.
Click to expand...
Click to collapse
I use official TWRP 3.2.3. Only really to fix bootloop problems.
I don't have a SD and no problems mounting data.
Lots of people following the TWRP install guide seem to get bootloop. I solve that by patching boot with Magisk. Some people recommend installing an old about image.
If you have a backup of boot you can at least restore that if you have problems.
grufty47 said:
But I don't understand how a patched_boot.img can be created from an empty file (boot_a)?
Click to expand...
Click to collapse
Welcome to Unix, where nearly everything is a file.
Hard disk? /dev/sda
Partition? /dev/sda1
File? /mnt/sda1/file.txt
In this case, boot_a is a way to access a partition on the phone's flash. Actually a link (shortcut) to /dev/mmcblk0p52. Partition number 53 on flash chip 1. The size can't be seen because it's a device and not a file.
grufty47 said:
I am looking for a command that just returns the boot file rather than expanding it to the full partition.
Click to expand...
Click to collapse
dd is a command to read a device. The partition is 64M big so that's the size of the file. gzip can compress well because the actual image is only 24M big and the rest is empty.
Magisk knows how to do it. A tool called magiskboot but I don't know where it lives or how to run it.
I found this header from magiskboot. It shows how the boot.img is structured.
https://github.com/topjohnwu/Magisk/blob/master/native/jni/magiskboot/bootimg.h
I just did the 10.0.9.0 OTA. I added a section of updating your patched_boot.img (since the Magisk updates I did made my old one useless) and I changed the backup instructions due to changes in Magisk 19. If you know where the stock boot lives before reboot, please let me know.

Can I Modify boot.img to install Magisk in "Core Only"?

I have a Google Pixel 3a (Google Store), bootloader unlocked, been on Magisk Canary since I got it. When I updated to Android 10, one of the modules I had installed (Miracast enabler) was/is not compatible and caused a bootloop (I know, I'm stupid). Flashing the stock boot.img of course solves the problem because root is gone. This is an A/B boot device an 10 so:
- TWRP cannot decrypt /data which means I cannot access /data/cache
- No access to /data/cache means I cannot add the 'disable_magisk' file to boot Core Only mode
- No data/cache access also means I cannot simply delete the module/s
- Magisk through TWRP command prompt or adb are useless because, again, I cannot access /data/cache
The only possible solution I can think of is to modify my boot.img to boot Magisk in Core Only mode so I can remove the module, then flash a proper modified boot.img to regain full Magisk capability. I have poured over online documentation and cannot seem to find the answer on how, if possible, I can do this. Magisk's own documentation seems to suggest the only solution is to wipe /data.
Is there any way I can modify a boot.img to boot Magisk in Core Only mode always? Thank you!
MichRT said:
I have a Google Pixel 3a (Google Store), bootloader unlocked, been on Magisk Canary since I got it. When I updated to Android 10, one of the modules I had installed (Miracast enabler) was/is not compatible and caused a bootloop (I know, I'm stupid). Flashing the stock boot.img of course solves the problem because root is gone. This is an A/B boot device an 10 so:
- TWRP cannot decrypt /data which means I cannot access /data/cache
- No access to /data/cache means I cannot add the 'disable_magisk' file to boot Core Only mode
- No data/cache access also means I cannot simply delete the module/s
- Magisk through TWRP command prompt or adb are useless because, again, I cannot access /data/cache
The only possible solution I can think of is to modify my boot.img to boot Magisk in Core Only mode so I can remove the module, then flash a proper modified boot.img to regain full Magisk capability. I have poured over online documentation and cannot seem to find the answer on how, if possible, I can do this. Magisk's own documentation seems to suggest the only solution is to wipe /data.
Is there any way I can modify a boot.img to boot Magisk in Core Only mode always? Thank you!
Click to expand...
Click to collapse
Here you go :
https://forum.xda-developers.com/showpost.php?p=80190577&postcount=554
Since then there was also a patch to magisk to resolve this kind of issue.
While you can't boot you can still use "magisk --remove-modules" through adb shell (or twrp I guess), which will automatically remove all your modules next time you boot.
reyqn said:
Since then there was also a patch to magisk to resolve this kind of issue.
While you can't boot you can still use "magisk --remove-modules" through adb shell (or twrp I guess), which will automatically remove all your modules next time you boot.
Click to expand...
Click to collapse
You have to use last magisk (above 19.4 if my memories are right).
HpNoTiQ said:
Here you go :
https://forum.xda-developers.com/showpost.php?p=80190577&postcount=554
Click to expand...
Click to collapse
This looks like it might work, so thank you! I found a similar, though different solution (below)
reyqn said:
Since then there was also a patch to magisk to resolve this kind of issue.
While you can't boot you can still use "magisk --remove-modules" through adb shell (or twrp I guess), which will automatically remove all your modules next time you boot.
Click to expand...
Click to collapse
I ran into the issue that while boot-looping with a magisk patched boot img, I wasn't able to run the command, adb wasn't finding the phone. I tried again after booting TWRP and it basically threw an 'error - command not found'.
HpNoTiQ said:
You have to use last magisk (above 19.4 if my memories are right).
Click to expand...
Click to collapse
I think you are right, in beta/canary channel
@Tulsadiver gave me a hand with this, see here: https://forum.xda-developers.com/showpost.php?p=80398385&postcount=35997
Thank you guys!

Categories

Resources