I forgot my oneplus one pin. I have tried using google device manager and have tried putting in my pin (150+ times) to be prompted for my google account.

I was thinking if it would be possible for me to enable usb debugging and use adb to unlock my oneplus one

I was trying to do what the third answer in this thread suggests How to enable USB Debugging in Android if forgotten pattern for screen-unlock?

but am unable to follow, specifically, i don't know what to do when it says to mount "Data".

thanks in advance.

  • No chance with a stock Cyanogen Recovery since shell access is not available. Also, my answer noted that the answer is tested on devices running custom Recovery. – Firelord Aug 10 '15 at 10:04
  • sorry i misunderstood :( – singh Aug 10 '15 at 20:18

You can boot into recovery, then adb should be enabled by default. But I don't know what you want to do to reset your code. If you would have rooted the phone, then you may be able to do that but I think you can't reset the code from adb. The only thing you may do is, first make an adb backup, then do a factory reset and get the data back from your backup.

  • 1
    You can reset the code using ADB. The link in the question has my answer which isn't a copy-paste from somewhere but duly tested! It does work. :) – Firelord Aug 10 '15 at 10:00
  • the term "mount data" means that you mount the data partition in order to have read and write access. I expect your phone is not rooted and you were not using a custom recovery so you can't use this guide. sorry for that – Schwertspize Aug 10 '15 at 10:03
  • I do not have my phone rooted. It is just a stock oneplus one. Sorry I'm not very knowledgeable about android. If I can't reset the pin, how can I back up my phone if it is possible? Ive tried checking for adb devices in the command prompt (i opened it in the correct location), and my phone does not show up, but I also don't know if I had my phone in the right state when I was doing that. Thank you for the help so far :) – singh Aug 10 '15 at 20:16
  • @singh It's not really a problem right now in which state your phone was when you checked for adb devices because I verified that stock Cyanogen recovery wouldn't give you shell access which is most important thing in my answer. The only option left (if phone not asking for Google credentials) is to factory reset and lose data, and regain ownership of the device. You should be able to connect as MTP right? So you can at least copy the pictures, videos and other SD card data. – Firelord Aug 10 '15 at 20:27
  • when i connect it to my pc, my phone appears, but it appears as empty. I am unable to access any of the folders or data. Also, When Im in recovery mode, and i select "apply update" I have the option to "choose from internal storage", which allows me to browse all of the phones folders, or I have the option to select "apply from adb". Is any of that information usefull? Could I get my data through there somehow if I cant copy the files over? – singh Aug 10 '15 at 20:57

You can boot into recovery and maybe gain an adb shell as root. Then, you can just remove /data/system/gatekeeper.password.key using the command rm /data/system/gatekeeper.password.key in the shell. Then any pin/password should unlock the device.

If you can't open a shell as root, then maybe you can use https://github.com/amarullz/AROMA-Filemanager/releases/tag/2.00 . Just put it on your phone (with sideload (?)) or on a usb key, that you will connect using an OTG cable. Once done, you just "install" that zip and you get GUI file manager and you can easily delete the /data/system/gatekeeper.password.key.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.