Android的 - 从应用程序内改变根深蒂固的设备的系统设置 [英] android - changing the system settings of a rooted device from inside the app
问题描述
我试图改变所描述的短信限制<一href="http://stackoverflow.com/questions/1663514/android-sending-lots-of-sms-messages/2434308#2434308">here从应用程序内。该应用被假定为有根设备上运行。我使用的<一个href="http://$c$c.google.com/p/roottools/downloads/detail?name=RootTools-1.1.0-sdk3-generic.jar&can=2&q="相对=nofollow> RootTools 来检查设备是植根与否。我试图找出如何编写实际设置到 settings.db
。任何建议,可以帮助我在这是非常AP preciated。
I am trying to change the sms limit described here from inside the app. The app is assumed to be running on a rooted device. I'm using the RootTools to check if the device is rooted or not. I'm trying to figure out how to write the actual setting on to the settings.db
. Any suggestion which could help me in this is highly appreciated.
在此先感谢。
推荐答案
我这解决了这样做的:
- 复制
/data/data/com.android.providers.settings/databases/settings.db
来我的应用程序文件夹/数据/数据/ my_app_directory /
。 - 使用
SQLiteDatabase
类更新数据库表中。 - 从
/data/data/my_app_directory/settings.db
复制回数据库/data/data/com.android.providers.settings /数据库/
- copy the
/data/data/com.android.providers.settings/databases/settings.db
to my application folder/data/data/my_app_directory/
. - update the table in the database using the
SQLiteDatabase
class. - copy back the database from
/data/data/my_app_directory/settings.db
to/data/data/com.android.providers.settings/databases/
复制操作是用做 RootTools.sendShell
这篇关于Android的 - 从应用程序内改变根深蒂固的设备的系统设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!