简体   繁体   English

缺少Android ADB命令

[英]Android ADB commands missing

I've got Android 2.2 on my phone and I'm doing some DB development. 我的手机上装有Android 2.2,正在做一些数据库开发。 I've been trying to query my DB using sqlite3, but it looks like sqlite3 is missing from my phone. 我一直在尝试使用sqlite3查询我的数据库,但看来我的手机缺少了sqlite3。 So then I tried a few other commands (su, find etc) and they ALL seem to be missing. 因此,我尝试了一些其他命令(例如su,find等),它们似乎都丢失了。

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? 我读到某个地方说sqlite3至少可能被意外地排除在2.2之外,但是可以肯定的是,不能全部错过它们吗?

Thanks 谢谢

Those aren't adb commands those are binaries usually installed on rooted devices. 这些不是adb命令,它们是通常安装在有根设备上的二进制文件。 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. 使用活动管理器命令set-debug-app [options] <PACKAGE>这将使您无需root就可以访问应用程序数据库,然后可以将其拉到桌面上并在其中使用sqlite3。

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. 您的应用需要在清单中设置为debug true才能运行。

With the new release, adb has moved to platform-tools while all other tools are still under tools folder. 在新版本中,adb已移至platform-tools而所有其他工具仍在tools文件夹下。

You can either copy them or add them to the Windows Path (if you are using windows). 您可以将它们复制或添加到Windows Path (如果使用Windows)。

Try: 尝试:

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

to determine if sqlite3 is available or not on you device. 确定sqlite3在您的设备上是否可用。

The command you entered in one of your comments is malformed, it should be (after you determined that sqlite3 is available): 您在其中一个注释中输入的命令格式错误,应该是(确定sqlite3可用后):

$ 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> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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