[SOLVED] Not able to flash Any ROM via TWRP - Redmi K20 / Xiaomi Mi 9T Questions & Answers

I have the MIUI v12.0.3, that's is full working, installed by Fastboot and XiaomiFlash. Then I flash the recovery TWRP mauronofrio and if I try to install any ROM what I get is a reboot into the recovery....
If I browse with the recovery into my files they are gone, in the root there are just a lot of folders with strange names like "7fdhuyfdsgu8fdhdH8fdhHBJN", inside those folder other strange folders.
The strange behaviour is that if I try to upload anything with a PC while the recovery in mounting a partition the file just won't upload, it sticks on 0%.
The only way to have a functioning OS is then use the XiaomiFlash again a flash the original latest MIUI.
This is SO WEIRD . I don't know how to do.
By now I have tried this ROMs:
- Havoc OS
- Resurrection Remix
Do you have any helps? I think is something with encryption, because when I try to save the log on the SD card with TWRP I get
E:Unable to decrypt FBE device
UPDATE:
I found this topic: https://forum.xda-developers.com/showpost.php?p=80209338&postcount=2
Following what the comment says, I figured out to Boot the ROM Havoc-OS... BUT all my data are still crypted I guess...
I installed a simple file manager from the play store and what I see are all the strange folders in the root of the phone...
SOLUTION:
After following that thread, what I had to do is just use TWRP mauronofrio and Format Data (not wipe). This will erase everything and solve the crypto problem. :good:

Related

TWRP unable to decrypt internal storage and adb sideload "cannot read file"

Hey guys, this all started when I tried to lock my bootloader to do the oreo update... Long story short, I'm left with an empty system partition and when I boot into TWRP (https://forum.xda-developers.com/on...overy-twrp-3-2-1-0-oreo-oxygenos-5-0-t3725723), all I see is a bunch of gibberish file names. I've tried wiping data and rebooting into TWRP (I heard that wiping the data partition will decrypt your storage), but that doesn't work. I've also tried to adb sideload oxygenOS 4.5.14 using both TWRP and the stock recovery-- On TWRP I get the error "cannot read [filename]", and on the stock recovery, my PC doesn't recognize my phone. Is there any solution to this?
Flash with OTG?
PS: Formatting removes encryption.
I also got the same problem as u, what i did is install the twrp 3.2.1 by codeworkx, then factory reset via the twrp menu, then sideload the oos ob3, and install the zip file. And it should work perfectly

TWRP can't stay, even flashed by installer

Hi guys,
I'm not newbie with flashing but this one I don't understand.
Probably I've done some mistakes with flashing/install/uninstall of roms/magisk/twrp.
Now I'm stuck with TWRP and can't boot into system because of something.
Every time I run TWRP and try to install all my files are encrypted, no matter I install TWRP by .img or .zip. Only working TWRP with decryption is temporary one, by "fastboot boot twrp-3.3.1-6-fajita.img" command. But when I flash it by regular .img file by this tut (https://forum.xda-developers.com/on...overy-unofficial-twrp-touch-recovery-t3861482), after reboot it's back like 3.3.1-6-fajita version, BUT without decryption skills.
I thing I done some mistakes with uninstalling magisk ect. but I think it doesn't matter.
I tried to uninstall magisk by Magisk-uninstaller-20190204.zip on both slots, I tried install all again in regular way (install temp TWRP through fastboot command, install TWRP through this temp TWRP, install full newest OTA .zip, install TWRP again (I know I shouldn't but I tried both combinations - .zip and .img) and install Magisk and at least system reboot. But when I rebooted between OTA and Magisk (like guide tells) TWRP can't decrypt files. No matter what I've done nothing helped.
What can I do that I have not done yet? Of course, all is about I don't want format my data and re-install all from the scratch...
So... tell me, is possible to make TWRP great again?
Is everything only showing as encrypted when you try to restore a backup? I've been booting the img via fastboot then flashing the zip as it seems you have and it's been working fine as far as it staying installed and not showing all my files as scrambled, I also made the mistake of using Magisk uninstaller at one point, that didn't end well. Seems these A/B phones are temperamental as hell. I read somewhere else that doing backups to USB storage my be more reliable for a backup restoration, not sure if that would effect the encryption issues or not but I may have some time to test that tonight.
I've done that too - not helped. I restored my full nandroid backup by fastboot temp recovery (as I wrote, only this one can decrypt my files) but I've got "You device is corrupt"... and of course TWRP can't decrypt my files.

TWRP not displaying files (Encryption issue)

Hi Guys,
I unlocked the bootloader and flashed twrp following this tutorial - https://www.youtube.com/watch?v=tRcYUMBgvaI
I was getting an error while flashing a custom rom and gapps. It showed "storage space is insuffient". So I wiped internal storage and did a factory reset also.
After that I copied all the files (rom, gapps, magisk) to the internal storage from PC. But when i checked in the twrp there is not file.
I think its due to the twrp encryption. I used to get the initial message in twrp to allow modifications or something. But now its just rebooting to twrp and no files is there. But connected to PC I can see all files.
Please help. Its an urgent issue, that I took my wife's phone to flash and need to return it atleast in working condition. Else you guys know the consequences right:silly:. Its a kind request.
Thanks...
i have the same problem , when i load twrp it asks to put the decrypton code but it says that its wrong..

Phone not accessable after trying to install Custom Rom

Hi,
so i've tried to root my phone and then to install a custom rom. the root went without any problem. After the root, i tried to install lineage OS 16.0 and followed this guide:
https://forum.xda-developers.com/redmi-note-7/development/rom-lineageos-16-0-t3923203
i downloaded the rom and gapps, put them on my root directory of my phone and then i wiped System,Cache ,Data, Internal Storage and Format Data. After wiping, the roms were gone, so i rebooted and transfered them again into the root directory. Then, i went onto installing (just like i did with magisk) but an error occurred saying:
E: String resource 'zip_compatible_err' not found. Using default value.
Zip Treble compatibility error!
Invalid zip file format!
Error installing zip file '....'
Updating partition details...
...done
Ok. So then, i tried to install another Custom Rom so i went for Oxygen OS, it actually did install but then i couldn't boot into it because it was telling me there was an 'Android System Error'. Ok, back in TWRP, i wiped everything and then i tried to install the Original ROM but i got the same error as above.
For now i tried to download the miFlasher tool but it only wants to download some driver and it literally takes forever.
Hope you can help me...
Download Fastboot ROM for your device and do this Fastboot Method
marcopast said:
Hi,
so i've tried to root my phone and then to install a custom rom. the root went without any problem. After the root, i tried to install lineage OS 16.0 and followed this guide:
https://forum.xda-developers.com/redmi-note-7/development/rom-lineageos-16-0-t3923203
i downloaded the rom and gapps, put them on my root directory of my phone and then i wiped System,Cache ,Data, Internal Storage and Format Data. After wiping, the roms were gone, so i rebooted and transfered them again into the root directory. Then, i went onto installing (just like i did with magisk) but an error occurred saying:
E: String resource 'zip_compatible_err' not found. Using default value.
Zip Treble compatibility error!
Invalid zip file format!
Error installing zip file '....'
Updating partition details...
...done
Ok. So then, i tried to install another Custom Rom so i went for Oxygen OS, it actually did install but then i couldn't boot into it because it was telling me there was an 'Android System Error'. Ok, back in TWRP, i wiped everything and then i tried to install the Original ROM but i got the same error as above.
For now i tried to download the miFlasher tool but it only wants to download some driver and it literally takes forever.
Hope you can help me...
Click to expand...
Click to collapse
Those recoveries are old.. Use orange fox recovery 10.0-2 it will work and format data then install rom.
title?
@BlackGarnett
Thanks, that help me on a quick one!
@loseyourself
Also thank you for this advice, i'm new to rooting smartphones and install cfw since i was using iPhone for the past few years.
But now i got another new question: if i use orange fox recovery and i run a backup with it (i think there will be an option to do a backup), then i format all data and internal storage, can i still recover from the backup or will it be deleted?
thanks again!
marcopast said:
@BlackGarnett
Thanks, that help me on a quick one!
@loseyourself
Also thank you for this advice, i'm new to rooting smartphones and install cfw since i was using iPhone for the past few years.
But now i got another new question: if i use orange fox recovery and i run a backup with it (i think there will be an option to do a backup), then i format all data and internal storage, can i still recover from the backup or will it be deleted?
thanks again!
Click to expand...
Click to collapse
When u make a backup to internal all is lost after format it. Orangefox put files on the internal sd. After format reboot recovery in the option section and flash again Orangefox.
Help me ,i need efs backup for unbrick my decices please

[Q] [HELP] Odin/TWRP Flash successful, BUT not changing anything after reboot

TLDR : I Cannot MODIFY ANYTHING IN SYSTEM or USERDATA(i.e. internal storage) partitions. Files Deleted via twrp in System/internal storage comeback after reboot and new files added from computer vanish after reboot. Also NOW, different flashes are successful through both methods via -
1. twrp recovery-(Boot/recovery/CustomROMs flashes) and
2. ODIN-(boot/recovery/Stock ROM flashes)
but again dont change anything after reboot (previously both methods worked, so no issue with twrp or odin according to me). So, Whole storage (System+Internal Storage) is intact after Reboot as it is. Now I feel it has something to do with magisk. I can see exact file names both in internal storage and /system and do delete, move, rename i.e. any operations in twrp so i guess storage is not encrypted. I can boot into system for hardly 10-15 seconds after that it bootloops again, so i cannot do anything there. Only options to me is twrp recovery or odin, both are not helping for now.
--------------------------------- DETAILED EXPLANATION : ------------------------------------
[PROBLEM 1] DELETION:
Anything deleted via TWRP recovery in system partition or "EVEN in sdcard, i.e. internal storage" deletes successfully in twrp, without any error but comes back in the same state after the reboot. When i delete error causing file or folder via TWRP file manager, it gets deleted, and if you check again it's not there wherever it was present, but just after reboot every file and folder comes back to previous state like if nothing was done. This is true for any file present in any of the partitions. Newly inserted file in internal storage vanishes after reboot, and deleted file comes back after reboot - true for any partition. Status quo maintained !!
[PROBLEM 2] FLASHING:
To solve above problem, i thought it might be an issue with Magisk or the new twrp recovery, so i tried flashing Magisk Uninstaller zip in twrp, which again flashes successfully, SECONDLY- tried zackptg-(dmverity,forceencrypt Disabler) zip file, that also flashes successfully(i thought might be an issue of dmverity or encryption), and THIRD thing i tried flashing older twrp version recovery, that also flashes successfully but after reboot same currently installed twrp boots, not the newly "successfully flashed" older version. So i cannot change twrp-(tried both recovery.img flash in (1) twrp itself and (2) also through ODIN) - both returns flash successful and pass(in Green). FOURTH, tried dirty flash both (1) other ROM and (2) SAME ROM on top of current ROM- everything returns successful but after reboot boots the current erroneous ROM that i want to change. FIFTH, tried Clean Flashing i.e. wiped everything (selected 1. dalvik cache, 2. data, 3. cache, 4. system, 5. Internal Storage in wipe section) and also tried Factory RESET and FORMAT DATA option and after all this flashed Custom ROM zip file only (no gapps or magisk flash), but every wipe operation returns successful and ROM flash also successful, but when reboot into system again that bootlooping erroneous ROM that was present before all of these "successfully done" operations.
[PROBLEM 3] ODIN FLASH:
As all above failed, i thought flashing STOCK ROM through ODIN is my last resort. I did (1) Stock recovery flash through Odin- it was green pass (successful), but when booted returned that same twrp recovery not stock recovery. Tried (2) flashing Stock BOOT.img flash through ODIN, again it was successful but actual boot resulted the same Magisk Patched Boot.img. Third (3) tried flashing whole STOCK FIRMWARE - Official latest Stock firmware that was extracted from Samsung Smart Switch, with default options turned on in Odin, flash was again green-pass(successful) but auto reboot after successful flash through ODIN resulted same old erroneous ROM booting up like a VAMPIRE (I'm not dead, I'm Alive!!)... Fourth (4) tried flashing Stock Firmwave of step 3 with NAND ERASE and RE-PARTITION options turned on by inserting pit file to do BANG BANG, nuking my phone with these options that many people on internet advise not to use, screenshot attached below( it took 42 minutes to complete ), again using these options nand erase and re-partition also resulted successful(green-pass) and resulting that same untouched state as it was before.. Boots into twrp recovery not the stock rom or stock recovery with that same old erroneous ROM present in system with data partition intact. (Tried using different ODIN versions, different USB ports on my laptop, different non-official firmwares(but these non-official firmwares of SM-G530H resulted in some errors in ODIN, i.e. it was not green pass like that of official firmware, but resulted RED FAIL.))
[PROBLEM 4] SYSTEM_ROOT Created:
This i saw for the first time i guess, in my phone, and maybe the cause of this whole problem. Now my root directory in twrp '/ ' contains /system_root along with /system, /data, /cache. One more thing /system_root contains system folder ,i.e. /system_root/system results same things as /system . When checked in twrp>wipe section> Repair system> There System Mount Point is shown as : /system_root instead of previously used to be "/system" normal directory when /system_root was not present at all.
Another thing /system_root contains files like default.prop , init files, sepolicy which are also present in root directory ' / ' . This whole /system_root should not have existed at all when /system exists. Maybe /system_root or the init files or other thing present inside /system_root are preventing all the changes - deletion , flashing changes etc. described in this post and maybe this folder was created by step(3) flashing procedure below , i.e. due to magisk. Also formatting system in twrp>wipe>system returns successful msg but nothing is deleted when checked in twrp file manager or twrp>Backup (system partition backup size shows 1456 mb even after formating)
[OTHER THINGS I TRIED] to solve this -
- Deleting twrp folder to make it to default state, again it's successfull deleted but doesn't loads default configuration after reboot due to PROBLEM 1 above as deletion reverts back after reboot
- Fixing contexts in twrp
- reboot disemmcwp
- mount -o remount,rw /system commands in twrp terminal (again to mention every command that is possible to enter runs without any error, hence successful but problem persists even after that )
- flashing stock boot.img and recovery.img (both successful no changes observed after reboot, but after stock boot or recovery.img flash, if you flash magisk uninstaller zip it still says "magisk patched image detected", and next thing written after it is " ! (Exclamation mark) Boot image backup unavailable" , then "Restoring ramdisk with internal backup" again magisk uninstaller also returns successful. after reboot again runing uninstaller detects magisk again. and boots twrp only instead of stock recovery
- repair, resize system partition in twrp>wipe section results Twrp error 1 (might be due to that /system_root folder that contains now /system which is also present in ' / ' root
- Changing "system partition" file-system with all 6 options returns successful but filesystem stays ext4 only when checked again.
WHAT IS WORKING-
Odin is working. - i once flashed my first twrp recovery on this device through the same version
TWRP is working - Although this is new twrp version 3.6.1_9-0 that i flashed just few time before all this catastrophe happened (maybe it might be the cause or it may be magisk)
Current Configuration:
Device: Samsung Galaxy Grand Prime
Model: SM-G530H (fortuna3g)
ROM: [STABLE][10] LineageOS 17.1 GO by DarkDroidDev from xda
GApps: Customised OpenGapps package (this caused erroneous bootlooping ROM) - i can boot into ROM but it is very lagging, and reboots again after some time, ranging from 10-20 seconds to max 3 minutes. Launcher is not working. And Keyboard is crashing. I can go into settings to change something but change doesn't persists after reboot
Magisk: Magisk 23.0
What was my FLASH PROCEDURES before this happened-
- Cleaned dalvikcache, data, cache, system
- After this, Data and Cache showed 0mb in Backup option in twrp, system showed 2mb containing only usr folder, boot showed 13mb
- (1) Cleaned Flashed above ROM
- (2) Customized OpenGapps flash
- (3) Magisk Patched Boot.img flash - - (not magisk.zip installer, its magisk-patched-boot.img flash through twrp only)
- (4) Dalvik Cache Wipe
- Booted into System.
I was actually testing the customised OpenGapps package,
Before this flashed customised package 10-20 times. i was editing, flashing, seeing the changes... > then again editing, flashing. So this was not the first time.
If any error occured, like launcher not working, i again booted into twrp wiped system data or deleted particular launcher file in twrp, all worked, changes were successful then i again continued my testing.. editing packages > flashing > seeing the changes by booting into actual rom.
But this whole case happened during the iteration of my testing when i introduced Gboard apk, downloaded from Play Store from fortuna3g(this device), into the Custom Gapps Package.
So, the cause of all this according to my knowledge where i doubt maybe one of the following-
(1) - That Keyboard apk installation as system app (most probably permissions problem, as apk was fine as tested before on this device and resulted in keyboard related folders created in that /system/usr folder which always contained only one folder, but only this time contained this keyboard related stuff there)
(2) - That magisk-patched-boot.img flashing procedure, step(3) above, just after openGapps flash "without booting into system first" - this was done first time in my testing iterations, so might be incorrect procedure
(3) - Due to step (3), issue might be related to magisk related stuff - dm-verity, Force encryption
(4) - Creation of /system_root folder in root directory '/ ' maybe due to step (3), there used to be only /system there before
(5) - Hardware Problem, maybe that's why all those successful twrp and ODIN flashes not doing anything
Please suggest something that i have not tried and could solve this PROBLEM of NOT BEING ABLE TO CHANGE ANYTHING ON SYSTEM or USERDATA partition.
I know people here know a lot more than me, and can help me with their valuable suggestions and solutions, if any.
Thanks.
I found one xda thread almost with same issue as mine titled -
[Q] Weirdest problem - flashing anythin thru ODIN does not change anything in my S4​But no working solution there also
LinhBT said:
Need to know exactly if it's Snap or not. If it is, then there're 2 options you can try.
1. Ask some one have the same device model as you, do a ROM dump ( you can google for more detail ). Once you got that, I can share with you the tool needed for restore your device from that dump.
2. Try find your device's Factory Images ( similar to Fastboot ROM, but a little different ), and an authenticated prog of your SoC ( this I can share too if you choose this option ) then boot your device into EDL mode by using fastboot2EDL script ( on Git, you can google too ) then use QFIL ( one tool in QPST Tools by Qualcomm ) and force flash the images into the device.
So far as my experience and understanding, there're only these 2 solutions to fix your device ( if it's Snap powered ).
Click to expand...
Click to collapse
Hi mate, My phone is Snapdragon powered..
My problem is almost similar.. But not exactly.. After almost 2 months I am not able to find a solution.. But after this period of researching and googling about things related to my problem.. I feel now, either any one of the following is the cause of problem:
1. Emmc is stuck or locked in read-only mode (Can move files from pc , delete already present files anywhere in any directory, but all changes vanish after reboot... all file and directory structure remain intact- moved files from pc gets deleted.. and deleted files which were already present come back after reboot )
2. Corrupted /data and /cache partition, as e2fsck in twrp terminal results shows "filesystem still has errors" and "e2fsck: unable to set superblock flags on /dev/block/mmcblk0p** ) in both these file system (I think they are preventing flashing procedures- Odin stock firmware flashes and twrp custom ROM flashes both are successful, but after reboot no changes can be seen... - Even Recovery.img and boot.img flashes don't seem to work even both are shown successfully flashed in twrp) After reboot current version twrp boots again instead of newly flashed different version recovery.img ... same with boot.img even after running magisk uninstaller zip files.. running uninstall.zip 2nd or 3rd time also shows magisk patched image detected in log which should be removed in 1st iteration itself..
3. Might be magisk is preventing these changes to be made.. or It might be the /System_root creation as mountpoint for system partition which used to be previously /system normally. This might be the superblock creation which not used to be there. You can see my attachments in my thread to see my directory structure of system_root and my download mode picture
My Samsung's twrp and Download Mode seems to be working but no changes made by them even after successful operations by both.
Can you suggest anything @LinhBT ?

Categories

Resources