0

I'm trying to wipe my device using adb shell su -c wipe all, but when I run it I get the following errors:
unlink() error on '/system/vendor/res/images/dock/dock.png' 'Read-only file system'
and
rmdir() error on '/system/vendor/res/images/dock' 'Read-only file system'
except very many of them for varying files and directories. Is there something I should do before running the wipe command?

thanks!

PS. This occurs on a Samsung Galaxy Nexus with a slightly customized 4.3 OS. I don't really have anything else to compare against, but doesn't seem like a hardware issue, therefore no samsung galaxy nexus tag.

MishaP
  • 370
  • 1
  • 5
  • 13
  • /system is mounted read-only for good reasons. I don't think you want to wipe it that way – otherwise, what do you want to boot from thereafter, with the OS gone? Why after all do you want to wipe at all? – Izzy Sep 27 '13 at 16:14
  • I need to wipe for an automated test. UI is always clunky and slow to use in automation, so I need a command line or intent method of wiping the device. It's not that I specifically want to delete stuff from the /system dir, it's just apparently the way the wipe command is supposed to work. If it's not supposed to unlink and remove stuff from the /system dir, I'm pretty sure they would have caught these errors in the script and not displayed them if the wipe was properly executed. – MishaP Sep 27 '13 at 16:22
  • Yeah. And as I wrote above: I'm not only "pretty", but 100% sure that if you wipe /system your device will no longer boot to the UI. I'm pretty sure all you would see is, maybe, the boot logo then. If you don't believe me, check e.g. Android Folder Hierarchy and the partition tag-wiki. – Izzy Sep 27 '13 at 19:13

1 Answers1

1

As Izzy points out, /system is usually mounted read-only, because it contains the operating system itself. The only reason you're getting these errors is because you specifically asked the command to wipe both /system and /data: that's what the all means. If you actually did that, you'd have to reboot into recovery to reinstall the OS. If that's what you really want, you should first remount /system as read-only by running the following command in a root shell on the device:

mount -ro remount,rw /system

If you just want to wipe user data, to get an effect like a factory-reset for a clean slate for testing, then the command you need is wipe data.

Dan Hulme
  • 35,000
  • 17
  • 90
  • 155
  • Aha I see, I was worried that wiping data only would not take care of everything. Thank you both for your help! – MishaP Sep 27 '13 at 21:21