SQL Client on Android

孤街醉人 提交于 2019-12-21 06:06:09

问题


I'm developing on Android and currently haev various methods which manage my database in a convenient class.

What I'd ideally like, though, is a (preferably GUI) sql client that would allow me to view the contents of a different apps' DB.

Eg:

I install my own app (App1). It creates and uses a DB I install I use SQLClient to examine App1's DB.

Does anyone know if anything like this exists? If not, I can see a way that it could be implemented assuming I can get permission (and a naming convention) for accessing another apps' DB.

Any ideas/suggestions greatly appreciated.

As an alternative, I'd be willing to run something on the PC while the phone is connected via USB (I know there's a tool that comes with the android SDK but it's a little clunky and as I mentioned, a GUI would be preferable)


回答1:


If you want this for development - you can install new MOTODEV Studio from Motorola (it's free) It has UI for SQlite




回答2:


If you place the SQLite database on the scdcard you could use: http://aaa.andsen.dk/aSQLiteManager.html A free open source SQLite Manager for Android




回答3:


See Using SQLite from Shell in Android

but that's not a GUI, sorry.




回答4:


I don't know of any such application.

The only way to access another Application's database is through a ContentProvider. So a "native" SQL client won't be possible. You have to deal with the access that the target application provides. If it doesn't offer a ContentProvider, then you're stuck with the SDK's solution.

Another option would be to - as you mentioned - write an application on the PC. You could use this in tandem with an application on Android with opens up a ServerSocket and forwards incoming commands directly to SQLite. Essentially writing an SQLite Proxy :) This is very "hackish", SQL-Injectable and otherwise attackable. In a controlled debug/test environment this shouldn't be an issue though.

This just popped into my mind. There may be other solutions...



来源:https://stackoverflow.com/questions/1600650/sql-client-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!