Difficulty copying ROM - TWRP sees encrypted data only - Xiaomi Mi Note 10 Questions & Answers

I unlocked the phone via Xiaomi then patched the boot with magisk. Now I can confirm phone is rooted, flashed twrp twrp-3.6.2_9-0-tucana onto the phone. Phone boots into recover and twrp works but looking for rom to load only shows encrypted files.
Don't think Xiaomi supports side loading, keep getting error no permissions (user in plugdev group; are your udev rules wrong?) and I have killed server and restarted and done $ sudo usermod -aG plugdev $LOGNAME.
So I'm stuck with a phone that boots stock or loads twrp but I can't access files. How do I copy a rom over?
Note I read one comment that twrp should ask to unlock same as stock rom (screen pattern) but twrp is NOT asking for this.

Hi, i had the same problem and fixed by booting the same recovery image from fastboot with command:
Code:
fastboot boot recovery.img
The prompt for the pin appears magically.

Related

TWRP can't flash .zip's on my new factory encrypted device, how can I still root it?

Hi,
Yesterday my WileyFox Spark+ came in, which is still equipped with COS13.0.1, based on Android 6.0.1.
When I tried rooting the phone, I got stuck at the point of using TWRP for flashing SuperSU.zip.
Until then, I had succesfully followed the following process:
-Enabled 'OEM Bootloader allowed to be unlocked' in Developer Options
-Installed USB drivers and such on PC
-Enabled USB debugging, apps from unknown sources, ADB install unsigned apps allowed etc.
-Unlocked bootloader like this in CMD:
fastboot devices (my phone showed up)
fastboot flashing unlock
I pressed volume up button (yes)
I selected boot mode fastboot
-Flashed TWRP Recovery to phone like this in CMD:
fastboot flash recovery twrp3100.img
-I booted into TWRP recovery
A lot of folders and some files were present there, but almost all folders were 'empty'. I couldn't reach my SC-Card with SuperSU.zip on it.
TWRP even said no OS was installed when I wanted to reboot to retry.
I was confused for a while, only to discover the OS was still there after booting into System.
I tried to flash SuperSU from ADB, but that also didn't work. I issued the following commands in CMD:
adb reboot recovery
(ticked adb sideload in TWRP +wipe dalvik & cache)
adb sideload supersu279.zip
TWRP said it executed succesfully, but failed to access /data and /cache.
It was at this point that I discovered the phone was encrypted already from the box. I had never considered this as an option.
It's weird though, because I have heard that flashing SuperSU from ADB should work even with an encrypted phone.
Now the interwebs and WileyFox themselves say Encryption is disabled when you factory reset the phone. So I did that, but it just booted into TWRP with the same circumstances.
Few folders, almost all empty. SD-card not visible.
I tried sideloading SuperSU again, but without result.
Any idea how i should progress further? 'Cause I have run out of ideas..
Is it possible to flash SuperSU via fastboot or anything?
I have found a LineageOS 13 ROM for my phone, but it's a .zip so I don't think I can use it.
Anyway, any help would be greatly appreciated!
Cheers.
NB: I don't care about encryption, i'd rather have it gone, but whatever option is best for rooting this thing will work fine for me.

Badly f*d Op7Pro. Need help to revert to stock

