Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,778 Members 52,030 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Locked out phone. Google sign-in problem.

Tip us?
 
Mr.Stick
Old
#21  
Junior Member - OP
Thanks Meter 0
Posts: 16
Join Date: Feb 2014
Quote:
Originally Posted by Aquous View Post
Sigh... look, I'll just spell it all out for you:
First, mount /data in your recovery. Then:
Code:
adb push sqlite3 /tmp
adb shell
chmod 755 /tmp/sqlite3
/tmp/sqlite3 /data/data/com.android.providers.settings/databases/settings.db
update secure set value=1 where name='wifi_on';
.quit
exit
adb reboot
I push it to /tmp but it still keeps telling me sqlite3 is "not found".

Code:
C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>adb push sqlite3 /tmp
1279 KB/s (41916 bytes in 0.032s)

C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>adb shell

~ # chmod 755 /tmp/sqlite3
chmod 755 /tmp/sqlite3
~ # /tmp/sqlite3 /data/data/com.android.providers.settings/databases/settings.db

/tmp/sqlite3 /data/data/com.android.providers.settings/databases/settings.db
/sbin/sh: /tmp/sqlite3: not found
~ #
 
Aquous
Old
#22  
Senior Member
Thanks Meter 58
Posts: 180
Join Date: Aug 2012
Quote:
Originally Posted by Mr.Stick View Post
I push it to /tmp but it still keeps telling me sqlite3 is "not found".

Code:
C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>adb push sqlite3 /tmp
1279 KB/s (41916 bytes in 0.032s)

C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>adb shell

~ # chmod 755 /tmp/sqlite3
chmod 755 /tmp/sqlite3
~ # /tmp/sqlite3 /data/data/com.android.providers.settings/databases/settings.db

/tmp/sqlite3 /data/data/com.android.providers.settings/databases/settings.db
/sbin/sh: /tmp/sqlite3: not found
~ #
That's peculiar. I'm sorry, I have no idea why that happens. You could instead pull /data/data/com.android.providers.settings/databases/settings.db from your phone using adb, modify the file using sqlite3 on your computer (I'm sure there's a precompiled Windows binary available somewhere), and push it back onto your phone via adb. Be sure to set it to the proper permissions afterwards - most likely 644 but you should verify that that's correct for your ROM ('ls -l /data/data/com.android.providers.settings/databases/settings.db' should show 'rw-r--r--').
So that'd be something like:
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
update secure set value=1 where name='wifi_on';
.quit
adb push settings.db /data/data/com.android.providers.settings/databases/
adb shell chmod 644 /data/data/com.android.providers.settings/databases/settings.db
adb shell umount /data
adb reboot
 
Mr.Stick
Old
#23  
Junior Member - OP
Thanks Meter 0
Posts: 16
Join Date: Feb 2014
Quote:
Originally Posted by Aquous View Post
That's peculiar. I'm sorry, I have no idea why that happens. You could instead pull /data/data/com.android.providers.settings/databases/settings.db from your phone using adb, modify the file using sqlite3 on your computer (I'm sure there's a precompiled Windows binary available somewhere), and push it back onto your phone via adb. Be sure to set it to the proper permissions afterwards - most likely 644 but you should verify that that's correct for your ROM ('ls -l /data/data/com.android.providers.settings/databases/settings.db' should show 'rw-r--r--').
So that'd be something like:
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
update secure set value=1 where name='wifi_on';
.quit
adb push settings.db /data/data/com.android.providers.settings/databases/
adb shell chmod 644 /data/data/com.android.providers.settings/databases/settings.db
adb shell umount /data
adb reboot
Oh well, thanks anyway, but I still get problems pulling it e.g.

Code:
C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>adb pull /data/data/com
.android.providers.settings/databases/settings.db
1117 KB/s (58368 bytes in 0.051s)

C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>sqlite3 /data/data/com.
android.providers.settings/databases/settings.db
SQLite version 3.7.11 2012-03-20 11:35:50
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> update secure set value=1 where name='wifi_on';
Error: unable to open database "/data/data/com.android.providers.settings/databa
ses/settings.db": unable to open database file
 
Aquous
Old
#24  
Senior Member
Thanks Meter 58
Posts: 180
Join Date: Aug 2012
Quote:
Originally Posted by Mr.Stick View Post
Oh well, thanks anyway, but I still get problems pulling it e.g.

Code:
C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>adb pull /data/data/com
.android.providers.settings/databases/settings.db
1117 KB/s (58368 bytes in 0.051s)

C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>sqlite3 /data/data/com.
android.providers.settings/databases/settings.db
SQLite version 3.7.11 2012-03-20 11:35:50
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> update secure set value=1 where name='wifi_on';
Error: unable to open database "/data/data/com.android.providers.settings/databa
ses/settings.db": unable to open database file
Sorry, I'm an idiot :P. Once the file is on your local computer the sqlite3 command obviously needs to be just "sqlite3 settings.db". I.e. you can continue as follows:
Code:
sqlite3 settings.db
update secure set value=1 where name='wifi_on';
.quit
adb push settings.db /data/data/com.android.providers.settings/databases/
adb shell chmod 644 /data/data/com.android.providers.settings/databases/settings.db
adb shell umount /data
adb reboot
 
Mr.Stick
Old
#25  
Junior Member - OP
Thanks Meter 0
Posts: 16
Join Date: Feb 2014
Quote:
Originally Posted by Aquous View Post
Sorry, I'm an idiot :P. Once the file is on your local computer the sqlite3 command obviously needs to be just "sqlite3 settings.db". I.e. you can continue as follows:
Code:
sqlite3 settings.db
update secure set value=1 where name='wifi_on';
.quit
adb push settings.db /data/data/com.android.providers.settings/databases/
adb shell chmod 644 /data/data/com.android.providers.settings/databases/settings.db
adb shell umount /data
adb reboot
Ahaha, well, thanks, that seemed to work, but now my phone has been on the boot screen for about 5 minutes :/
 
Aquous
Old
#26  
Senior Member
Thanks Meter 58
Posts: 180
Join Date: Aug 2012
Quote:
Originally Posted by Mr.Stick View Post
Ahaha, well, thanks, that seemed to work, but now my phone has been on the boot screen for about 5 minutes :/
Oh dear, that's not what I'd expected...
Can you get a logcat? (I know USB debugging is disabled but that setting is usually not enforced until the launcher appears on-screen.)
If not, then we don't have any way to find out what exactly the problem is and what to do about it.... As a last resort - but I'd advise against that without seeking further assistance first - you can always wipe data/factory reset from your custom recovery. That'll at least give you a working phone again.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes