0

I am looking to create a batch / JS file that executes the below mentioned ABD commands for Android OS.

Any help is greatly appreciated.

CD C:\Documents and Settings\tech\desktop\pattern\
adb shell
cd /data/data/com.android.providers.settings/databasessqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
.quit

I am getting hung up that it will not move beyond adb shell

2 Answers 2

1

Perhaps it doesn't work on Windows, but give it a try (works on Linux and Mac OS X):

$ echo 'sqlite3 /data/data/com.android.providers.settings/databases/settings.db <<EOF
update system set value=0 where name="lock_pattern_autolock";
EOF
exit' | adb shell
Sign up to request clarification or add additional context in comments.

Comments

0

Try:

CD C:\Documents and Settings\tech\desktop\pattern\
adb shell "cd /data/data/com.android.providers.settings/databasessqlite3 settings.db; update system set value=0 where name='lock_pattern_autolock'; update system set value=0 where name='lockscreen.lockedoutpermanently';"

4 Comments

Hmmm. It seems to attempt to execute the command, does go into adb shell but does not complete.
@Greg: If update system set value=0 where name='lock_pattern_autolock'; is supposed to be a sqlite3 command, you need to actually run that from inside sqlite3.
I see. How would I go about that? Sorry was asked to work on this and it is not my cup o' tea.
@Greg: See dtmilano's answer. You'll have to convert that into a Windows batch file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.