Hi,
First of all, yes, I have checked the other threads that talk about reverting to stock and I am still stuck.
So I installed Kang OS which is Android 11, and now I want to revert to stock. I have tried downloading multiple different versions of the fastboot ROM from the page https://androidfilehost.com/?w=files&flid=294300 and run the flash all batch file and every time I am either getting stuck in a boot loop or getting the Verity Crash Dump Screen. I have managed to reach the fastboot screen, and I am waiting on the fastboot screen, for someone to show me some way.
Thanks in Advance.
If you used a pin then your storage is encrypted and the rom you are trying to flash can't use it, that's why you're most likely stuck at boot.
I ran into the same issue and posted about it in the same thread. I think we will need a new version of TWRP as 3.4.0-0 would not accept my pin which had not changed.
To fix your issue, sadly, you'll need to wipe your storage:
Boot the phone into fastboot mode
Attach your USB cable to the phone/PC
Download and unzip the file I've attached (ADB/Fastboot)
Launch an elevated command window in the folder you extracted the attached zip to
Try the command fastboot devices and ensure that it reports the device correctly, if not then you need to install the latest OnePlus drivers
Type the following in the command window : fastboot -w (This will wipe the storage)
Try your rom again (TWRP should remain as the recovery if you had flashed it already, if not then copy the latest TWRP img file to the same folder as the ADB/Fastboot tools, use fastboot and type boot twrpfilename.img this will make the phone boot into TWRP recovery, you can then copy over the TWRP zip and flash it to recovery using the booted version of TWRP)
Once you've done the above you shouldn't really need to use the fastboot scripts as the latest rom should just flash from TWRP.
Get msm download tool for guacamole which is the codename of the op7p. I know the shorts with the global version I am unsure if this works with T-Mobile or others?
MSM is a bit of a severe fix when they've already confirmed they can still get fastboot, MSM is for completely bricked phones that can't access anything. Wiping the storage and going to fastboot will allow them to just flash recovery then flash the stock rom. Way easier.
Boot into twrp. Then format data. Phone will boot then.

Bootloop after installing magisk module

