Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remount fails to mount directory #19

Open
GoogleCodeExporter opened this issue Mar 2, 2016 · 3 comments
Open

Remount fails to mount directory #19

GoogleCodeExporter opened this issue Mar 2, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant