I want to create a file in the /system directory. I think that directory is \"protected\" and the phone must be rooted to access and create to it. I used this simple code to cre
I can't tell how to implement the following steps but I think it's not too hard to find a solution on the net:
hint: use the "adb shell" and check if the upper steps can lead to success (su && remount -o remount,rw /system && touch /system/test)
On some devices there's the unlucky chance that the internal memory is in protected mode (google S-ON / S-OFF). If this is the case for you it will not be that easy like I imagined. But even than it must be possible, since the market is installing files there. This would be the last hint, to look at the market source-code ;/
You need to call following method on file object
file.createNewFile();
On executing this following error comes because of read-only directory
11-09 19:45:15.136: E/VideoSample(4245): java.io.IOException: open failed: EROFS
(Read-only file system)
11-09 19:45:15.136: E/VideoSample(4245): at
java.io.File.createNewFile(File.java:940)