Hello,
it is my first time modding my phone (Sony XZ2c) and unfortunately I have run into some issues. Let's start with what I have got working:
bootloader unlocked, Lineage OS 17.1 installed, root access by magisk. I was trying to install Viper4Android using this tutorial:
[MOD][V4a][TUTORIAL] ViPER4Android - How to install
Thread to be closed.
forum.xda-developers.com
Unfortunately, after rebooting I get stuck on Sony logo. I can get into fastboot and boot from twrp image but my data storage is encrypted. I tried uninstalling magisk by sideloading uninstaller and flashing boot with stock Lineage OS boot image without success. Is there anything else I can do?
I do not mind wiping everything but: I would like to recover my contacts and photos, plus I spent a lot of time configuring my system and apps so I would like to avoid doing it all again...
Thanks for help!
ML11 said:
Hello,
it is my first time modding my phone (Sony XZ2c) and unfortunately I have run into some issues. Let's start with what I have got working:
bootloader unlocked, Lineage OS 17.1 installed, root access by magisk. I was trying to install Viper4Android using this tutorial:
[MOD][V4a][TUTORIAL] ViPER4Android - How to install
Thread to be closed.
forum.xda-developers.com
Unfortunately, after rebooting I get stuck on Sony logo. I can get into fastboot and boot from twrp image but my data storage is encrypted. I tried uninstalling magisk by sideloading uninstaller and flashing boot with stock Lineage OS boot image without success. Is there anything else I can do?
I do not mind wiping everything but: I would like to recover my contacts and photos, plus I spent a lot of time configuring my system and apps so I would like to avoid doing it all again...
Thanks for help!
Click to expand...
Click to collapse
There is an adb command to delete all magisk modul;es, while keeping magisk. I dont have the link right now.
Personally, I would go into TWRP and delete the viper folder under /data/adb/modules and also check (ie delete) for scripts in /data/adb/post-fs-data.d and /data/adb/service.d
If the above doesn't work, you've got details on other methods here:
https://www.didgeridoohan.com/magisk/Magisk#hn_Disablinguninstalling_modules_manually
DiamondJohn said:
There is an adb command to delete all magisk modul;es, while keeping magisk. I dont have the link right now.
Personally, I would go into TWRP and delete the viper folder under /data/adb/modules and also check (ie delete) for scripts in /data/adb/post-fs-data.d and /data/adb/service.d
Click to expand...
Click to collapse
/data/adb is encrypted unfortunately...
adb wait-for-device shell magisk --remove-modules
This does not work. The phone reboots and get stuck on Sony logo. I guess it only works when the device gets stuck on OS, otherwise adb cannot access the device?
I am wondering why the device does not boot after flashing stock Lineage OS boot image? After staying on Sony logo for a while it gets into fastboot again (blue LED and fastboot detects the device).
ML11 said:
/data/adb is encrypted unfortunately...
adb wait-for-device shell magisk --remove-modules
This does not work. The phone reboots and get stuck on Sony logo. I guess it only works when the device gets stuck on OS, otherwise adb cannot access the device?
I am wondering why the device does not boot after flashing stock Lineage OS boot image? After staying on Sony logo for a while it gets into fastboot again (blue LED and fastboot detects the device).
Click to expand...
Click to collapse
Let nme start by saying, I have NO experience with encrypted phone recovery, but I do understand you wish to keep your data & config. To check your phone, I would try making a nandroid (of the current broken image), flashing a clean image to see if that boots, and its not something deeper in the ROM or the physical phone.
And again, no experience with recovering an encrypted device, have you tried flashing the boot AND system? ie a dirty flash? This would probably be the first attempt, after a nandroid of course.
DiamondJohn said:
have you tried flashing the boot AND system? ie a dirty flash?
Click to expand...
Click to collapse
Could you please explain exactly how to do that? I have: stock Lineage OS recovery image, Lineage OS flashable zip and images extracted from the payload file from the zip: boot, dtbo, system, vbmeta, vendor. What commands should I use?
Is fastboot flash boot boot.img and fastboot flash system system.img correct?
Should I flash both boot_a and boot_b?
Amazing! after flashing boot_a and boot_b and system my phone boots correctly to Lineage OS.
The only thing that I see is the wallpaper and "Phone is starting". Now how should I get back to the state before installing this module? I made a backup of system partition by adb and twrp.
EDIT: I have access to the settings so I managed to uninstall Viper4Android and reboot to safe mode. Still trying!
Unfortunately, due to encryption I am still not able to access photos but I see the files are still there. Should I now restore the system in twrp? Partitions that I can restore: system image, system, vendor image, boot, oem_image, oem. I have also a backup from adb using this command adb backup --twrp system boot. How should I proceed to get everything working again (Viper4Android is uninstalled, I flashed magisk boot again and used magisk --remove-modules so all the modules should be removed). Is is safe to restore now? Which partitions should I restore?
I flashed boot_a boot_b and system (fastboot used system_b).
Any ideas how I should proceed? I tried to restore system and system image in twrp but the phone does not seem to boot. If I just pull or copy the encrypted data, wipe and reinstall the system and then move the data back, will this work and I will be able to access the data when I boot to the system?
After a lot trials I gave up and decided to wipe everything and reflash the system... Fortunately, the most important stuff had been backed up before. Thanks @Didgeridoohan and @DiamondJohn for help!

Need help needed with fastboot(loop)

I've decided to upgrade to OOS11 stable and patch the boot before going into the rom. What I did was:
1. Flash latest TWRP (3.5.2_9-0)
2. Reboot to recovery
3. Flash ONLY OOS11 boot.img
4. Flash TWRP again
5. Install Magisk and Kirisakura-R 1.1.1 kernal (for f2fs support)
6. Reboot to recovery
Here I was going to do the same on other partition but TWRP failed to boot and screen kept flashing but I noticed that ADB was connected so I rebooted to fastboot and flash stock boot I've previously extracted from stock ROM. Now I face another problem, phone doesn't boot anywhere else but fastboot.
I've tried a few stuff to get it back.
# There were some cases where the phone won't boot with bootloader unlocked and stock boot so I managed to patch boot.img with Magisk using an emulator and then flash it.
# Tried booting into TWRP but phone phone would get stuck in "Fastboot mode" screen with fastboot still connected (And taking commands from PC).
# Tried flashing TWRP to boot partition which worked previously but this time the problem stayed and kept booting into fastboot.
A few more points that I should mention,
# I've backed up my entire phone using TWRP so I can unbrick it if I somehow manage to get into TWRP
# I don't have the backup on my computer. It's on the phone.
I absolutely can't lose those data. Yeah, mistake on my side for not backing up on my computer but to my defense, this never happened before so I let my guard down this time.
What options do I have left? Any hint would be appreciated. Thanks for reading

