How to Root, unlock bootloader and custom recovery - OnePlus 2 Q&A, Help & Troubleshooting

First of all I am new to rooting and I just got my oneplus 2 and updated it into 6.0.1 and Oxygen OS 3.0.2 which guide should I follow?
I ve enabled debugging and oem unlocking, and the device is listed as ADB interface on Device Manager does that mean I have adb commands and drivers ready to go no problemos?

Related

Testers/Help needed to add OnePlus 1, 2 and 3 to Unified Android Toolkit

Hi,
Im working on adding the OnePlus 1, 2 and 3 device to the Unified Android Toolkit but need some help as I don't own any of the devices.
If anyone has a device which has not been unlocked or rooted, I need to know the error message displayed in the command prompt when the fastboot oem unlock command is run without enabling oem unlocking in developer options.
I also need a few people who could help test various procedures in the Toolkit. I am modifying the Nexus Toolkit so most things will be the same.
Any help and/or knowledge about the OnePlus devices would be appreciated.
Thanks, Mark.
Questions:
1. Can you fastboot boot on OnePlus devices (fastboot boot boot.img or fastboot boot recovery.img) or does the image need flashing first. I have looked at some root procedures for the OnePlus and they fastboot flash the imge first, then reboot to bootloader and fastboot the image. Im not sure what that is about.
2. Does the standard twrp recovery image work on the OnePlus devices? I have seen a lot of posts where twrp has failed and a different twrp recovery was recommended to fix the problem (which then worked).
3. I need links to all the builds for the OnePlus 1, 2 and 3 devices. Does anyone have these?
4. Does the Universal adb driver pack from koush (CWM) work with the OnePlus? I have found the official drivers made by OnePlus for their devices but I just want to make sure they are the best ones to use. I read that samsung drivers also work.
5. I have been told that the OnePlus devices usb mode does not revert to "charging only" like all the Nexus devices and that adb commands can be sent with the device in MTP mode (Nexus devices need to be switched to PTP to communicate). Can this be confirmed.
I think this is all I need to get a working Toolkit ready within a few days.
Mark.
mskip said:
Questions:
1. Can you fastboot boot on OnePlus devices (fastboot boot boot.img or fastboot boot recovery.img) or does the image need flashing first. I have looked at some root procedures for the OnePlus and they fastboot flash the imge first, then reboot to bootloader and fastboot the image. Im not sure what that is about.
2. Does the standard twrp recovery image work on the OnePlus devices? I have seen a lot of posts where twrp has failed and a different twrp recovery was recommended to fix the problem (which then worked).
3. I need links to all the builds for the OnePlus 1, 2 and 3 devices. Does anyone have these?
4. Does the Universal adb driver pack from koush (CWM) work with the OnePlus? I have found the official drivers made by OnePlus for their devices but I just want to make sure they are the best ones to use. I read that samsung drivers also work.
5. I have been told that the OnePlus devices usb mode does not revert to "charging only" like all the Nexus devices and that adb commands can be sent with the device in MTP mode (Nexus devices need to be switched to PTP to communicate). Can this be confirmed.
I think this is all I need to get a working Toolkit ready within a few days.
Mark.
Click to expand...
Click to collapse
1. Yes,
Code:
fastboot boot boot.img
works.
2. Old firmware needs old TWRP (link) as new firmware needs new TWRP (link).
There is also hybrid recovery which supports both firmware (link) or also this thread which lets you flash right firmware with the good recovery.
3. Thread to official zip and unofficial fastboot files for the Oneplus Two. Here for the Oneplus One. Thanks to @Spannaa. I think mirrors for the Oneplus 3 are actually not available.
4. I don't know.
5. Yes, in MTP, adb commands work. But I think without USB for Marshmallow, the connectivity will go back to Charge only.
mskip is in the house ??
Sent from my ONE A2005 using Tapatalk
Last thing to do is the stock firmware flashing procedure but I think everything else is done.
Does anyone have a OnePlus 1, 2 or 3 and can test any parts of the Toolkit? Main parts to test is driver install, unlock/relock, apk and folder backup and rooting.
Firmware flash procedure should be finished by tomorrow.
Mark.
Hi Mark,
I got a OnePlus 2 with latest OOS 3.0.2
Bootloader unlocked
rooted
TWRP 3.0.2-1
I'm willing to test...
Manuel
castor31 said:
Hi Mark,
I got a OnePlus 2 with latest OOS 3.0.2
Bootloader unlocked
rooted
TWRP 3.0.2-1
I'm willing to test...
Manuel
Click to expand...
Click to collapse
Thanks, what kind of testing can you do?
If you don't want to touch your rom then the basic functions (apk backup, booting to stock/custom recovery) but ideally if you can make a twrp backup or don't mind wiping the device then I need the bootloader unlock, flash stock firmware, rooting, etc tested. If you can do the more in depth testing I can compensate you with a pro code so you can also test the ALLINONE root procedure.
Let me know as the OnePlus 2 main code has been completed and the device modules are being built now.
Mark.
Hi Mark.
OnePlus One with latest COS-13.1-ZNH2KAS1KN
stock
bootloader unlocked
not rooted
twrp backup done
Willing to help with more in depth testing if still needed.
Frank
mskip said:
Thanks, what kind of testing can you do?
If you don't want to touch your rom then the basic functions (apk backup, booting to stock/custom recovery) but ideally if you can make a twrp backup or don't mind wiping the device then I need the bootloader unlock, flash stock firmware, rooting, etc tested. If you can do the more in depth testing I can compensate you with a pro code so you can also test the ALLINONE root procedure.
Let me know as the OnePlus 2 main code has been completed and the device modules are being built now.
Mark.
Click to expand...
Click to collapse
Yes, I can test all this.
I did a dirty flash when the OOS3 community build was released in March. So its time for me to wipe my device and do a clean install...
I'm using your Toolkit with pro for my GNex, n8000 and Nexus5. would be great if you can provide a pro code.
Best
Manuel
UPDATE - TEST RELEASE FOR ONEPLUS DEVICE SUPPORT
I have finished all the work on the OnePlus modules for the 1, 2 and 3 devices and it is ready for testing.
You can download and test the Toolkit from the below link. Please remember that this IS a test version at the moment as I do not own any OnePlus devices but I have checked all the code thoroughly and don't see any problems. I am especially pleased with the unlock/lock routines and will probably implement the code for the Nexus modules if it works well.
Everything can be checked (and please do) except downloading a stock build directly from the Toolkit as I am waiting to hear back from AndroidFileHost to see if I can get direct links to use in the Toolkit. The fastboot flash routines are working though and the Toolkit will detect the storage of the device (16GB or 64GB) and flash the relevant userdata image so you do not have to do that manually anymore.
I have used the Universal USB driver pack from CWM so if anyone has not installed OnePlus drivers yet PLEASE test if this works. I did originally include the official drivers from OnePlus but they close the Toolkit when the drivers installation starts and thats not great.
The ALLINONE routine should work fine and I have sent out some pro codes to testers to check it all works.
All builds are covered and the correct version of TWRP will be downloaded depending on the build selected. Please check everything and let me know of any bugs or textual errors (as I used a lot of the Nexus code) so I can release it publicly as soon as possible.
Download Link: http://skipsoft.net/?wpdmdl=2627
Thanks, Mark.
Frudge1701 said:
Hi Mark.
OnePlus One with latest COS-13.1-ZNH2KAS1KN
stock
bootloader unlocked
not rooted
twrp backup done
Willing to help with more in depth testing if still needed.
Frank
Click to expand...
Click to collapse
Mark- I have the same version on my OnePlus One but unable to unlock the bootloader also. Can you share the procedure to do it. So far, I was trying to use the Toolbox V6 and when I do unlock bootloader in fastboot mode but phone doesnt get detected even. Please help
reply.rathi said:
Mark- I have the same version on my OnePlus One but unable to unlock the bootloader also. Can you share the procedure to do it. So far, I was trying to use the Toolbox V6 and when I do unlock bootloader in fastboot mode but phone doesnt get detected even. Please help
Click to expand...
Click to collapse
Has the bootloader been unlocked before or is this the first time you want to unlock it?
Do you have adb and fastboot drivers installed?
Do you have any knowledge of using adb/fastboot commands in the command prompt?
First thing is to make sure you have the correct drivers installed: http://www.skipsoft.net/?page_id=1302
You can try the Toolkit to see if the bootloader will unlock or I can talk you through the procedure but its a simple command (fastboot oem unlock, or from the toolkit fastboot-toolkit oem unlock).
If it won't unlock you may need to boot to stock recovery and flash a stock image back to your device.
Mark.

