Unlock phone with Arduino DUE


I know that this post may seem strange but I would like to ask for your kind patience, and would really appreciate if you can help me with my problem.

I have a Samsung Galaxy J3 2017 phone with dead screen (black screen) but the phone is still working because

it’s still detected when connected to the computer. Problem is that the phone is locked and I can’t retrieve

my data without unlocking it first.

Using the Arduino DUE, I wrote a simple sketch to try and unlock the phone with the DUE as a Mouse. I know the pattern, and I tested the code on a tablet and it works (see video attached).

My problem is that the coordinates of the “DOTs” on the screen differ from one device to another, and since I can’t see anything on my Samsung phone, I can’t adjust the code to move the mouse correctly over the “DOTs”.

Therefore, I would like to ask for your help in adjusting the mouse movements.

You will need:

  1. Galaxy J3 2017 or similar with USB Host support.
  2. Arduino DUE, Micro or DigiSpark (ATTiny85 board with Micronucleus bootloader).
  3. Micro USB OTG adapter.
  4. Some patience.

I am attaching the code I used on the DUE and the DigiSpark boards.

Thank you so much for your patience.

Best Regards,

DUE_AndroidPattern.ino (1.57 KB)

T85_AndroidPattern.ino (1.74 KB)

DUE_unlock(1).mpg (798 KB)

Maybe practice lining the mouse curser up on a phone with a good screen.

Thank you Zoomkat for your reply.

I can't find a friend with a similar phone to test with, but I am still looking.

Thanks again