Get file permissions in Android (root) -


after play around rooted devices, got stuck on files. let's have file somewhere in root folder want read/write application. way found far changing file permission like

string [] cmd = { "su", "-c", "chmod", "777", path}; process process = new processbuilder(cmd).start(); process.waitfor(); 

this works fine, problem want return original file permissions after i'm done it.

can me getting file/directory current permissions?

do ls -l on file/directory , parse output

edit op: solution in this thread. answer pushed me in right direction.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -