Bricked during Downgrade, and manage to unbricked - OnePlus 3T Questions & Answers

In the way to downgrade from 4.0.2 to 3.5 I have soft bricked , here is steps
1) I have taken Nandroid backup with Modem and EFS.
2)Wipe all , Format data.
3)Put OS 3.5 zip and SU on phone.
4)Flashed 3.5, but during flashing it got stuked on patching system unconditionaly, canceled and returned to TWRP.
5)Again wipe all.
6)Now unable to mount system, mtp not working.
7)Tried Unbricked tool, didn't got any luck.
8) So I have no OS nothing on it, only TWRP.
9)Tried adb sideload, didn't work.
10)Finally Manage to adb push full os and su.
11)Flashed using TWRP with su, got flashed this time but /data failed error.
12)Booted but it says encryption unsuccessful, your device got damage, Reset Phone.
13)Tried Reset, but didn't work only same screen again.
14)Again format data using TWRP, and finally device got booted.
15)Now device is Decrypted, working fine.

Related

Can't use ADB because RSA key is not available

So my Kindle Fire HD 7(2012) is bricked after trying to factory reset CM12.1. I took some advice and tried to run some ADB commands and then ADB says device unauthorized. Since my Kindle is stuck at the TWRP boot screen I cannot accept the RSA key. What should I do?
wizahh101 said:
So my Kindle Fire HD 7(2012) is bricked after trying to factory reset CM12.1. I took some advice and tried to run some ADB commands and then ADB says device unauthorized. Since my Kindle is stuck at the TWRP boot screen I cannot accept the RSA key. What should I do?
Click to expand...
Click to collapse
Reboot into TWRP, select Wipe -> Advanced Wipe, and then check all the boxes and swipe to wipe. At this point, all your system, data, and cache partitions will be completely empty, so you will need to reboot into TWRP again (ignore the warnings about not having an OS installed or root), copy a ROM zip from your PC to the kindle's internal storage, and flash it. Once you have it flashed, you'll be starting with a clean state (much like a factory reset), so you should have the ability to set up the device again once the ROM fully boots and get ADB to work.
monster1612 said:
Reboot into TWRP, select Wipe -> Advanced Wipe, and then check all the boxes and swipe to wipe. At this point, all your system, data, and cache partitions will be completely empty, so you will need to reboot into TWRP again (ignore the warnings about not having an OS installed or root), copy a ROM zip from your PC to the kindle's internal storage, and flash it. Once you have it flashed, you'll be starting with a clean state (much like a factory reset), so you should have the ability to set up the device again once the ROM fully boots and get ADB to work.
Click to expand...
Click to collapse
Device is stuck at the TWRP boot screen so I can't do any of that.

How to reset phone after installing TWRP?

My P9 no longer boots after I tried to edit /data/system/packages.xml to enable SD card writing It boots up but it doesn't let me unlock the phone. logcat shows lots of "java.lang.SecurityException: Permission Denial" so I assume I made an error when editing the file. Grr.
I have rooted it and installed TWRP. I can still boot into TWRP and also the Huawei erecovery. What is the best way to reset the phone? My understanding is that TWRP can't read /data so I assume that it can't wipe it. Is that correct? If I do the erecovery and download an image over Wi-Fi, will that break anything?

Bootloop after installing Philz touch + OS not installed + Download mode not going.

