Permalink
Browse files

Update for JellyBean

For JB mount command need more arguments: fmask & dmask, or the time will be invalid and some Explorer app can not access usb stick

Signed-off-by: Shaka Huang <shaka@cs03.org>
  • Loading branch information...
1 parent 356b01c commit 3f08acb5d5aadfa1e38ec78138633ac55241281a @shakalaca committed Aug 22, 2012
Showing with 6 additions and 2 deletions.
  1. +1 −1 project.properties
  2. +5 −1 src/com/corner23/android/usb_otg_manager/Main.java
View
2 project.properties
@@ -8,4 +8,4 @@
# project structure.
# Project target.
-target=android-15
+target=android-16
View
6 src/com/corner23/android/usb_otg_manager/Main.java
@@ -212,7 +212,11 @@ private int doMount() {
}
// do real mount
- response = Root.executeSU("mount -r " + (bReadOnly ? "" : "-w") + " -o utf8 -t " + fsTypes[fsType] + " " + STORAGE_DEVICE_PATH + " " + MOUNT_PATH);
+ String JB_str = "";
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
+ JB_str = "fmask=0000,dmask=0000,";
+ }
+ response = Root.executeSU("mount -r " + (bReadOnly ? "" : "-w") + " -o " + JB_str + "utf8 -t " + fsTypes[fsType] + " " + STORAGE_DEVICE_PATH + " " + MOUNT_PATH);
if (response != null) {
Log.d(TAG, "Error mounting usb storage :" + response);
Root.executeSU("rmdir " + MOUNT_PATH);

0 comments on commit 3f08acb

Please sign in to comment.