Android reset lock screen - Android Q&A, Help & Troubleshooting

Good morning,
I have the following problem with a tablet of a child's parents bought in December.
The boy was set to release by drawing on the screen. Now after he has made ​​a number of attempts is displayed when the message "Too many attempts to enter the sequence" and requires the google account. The problem is that you do not remember your credentials, or because you do not connect to the wifi network is not able to validate credentials.
To get around this I did the following tests:
1) attempt to enter the recovery mode by pressing volume + and power
2) attempt via adb with the command "adb reboot recovery"
But every time you restart it is as if there is no recovery mode and starts normally and returns the usual screen that asks for credentials.
I also run this procedure:
> Adb-d shell
# Sqlite3 data / data / com.android.providers.settings / databases / settings.db
sqlite> update system set value = 0 where name = 'lock_pattern_autolock';
sqlite>. exit
# exit
but when I reboot I get the same error message with the introduction of the credentials.

Nobody can help me?....:crying::crying::crying:

Go to recovery and restore factory

If USB debugging is active, do this:
Code:
adb shell rm /data/system/gesture.key
let that finish then:
Code:
adb reboot
Your tablet will reboot, and you should be able to enter any code, and it will unlock.

thanks so much, with your help I solved the problem ............................ :good::good::good::good::good:

try to install the application "Screen Lock Reset" from google play
it may do the job for you

yiorgosc said:
try to install the application "Screen Lock Reset" from google play
it may do the job for you
Click to expand...
Click to collapse
without unlocking the phone, yeah right.

Temporarily haven't meet this situation.

Related

Unlock Patter is blocked

