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

Search This thread

Mr.Stick

Member
Feb 16, 2014
16
0
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

Senior Member
Aug 16, 2012
215
65
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

Member
Feb 16, 2014
16
0
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

Senior Member
Aug 16, 2012
215
65
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

Member
Feb 16, 2014
16
0
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

Senior Member
Aug 16, 2012
215
65
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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    So it's possible to flash the recovery in fastboot without USB-debugging disabled? :)
    Assuming you're either S-OFF or htcdev unlocked (if you're neither, you have to use htc unlock first), you can always flash from fastboot no matter what your OS settings are.
    1
    Ok I pushed it to tmp and I still have the error

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

    C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools>adb shell
    ~ # sqlite3 /data/data/com.android.providers.settings/databases/settings.db
    sqlite3 /data/data/com.android.providers.settings/databases/settings.db
    /sbin/sh: sqlite3: not found

    When I said 'push it to /tmp and run it from there' I meant:
    Code:
    /tmp/sqlite3 /data/data/com.android.providers.settings/databases/settings.db
    (you might have to make it executable first, i.e. "chmod 755 /tmp/sqlite3")
    1
    Okay, so now I get "Access Denied" so I'm guessing I need to make it an executable. Do you mind walking me through that please? Thanks
    like I said, run
    Code:
    chmod 755 /tmp/sqlite3
    first