How to reinstall Magisk/root after updating to MIUI 12.5.2? - Xiaomi Poco X3 NFC Questions & Answers

I should have expected this but after updating to MIUI 12.5.2, Magisk/root is no longer installed and the Magisk App only offers the option to "Select and Patch a File" , which I understand requires a full wipe and I don't want to do that.
Orangefox is also corrupted. I can still boot to it but it doesn't prompt me for my encryption code, so it can't access the data partition. Maybe I can just reflash that but can I flash Magisk from there after that to restore root without having to wipe the phone?

So it appears that the problem is MIUI 12.5 (or any MIUI ROMS based on Android 11), prevent decryption working in recovery mode. https://wiki.orangefox.tech/en/guides/encryption
I tried flashing TWRP and that doesn't decrypt the storage and just shows gibberish filenames too.
So, if we can't decrypt in recovery mode, we can't make backups and we can't install Magisk to restore root to make backups with apps like Titanium, what are we supposed to do?

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.

Official twrp app and TWRP backup

TWRP official app when searching for device doesn't have my device listed and TWRP manager can't detect Twrp does anyone know why this might be?
Also I'm having trouble backing up using twrp it fails with the error code 255? I've tried to unmount data change the time but still fails.
TWRP is not officially released for Mate 9, it's unofficial build/s.
And that error just mean you're encrypted, like Mate 9 is by default.
To remove encryption you'll have to Format - Format Data (This wipes everything including internal sdcard), after this you will have to flash SuperSU 2.82 SR3+, Magisk v14 (14.3+ doesn't remove encryption flag so it won't work without modifying Magisk source) or modify your boot image manually.
And then download and flash Public + HW zip for your firmware from http://pro-teammt.ru/firmware-database/

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.

Fail to permanent install and access TWRP due to encryption

Recently I just downgraded my Mi Mix 2s to MIUI V9.6.4.0.ODGMIFD via Miflash and planning to stay on this (global) rom. However, after flashing the latest twrp from the official link (v3.1.1-1) it did not ask for the lockscreen password upon entering the interface and my files just showed up with random filenames.
After some reading, I suppose my device is encrypted and twrp did not let me to decrypt it (without asking for lockscreen password). The random filenames still happens even I remove the lockscreen password before flashing twrp meaning the device is still encrypted. Before I could do anything else (flashing zip files, making backups, etc) I must format data to remove the encryption, but twrp will disappear after I booted into system and did the initial phone configuration. Tried different versions (from 3.2.3-0 to 3.3.1-1) but to no avail. The only way I can retain twrp after booting into system is to flash Magisk zip right after formatting data, but if I enter twrp again the filenames are still in random characters as before and I couldn't do anything in it.
So my question is how can I properly install twrp into my device without having the encryption issues? Could it be the rom that caused the problem or did I missed out any steps that fails to disable the encryption? Thanks for your attention.
WannaFly3721 said:
Recently I just downgraded my Mi Mix 2s to MIUI V9.6.4.0.ODGMIFD via Miflash and planning to stay on this (global) rom. However, after flashing the latest twrp from the official link (v3.1.1-1) it did not ask for the lockscreen password upon entering the interface and my files just showed up with random filenames.
After some reading, I suppose my device is encrypted and twrp did not let me to decrypt it (without asking for lockscreen password). The random filenames still happens even I remove the lockscreen password before flashing twrp meaning the device is still encrypted. Before I could do anything else (flashing zip files, making backups, etc) I must format data to remove the encryption, but twrp will disappear after I booted into system and did the initial phone configuration. Tried different versions (from 3.2.3-0 to 3.3.1-1) but to no avail. The only way I can retain twrp after booting into system is to flash Magisk zip right after formatting data, but if I enter twrp again the filenames are still in random characters as before and I couldn't do anything in it.
So my question is how can I properly install twrp into my device without having the encryption issues? Could it be the rom that caused the problem or did I missed out any steps that fails to disable the encryption? Thanks for your attention.
Click to expand...
Click to collapse
Guess I've found a workaround for this by installing the OrangeFox recovery project (ofrp). For those who stuck at the same issue as mine this is what I did:
1. Flash twrp img through adb fastboot.
2. Format data to remove encryption.
3. Paste ofrp zip file into the device and flash it via twrp, which boots the phone into ofrp interface.
4. Paste the recovery zip file into the device and flash it via ofrp. Under setting - MIUI OTA it should show 'enabled' (for android 9 and above might need to uncheck disable dm-verity first according to ofrp page, but my rom is at android 8 so I left it checked as default before flashing).
5. Reboot to system and complete the initial configuration.
6. Reboot to recovery again and ofrp should remain installed. From there I was then able to perform a backup.
Btw, under phone settings it says my device is still encrypted although I can access to ofrp without having the encryption issue as in twrp (random filenames, cannot transfer files or create backups, etc). Anyhow I now have a working custom recovery on the stock rom, cheers.

a51 recover data

Hello.
I have a problem: after downgrading my device from Magisk 24.1 back to Magisk 23 I can't unlock my device.
I can only see my wallpaper, but it doesn't respond to touch actions and may reboot.
When I reflash patched boot magisk file it is all the same thing.
Reflashing original boot makes only bootloop or message that data is incompatible.
It is Android 10, AP data file: 'AP_A515FXXU3BTF4_CL18770262_QB31913704_REV00_user_low_ship_meta_OS10'
The question is: how can I pull my /data and /sdcard from my phone?
The recovery is stock version, I've tried to flash TWRP, but TWRP sees only gibberish encrypted file names.
I made a copy of /data/unencrypted folder seems to be containing decryption keys. and entire sda32 containing data partition.
Please help me with ways to restore the system without data wipe or ways how to backup data before reinstalling firmware.
You could try to recover you data with Samsung Smart Switch, when IT doesn't work, there is a way top recover Data from a Phone with ADB tools and a PC.

Categories

Resources