HappyZ / dpt-tools

dpt systems study and enhancement
MIT License
564 stars 130 forks source link

Help! I got locked out of my device #170

Closed JoeKays closed 4 years ago

JoeKays commented 4 years ago

Hey, sorry for troubling you!

I was just trying to test the latest release of dpts (see the locally loading pdfs on the device issue) when I got locked out of my device :(

I set up a PIN and a pattern in the security settings, but I did not setup a password. Then I made the mistake to enable 'Ask for password at startup' or something like that.

Now it asks for a lock password at startup. But I did not setup any password. I have adb root access over USB. What can I do? I am quite new to the Android world...

Thanks in advance!

JoeKays commented 4 years ago

@HappyZ sorry for bothering you!

I read up on the issue and from what I understand I have to make a factory reset. Is that correct? I don't have a backup so that's why I'm asking.

I guess this post describes wiping the userdata: 首先看你之前有没有成功运行过dpt-tools并刷入sharkerzhiwu的hacker_basic包,如果是的,那么就可以在开机前按住home键启动,进入黑方块状态,这时用python dpt-tools --diagnosis可进入设备的Linux系统中,在usr/local/bin下有format_userdata.sh,执行过以后就把设备重置了,包括密码,你如果已经备份过你的文件的话,可以试试。

Originally posted by @6bigfire in https://github.com/HappyZ/dpt-tools/issues/111#issuecomment-505085824

Is this sufficient? Or do I have to do a factory reset like this: [...] ideally it should be easily doable, if you look at how diagnosis resets stuff in /usr/loca/bin/factory_reset.sh

Originally posted by @HappyZ in https://github.com/HappyZ/dpt-tools/issues/111#issuecomment-508630771

Does that mean I have to call this script from diagnosis mode? Or can I just run this from the adb root shell without diagnosis mode?

Thanks a lot!

HappyZ commented 4 years ago

Sorry to hear that. Yes you would need to reset the device.. I don't think format userdata script does anything as the password should've associated with the system.

You should be able to use the reset button as well.

Or in diagnosis mode, do:

cd /usr/local/bin/
./factory_reset.sh --no_epd_init

Lmk if it works.

JoeKays commented 4 years ago

Thank you @HappyZ!

It worked perfectly. Now my data is gone. That makes me sad.

However what makes me happy is that I could reproduce the problem and found a solution to solve it without losing data (for me it's too late, though).

The problem was that I apparently set up a pattern to lock the device and set it as required at boot (I didn't quite remember that, I did it in the evening and was greeted by a locked device on the next morning). The problem is, that the DPT lock interface does not allow one to enter a pattern, because there is only the password box (Note: The password box supports both password and PIN). The solution to this problem is to input your pattern according to the following scheme: Imagine the following digit arrangement in place of the pattern dot matrix: P I N
1 2 3
4 5 6
7 8 9

Now enter the digits in the corresponding order, et voilà, it unlocks! :100:

Maybe you could add this to the wiki at a prominent place so it saves the next person to make this mistake a lot of trouble? :)

HappyZ commented 4 years ago

Oh interesting... that makes sense.. sorry I didn't know that otherwise you wouldn't need to clean up the device..

JoeKays commented 4 years ago

Don't worry. Now we know :)