Wiley Fox Swift2+ Bootloader Unlock

It seems that unlocking the BootLoader on the WileyFox Swift2+ is even easier.
To unlock the boot loader (WARNING!!! This wipes your user data!!!)
Go To 'Settings - About Phone' Tap 'Build Number' seven times to enable 'Developer Options'.
Go To 'Developer Options' Enable 'Advanced Reboot', Enable 'OEM Unlocking'
...## not sure if these next few steps are even needed!!
Connect to computer running "Minimal ADB and Fastboot"
Open command window as administrator (To prevent Win10 messing around).
Enter command "fastboot oem unlock"
...##
Press the phone 'Power Off - Reboot - FastBoot'
PC detects device and states "Follow instructions on device screen"
Phone screen issues dire warnings about unlocking Bootloader.
Proceed and job done Bootloader is Unlocked (device at this point not rooted).
The stock Swift2+ Cyanogen Rom is no longer available - seek out the LineageOS rom instead
I unlocked my bootloader the other day and those are the same steps I did so I can confirm this works.
I then proceeded to root the phone with SuperSU 2.78. Worked a treat.
Swift 2 Plus and SuperSU
FelixPiers said:
I unlocked my bootloader the other day and those are the same steps I did so I can confirm this works.
I then proceeded to root the phone with SuperSU 2.78. Worked a treat.
Click to expand...
Click to collapse
Yes initially the only version of SuperSU I could find was v2.46, which kept failing.
Any help? My reboot menu doesn't have a fastboot option. Yes I have advanced reboot and oem unlocking enabled.
Edit: Sorted it. Turns out you have to reboot into the bootloader.
thejackle123 said:
Any help? My reboot menu doesn't have a fastboot option. Yes I have advanced reboot and oem unlocking enabled.
Edit: Sorted it. Turns out you have to reboot into the bootloader.
Click to expand...
Click to collapse
Is it too hard to google your question?
Works on most devices:
1) Turn off device
2) Hold VOLUME UP button
3) Connect device to PC via usb-cable
I installed SuperSU, before that I installed TWRP. Now I am unable to install the latest update "cm-marmite-a1478a0ee9-to-7aa1c797975e-signed"
When I download this update and perform the actual install, it gives an error. Restarting the phone via TWRP recovery gives the same error. I am getting "Error 7"
So no I want to revert back, to get rid off SuperSU and TWRP to install all updates and then later root the device with TWRP and SuperSU. How do I get the original state of the phone back?
Or do you have any advice how to get the latest update installed?
Thx.
SMessy said:
It seems that unlocking the BootLoader on the WileyFox Swift2+ is even easier.
To unlock the boot loader (WARNING!!! This wipes your user data!!!)
Go To 'Settings - About Phone' Tap 'Build Number' seven times to enable 'Developer Options'.
Go To 'Developer Options' Enable 'Advanced Reboot', Enable 'OEM Unlocking'
...## not sure if these next few steps are even needed!!
Connect to computer running "Minimal ADB and Fastboot"
Open command window as administrator (To prevent Win10 messing around).
Enter command "fastboot oem unlock"
...##
Press the phone 'Power Off - Reboot - FastBoot'
PC detects device and states "Follow instructions on device screen"
Phone screen issues dire warnings about unlocking Bootloader.
Proceed and job done Bootloader is Unlocked (device at this point not rooted).
The stock Swift2+ Cyanogen Rom is here
http://builds.cyngn.com/factory/marmite/cm-13.1.4-ZNH2KAS5RM-marmite-signed-fastboot-c64f8f5d87.zip
Click to expand...
Click to collapse
Hi, mate
unfortunately teh link to the stock rom is not working.
Can u provide me with another working link?
I deleted my rom and i can't find the stock to reanimate my phone.....
EDIT!!!!
All done, device is restored
THy @ll
Rom location
RayfG said:
Hi, mate
unfortunately teh link to the stock rom is not working.
Can u provide me with another working link?
I deleted my rom and i can't find the stock to reanimate my phone.....
EDIT!!!!
All done, device is restored
THy @ll
Click to expand...
Click to collapse
Just to confirm the stock room is still at this location as at 2nd march 2017
http://builds.cyngn.com/factory/marmite/cm-13.1.4-ZNH2KAS5RM-marmite-signed-fastboot-c64f8f5d87.zip
"Just to confirm the stock ROM is still at this location as at 2nd march 2017 :"
Link above does not work now, however below one does.
https://androidfilehost.com/?w=files&flid=126553
Hmmm. I'm going to try again. Before I got fastboot in red and Dvice Status: Locked. But I'll try again, see where I get.
Image of issue: https://ibb.co/jfLPye
edit: Updating to the latest Oreo update (8.1 I think)
---------- Post added at 08:34 AM ---------- Previous post was at 08:14 AM ----------
ohhhhhhh, I had to turn the phone off while connected, already running "adb & fastboot" (not just adb) then (phone connected in USB debugging mode) turn off the phone and hold volume up (no need to hole the power key as connected and I got the option to unlock with a warning that I may void the warranty. Then my phone encrypted/re-encrypted itself (I think it was already encrypted).
Now to flash TWRP (3.2 I think) and flash a custom ROM (Lineage 15.1 / 8.1 Oreo) Not sure if I should root or not. And if I do, should I root before installing 8.1?
got damit i never understand how to flash twrp i followed what google said.
fastboot flash recovery XXX.img it does its thing i reboot still no recovery im on stock cm12 ? i think or cm13 android 6.0)
Hi, trying to unlock my S2+ bootloader with Ubuntu MATE. Have completed all the steps listed, entered fastboot oem unlock into the terminal which now just sits there displaying < waiting for any device >
Any idea where I go from here?
bl91 said:
Hi, trying to unlock my S2+ bootloader with Ubuntu MATE. Have completed all the steps listed, entered fastboot oem unlock into the terminal which now just sits there displaying < waiting for any device >
Any idea where I go from here?
Click to expand...
Click to collapse
your device isn't picked up by fastboot ...first of all install the very latest version of adb ...using the usual Ubuntu story
sudo apt-get install adb
sudo apt-get upgrade
sudo apt-get update
sudo reboot
then switch on your device
go to /settings/about/buildnumber
click until developer settings are enabled
go to developer settings
toggle oem unlock to on
toggle adb to on
WITHOUT SWITCHING OFF
connect device to pc/laptop with original orange wileyfox cable
now your Ubuntu machine
must install drivers and Mount the phone so it should appear as a mounted volume on desktop
now open a terminal
now run the following :
sudo adb
sudo adb devices
now look on your phone and pull down the notification shadse ..make sure you have adb connected and file transfer mode ..if not change from charge to file transfer ...
there should be a pop up window on phone screen asking for permission for adb ..select allways allow and give pernission / authorization ..
now in terminal run adb devices and it should return some value as connected device
run:
adb reboot bootloader
phone will reboot to bootloader
run:
fastboot oem unlock
*use volume up to select yes
**beware will erase DATA ...
***if it doesn't work and adb and fastboot doesn't detect your device it is a driver problem but i haven't used Ubuntu in ages so can't remember steps to update your drivers other than updating the whole adb package
****some ubuntu instructions might be a little off as I've explained previously it's been a while
*****your waiting for device means
-adb service didn't start
+try "sudo adb"
-adb drivers out of date
+try sudo apt-get update
-adb on device not toggled to on
+toggle adb in dev settings
*adb authorization not given **should still see unauthorized device
-bad usb cable
+try another usb cable
-bad usb port
+try a different usb port
_____for clarity double check Ubuntu adb instructions and commands but this should put you on the right track____
---------- Post added at 08:30 AM ---------- Previous post was at 08:19 AM ----------
reggiexp said:
got damit i never understand how to flash twrp i followed what google said.
fastboot flash recovery XXX.img it does its thing i reboot still no recovery im on stock cm12 ? i think or cm13 android 6.0)
Click to expand...
Click to collapse
don't reboot immediately ..stock recovery will be flashed back over twrp
*i assume you know how to get to fastboot
adb reboot bootloader
fastboot oem unlock
*volume up for yes
fastboot flash recovery recovery.img
*make sure you have a copy of twrp called recovery.img in adb folder
when it says sending...
then is says writing ...
then it says done
DON'T REBOOT
UNPLUG USB
***MANUALLY BOOT TO BOOTLOADER USING VOLUME UP AND POWER
**** IN BOOTLOADER SELECT "RECOVERY"
you should then just wait on wileyfox first time it takes a minute or two don't know why then
it should boot to twrp
***you can take stock boot.img and patch it with magisk
-use: fastboot flash boot boot.img
-then you will have magisk and rooted
-using twrp apk or something like root rasher or flasher ..give apk root permission
-download twrp ..flash with apk from inside system ..after flashing select yes to reboot directly to recovery
Thanks very much, I've unlocked my bootloader now! Onto the TWRP, Magisk and LineageOS business now
bl91 said:
Thanks very much, I've unlocked my bootloader now! Onto the TWRP, Magisk and LineageOS business now
Click to expand...
Click to collapse
okay no problem
*i know everybody likes lineage and its usually more stable and the base for many custom roms
however just my 2cents worth ...i tried all the roms for our device ..but the by far the best for me was following the tutorial on how to make our device treble compatible ..
Then ...after 3-4 months of trying different treble GSI's i have stopped on Viper Official Pie 64bit A-only treble system.img ... at least give it a try after trying out lineageOs ..
you might thank me .
I can't get my device to show up usb debugging is on, Advanced Reboot', 'OEM Unlocking' etc. I've been trying for hours and hours. It shows up to transfer files if I want that mode so my PC is recognising it, but it doesn't seem to have drivers for adb. I've tried installing google usb drivers and also this: https://afterthoughtsoftware.com/posts/using-adb-with-wileyfox-swift
sorry if I haven't explained clearly, I'm just so sleepy from going around in circles. :|
I've rooted phones before and never had this issue. please can anybody help?
edit: have fixed I think! did two things at once so not sure which. I revoked usb devices so that my computer would have to ask permission again to connect (or something like this) and also clicked a thing on my PC to allow it to update what I think said driver icons automatically, which I wouldn't have thought would help, but it seemed to find the adb driver this time. I'd probably make more sense if it weren't 1am. :|
When i got my Swift 2 X, it came updated with 8.1 Oreo out of the box and the issue I had was unlocking the bootloader.
Sure fastboot oem unlock unlocked so I could flash recovery and roms but whenever I tried flashing a bootloader via fastboot, it gave me "FAILED (remote: Critical partition flashing is not allowed)". So that part was still locked.
This I fixed way back after searching around on my own about it but since the solution to this aint mentioned around here and I can't be the only one who have encountered this I think, I am just gonna add it in here.
There are now other commands to unlock your device, fastboot flashing unlock that does the exact same thing that fastboot oem unlock does and fastboot flashing unlock_critical is the command that unlocks the bootloader.
Both commands prompts you with the usual to confirm unlock and wipes your data.
It doesn't matter if you already unlocked the device with the oem command or flashing command, fastboot flashing unlock_critical should be able to unlock the bootloader either way.
My swift was also at 8.1 I had no problem unlocking the bootloader.
DH
RavZ75 said:
When i got my Swift 2 X, it came updated with 8.1 Oreo out of the box and the issue I had was unlocking the bootloader.
Sure fastboot oem unlock unlocked so I could flash recovery and roms but whenever I tried flashing a bootloader via fastboot, it gave me "FAILED (remote: Critical partition flashing is not allowed)". So that part was still locked.
This I fixed way back after searching around on my own about it but since the solution to this aint mentioned around here and I can't be the only one who have encountered this I think, I am just gonna add it in here.
There are now other commands to unlock your device, fastboot flashing unlock that does the exact same thing that fastboot oem unlock does and fastboot flashing unlock_critical is the command that unlocks the bootloader.
Both commands prompts you with the usual to confirm unlock and wipes your data.
It doesn't matter if you already unlocked the device with the oem command or flashing command, fastboot flashing unlock_critical should be able to unlock the bootloader either way.
Click to expand...
Click to collapse
bubba_66 said:
My swift was also at 8.1 I had no problem unlocking the bootloader.
DH
Click to expand...
Click to collapse
Doesn't seem that many who have this lock on their bootloaders, the only ones I could find here who had locked bootloaders the same way as I had are in the LineageOS 14.1 thread.
So at least I am not alone with that but sure makes me wonder how it is so for some while others not.
After unlock bootloader Everytime reboot always like this https://ibb.co/NSZR818

Moto G5 Plus not being detected under adb devices.

I had rooted my Moto G5 plus a couple of months back, I had to relock the bootloader and install the stock recovery and rom due to some reasons. I followed a thread on this website which had all the files and commands given to restore stock rom. Later, I decided to unlock the bootloader again. I followed the steps to unlock the bootloader but, my device isn't appearing under adb devices so, I am not able to do anything. I have installed all the moto adb drivers and checked oem unlocking and usb debugging under developer options but, my device doesn't appear under adb.
I used the following thread-
https://forum.xda-developers.com/g5-plus/development/stock-firmware-npn25-137-67-5-fastboot-t3694738
Everything in that guide is done in fastboot, so if you're in fastboot when you're trying to find your phone, try "fastboot devices" instead of "adb devices"
So, how do I follow the steps on moto's website to unlock the bootloader?
ReckerRex said:
So, how do I follow the steps on moto's website to unlock the bootloader?
Click to expand...
Click to collapse
For some reason,
Code:
adb devices
didn't work for me right away.
I skipped that command and just ran
Code:
fastboot oem get_unlock_data
and that worked and I was able to continue with the process. Perhaps try that and see what happens.
Drivers must be installed too. This thread helped me:
https://forum.xda-developers.com/g5-plus/how-to/unlock-bootloader-lenovo-motorola-moto-t3581133
Another thing that didn't work for me:
USB Dev settings must be disabled in order to mount USB File Transfer Mode (MTP). After updating to latest version, it seems that has been fixed so I don't have to do that anymore.

Not able to unlock bootloader in Mi A1, tried everything I could.

I want to root this device and realized that I would have to unlock the bootloader first. I downloaded adb on my windows machine but fastboot is not detecting my device. I downloaded a file from XDA which installs drivers on my computer along with ADB, but still it can't detect my device. I don't understand why.
How do I solve this and root my device?
Search for minimal adb & fastboot.
Did you enable android debugging in the developer options? also check if you have enabled OEM unlock.
Here is a link to setup adb and fastboot.

root galaxy tab 4 sm-t530 with magisk and unlock bootloader adb diver error 10

hi i would like to root my galaxy tab sm-t530 with magisk and solve error 10 on my driver to check if the bootloader is locked or unlocked with adb and adb tells me to wait for all devices and twrp is already installed please help me
what you type is unrelated to adb. you are trying fastboot commands on a Samsung device - you're following the wrong tutorial.
install right drivers
https://developer.samsung.com/galaxy/others/android-usb-driver-for-windows
use the right tools
https://odindownloader.com/download/odin3-v3-14-1
read the right instructions
https://topjohnwu.github.io/Magisk/install.html#instructions

Categories

Resources