tree: b80db00ee0528d9571b243a4d17532405306ca1a [path history] [tgz]
  1. .project_alias
  2. BUILD.gn
  3. OWNERS
  4. README.md
  5. android_sdk_version.h
  6. arc_read_ahead.cc
  7. arc_read_ahead.h
  8. arc_read_ahead_files.h
  9. arc_read_ahead_test.cc
  10. arc_setup.cc
  11. arc_setup.h
  12. arc_setup_metrics.cc
  13. arc_setup_metrics.h
  14. arc_setup_metrics_test.cc
  15. arc_setup_test.cc
  16. arc_setup_util.cc
  17. arc_setup_util.h
  18. arc_setup_util_test.cc
  19. art_container.cc
  20. art_container.h
  21. art_container_test.cc
  22. boot_lockbox_client.cc
  23. boot_lockbox_client.h
  24. config.cc
  25. config.h
  26. config_test.cc
  27. etc/
  28. main.cc
  29. priv_code_verifier.cc
  30. priv_code_verifier.h
arc/setup/README.md

Chrome OS arc-setup.

/usr/sbin/arc-setup

arc-setup handles setup/teardown of ARC container or upgrading container. For example, mount point creation, directory creation, setting permissions uids and gids, selinux label setting, config file creation.

Often, script language is used for such stuff in general, but ARC uses native executable just for performance and better testability.

/usr/share/arc-setup/config.json

config.json is the configuration file for arc-setup. Currently, the following configurations are in the file:

USE_ESDFS

Setting this value to true will switch the implementation of the sdcard mount from a FUSE to esdfs.

ANDROID_DEBUGGABLE

Setting this value to true will make Android boot with ro.debuggable. This should make Android behave mostly like an -userdebug image.

A non-comprehensive list of caveats:

  • Anything that detects the build type at compile-time will be unaffected, in particular SELinux rules that are relaxed, or the conditional compilation of some system tools.
  • adb root will still be unavailable.
  • su will be missing.
  • strace won't work.
  • The build type will still be -user.

WRITABLE_MOUNT

Setting this value to true will make the Android root, and images for sdcard etc. filesystems read-write. Note that the images themselves need to be in a format that supports being mounted this way (e.g. ext4), which is not true of the default format (squashfs).

config.json and build/debug scripts

Several scripts modify the variables in config.json:

  • arc-setup-9999.ebuild rewrites USE_ESDFS at package build time depending on the type of the BOARD.
  • board_specific_setup.sh rewrites ANDROID_DEBUGGABLE at image build time.
  • setup_writable_android_mount.sh which is a debug script in Android master rewrites WRITABLE_MOUNT.

Be careful when adding, removing, or renaming the entries.