Android: how can execute a chmod on rooted devides
问题 I would execute a command on my rooted Android 2.1 device String path = "/data/data/com.android.providers.settings/databases/settings.db"; Runtime.getRuntime().exec("/system/bin/chmod -f 777 " + path); But this command does nothing on the targeted file. Any idea? 回答1: You need to get the runtime as the root user first. There is a nice ShellInterface class that you can use from the MarketEnabler source available on Google Code. Though keep in mind this source code is released under the GPL.