How to R/W file in android system directory (Inter

2019-08-23 06:25发布

  • 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 not working.

    if you have example please let me know. Thanks

2条回答
相关推荐>>
2楼-- · 2019-08-23 06:54

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.

查看更多
戒情不戒烟
3楼-- · 2019-08-23 06:57

//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
查看更多
登录 后发表回答