yashsingh1/xdaforums huggingface dataset:
[OnePlus 2 General] AnonA2:
I managed to root this device and now I have root and superuser (recovery) interface...after all and this android studio driver hell. But the device is as simple to root as possible, I ve became now only worried how long it will have been working after my current xperia ze551ml db5503 5.0... I am curious it's possible eventually to Super-root this root friendly device so it's possible to get write access to the system partition natively? I am not interested in overclocking etc (hyperoot) anyway, it's enough that I am at least now admin of my device

After the successful root of SELinux environment I also have managed to get working

Xposed

(install 3.0 app, flash ARM64 v89 sdk23 android 6.0 (universal Uninstaller))

AdAway

(

Mount system as supersuser

Rename hosts (from system) to hosts.bak

Ln -s /data/data/hosts /system/etc/hosts

----

Some info

Symlink is between hardlink (associated with file itself) and shortcut, it's kind of record associated with files)

Recursiveness

Android can't move rather files recursively but copy and remove.

Cp -r x/. y/z copy contents of x to z if the upper directory exists

Cd x

Cp y/z a copy z dictionary to a in the mounted directory

Cd .. Go level up

CD /

Cp x y

)

Busybox just flash flashable zip

App Ops + overlay xposed

(

You may install the apk version with root)

Ogyoutube system wide is rather not possible due to low memory, apps that may be removed galaxy4 not recommended removal of animated wallpapers
[OnePlus 2 General] Heisenberg:
If the option isn't present in Oxygen then I'm confident that answers your question. There's one way to find out, try unlocking the bootloader.
[OnePlus 2 General] freeman_g:
Sure I can try but at the moment I do not want to wipe everything. Probably I will try when OTA zip will be avaliable.

By the way, I see that there is an option to backup app data and then restore it. Does it mean that all saves and other things will be restored after the wipe? I can use Helium but automatic process should be quite convenient
[OnePlus 2 General] maurydes:
For all have problem to find twrp recovery after flash simply in fastboot "fastboot boot twrp.img" see pic attached [emoji6]

Inviato dal mio ONE A2001 utilizzando Tapatalk
[OnePlus 2 General] onepapa:
Thanks for the guide! Really helps people as me who are new to this. I unlocked the bootloader, installed TWRP and rooted my device, everything went fine without any problems. I just wonder if it is supposed to pop-up a message saying "Disable stock recovery replace" every time I'm in TWRP and choose to reboot to system? I also wonder if it is possible to format the entire phone and install a firmware when there is no microsd slot?
[OnePlus 2 General] Heisenberg:
I can only assume the pop-up is advising you to go into Developer Options and disable that feature. As for there being no sd slot, when you perform a full wipe (system, data, cache, dalvik cache) it doesn't touch your internal storage as it's an entirely different partition.
[OnePlus 2 General] freeman_g:
OEM unlock option appears after the update. My only recommendation is to unlock the bootloader in any case not to have potential problems in future.
[OnePlus 2 General] khr0n0s:
I have a problem. I have the Chinese version of the phone. I unlocked the bootloader and flashed TWRP, then flashed OxygenOS (150725). Everything was running smoothly. Today, I decided to return to stock recovery. I rebooted in to fastboot and tried flashing the stock recovery. It didn't work. I then tried to reboot in to recovery and the phone just vibrated then rebooted again and booted as normal. I just checked to see if the bootloader is unlocked. It is locked again! When I try to unlock, I get an error FAILED remote: OEM unlock is disabled. I now have no recovery and a locked bootloader on the old OxygenOS version that has no OEM unlock in developer settings. Is there any way to fix this?
[OnePlus 2 General] MHP2013:
Does this also work with the Slim SDK package like this with fully working ADB and fastboot? Why I have to download the whole SDK and install the support libraries?
[OnePlus 2 General] maurydes:
well old oxygen dnt have oem unlock button in settings....you can try to do a factory reset and after it try again to unlock bootloader:good:
[OnePlus 2 General] sspranav:
I was able to root the phone. Thanks

I received a notification of an ota update. But the update is failing in twrp recovery. Can anyone share the ota for flashing through twrp recovery
[OnePlus 2 General] Heisenberg:
This has nothing to do with this thread, please ask in the appropriate place.
[OnePlus 2 General] Doktor-X:
big problem

if i use command fastboot oem unlock device reboot connstantly and

C:\SDK\android-sdk-windows\platform-tools>fastboot flash recovery twrp.img

target reported max download size of 536870912 bytes

sending 'recovery' (25956 KB)...

OKAY [ 0.768s]

writing 'recovery'...

FAILED (remote: device is locked. Cannot flash images)

finished. total time: 0.789s

and now is bricked what to do i cant boot device
[OnePlus 2 General] Heisenberg:
Which OS was on the phone?
[OnePlus 2 General] Doktor-X:
oxygen

---------- Post added at 11:44 PM ---------- Previous post was at 11:43 PM ----------

i think that i need to flash stock recovery

im friking out

i cannot boot device i get only to power by android and then it vibrates and its in loop and i can only go to fastboot
[OnePlus 2 General] Heisenberg:
You can't flash anything if the bootloader is locked. What does it return when you issue this command?

fastboot oem device-info
[OnePlus 2 General] Doktor-X:
C:\SDK\android-sdk-windows\platform-tools>fastboot oem device-info

...

(bootloader) Device tampered: true

(bootloader) Device unlocked: false

(bootloader) Device is_verified: false

(bootloader) Charger screen enabled: false

(bootloader) Display panel:

(bootloader) console_locked: 1

(bootloader) exec_console_unconsole: 0

OKAY [ 0.094s]

finished. total time: 0.109s

can i reflash whole phone return to stock complytly i have installed qulcomme drivers
[OnePlus 2 General] Heisenberg:
There's an unbrick/recovery tool in the general section, I'd suggest you have a look at that.
[OnePlus 2 General] Doktor-X:
i manage to unbrick my phone

http://xdaforums.com/oneplus-2/general/oneplus-solution-hard-bricked-device-t3183449

so is this way to unbrick device every time i dont know how why my bootloader get locked i have folow instruction to unlock and root 2 and it went fine but after little while i have lost twrp and my bootloader was locked and i was unable to go to recovery because it was gone if i try to use vol- and power nothing wood happend and i was only able to go only to fastboot and after using this unbrick metode my phone is back to live and my rom is rooted but my bootloader is locked, so is it safe to try another bootloadre unlock

C:\SDK\android-sdk-windows\platform-tools>fastboot oem device-info

...

(bootloader) Device tampered: true

(bootloader) Device unlocked: false

(bootloader) Device is_verified: false

(bootloader) Charger screen enabled: false

(bootloader) Display panel:

(bootloader) console_locked: 1

(bootloader) exec_console_unconsole: 0

OKAY [ 0.077s]

finished. total time: 0.079s
[OnePlus 2 General] gorillaCF:
hello all.

i just got my device today.

followed instructions, but i'm now stuck at fastboot. it cant detect my device. but in adb, my device serial is presented.

anyone have any idea why?
[OnePlus 2 General] Doktor-X:
did you unlock bootloader and install twrp recovery
[OnePlus 2 General] ilpolpi65:
News ?
[OnePlus 2 General] gorillaCF:
well, tried googling for fastboot for windows 8.1. tried methods listed, such as the intel 3.0 usb etc, end up doesnt work also.

argh, guess the problem lies with windows 8.1.

anyone encountered such problem and manage to resolve it? :(

EDIT:

used another laptop on win7. wow it worked.

a few things to note, differences compared to the guide.

1. my device didn't get wiped. i still have my wifi info. maybe i didnt notice cause i did not install anything to it.

2. after unlocking, it did not auto reboot into android.

3. a slight mistake made, i reboot phone after flashing twrp, and then into recovery. that didnt bring me into twrp. so what i did i reflashed twrp again in fastboot, and once unplug (still in fastboot mode) i used the recovery mode combo (vol down + power) and it went into twrp.

4. upon checking device oem info, it shows this. only unlocked is true.

Device tampered: false

Device unlocked: true

Device is_verified: false

other than those mistakes i made, Heisenberg actually made a really great guide. appreciate it a lot man. hope my experience can help others as well :)

quick question though, any idea how to verify if my device is really rooted? i can open up supersu for sure.
[OnePlus 2 General] ilpolpi65:
You can use ' Root Checker " from Google play

Inviato dal mio ONE A2003 utilizzando Tapatalk
[OnePlus 2 General] agrdm13:
just thanks

10/10 :good::good:
[OnePlus 2 General] mdaamir1989:
Thanks for the nice guide . Is there a way to completely get the device to stock condition after unlocking the bootloader and rooting it ?

I would love to try this guide but want to make sure i can return to stock condition by relocking the bootloader and unrooting the device.
[OnePlus 2 General] Heisenberg:
Not yet. You can relock the bootloader but setting the flags back isn't possible yet. May I ask why?
[OnePlus 2 General] mdaamir1989:
Just in-case if i screw up and want to give it to the service center , wouldnt they check if the device has been tampered or not ?
[OnePlus 2 General] Heisenberg:
No, unlocking the bootloader, rooting, flashing custom firmware doesn't affect your warranty. It's all ok with OnePlus.
[OnePlus 2 General] zappex:
OTA

Now that the 2.0.2 OTA is out, How do we update the device?

Tried installing through TWRP it fails.

Do we have to flash stock recovery again? If so how?
[OnePlus 2 General] hassan_1000:
Hi, I've just ordered my device and came across this thread. I'd there a way to root the device with SuperSU without unlocking bootloader? I won't be flashing ROMs or kernels but will just want root for certain apps I use
[OnePlus 2 General] dm227:
Wait until the full rom zip is available, keep an eye on [MENTION=251020]inffy[/MENTION] thread on the oneplus forums. Really this question should go in Q&A... You can't update OTA with twrp
[OnePlus 2 General] inffy:
Wrong!

The problem is if you are rooted. Any other case the OTA will flash on TWRP

and even when rooted you can flash the OTA zip. As long as you firstly flash the 2.0.1 full rom and then the OTA zip on top of that.
[OnePlus 2 General] zappex:
Thanks for your input guys, I've solved it.

First downloaded 2.0.1 Full ROM

Then downloaded 2.0.2 OTA

Next downloaded SU zip for root access

Booted up in TWRP and wiped cache/dalvik

Created a que for flashing the three files in order

2.0.1 Full ROM+2.0.2 OTA+SU zip

Confirm flash and voila!

It updated the phone flawlessly to 2.0.2 with all the data intact
[OnePlus 2 General] marbill:
OMG!

My bootloader is locked after update to 2.02. I tried fastboot oem unlock and it said " Failed (remote: oem unlock is disabled)

Please help.

---------- Post added at 09:15 AM ---------- Previous post was at 09:11 AM ----------

Solved.

Just need to enable oem unlock in developer setting.
[OnePlus 2 General] kidstretch:
Will this proccedure work on a MacOS?
[OnePlus 2 General] Heisenberg:
The commands are essentially the same, but you'll need to find a guide on how to install/use adb and fastboot on a Mac.
[OnePlus 2 General] napes22:
My developer options doesn't have an "Enable OEM unlock" checkbox. Am I missing something?
[OnePlus 2 General] Heisenberg:
Which OS are you on? Have you tried unlocking the bootloader?
[OnePlus 2 General] napes22:
It was because I was on an older version of the OS. I'm having major issues right now though, where the OEM Unlock succeeds, but Windows 10 is not properly unlocking and flashing recovery. It says it is successful, but never actually is.