Hi all, after many attempts to unlock pattern my phone says:
Please enter your google account and password. I´ve attempt enter my google account and password and don´t work..
What i do now? Any idea?
Try this...
So it happens, that my brother locked me out of my own phone :O and i didnt want to wipe, so i searched and searched, until i found this solution which worked flawlessly
Method 1 :
Step 1. Download the Android SDK (http://developer.android.com/sdk/)
Step 2. Make sure to configure the ADB usb interface drivers
Step 3. Plug your G1 into your computer (via usb). (Settings -> Application -> Development -> USB Debugging, must be enabled [it is enabled by default in JesusFreke/CM's releases i think])
Step 4. Open command prompt and enter the following:
Code:
adb -d shell
sqlite3 data/data/com.android.providers.settings/databases/settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen_lockedoutpermanently';
.exit
exit
reboot
Thats it, you'r gh0od :clap:
Method 2 :
Code:
adb -d shell
su
sqlite3 data/data/com.android.providers.settings/databases/settings.db
.header on
.mode column
select * from system;
Now, in the table, find the ID of the two lines called lockscreen.l and lock_pattern, in my case; 3125 and 3126
Code:
update system set value=0 where _id=(replace with your id and remove brackets);
update system set value=0 where _id=(replace with your id and remove brackets);
.exit
reboot
Click to expand...
Click to collapse
Instructions from a slightly dodgy, copyright infringing site, so I copied and pasted them to avoid linking to warez. If you google search for a small part of it, you'll find the original source.
Obviously instructions to be followed at your own risk, since they are for the G1, but I reckon the G2 would be the same (same underlying android code).
If poss, make a nandroid backup first
anon2122 said:
Try this...
Instructions from a slightly dodgy, copyright infringing site, so I copied and pasted them to avoid linking to warez. If you google search for a small part of it, you'll find the original source.
Obviously instructions to be followed at your own risk, since they are for the G1, but I reckon the G2 would be the same (same underlying android code).
If poss, make a nandroid backup first
Click to expand...
Click to collapse
Thanks to u advanced answer...but i make wipe.

[Q] Too many attempts [SOLVED]

My stupid mates managed to lock my phone under the "too many attempts" thing... I REFUSE to wipe my phone... all im trying to do is turn on either wifi or data connection through adb using key events
i (think) i know the settings bit is
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
that worked for gingerbread... i dont know if ics has changed
but i need the keyevents for it
i HAVE tried sqlite but i get the responce
"CAnnot update file - read only"
ive tried
chmod777 (whatever...)/settings.db
but it doesnt affect it
Bump.... please help... i want my phone back :/
Boom. done.
So? What was the solution?
mahrud said:
So? What was the solution?
Click to expand...
Click to collapse
Pulled data/data/com.android.providers.settings/databases/settings.db
changed "lock_pattern_autolock" value to 0
Pushed settings.db
allowed me to enter my pattern and unlocked my phone
Another solution to turn on wifi connection through adb when your phone is under the "too many attempts :
-Download on your PC a simple apk that toggle the WiFi (I use "WiFi On/Off Toggle swticher" apk from the Play Store https://play.google.com/store/apps/details?id=jp.ne.neko.freewing.WiFiOnOff)
-Install the apk with the command : adb install jp.ne.neko.freewing.WiFiOnOff.apk
-Start the activity : adb shell am start -n jp.ne.neko.freewing.WiFiOnOff/.WiFiOnOff
I use this method to unlock the Motorola Defy Mini XT320 (2.3.6) of a friend.

[GUIDE] Access locked AXON 7: How to clear the lockscreen security settings

I have been experimenting with flashing, etc. and somehow the lockscreen were corrupted and the pattern I was using was not longer valid. I had the fingerprint already setup so I could enter using the rear sensor, but having a corrupted lockscreen is annoying. THis method requires TWRP custom recovery. It is compatible with locked bootloaders and doesn't modify the stock boot or system. It is also compatible with all the AAXON 7 models.
If you have the stock ROM and need TWRP and ADB interface:
A. Setup ADB interface in your PC and device drivers. and connect your terminal to the PC.
B. Setup axon7tool in your computer. Enter into EDL mode by running the command "adb reboot edl" in the command prompt. The terminal will seen to be off.
C. Disable the antivirus and then backup your recovery image using axon7tool running "axon7tool -r recovery". Save the created file in a safe place.
D. Flash tenfar's signed TWRP as a new recovery using axon7tool. It will reboot to system again.
E. Open the command prompt and run:
Code:
adb devices
adb reboot recovery
1. In TWRP , and with the ADB interface properly installed run these the commands from your computer:
Code:
adb devices
adb shell mv /data/system/locksettings.db locksettings.db.old
adb reboot
Now the system will allow you to pass lockscreen without security. In that case you do not need to apply the rest of the steps. Should you continue experimenting issues with the lockscreen, then you should apply the full procedure. Just add the following 2 steps:
2. Open the command prompt and run:
Code:
adb devices
adb reboot recovery
3. When TWRP had fully loaded, run in the command prompt the following commands:
Code:
adb devices
adb shell mv /data/system/gatekeeper.pattern.key gatekeeper.pattern.key.old
adb shell mv /data/system/locksettings.db locksettings.db.old
adb shell mv /data/system/gatekeeper.password.key gatekeeper.password.key.old
adb shell mv /data/system/locksettings.db-shm locksettings.db-shm.old
adb shell mv /data/system/locksettings.db-wal locksettings.db-wal.old
adb reboot
If you want to restore the stock recovery, you just need to rename the recovery-backup.bin file created in step C back to recovery.bin and run the command "axon7tool -w recovery". after that you can enable your antivirus software again. axon7tool can't connect with some antivirus software. I will be editing this OP with links to the procedures required for each step. All of them are in this forums.
Enjoy
@Oki
To fix either " Wrong Pattern " , " Wrong Pin " users only need to delete " /data/system/locksettings.db " from either Terminal/File Explorer with root or TWRP File explorer then Reboot and you'll be good to go .
DrakenFX said:
@Oki
To fix either " Wrong Pattern " , " Wrong Pin " users only need to delete " /data/system/locksettings.db " from either Terminal/File Explorer with root or TWRP File explorer then Reboot and you'll be good to go .
Click to expand...
Click to collapse
Sure! but this guide is intended for people with the stock, unrooted, blocked bootloader who want to remain with a pure stock experience. Usually people without experience rooting devices. This is why I will edit the guide to add all the details to every step.
Could I do this with a pin as well? I restored a backup and it corrupted my password and I have to use the fingerprint on the back to get in.
twilighttony said:
Could I do this with a pin as well? I restored a backup and it corrupted my password and I have to use the fingerprint on the back to get in.
Click to expand...
Click to collapse
Yes, the procedure deletes everything. If you have problems just do the same also with:
gatekeeper.password.key
locksettings.db-shm
locksettings.db-wal
I have updated the OP just to describe the full procedure.
I had this problem earlier today of having the PIN corrupted, but I have it set to require the pin on the first boot.
I fixed it by removing all files ending in ".key" in /system. Not really sure how this compares to removing locksettings.db. Afterward, I put my password back using Google's device manager.
Of course, I am rooted with twrp, so this comes after setting that up.
Masterjuggler said:
I had this problem earlier today of having the PIN corrupted, but I have it set to require the pin on the first boot.
I fixed it by removing all files ending in ".key" in /system. Not really sure how this compares to removing locksettings.db. Afterward, I put my password back using Google's device manager.
Of course, I am rooted with twrp, so this comes after setting that up.
Click to expand...
Click to collapse
The problem of this method is that it only works if the bootloader is unlocked and the phone has the No-verify patch installed.
When you say "No-verify patch," are you talking about removing Google license verification from apps (via an app such as lucky-patcher for instance)? AFAIK that is on a per-app basis and wouldn't affect something like the lockscreen password.
So if the phone has those prerequisites (unlocked, No-verify, TWRP), is there a difference between removing the ".key" files and the locksettings.db? I am not entirely sure what the different files contain, and don't seem to be able to find this information through Google, though I may just not be searching the right set of keywords.
Masterjuggler said:
When you say "No-verify patch," are you talking about removing Google license verification from apps (via an app such as lucky-patcher for instance)? AFAIK that is on a per-app basis and wouldn't affect something like the lockscreen password.
So if the phone has those prerequisites (unlocked, No-verify, TWRP), is there a difference between removing the ".key" files and the locksettings.db? I am not entirely sure what the different files contain, and don't seem to be able to find this information through Google, though I may just not be searching the right set of keywords.
Click to expand...
Click to collapse
No-Verify is an additional security system implementend in the kernel. When No-Verify is active, it checks for the signature of the system partition. If the system was modified, then the system won't boot. This is why after unlocking the bootloader you have to apply No-Verify Patch or any package with the integrated patch such as SuperSU. As you can see, it has nothing to do with the app signature or the lockscreen at all.
The method presented in the OP is valid for most Android phones, and the only prerequisite is to have TWRP installed. It is safe and a lot more recommended than patching the system partition. Patching system or kernel should always be your last resort. usually deleting locksettings.db is enough, and it is a general method that works for almost any locking method.
On B25 and have followed all instructions. Seems this method no longer works :/

Respond Programatically to Android Device Manager (ADM)

I have an Android 6.0 px5 head unit which has the lock screen settings disabled in rom. I tried Google's Android Device Manager to lock the unit remotely, and it just gave me a "lock" screen that can be easily bypassed. Problem is, this screen pops up at ever boot, as soon as Google Play services connects to wifi, and it's just plain annoying.
I've researched this and tried a number of things. Because there are no lock settings, the normal way to resolve this, enter the password on the locked device, won't work. I've tried a number of adb solutions (I am rooted on device), including removing the gesture.key file, issuing commands to the settings.db and locksettings.db databases, setting
Code:
ro.secure=0
in default.prop, and issuing the unlock keyevent ("
Code:
input keyevent 82
"). Nothing works. The only thing I have been able to do is create a script that removes the lock screen from the current window (
Code:
dumpsys window | grep mFocusedWindow
) -- but it still stays in the status bar and comes back every boot.
My question is: Does anyone know how I can programatically, from the Linux command line, issue a command back to ADM that either sends an "unlock" code or sends the password it's expecting or somehow responds in the way it needs in order for it to stop trying to lock my device at every boot?

[Solution] How to Delete Your Android Security PIN & PATTERN

This guide will walk you through deleting your security PIN via several methods. This guide is for those who have forgotten your security PIN and cannot do a Google reset for some reason. Have restored your phone from an old backup that had a different PIN than your current PIN, and now the Android system is completely confused which PIN to use and isn’t accepting any of them.
You should have a custom recovery installed on your phone, or ADB installed on your computer, but that is beyond the scope of this guide as custom recovery installation methods varies by device. Check Appuals for how to install TWRP on your specific device, or how to install ADB on Windows.
There are two situations you may encounter after restoring from a backup that contained a different PIN than the one you are most recently using.
Device Uses Two Different PINs
This will happen when you have a recent boot PIN, and your backup contains an old screen-lock PIN. So now the device will have two different PINs, which may in fact add to overall device security, but be a headache when you need to remember both PINs.
To resolve this you simply need to reset your PIN in the Android settings. Just go to Settings > Security > Screen Lock, and enter a new PIN. It will overwrite the boot PIN and default back to using just one PIN.
The Device Won’t Accept Any PIN
This is where things get frustrating. In certain cases, your phone may accept the boot PIN, but not a screen unlock PIN. For this, we are going to completely delete the files that store your PIN (yes, your PIN is stored in system files that can be deleted – shocking?).
Delete your Android PIN – TWRP Method
Boot your phone into TWRP recovery.
Go to Advanced > File Manager and navigate to /data/system.
Find the files that end in the .key extension and any files that have “locksettings” in the filename. They will typically be (but vary by manufacturer):
Code:
Gatekeeper.password.key
gatekeeper.pattern.key
locksettings.db
locksettings.db-shm
locksettings.db-wal
After you’ve deleted those files, reboot your phone. You will be greeted by a lock screen, but it will not prompt you for any password or PIN. If it does, you did not delete all the necessary files.
Set a new PIN in your security settings!
Delete your Android PIN – ADB Method
Note: This requires a rooted phone and USB debugging enabled. If USB debugging is not enabled and you are locked out of your phone, you need to try and flash a custom recovery such as TWRP, which can also grant an ADB sideloader.
Connect your phone to your computer via USB and launch an ADB terminal.
Type the following commands into the command prompt:
Code:
adb devices
adb shell
cd /data/system
su
rm *.key
rm *.key
adb reboot
Delete your Android PIN – ADB/SQL Method
Note: This is an alternative ADB method for those who have SQLite3 alongside their ADB installation.
Type the following commands into your ADB/SQL terminal:
Code:
adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name=’lock_pattern_autolock’;
update system set value=0 where name=’lockscreen.lockedoutpermanently’;
.quit
Delete your Android PIN – Flashable Pattern Password Disable.Zip Method
Note: This is for those who have a custom recovery (it doesn’t matter which) installed and want to flash a .zip that will do the work for you.
Download the Pattern Password Disable .zip from here and transfer it to your phone’s SD card.
Reboot into your custom recovery of choice.
Flash the zip and reboot your phone.
I have phone that I am and "owner" user. I've created a user accounts for kids. They used fingerprint to unlock the screen for the user account, but then once the phone asked the PIN to "improve" security, but they forget the pin.. of course. It also looks like the phone switched to FBE (file based encryption) with some OS update. Removing locksettings.db makes the phone unbootable, ale also the owner pin disappears. Is there a way how owner can reset the pin for a user?
I have a root also on this device..

Categories

Resources