3

hii everyone I am trying to manually set the lock screen to none in a Moto A855(Droid 1) device i have written following shell script for running same but I am getting Exceptions while running the code , i followed this link for nesting quotes and this link for inserting data into Sqlite from ADB

./adb shell su -c 'mount -o remount,rw /data'
./adb shell su -c 'sqlite3 /data/data/com.android.providers.settings/databases/settings.db "insert into secure values(50,'"'lockscreen.disabled'"',1);"'

I am getting following errors while running the script

sh: no closing quote
/system/bin/sh: ": not found

please help me

thanks in Advance

Community
  • 1
  • 1
Software Sainath
  • 1,040
  • 2
  • 14
  • 39

1 Answers1

0

Try the following instead, as I think it's a comma issue.

./adb shell su -c 'sqlite3 /data/data/com.android.providers.settings/databases/settings.db '"'insert into secure values(50,'"'lockscreen.disabled'"',1);'"'
Arnab Nandy
  • 6,472
  • 5
  • 44
  • 50
  • your command's problem is it not able to find closing " or ' in any case. – Arnab Nandy Nov 14 '14 at 04:27
  • thank you so much for replying i have copied your answer and pasted in my script then it is showing Usage: su [options] [LOGIN] Options: -c, --command COMMAND pass COMMAND to the invoked shell -h, --help display this help message and exit -, -l, --login make the shell a login shell -s, --shell SHELL use SHELL instead of the default in passwd -v, --version display version number and exit -V display version code and exit. this is Superuser.apk – Software Sainath Nov 14 '14 at 04:32