I have smtd GT-i9000. I was having error like /data, /system, /cache all were not mounting after installing Lineage OS - https://forum.xda-developers.com/showpost.php?p=70866902&postcount=51
Previously I had installed Marshmallow Rom using CWM Recovery and it automatically installed TWRP 3.0.2. From then on when I tried to flash the Nougat Lineage Untested Rom using ADB Sideload data got unmounted. But then I formatted the data to ext4 and it again got mounted but still when I flashed even Jelly Bean official rom error 7 was seen. I tried to remove the assert code but still it did not worked. Then after rebooting or something everything cache, data, system everything got unmounted and I cannot even change file system. I thought all the problem was because of twrp so I flashed philz touch 6.19.3 now it goes on bootlooping. I cannnot even go to download mode by pressing the buttons. Going to download mode was not possible even before. I am newbie so I do not know much about these. Please help!!! It is not my phone its my friends mobile so he will screw me up! Please help...
Edit: In short
1) Bootlooping Philz Touch 6.19.3
2) Cannot go to download mode by buttons (Even when phone was not bootlooping).
3) Cannot mount /data /system /cache file systems even though I tried formatting.
4) Previously while installed twrp 3.0.2 and all file systems were mounted and good I could not flash even jelly bean rom and it said error 7.
5) Please tell is there any force way of installing stock rom or anything and repair all these and get out of bootlooping. It is not my phone but my friend, he will screw me up for what I have done. Please help me. Please XDA Developers. Please....
Edit: Now I can go to download mode. Please guide me how to mount and install recovery and install any working rom for my device. Mine is from India.

Advanced advice for internal storage recovery after attempted flash to LineageOS 17

