Reputation: 587
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?
Upvotes: 9
Views: 50191
Reputation: 5791
[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 "myfolder", which is placed in 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!
Upvotes: 7
Reputation: 587
http://android-tricks.blogspot.in/2009/01/mount-filesystem-read-write.html
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
This was useful: now i can create directory :)
Upvotes: 2
Reputation: 10620
Login as root, Just add the following permission to your file in command mode using Linux Command :
$ chmod 777 rules.d
Upvotes: -5