我已经 root 我的模拟器 android 设备,现在想执行以下系统调用:
mount -o rw,remount /system
我的代码是:
Runtime.getRuntime().exec( "su -c mount -o rw,remount /system" );
但它不起作用。
谢谢
最佳答案
试试这个:
Runtime.getRuntime().exec( new String[]{"su", "-c", "mount -o remount,rw /system"} );
也试试这个:
Runtime.getRuntime().exec( new String[]{"su", "-c", "mount -o remount rw /system"} );
此外,您需要在您的 Android Manifest 中获得以下权限:
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
关于java - 通过应用程序在 Android 设备中执行挂载命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33333706/