0

I am using genymotion to emulate Google Nexus 9.It so happens that I was not using this virtual machine for about a month so I have forgotten its pattern(yes it was protected by pattern lock). Now I need to use emulated Google Nexus 9 but it can't due to pattern lock. So how can I bypass or change pattern lock so I can again gain access to my device.

P.S.-I have seen Can not unlock my Android device as have no internet connection? but for methods in this link I need to go to recovery mode but that can't be done in emulated phone(I think so).

  • Genymotion has a built-in shell (via adb and directly in virtualbox). Delete the file that holds the hashed pattern (in /data/system/) . – GiantTree Jul 17 '16 at 19:23
  • @GiantTree I have free version so some features are locked and can you how exactly can I do that? – bha159 Jul 17 '16 at 20:11
  • Go to virtualbox, open the window for the emulator (it should be black with white text on it). Do a simple rm /data/system/*.key and reboot. – GiantTree Jul 17 '16 at 20:13
  • @GiantTree can you write in an detailed answer format so that I can accept it. – bha159 Jul 24 '16 at 15:49
1

Genymotion comes with VirtualBox (if you haven't already installed it).
Open it up and you should see your emulator there with a preview of the screen.
The content is just a terminal with white text on a black background.
We can use this terminal to interact with the shell fairly easily, no authentication required.

Open the window (press the green Show button) and simply delete all *.key files in the /data/system/ directory.
Luckily the terminal is already running as the root user and thus we can execute the command rm /data/system/*.key.
This deletes all encoded and hashed lock information and forces the system to remove any protection present (a feature of Android's KeyGuard to prevent full system lockouts).

Reboot the emulator (using the command reboot) and wait a few seconds.

To conclude: Don't try to protect an emulator, there is and there should never be any reason to store private data on a mainly volatile emulated system. These emulator are designed to help you create apps (which means sometimes wait a long time to finish the build) and a lock screen is more than just annoying to unlock every time you need to test a new version.

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.