I am currently trying to get full access to file system through the working app.
I tested it on rooted AVDs with API levels 26, 27, 31, 32
While executing commands through terminal manually is no problem (also programmatically on apis 26/27), there seems to be no access to file system on apis 31 / 32 when I call same commands from the app.
Even though ‘whoami’ clearly returns ‘root’
So:
<code>//Fails
val command = "su -c 'touch /data/something.../
//Succeeds
val cmd = "su -c 'touch /storage/something.../
//Also succeeds
val cmd = "su -c 'ps -ef'
</code>
<code>//Fails
val command = "su -c 'touch /data/something.../
//Succeeds
val cmd = "su -c 'touch /storage/something.../
//Also succeeds
val cmd = "su -c 'ps -ef'
</code>
//Fails
val command = "su -c 'touch /data/something.../
//Succeeds
val cmd = "su -c 'touch /storage/something.../
//Also succeeds
val cmd = "su -c 'ps -ef'
I guess it is something with file system on high apis. Is there any work around