When running "fastboot oem device-info" I'm getting:

Device tampered: false

Device unlocked: true

Device is verified: false

Charger Screen enabled: false

Display Panel:

console_locked: 1

exec_console_unconsole: 0
[OnePlus 2 General] Heisenberg:
Well it's definitely unlocked. How are you rebooting after flashing the recovery?
[OnePlus 2 General] napes22:
fastboot reboot

Then when I try to get into recovery it goes to the base stock recovery, rather than the colorful blue TWRP we know and love.
[OnePlus 2 General] Heisenberg:
Well, the problem is you're not following the instructions properly.
[OnePlus 2 General] napes22:
Sorry, I was confusing the sections. Now it worked. Thanks for your guide (and your prompt responses)!
[OnePlus 2 General] Heisenberg:
No problemo.
[OnePlus 2 General] kidstretch:
I watched a video guide and managed to do it on oneplus one using a Mac, i hope i can do it on the 2! =)
[OnePlus 2 General] Wongher:
after give the command:

fastboot oem unlock

appear to me a cinese page on the opt someone can help me?
[OnePlus 2 General] Heisenberg:
You should be presented with two options. The top option should be proceed, the bottom option should be cancel. Select the top option to unlock the bootloader.
[OnePlus 2 General] Wongher:
Could you add this things to guide to help other users?

Very bad moment to me when it happen and i'm not prepared to this....
[OnePlus 2 General] Heisenberg:
It's already added :)
[OnePlus 2 General] LiquidSolstice:
Can someone please bother to verify WHERE this version of TWRP that's floating around came from?

It has the URL for some Chinese website hard-coded into it's main view, and I don't trust it at all.
[OnePlus 2 General] Heisenberg:
I have no idea where it came from, but if you don't trust it, don't use it, but it's your only option. Not trusting it because it has Chinese origins is a bit silly, if you didn't trust anything from China you wouldn't trust 90% of everything in the world.
[OnePlus 2 General] LiquidSolstice:
It has absolutely nothing to do with "Chinese origins" which may or may not even be true. I'm not that racist.

It has everything to do with the fact that someone has branded their site into it, and no one can verify where it came from. You have no idea where its source is or who built it, it just showed up on Google, but you're fine with recommending people flash this core, core piece of code to their phone and use like it's normal TWRP.

I just think that's a pretty hefty red flag. I don't think anyone who builds TWRP from source for a device would find it necessary to brand their website into it, Chinese or not. You're right, I won't use it, but I'm surprised you aren't aware of the security implications of using it.
[OnePlus 2 General] Heisenberg:
Alright, you made a point of mentioning that it was a Chinese site so I just figured that had something to do with your distrust for it. The fact that it has branding doesn't mean anything at all. Any piece of custom firmware has the potential to have back doors and security holes, hell, even OEM firmware from major American manufacturers has been found to have back doors. It's healthy to have some caution of course though.
[OnePlus 2 General] LiquidSolstice:
I understand that you're trying to be reasonable, but yes, it most certainly means something. It means that it was not built untouched from TWRP's source by an sort of official TWRP maintainer. No other proper TWRP image has a website hard-coded into it. Someone has an agenda, and while I hope it's as innocent as just wanting to drive traffic to their site, it might not be.

Your guide is spot on and very helpful, and I appreciate it. I just want to make sure people know that the actual origins of where this TWRP came from are completely unknwon. Personally, I feel like the safest TWRP image will be the one that's posted to twrp.me, and I might wait for that.

Have a great labor day weekend.
[OnePlus 2 General] Heisenberg:
When I meant it doesn't mean anything, I meant it isn't necessarily malicious. But the possibility is there nonetheless. I'd much prefer to link to an official build of TWRP but unfortunately until there is such a thing this unofficial build is all we have to work with. I'm on the other side of the world but I appreciate the sentiment, you have a great weekend too.
[OnePlus 2 General] Tomsgt:
thanks for all your work in this awesome write up on rooting your Oneplus 2 very good info for sure.

