简体   繁体   中英

renaming files using adb shell

I want to rename a file on my android device (running CyanogenMod 11) using the adb shell. I have access to the phone via adb, but when I go to the directory where the file is located and try to rename it with mv ./file.old ./file.new I get mv ./file.old failed, Read-only file system . Tried the same with su but then I get /system/bin/sh: su: not found

Do I need to change something on my phone or somewhere else?

You should first mount system as rw

su
mount -o remount,rw /system
mv ./file.old ./file.new

First, You cannot rename system file directly, if it's a system file, you'll need superuser permission and you'll have to make the file system read-write. Second, Look on your phone as soon as you type su and Grant permission from phone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM