Can i edit files inside android shell(adb shell)
From android shell, is there a way I can edit a file?
Simple files like .rc or some script files, if I want to change the values, currently I am pulling them, changing and pushing back. Somehow this I feel is not good.
Is there a way I can edit these files from inside android shell. like vim editor in Linux shell.
Also, I have root permissions on my device. So if i have to install some root applications, i can do it.
3 Solutions collect form web for “Can i edit files inside android shell(adb shell)”
You can create text files using:
$ cat > filename.txt
You can add lines to a text files using:
$ cat >> filename.txt
Both commands can be terminated using
A simplified version of vi for Android is contained in Busybox. Assuming you’re running Windows, once you’ve installed Busybox (and you do need root permissions to do so), I recommend you follow the instructions at https://stackoverflow.com/a/29033010/5025060 to accomplish full screen text editing on your Android device from your Windows PC screen.
I’ve also noticed that the default shell is
sh and after entering
bash I could use