I have made a youtube video walking through many of these steps and was wondering it you might want to put it in the OP

Here it is hope some of you enjoy it

OnePlus 2 Bootloader Unlock, TWRP Recovery, Nandroid Backup, and Root Tutorial video
[OnePlus 2 General] Heisenberg:
I won't be putting the link in the OP, sorry.
[OnePlus 2 General] Tomsgt:
ok figured it could hurt to ask :)
[OnePlus 2 General] RISHI RAJ:
If I initially flash twrp & then back up my rom.Then flash supersu.zip.Will I be able to restore the system to its original position & then flash ota.Will it work?or I have to compulsorily download the complete rom
[OnePlus 2 General] Heisenberg:
If you make a backup of your stock ROM you can restore it at any time.
[OnePlus 2 General] dansou901:
So I'm right to assume there is no official TWRP for the Oneplus Two yet? You're all using that branded version coming from out of nowhere?

Btw, just got an invite out of nowhere and bought the phone, should be here next week hopefully
[OnePlus 2 General] tuangd:
Thank you so much [MENTION=4153349]Heisenberg[/MENTION] for the guide.

This took me a while to pass the ADB driver part, as the USB driver that comes with the OP2 and the one that you link above didn't work.

I followed the step listed here http://www.technobuzz.net/oneplus-two-usb-drivers/ to make my ADB driver working.

After that the rooting went through like a breeze.

Cheers.
[OnePlus 2 General] afarnedi:
HELP stuck on boot logo after installed superSU

I' ve changed section
[OnePlus 2 General] j321123123:
Is this work for all oneplus2 medel: A2001 /A2003/ A2005 ?
[OnePlus 2 General] RISHI RAJ:
Hi First of all thanks for this useful guide worked flawlessly.

Today I faced a problem.Before unlocking bootloader I was able to connect to wifi in a campus which has specific user id & password assigned to me.But today I had wifi connection failure.I was rooted with xposed installed.Then I restored system from backup which was unmodified which also didn't work.Then I wiped data also.Then I flashed sandy kernel which also didn't solved my problem.Only thing left is that I don't have stock recovery even if I restore boot from twrp.Even If I swipe not to disable stock recovery.

Now the question is recovery is culprit or campus detects that bootloader is unlocked?

How to flash stock recovery & relock bootloader?

Thanks Again
[OnePlus 2 General] apd:
Might it just have been an error with the WiFi?
[OnePlus 2 General] RISHI RAJ:
I doubt coz I was using it before unlocking bootloader.Could be the security reasons?
[OnePlus 2 General] apd:
Seems very unlikely that wifi could detect an account unlocked bootloader....
[OnePlus 2 General] dansou901:
Shouldn't be. Are you using eduroam? If yes, are you sure you configured it correctly? Sometimes, when I was using eduroam at our university, I had to delete the network and add it again to make it work. Also, I can assure you that there are no such checks if someone connects with an unlocked bootloader (working as sysadmin at a university, I know the people maintaining our eduroam).

EDIT: If you are still getting problems, try to reach out to the helpdesk of your university. They should be able to help you out.
[OnePlus 2 General] ramymamlouk:
Got my OP2 yesterday, and rooted it this morning with TWRP installed.

I got an OTA update while restoring my data, finished my restore, then tried the OTA, which failed saying something about the device being rooted. I disabled root from Chainfire's app, tried the update again, but failed.

I thought of installing the stock recovery and trying the update again, but all recoveries that were hosted on dropbox have been removed. Anyone succeeding with the OTA update with TWRP+root installed?
[OnePlus 2 General] Gonnelli1355:
Can i root using stock recovery? I mean.. Stock recovery can flash .zips, so selecting the root .zip i should have to be rooted! Not?