Hi everyone. Got a puzzle for you forensic data recovery guys out there. I am a fool having a bad day today. For the first time in 10 years of screwing with Android, I backed up my ROM with twrp and also backed up my sms and calls, but then managed to somehow forget to copy those files off the internal storage before trying to flash my phone to LineageOS and botching the internal storage. Here is what happened.
0) Before state: Rooted (I think) and for sure running OxygenOS 5.0.3, flashed via TWRP. TWRP version 3.2.1-0. 128 GB OnePlus 3T
1) Backed up System, data, etc to backup on internal storage via TWRP. Booted into OS and backed up SMS and calls to .xml file.
2) Wiped data, system, cache and dalvik/art cache.
3) Downloaded LineageOS w/ microG via zip in TWRP and attempted to install. Received error that I needed to update the modem to at least 9.0.3.
4) Mounted storage from TWRP and copied in Stable9.0.3+Firmware+Modem_OnePlus+3T.zip. Ran the install and was successful.
5) Installed lineage-17.1-20200826-microG-oneplus3.zip via TWRP. Left prompt to install TWRP checked and booted into OS.
6) Upon boot, saw the message: "Decryption unsuccessful" The password that you entered is correct but unfortunately your data is corrupt.
7) Rebooted back into TWRP to mount storage. Could not get anything to mount because it would not accept my decrypt passcode.
8) Figured TWRP bug, flashed twrp-3.4.0-0-oneplus3.img via fastboot. Could decrypt now with passcode but all storage read 0MB
9) Flashed modem back to OnePlus3T_5.0.3-25-05-18-FIRMWARE-flashable.zip via adb sideload method which is what I assume I was running before since that was the OS version. Rebooted
10) Booted back into TWRP, discovered I still couldn't see files. Downgraded TWRP back to 3.2.1-0 via fastboot.
11) Unable to decrypt from TWRP or even install zips. No change at any point in the OS. Flashed TWRP back to 3.4.0.0.
12) Ran adb shell twrp decrypt XXXXXX (where XXXXXX is my pin) which gave me this message:
Attempting to decrypt data partition or user data via command line.
(then it returned to shell so I assume it worked)
13) Ran an ADB pull command (adb pull /dev/block/dm-0 backup.img). There is obviously something there because it downloaded 111 GB worth of .img file (which I'm 99% certain was the amount of space I had used on the phone). Tried to open the .img file with multiple EXT4 programs and they all said the file/partition was corrupt.
14) Tried to wipe data via TWRP. Failed to wipe because it couldn't be mounted. Followed this:
https://************/how-to-fix-twrp-unable-to-mount-storage-internal-storage-0mb/
15) Ended up with MTP mount of 101 GB free space. Everything seems to be lost on the phone at present. No programs I use to recover the data off the MTP mount (just doing a raw file scrape) can see it as a OnePlus in Windows.
After finding a better guide on XDA, it sounds like this is a known issue that happens when you go from 5.0.x to 9.x on this phone where your encryption breaks and you lose all files. Unfortunately I saw that about 15 minutes after step 14...
My next thoughts would be to:
a) downgrade everything (ROM, firmware, etc) and then try to push the 111 GB .img file back to the phone via ADB, then flash a stock OnePlus 5.0.3 ROM over it to see if I could get the internal storage to mount again. Don't even need to boot into the OS--just to get the internal storage mounted again through TWRP.
--OR--
b) convert the .img file to a .raw and then possibly a .vhd and use Recuva or something to scan the image of the phone and see if I can find those .xml files and maybe a twrp backup if I'm lucky. Although if the entire .img contents is still encrypted and not actually just a corrupt android filesystem, I think I am hosed on this option.
I would prefer option a) but I didn't know if anyone had any insight on this. I thought maybe there would be a way for me to get into the filesystem via ADB maybe and clear out some botched encryption cache or keystore/etc in order to get it to mount again. I'm also not sure if you're able to downgrade the firmware or modem either from 9 to 5 (even though I never got errors on downgrade). Thoughts? Am I just royally hosed?
Tried option b. Nothing but garbage. I made a backup of the .img file this time... so still would be willing to try option a) unless anyone thinks that this is impossible.
Edit: yep... may be too late... https://forum.xda-developers.com/on...-9-0-3-5-0-8-firmware-barrier-t3941164/page18
To my knowledge the data partitions content is unrecoverable lost after the reboot from 5) to 6). The img contains the messed up (and still encrypted) dm0 container but without the enctyption footer which is "outside" the dm0 container in sda15 (aka userdata) partition. To decrypt the img you are missing the device dependent key (an encrypzed partition can be decrypted only on the device the enctyption has been done on) as well as the encryption footer (which is messed up after the reboot).
Format data (not only wipe!) and start over.
Thanks for the reply. That makes sense and is what I was afraid of.
I wonder if it would be possible to regenerate the crypto footer by doing something like this to get the HMAC keys and then flashing a rom to recreate the cryptofooter and then editing the key values to reflect the old cryptofooter values based on the KeyMaster extraction via this exploit.
http://bits-please.blogspot.com/2016/06/extracting-qualcomms-keymaster-keys.html?m=1
It might depend on how much of the cryptofooter is left and whether or not 5.0.3 is vulnerable to these CVEs...
I’m not sure if I know enough about the KeyMaster structure to know how to rebuild it even if I were able to retrieve the HMAC keys.
I also know TWRP now supports EDL so perhaps there is something with a Qualcomm tool I could yse to assist.
Obviously this would mean security issues for everyone on these older builds if I am able to regenerate the crypto footer.
Are you aware of adb commands or likewise that I could run to survey the KeyMaster damage?
As stated: to my knowledge the data is lost after the first reboot with the 9.0.x bootloader.
If you search the official los thread (don't remember if 17 or 16) you'll find some detaled postings on restoring the keys after updating the bl from 5.0.x to 9.0.x. The user, who has examined that has failed, but perhaps it helps to shine some light on your questions.

help pls rog phone 2 soft bricked

Getting Failed to clear BCB message: failed to open /dev/block/boot/device/by-name/misc: No such file or directory after phone crash​
cant solve this please help
tried edl recovery flashed well but didnt solve problem
i have unlocked the bootloader and flashed many raw firmware didnt solved problem
flashed twrp sucessfully but cant mount storage intenal storage 0mb and cant swipe anything
get this message everytime in recovery
Getting Failed to clear BCB message: failed to open /dev/block/boot/device/by-name/misc: No such file or directory after phone crash​
please help
I have no idea it helps, I had my phone crash on me and me trying my old-and-tried flashing etc. I did not have such BCB message, but it sounds like there is an issue with the partitions or partitioning.
There are nice YouTube videos at least that show how to flash the stock ROM (not giving link here for advertising etc).
it boils down to (FIRST get your data off the phone as you are going to lose this)
- TWRP being bootable
- in TWRP: factory reset, wipe data
- flash stock ROM twice: to partition A and after reboot to TWRP, to partition B. I do not know why this needs to be done, love to learn it by myself.
- flash without wiping a custom recovery if wanted.
- restore your data

Categories

Resources