Restore Bricked OnePlus 6T on Linux
-
I have been messing around with my 6T trying out Postmarket OS w/Posh and Ubuntu Touch after having /e/ OS on the phone and ended up bricking one slot on the phone as a result of how /e/ OS uses the A/B slots. Since I am a daily Linux user for a long time I do not have access to a Windows machine to use the factory restore tool available on XDA (I think it is called MsMdownloadTool). I tried a Linux tool that is supposed to work the same but it was just extra problems.
In the end I found how to flash the stock Oxygen OS via Fastboot and made a bash script to automate the process on Linux. My script uses all the .img files from the fastboot 9.0.17 oxygen release found here.. My script is based off the windows scripts included in the download. Note: The included version of TWRP did not work for me and I had to use the one below.
TWRP Fajita version from here.
EDIT: See below
-
I have remade these scripts making everything interactive and allowing you to select which slots you want to flash for both the system and recovery.
The entire thing is now on github. The release section now has all the scripts and the binary img files for Oxygen OS9 so you no longer need to create the scripts and find the files.
You just need to run
flash_all.sh
and it will guide you through reflashing the phone back to OOS9. For OOS10 just use the factory update feature.
To reflash one slot without losing data on the other slot skip wiping data and skip flashing 'persist'.
-
@antidroid This is the process I have been following. I have used your script several times. It works flawlessly! Spot on for me.
Thank you so much for your work. -
Hi, is this possible to make work with oneplus6 (without the "T")?
I have also messing around with different os's and everytime I flash something evolved with linux, I cant go back to stock android with my oneplus6. It would be great to have some sort of backup to work with.
-
@antidroid 1) Will this also work on an OP6? 2) I am not sure of the process. Where do I run the flash_all.sh, from my laptop terminal or from the phone? Do I need to download the files to my Linux laptop or will they be pulled in when the script is executed? Sorry I am pretty non-technical and new to all this but want to get my OP6 back to factory so i can try to install LineageOS.
-
@ronbillock I took my phone to service, and it took two days and 29e to them to reinstall stock android. So not the worth of trying to get it myself with old winlaptot and trying to make the MMStool work. I tried countless methods from xda forum, but seems that there are most win users, so with linux I had no luck. Myself, I am not either so tech, so I rely on forums and pure luck when messing around with the custom roms
-
@hekathegreat Hi, I'm facing same problem here on Op6t. No luck with Linux, nor with Windows.
What did they tell you in the repair shop? What was the issue there? Corrupted partition/s?
29β¬ is not bad price for restoring it, better than to buy another phone. -
I repaired a bricked Oneplus3 using the ADB sideload feature in recovery and the zipped stock ROM.
-
@stefano After installing PostmarketOs, there was no way back to android, at least not with my knowledge. After hours of trying, I took my phone to service, here in Finland it was mcare, which supports mainly apple and oneplus devices. Just look some oneplus service and dont tell them that you have been playing with custom roms My op6 got onto bootloot so "that was the reason", no questions asked.
-
@mrt10001 if you can get into recovery, it is not bricked
-
@hekathegreat O.K, thanks for the info.
I was flashing TWRP recovery and I already had UT on it. Never happened to me with any other phone, well, not in such a level that I can't fix it myself. I might try again to use MSM tool, but since I don't use Windows, it's rather a pain to do it. So many versions of MSM tool, so many versions of drivers to try... I'll give it another shot and then just repair shop, I guess...Edit:
I managed to fix my Op6t with Windows ( yeah, unfortunately not Linux.
I used MSMtool and it finally worked. The culprit was , you have to install the driver once in Qualcomm Crashdump mode connexeted to PC, then unplug it, swithch the phone off, launch the MSMtool, hold the volume up on the phone and at the same time just plug it to PC. Then MSMtool program already running, it just detect it and do all for you. Clever. I couldn't believe it. I was trying to flash the phone with fastboot for fortnight now and I just done it and I'm so happy. Phone is ok. UT is going there very soon. -
@hekathegreat If you get into recovery and can't do anything else, it's bricked.
-
@mrt10001 With the 6T it can often "look" bricked. Hold for bootmode as long as you humanly can, and when you can hold no more it should turn on.
-
@totalrando I use all my tools at hand and have a lot of success in recovering bricked devices. The Oneplus3 that would not leave recovery after many, many attempts, I managed to sideload Android, which worked, then allowed me to unlock the bootloader, which makes it so much easier for future repair. I have sore fingers from the amount of power and volume button holding on these devices.
My advice is if a phone is bricked i.e. is totally dead, leave it on charge for 24 hours. If that doesn't work, charge it attached to a PC, not a laptop or plug in charger. I have got a lot of devices going again just by plugging it into a PC (making sure the PC is on) for an hour or so.
If it boots to the bootloader and that's all it does, try to erase/format the cache with fastboot. If that fails, good chance the storage (eMMC) has failed.
If you can get TWRP going, format the partitions and wipe the data. If it fails at that, it is either a partition table error or there is hardware failure. I have seen this lots on the Nexus4 and 5, repartition ZIP is fantastic here.
If all that fails and you always boot back to recovery, it usually means a hardware failure, CPU, eMMC, RAM. I persevere here just to make sure, and will strip the device down and look for any flaws on PCB's or connectors. Usually you will see moisture damage that can be repairable with some isopropyl alcohol. The biggest cause of shorts though is usually a damaged USB connector. Thankfully most these days are a separate cable as my solder skills are awful. That can cause all sorts of funny issues.
Once all back together, if it works great. If not I break it for parts.
So to me bricked is a dead phone, a phone that boots to the bootloader and stops, a phone that boots to recovery and stops or the phone that bootloops after you have tried everything.... -
-
@MrT10001 Hi, did you sideload android in a locked bootloader? Because you said you unlocked the bootloader after it. I thought it was impossible to sideload or flash anything in a locked bootloader (sideload is like a flash). Also, to sideload you only can do adb sideload, but from the fastboot you can't use adb.
-
@jordimas I sideload the stock ROM through the op3 stock recovery. That can be done with a locked bootloader.
-
Hi @jordimas,
The "recovery mode" is part of the boot loader, similar to the PC.
It can be used to repair and/or sideload the current OEM operating system.Fastboot is more like a "bios".
Fastboot is a "command-line tool" with many more commands than just the one Β«flashΒ».
But be warned, you can destroy your device, because similar to the bios of PCs, there are different fastboot properties depending on the device manufacturer.See also here https://technastic.com/fastboot-commands-list/#Fastboot_Commands_List
and in particular here https://technastic.com/fastboot-commands-list/#Fastboot_Command_to_Unlock_the_Bootloader
and https://technastic.com/fastboot-commands-list/#Prerequisites
finaly https://technastic.com/fastboot-commands-list/#Reboot_the_Device_into_the_Recovery_Mode
You should read up more before you try it out. Above all, it should always be device-specific.
Greetings Mario
-
@AntiDroid So i ran the script you provided with all the images, and it got pretty far. It flashed after the part where it said go into the twrp main menu and then press Y to continue, then it restarted....but now my OnePlus6T will not go back into fastboot mode. It just automatically boots into Qualcom CrashDump Mode. It does nothing else.
-
Hi @wurmphlegm
Have you tried to force the fastboot mode?
I remember having to do it manually as the installer wasn't able to make my device comply.
So I used the volume buttons and power button to make it happen.