Reputation: 511
I have already rooted my emulator android device and now want to execute the following system call:
mount -o rw,remount /system
My code is:
Runtime.getRuntime().exec( "su -c mount -o rw,remount /system" );
but it doesn't work.
Thanks
Upvotes: 1
Views: 1429
Reputation: 2220
Try this:
Runtime.getRuntime().exec( new String[]{"su", "-c", "mount -o remount,rw /system"} );
Try this as well:
Runtime.getRuntime().exec( new String[]{"su", "-c", "mount -o remount rw /system"} );
Also, you need the following permission in your Android Manifest:
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
Upvotes: 1