I lost access to my OnePlus 3 and removed TWRP as a side effect of my attempts to recover from that situation.
To get TWRP back, I installed adb
and fastboot
on my laptop running Ubuntu 16.04. I tried the packages adb
and fastboot
as well as the packages android-tools-adb
and android-tools-fastboot
. Same result in either case.
If I boot my device up (system is still on it but I can't unlock the device) while my phone is connected, my laptop shows me 2 devices. One is the device's data (which I can't access because I can't unlock the device) and one contains among other files a configuration file for adb
. I ran it after it didn't work before stumbling upon it and running it but it still doesn't work in exactly the same ways as before.
Here is part of my console history:
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ sudo adb connect
Usage: adb connect <host>[:<port>]
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ sudo adb reboot bootloader
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device '(null)' not found
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ sudo adb reboot bootloader
error: device '(null)' not found
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ sudo adb reboot bootloader
error: device '(null)' not found
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ sudo adb reboot bootloader
error: closed
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ sudo adb reboot bootloader
error: closed
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ sudo fastboot flash '/home/christoph/Downloads/twrp-3.0.2-0-oneplus3.img'
< waiting for device >
^C
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ fastboot flash '/home/christoph/Downloads/twrp-3.0.2-0-oneplus3.img'
< waiting for device >
^C
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ sudo adb sideload '/home/christoph/Downloads/twrp-3.0.2-0-oneplus3.img'
Total xfer: 0.06x
christoph@christoph-laptop-16-04-2:/media/christoph/OnePlus Drivers$ sudo adb reboot
error: device '(null)' not found
The line where it says Total xfer: 0.06x
in the output was executed after going to the sideload option in the recovery. Doing a sideload there is the only thing which appears to work.
The 2 line above it (the fastboot
ones) and the one below it were executed in that mode, too. The first 2 were executed while the device showed the lock screen. And the rest was executed while in fastboot or recovery (I don't remember but they seem to behave the same way).
Starting out using sudo
turned out to be unnecessary and to create a .android
folder located in my home directory which only root can access. I deleted it, purged the packages mentioned above, and tried it as normal user executed the configuration script as a normal user, with still the same behavior.
- Main question: How do I get TWRP back?
- Overriding question: How do I get access to my phone back preferable after reading the SD card so I can retain my data?
- Sub-Question: Why doesn't any of the commands work, except one in a special mode?
I suspect the last one has to do with my phone not knowing about the public key which has been created by adb
and stored in ~/.android
but if a public key is needed to be authorized to make changes to the phone by default and to issue an authorization requires a working and accessible system, that seems like a bad setup for something you can't just boot a live system on and chroot
into the installed system from there.
Regarding the likely-to-be-posed question of how I got TWRP onto my phone in the first place: I don't remember. I remember that I once got my hands on a Windows machine because I didn't manage to do something that had to do with adb
/fastboot
on my Linux computers and ran some graphical software to get the job done but I don't recall whether that was about my OnePlus 3 or my Nexus 4. I currently have access to a Windows PC via an admin account if I ask nicely, for about the rest of the week. After that, in regards to having elevated privileges, it's back to 4 computers (which means that I should be able to rule out connection problems due faulty USB hubs or configuration mistakes) which all only run GNU Linux operating systems, but I have restricted access to Windows machines at uni. Edit: I remembered that my laptop came with some kind of windows (I think it's either Windows 8 or 8.1) but I removed the HDD right when I got it. I'm currently where that HDD is and can take it with my to plug into my laptop in case I need a Windows with admin privileges.