我想从我开发的android应用程序的命令行访问SQLite数据库。我输入adb shell
连接到设备,然后输入sqlite3
连接到数据库。 sqlite3
给我以下错误: /系统/ bin/sh:sqlite3:找不到从命令行访问SQLite数据库
6
A
回答
0
尝试键入“adb shell类型sqlite3”以查看sqlite3是否在您的设备中可用。
对于我的设备,它显示如下
$ ADB壳型sqlite3的 - > sqlite3的是跟踪别名/系统/ XBIN/sqlite3的
0
// Below code works on windows platform.. tried on windows 7 and windows 8
// This is vb script code.. save with .vb extention.
// any problems in saving.. please copy paste any vb file from ur system,take that second file ,open it with notepad and clear all contents, paste the below code as i did same.
// double click to run file. output shown will ur all tables. and u can continue with the own sql statements
// note : works with only one emulator. many emulator are supported.
// please dont try this code with mobile, you wont be able to access mobile database
// start of script
Set WshShell = WScript.CreateObject("WScript.Shell")
// set ur path to platform tools in ur sdk
strApp = "E:\Android\sdk\platform-tools"
arrPath = Split(strApp, "\")
For i = 0 to Ubound(arrPath)
strAppPath = strAppPath & arrPath(i) & "\"
Next
WshShell.CurrentDirectory = strAppPath
WshShell.Run ("cmd.exe")
WScript.Sleep 50
WshShell.SendKeys "adb shell"
WshShell.SendKeys "{ENTER}"
// put ur package name and database name over here. please put ur db name with .db extension
WshShell.SendKeys "sqlite3 /data/data/package_name/databases/database_name"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys ".tables"
WshShell.SendKeys "{ENTER}"
Set objShell = Nothing
// script ends
+0
在创建一个vb文件之前取出所有注释 – Sush 2013-03-22 08:53:26
相关问题
- 1. 错误时访问SQLite数据库从PHP(但它的命令行的作品...)
- 2. 从sqlite数据库访问数据
- 3. 从sqlite数据库访问数据?
- 4. 从命令行访问远程数据库
- 5. Android - SQLite数据库访问
- 6. 访问SQLite数据库
- 7. SQLite数据库访问Xamarin.form
- 8. 访问命令行参数
- 9. SQLite数据库锁定删除命令
- 10. SQLite UPDATE命令不更新数据库
- 11. 从SQL命令行更改Oracle 11g数据库端口时访问被拒绝
- 12. Android的SQLite数据库访问
- 13. CursorIndexOutOfBoundsException当访问Sqlite数据库
- 14. Android阻止访问SQLite数据库
- 15. Libgdx内部sqlite数据库访问
- 16. 远程访问sqlite或mysql数据库
- 17. 使用PHP访问SQLite数据库
- 18. SQLite数据库的远程访问
- 19. 用java访问SQLite数据库
- 20. 从RStudio访问命令行(cmd)
- 21. Pear :: Auth从命令行访问
- 22. 如何从JScript访问命令行
- 23. 从shell删除sqlite中的数据库的命令是什么?
- 24. 致命 - 的RuntimeException的SQLite从数据库
- 25. 使用system()命令从RStudio访问命令行(cmd)
- 26. 如何在Mac OS X上从命令行启动sqlite数据库浏览器
- 27. 如何访问Windows命令行参数?
- 28. 使用gdb访问命令行参数
- 29. 如何访问命令行参数?
- 30. 访问命令行参数在Objective-C
你是怎么进入亚行后得到贝壳? – Yury 2012-01-15 21:32:01
shell @ android:/ $ – JustCurious 2012-01-15 21:35:54
它是一个设备还是仿真器? – Yury 2012-01-15 21:42:47