Superuser/root privileges (on android devices)?

Hi Folks,

i need access to “file:///data/misc/wifi/wpa_supplicant.conf”. On the normal way

$cordovaFile.readAsText('file:///data/misc/wifi/', 'wpa_supplicant.conf')

i got an exception

W/System.err(25086): java.io.IOException
W/System.err(25086): 	at org.apache.cordova.file.LocalFilesystem.getEntryForLocalURL(LocalFilesystem.java:145)
W/System.err(25086): 	at org.apache.cordova.file.FileUtils.resolveLocalFileSystemURI(FileUtils.java:632)
W/System.err(25086): 	at org.apache.cordova.file.FileUtils.access$400(FileUtils.java:52)
W/System.err(25086): 	at org.apache.cordova.file.FileUtils$14.run(FileUtils.java:389)
W/System.err(25086): 	at org.apache.cordova.file.FileUtils$25.run(FileUtils.java:555)
W/System.err(25086): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

because i do not have rights for that file

# ls -la /data/misc/wifi/wpa_supplicant.conf 
-rw-rw---- system   wifi         1667 2015-04-15 23:28 wpa_supplicant.conf

From native code in Java there is a easy way for that, but how to get superuser/root privileges on android devices in ionic with ngCordova?

thanks
Toby

1 Like