Reecc / roottools

Automatically exported from code.google.com/p/roottools
0 stars 0 forks source link

Remount fails to mount directory #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
if(RootTools.isRootAvailable()) {
    String appsDirPath = "/data/app";
    File appsDir = new File(appsDirPath);
    boolean result = RootTools.remount(appsDirPath, "rw");
    if(result) {
        appsDir.list();
    }
}

What is the expected output? What do you see instead?
.list() should allow me to see all files contained within the directory, 
however it returns null. Further inspection indicates that appsDir.canRead() 
returns a false.

What version of the product are you using? On what operating system?
RootTools 1.7, Android 4.0.4

Please provide any additional information below.

Original issue reported on code.google.com by skylar.s...@gmail.com on 2 May 2012 at 8:03

GoogleCodeExporter commented 8 years ago
on the off chance that i'm using it incorrectly... this fails to show /data/app 
in the mounts:

if(RootTools.isRootAvailable()) {
    String appsDirPath = "/data/app";
    File appsDir = new File(appsDirPath);
    boolean result = RootTools.remount(appsDirPath, "rw");
    if(result) {
try {
                        RootTools.getMounts();
                    } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
    }
}

Original comment by skylar.s...@gmail.com on 2 May 2012 at 8:17

GoogleCodeExporter commented 8 years ago
Well, remount is suppose to be used for system mounts...I suppose I should make 
that a bit clearer.

You don't want to remount that, you need to change the permissions on that 
directory.
We don't have a function for this, but I will add it in.

Use chmod to change the permissions of that directory to 0777 so that you can 
access the data stored there. However make sure you return the permissions to 
what they were before you changed them.

Original comment by Stericso...@gmail.com on 2 May 2012 at 8:34

GoogleCodeExporter commented 8 years ago
Ahh. My apologies for the misunderstanding. Thanks for taking the enhancement 
request then. =)

Original comment by skylar.s...@gmail.com on 7 May 2012 at 3:31