android - changing the system settings of a rooted device from inside the app

前端 未结 3 1493
我寻月下人不归
我寻月下人不归 2020-12-13 22:51

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

3条回答
  •  孤城傲影
    2020-12-13 23:28

    Late answer, but you don't need to copy settings.db, you can update it with RootTools like

    CommandCapture commandLogcat = new CommandCapture(0, "sqlite3 /data/data/com.android.providers.settings/databases/settings.db \"UPDATE secure SET value = '192.168.2.140' WHERE name = 'eth_ip';\"");
    RootTools.getShell(true).add(commandLogcat).getExitCode();
    

提交回复
热议问题