Skip to content Skip to sidebar Skip to footer

How To R/w File In Android System Directory (internal Storage)

I want to create the file in android system folder. I have also tried this 'mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system' using Runtime.getRuntime().exec() but it's

Solution 1:

Android applications don't run as root on an unmodified device so they can't write to the /system folder or remount file systems.

Why do you want to write to /system? What's wrong the the storage directory for you app?

This may be possible on a "rooted" Android device but this rules out the majority of users.

Solution 2:

//if its showing as $ you need to root your phone

padmakumar@padmakumar-desktop:~$ adb shell
$ 

//if its showing as # you can copy files

padmakumar@padmakumar-desktop:~$ adb shell
# 

//let do this step

padmakumar@padmakumar-desktop:~$  adb root
padmakumar@padmakumar-desktop:~$ adb remount

//push a file from you system to your phone

  adb push ./Desktop/my_lib.so  /system/lib

Post a Comment for "How To R/w File In Android System Directory (internal Storage)"