My main aim is to run a something like below from within an Android application:
$(normal mode)su
#(root mode) chmod 777 <some file>
But the problem here is as soon the shell changes from $ --> # the chmod command doesn't work.
Another way of achieving this is to make a shell script, place it in the Android /data
directory, and run it manually. But how can I run it from within the Android application, making sure that when the shell changes ($--> #) the functionality remains intact?
One more way is to run my script using the script manager application.