Please help. Bootloop stuck for no reason. Xiaomi mi 9 lite. Need to prevent data loss.

Hello.
Stock Xiaomi mi 9 lite, global rom
My phone started to lag hard so I decided to reboot.
Reboot took ages, stuck on MI logo, finally phone rebooted into recovery (5.0)
Reboot option makes phone try to boot (about 3-5minutes) and goes back into recovery.
Adb doesn't connect with recovery and device so no shell etc.
Connect to MiAssitant option allows side load connection via adb.
I can adb reboot bootloader to get into fastboot.
All those options do not allow for data recovery or bootloop fix without loss.
Phone is stock ROM, stock recovery, not unlocked.
I'm out of options. I need to save the data. Contacts etc.
Thanks for any help.
the only way I can image is read userdata partition off device, run fsck on linux, and restore partition image from EDL mode.
https://github.com/bkerler/edl
prog_ufs_firehose_sdm710_ddr.elf
I know what you have to do, give me some time to write k , kinda busta now
Nerfpl said:
Hello.
Stock Xiaomi mi 9 lite, global rom
My phone started to lag hard so I decided to reboot.
Reboot took ages, stuck on MI logo, finally phone rebooted into recovery (5.0)
Reboot option makes phone try to boot (about 3-5minutes) and goes back into recovery.
Adb doesn't connect with recovery and device so no shell etc.
Connect to MiAssitant option allows side load connection via adb.
I can adb reboot bootloader to get into fastboot.
All those options do not allow for data recovery or bootloop fix without loss.
Phone is stock ROM, stock recovery, not unlocked.
I'm out of options. I need to save the data. Contacts etc.
Thanks for any help.
Click to expand...
Click to collapse
try the loader first. you need to find a way to enter EDL mode. this is done either by deep flash cable or via modified fastboot.
[GUIDE][TOOL] Reboot to EDL mode from FASTBOOT! No More "Test Point Method"! [kenzo]
[GUIDE][TOOL] Reboot to EDL mode from FASTBOOT! No More "Test Point Method"! [kenzo] Reboot to EDL mode from FASTBOOT! No more Test Point Method needed ;) Technical Details: Redmi Note 3 support rebooting to EDL in Android Bootloader aboot...
forum.xda-developers.com
EDL tool works best on linux. you can copy re_livedvdV4.iso to pendrive with rufus.ie and boot from BIOS F11 or F12 key.
download the loader, open Terminal with ctrl + alt + T and try to print partition tables while phone is connected in EDL mode. note there is a timeout.
Code:
edl printgpt --memory=ufs --loader=path/to/prog_ufs_firehose_sdm710_ddr.elf
if the loader works you can dump userdata partition off device.
(open your windows drive in explorer first)
Code:
cd /media/ubuntu/<your windows drive UUID>/Users/<user>/Desktop
edl r userdata userdata.img --memory=ufs --loader=path/to/prog_ufs_firehose_sdm710_ddr.elf
Now you can try to fix possible errors on dump file. this won't change anything on phone. then try to mount.
Code:
sudo apt install f2fs-tools
sudo fsck userdata.img
sudo mkdir /media/ubuntu/data
sudo mount -vo loop,ro,noexec,norecovery userdata.img /media/ubuntu/data
sudo ls -la /media/ubuntu/data
(you should see encrypted files)
I didn't had deep flash cable or modified fastboot so after searching and trying every option (even asked ChatGPT, great source btw) i wiped everything using MiUnlock (phone was registered for unlocking).
It worked without problems in fastboot mode.
Next i installed twrp and installed Xiaomi eu ROM.
Lucky turned out phone had google sync on so many stuff was not lost.
(No i'v read it was about modified fastboot file, my bad. Thanks for great answer anyway)

Categories

Resources