read only file system error на андроиде что делать
Read only file system on Android
How can I fix this?
24 Answers 24
Not all phones and versions of android have things mounted the same.
Limiting options when remounting would be best.
Simply remount as rw (Read/Write):
Once you are done making changes, remount to ro (read-only):
works for me and seems to be the simplest solution.
Got this off an Android forum where I asked the same question. Hope this helps somebody else.
On a terminal emulator on the phone:
Then on the cmd prompt, do the adb push
While I know the question is about the real device, in case someone got here with a similar issue in the emulator, with whatever tools are the latest as of Feb, 2017, the emulator needs to be launched from the command line with:
Here’s an example of the command line I use to run my emulator:
I think the safest way is remounting the /system as read-write, using:
and when done, remount it as read-only:
This works for me, and is the simplest solution.
On my Samsung galaxy mini S5570 (after got root on cellphone):
Fist, as root, I ran:
Grant root permissions on touch screen
list all mount points that we have and we can see, in my case, that /dev/stl12 was mounted on /system as ro (ready only), so we just need do:
Try the following on the command prompt:
Here is what worked for me. I was running an emulated Android 7.1.1 (Nougat) device.
All the changes that you do on the /system contents will survive a restart.
I checked with emulator and following worked.
As mentioned above as well, execute second step in single shot.
Open terminal emulator on the phone: then
after that daemon is started
then the read only is converted into the read-Write.
I found this article from google, and thought I’d add the steps necessary on a Sony Xperia Z (4.2.2).
The Sony has a watchdog process which detects when you’ve changed ro to rw on / and /system (these are the only ones I was trying to modify) and possibly others.
I modified the hosts file here, so this is the place you make the changes you need to the filesystem. To leave things the way we found them, do this:
At which point ric should automatically restart. (It restarted for me automatically.)
Adding a little bit more to Jan Bergström’s answer: Because Android is a Linux based system, and the path in Linux contains forward slashes(../), while using push command, use «/» to define destination path in the Android device.
For Example, the command goes: adb push C:\Users\admin\Desktop\1.JPG sdcard/pictures/
Notice that here, back slashes are used to define source path of the file to be pushed from windows PC and forward slashes are used to define destination path because Android is a Linux based system. You don’t have to act as a root to use this command and also, it works perfectly fine on production devices.
Thanks, Sérgio, for «mount» command without parameters idea. I’d need to made adb push into /data/data/com.my.app/lib for some test issue, and get «Read-only filesystem» message.
ls command shows me:
So, it’s understood, that «lib» directory is separated from other application directories.
«df» command didn’t help also, but shows that my /mnt/asec/com.my.app-1 directory is at the separate mount point.
Then I looks by mount and voila!
Next steps are already described upwards: remount to RW, push and remount back to RO.
it sames that must extract and repack initrc.img and edit init file with the code of mount /system
Copy files to the SD-card?
Well, I assume you like to copy data to the Sd-card from the developers computer? You might have rooted the devise and made the area you address available?) I had about the same problem to upload data files for my application(Android Studio 1.3.2 in Win7), but.
So for instance the the adb command can look like this:
Файловая система только для чтения на Android
Как я могу это исправить?
Не на всех телефонах и версиях Android установлены одинаковые вещи.
Ограничение параметров при перемонтировании было бы наилучшим.
Просто перемонтируйте как rw (чтение / запись):
После внесения изменений перемонтируйте в ro (только для чтения):
работает для меня и, кажется, самое простое решение.
Получил это на форуме Android, где я задавал тот же вопрос. Надеюсь, это поможет кому-то еще.
На эмуляторе терминала на телефоне:
Затем в командной строке cmd выполните adb push
Хотя я знаю, что вопрос касается реального устройства, в случае, если кто-то попал сюда с похожей проблемой в эмуляторе, с какими-либо инструментами, самыми последними по состоянию на февраль 2017 года, эмулятор должен быть запущен из командной строки с помощью:
Вот пример командной строки, которую я использую для запуска своего эмулятора:
Я думаю, что самый безопасный способ это перемонтировать / system как read-write, используя:
и когда закончите, перемонтируйте его только для чтения:
На моем Samsung galaxy mini S5570 (после получения рута на мобильном телефоне):
Кулак, как корень, я побежал:
как обычный пользователь:
Предоставление прав root на сенсорном экране
перечислите все точки монтирования, которые у нас есть, и мы можем видеть, в моем случае, что / dev / stl12 был смонтирован в / system как ro (только готово), поэтому нам просто нужно сделать:
Попробуйте следующее в командной строке:
Это работает для меня и является самым простым решением.
Вот что сработало для меня. У меня было эмулированное устройство Android 7.1.1 (Nougat).
Все изменения, внесенные вами в содержимое / system, сохранятся после перезапуска.
Я проверил с эмулятором и следующий работал.
/ рабочий стол / hosts / system / etc / hosts
Как уже упоминалось выше, выполните второй шаг за один выстрел.
Откройте эмулятор терминала на телефоне: тогда
после запуска этого демона
затем только чтение преобразуется в чтение-запись.
Я нашел эту статью в Google и подумал, что добавлю шаги, необходимые для Sony Xperia Z (4.2.2).
У Sony есть сторожевой процесс, который обнаруживает, когда вы изменили ro на rw на / и / system (это единственные, которые я пытался изменить) и, возможно, другие.
Я изменил файл hosts здесь, так что это место, где вы вносите необходимые изменения в файловую систему. Чтобы оставить вещи такими, какими мы их нашли, сделайте так:
В этот момент RIC должен автоматически перезапустить. (Он перезапустился для меня автоматически.)
Например, команда выглядит так: adb push C: \ Users \ admin \ Desktop \ 1.JPG sdcard / pictures /
Команда ls показывает мне:
Итак, понятно, что каталог «lib» отделен от других каталогов приложений.
Команда «df» тоже не помогла, но показывает, что мой /mnt/asec/com.my.app-1 каталог находится в отдельной точке монтирования.
Тогда я смотрю mount и вуаля!
Следующие шаги уже описаны вверх: перемонтировать в RW, нажать и перемонтировать обратно в RO.
это то же самое, что нужно распаковать и перепаковать файл initrc.img и отредактировать init файл с кодом mount / system
Копировать файлы на SD-карту?
Ну, я полагаю, вам нравится копировать данные на SD-карту с компьютера разработчиков? Возможно, вы укоренили устройство и сделали доступной область, к которой обращаетесь?) У меня была примерно такая же проблема при загрузке файлов данных для моего приложения (Android Studio 1.3.2 в Win7), но.
Так, например, команда adb может выглядеть так: