Skip to content

Commit

Permalink
Fix for read-only rootfs
Browse files Browse the repository at this point in the history
Signed-off-by: Xmister <[email protected]>
  • Loading branch information
Xmister committed Sep 19, 2014
1 parent ab04973 commit 62e68b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="hu.xmister.xbmcwrapper"
android:versionCode="2"
android:versionName="3.1" >
android:versionName="3.2" >

<uses-sdk
android:minSdkVersion="9"
Expand Down
6 changes: 5 additions & 1 deletion src/hu/xmister/xbmcwrapper/PlayerView.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,16 @@ private void cifsMountPlay(final String FileSmb) throws Exception {
SharedPreferences sharedPreferences = getSharedPreferences("default", 0);
MOUNT_PATH=sharedPreferences.getString("cifs","/mnt/xbmcwrapper");
// Perform su to get root privileges
String cmd=BB_BINARIES[BB_BINARY]+" mkdir -p "+MOUNT_PATH+"\n";
String cmd=BB_BINARIES[BB_BINARY]+" mount -o remount,rw /\n";
executeSu(cmd);
cmd=BB_BINARIES[BB_BINARY]+" mkdir -p "+MOUNT_PATH+"\n";
executeSu(cmd);
cmd=BB_BINARIES[BB_BINARY]+" chmod 777 "+MOUNT_PATH+"\n";
executeSu(cmd);
cmd=BB_BINARIES[BB_BINARY]+" umount "+MOUNT_PATH+"\n";
executeSu(cmd); //Just to make sure there is no stuck mount.
cmd=BB_BINARIES[BB_BINARY]+" mount -o remount,ro /\n";
executeSu(cmd);
String smbpath=FileSmb.replaceFirst("(?i)smb:", "");
String smbfile=smbpath.substring(2);
smbfile=smbfile.substring(smbfile.indexOf('/')+1);
Expand Down

0 comments on commit 62e68b6

Please sign in to comment.