Insert data into a "safe" table from a shell script

hii everyone, I am trying to manually set the lock screen on a Moto A855 (Droid 1) device, I wrote the following shell script to run the same, but I get exceptions when running the code, I followed this link for embedding quotes and this link for embedding data to 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 the following errors when running the script

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

      

Please help me

thanks in Advance

+3


source to share


1 answer


Try the following instead as I think it is a comma.



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

      

0


source







All Articles