0

At the root directory of android os there is some folder such as /acct /root /sys /dev , ... that are not available in firmware structure. by using fastboot to flash firmware There is some mount point like /system /cust /recovery /boot but there is no (/) root mount point.

I want to flash whole OS. Is there any firmware that contains above directories such as (/) root? or how can i restore my hole android to factory snapshot?

My phone is huawei g6-u10.

  • 2
    Aside from /system and /data, most directories are generated dynamically at boot time, hence you don't see them in firmwares. – Andy Yan Dec 16 '17 at 11:53
  • @AndyYan you could make that an answer, with some pointers on the boot image (check Wikipedia on "initrd" if you need some more details/phrasing). Also possibly good references are post on our site mentioning initrd :) – Izzy Dec 16 '17 at 12:38
  • So if i erase all data and flash firmware using adb, everything else will be regenerated during boot tme? do android drivers work properly after flashing? – AIA Dec 16 '17 at 12:49
  • @Izzy Given that I had little prior knowledge of initrd, I feel you're more suited for answering this, especially after seeing this previous answer of yours - your call. – Andy Yan Dec 16 '17 at 12:52
  • 1
    @Izzy No prob - a chance for myself to learn too. – Andy Yan Dec 16 '17 at 13:33
1

The root file system (/) and the files therein (plus several more in some sub-directories) are created at boot time from the so-called InitRd ("initial RAM disk", or "boot image").

Plus, there are some special "directories" which hold not really "files" but map system information (there's a Unix maxime saying "everything is a file"); in a terminal (or from adb shell) run the command mount, and you see some special file systems like sysfs and tmpfs: the former holds system information, the latter temporary stuff.

As those are created by InitRd, you don't need to worry about them being lost when flashing a new ROM: they weren't really there, and the boot image from the new ROM will take care of creating them properly as well.

For further details, please also refer to these posts on our site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.