简体   繁体   中英

Android ADB commands missing

I've got Android 2.2 on my phone and I'm doing some DB development. I've been trying to query my DB using sqlite3, but it looks like sqlite3 is missing from my phone. So then I tried a few other commands (su, find etc) and they ALL seem to be missing.

Can anyone tell me where they have gone please? I read somewhere that sqlite3 at least might have been accidentally left out of 2.2, but surely they can't all have been missed off can they?

Thanks

Those aren't adb commands those are binaries usually installed on rooted devices. If your device isn't rooted you aren't going to be able to install them either.

However, what you can do to get into your apps database. Use the activity manager command set-debug-app [options] <PACKAGE> This will let you access your apps database without being rooted, then you can pull it to your desktop and use sqlite3 from there.

Something like this:

adb shell
am set-debug-app com.example.appname
exit ##exit adb shell
adb pull data/data/com.example.appname/databases/exampledb.db exampledb.db
sqlite3 exampledb.db

Your app needs to be set to debugging true in the manifest for this to work.

With the new release, adb has moved to platform-tools while all other tools are still under tools folder.

You can either copy them or add them to the Windows Path (if you are using windows).

Try:

$ adb -s <serialno> shell type sqlite3
sqlite3 is /system/xbin/sqlite3

to determine if sqlite3 is available or not on you device.

The command you entered in one of your comments is malformed, it should be (after you determined that sqlite3 is available):

$ adb -s <serialno> shell sqlite3 /data/data/com.example.google.rss.rssexample/databases/rssitems.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM