I am trying to create a directory through adb shell
I have to create a directory in etc folder which was unsuccessful. I managed to figure out that it is linked to /system/etc
and tried to create in /system/etc
, but in both cases I was getting "Read only File System".
How to make it Read write?
I tried switching to super user using "su".
I tried modifying udev/rules.d
in the host machine:
created a file 51-android.rules with " SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev" "
I'm still getting the same "Read only File system".
How do I fix this?
adb shell command: mkdir (for creating a directory)
Creating a new directory (or folder) is done using the "mkdir" command (which stands for make directory.) I'll create a new directory named "OtherStuff". When I type "ls", we'll see the new folder in our list. That's really all there is to it!
With the help of mkdir command, you can create a new directory wherever you want in your system. Just type "mkdir <dir name> , in place of <dir name> type the name of new directory, you want to create and then press enter. Example: mkdir created.
[Trick] Make a dir (or various) in a non-rooted phone using adb push:
if you use the command
adb push myfolder /storage/sdcard0/Download
and "myfolder" contains another folders inside, these folders will be created inside the "Download" folder of the phone
So, the hack i use to install assets inside my apps:
adb push assetfolder /storage/sdcard0/Android/data/com.myapp.name/
then "assetfolder" contains
assetfolder/
assetfolder/db/mysqlite.db
assetfolder/img/myimage.png
assetfolder/json/initial-data.json
etc
Then my app has its
com.myapp.name/db/mysqlite.db
com.myapp.name/img/myimage.png
com.myapp.name/json/initial-data.json
Hope it helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With