Failed to mount ' /presist' ( Structure need cleaning ) - Xiaomi Redmi Note 7 Guides, News, & Discussion

Hi,
I just wana share what happened to me.
I backup nandroid in TWRP and then flash custom ROM and everything was fine but when I try to restore stock Rom in TWRP I got ''error'' in TWRP and than reboot in to system and got bootloop.
''Error'' in TWRP is: Failed to mount ' /presist' ( Structure need cleaning )
what I find is where is the trouble is if you look in Backup option in TWRP I have option to back up Persist (0 mb) and Persist_image (32 mb)
and I thought what if it's a problem if TWRP first restore Persist_image which is (32 mb) and then again restore Persist ''partition'' which is 0 mb that means TWRP then just wipe Persist ''partition'' and there are no Persis files on this partition.
so I whent back to restore and UNCHECK PERSIST AND LEAVE JUST PERSIST_IMAGE (32mb)
and voala (how Franch says )
it is working again.
I'm on MIUI Global 12
HOPE THIS HELPS

If you mess up that persist.img file , you'll loose widevine L1 forever. As far as I'm concerned with it , don't touch it if you are not sure about it.

Related

/system corrupted

Hello, last night I have unlocked the bootloader flashed twrp -0 official build and magisk it was all good and was working then i wanted to install the last eu beta and flashed but flashing it always corrupting the file system, to solve it I have flashed stock rom via fastboot
Problem here I do not wipe /system directory but whenever I try to flash a custom rom the file system directory is corrupting and consequently the device is stucking on twrp. Is there an idea?
MertFatih said:
Hello, last night I have unlocked the bootloader flashed twrp -0 official build and magisk it was all good and was working then i wanted to install the last eu beta and flashed but flashing it always corrupting the file system, to solve it I have flashed stock rom via fastboot
Problem here I do not wipe /system directory but whenever I try to flash a custom rom the file system directory is corrupting and consequently the device is stucking on twrp. Is there an idea?
Click to expand...
Click to collapse
1. It must to be in QUESTIONS & ANSWERS and not in GUIDES, NEWS, & DISCUSSION.
2. What exactly corrupted? There is system partition which is not file system And there is a data partition which you can call a file system
3. If the problem was in system partition you would be stuck in fastboot.
4. What steps did you make after flashing stock rom via fastboot?
For flashing eu beta ROM after flashing stock rom via fastboot, the steps are:
1. FORMAT (not wipe) data.
2.Wipe cache/dalvik cache (don't wipe system or flash a ROM without reboot).
3.Flash eu ROM.
You can try another TWRP for example: https://forum.xda-developers.com/Mi-9/development/recovery-unofficial-twrp-xiaomi-mi-9-t3905825 , official TWRP is based on it or from Chines team: http://files.mi-room.ru/files/twrp/cepheus/3.3.1-1030/recovery.img . Both very good.
g_seva said:
1. It must to be in QUESTIONS & ANSWERS and not in GUIDES, NEWS, & DISCUSSION.
2. What exactly corrupted? There is system partition which is not file system And there is a data partition which you can call a file system
3. If the problem was in system partition you would be stuck in fastboot.
4. What steps did you make after flashing stock rom via fastboot?
For flashing eu beta ROM after flashing stock rom via fastboot, the steps are:
1. FORMAT (not wipe) data.
2.Wipe cache/dalvik cache (don't wipe system or flash a ROM without reboot).
3.Flash eu ROM.
You can try another TWRP for example: https://forum.xda-developers.com/Mi-9/development/recovery-unofficial-twrp-xiaomi-mi-9-t3905825 , official TWRP is based on it or from Chines team: http://files.mi-room.ru/files/twrp/cepheus/3.3.1-1030/recovery.img . Both very good.
Click to expand...
Click to collapse
Update: after format, it stucks on twrp(directories are not encrypted), and rom is not flashing at all I mean it is not writing to /sdcard (loading screen says it successfully flashed but not in the reality )and there are only 'obb' and 'TWRP' directories in the /sdcard also the twrp version is not even change by fastboot or flashing img after a reboot it recovers itself to build -0
I will try it with the Chinese teams's twrp build for this time
Solved with another twrp version

MIUI 12 K20 Pro Vendor Partition files edit.

Hello everyone , I was wandering if someone could help me with this issue.
First My phone State and system :
I got an Unlocked k20 Pro , flashed with MIUI 12.0.2 Global (Mi 9T Pro) , rooted wigh magisk (Twrp of course too v3.4 ) , Encrypted storage too.
I am trying to edit some files in the vendor partition but all the changes I make get reversed back , tried everything , Partition mounted as R/W in root explorer , changing the SE Context , but it seems as if all my work is on memory only, and not commited to disk, and everytime I restart the phone it rolls back on how it was before.
Tried copying my edits through TWRP , same result , restart and changes are gone.
So my question is what is happening exactly ? and what should I do to edit the vendor partiton?.
Thought about DM-Verity , tried disabling it using different methods (flashing Universal Zip amd manual editing ) always end up in a bootloop.
The root seems only to allow editing system partition.
Are the files backed up? and then restored if edited ?
Thank you in advance
urbanmec said:
Hello everyone , I was wandering if someone could help me with this issue.
First My phone State and system :
I got an Unlocked k20 Pro , flashed with MIUI 12.0.2 Global (Mi 9T Pro) , rooted wigh magisk (Twrp of course too v3.4 ) , Encrypted storage too.
I am trying to edit some files in the vendor partition but all the changes I make get reversed back , tried everything , Partition mounted as R/W in root explorer , changing the SE Context , but it seems as if all my work is on memory only, and not commited to disk, and everytime I restart the phone it rolls back on how it was before.
Tried copying my edits through TWRP , same result , restart and changes are gone.
So my question is what is happening exactly ? and what should I do to edit the vendor partiton?.
Thought about DM-Verity , tried disabling it using different methods (flashing Universal Zip amd manual editing ) always end up in a bootloop.
The root seems only to allow editing system partition.
Are the files backed up? and then restored if edited ?
Thank you in advance
Click to expand...
Click to collapse
1.Mount vendor image in ubuntu pc... Edit and flash it.
2.In twrp edit in
/system/vendor
Confirm vendor partition mounted in twrp.
[email protected] said:
1.Mount vendor image in ubuntu pc... Edit and flash it.
2.In twrp edit in
/system/vendor
Confirm vendor partition mounted in twrp.
Click to expand...
Click to collapse
Thank you for the answer, however, and after doing some reading, the situation is much more complex, and might be, at the moment, not possible.
It might have something to do with miui dynamic partitons, and twrp not supporting it.(read only mode).
Also, mounting on linux wont work because the dedup ext4 , and unpacking repacking then flashing wont work because , at the moment, I found no way to disable DM-verity on miui 12.0.2(The phone will not boot).
I solved my problem anyway , via Magisk , I just created a module and done what I wanted.(Thats what magisk is for in the first place )

[HELP] user data on internal storage lost

I violated the first rule of updating. I did not make a proper backup.
Before the loss phone was unlocked, rooted and on Android 9 stock rom.
I thought I could flash a TWRP recovery on my phone to make an entire backup of everything.
Code:
C:\Users\deinemutter\Downloads\xiaomi mi a2\platform-tools_r31.0.2-windows\platform-tools>fastboot flash boot "C:\Users\deinemutter\Downloads\xiaomi mi a2\lineage-17.1-20210410-recovery-jasmine_sprout.img"
Sending 'boot_b' (24509 KB) OKAY [ 0.550s]
Writing 'boot_b' OKAY [ 0.234s]
Finished. Total time: 0.950s
and from here it went downhill. The reboot got me a bootloop.
In fastboot I flashed patched_boot_10.0.9.0_mi_a2.img and stock_boot_10.0.9.0_mi_a2.img on both boot slots hoping that it would get me out of the bootloop. Well, it didn't. It was probably the wrong boot image.
Downloaded Xiaomis official Flash Software MiFlash2018.5.28.0 and an official stock rom jasmine_global_images_V11.0.22.0.QDIMIXM_20210309.0000.00_10.0 and was very relieved to find the option "save user data" when flashing.
I did chose this option to find out later that this wasn't the case. My data on the internal storage was gone and my phone wasn't rooted anymore.
I downloaded all kinds of restore software on my laptop for my android device. Only to find out that the only data they software could find was the newly copied data on the new rom. Rooting my phone in the process to allow deep scans just came out empty.
Now I am thinking of copying the entire image of my phone to my laptop hoping that the data will somewhere in the image. Is this even worth it?
I am at the end of my knowledge and hope that you can help me a little.
1. If You have read more guides before flashing anything, You'd learn that this phone has A/B slots ROM structure and thus does not have dedicated partition for recovery, and thus TWRP cannot be flashed directly into boot partition without erasing boot image and spoiling OS. Any recovery must be embedded into boot image, as stock recovery is embedded into stock boot image. And thus, after recovering working OS, if You still insist in having TWRP instead of stock recovery, You'll need to boot into TWRP from PC and then install appropriate TWRP.zip thus patching currently used boot image, and this procedure will be needed after each OTA.
2. To have working OS, as You are sure that phone is unlocked, just flash one of available fastboot ROM images (search in Guides forum https://forum.xda-developers.com/t/fastboot-jasmine-xiaomi-mi-a2-fastboot-images.3824849/) via fastboot. Note that:
2.1. forget about MiFlash, use fastboot.exe from Android platform-tools (ADB/fastboot);
2.2. MiFlash in special patched version is only needed for TestPoint/Edl unbricking of locked phones;
2.3. best Android 9 version is 10.0.17.0;
2.4. when flashing 10.0.17.0 use "flash_all_except_data.bat" to keep user data;
2.4. updating to Android 10 (any version) will need factory reset, thus user data will be lost;
2.5. user data most probably still can be saved in TWRP backup for future restore, or you can 1st recover Android 9 and save your data;
2.6. do not use so called "official TWRP", I regard working https://forum.xda-developers.com/t/...mi-a2-jasmine_sprout-by-d4e8ede8f1f2.3941096/ and https://forum.xda-developers.com/t/recovery-unofficial-teamwin-recovery-project.4209151/ ; do not forget to enter proper code when TWRP starts to decrypt /data partition.
Aerobatic said:
1. If You have read more guides before flashing anything, You'd learn that this phone has A/B slots ROM structure and thus does not have dedicated partition for recovery, and thus TWRP cannot be flashed directly into boot partition without erasing boot image and spoiling OS. Any recovery must be embedded into boot image, as stock recovery is embedded into stock boot image. And thus, after recovering working OS, if You still insist in having TWRP instead of stock recovery, You'll need to boot into TWRP from PC and then install appropriate TWRP.zip thus patching currently used boot image, and this procedure will be needed after each OTA.
2. To have working OS, as You are sure that phone is unlocked, just flash one of available fastboot ROM images (search in Guides forum https://forum.xda-developers.com/t/fastboot-jasmine-xiaomi-mi-a2-fastboot-images.3824849/) via fastboot. Note that:
2.1. forget about MiFlash, use fastboot.exe from Android platform-tools (ADB/fastboot);
2.2. MiFlash in special patched version is only needed for TestPoint/Edl unbricking of locked phones;
2.3. best Android 9 version is 10.0.17.0;
2.4. when flashing 10.0.17.0 use "flash_all_except_data.bat" to keep user data;
2.4. updating to Android 10 (any version) will need factory reset, thus user data will be lost;
2.5. user data most probably still can be saved in TWRP backup for future restore, or you can 1st recover Android 9 and save your data;
2.6. do not use so called "official TWRP", I regard working https://forum.xda-developers.com/t/...mi-a2-jasmine_sprout-by-d4e8ede8f1f2.3941096/ and https://forum.xda-developers.com/t/recovery-unofficial-teamwin-recovery-project.4209151/ ; do not forget to enter proper code when TWRP starts to decrypt /data partition.
Click to expand...
Click to collapse
I read through some guides here but it wasn't all that clear to me as you put it here.
Regarding your points:
2. My phone was unlocked
2.1 I used both MiFlash and fastboot
2.4 it is exactly what I did with MiFlash to keep user data but that didn't happen
2.5 is the real question. How can I save my user data after I flashed a new OS it with MiFlash that did'nt save userdata how can I recover if not all but at least a portion of it. Would a copy of the entire image help? or what other options do I have?
OK, again ....
If you have already erased /data partition with MiFlash, user data is lost, no chances.
If you have already made factory reset (erased /data partition) trying to upgrade to Android 10, user data is lost, no chances.
If you have not erased /data partition, and you are sure that you had Android 9, just flash 10.0.17.0 (latest working Android 9) fastboot ROM image using fastboot .exe and "flash_all_except_data.bat", you should be able to boot into OS.
As for backup and restoring /data partition - it is a trivial operation in TWRP, noting that:
- working TWRP is used (see above);
- TWRP is booted into via fastboot (not flashed! - for Nth time!);
- you do not skip the step of entering code when TWRP is booted into (otherwise TWRP won't decrypt /data);
- phone has enough free space in /data to backup /data (and then without working OS you'll need to pull sdcard/TWRP/backups/ via ADB) or (simpler) external SD/SDD/HDD is attached via OTG.
Apart from the condescending tone and the partial useless repetition of information I did not ask for or need, thanks, I guess

How To Guide [INSTRUCTION] How to make backup, restore TWRP on MIUI (error 255, fork etc)

Hi,
We have MIUI based on A12,
Some of You want to make NAND backup on A11, but always data backup make error like: fork, error 255 etc.. There is nice way to fix it.
Instuction below to make NAND backup correctly:
1) On miui setting remove second space, remove second user
2) boot into twrp
3) run script: RMDAD_v0.0.1.zip
4) go to console on TWRP, write on it: rm /data/extm -Rf
5) make succefully backup (data partition)
To restore from A12 to A11:
1) flash xioami eu fastboot A11 rom with format https://androidfilehost.com/?fid=2188818919693786473
2) fully boot
3) go to twrp, flash xiaomi eu new rom (stable or beta what U use before)
4) IMPORTANT!!!!! fully boot, set password - screenlock!
5) go to twrp, copy your TWRP backup to phone from computer, restore it
6) boot fully
7) reboot again
8) everythin is ok (miui backup data partition dont has icos size and font size set etc, all apps etc come back)
Paweł
Hey, thanks finally, I was able to make the copy correctly.
arti65 said:
Hey, thanks finally, I was able to make the copy correctly.
Click to expand...
Click to collapse
Have a nice day
Hello and thank you for this guide. Just a quick question : when you say "set password - screenlock!", should it be the same as before, or not necessarily ?
And also : why did you not put the "rm /data/extm -Rf" in the RMDAD script ?
I've been trying for several days now to backup my currently running MIUI to try something different and be able to get back quickly to something stable, but no luck for now...
I could addtrur, password whatever
Sorry I didn't cet you here...
Hello, I tried your solution, my backup was a bit long but successful, but the restore was a failure.
In fact on the first boot after restore, I always stay on the Mi logo and black screen with the dots at the bottom...
I'm on Redmi Note 10 Pro on MIUI 13 (Android 12) and I only restore data partition.
Can you help ?

Realme X2 Pro TWRP Lineage install without error but cant boot

I got an European Realme X2 pro on which i now got TWRP running (after flashing a modified vbmeta image and only one TWRP version seems to work). Of course the bootloader is unlocked. The problems is that when i change setting in TWRP and reboot it doesent save them.
Also when i install a lineageos 19 zip, this goes through without an error, but it only boots to bootlaoder.
After rebooting (from twrp) files in /sdcard are gone, is this normal?
And lastly when i go to wipe in TWRP it doesent give me the option to wipe system, altough i can "mount" system. In Backup TWRP shows that there is a system partition which has 1450mb.
Thanks for your replies in advance
Links:
Modified TWRP and modified vbmeta: https://forum.xda-developers.com/t/...l-twrp-for-rui2-realme-x2-pro-stable.4388355/
Lineage: https://forum.xda-developers.com/t/...-realme-x2-pro-rmx1931-cn-unofficial.4355023/

Categories

Resources