tree: 95103473360d4408de568d54c923114f318ed6d9 [path history] [tgz]
  1. init/
  2. .project_alias
  3. android_sdk_version.h
  4. arc_apply_per_board_config_main.cc
  5. arc_create_data_main.cc
  6. arc_handle_upgrade_main.cc
  7. arc_remove_data_main.cc
  8. arc_remove_stale_data_main.cc
  9. arc_setup.cc
  10. arc_setup.h
  11. arc_setup_metrics.cc
  12. arc_setup_metrics.h
  13. arc_setup_metrics_test.cc
  14. arc_setup_test.cc
  15. arc_setup_util.cc
  16. arc_setup_util.h
  17. arc_setup_util_find_all_properties_fuzzer.cc
  18. arc_setup_util_find_fingerprint_and_sdk_version_fuzzer.cc
  19. arc_setup_util_test.cc
  20. art_container.cc
  21. art_container.h
  22. art_container_test.cc
  23. boot_lockbox_client.cc
  24. boot_lockbox_client.h
  25. BUILD.gn
  26. config.cc
  27. config.h
  28. config_test.cc
  29. main.cc
  30. OWNERS
  31. priv_code_verifier.cc
  32. priv_code_verifier.h
  33. README.md
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 repository rewrites WRITABLE_MOUNT.

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