There is a situation here, I'm developing an Android application, using Java. I'm pretty familiar with all this stuff, but now it's the first time when I need to use SU permissions. I just need to replace (actually, rename) the file in system/app directory, but it looks like I'm not able to perform it in a usual way (renameTo method in File class), it just returns me FALSE, which means that there was some error in operation.
So can anybody tell me how to use SU? My test phone is fully rooted with SU 3.0.3.2, any app that require SU works perfectly fine.
Shall I use the same method but with some additions in manifest? Shall I use busybox in some way?
I already googled for this, and I can't find any useful information. And also, there is no documentation on official Android Superuser website.
Thanks in advance!
You'll probably also need to remount the filesystem as RW since /system is read-only. So you might need to call SU with a similar command below:
mount -o r,remount -t yaffs2 /dev/block/mtdblock3 /system
To execute the command, you can try two ways (I've notice in android sometimes one works and the other won't )
Or you can do