OTA updates don't work if you "simply" unroot with the app. Follow these steps:

1) Flash old Oxygen version, 2.0.1, to "restore" unroot

2) Wipe cache and Dalvik

3) Flash 2.0.2 update

Otherwise you can try to directely flash the whole 2.0.2 ROM and make wipes. You can find .zips on XDA too.
[OnePlus 2 General] Heisenberg:
No you can't root with the stock recovery, it can only flash signed zips.
[OnePlus 2 General] hunhool:
Just received today :)

Can't wait to play with it....
[OnePlus 2 General] njain2686:
Guys I've done exactly like OP instructed, my bootloader is unlocked but i am unable to install TWRP

Nitins-MacBook-Pro:platform-tools Nitin$ ./fastboot oem device-info

...

(bootloader)	Device tampered: false

(bootloader)	Device unlocked: true

(bootloader)	Device is_verified: false

(bootloader)	Charger screen enabled: false

(bootloader)	Display panel:

(bootloader)	console_locked: 1

(bootloader)	exec_console_unconsole: 0

OKAY [ 0.076s]

finished. total time: 0.076s

-----------------------------

Nitins-MacBook-Pro:platform-tools Nitin$ ./fastboot flash recovery /Users/Nitin/Desktop/Oneplus\ 2/twrp.img

target reported max download size of 536870912 bytes

sending 'recovery' (25956 KB)...

OKAY [ 1.192s]

writing 'recovery'...

OKAY [ 0.218s]

finished. total time: 1.410s

---------------------------

when I try to go to recovery, it goes to the stock recovery.

HELP

---------- Post added at 04:42 AM ---------- Previous post was at 04:25 AM ----------

Can any one tell me how to do a manual reset without using fastboot.

Got it..

after flashing recovery.

use

fastboot boot twrp.img

to manually boot into twrp
[OnePlus 2 General] Heisenberg:
No you haven't got it, that's only booting into the TWRP image that you have on your PC, that isn't booting into the recovery partition on your phone. After actually flashing TWRP were you using "fastboot reboot" or using the button combo to boot directly into TWRP?
[OnePlus 2 General] RISHI RAJ:
How to revert back to stock recovery?
[OnePlus 2 General] Heisenberg:
Flash it with fastboot, the same way you'd flash a custom recovery.
[OnePlus 2 General] ArkAngel06:
Is the stock img posted somewhere?
[OnePlus 2 General] Heisenberg:
I'm not sure.
[OnePlus 2 General] krishna442:
That was too quick. Thanks mate.
[OnePlus 2 General] njain2686:
I tried both ways first I did ./fastboot reboot --------It rebooted to stock recovery.

Then I tried volume + power combo -----------same result.

Even advance reboot + recovery----------------- goes to stock recovery.

--------------------

After doing

fastboot boot twrp.img

to manually boot into twrp

When I leave twrp it ask to replace the stock recovery.

Now even when I use volume+power combo or Advance reboot to recovery , it goes to twrp.
[OnePlus 2 General] Heisenberg:
The guide specifically says you need to use the button combo to boot into TWRP directly after flashing. If you used the "fastboot reboot" command then the OS patched the stock recovery over TWRP. Even if you used the button combo (or advanced reboot) after doing this (without flashing TWRP again) there's no point because TWRP had been patched over when you failed to use the button combo the first time. My guide is very specific, it contains specific directions for a reason, failure to follow the guide properly results in situations like yours (user error).
[OnePlus 2 General] ramymamlouk:
Thanks. I've downloaded the full .zip and flashed 2.0.2, rerooted and still on TWRP.
[OnePlus 2 General] elrey311:
This guide worked like a charm for me.
[OnePlus 2 General] nitramcek:
Does phone get OTA if it's rooted an if TWRP installed?

I guess not? But ROM .zip can be installed?

I'm asking Because on oneplus one, root and TWRP didn't breake OTA.

But I never did wait that long. I always installed .zip manually.