Copy disabled (too large)
Download .txt
Showing preview only (10,190K chars total). Download the full file to get everything.
Repository: android/platform_system_core
Branch: main
Commit: a3b721a32242
Files: 1803
Total size: 9.4 MB
Directory structure:
gitextract_0nlnlp4w/
├── .gitignore
├── Android.bp
├── CleanSpec.mk
├── MODULE_LICENSE_APACHE2
├── OWNERS
├── PREUPLOAD.cfg
├── bootstat/
│ ├── Android.bp
│ ├── OWNERS
│ ├── README.md
│ ├── boot_event_record_store.cpp
│ ├── boot_event_record_store.h
│ ├── boot_event_record_store_test.cpp
│ ├── boot_reason_test.sh
│ ├── bootstat-debug.rc
│ ├── bootstat.cpp
│ ├── bootstat.rc
│ └── testrunner.cpp
├── cli-test/
│ ├── Android.bp
│ ├── README.md
│ └── cli-test.cpp
├── code_coverage/
│ ├── Android.bp
│ ├── empty_policy/
│ │ ├── code_coverage.arm.policy
│ │ ├── code_coverage.arm64.policy
│ │ ├── code_coverage.riscv64.policy
│ │ ├── code_coverage.x86.policy
│ │ └── code_coverage.x86_64.policy
│ └── seccomp_policy/
│ ├── code_coverage.arm.policy
│ ├── code_coverage.arm64.policy
│ ├── code_coverage.policy.def
│ ├── code_coverage.riscv64.policy
│ ├── code_coverage.x86.policy
│ ├── code_coverage.x86_64.policy
│ └── generate.sh
├── debuggerd/
│ ├── Android.bp
│ ├── MODULE_LICENSE_APACHE2
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── client/
│ │ ├── debuggerd_client.cpp
│ │ └── debuggerd_client_test.cpp
│ ├── common/
│ │ └── include/
│ │ └── dump_type.h
│ ├── crash_dump.cpp
│ ├── crash_test.cpp
│ ├── crash_test.h
│ ├── crasher/
│ │ ├── Android.bp
│ │ ├── arm/
│ │ │ └── crashglue.S
│ │ ├── arm64/
│ │ │ └── crashglue.S
│ │ ├── crasher.cpp
│ │ ├── riscv64/
│ │ │ └── crashglue.S
│ │ ├── x86/
│ │ │ └── crashglue.S
│ │ └── x86_64/
│ │ └── crashglue.S
│ ├── debuggerd.cpp
│ ├── debuggerd_benchmark.cpp
│ ├── debuggerd_test.cpp
│ ├── handler/
│ │ ├── debuggerd_fallback.cpp
│ │ ├── debuggerd_fallback_nop.cpp
│ │ ├── debuggerd_handler.cpp
│ │ └── fallback.h
│ ├── include/
│ │ └── debuggerd/
│ │ ├── client.h
│ │ └── handler.h
│ ├── libdebuggerd/
│ │ ├── backtrace.cpp
│ │ ├── gwp_asan.cpp
│ │ ├── include/
│ │ │ └── libdebuggerd/
│ │ │ ├── backtrace.h
│ │ │ ├── gwp_asan.h
│ │ │ ├── open_files_list.h
│ │ │ ├── scudo.h
│ │ │ ├── tombstone.h
│ │ │ ├── tombstone_proto_to_text.h
│ │ │ ├── types.h
│ │ │ ├── utility.h
│ │ │ └── utility_host.h
│ │ ├── open_files_list.cpp
│ │ ├── scudo.cpp
│ │ ├── test/
│ │ │ ├── UnwinderMock.h
│ │ │ ├── dump_memory_test.cpp
│ │ │ ├── elf_fake.cpp
│ │ │ ├── elf_fake.h
│ │ │ ├── log_fake.cpp
│ │ │ ├── log_fake.h
│ │ │ ├── mte_stack_record_test.cpp
│ │ │ ├── open_files_list_test.cpp
│ │ │ └── tombstone_proto_to_text_test.cpp
│ │ ├── tombstone.cpp
│ │ ├── tombstone_proto.cpp
│ │ ├── tombstone_proto_to_text.cpp
│ │ ├── utility.cpp
│ │ └── utility_host.cpp
│ ├── pbtombstone.cpp
│ ├── proto/
│ │ ├── Android.bp
│ │ ├── jarjar-rules.txt
│ │ └── tombstone.proto
│ ├── protocol.h
│ ├── rust/
│ │ └── tombstoned_client/
│ │ ├── Android.bp
│ │ ├── src/
│ │ │ └── lib.rs
│ │ ├── wrapper.cpp
│ │ └── wrapper.hpp
│ ├── seccomp_policy/
│ │ ├── crash_dump.arm.policy
│ │ ├── crash_dump.arm64.policy
│ │ ├── crash_dump.policy.def
│ │ ├── crash_dump.riscv64.policy
│ │ ├── crash_dump.x86.policy
│ │ ├── crash_dump.x86_64.policy
│ │ └── generate.sh
│ ├── test_permissive_mte/
│ │ ├── Android.bp
│ │ ├── AndroidTest.xml
│ │ ├── mte_crash.cpp
│ │ └── src/
│ │ └── com/
│ │ └── android/
│ │ └── tests/
│ │ └── debuggerd/
│ │ └── PermissiveMteTest.java
│ ├── tombstone_handler.cpp
│ ├── tombstone_handler.h
│ ├── tombstone_symbolize.cpp
│ ├── tombstone_symbolize.h
│ ├── tombstoned/
│ │ ├── include/
│ │ │ └── tombstoned/
│ │ │ └── tombstoned.h
│ │ ├── intercept_manager.cpp
│ │ ├── intercept_manager.h
│ │ ├── tombstoned.cpp
│ │ ├── tombstoned.microdroid.rc
│ │ ├── tombstoned.rc
│ │ └── tombstoned_client.cpp
│ ├── util.cpp
│ └── util.h
├── diagnose_usb/
│ ├── Android.bp
│ ├── OWNERS
│ ├── diagnose_usb.cpp
│ └── include/
│ └── diagnose_usb.h
├── fastboot/
│ ├── Android.bp
│ ├── LICENSE
│ ├── OWNERS
│ ├── README.md
│ ├── TEST_MAPPING
│ ├── bootimg_utils.cpp
│ ├── bootimg_utils.h
│ ├── constants.h
│ ├── device/
│ │ ├── commands.cpp
│ │ ├── commands.h
│ │ ├── fastboot_device.cpp
│ │ ├── fastboot_device.h
│ │ ├── flashing.cpp
│ │ ├── flashing.h
│ │ ├── main.cpp
│ │ ├── tcp_client.cpp
│ │ ├── tcp_client.h
│ │ ├── usb.cpp
│ │ ├── usb.h
│ │ ├── usb_client.cpp
│ │ ├── usb_client.h
│ │ ├── usb_iouring.cpp
│ │ ├── usb_iouring.h
│ │ ├── utility.cpp
│ │ ├── utility.h
│ │ ├── variables.cpp
│ │ └── variables.h
│ ├── fastboot.bash
│ ├── fastboot.cpp
│ ├── fastboot.h
│ ├── fastboot_driver.cpp
│ ├── fastboot_driver.h
│ ├── fastboot_driver_interface.h
│ ├── fastboot_driver_mock.h
│ ├── fastboot_driver_test.cpp
│ ├── fastboot_integration_test.xml
│ ├── fastboot_test.cpp
│ ├── filesystem.cpp
│ ├── filesystem.h
│ ├── fs.cpp
│ ├── fs.h
│ ├── fuzzer/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── fastboot_fuzzer.cpp
│ │ ├── socket_mock_fuzz.cpp
│ │ └── socket_mock_fuzz.h
│ ├── fuzzy_fastboot/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── example/
│ │ │ ├── checksum_parser.py
│ │ │ ├── config.xml
│ │ │ └── validator.py
│ │ ├── extensions.cpp
│ │ ├── extensions.h
│ │ ├── fixtures.cpp
│ │ ├── fixtures.h
│ │ ├── main.cpp
│ │ ├── test_listeners.h
│ │ ├── test_utils.cpp
│ │ ├── test_utils.h
│ │ ├── transport_sniffer.cpp
│ │ └── transport_sniffer.h
│ ├── main.cpp
│ ├── mock_transport.h
│ ├── result.h
│ ├── socket.cpp
│ ├── socket.h
│ ├── socket_mock.cpp
│ ├── socket_mock.h
│ ├── socket_test.cpp
│ ├── storage.cpp
│ ├── storage.h
│ ├── super_flash_helper.cpp
│ ├── super_flash_helper.h
│ ├── super_flash_helper_test.cpp
│ ├── task.cpp
│ ├── task.h
│ ├── task_test.cpp
│ ├── tcp.cpp
│ ├── tcp.h
│ ├── tcp_test.cpp
│ ├── test_fastboot.py
│ ├── testdata/
│ │ ├── Android.bp
│ │ ├── fastboot_gen_rand.py
│ │ ├── make_super_images.sh
│ │ ├── super.img
│ │ ├── super_empty.img
│ │ └── system.img
│ ├── transport.h
│ ├── udp.cpp
│ ├── udp.h
│ ├── udp_test.cpp
│ ├── usb.h
│ ├── usb_linux.cpp
│ ├── usb_osx.cpp
│ ├── usb_windows.cpp
│ ├── util.cpp
│ ├── util.h
│ ├── vendor_boot_img_utils.cpp
│ ├── vendor_boot_img_utils.h
│ └── vendor_boot_img_utils_test.cpp
├── fs_mgr/
│ ├── Android.bp
│ ├── NOTICE
│ ├── OWNERS
│ ├── README.overlayfs.md
│ ├── TEST_MAPPING
│ ├── blockdev.cpp
│ ├── blockdev.h
│ ├── clean_scratch_files.rc
│ ├── file_wait.cpp
│ ├── fs_mgr.cpp
│ ├── fs_mgr_dm_linear.cpp
│ ├── fs_mgr_format.cpp
│ ├── fs_mgr_overlayfs_control.cpp
│ ├── fs_mgr_overlayfs_control.h
│ ├── fs_mgr_overlayfs_mount.cpp
│ ├── fs_mgr_overlayfs_mount.h
│ ├── fs_mgr_priv.h
│ ├── fs_mgr_remount.cpp
│ ├── fs_mgr_roots.cpp
│ ├── fs_mgr_vendor_overlay.cpp
│ ├── include/
│ │ ├── fs_mgr/
│ │ │ ├── file_wait.h
│ │ │ └── roots.h
│ │ ├── fs_mgr.h
│ │ ├── fs_mgr_dm_linear.h
│ │ ├── fs_mgr_overlayfs.h
│ │ └── fs_mgr_vendor_overlay.h
│ ├── libdm/
│ │ ├── Android.bp
│ │ ├── dm.cpp
│ │ ├── dm_table.cpp
│ │ ├── dm_target.cpp
│ │ ├── dm_test.cpp
│ │ ├── include/
│ │ │ └── libdm/
│ │ │ ├── dm.h
│ │ │ ├── dm_table.h
│ │ │ ├── dm_target.h
│ │ │ └── loop_control.h
│ │ ├── loop_control.cpp
│ │ ├── loop_control_test.cpp
│ │ ├── test_util.cpp
│ │ ├── test_util.h
│ │ ├── utility.cpp
│ │ └── utility.h
│ ├── libfiemap/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── binder.cpp
│ │ ├── fiemap_status.cpp
│ │ ├── fiemap_writer.cpp
│ │ ├── fiemap_writer_test.cpp
│ │ ├── image_manager.cpp
│ │ ├── image_test.cpp
│ │ ├── include/
│ │ │ └── libfiemap/
│ │ │ ├── fiemap_status.h
│ │ │ ├── fiemap_writer.h
│ │ │ ├── image_manager.h
│ │ │ └── split_fiemap_writer.h
│ │ ├── metadata.cpp
│ │ ├── metadata.h
│ │ ├── passthrough.cpp
│ │ ├── split_fiemap_writer.cpp
│ │ ├── testdata/
│ │ │ ├── file_32k
│ │ │ ├── file_4k
│ │ │ └── unaligned_file
│ │ ├── utility.cpp
│ │ └── utility.h
│ ├── libfs_avb/
│ │ ├── Android.bp
│ │ ├── avb_ops.cpp
│ │ ├── avb_ops.h
│ │ ├── avb_util.cpp
│ │ ├── avb_util.h
│ │ ├── fs_avb.cpp
│ │ ├── fs_avb_util.cpp
│ │ ├── include/
│ │ │ └── fs_avb/
│ │ │ ├── fs_avb.h
│ │ │ ├── fs_avb_util.h
│ │ │ └── types.h
│ │ ├── run_tests.sh
│ │ ├── sha.h
│ │ ├── tests/
│ │ │ ├── avb_util_test.cpp
│ │ │ ├── basic_test.cpp
│ │ │ ├── data/
│ │ │ │ ├── testkey_rsa2048.pem
│ │ │ │ ├── testkey_rsa4096.pem
│ │ │ │ └── testkey_rsa8192.pem
│ │ │ ├── fs_avb_device_test.cpp
│ │ │ ├── fs_avb_test.cpp
│ │ │ ├── fs_avb_test_util.cpp
│ │ │ ├── fs_avb_test_util.h
│ │ │ ├── fs_avb_util_test.cpp
│ │ │ └── util_test.cpp
│ │ ├── types.cpp
│ │ ├── util.cpp
│ │ └── util.h
│ ├── libfstab/
│ │ ├── Android.bp
│ │ ├── boot_config.cpp
│ │ ├── fstab.cpp
│ │ ├── fstab_priv.h
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ ├── fs_mgr_fstab_fuzzer.cpp
│ │ │ └── fstab.dict
│ │ ├── include/
│ │ │ └── fstab/
│ │ │ └── fstab.h
│ │ ├── logging_macros.h
│ │ └── slotselect.cpp
│ ├── liblp/
│ │ ├── Android.bp
│ │ ├── OWNERS
│ │ ├── TEST_MAPPING
│ │ ├── builder.cpp
│ │ ├── builder_test.cpp
│ │ ├── device_test.cpp
│ │ ├── fuzzer/
│ │ │ ├── Android.bp
│ │ │ ├── README.md
│ │ │ ├── image_gen_rand.py
│ │ │ ├── liblp_apis_fuzzer.cpp
│ │ │ ├── liblp_builder_fuzzer.cpp
│ │ │ └── liblp_super_layout_builder_fuzzer.cpp
│ │ ├── images.cpp
│ │ ├── images.h
│ │ ├── include/
│ │ │ └── liblp/
│ │ │ ├── builder.h
│ │ │ ├── liblp.h
│ │ │ ├── metadata_format.h
│ │ │ ├── mock_property_fetcher.h
│ │ │ ├── partition_opener.h
│ │ │ ├── property_fetcher.h
│ │ │ └── super_layout_builder.h
│ │ ├── io_test.cpp
│ │ ├── liblp_test.h
│ │ ├── partition_opener.cpp
│ │ ├── property_fetcher.cpp
│ │ ├── reader.cpp
│ │ ├── reader.h
│ │ ├── super_layout_builder.cpp
│ │ ├── super_layout_builder_test.cpp
│ │ ├── test_partition_opener.cpp
│ │ ├── test_partition_opener.h
│ │ ├── utility.cpp
│ │ ├── utility.h
│ │ ├── utility_test.cpp
│ │ ├── writer.cpp
│ │ └── writer.h
│ ├── libsnapshot/
│ │ ├── Android.bp
│ │ ├── OWNERS
│ │ ├── android/
│ │ │ └── snapshot/
│ │ │ └── snapshot.proto
│ │ ├── device_info.cpp
│ │ ├── device_info.h
│ │ ├── dm_snapshot_internals.h
│ │ ├── include/
│ │ │ └── libsnapshot/
│ │ │ ├── auto_device.h
│ │ │ ├── cow_compress.h
│ │ │ ├── cow_format.h
│ │ │ ├── cow_reader.h
│ │ │ ├── cow_writer.h
│ │ │ ├── mock_cow_writer.h
│ │ │ ├── mock_device_info.h
│ │ │ ├── mock_snapshot.h
│ │ │ ├── mock_snapshot_merge_stats.h
│ │ │ ├── return.h
│ │ │ ├── snapshot.h
│ │ │ ├── snapshot_stats.h
│ │ │ └── snapshot_stub.h
│ │ ├── include_test/
│ │ │ └── libsnapshot/
│ │ │ └── test_helpers.h
│ │ ├── libsnapshot_cow/
│ │ │ ├── cow_compress.cpp
│ │ │ ├── cow_decompress.cpp
│ │ │ ├── cow_decompress.h
│ │ │ ├── cow_format.cpp
│ │ │ ├── cow_reader.cpp
│ │ │ ├── create_cow.cpp
│ │ │ ├── inspect_cow.cpp
│ │ │ ├── parser_base.h
│ │ │ ├── parser_v2.cpp
│ │ │ ├── parser_v2.h
│ │ │ ├── parser_v3.cpp
│ │ │ ├── parser_v3.h
│ │ │ ├── snapshot_reader.cpp
│ │ │ ├── snapshot_reader.h
│ │ │ ├── snapshot_reader_test.cpp
│ │ │ ├── test_v2.cpp
│ │ │ ├── test_v3.cpp
│ │ │ ├── writer_base.cpp
│ │ │ ├── writer_base.h
│ │ │ ├── writer_v2.cpp
│ │ │ ├── writer_v2.h
│ │ │ ├── writer_v3.cpp
│ │ │ └── writer_v3.h
│ │ ├── partition_cow_creator.cpp
│ │ ├── partition_cow_creator.h
│ │ ├── partition_cow_creator_test.cpp
│ │ ├── return.cpp
│ │ ├── scratch_super.cpp
│ │ ├── scratch_super.h
│ │ ├── scripts/
│ │ │ ├── Android.bp
│ │ │ ├── apply-update.sh
│ │ │ └── dump_snapshot_proto.py
│ │ ├── snapshot.cpp
│ │ ├── snapshot_metadata_updater.cpp
│ │ ├── snapshot_metadata_updater.h
│ │ ├── snapshot_metadata_updater_test.cpp
│ │ ├── snapshot_stats.cpp
│ │ ├── snapshot_stub.cpp
│ │ ├── snapshot_test.cpp
│ │ ├── snapshotctl.cpp
│ │ ├── snapuserd/
│ │ │ ├── Android.bp
│ │ │ ├── OWNERS
│ │ │ ├── dm_user_block_server.cpp
│ │ │ ├── include/
│ │ │ │ └── snapuserd/
│ │ │ │ ├── block_server.h
│ │ │ │ ├── dm_user_block_server.h
│ │ │ │ ├── snapuserd_buffer.h
│ │ │ │ ├── snapuserd_client.h
│ │ │ │ └── snapuserd_kernel.h
│ │ │ ├── snapuserd.rc
│ │ │ ├── snapuserd_buffer.cpp
│ │ │ ├── snapuserd_client.cpp
│ │ │ ├── snapuserd_daemon.cpp
│ │ │ ├── snapuserd_daemon.h
│ │ │ ├── snapuserd_extractor.cpp
│ │ │ ├── snapuserd_logging.h
│ │ │ ├── testing/
│ │ │ │ ├── dm_user_harness.cpp
│ │ │ │ ├── dm_user_harness.h
│ │ │ │ ├── harness.cpp
│ │ │ │ ├── harness.h
│ │ │ │ ├── host_harness.cpp
│ │ │ │ ├── host_harness.h
│ │ │ │ └── temp_device.h
│ │ │ ├── user-space-merge/
│ │ │ │ ├── extractor.cpp
│ │ │ │ ├── extractor.h
│ │ │ │ ├── handler_manager.cpp
│ │ │ │ ├── handler_manager.h
│ │ │ │ ├── merge_worker.cpp
│ │ │ │ ├── merge_worker.h
│ │ │ │ ├── read_worker.cpp
│ │ │ │ ├── read_worker.h
│ │ │ │ ├── snapuserd_core.cpp
│ │ │ │ ├── snapuserd_core.h
│ │ │ │ ├── snapuserd_readahead.cpp
│ │ │ │ ├── snapuserd_readahead.h
│ │ │ │ ├── snapuserd_server.cpp
│ │ │ │ ├── snapuserd_server.h
│ │ │ │ ├── snapuserd_test.cpp
│ │ │ │ ├── snapuserd_transitions.cpp
│ │ │ │ ├── snapuserd_verify.cpp
│ │ │ │ ├── snapuserd_verify.h
│ │ │ │ ├── worker.cpp
│ │ │ │ └── worker.h
│ │ │ ├── utility.cpp
│ │ │ └── utility.h
│ │ ├── test_helpers.cpp
│ │ ├── tools/
│ │ │ ├── Android.bp
│ │ │ ├── cow_benchmark.cpp
│ │ │ ├── testdata/
│ │ │ │ ├── cow_v2
│ │ │ │ └── incompressible_block
│ │ │ └── write_cow.cpp
│ │ ├── utility.cpp
│ │ ├── utility.h
│ │ └── vts_ota_config_test.cpp
│ ├── libstorage_literals/
│ │ ├── Android.bp
│ │ └── storage_literals/
│ │ └── storage_literals.h
│ ├── libvbmeta/
│ │ ├── Android.bp
│ │ ├── builder.cpp
│ │ ├── builder.h
│ │ ├── builder_test.cpp
│ │ ├── data/
│ │ │ └── testkey_rsa2048.pem
│ │ ├── include/
│ │ │ └── libvbmeta/
│ │ │ └── libvbmeta.h
│ │ ├── reader.cpp
│ │ ├── reader.h
│ │ ├── super_vbmeta_format.h
│ │ ├── super_vbmeta_format_c.h
│ │ ├── super_vbmeta_test.cpp
│ │ ├── utility.cpp
│ │ ├── utility.h
│ │ ├── writer.cpp
│ │ └── writer.h
│ ├── tests/
│ │ ├── Android.bp
│ │ ├── AndroidTest.xml
│ │ ├── adb-remount-sh.xml
│ │ ├── adb-remount-test.sh
│ │ ├── file_wait_test.cpp
│ │ ├── fs_mgr_test.cpp
│ │ ├── src/
│ │ │ └── com/
│ │ │ └── android/
│ │ │ └── tests/
│ │ │ └── vendoroverlay/
│ │ │ └── VendorOverlayHostTest.java
│ │ ├── vendor-overlay-test.xml
│ │ └── vts_fs_test.cpp
│ └── tools/
│ ├── Android.bp
│ ├── dmctl.cpp
│ └── dmuserd.cpp
├── gatekeeperd/
│ ├── Android.bp
│ ├── GateKeeperResponse.cpp
│ ├── OWNERS
│ ├── binder/
│ │ └── android/
│ │ └── service/
│ │ └── gatekeeper/
│ │ ├── GateKeeperResponse.aidl
│ │ └── IGateKeeperService.aidl
│ ├── fuzzer/
│ │ └── GateKeeperServiceFuzzer.cpp
│ ├── gatekeeperd.cpp
│ ├── gatekeeperd.h
│ ├── gatekeeperd.rc
│ ├── include/
│ │ └── gatekeeper/
│ │ └── GateKeeperResponse.h
│ └── main.cpp
├── healthd/
│ ├── Android.bp
│ ├── AnimationParser.cpp
│ ├── AnimationParser.h
│ ├── AnimationParser_test.cpp
│ ├── BatteryMonitor.cpp
│ ├── BatteryMonitor_v1.cpp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── animation.h
│ ├── api/
│ │ ├── charger_sysprop-current.txt
│ │ └── charger_sysprop-latest.txt
│ ├── charger.cpp
│ ├── charger.sysprop
│ ├── charger_test.cpp
│ ├── charger_utils.cpp
│ ├── charger_utils.h
│ ├── healthd_draw.cpp
│ ├── healthd_draw.h
│ ├── healthd_mode_charger.cpp
│ ├── healthd_mode_charger_hidl.cpp
│ ├── healthd_mode_charger_hidl.h
│ ├── healthd_mode_charger_nops.cpp
│ ├── healthd_mode_charger_nops.h
│ ├── healthd_mode_charger_test.cpp
│ ├── include/
│ │ └── healthd/
│ │ ├── BatteryMonitor.h
│ │ ├── BatteryMonitor_v1.h
│ │ └── healthd.h
│ ├── include_charger/
│ │ └── charger/
│ │ └── healthd_mode_charger.h
│ └── testdata/
│ ├── Android.bp
│ ├── empty/
│ │ └── ensure_directory_creation.txt
│ ├── legacy/
│ │ └── res/
│ │ └── values/
│ │ └── charger/
│ │ └── animation.txt
│ ├── legacy_text_system_images/
│ │ └── res/
│ │ └── values/
│ │ └── charger/
│ │ └── animation.txt
│ └── product/
│ └── product/
│ └── etc/
│ └── res/
│ └── values/
│ └── charger/
│ └── animation.txt
├── init/
│ ├── Android.bp
│ ├── AndroidTest.xml
│ ├── MODULE_LICENSE_APACHE2
│ ├── NOTICE
│ ├── OWNERS
│ ├── README.md
│ ├── README.ueventd.md
│ ├── TEST_MAPPING
│ ├── action.cpp
│ ├── action.h
│ ├── action_manager.cpp
│ ├── action_manager.h
│ ├── action_parser.cpp
│ ├── action_parser.h
│ ├── apex_init_util.cpp
│ ├── apex_init_util.h
│ ├── block_dev_initializer.cpp
│ ├── block_dev_initializer.h
│ ├── bootchart.cpp
│ ├── bootchart.h
│ ├── builtin_arguments.h
│ ├── builtins.cpp
│ ├── builtins.h
│ ├── capabilities.cpp
│ ├── capabilities.h
│ ├── check_builtins.cpp
│ ├── check_builtins.h
│ ├── compare-bootcharts.py
│ ├── debug_ramdisk.h
│ ├── devices.cpp
│ ├── devices.h
│ ├── devices_test.cpp
│ ├── epoll.cpp
│ ├── epoll.h
│ ├── epoll_test.cpp
│ ├── extra_free_kbytes.sh
│ ├── firmware_handler.cpp
│ ├── firmware_handler.h
│ ├── firmware_handler_test.cpp
│ ├── first_stage_console.cpp
│ ├── first_stage_console.h
│ ├── first_stage_init.cpp
│ ├── first_stage_init.h
│ ├── first_stage_main.cpp
│ ├── first_stage_mount.cpp
│ ├── first_stage_mount.h
│ ├── fscrypt_init_extensions.cpp
│ ├── fscrypt_init_extensions.h
│ ├── fuzzer/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── init_parser_fuzzer.cpp
│ │ ├── init_property_fuzzer.cpp
│ │ └── init_ueventHandler_fuzzer.cpp
│ ├── grab-bootchart.sh
│ ├── host_builtin_map.py
│ ├── host_import_parser.cpp
│ ├── host_import_parser.h
│ ├── host_init_stubs.h
│ ├── host_init_verifier.cpp
│ ├── import_parser.cpp
│ ├── import_parser.h
│ ├── init.cpp
│ ├── init.h
│ ├── init_test.cpp
│ ├── interface_utils.cpp
│ ├── interface_utils.h
│ ├── interprocess_fifo.cpp
│ ├── interprocess_fifo.h
│ ├── interprocess_fifo_test.cpp
│ ├── keychords.cpp
│ ├── keychords.h
│ ├── keychords_test.cpp
│ ├── keyword_map.h
│ ├── libprefetch/
│ │ └── prefetch/
│ │ ├── Android.bp
│ │ ├── Cargo.toml
│ │ ├── OWNERS
│ │ ├── prefetch.rc
│ │ └── src/
│ │ ├── arch/
│ │ │ └── android.rs
│ │ ├── args/
│ │ │ └── args_argh.rs
│ │ ├── args.rs
│ │ ├── error.rs
│ │ ├── format.rs
│ │ ├── lib.rs
│ │ ├── main.rs
│ │ ├── replay.rs
│ │ └── tracer/
│ │ ├── mem.rs
│ │ └── mod.rs
│ ├── lmkd_service.cpp
│ ├── lmkd_service.h
│ ├── main.cpp
│ ├── modalias_handler.cpp
│ ├── modalias_handler.h
│ ├── mount_handler.cpp
│ ├── mount_handler.h
│ ├── mount_namespace.cpp
│ ├── mount_namespace.h
│ ├── noop_builtins.cpp
│ ├── oneshot_on_test.cpp
│ ├── parser/
│ │ ├── tokenizer.cpp
│ │ ├── tokenizer.h
│ │ └── tokenizer_test.cpp
│ ├── parser.cpp
│ ├── parser.h
│ ├── perfboot.py
│ ├── persistent_properties.cpp
│ ├── persistent_properties.h
│ ├── persistent_properties.proto
│ ├── persistent_properties_test.cpp
│ ├── property_service.cpp
│ ├── property_service.h
│ ├── property_service.proto
│ ├── property_service_test.cpp
│ ├── property_type.cpp
│ ├── property_type.h
│ ├── property_type_test.cpp
│ ├── proto_utils.h
│ ├── reboot.cpp
│ ├── reboot.h
│ ├── reboot_test.cpp
│ ├── reboot_utils.cpp
│ ├── reboot_utils.h
│ ├── result.h
│ ├── rlimit_parser.cpp
│ ├── rlimit_parser.h
│ ├── rlimit_parser_test.cpp
│ ├── second_stage_resources.h
│ ├── security.cpp
│ ├── security.h
│ ├── selabel.cpp
│ ├── selabel.h
│ ├── selinux.cpp
│ ├── selinux.h
│ ├── service.cpp
│ ├── service.h
│ ├── service_list.cpp
│ ├── service_list.h
│ ├── service_parser.cpp
│ ├── service_parser.h
│ ├── service_test.cpp
│ ├── service_utils.cpp
│ ├── service_utils.h
│ ├── sigchld_handler.cpp
│ ├── sigchld_handler.h
│ ├── snapuserd_transition.cpp
│ ├── snapuserd_transition.h
│ ├── subcontext.cpp
│ ├── subcontext.h
│ ├── subcontext.proto
│ ├── subcontext_benchmark.cpp
│ ├── subcontext_test.cpp
│ ├── switch_root.cpp
│ ├── switch_root.h
│ ├── test_kill_services/
│ │ ├── Android.bp
│ │ ├── AndroidTest.xml
│ │ ├── OWNERS
│ │ └── init_kill_services_test.cpp
│ ├── test_service/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── test_service.cpp
│ │ └── test_service.rc
│ ├── test_upgrade_mte/
│ │ ├── Android.bp
│ │ ├── AndroidTest.xml
│ │ ├── OWNERS
│ │ ├── mte_upgrade_test.rc
│ │ ├── mte_upgrade_test_helper.cpp
│ │ └── src/
│ │ └── com/
│ │ └── android/
│ │ └── tests/
│ │ └── init/
│ │ └── MteUpgradeTest.java
│ ├── test_utils/
│ │ ├── include/
│ │ │ └── init-test-utils/
│ │ │ └── service_utils.h
│ │ └── service_utils.cpp
│ ├── tokenizer.cpp
│ ├── tokenizer.h
│ ├── tokenizer_test.cpp
│ ├── uevent.h
│ ├── uevent_handler.h
│ ├── uevent_listener.cpp
│ ├── uevent_listener.h
│ ├── ueventd.cpp
│ ├── ueventd.h
│ ├── ueventd_parser.cpp
│ ├── ueventd_parser.h
│ ├── ueventd_parser_test.cpp
│ ├── ueventd_test.cpp
│ ├── util.cpp
│ ├── util.h
│ └── util_test.cpp
├── janitors/
│ └── OWNERS
├── libappfuse/
│ ├── Android.bp
│ ├── AndroidTest.xml
│ ├── EpollController.cc
│ ├── FuseAppLoop.cc
│ ├── FuseBridgeLoop.cc
│ ├── FuseBuffer.cc
│ ├── OWNERS
│ ├── include/
│ │ └── libappfuse/
│ │ ├── EpollController.h
│ │ ├── FuseAppLoop.h
│ │ ├── FuseBridgeLoop.h
│ │ └── FuseBuffer.h
│ └── tests/
│ ├── FuseAppLoopTest.cc
│ ├── FuseBridgeLoopTest.cc
│ └── FuseBufferTest.cc
├── libasyncio/
│ ├── Android.bp
│ ├── AsyncIO.cpp
│ └── include/
│ └── asyncio/
│ └── AsyncIO.h
├── libcrypto_utils/
│ ├── Android.bp
│ ├── android_pubkey.cpp
│ ├── include/
│ │ └── crypto_utils/
│ │ └── android_pubkey.h
│ └── tests/
│ ├── Android.bp
│ └── android_pubkey_test.cpp
├── libcutils/
│ ├── Android.bp
│ ├── KernelLibcutilsTest.xml
│ ├── MODULE_LICENSE_APACHE2
│ ├── NOTICE
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── abi-dumps/
│ │ ├── arm64/
│ │ │ └── source-based/
│ │ │ └── libcutils.so.lsdump
│ │ └── arm_arm64/
│ │ └── source-based/
│ │ └── libcutils.so.lsdump
│ ├── android_get_control_env.h
│ ├── android_get_control_file.cpp
│ ├── android_get_control_file_test.cpp
│ ├── android_get_control_socket_test.cpp
│ ├── android_reboot.cpp
│ ├── ashmem-dev.cpp
│ ├── ashmem-host.cpp
│ ├── ashmem-internal.h
│ ├── ashmem_base_test.cpp
│ ├── ashmem_test.cpp
│ ├── canned_fs_config.cpp
│ ├── config_utils.cpp
│ ├── fs.cpp
│ ├── fs_config.cpp
│ ├── fs_config.h
│ ├── fs_config_test.cpp
│ ├── hashmap.cpp
│ ├── include/
│ │ ├── cutils/
│ │ │ ├── android_get_control_file.h
│ │ │ ├── android_reboot.h
│ │ │ ├── ashmem.h
│ │ │ ├── atomic.h
│ │ │ ├── bitops.h
│ │ │ ├── compiler.h
│ │ │ ├── config_utils.h
│ │ │ ├── fs.h
│ │ │ ├── hashmap.h
│ │ │ ├── iosched_policy.h
│ │ │ ├── klog.h
│ │ │ ├── list.h
│ │ │ ├── log.h
│ │ │ ├── memory.h
│ │ │ ├── misc.h
│ │ │ ├── multiuser.h
│ │ │ ├── native_handle.h
│ │ │ ├── partition_utils.h
│ │ │ ├── properties.h
│ │ │ ├── qtaguid.h
│ │ │ ├── record_stream.h
│ │ │ ├── sched_policy.h
│ │ │ ├── sockets.h
│ │ │ ├── str_parms.h
│ │ │ ├── trace.h
│ │ │ └── uevent.h
│ │ └── private/
│ │ ├── android_filesystem_config.h
│ │ ├── android_projectid_config.h
│ │ ├── canned_fs_config.h
│ │ └── fs_config.h
│ ├── iosched_policy.cpp
│ ├── klog.cpp
│ ├── load_file.cpp
│ ├── multiuser.cpp
│ ├── multiuser_test.cpp
│ ├── native_handle.cpp
│ ├── native_handle_test.cpp
│ ├── partition_utils.cpp
│ ├── properties.cpp
│ ├── properties_test.cpp
│ ├── qtaguid.cpp
│ ├── record_stream.cpp
│ ├── rust/
│ │ └── aid_bindings.h
│ ├── sched_policy_test.cpp
│ ├── socket_inaddr_any_server_unix.cpp
│ ├── socket_inaddr_any_server_windows.cpp
│ ├── socket_local_client_unix.cpp
│ ├── socket_local_server_unix.cpp
│ ├── socket_local_unix.h
│ ├── socket_network_client_unix.cpp
│ ├── socket_network_client_windows.cpp
│ ├── sockets.cpp
│ ├── sockets_test.cpp
│ ├── sockets_unix.cpp
│ ├── sockets_windows.cpp
│ ├── str_parms.cpp
│ ├── str_parms_test.cpp
│ ├── strlcpy.c
│ ├── trace-container.cpp
│ ├── trace-dev.cpp
│ ├── trace-dev.inc
│ ├── trace-dev_test.cpp
│ ├── trace-host.cpp
│ └── uevent.cpp
├── libgrallocusage/
│ ├── Android.bp
│ ├── GrallocUsageConversion.cpp
│ ├── MODULE_LICENSE_APACHE2
│ ├── NOTICE
│ ├── OWNERS
│ └── include/
│ └── grallocusage/
│ └── GrallocUsageConversion.h
├── libkeyutils/
│ ├── Android.bp
│ ├── NOTICE
│ ├── include/
│ │ └── keyutils.h
│ ├── keyutils.cpp
│ └── keyutils_test.cpp
├── libmodprobe/
│ ├── Android.bp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── exthandler.cpp
│ ├── include/
│ │ ├── exthandler/
│ │ │ └── exthandler.h
│ │ └── modprobe/
│ │ └── modprobe.h
│ ├── libmodprobe.cpp
│ ├── libmodprobe_ext.cpp
│ ├── libmodprobe_ext_test.cpp
│ ├── libmodprobe_test.cpp
│ └── libmodprobe_test.h
├── libnetutils/
│ ├── Android.bp
│ ├── NOTICE
│ ├── OWNERS
│ ├── dhcpclient.c
│ ├── dhcpmsg.c
│ ├── dhcpmsg.h
│ ├── dhcptool.c
│ ├── ifc_utils.c
│ ├── include/
│ │ └── netutils/
│ │ └── ifc.h
│ ├── packet.c
│ └── packet.h
├── libpackagelistparser/
│ ├── Android.bp
│ ├── TEST_MAPPING
│ ├── include/
│ │ └── packagelistparser/
│ │ └── packagelistparser.h
│ ├── packagelistparser.cpp
│ └── packagelistparser_test.cpp
├── libprocessgroup/
│ ├── Android.bp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── build_flags.h
│ ├── cgroup_map.cpp
│ ├── cgroup_map.h
│ ├── cgrouprc/
│ │ ├── Android.bp
│ │ ├── a_cgroup_controller.cpp
│ │ ├── a_cgroup_file.cpp
│ │ ├── cgrouprc_internal.h
│ │ ├── include/
│ │ │ └── android/
│ │ │ └── cgrouprc.h
│ │ └── libcgrouprc.map.txt
│ ├── include/
│ │ └── processgroup/
│ │ ├── processgroup.h
│ │ └── sched_policy.h
│ ├── internal.h
│ ├── processgroup.cpp
│ ├── profiles/
│ │ ├── Android.bp
│ │ ├── cgroups.json
│ │ ├── cgroups.proto
│ │ ├── cgroups.recovery.json
│ │ ├── cgroups_test.h
│ │ ├── task_profiles.json
│ │ ├── task_profiles.proto
│ │ ├── task_profiles_test.h
│ │ ├── test.cpp
│ │ └── test_vendor.cpp
│ ├── sched_policy.cpp
│ ├── setup/
│ │ ├── Android.bp
│ │ ├── cgroup_descriptor.h
│ │ ├── cgroup_map_write.cpp
│ │ └── include/
│ │ └── processgroup/
│ │ └── setup.h
│ ├── task_profiles.cpp
│ ├── task_profiles.h
│ ├── task_profiles_test.cpp
│ ├── tools/
│ │ ├── Android.bp
│ │ └── settaskprofile.cpp
│ ├── util/
│ │ ├── Android.bp
│ │ ├── OWNERS
│ │ ├── TEST_MAPPING
│ │ ├── cgroup_controller.cpp
│ │ ├── cgroup_descriptor.cpp
│ │ ├── include/
│ │ │ └── processgroup/
│ │ │ ├── cgroup_controller.h
│ │ │ ├── cgroup_descriptor.h
│ │ │ └── util.h
│ │ ├── tests/
│ │ │ └── util.cpp
│ │ └── util.cpp
│ └── vts/
│ ├── Android.bp
│ └── vts_libprocessgroup.cpp
├── libsparse/
│ ├── Android.bp
│ ├── OWNERS
│ ├── append2simg.cpp
│ ├── backed_block.cpp
│ ├── backed_block.h
│ ├── defs.h
│ ├── img2simg.cpp
│ ├── include/
│ │ └── sparse/
│ │ └── sparse.h
│ ├── output_file.cpp
│ ├── output_file.h
│ ├── simg2img.cpp
│ ├── simg_dump.py
│ ├── sparse.cpp
│ ├── sparse_crc32.cpp
│ ├── sparse_crc32.h
│ ├── sparse_defs.h
│ ├── sparse_err.cpp
│ ├── sparse_file.h
│ ├── sparse_format.h
│ ├── sparse_fuzzer.cpp
│ └── sparse_read.cpp
├── libstats/
│ ├── OWNERS
│ ├── bootstrap/
│ │ ├── Android.bp
│ │ ├── BootstrapClientInternal.cpp
│ │ ├── BootstrapClientInternal.h
│ │ ├── StatsBootstrapAtomClient.cpp
│ │ └── include/
│ │ └── StatsBootstrapAtomClient.h
│ ├── expresslog/
│ │ ├── .clang-format
│ │ ├── Android.bp
│ │ ├── Counter.cpp
│ │ ├── Histogram.cpp
│ │ ├── include/
│ │ │ ├── Counter.h
│ │ │ └── Histogram.h
│ │ └── tests/
│ │ └── Histogram_test.cpp
│ ├── pull_lazy/
│ │ ├── Android.bp
│ │ ├── TEST_MAPPING
│ │ ├── libstatspull_lazy.cpp
│ │ ├── libstatspull_lazy.h
│ │ ├── libstatspull_lazy_test.xml
│ │ └── tests/
│ │ └── libstatspull_lazy_test.cpp
│ ├── pull_rust/
│ │ ├── Android.bp
│ │ ├── stats_pull.rs
│ │ └── statslog.h
│ ├── push_compat/
│ │ ├── Android.bp
│ │ ├── StatsEventCompat.cpp
│ │ ├── include/
│ │ │ ├── StatsEventCompat.h
│ │ │ └── stats_event_list.h
│ │ ├── stats_event_list.c
│ │ ├── statsd_writer.cpp
│ │ ├── statsd_writer.h
│ │ └── tests/
│ │ └── StatsEventCompat_test.cpp
│ └── socket_lazy/
│ ├── Android.bp
│ ├── TEST_MAPPING
│ ├── include/
│ │ └── statssocket_lazy.h
│ ├── libstatssocket_lazy.cpp
│ ├── libstatssocket_lazy.h
│ ├── libstatssocket_lazy_test.xml
│ └── tests/
│ └── libstatssocket_lazy_test.cpp
├── libsuspend/
│ ├── Android.bp
│ ├── autosuspend.c
│ ├── autosuspend_ops.h
│ ├── autosuspend_wakeup_count.cpp
│ └── include/
│ └── suspend/
│ └── autosuspend.h
├── libsync/
│ ├── Android.bp
│ ├── NOTICE
│ ├── OWNERS
│ ├── include/
│ │ ├── android/
│ │ │ └── sync.h
│ │ └── ndk/
│ │ └── sync.h
│ ├── libsync.map.txt
│ ├── sw_sync.h
│ ├── sync.c
│ └── tests/
│ └── sync_test.cpp
├── libsystem/
│ ├── Android.bp
│ ├── OWNERS
│ └── include/
│ └── system/
│ ├── camera.h
│ ├── graphics-base-v1.0.h
│ ├── graphics-base-v1.1.h
│ ├── graphics-base-v1.2.h
│ ├── graphics-base.h
│ ├── graphics-sw.h
│ ├── graphics.h
│ ├── radio.h
│ └── thread_defs.h
├── libsysutils/
│ ├── Android.bp
│ ├── EventLogTags.logtags
│ ├── include/
│ │ └── sysutils/
│ │ ├── FrameworkCommand.h
│ │ ├── FrameworkListener.h
│ │ ├── NetlinkEvent.h
│ │ ├── NetlinkListener.h
│ │ ├── OWNERS
│ │ ├── ServiceManager.h
│ │ ├── SocketClient.h
│ │ ├── SocketClientCommand.h
│ │ └── SocketListener.h
│ └── src/
│ ├── FrameworkCommand.cpp
│ ├── FrameworkListener.cpp
│ ├── NetlinkEvent.cpp
│ ├── NetlinkListener.cpp
│ ├── OWNERS
│ ├── ServiceManager.cpp
│ ├── SocketClient.cpp
│ ├── SocketListener.cpp
│ └── SocketListener_test.cpp
├── libusbhost/
│ ├── Android.bp
│ ├── include/
│ │ └── usbhost/
│ │ ├── usbhost.h
│ │ └── usbhost_jni.h
│ ├── usbhost.c
│ ├── usbhost_jni.cpp
│ └── usbhost_private.h
├── libutils/
│ ├── Android.bp
│ ├── BitSet_fuzz.cpp
│ ├── BitSet_test.cpp
│ ├── CallStack.cpp
│ ├── CallStack_fuzz.cpp
│ ├── CallStack_test.cpp
│ ├── CleanSpec.mk
│ ├── FileMap.cpp
│ ├── FileMap_fuzz.cpp
│ ├── FileMap_test.cpp
│ ├── JenkinsHash.cpp
│ ├── LightRefBase.cpp
│ ├── Looper.cpp
│ ├── Looper_fuzz.cpp
│ ├── Looper_test.cpp
│ ├── Looper_test_pipe.h
│ ├── LruCache_fuzz.cpp
│ ├── LruCache_test.cpp
│ ├── MODULE_LICENSE_APACHE2
│ ├── Mutex_test.cpp
│ ├── NOTICE
│ ├── NativeHandle.cpp
│ ├── OWNERS
│ ├── Printer.cpp
│ ├── Printer_fuzz.cpp
│ ├── ProcessCallStack.cpp
│ ├── ProcessCallStack_fuzz.cpp
│ ├── Singleton_test.cpp
│ ├── Singleton_test.h
│ ├── Singleton_test1.cpp
│ ├── Singleton_test2.cpp
│ ├── StopWatch.cpp
│ ├── SystemClock.cpp
│ ├── SystemClock_test.cpp
│ ├── TEST_MAPPING
│ ├── Threads.cpp
│ ├── Timers.cpp
│ ├── Timers_test.cpp
│ ├── Tokenizer.cpp
│ ├── Trace.cpp
│ ├── abi-dumps/
│ │ ├── arm64/
│ │ │ └── source-based/
│ │ │ └── libutils.so.lsdump
│ │ └── arm_arm64/
│ │ └── source-based/
│ │ └── libutils.so.lsdump
│ ├── binder/
│ │ ├── Android.bp
│ │ ├── Errors.cpp
│ │ ├── Errors_test.cpp
│ │ ├── FuzzFormatTypes.h
│ │ ├── RefBase.cpp
│ │ ├── RefBase_fuzz.cpp
│ │ ├── RefBase_test.cpp
│ │ ├── SharedBuffer.cpp
│ │ ├── SharedBuffer.h
│ │ ├── SharedBuffer_test.cpp
│ │ ├── String16.cpp
│ │ ├── String16_fuzz.cpp
│ │ ├── String16_test.cpp
│ │ ├── String8.cpp
│ │ ├── String8_fuzz.cpp
│ │ ├── String8_test.cpp
│ │ ├── StrongPointer.cpp
│ │ ├── StrongPointer_test.cpp
│ │ ├── Unicode.cpp
│ │ ├── Unicode_test.cpp
│ │ ├── VectorImpl.cpp
│ │ ├── Vector_benchmark.cpp
│ │ ├── Vector_fuzz.cpp
│ │ ├── Vector_test.cpp
│ │ └── include/
│ │ └── utils/
│ │ ├── Errors.h
│ │ ├── LightRefBase.h
│ │ ├── RefBase.h
│ │ ├── String16.h
│ │ ├── String8.h
│ │ ├── StrongPointer.h
│ │ ├── TypeHelpers.h
│ │ ├── Unicode.h
│ │ ├── Vector.h
│ │ └── VectorImpl.h
│ ├── include/
│ │ └── utils/
│ │ ├── AndroidThreads.h
│ │ ├── Atomic.h
│ │ ├── BitSet.h
│ │ ├── ByteOrder.h
│ │ ├── CallStack.h
│ │ ├── Compat.h
│ │ ├── Condition.h
│ │ ├── Debug.h
│ │ ├── Endian.h
│ │ ├── ErrorsMacros.h
│ │ ├── FastStrcmp.h
│ │ ├── FileMap.h
│ │ ├── Flattenable.h
│ │ ├── Functor.h
│ │ ├── JenkinsHash.h
│ │ ├── KeyedVector.h
│ │ ├── List.h
│ │ ├── Log.h
│ │ ├── Looper.h
│ │ ├── LruCache.h
│ │ ├── Mutex.h
│ │ ├── NativeHandle.h
│ │ ├── Printer.h
│ │ ├── ProcessCallStack.h
│ │ ├── RWLock.h
│ │ ├── Singleton.h
│ │ ├── SortedVector.h
│ │ ├── StopWatch.h
│ │ ├── SystemClock.h
│ │ ├── Thread.h
│ │ ├── ThreadDefs.h
│ │ ├── Timers.h
│ │ ├── Tokenizer.h
│ │ ├── Trace.h
│ │ ├── misc.h
│ │ └── threads.h
│ └── misc.cpp
├── libvendorsupport/
│ ├── Android.bp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── include/
│ │ └── vendorsupport/
│ │ └── api_level.h
│ ├── libvendorsupport.map.txt
│ ├── tests/
│ │ ├── Android.bp
│ │ └── version_props_test.cpp
│ └── version_props.cpp
├── libvndksupport/
│ ├── Android.bp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── include/
│ │ └── vndksupport/
│ │ └── linker.h
│ ├── libvndksupport.map.txt
│ ├── linker.cpp
│ └── tests/
│ ├── Android.bp
│ └── linker_test.cpp
├── llkd/
│ ├── Android.bp
│ ├── OWNERS
│ ├── README.md
│ ├── include/
│ │ └── llkd.h
│ ├── libllkd.cpp
│ ├── llkd-debuggable.rc
│ ├── llkd.cpp
│ ├── llkd.rc
│ └── tests/
│ ├── Android.bp
│ └── llkd_test.cpp
├── mini_keyctl/
│ ├── Android.bp
│ ├── OWNERS
│ ├── mini_keyctl.cpp
│ ├── mini_keyctl_utils.cpp
│ └── mini_keyctl_utils.h
├── mkbootfs/
│ ├── Android.bp
│ └── mkbootfs.cpp
├── overlay_remounter/
│ ├── Android.bp
│ └── overlay_remounter.cpp
├── property_service/
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── libpropertyinfoparser/
│ │ ├── Android.bp
│ │ ├── include/
│ │ │ └── property_info_parser/
│ │ │ └── property_info_parser.h
│ │ └── property_info_parser.cpp
│ ├── libpropertyinfoserializer/
│ │ ├── Android.bp
│ │ ├── include/
│ │ │ └── property_info_serializer/
│ │ │ └── property_info_serializer.h
│ │ ├── property_info_file.cpp
│ │ ├── property_info_serializer.cpp
│ │ ├── property_info_serializer_test.cpp
│ │ ├── space_tokenizer.h
│ │ ├── trie_builder.cpp
│ │ ├── trie_builder.h
│ │ ├── trie_builder_test.cpp
│ │ ├── trie_node_arena.h
│ │ ├── trie_serializer.cpp
│ │ └── trie_serializer.h
│ └── property_info_checker/
│ ├── Android.bp
│ └── property_info_checker.cpp
├── reboot/
│ ├── Android.bp
│ └── reboot.c
├── rootdir/
│ ├── Android.bp
│ ├── OWNERS
│ ├── adb_debug.prop
│ ├── asan.options
│ ├── asan_extract.rc
│ ├── asan_extract.sh
│ ├── avb/
│ │ ├── Android.bp
│ │ ├── q-developer-gsi.avbpubkey
│ │ ├── r-developer-gsi.avbpubkey
│ │ └── s-developer-gsi.avbpubkey
│ ├── create_root_structure.mk
│ ├── etc/
│ │ ├── OWNERS
│ │ ├── TEST_MAPPING
│ │ ├── hosts
│ │ ├── ld.config.legacy.txt
│ │ ├── ld.config.recovery.txt
│ │ ├── ld.config.txt
│ │ ├── ld.config.vndk_lite.txt
│ │ ├── linker.config.json
│ │ ├── public.libraries.android.txt
│ │ ├── public.libraries.iot.txt
│ │ └── public.libraries.wear.txt
│ ├── init-debug.rc
│ ├── init-mmd-prop.rc
│ ├── init.boringssl.zygote64.rc
│ ├── init.boringssl.zygote64_32.rc
│ ├── init.environ.rc.in
│ ├── init.no_zygote.rc
│ ├── init.rc
│ ├── init.usb.configfs.rc
│ ├── init.usb.rc
│ ├── init.zygote32.rc
│ ├── init.zygote64.rc
│ ├── init.zygote64_32.rc
│ ├── ramdisk_node_list
│ └── ueventd.rc
├── run-as/
│ ├── Android.bp
│ ├── NOTICE
│ └── run-as.cpp
├── sdcard/
│ ├── Android.bp
│ ├── OWNERS
│ └── sdcard.cpp
├── shell_and_utilities/
│ ├── Android.bp
│ ├── OWNERS
│ └── README.md
├── storaged/
│ ├── Android.bp
│ ├── EventLogTags.logtags
│ ├── OWNERS
│ ├── README.properties
│ ├── binder/
│ │ └── android/
│ │ └── os/
│ │ ├── IStoraged.aidl
│ │ └── storaged/
│ │ ├── IStoragedPrivate.aidl
│ │ └── UidInfo.aidl
│ ├── include/
│ │ ├── storaged.h
│ │ ├── storaged_diskstats.h
│ │ ├── storaged_info.h
│ │ ├── storaged_service.h
│ │ ├── storaged_uid_monitor.h
│ │ ├── storaged_utils.h
│ │ └── uid_info.h
│ ├── main.cpp
│ ├── storaged.cpp
│ ├── storaged.proto
│ ├── storaged.rc
│ ├── storaged_diskstats.cpp
│ ├── storaged_info.cpp
│ ├── storaged_service.cpp
│ ├── storaged_uid_monitor.cpp
│ ├── storaged_utils.cpp
│ ├── tests/
│ │ ├── fuzzers/
│ │ │ ├── storaged_private_service_fuzzer.cpp
│ │ │ └── storaged_service_fuzzer.cpp
│ │ └── storaged_test.cpp
│ ├── tools/
│ │ └── ranker.py
│ └── uid_info.cpp
├── toolbox/
│ ├── Android.bp
│ ├── MODULE_LICENSE_APACHE2
│ ├── NOTICE
│ ├── OWNERS
│ ├── generate-input.h-labels.py
│ ├── getevent.c
│ ├── getprop.cpp
│ ├── modprobe.cpp
│ ├── setprop.cpp
│ ├── start.cpp
│ ├── toolbox.c
│ └── tools.h
├── trusty/
│ ├── Android.bp
│ ├── OWNERS
│ ├── apploader/
│ │ ├── Android.bp
│ │ ├── apploader.cpp
│ │ ├── apploader_ipc.h
│ │ └── fuzz/
│ │ ├── Android.bp
│ │ └── app_fuzzer.cpp
│ ├── confirmationui/
│ │ ├── .clang-format
│ │ ├── Android.bp
│ │ ├── NotSoSecureInput.cpp
│ │ ├── README
│ │ ├── TrustyApp.cpp
│ │ ├── TrustyApp.h
│ │ ├── TrustyConfirmationUI.cpp
│ │ ├── TrustyConfirmationUI.h
│ │ ├── android.hardware.confirmationui-service.trusty.rc
│ │ ├── android.hardware.confirmationui-service.trusty.xml
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ ├── msg_corpus/
│ │ │ │ ├── confirmationui-recv-0AD0Mc
│ │ │ │ ├── confirmationui-recv-1b1UIl
│ │ │ │ ├── confirmationui-recv-3hmWyl
│ │ │ │ ├── confirmationui-recv-7FNOdd
│ │ │ │ ├── confirmationui-recv-7T30a0
│ │ │ │ ├── confirmationui-recv-86EumR
│ │ │ │ ├── confirmationui-recv-89b64b
│ │ │ │ ├── confirmationui-recv-8UVUCK
│ │ │ │ ├── confirmationui-recv-BSmqJ0
│ │ │ │ ├── confirmationui-recv-BdUGLb
│ │ │ │ ├── confirmationui-recv-D2ENNi
│ │ │ │ ├── confirmationui-recv-EwBsPi
│ │ │ │ ├── confirmationui-recv-HjE2Ko
│ │ │ │ ├── confirmationui-recv-J5OABY
│ │ │ │ ├── confirmationui-recv-LUVKQn
│ │ │ │ ├── confirmationui-recv-MdY9ZS
│ │ │ │ ├── confirmationui-recv-NZ8yUq
│ │ │ │ ├── confirmationui-recv-OP4Vff
│ │ │ │ ├── confirmationui-recv-OizTST
│ │ │ │ ├── confirmationui-recv-QTsc3y
│ │ │ │ ├── confirmationui-recv-S055ei
│ │ │ │ ├── confirmationui-recv-VDguJL
│ │ │ │ ├── confirmationui-recv-ZjDqjf
│ │ │ │ ├── confirmationui-recv-bMNGfb
│ │ │ │ ├── confirmationui-recv-bm0GEm
│ │ │ │ ├── confirmationui-recv-cT2nt8
│ │ │ │ ├── confirmationui-recv-e1NLbb
│ │ │ │ ├── confirmationui-recv-eOCb7t
│ │ │ │ ├── confirmationui-recv-h7Gpzu
│ │ │ │ ├── confirmationui-recv-ikJlIo
│ │ │ │ ├── confirmationui-recv-kxugwp
│ │ │ │ ├── confirmationui-recv-mY8uM5
│ │ │ │ ├── confirmationui-recv-nuYOin
│ │ │ │ ├── confirmationui-recv-obk0rP
│ │ │ │ ├── confirmationui-recv-vg2hAB
│ │ │ │ ├── confirmationui-recv-ysk3Rj
│ │ │ │ ├── confirmationui-send-2upXHa
│ │ │ │ ├── confirmationui-send-3n7SWz
│ │ │ │ ├── confirmationui-send-5SZG4U
│ │ │ │ ├── confirmationui-send-8uL1hT
│ │ │ │ ├── confirmationui-send-Anu8LZ
│ │ │ │ ├── confirmationui-send-BFP3vG
│ │ │ │ ├── confirmationui-send-BjxIpX
│ │ │ │ ├── confirmationui-send-DBzfWz
│ │ │ │ ├── confirmationui-send-GPOMKC
│ │ │ │ ├── confirmationui-send-GWcpFn
│ │ │ │ ├── confirmationui-send-HkRYSS
│ │ │ │ ├── confirmationui-send-LAyw30
│ │ │ │ ├── confirmationui-send-MtGRnC
│ │ │ │ ├── confirmationui-send-PpfYNn
│ │ │ │ ├── confirmationui-send-SVKqZi
│ │ │ │ ├── confirmationui-send-Suxofv
│ │ │ │ ├── confirmationui-send-UQPTAG
│ │ │ │ ├── confirmationui-send-Up2pbn
│ │ │ │ ├── confirmationui-send-ZjgVzs
│ │ │ │ ├── confirmationui-send-ZuQuBC
│ │ │ │ ├── confirmationui-send-bWlzZp
│ │ │ │ ├── confirmationui-send-dPozfE
│ │ │ │ ├── confirmationui-send-e952U6
│ │ │ │ ├── confirmationui-send-f7ly1r
│ │ │ │ ├── confirmationui-send-hme7P0
│ │ │ │ ├── confirmationui-send-k7J5LL
│ │ │ │ ├── confirmationui-send-rUtYXs
│ │ │ │ ├── confirmationui-send-sq5ang
│ │ │ │ ├── confirmationui-send-uOtedb
│ │ │ │ ├── confirmationui-send-vGoOUt
│ │ │ │ ├── confirmationui-send-vqAG14
│ │ │ │ ├── confirmationui-send-xKDdTw
│ │ │ │ ├── confirmationui-send-xT4sJC
│ │ │ │ ├── confirmationui-send-ypshr5
│ │ │ │ ├── confirmationui-send-ypzCDH
│ │ │ │ └── confirmationui-send-zZNPRC
│ │ │ └── msg_fuzzer.cpp
│ │ ├── fuzzer.cpp
│ │ ├── include/
│ │ │ ├── TrustyConfirmationuiHal.h
│ │ │ └── TrustyIpc.h
│ │ └── service.cpp
│ ├── coverage/
│ │ ├── Android.bp
│ │ ├── coverage.cpp
│ │ ├── coverage_test.cpp
│ │ ├── include/
│ │ │ └── trusty/
│ │ │ └── coverage/
│ │ │ ├── coverage.h
│ │ │ ├── record.h
│ │ │ ├── tipc.h
│ │ │ └── uuid.h
│ │ └── uuid.cpp
│ ├── fuzz/
│ │ ├── Android.bp
│ │ ├── counters.cpp
│ │ ├── include/
│ │ │ └── trusty/
│ │ │ └── fuzz/
│ │ │ ├── counters.h
│ │ │ └── utils.h
│ │ ├── test/
│ │ │ └── Android.bp
│ │ ├── tipc_fuzzer.cpp
│ │ └── utils.cpp
│ ├── gatekeeper/
│ │ ├── Android.bp
│ │ ├── TEST_MAPPING
│ │ ├── android.hardware.gatekeeper-service.trusty.rc
│ │ ├── android.hardware.gatekeeper-service.trusty.xml
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ └── corpus/
│ │ │ ├── gatekeeper-recv-2MMzSr
│ │ │ ├── gatekeeper-recv-Et63W0
│ │ │ ├── gatekeeper-recv-G41Iz8
│ │ │ ├── gatekeeper-recv-ItEoqJ
│ │ │ ├── gatekeeper-recv-MGXdfu
│ │ │ ├── gatekeeper-recv-Yq4f10
│ │ │ ├── gatekeeper-recv-agxKZa
│ │ │ ├── gatekeeper-recv-alhn2v
│ │ │ ├── gatekeeper-recv-eVJFHV
│ │ │ ├── gatekeeper-recv-et5K21
│ │ │ ├── gatekeeper-recv-gun5YX
│ │ │ ├── gatekeeper-recv-kXw1R9
│ │ │ ├── gatekeeper-recv-moapss
│ │ │ ├── gatekeeper-recv-u5QySb
│ │ │ ├── gatekeeper-recv-uZtvkq
│ │ │ ├── gatekeeper-recv-w5G2SF
│ │ │ ├── gatekeeper-recv-y3H74x
│ │ │ ├── gatekeeper-recv-yALfeS
│ │ │ ├── gatekeeper-send-2S1GLi
│ │ │ ├── gatekeeper-send-4j7hUc
│ │ │ ├── gatekeeper-send-6hsSQG
│ │ │ ├── gatekeeper-send-E8CE7b
│ │ │ ├── gatekeeper-send-GEDmHj
│ │ │ ├── gatekeeper-send-MpwDEN
│ │ │ ├── gatekeeper-send-Qutf8O
│ │ │ ├── gatekeeper-send-Sg1WMt
│ │ │ ├── gatekeeper-send-U6Y1My
│ │ │ ├── gatekeeper-send-WdSRky
│ │ │ ├── gatekeeper-send-Ypw6WP
│ │ │ ├── gatekeeper-send-Yyj4Af
│ │ │ ├── gatekeeper-send-amyF62
│ │ │ ├── gatekeeper-send-gu8ziA
│ │ │ ├── gatekeeper-send-iCATsM
│ │ │ ├── gatekeeper-send-kawT3I
│ │ │ ├── gatekeeper-send-sYFzM5
│ │ │ └── gatekeeper-send-yNFMdn
│ │ ├── gatekeeper_ipc.h
│ │ ├── service.cpp
│ │ ├── trusty_gatekeeper.cpp
│ │ ├── trusty_gatekeeper.h
│ │ ├── trusty_gatekeeper_ipc.c
│ │ └── trusty_gatekeeper_ipc.h
│ ├── keymaster/
│ │ ├── 3.0/
│ │ │ ├── TrustyKeymaster3Device.cpp
│ │ │ ├── android.hardware.keymaster@3.0-service.trusty.rc
│ │ │ └── service.cpp
│ │ ├── 4.0/
│ │ │ ├── TrustyKeymaster4Device.cpp
│ │ │ ├── android.hardware.keymaster@4.0-service.trusty.rc
│ │ │ ├── android.hardware.keymaster@4.0-service.trusty.xml
│ │ │ └── service.cpp
│ │ ├── Android.bp
│ │ ├── TEST_MAPPING
│ │ ├── TrustyKeymaster.cpp
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ └── corpus/
│ │ │ ├── keymaster-recv-1x0hJ5
│ │ │ ├── keymaster-recv-5GV6mx
│ │ │ ├── keymaster-recv-7RVbJ8
│ │ │ ├── keymaster-recv-9ElJHi
│ │ │ ├── keymaster-recv-9czLCR
│ │ │ ├── keymaster-recv-BFx3FN
│ │ │ ├── keymaster-recv-BXWpRA
│ │ │ ├── keymaster-recv-DanwgH
│ │ │ ├── keymaster-recv-JP2pXq
│ │ │ ├── keymaster-recv-T0YO5T
│ │ │ ├── keymaster-recv-TM26dO
│ │ │ ├── keymaster-recv-XcPQ60
│ │ │ ├── keymaster-recv-ZU4x5D
│ │ │ ├── keymaster-recv-Zbzv1t
│ │ │ ├── keymaster-recv-ZvweQK
│ │ │ ├── keymaster-recv-d3OcR1
│ │ │ ├── keymaster-recv-dc6Hmg
│ │ │ ├── keymaster-recv-fn8Ksu
│ │ │ ├── keymaster-recv-ldnX1U
│ │ │ ├── keymaster-recv-pqvh4n
│ │ │ ├── keymaster-recv-pvwjne
│ │ │ ├── keymaster-recv-pzxe39
│ │ │ ├── keymaster-recv-tpykrY
│ │ │ ├── keymaster-recv-tq6MsH
│ │ │ ├── keymaster-recv-zt2UIA
│ │ │ ├── keymaster-send-3aKtgr
│ │ │ ├── keymaster-send-5Ays9I
│ │ │ ├── keymaster-send-7X098Z
│ │ │ ├── keymaster-send-B6LYU4
│ │ │ ├── keymaster-send-BZU7LF
│ │ │ ├── keymaster-send-FxXsxg
│ │ │ ├── keymaster-send-NlxYoC
│ │ │ ├── keymaster-send-PzXetK
│ │ │ ├── keymaster-send-RFmR3D
│ │ │ ├── keymaster-send-Tp6AJW
│ │ │ ├── keymaster-send-V0leT7
│ │ │ ├── keymaster-send-X4Plz3
│ │ │ ├── keymaster-send-Xd5KiX
│ │ │ ├── keymaster-send-Ztr5Rk
│ │ │ ├── keymaster-send-f6d6wM
│ │ │ ├── keymaster-send-jbzgHv
│ │ │ ├── keymaster-send-jiL5yp
│ │ │ ├── keymaster-send-l5kqxc
│ │ │ ├── keymaster-send-l6zX2y
│ │ │ ├── keymaster-send-ltPKls
│ │ │ ├── keymaster-send-n7sdVP
│ │ │ ├── keymaster-send-pKSjkT
│ │ │ ├── keymaster-send-rhVedc
│ │ │ ├── keymaster-send-tZJ2Ex
│ │ │ └── keymaster-send-tZlTSQ
│ │ ├── include/
│ │ │ └── trusty_keymaster/
│ │ │ ├── TrustyKeyMintDevice.h
│ │ │ ├── TrustyKeyMintOperation.h
│ │ │ ├── TrustyKeymaster.h
│ │ │ ├── TrustyKeymaster3Device.h
│ │ │ ├── TrustyKeymaster4Device.h
│ │ │ ├── TrustyRemotelyProvisionedComponentDevice.h
│ │ │ ├── TrustySecureClock.h
│ │ │ ├── TrustySharedSecret.h
│ │ │ ├── ipc/
│ │ │ │ ├── keymaster_ipc.h
│ │ │ │ └── trusty_keymaster_ipc.h
│ │ │ └── legacy/
│ │ │ └── trusty_keymaster_device.h
│ │ ├── ipc/
│ │ │ └── trusty_keymaster_ipc.cpp
│ │ ├── keymint/
│ │ │ ├── TEST_MAPPING
│ │ │ ├── TrustyKeyMintDevice.cpp
│ │ │ ├── TrustyKeyMintOperation.cpp
│ │ │ ├── TrustyRemotelyProvisionedComponentDevice.cpp
│ │ │ ├── TrustySecureClock.cpp
│ │ │ ├── TrustySharedSecret.cpp
│ │ │ ├── android.hardware.security.keymint-service.trusty.rc
│ │ │ ├── android.hardware.security.keymint-service.trusty.xml
│ │ │ ├── android.hardware.security.keymint-service.trusty_tee.cpp.rc
│ │ │ └── service.cpp
│ │ ├── set_attestation_ids/
│ │ │ └── set_attestation_ids.cpp
│ │ ├── set_attestation_key/
│ │ │ ├── keymaster_soft_attestation_keys.xml
│ │ │ └── set_attestation_key.cpp
│ │ └── set_uds_certs/
│ │ ├── rkp_uds_cert_test.xml
│ │ └── set_uds_certificates.cpp
│ ├── keymint/
│ │ ├── Android.bp
│ │ ├── android.hardware.security.keymint-service.rust.trusty.rc
│ │ ├── android.hardware.security.keymint-service.rust.trusty.xml
│ │ ├── android.hardware.security.keymint-service.trusty_system_vm.rc
│ │ ├── android.hardware.security.keymint-service.trusty_system_vm.xml
│ │ ├── android.hardware.security.keymint-service.trusty_tee.rc
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ └── corpus/
│ │ │ ├── keymint-reqs-821180-0
│ │ │ ├── keymint-reqs-82128140-0
│ │ │ ├── keymint-reqs-82128143-0
│ │ │ ├── keymint-reqs-82128158-0
│ │ │ ├── keymint-reqs-82128158-1
│ │ │ ├── keymint-reqs-82138285-0
│ │ │ ├── keymint-reqs-82138285-1
│ │ │ ├── keymint-reqs-82138285-2
│ │ │ ├── keymint-reqs-82138285-3
│ │ │ ├── keymint-reqs-82138286-0
│ │ │ ├── keymint-reqs-82138286-1
│ │ │ ├── keymint-reqs-82138286-2
│ │ │ ├── keymint-reqs-82138286-3
│ │ │ ├── keymint-reqs-82138287-0
│ │ │ ├── keymint-reqs-82138287-1
│ │ │ ├── keymint-reqs-82138287-2
│ │ │ ├── keymint-reqs-82138287-3
│ │ │ ├── keymint-reqs-82138288-0
│ │ │ ├── keymint-reqs-82138288-1
│ │ │ ├── keymint-reqs-82138288-2
│ │ │ ├── keymint-reqs-82138288-3
│ │ │ ├── keymint-reqs-82138289-0
│ │ │ ├── keymint-reqs-82138289-1
│ │ │ ├── keymint-reqs-82138289-2
│ │ │ ├── keymint-reqs-82138289-3
│ │ │ ├── keymint-reqs-8213828a-0
│ │ │ ├── keymint-reqs-8213828a-1
│ │ │ ├── keymint-reqs-8213828a-2
│ │ │ ├── keymint-reqs-8213828a-3
│ │ │ ├── keymint-reqs-8213828b-0
│ │ │ ├── keymint-reqs-8213828b-1
│ │ │ ├── keymint-reqs-8213828b-2
│ │ │ ├── keymint-reqs-8213828b-3
│ │ │ ├── keymint-reqs-8213828c-0
│ │ │ ├── keymint-reqs-8213828c-1
│ │ │ ├── keymint-reqs-8213828c-2
│ │ │ ├── keymint-reqs-8213828c-3
│ │ │ ├── keymint-reqs-8213828d-0
│ │ │ ├── keymint-reqs-8213828d-1
│ │ │ ├── keymint-reqs-8213828d-2
│ │ │ ├── keymint-reqs-8213828d-3
│ │ │ ├── keymint-reqs-8213828e-0
│ │ │ ├── keymint-reqs-8213828e-1
│ │ │ ├── keymint-reqs-8213828e-2
│ │ │ ├── keymint-reqs-8213828e-3
│ │ │ ├── keymint-reqs-8213828f-0
│ │ │ ├── keymint-reqs-8213828f-1
│ │ │ ├── keymint-reqs-8213828f-2
│ │ │ ├── keymint-reqs-8213828f-3
│ │ │ ├── keymint-reqs-82138290-0
│ │ │ ├── keymint-reqs-82138290-1
│ │ │ ├── keymint-reqs-82138292-0
│ │ │ ├── keymint-reqs-82148485-0
│ │ │ ├── keymint-reqs-82148485-1
│ │ │ ├── keymint-reqs-82148485-2
│ │ │ ├── keymint-reqs-82148485-3
│ │ │ ├── keymint-reqs-82148486-0
│ │ │ ├── keymint-reqs-82148486-1
│ │ │ ├── keymint-reqs-82148486-2
│ │ │ ├── keymint-reqs-82148486-3
│ │ │ ├── keymint-reqs-82148487-0
│ │ │ ├── keymint-reqs-82148487-1
│ │ │ ├── keymint-reqs-82148487-2
│ │ │ ├── keymint-reqs-82148487-3
│ │ │ ├── keymint-reqs-82148488-0
│ │ │ ├── keymint-reqs-82148488-1
│ │ │ ├── keymint-reqs-82148488-2
│ │ │ ├── keymint-reqs-82148488-3
│ │ │ ├── keymint-reqs-82148489-0
│ │ │ ├── keymint-reqs-82148489-1
│ │ │ ├── keymint-reqs-82148489-2
│ │ │ ├── keymint-reqs-82148489-3
│ │ │ ├── keymint-reqs-8214848a-0
│ │ │ ├── keymint-reqs-8214848a-1
│ │ │ ├── keymint-reqs-8214848a-2
│ │ │ ├── keymint-reqs-8214848a-3
│ │ │ ├── keymint-reqs-8214848b-0
│ │ │ ├── keymint-reqs-82158659-0
│ │ │ ├── keymint-reqs-82158659-1
│ │ │ ├── keymint-reqs-82158659-2
│ │ │ ├── keymint-reqs-82158659-3
│ │ │ ├── keymint-reqs-82168258-0
│ │ │ ├── keymint-reqs-82168258-1
│ │ │ ├── keymint-reqs-82178158-0
│ │ │ ├── keymint-reqs-82178158-1
│ │ │ ├── keymint-reqs-82178158-2
│ │ │ ├── keymint-reqs-82178158-3
│ │ │ ├── keymint-reqs-82178159-0
│ │ │ ├── keymint-reqs-82178159-1
│ │ │ ├── keymint-reqs-82178159-2
│ │ │ ├── keymint-reqs-82178159-3
│ │ │ ├── keymint-reqs-82181a84-0
│ │ │ ├── keymint-reqs-82181a84-1
│ │ │ ├── keymint-reqs-82181a84-2
│ │ │ ├── keymint-reqs-82181a84-3
│ │ │ ├── keymint-reqs-82181e83-0
│ │ │ ├── keymint-reqs-82181e83-1
│ │ │ ├── keymint-reqs-82181e83-2
│ │ │ ├── keymint-reqs-82181e83-3
│ │ │ ├── keymint-reqs-82183184-0
│ │ │ ├── keymint-reqs-82183184-1
│ │ │ ├── keymint-reqs-82183184-2
│ │ │ ├── keymint-reqs-82183184-3
│ │ │ ├── keymint-reqs-82183284-0
│ │ │ ├── keymint-reqs-82183284-1
│ │ │ ├── keymint-reqs-82183284-2
│ │ │ ├── keymint-reqs-82183284-3
│ │ │ ├── keymint-reqs-82183386-0
│ │ │ ├── keymint-reqs-82183386-1
│ │ │ ├── keymint-reqs-82183386-2
│ │ │ ├── keymint-reqs-82183386-3
│ │ │ ├── keymint-reqs-82183481-0
│ │ │ ├── keymint-reqs-82183481-1
│ │ │ ├── keymint-reqs-82183481-2
│ │ │ ├── keymint-reqs-82183481-3
│ │ │ ├── keymint-reqs-82184180-0
│ │ │ ├── keymint-reqs-82184281-0
│ │ │ ├── keymint-rsps-00035504-0
│ │ │ ├── keymint-rsps-001e170d-0
│ │ │ ├── keymint-rsps-00303031-0
│ │ │ ├── keymint-rsps-00313563-0
│ │ │ ├── keymint-rsps-00333233-0
│ │ │ ├── keymint-rsps-00365a17-0
│ │ │ ├── keymint-rsps-003cc0cc-0
│ │ │ ├── keymint-rsps-003e7b1a-0
│ │ │ ├── keymint-rsps-0042-0
│ │ │ ├── keymint-rsps-00646630-0
│ │ │ ├── keymint-rsps-00820081-0
│ │ │ ├── keymint-rsps-00820081-1
│ │ │ ├── keymint-rsps-00820081-2
│ │ │ ├── keymint-rsps-00820081-3
│ │ │ ├── keymint-rsps-00822180-0
│ │ │ ├── keymint-rsps-00822280-0
│ │ │ ├── keymint-rsps-00822580-0
│ │ │ ├── keymint-rsps-00822680-0
│ │ │ ├── keymint-rsps-00822780-0
│ │ │ ├── keymint-rsps-00822880-0
│ │ │ ├── keymint-rsps-00822980-0
│ │ │ ├── keymint-rsps-00822a80-0
│ │ │ ├── keymint-rsps-00822b80-0
│ │ │ ├── keymint-rsps-00822c80-0
│ │ │ ├── keymint-rsps-00823080-0
│ │ │ ├── keymint-rsps-00823480-0
│ │ │ ├── keymint-rsps-00823819-0
│ │ │ ├── keymint-rsps-0082381d-0
│ │ │ ├── keymint-rsps-0082381e-0
│ │ │ ├── keymint-rsps-00823820-0
│ │ │ ├── keymint-rsps-00823825-0
│ │ │ ├── keymint-rsps-00823827-0
│ │ │ ├── keymint-rsps-0082382b-0
│ │ │ ├── keymint-rsps-00823833-0
│ │ │ ├── keymint-rsps-00823836-0
│ │ │ ├── keymint-rsps-00823837-0
│ │ │ ├── keymint-rsps-00823838-0
│ │ │ ├── keymint-rsps-00823839-0
│ │ │ ├── keymint-rsps-0082383a-0
│ │ │ ├── keymint-rsps-0082383e-0
│ │ │ ├── keymint-rsps-00823840-0
│ │ │ ├── keymint-rsps-00823841-0
│ │ │ ├── keymint-rsps-00823846-0
│ │ │ ├── keymint-rsps-0082384d-0
│ │ │ ├── keymint-rsps-0082384e-0
│ │ │ ├── keymint-rsps-0082384f-0
│ │ │ ├── keymint-rsps-00823850-0
│ │ │ ├── keymint-rsps-00823903-0
│ │ │ ├── keymint-rsps-009a81fa-0
│ │ │ ├── keymint-rsps-00b5ae79-0
│ │ │ ├── keymint-rsps-01820081-0
│ │ │ ├── keymint-rsps-01820081-1
│ │ │ ├── keymint-rsps-01820081-2
│ │ │ └── keymint-rsps-01820081-3
│ │ ├── src/
│ │ │ └── keymint_hal_main.rs
│ │ ├── trusty-keymint-apex.mk
│ │ └── trusty-keymint.mk
│ ├── libtrusty/
│ │ ├── Android.bp
│ │ ├── include/
│ │ │ └── trusty/
│ │ │ ├── ipc.h
│ │ │ └── tipc.h
│ │ ├── tipc-test/
│ │ │ ├── Android.bp
│ │ │ └── tipc_test.c
│ │ └── trusty.c
│ ├── libtrusty-rs/
│ │ ├── Android.bp
│ │ ├── src/
│ │ │ ├── lib.rs
│ │ │ └── sys.rs
│ │ └── tests/
│ │ └── test.rs
│ ├── line-coverage/
│ │ ├── Android.bp
│ │ ├── coverage.cpp
│ │ └── include/
│ │ └── trusty/
│ │ └── line-coverage/
│ │ ├── coverage.h
│ │ ├── tipc.h
│ │ └── uuid.h
│ ├── metrics/
│ │ ├── Android.bp
│ │ ├── include/
│ │ │ └── trusty/
│ │ │ └── metrics/
│ │ │ ├── metrics.h
│ │ │ └── tipc.h
│ │ ├── metrics.cpp
│ │ └── metrics_test.cpp
│ ├── secretkeeper/
│ │ ├── Android.bp
│ │ ├── android.hardware.security.secretkeeper.trusty.rc
│ │ ├── android.hardware.security.secretkeeper.trusty.xml
│ │ └── src/
│ │ └── hal_main.rs
│ ├── secure_dpu/
│ │ ├── Android.bp
│ │ └── include/
│ │ └── trusty/
│ │ └── secure_dpu/
│ │ └── SecureDpu.h
│ ├── stats/
│ │ ├── aidl/
│ │ │ ├── Android.bp
│ │ │ └── android/
│ │ │ └── trusty/
│ │ │ └── stats/
│ │ │ └── nw/
│ │ │ └── setter/
│ │ │ └── IStatsSetter.aidl
│ │ └── test/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ └── stats_test.cpp
│ ├── storage/
│ │ ├── lib/
│ │ │ ├── Android.bp
│ │ │ ├── include/
│ │ │ │ └── trusty/
│ │ │ │ └── lib/
│ │ │ │ └── storage.h
│ │ │ └── storage.c
│ │ ├── proxy/
│ │ │ ├── Android.bp
│ │ │ ├── checkpoint_handling.cpp
│ │ │ ├── checkpoint_handling.h
│ │ │ ├── ipc.c
│ │ │ ├── ipc.h
│ │ │ ├── log.h
│ │ │ ├── proxy.c
│ │ │ ├── rpmb.c
│ │ │ ├── rpmb.h
│ │ │ ├── storage.c
│ │ │ ├── storage.h
│ │ │ ├── watchdog.cpp
│ │ │ └── watchdog.h
│ │ └── tests/
│ │ ├── Android.bp
│ │ └── main.cpp
│ ├── sysprops/
│ │ ├── Android.bp
│ │ ├── android/
│ │ │ └── sysprop/
│ │ │ └── trusty/
│ │ │ └── security_vm.sysprop
│ │ ├── api/
│ │ │ ├── trusty-properties-current.txt
│ │ │ └── trusty-properties-latest.txt
│ │ └── example.rs
│ ├── test/
│ │ ├── binder/
│ │ │ └── aidl/
│ │ │ ├── com/
│ │ │ │ └── android/
│ │ │ │ └── trusty/
│ │ │ │ └── binder/
│ │ │ │ └── test/
│ │ │ │ ├── ByteEnum.aidl
│ │ │ │ ├── ITestService.aidl
│ │ │ │ ├── IntEnum.aidl
│ │ │ │ └── LongEnum.aidl
│ │ │ └── rules.mk
│ │ └── driver/
│ │ ├── Android.bp
│ │ └── trusty_driver_test.py
│ ├── trusty-base.mk
│ ├── trusty-storage-cf.mk
│ ├── trusty-storage.mk
│ ├── trusty-test.mk
│ └── utils/
│ ├── acvp/
│ │ ├── Android.bp
│ │ ├── acvp_ipc.h
│ │ └── trusty_modulewrapper.cpp
│ ├── coverage-controller/
│ │ ├── Android.bp
│ │ ├── controller.cpp
│ │ └── controller.h
│ ├── rpmb_dev/
│ │ ├── Android.bp
│ │ ├── rpmb.h
│ │ ├── rpmb_dev.c
│ │ ├── rpmb_dev.rc
│ │ ├── rpmb_dev.system.rc
│ │ ├── rpmb_dev.test.system.rc
│ │ ├── rpmb_dev.wv.system.rc
│ │ └── rpmb_protocol.h
│ ├── spiproxyd/
│ │ ├── Android.bp
│ │ ├── main.c
│ │ └── proxy.rc
│ └── trusty-ut-ctrl/
│ ├── Android.bp
│ └── ut-ctrl.c
├── usbd/
│ ├── Android.bp
│ ├── usbd.cpp
│ └── usbd.rc
└── watchdogd/
├── Android.bp
└── watchdogd.cpp
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*~
*.pyc
================================================
FILE: Android.bp
================================================
dirgroup {
name: "trusty_dirgroup_system_core",
dirs: ["."],
visibility: ["//trusty/vendor/google/aosp/scripts"],
}
================================================
FILE: CleanSpec.mk
================================================
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# If you don't need to do a full clean build but would like to touch
# a file or delete some intermediate files, add a clean step to the end
# of the list. These steps will only be run once, if they haven't been
# run before.
#
# E.g.:
# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
#
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
# files that are missing or have been moved.
#
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
# Use $(OUT_DIR) to refer to the "out" directory.
#
# If you need to re-do something that's already mentioned, just copy
# the command and add it to the bottom of the list. E.g., if a change
# that you made last week required touching a file and a change you
# made today requires touching the same file, just copy the old
# touch step and add it to the end of the list.
#
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
# For example:
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/reboot)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES/lmkd_intermediates/import_includes)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libsysutils_intermediates/import_includes)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/grep $(PRODUCT_OUT)/system/bin/toolbox)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/gatekeeper.$(TARGET_DEVICE).so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/gatekeeper.$(TARGET_DEVICE).so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/vendor)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/libtrusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/libtrusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/keystore.trusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/keystore.trusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/gatekeeper.trusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/gatekeeper.trusty.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/secure-storage-unit-test)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/storageproxyd)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/tipc-test)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/trusty_keymaster_tipc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/root)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/ld.config.txt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/llndk.libraries.txt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/vndksp.libraries.txt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/ld.config.txt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/llndk.libraries.txt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/vndksp.libraries.txt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/sbin/charger)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/sbin/charger)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/sbin)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/sbin)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/product_services)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/product_services.img)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/product_services)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/product_services)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/product_services)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/debug_ramdisk/product_services)
$(call add-clean-step, find $(PRODUCT_OUT) -type l -name "charger" -print0 | xargs -0 rm -f)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/bin/adbd)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/snapshotctl.rc)
================================================
FILE: MODULE_LICENSE_APACHE2
================================================
================================================
FILE: OWNERS
================================================
# Bug component: 128577
enh@google.com
================================================
FILE: PREUPLOAD.cfg
================================================
[Builtin Hooks]
clang_format = true
rustfmt = true
bpfmt = true
[Builtin Hooks Options]
clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
rustfmt = --config-path=rustfmt.toml
[Hook Scripts]
aosp_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "."
================================================
FILE: bootstat/Android.bp
================================================
//
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
bootstat_lib_src_files = [
"boot_event_record_store.cpp",
]
cc_defaults {
name: "bootstat_defaults",
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libbase",
"libcutils",
"liblog",
],
header_libs: ["libgtest_prod_headers"],
}
// bootstat static library
// -----------------------------------------------------------------------------
cc_library_static {
name: "libbootstat",
defaults: ["bootstat_defaults"],
srcs: bootstat_lib_src_files,
}
// bootstat static library, debug
// -----------------------------------------------------------------------------
cc_library_static {
name: "libbootstat_debug",
defaults: ["bootstat_defaults"],
host_supported: true,
srcs: bootstat_lib_src_files,
target: {
host: {
cflags: ["-UNDEBUG"],
},
},
}
// bootstat binary
// -----------------------------------------------------------------------------
cc_binary {
name: "bootstat",
defaults: ["bootstat_defaults"],
static_libs: ["libbootstat"],
shared_libs: [
"libstatslog"
],
init_rc: ["bootstat.rc"],
product_variables: {
debuggable: {
init_rc: ["bootstat-debug.rc"],
},
},
srcs: ["bootstat.cpp"],
}
// Native tests
// -----------------------------------------------------------------------------
cc_test {
name: "bootstat_tests",
test_suites: ["device-tests"],
defaults: ["bootstat_defaults"],
host_supported: true,
static_libs: [
"libbootstat_debug",
"libgmock",
],
srcs: [
"boot_event_record_store_test.cpp",
"testrunner.cpp",
],
test_options: {
unit_test: true,
},
}
================================================
FILE: bootstat/OWNERS
================================================
dvander@google.com
achant@google.com
markcheng@google.com
================================================
FILE: bootstat/README.md
================================================
# bootstat #
The bootstat command records boot events (e.g., `firmware_loaded`,
`boot_complete`) and the relative time at which these events occurred. The
command also aggregates boot event metrics locally and logs the metrics for
analysis.
Usage: bootstat [options]
options include:
-h, --help Show this help
-l, --log Log all metrics to logstorage
-p, --print Dump the boot event records to the console
-r, --record Record the timestamp of a named boot event
--record_boot_reason Record the reason why the device booted
--record_time_since_factory_reset Record the time since the device was reset
## Relative time ##
The timestamp recorded by bootstat is the uptime of the system, i.e., the
number of seconds since the system booted.
## Recording boot events ##
To record the relative time of an event during the boot phase, call `bootstat`
with the `-r` option and the name of the boot event.
$ bootstat -r boot_complete
The relative time at which the command runs is recorded along with the name of
the boot event to be persisted.
## Logging boot events ##
To log the persisted boot events, call `bootstat` with the `-l` option.
$ bootstat -l
bootstat logs all boot events recorded using the `-r` option to the EventLog
using the Tron histogram. These logs may be uploaded by interested parties
for aggregation and analysis of boot time across different devices and
versions.
## Printing boot events ##
To print the set of persisted boot events, call `bootstat` with the `-p` option.
$ bootstat -p
Boot events:
------------
boot_complete 71
================================================
FILE: bootstat/boot_event_record_store.cpp
================================================
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "boot_event_record_store.h"
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <utime.h>
#include <chrono>
#include <cstdlib>
#include <string>
#include <utility>
#include <android-base/chrono_utils.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/parseint.h>
namespace {
const char BOOTSTAT_DATA_DIR[] = "/data/misc/bootstat/";
// Given a boot even record file at |path|, extracts the event's relative time
// from the record into |uptime|.
bool ParseRecordEventTime(const std::string& path, int32_t* uptime) {
DCHECK_NE(static_cast<int32_t*>(nullptr), uptime);
struct stat file_stat;
if (stat(path.c_str(), &file_stat) == -1) {
PLOG(ERROR) << "Failed to read " << path;
return false;
}
*uptime = file_stat.st_mtime;
return true;
}
} // namespace
BootEventRecordStore::BootEventRecordStore() {
SetStorePath(BOOTSTAT_DATA_DIR);
}
void BootEventRecordStore::AddBootEvent(const std::string& event) {
auto uptime = std::chrono::duration_cast<std::chrono::seconds>(
android::base::boot_clock::now().time_since_epoch());
AddBootEventWithValue(event, uptime.count());
}
// The implementation of AddBootEventValue makes use of the mtime file
// attribute to store the value associated with a boot event in order to
// optimize on-disk size requirements and small-file thrashing.
void BootEventRecordStore::AddBootEventWithValue(const std::string& event, int32_t value) {
std::string record_path = GetBootEventPath(event);
int record_fd = creat(record_path.c_str(), S_IRUSR | S_IWUSR);
if (record_fd == -1) {
PLOG(ERROR) << "Failed to create " << record_path;
return;
}
// Fill out the stat structure for |record_path| in order to get the atime to
// set in the utime() call.
struct stat file_stat;
if (stat(record_path.c_str(), &file_stat) == -1) {
PLOG(ERROR) << "Failed to read " << record_path;
close(record_fd);
return;
}
// Set the |modtime| of the file to store the value of the boot event while
// preserving the |actime| (as read by stat).
struct utimbuf times = {/* actime */ file_stat.st_atime, /* modtime */ value};
if (utime(record_path.c_str(), ×) == -1) {
PLOG(ERROR) << "Failed to set mtime for " << record_path;
close(record_fd);
return;
}
close(record_fd);
}
bool BootEventRecordStore::GetBootEvent(const std::string& event, BootEventRecord* record) const {
CHECK_NE(static_cast<BootEventRecord*>(nullptr), record);
CHECK(!event.empty());
const std::string record_path = GetBootEventPath(event);
int32_t uptime;
if (!ParseRecordEventTime(record_path, &uptime)) {
LOG(ERROR) << "Failed to parse boot time record: " << record_path;
return false;
}
*record = std::make_pair(event, uptime);
return true;
}
std::vector<BootEventRecordStore::BootEventRecord> BootEventRecordStore::GetAllBootEvents() const {
std::vector<BootEventRecord> events;
std::unique_ptr<DIR, decltype(&closedir)> dir(opendir(store_path_.c_str()), closedir);
// This case could happen due to external manipulation of the filesystem,
// so crash out if the record store doesn't exist.
CHECK_NE(static_cast<DIR*>(nullptr), dir.get());
struct dirent* entry;
while ((entry = readdir(dir.get())) != NULL) {
// Only parse regular files.
if (entry->d_type != DT_REG) {
continue;
}
const std::string event = entry->d_name;
BootEventRecord record;
if (!GetBootEvent(event, &record)) {
LOG(ERROR) << "Failed to parse boot time event: " << event;
continue;
}
events.push_back(record);
}
return events;
}
void BootEventRecordStore::SetStorePath(const std::string& path) {
DCHECK_EQ('/', path.back());
store_path_ = path;
}
std::string BootEventRecordStore::GetBootEventPath(const std::string& event) const {
DCHECK_EQ('/', store_path_.back());
return store_path_ + event;
}
================================================
FILE: bootstat/boot_event_record_store.h
================================================
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef BOOT_EVENT_RECORD_STORE_H_
#define BOOT_EVENT_RECORD_STORE_H_
#include <android-base/macros.h>
#include <gtest/gtest_prod.h>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
// BootEventRecordStore manages the persistence of boot events to the record
// store and the retrieval of all boot event records from the store.
class BootEventRecordStore {
public:
// A BootEventRecord consists of the event name and the timestamp the event
// occurred.
typedef std::pair<std::string, int32_t> BootEventRecord;
BootEventRecordStore();
// Persists the boot |event| in the record store.
void AddBootEvent(const std::string& event);
// Persists the boot |event| with the associated |value| in the record store.
void AddBootEventWithValue(const std::string& event, int32_t value);
// Queries the named boot |event|. |record| must be non-null. |record|
// contains the boot event data on success. Returns true iff the query is
// successful.
bool GetBootEvent(const std::string& event, BootEventRecord* record) const;
// Returns a list of all of the boot events persisted in the record store.
std::vector<BootEventRecord> GetAllBootEvents() const;
private:
// The tests call SetStorePath to override the default store location with a
// more test-friendly path.
FRIEND_TEST(BootEventRecordStoreTest, AddSingleBootEvent);
FRIEND_TEST(BootEventRecordStoreTest, AddMultipleBootEvents);
FRIEND_TEST(BootEventRecordStoreTest, AddBootEventWithValue);
FRIEND_TEST(BootEventRecordStoreTest, GetBootEvent);
FRIEND_TEST(BootEventRecordStoreTest, GetBootEventNoFileContent);
// Sets the filesystem path of the record store.
void SetStorePath(const std::string& path);
// Constructs the full path of the given boot |event|.
std::string GetBootEventPath(const std::string& event) const;
// The filesystem path of the record store.
std::string store_path_;
DISALLOW_COPY_AND_ASSIGN(BootEventRecordStore);
};
#endif // BOOT_EVENT_RECORD_STORE_H_
================================================
FILE: bootstat/boot_event_record_store_test.cpp
================================================
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "boot_event_record_store.h"
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
#include <chrono>
#include <cstdint>
#include <cstdlib>
#include <android-base/chrono_utils.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/unique_fd.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
using testing::UnorderedElementsAreArray;
namespace {
// Creates a fake boot event record file at |record_path| containing the boot
// record |value|. This method is necessary as truncating a
// BootEventRecordStore-created file would modify the mtime, which would alter
// the value of the record.
bool CreateEmptyBootEventRecord(const std::string& record_path, int32_t value) {
android::base::unique_fd record_fd(creat(record_path.c_str(), S_IRUSR | S_IWUSR));
if (record_fd == -1) {
return false;
}
// Set the |mtime| of the file to store the value of the boot event while
// preserving the |atime|.
struct timeval atime = {/* tv_sec */ 0, /* tv_usec */ 0};
struct timeval mtime = {/* tv_sec */ value, /* tv_usec */ 0};
const struct timeval times[] = {atime, mtime};
if (utimes(record_path.c_str(), times) != 0) {
return false;
}
return true;
}
// Returns true if the time difference between |a| and |b| is no larger
// than 10 seconds. This allow for a relatively large fuzz when comparing
// two timestamps taken back-to-back.
bool FuzzUptimeEquals(int32_t a, int32_t b) {
const int32_t FUZZ_SECONDS = 10;
return (abs(a - b) <= FUZZ_SECONDS);
}
// Recursively deletes the directory at |path|.
void DeleteDirectory(const std::string& path) {
typedef std::unique_ptr<DIR, decltype(&closedir)> ScopedDIR;
ScopedDIR dir(opendir(path.c_str()), closedir);
ASSERT_NE(nullptr, dir.get());
struct dirent* entry;
while ((entry = readdir(dir.get())) != NULL) {
const std::string entry_name(entry->d_name);
if (entry_name == "." || entry_name == "..") {
continue;
}
const std::string entry_path = path + "/" + entry_name;
if (entry->d_type == DT_DIR) {
DeleteDirectory(entry_path);
} else {
unlink(entry_path.c_str());
}
}
rmdir(path.c_str());
}
// Returns the time in seconds since boot.
time_t GetUptimeSeconds() {
return std::chrono::duration_cast<std::chrono::seconds>(
android::base::boot_clock::now().time_since_epoch())
.count();
}
class BootEventRecordStoreTest : public ::testing::Test {
public:
BootEventRecordStoreTest() { store_path_ = std::string(store_dir_.path) + "/"; }
const std::string& GetStorePathForTesting() const { return store_path_; }
private:
void TearDown() {
// This removes the record store temporary directory even though
// TemporaryDir should already take care of it, but this method cleans up
// the test files added to the directory which prevent TemporaryDir from
// being able to remove the directory.
DeleteDirectory(store_path_);
}
// A scoped temporary directory. Using this abstraction provides creation of
// the directory and the path to the directory, which is stored in
// |store_path_|.
TemporaryDir store_dir_;
// The path to the temporary directory used by the BootEventRecordStore to
// persist records. The directory is created and destroyed for each test.
std::string store_path_;
DISALLOW_COPY_AND_ASSIGN(BootEventRecordStoreTest);
};
} // namespace
TEST_F(BootEventRecordStoreTest, AddSingleBootEvent) {
BootEventRecordStore store;
store.SetStorePath(GetStorePathForTesting());
time_t uptime = GetUptimeSeconds();
ASSERT_NE(-1, uptime);
store.AddBootEvent("cenozoic");
auto events = store.GetAllBootEvents();
ASSERT_EQ(1U, events.size());
EXPECT_EQ("cenozoic", events[0].first);
EXPECT_TRUE(FuzzUptimeEquals(uptime, events[0].second));
}
TEST_F(BootEventRecordStoreTest, AddMultipleBootEvents) {
BootEventRecordStore store;
store.SetStorePath(GetStorePathForTesting());
time_t uptime = GetUptimeSeconds();
ASSERT_NE(-1, uptime);
store.AddBootEvent("cretaceous");
store.AddBootEvent("jurassic");
store.AddBootEvent("triassic");
const std::string EXPECTED_NAMES[] = {
"cretaceous", "jurassic", "triassic",
};
auto events = store.GetAllBootEvents();
ASSERT_EQ(3U, events.size());
std::vector<std::string> names;
std::vector<int32_t> timestamps;
for (auto i = events.begin(); i != events.end(); ++i) {
names.push_back(i->first);
timestamps.push_back(i->second);
}
EXPECT_THAT(names, UnorderedElementsAreArray(EXPECTED_NAMES));
for (auto i = timestamps.cbegin(); i != timestamps.cend(); ++i) {
EXPECT_TRUE(FuzzUptimeEquals(uptime, *i));
}
}
TEST_F(BootEventRecordStoreTest, AddBootEventWithValue) {
BootEventRecordStore store;
store.SetStorePath(GetStorePathForTesting());
store.AddBootEventWithValue("permian", 42);
auto events = store.GetAllBootEvents();
ASSERT_EQ(1U, events.size());
EXPECT_EQ("permian", events[0].first);
EXPECT_EQ(42, events[0].second);
}
TEST_F(BootEventRecordStoreTest, GetBootEvent) {
BootEventRecordStore store;
store.SetStorePath(GetStorePathForTesting());
// Event does not exist.
BootEventRecordStore::BootEventRecord record;
bool result = store.GetBootEvent("nonexistent", &record);
EXPECT_EQ(false, result);
// Empty path.
EXPECT_DEATH(store.GetBootEvent(std::string(), &record), std::string());
// Success case.
store.AddBootEventWithValue("carboniferous", 314);
result = store.GetBootEvent("carboniferous", &record);
EXPECT_EQ(true, result);
EXPECT_EQ("carboniferous", record.first);
EXPECT_EQ(314, record.second);
// Null |record|.
EXPECT_DEATH(store.GetBootEvent("carboniferous", nullptr), std::string());
}
// Tests that the BootEventRecordStore is capable of handling an older record
// protocol which does not contain file contents.
TEST_F(BootEventRecordStoreTest, GetBootEventNoFileContent) {
BootEventRecordStore store;
store.SetStorePath(GetStorePathForTesting());
EXPECT_TRUE(CreateEmptyBootEventRecord(store.GetBootEventPath("devonian"), 2718));
BootEventRecordStore::BootEventRecord record;
bool result = store.GetBootEvent("devonian", &record);
EXPECT_EQ(true, result);
EXPECT_EQ("devonian", record.first);
EXPECT_EQ(2718, record.second);
}
================================================
FILE: bootstat/boot_reason_test.sh
================================================
#! /bin/bash
#
# Bootstat boot reason tests
#
# throughout testing:
# - manual tests can only run on eng/userdebug builds
# - watch adb logcat -b all -d -s bootstat
# - watch adb logcat -b all -d | audit2allow
# - wait until screen is up, boot has completed, can mean wait for
# sys.boot_completed=1 and sys.bootstat.first_boot_completed=1 to be true
#
# All test frames, and nothing else, must be function names prefixed and
# specifiged with the pattern 'test_<test>() {' as this is also how the
# script discovers the full list of tests by inspecting its own code.
#
# Helper variables
SPACE=" "
ESCAPE=""
TAB=" "
GREEN="${ESCAPE}[38;5;40m"
RED="${ESCAPE}[38;5;196m"
NORMAL="${ESCAPE}[0m"
# Best guess to an average device's reboot time, refined as tests return
DURATION_DEFAULT=45
STOP_ON_FAILURE=false
progname="${0##*/}"
progpath="${0%${progname}}"
# Helper functions
[ "USAGE: inFastboot
Returns: true if device is in fastboot mode" ]
inFastboot() {
fastboot devices | grep "^${ANDROID_SERIAL}[${SPACE}${TAB}]" > /dev/null
}
[ "USAGE: inAdb
Returns: true if device is in adb mode" ]
inAdb() {
adb devices | grep -v 'List of devices attached' | grep "^${ANDROID_SERIAL}[${SPACE}${TAB}]" > /dev/null
}
[ "USAGE: adb_sh <commands> </dev/stdin >/dev/stdout 2>/dev/stderr
Returns: true if the command succeeded" ]
adb_sh() {
local args=
for i in "${@}"; do
[ -z "${args}" ] || args="${args} "
if [ X"${i}" != X"${i#\'}" ]; then
args="${args}${i}"
elif [ X"${i}" != X"${i#*\\}" ]; then
args="${args}`echo ${i} | sed 's/\\\\/\\\\\\\\/g'`"
elif [ X"${i}" != X"${i#* }" ]; then
args="${args}'${i}'"
elif [ X"${i}" != X"${i#*${TAB}}" ]; then
args="${args}'${i}'"
else
args="${args}${i}"
fi
done
adb shell "${args}"
}
[ "USAGE: adb_su <commands> </dev/stdin >/dev/stdout 2>/dev/stderr
Returns: true if the command running as root succeeded" ]
adb_su() {
adb_sh su root "${@}"
}
[ "USAGE: hasPstore
Returns: true if device (likely) has pstore data" ]
hasPstore() {
if inAdb && [ 0 -eq `adb_su ls /sys/fs/pstore </dev/null | wc -l` ]; then
false
fi
}
[ "USAGE: get_property <prop>
Returns the property value" ]
get_property() {
adb_sh getprop ${1} 2>&1 </dev/null
}
[ "USAGE: isDebuggable
Returns: true if device is (likely) a debug build" ]
isDebuggable() {
if inAdb && [ 1 -ne `get_property ro.debuggable` ]; then
false
fi
}
[ "USAGE: checkDebugBuild [--noerror]
Returns: true if device is a userdebug or eng release" ]
checkDebugBuild() {
if isDebuggable; then
echo "INFO: '${TEST}' test requires userdebug build"
elif [ -n "${1}" ]; then
echo "WARNING: '${TEST}' test requires userdebug build"
false
else
echo "ERROR: '${TEST}' test requires userdebug build, skipping FAILURE"
duration_prefix="~"
duration_estimate=1
false
fi >&2
}
[ "USAGE: setBootloaderBootReason [value]
Returns: true if device supports and set boot reason injection" ]
setBootloaderBootReason() {
inAdb || ( echo "ERROR: device not in adb mode." >&2 ; false ) || return 1
if [ -z "`adb_sh ls /etc/init/bootstat-debug.rc 2>/dev/null </dev/null`" ]; then
echo "ERROR: '${TEST}' test requires /etc/init/bootstat-debug.rc" >&2
return 1
fi
checkDebugBuild || return 1
if adb_su "cat /proc/cmdline | tr '\\0 ' '\\n\\n'" </dev/null |
grep '^androidboot[.]bootreason=[^ ]' >/dev/null; then
echo "ERROR: '${TEST}' test requires a device with a bootloader that" >&2
echo " does not set androidboot.bootreason kernel parameter." >&2
return 1
fi
adb_su setprop persist.test.boot.reason "'${1}'" 2>/dev/null </dev/null
test_reason="`get_property persist.test.boot.reason`"
if [ X"${test_reason}" != X"${1}" ]; then
echo "ERROR: can not set persist.test.boot.reason to '${1}'." >&2
return 1
fi
}
[ "USAGE: enterPstore
Prints a warning string requiring functional pstore
Returns: pstore_ok variable set to true or false" ]
enterPstore() {
if hasPstore; then
echo "INFO: '${TEST}' test requires functional and reliable pstore"
pstore_ok=true
else
echo "WARNING: '${TEST}' test requires functional pstore"
pstore_ok=false
fi >&2
${pstore_ok}
}
[ "USAGE: exitPstore
Prints an error string requiring functional pstore
Returns: clears error if pstore dysfunctional" ]
exitPstore() {
save_ret=${?}
if [ ${save_ret} != 0 ]; then
if hasPstore; then
return ${save_ret}
fi
if [ true = ${pstore_ok} ]; then
echo "WARNING: '${TEST}' test requires functional pstore"
return ${save_ret}
fi
echo "ERROR: '${TEST}' test requires functional pstore, skipping FAILURE"
duration_prefix="~"
duration_estimate=1
fi >&2
}
[ "USAGE: format_duration <seconds>
human readable output whole seconds, whole minutes or mm:ss" ]
format_duration() {
if [ -z "${1}" ]; then
echo unknown
return
fi
seconds=`expr ${1} % 60`
minutes=`expr ${1} / 60`
if [ 0 -eq ${minutes} ]; then
if [ 1 -eq ${1} ]; then
echo 1 second
return
fi
echo ${1} seconds
return
elif [ 60 -eq ${1} ]; then
echo 1 minute
return
elif [ 0 -eq ${seconds} ]; then
echo ${minutes} minutes
return
fi
echo ${minutes}:`expr ${seconds} / 10``expr ${seconds} % 10`
}
wait_for_screen_timeout=900
[ "USAGE: wait_for_screen [-n] [TIMEOUT]
-n - echo newline at exit
TIMEOUT - default `format_duration ${wait_for_screen_timeout}`" ]
wait_for_screen() {
exit_function=true
if [ X"-n" = X"${1}" ]; then
exit_function=echo
shift
fi
timeout=${wait_for_screen_timeout}
if [ ${#} -gt 0 ]; then
timeout=${1}
shift
fi
counter=0
while true; do
if inFastboot; then
fastboot reboot
elif inAdb; then
if [ 0 != ${counter} ]; then
adb wait-for-device </dev/null >/dev/null 2>/dev/null
fi
if [ -n "`get_property sys.boot.reason`" ]
then
vals=`get_property |
sed -n 's/[[]sys[.]\(boot_completed\|logbootcomplete\|bootstat[.]first_boot_completed\)[]]: [[]\([01]\)[]]$/\1=\2/p'`
if [ X"${vals}" != X"${vals##*boot_completed=1}" ]; then
if [ X"${vals}" != X"${vals##*logbootcomple=1}" ]; then
sleep 1
break
fi
if [ X"${vals}" != X"${vals##*bootstat.first_boot_completed=1}" ]; then
sleep 1
break
fi
fi
fi
fi
counter=`expr ${counter} + 1`
if [ ${counter} -gt ${timeout} ]; then
${exit_function}
echo "ERROR: wait_for_screen() timed out (`format_duration ${timeout}`)" >&2
return 1
fi
sleep 1
done
${exit_function}
}
[ "USAGE: EXPECT_EQ <lval> <rval> [message]
Returns true if (regex) lval matches rval" ]
EXPECT_EQ() {
lval="${1}"
rval="${2}"
shift 2
if ! ( echo X"${rval}" | grep '^X'"${lval}"'$' >/dev/null 2>/dev/null ); then
if [ `echo ${lval}${rval}${*} | wc -c` -gt 50 -o "${rval}" != "${rval%
*}" ]; then
echo "ERROR: expected \"${lval}\"" >&2
echo " got \"${rval}\"" |
sed ': again
N
s/\(\n\)\([^ ]\)/\1 \2/
t again' >&2
if [ -n "${*}" ] ; then
echo " ${*}" >&2
fi
else
echo "ERROR: expected \"${lval}\" got \"${rval}\" ${*}" >&2
fi
return 1
fi
if [ -n "${*}" ] ; then
if [ X"${lval}" != X"${rval}" ]; then
if [ `echo ${lval}${rval}${*} | wc -c` -gt 60 -o "${rval}" != "${rval%
*}" ]; then
echo "INFO: ok \"${lval}\"" >&2
echo " = \"${rval}\"" |
sed ': again
N
s/\(\n\)\([^ ]\)/\1 \2/
t again' >&2
if [ -n "${*}" ] ; then
echo " ${*}" >&2
fi
else
echo "INFO: ok \"${lval}\" = \"${rval}\" ${*}" >&2
fi
else
echo "INFO: ok \"${lval}\" ${*}" >&2
fi
fi
return 0
}
BAD_BOOTLOADER_REASON=
[ "USAGE: EXPECT_PROPERTY <prop> <value> [--allow_failure]
Returns true (0) if current return (regex) value is true and the result matches
and the incoming return value is true as well (wired-or)" ]
EXPECT_PROPERTY() {
save_ret=${?}
property="${1}"
value="${2}"
shift 2
val=`get_property ${property}`
EXPECT_EQ "${value}" "${val}" for Android property ${property}
local_ret=${?}
if [ 0 != ${local_ret} -a "ro.boot.bootreason" = "${property}" ]; then
if [ -z "${BAD_BOOTLOADER_REASON}" ]; then
BAD_BOOTLOADER_REASON=${val}
elif [ X"${BAD_BOOTLOADER_REASON}" = X"${val}" ]; then
local_ret=0
fi
fi
if [ 0 != ${local_ret} ]; then
if [ -z "${1}" ] ; then
save_ret=${local_ret}
fi
fi
return ${save_ret}
}
[ "USAGE: adb_date >/dev/stdout
Returns: report device epoch time (suitable for logcat -t)" ]
adb_date() {
adb_sh date +%s.%N </dev/null
}
[ "USAGE: report_bootstat_logs [-t<timestamp>] <expected> ...
if not prefixed with a minus (-), <expected> will become a series of expected
matches:
bootstat: Canonical boot reason: <expected_property_value>
If prefixed with a minus, <expected> will look for an exact match after
removing the minux prefix. All expected content is _dropped_ from the output
and in essence forms a known blacklist, unexpected content will show.
Report any logs, minus a known blacklist, preserve the current exit status" ]
report_bootstat_logs() {
save_ret=${?}
match=
timestamp=-d
for i in "${@}"; do
if [ X"${i}" != X"${i#-t}" ]; then
timestamp="${i}"
elif [ X"${i}" != X"${i#-}" ]; then
match="${match}
${i#-}"
else
match="${match}
bootstat: Canonical boot reason: ${i}"
fi
done
adb logcat -b all ${timestamp} |
grep bootstat[^e] |
grep -v -F "bootstat: Service started: /system/bin/bootstat --record_boot_complete${match}
bootstat: Service started: /system/bin/bootstat --record_boot_reason
bootstat: Service started: /system/bin/bootstat --set_system_boot_reason
bootstat: Service started: /system/bin/bootstat --record_time_since_factory_reset
bootstat: Service started: /system/bin/bootstat -l
bootstat: Service started: /system/bin/bootstat --set_system_boot_reason --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l
bootstat: Battery level at shutdown 100%
bootstat: Battery level at startup 100%
init : Parsing file /system/etc/init/bootstat.rc...
init : Parsing file /system/etc/init/bootstat-debug.rc...
init : processing action (persist.test.boot.reason=*) from (/system/etc/init/bootstat-debug.rc:
init : Command 'setprop ro.boot.bootreason \${persist.test.boot.reason}' action=persist.test.boot.reason=* (/system/etc/init/bootstat-debug.rc:
init : processing action (post-fs-data) from (/system/etc/init/bootstat.rc
init : processing action (boot) from (/system/etc/init/bootstat.rc
init : processing action (ro.boot.bootreason=*) from (/system/etc/init/bootstat.rc
init : processing action (ro.boot.bootreason=* && post-fs) from (/system/etc/init/bootstat.rc
init : processing action (sys.bootstat.first_zygote_start=0 && zygote-start) from (/system/etc/init/bootstat.rc
init : processing action (sys.boot_completed=1 && sys.bootstat.first_boot_completed=0) from (/system/etc/init/bootstat.rc
(/system/bin/bootstat --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l)'
(/system/bin/bootstat --set_system_boot_reason --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l)'
init : Command 'exec - system log -- /system/bin/bootstat --record_boot_complete' action=sys.boot_completed=1 && sys.bootstat.first_boot_completed=0 (/system/etc/init/bootstat.rc:
init : Command 'exec - system log -- /system/bin/bootstat --record_boot_reason' action=sys.boot_completed=1 && sys.bootstat.first_boot_completed=0 (/system/etc/init/bootstat.rc:
init : Command 'exec - system log -- /system/bin/bootstat --record_time_since_factory_reset' action=sys.boot_completed=1 && sys.bootstat.first_boot_completed=0 (/system/etc/init/bootstat.rc:
init : Command 'exec_background - system log -- /system/bin/bootstat --set_system_boot_reason --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l' action=sys.boot_completed=1 && sys.bootstat.first_boot_completed=0 (/system/etc/init/bootstat.rc
(/system/bin/bootstat --record_boot_complete)'...
(/system/bin/bootstat --record_boot_complete)' (pid${SPACE}
(/system/bin/bootstat --record_boot_reason)'...
(/system/bin/bootstat --record_boot_reason)' (pid${SPACE}
(/system/bin/bootstat --record_time_since_factory_reset)'...
(/system/bin/bootstat --record_time_since_factory_reset)' (pid${SPACE}
(/system/bin/bootstat --set_system_boot_reason)'...
(/system/bin/bootstat --set_system_boot_reason)' (pid${SPACE}
(/system/bin/bootstat -l)'...
(/system/bin/bootstat -l)' (pid " |
grep -v 'bootstat: Unknown boot reason: $' # Hikey Special
return ${save_ret}
}
[ "USAGE: start_test [message]
Record start of test, preserve exit status" ]
start_test() {
save_ret=${?}
duration_prefix="~"
duration_estimate=1
START=`date +%s`
echo "${GREEN}[ RUN ]${NORMAL} ${TEST} ${*}"
return ${save_ret}
}
duration_sum_diff=0
duration_num=0
[ "USAGE: duration_test [[prefix]seconds]
Report the adjusted and expected test duration" ]
duration_test() {
duration_prefix=${1%%[0123456789]*}
if [ -z "${duration_prefix}" ]; then
duration_prefix="~"
fi
duration_estimate="${1#${duration_prefix}}"
if [ -z "${duration_estimate}" ]; then
duration_estimate="${DURATION_DEFAULT}"
fi
duration_new_estimate="${duration_estimate}"
if [ 0 -ne ${duration_num} ]; then
duration_new_estimate=`expr ${duration_new_estimate} + \
\( ${duration_num} / 2 + ${duration_sum_diff} \) / ${duration_num}`
# guard against catastrophe
if [ -z "${duration_new_estimate}" ]; then
duration_new_estimate=${duration_estimate}
fi
fi
# negative values are so undignified
if [ 0 -ge ${duration_new_estimate} ]; then
duration_new_estimate=1
fi
echo "INFO: expected duration of '${TEST}' test" \
"${duration_prefix}`format_duration ${duration_new_estimate}`" >&2
}
[ "USAGE: end_test [message]
Document duration and success of test, preserve exit status" ]
end_test() {
save_ret=${?}
END=`date +%s`
duration=`expr ${END} - ${START} 2>/dev/null`
[ 0 -ge ${duration} ] ||
echo "INFO: '${TEST}' test duration `format_duration ${duration}`" >&2
if [ ${save_ret} = 0 ]; then
if [ 0 -lt ${duration} -a 0 -lt ${duration_estimate} -a \( \
X"~" = X"${duration_prefix}" -o \
${duration_estimate} -gt ${duration} \) ]; then
duration_sum_diff=`expr ${duration_sum_diff} + \
${duration} - ${duration_estimate}`
duration_num=`expr ${duration_num} + 1`
fi
echo "${GREEN}[ OK ]${NORMAL} ${TEST} ${*}"
else
echo "${RED}[ FAILED ]${NORMAL} ${TEST} ${*}"
if ${STOP_ON_FAILURE}; then
exit ${save_ret}
fi
fi
return ${save_ret}
}
[ "USAGE: wrap_test <test> [message]
All tests below are wrapped with this helper" ]
wrap_test() {
if [ -z "${1}" -o X"nothing" = X"${1}" ]; then
return
fi
TEST=${1}
shift
start_test ${1}
eval test_${TEST}
end_test ${2}
}
[ "USAGE: validate_reason <value>
Check property for CTS compliance with our expectations. Return a cleansed
string representing what is acceptable.
NB: must also roughly match heuristics in system/core/bootstat/bootstat.cpp" ]
validate_reason() {
var=`echo -n ${*} |
tr '[A-Z]' '[a-z]' |
tr ' \f\t\r\n' '_____'`
case ${var} in
watchdog | watchdog,?* ) ;;
kernel_panic | kernel_panic,?* ) ;;
recovery | recovery,?* ) ;;
bootloader | bootloader,?* ) ;;
cold | cold,?* ) ;;
hard | hard,?* ) ;;
warm | warm,?* ) ;;
shutdown | shutdown,?* ) ;;
reboot,reboot | reboot,reboot,* ) var=${var#reboot,} ; var=${var%,} ;;
reboot,cold | reboot,cold,* ) var=${var#reboot,} ; var=${var%,} ;;
reboot,hard | reboot,hard,* ) var=${var#reboot,} ; var=${var%,} ;;
reboot,warm | reboot,warm,* ) var=${var#reboot,} ; var=${var%,} ;;
reboot,recovery | reboot,recovery,* ) var=${var#reboot,} ; var=${var%,} ;;
reboot,bootloader | reboot,bootloader,* ) var=${var#reboot,} ; var=${var%,} ;;
reboot | reboot,?* ) ;;
# Aliases and Heuristics
*wdog* | *watchdog* ) var="watchdog" ;;
*powerkey* | *power_on_key* | *power_key* | *PowerKey* ) var="cold,powerkey" ;;
*panic* | *kernel_panic* ) var="kernel_panic" ;;
*thermal* ) var="shutdown,thermal" ;;
*s3_wakeup* ) var="warm,s3_wakeup" ;;
*hw_reset* ) var="hard,hw_reset" ;;
*usb* | *power_on_cable* ) var="cold,charger" ;;
*rtc* ) var="cold,rtc" ;;
*2sec_reboot* ) var="cold,rtc,2sec" ;;
*wdt_by_pass_pwk* ) var="warm" ;;
wdt ) var="reboot" ;;
*tool_by_pass_pwk* ) var="reboot,tool" ;;
*bootloader* ) var="bootloader" ;;
* ) var="reboot" ;;
esac
echo ${var}
}
[ "USAGE: validate_property <property>
Check property for CTS compliance with our expectations. Return a cleansed
string representing what is acceptable.
NB: must also roughly match heuristics in system/core/bootstat/bootstat.cpp" ]
validate_property() {
val=`get_property ${1}`
ret=`validate_reason "${val}"`
if [ "reboot" = "${ret}" ]; then
ret=`validate_reason "reboot,${val}"`
fi
echo ${ret}
}
[ "USAGE: check_boilerblate_properties
Check for common property values" ]
check_boilerplate_properties() {
EXPECT_PROPERTY persist.sys.boot.reason ""
save_ret=${?}
reason=`validate_property sys.boot.reason`
( exit ${save_ret} ) # because one can not just do ?=${save_ret}
EXPECT_PROPERTY persist.sys.boot.reason.history "${reason},[1-9][0-9]*\(\|[^0-9].*\)"
}
#
# Actual test frames
#
[ "USAGE: test_properties
properties test
- (wait until screen is up, boot has completed)
- adb shell getprop ro.boot.bootreason (bootloader reason)
- adb shell getprop persist.sys.boot.reason (last reason)
- adb shell getprop sys.boot.reason.last (last last reason)
- adb shell getprop sys.boot.reason (system reason)
- NB: all should have a value that is compliant with our known set." ]
test_properties() {
duration_test 1
wait_for_screen
retval=0
# sys.boot.reason is last for a reason
check_set="ro.boot.bootreason sys.boot.reason.last sys.boot.reason"
bootloader=""
# NB: this test could fail if performed _after_ optional_factory_reset test
# and will report
# ERROR: expected "reboot" got ""
# for Android property sys.boot.reason.last
# following is mitigation for the persist.sys.boot.reason, skip it
if [ "reboot,factory_reset" = "`validate_property ro.boot_bootreason`" ]; then
check_set="ro.boot.bootreason sys.boot.reason"
bootloader="bootloader"
fi
for prop in ${check_set}; do
reason=`validate_property ${prop}`
EXPECT_PROPERTY ${prop} ${reason} || retval=${?}
done
check_boilerplate_properties || retval=${?}
report_bootstat_logs ${reason} ${bootloader}
return ${retval}
}
[ "USAGE: test_ota
ota test
- rm out/.kati_stamp-* out/build_date.txt out/build_number.txt
- rm out/target/product/*/*/*.prop
- rm -r out/target/product/*/obj/ETC/system_build_prop_intermediates
- m
- NB: ro.build.date.utc should update
- fastboot flashall
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report ota
Decision to change the build itself rather than trick bootstat by
rummaging through its data files was made." ]
test_ota() {
duration_test ">300"
echo " extended by build and flashing times" >&2
if [ -z "${TARGET_PRODUCT}" -o \
-z "${ANDROID_PRODUCT_OUT}" -o \
-z "${ANDROID_BUILD_TOP}" -o \
-z "${TARGET_BUILD_VARIANT}" ]; then
echo "ERROR: Missing envsetup.sh and lunch" >&2
return 1
fi
rm ${ANDROID_PRODUCT_OUT%/out/*}/out/.kati_stamp-* ||
true
rm ${ANDROID_PRODUCT_OUT%/out/*}/out/build_date.txt ||
true
rm ${ANDROID_PRODUCT_OUT%/out/*}/out/build_number.txt ||
true
rm ${ANDROID_PRODUCT_OUT}/*/*.prop ||
true
rm -r ${ANDROID_PRODUCT_OUT}/obj/ETC/system_build_prop_intermediates ||
true
pushd ${ANDROID_BUILD_TOP} >&2
build/soong/soong_ui.bash --make-mode >&2
if [ ${?} != 0 ]; then
popd >&2
return 1
fi
if ! inFastboot; then
adb reboot-bootloader >&2
fi
fastboot flashall >&2
popd >&2
wait_for_screen
EXPECT_PROPERTY sys.boot.reason "\(reboot,ota\|bootloader\)"
EXPECT_PROPERTY sys.boot.reason.last bootloader
check_boilerplate_properties
report_bootstat_logs reboot,ota bootloader
}
[ "USAGE: test_optional_ota
fast and fake (touch build_date on device to make it different)" ]
test_optional_ota() {
checkDebugBuild || return
duration_test
adb_su touch /data/misc/bootstat/build_date >&2 </dev/null
adb reboot ota
wait_for_screen
EXPECT_PROPERTY sys.boot.reason reboot,ota
EXPECT_PROPERTY sys.boot.reason.last reboot,ota
check_boilerplate_properties
report_bootstat_logs reboot,ota
}
[ "USAGE: [TEST=<test>] blind_reboot_test
Simple tests helper
- adb reboot <test>
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report <test>, or reboot,<test> depending on canonical rules
We interleave the simple reboot tests between the hard/complex ones
as a means of checking sanity and any persistent side effect of the
other tests." ]
blind_reboot_test() {
duration_test
case ${TEST} in
bootloader | recovery | cold | hard | warm ) reason=${TEST} ;;
*) reason=reboot,${TEST#optional_} ;;
esac
adb reboot ${TEST#optional_}
wait_for_screen
bootloader_reason=`validate_property ro.boot.bootreason`
EXPECT_PROPERTY ro.boot.bootreason ${bootloader_reason}
# to make sys.boot.reason report user friendly
reasons=${reason}
if [ "${bootloader_reason}" != "${reason}" -a -n "${bootloader_reason}" ]; then
reasons="\(${reason}\|${bootloader_reason}\)"
fi
EXPECT_PROPERTY sys.boot.reason ${reasons}
EXPECT_PROPERTY sys.boot.reason.last ${reason}
check_boilerplate_properties
report_bootstat_logs ${reason} ${bootloader_reason}
}
[ "USAGE: test_cold
cold test
- adb reboot cold
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report cold" ]
test_cold() {
blind_reboot_test
}
[ "USAGE: test_factory_reset
factory_reset test
- adb shell su root rm /data/misc/bootstat/build_date
- adb reboot
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report factory_reset
Decision to rummage through bootstat data files was made as
a _real_ factory_reset is too destructive to the device." ]
test_factory_reset() {
checkDebugBuild || return
duration_test
adb_su rm /data/misc/bootstat/build_date >&2 </dev/null
adb reboot >&2
wait_for_screen
EXPECT_PROPERTY sys.boot.reason reboot,factory_reset
EXPECT_PROPERTY sys.boot.reason.last "reboot,.*"
check_boilerplate_properties
report_bootstat_logs reboot,factory_reset reboot, reboot,adb \
"-bootstat: Failed to read /data/misc/bootstat/build_date: No such file or directory" \
"-bootstat: Failed to parse boot time record: /data/misc/bootstat/build_date"
}
[ "USAGE: test_optional_factory_reset
factory_reset test
- adb reboot-bootloader
- fastboot format userdata
- fastboot reboot
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report factory_reset
For realz, and disruptive" ]
test_optional_factory_reset() {
duration_test 60
if ! inFastboot; then
adb reboot-bootloader
fi
fastboot format userdata >&2
save_ret=${?}
if [ 0 != ${save_ret} ]; then
echo "ERROR: fastboot can not format userdata" >&2
fi
fastboot reboot >&2
wait_for_screen
( exit ${save_ret} ) # because one can not just do ?=${save_ret}
EXPECT_PROPERTY sys.boot.reason reboot,factory_reset
EXPECT_PROPERTY sys.boot.reason.last "\(\|bootloader\)"
check_boilerplate_properties
report_bootstat_logs reboot,factory_reset bootloader \
"-bootstat: Failed to read /data/misc/bootstat/last_boot_time_utc: No such file or directory" \
"-bootstat: Failed to parse boot time record: /data/misc/bootstat/last_boot_time_utc" \
"-bootstat: Failed to read /data/misc/bootstat/build_date: No such file or directory" \
"-bootstat: Failed to parse boot time record: /data/misc/bootstat/build_date" \
"-bootstat: Failed to read /data/misc/bootstat/factory_reset: No such file or directory" \
"-bootstat: Failed to parse boot time record: /data/misc/bootstat/factory_reset"
}
[ "USAGE: test_hard
hard test:
- adb reboot hard
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report hard" ]
test_hard() {
blind_reboot_test
}
[ "USAGE: test_battery
battery test (trick):
- echo healthd: battery l=2<space> | adb shell su root tee /dev/kmsg
- adb reboot cold
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report reboot,battery, unless healthd managed to log
before reboot in above trick.
- Bonus points (manual extras)
- Make sure the following is added to the /init.rc file in post-fs
section before logd is started:
+ setprop logd.kernel false
+ rm /sys/fs/pstore/console-ramoops
+ rm /sys/fs/pstore/console-ramoops-0
+ write /dev/kmsg \"healthd: battery l=2${SPACE}
+\"
- adb reboot fs
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report reboot,battery
- (replace set logd.kernel true to the above, and retry test)" ]
test_battery() {
checkDebugBuild || return
duration_test 120
enterPstore
# Send it _many_ times to combat devices with flakey pstore
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z; do
echo 'healthd: battery l=2 ' | adb_su tee /dev/kmsg >/dev/null
done
adb reboot cold >&2
adb wait-for-device
wait_for_screen
adb_su </dev/null \
cat /proc/fs/pstore/console-ramoops \
/proc/fs/pstore/console-ramoops-0 2>/dev/null |
grep 'healthd: battery l=' |
tail -1 |
grep 'healthd: battery l=2 ' >/dev/null || (
if ! EXPECT_PROPERTY sys.boot.reason reboot,battery >/dev/null 2>/dev/null; then
# retry
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z; do
echo 'healthd: battery l=2 ' | adb_su tee /dev/kmsg >/dev/null
done
adb reboot cold >&2
adb wait-for-device
wait_for_screen
fi
)
EXPECT_PROPERTY sys.boot.reason shutdown,battery
EXPECT_PROPERTY sys.boot.reason.last cold
check_boilerplate_properties
report_bootstat_logs shutdown,battery "-bootstat: Battery level at shutdown 2%"
exitPstore
}
[ "USAGE: test_optional_battery
battery shutdown test:
- adb shell setprop sys.powerctl shutdown,battery
- (power up the device)
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report shutdown,battery" ]
test_optional_battery() {
duration_test ">60"
echo " power on request" >&2
adb_sh setprop sys.powerctl shutdown,battery </dev/null
sleep 5
echo -n "WARNING: Please power device back up, waiting ... " >&2
wait_for_screen -n >&2
EXPECT_PROPERTY sys.boot.reason shutdown,battery
EXPECT_PROPERTY sys.boot.reason.last shutdown,battery
check_boilerplate_properties
report_bootstat_logs shutdown,battery
}
[ "USAGE: test_optional_battery_thermal
battery thermal shutdown test:
- adb shell setprop sys.powerctl shutdown,thermal,battery
- (power up the device)
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report shutdown,thermal,battery" ]
test_optional_battery_thermal() {
duration_test ">60"
echo " power on request" >&2
adb_sh setprop sys.powerctl shutdown,thermal,battery </dev/null
sleep 5
echo -n "WARNING: Please power device back up, waiting ... " >&2
wait_for_screen -n >&2
EXPECT_PROPERTY sys.boot.reason shutdown,thermal,battery
EXPECT_PROPERTY sys.boot.reason.last shutdown,thermal,battery
check_boilerplate_properties
report_bootstat_logs shutdown,thermal,battery
}
[ "USAGE: test_unknown
unknown test
- adb reboot unknown
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report reboot,unknown
- NB: expect log \"... I bootstat: Unknown boot reason: reboot,unknown\"" ]
test_unknown() {
blind_reboot_test
}
[ "USAGE: test_kernel_panic
kernel_panic test:
- echo c | adb shell su root tee /proc/sysrq-trigger
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report kernel_panic,sysrq" ]
test_kernel_panic() {
checkDebugBuild || return
duration_test ">90"
panic_msg="kernel_panic,sysrq"
enterPstore
if [ ${?} != 0 ]; then
echo " or functional bootloader" >&2
panic_msg="\(kernel_panic,sysrq\|kernel_panic\)"
pstore_ok=true
fi
echo c | adb_su tee /proc/sysrq-trigger >/dev/null
wait_for_screen
EXPECT_PROPERTY sys.boot.reason ${panic_msg}
EXPECT_PROPERTY sys.boot.reason.last ${panic_msg}
check_boilerplate_properties
report_bootstat_logs kernel_panic,sysrq
exitPstore
}
[ "USAGE: test_kernel_panic_subreason
kernel_panic_subreason test:
- echo SysRq : Trigger a crash : 'test' | adb shell su root tee /dev/kmsg
- echo c | adb shell su root tee /proc/sysrq-trigger
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report kernel_panic,sysrq,test" ]
test_kernel_panic_subreason() {
checkDebugBuild || return
duration_test ">90"
panic_msg="kernel_panic,sysrq,test"
enterPstore
if [ ${?} != 0 ]; then
echo " or functional bootloader" >&2
panic_msg="\(kernel_panic,sysrq,test\|kernel_panic\)"
pstore_ok=true
fi
echo "SysRq : Trigger a crash : 'test'" | adb_su tee /dev/kmsg
echo c | adb_su tee /proc/sysrq-trigger >/dev/null
wait_for_screen
EXPECT_PROPERTY sys.boot.reason ${panic_msg}
EXPECT_PROPERTY sys.boot.reason.last ${panic_msg}
check_boilerplate_properties
report_bootstat_logs kernel_panic,sysrq,test \
"-bootstat: Unknown boot reason: kernel_panic,sysrq,test"
exitPstore
}
[ "USAGE: test_kernel_panic_hung
kernel_panic_hung test:
- echo Kernel panic - not synching: hung_task: blocked tasks |
adb shell su root tee /dev/kmsg
- adb reboot warm
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report kernel_panic,hung" ]
test_kernel_panic_hung() {
checkDebugBuild || return
duration_test
panic_msg="kernel_panic,hung"
enterPstore
if [ ${?} != 0 ]; then
echo " or functional bootloader" >&2
panic_msg="\(kernel_panic,hung\|reboot,hung\)"
pstore_ok=true
fi
echo "Kernel panic - not syncing: hung_task: blocked tasks" |
adb_su tee /dev/kmsg
adb reboot warm
wait_for_screen
EXPECT_PROPERTY sys.boot.reason ${panic_msg}
EXPECT_PROPERTY sys.boot.reason.last ${panic_msg}
check_boilerplate_properties
report_bootstat_logs kernel_panic,hung
exitPstore
}
[ "USAGE: test_warm
warm test
- adb reboot warm
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report warm" ]
test_warm() {
blind_reboot_test
}
[ "USAGE: test_thermal_shutdown
thermal shutdown test:
- adb shell setprop sys.powerctl shutdown,thermal
- (power up the device)
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report shutdown,thermal" ]
test_thermal_shutdown() {
duration_test ">60"
echo " power on request" >&2
adb_sh setprop sys.powerctl shutdown,thermal </dev/null
sleep 5
echo -n "WARNING: Please power device back up, waiting ... " >&2
wait_for_screen -n >&2
EXPECT_PROPERTY sys.boot.reason shutdown,thermal
EXPECT_PROPERTY sys.boot.reason.last shutdown,thermal
check_boilerplate_properties
report_bootstat_logs shutdown,thermal
}
[ "USAGE: test_userrequested_shutdown
userrequested shutdown test:
- adb shell setprop sys.powerctl shutdown,userrequested
- (power up the device)
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report shutdown,userrequested" ]
test_userrequested_shutdown() {
duration_test ">60"
echo " power on request" >&2
adb_sh setprop sys.powerctl shutdown,userrequested </dev/null
sleep 5
echo -n "WARNING: Please power device back up, waiting ... " >&2
wait_for_screen -n >&2
EXPECT_PROPERTY sys.boot.reason shutdown,userrequested
EXPECT_PROPERTY sys.boot.reason.last shutdown,userrequested
check_boilerplate_properties
report_bootstat_logs shutdown,userrequested
}
[ "USAGE: test_shell_reboot
shell reboot test:
- adb shell reboot
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report reboot,shell" ]
test_shell_reboot() {
duration_test
adb_sh reboot </dev/null
wait_for_screen
EXPECT_PROPERTY sys.boot.reason reboot,shell
EXPECT_PROPERTY sys.boot.reason.last reboot,shell
check_boilerplate_properties
report_bootstat_logs reboot,shell
}
[ "USAGE: test_adb_reboot
adb reboot test:
- adb reboot
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report reboot,adb" ]
test_adb_reboot() {
duration_test
adb reboot
wait_for_screen
EXPECT_PROPERTY sys.boot.reason reboot,adb
EXPECT_PROPERTY sys.boot.reason.last reboot,adb
check_boilerplate_properties
report_bootstat_logs reboot,adb
}
[ "USAGE: test_rescueparty
rescueparty test
- adb reboot rescueparty
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- adb shell getprop ro.boot.bootreason
- NB: should report reboot,rescueparty" ]
test_optional_rescueparty() {
blind_reboot_test
echo "WARNING: legacy devices are allowed to fail following ro.boot.bootreason result" >&2
EXPECT_PROPERTY ro.boot.bootreason '\(reboot\|reboot,rescueparty\)'
}
[ "USAGE: test_Its_Just_So_Hard_reboot
Its Just So Hard reboot test:
- adb shell reboot 'Its Just So Hard'
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report reboot,its_just_so_hard
- NB: expect log \"... I bootstat: Unknown boot reason: reboot,its_just_so_hard\"" ]
test_Its_Just_So_Hard_reboot() {
if isDebuggable; then # see below
duration_test
else
duration_test `expr ${DURATION_DEFAULT} + ${DURATION_DEFAULT}`
fi
adb_sh 'reboot "Its Just So Hard"' </dev/null
wait_for_screen
EXPECT_PROPERTY sys.boot.reason reboot,its_just_so_hard
EXPECT_PROPERTY sys.boot.reason.last reboot,its_just_so_hard
check_boilerplate_properties
report_bootstat_logs reboot,its_just_so_hard
}
[ "USAGE: run_bootloader [value [expected]]
bootloader boot reason injection tests:
- setBootloaderBootReason value
- adb shell reboot
- (wait until screen is up, boot has completed)
- adb shell getprop sys.boot.reason
- NB: should report reboot,value" ]
run_bootloader() {
bootloader_expected="${1}"
if [ -z "${bootloader_expected}" ]; then
bootloader_expected="${TEST#bootloader_}"
fi
if ! setBootloaderBootReason ${bootloader_expected}; then
echo " Skipping FAILURE." 2>&1
return
fi
duration_test
if [ X"warm" = X"${bootloader_expected}" ]; then
last_expected=cold
else
last_expected=warm
fi
adb reboot ${last_expected}
wait_for_screen
# Reset so that other tests do not get unexpected injection
setBootloaderBootReason
# Determine the expected values
sys_expected="${2}"
if [ -z "${sys_expected}" ]; then
sys_expected="`validate_reason ${bootloader_expected}`"
if [ "reboot" = "${sys_expected}" ]; then
sys_expected="${last_expected}"
fi
else
sys_expected=`validate_reason ${sys_expected}`
fi
case ${sys_expected} in
kernel_panic | kernel_panic,* | watchdog | watchdog,* )
last_expected=${sys_expected}
;;
esac
# Check values
EXPECT_PROPERTY ro.boot.bootreason "${bootloader_expected}"
EXPECT_PROPERTY sys.boot.reason "${sys_expected}"
EXPECT_PROPERTY sys.boot.reason.last "${last_expected}"
check_boilerplate_properties
report_bootstat_logs "${sys_expected}"
}
[ "USAGE: test_bootloader_<type>
bootloader boot reasons test injection" ]
test_bootloader_normal() {
run_bootloader
}
test_bootloader_watchdog() {
run_bootloader
}
test_bootloader_kernel_panic() {
run_bootloader
}
test_bootloader_oem_powerkey() {
run_bootloader
}
test_bootloader_wdog_reset() {
run_bootloader
}
test_bootloader_cold() {
run_bootloader
}
test_bootloader_warm() {
run_bootloader
}
test_bootloader_hard() {
run_bootloader
}
test_bootloader_recovery() {
run_bootloader
}
[ "USAGE: run_kBootReasonMap [--boot_reason_enum] value expected
bootloader boot reason injection tests:
- if --boot_reason_enum run bootstat executable for result instead.
- inject boot reason into sys.boot.reason
- run bootstat --set_system_boot_reason
- check for expected enum
- " ]
run_kBootReasonMap() {
if [ X"--boot_reason_enum" = X"${1}" ]; then
shift
local sys_expected="${1}"
shift
local enum_expected="${1}"
adb_su bootstat --boot_reason_enum="${sys_expected}" |
(
local retval=-1
while read -r id match; do
if [ ${retval} = -1 -a ${enum_expected} = ${id} ]; then
retval=0
fi
if [ ${enum_expected} != ${id} ]; then
echo "ERROR: ${enum_expected} ${sys_expected} got ${id} ${match}" >&2
retval=1
fi
done
exit ${retval}
)
return
fi
local sys_expected="${1}"
shift
local enum_expected="${1}"
adb_su setprop sys.boot.reason "${sys_expected}" </dev/null
adb_su bootstat --record_boot_reason </dev/null
# Check values
EXPECT_PROPERTY sys.boot.reason "${sys_expected}"
local retval=${?}
local result=`adb_su stat -c %Y /data/misc/bootstat/system_boot_reason </dev/null 2>/dev/null`
[ "${enum_expected}" = "${result}" ] ||
(
[ -n "${result}" ] || result="<nothing>"
echo "ERROR: ${enum_expected} ${sys_expected} got ${result}" >&2
false
) ||
retval=${?}
return ${retval}
}
[ "USAGE: filter_kBootReasonMap </dev/stdin >/dev/stdout
convert any regex expressions into a series of non-regex test strings" ]
filter_kBootReasonMap() {
while read -r id match; do
case ${match} in
'reboot,[empty]')
echo ${id} # matches b/c of special case
echo ${id} reboot,y # matches b/c of regex
echo 1 reboot,empty # negative test (ID for unknown is 1)
;;
reboot)
echo 1 reboog # negative test (ID for unknown is 1)
;;
'reboot,pmic_off_fault,.*')
echo ${id} reboot,pmic_off_fault,hello,world
echo ${id} reboot,pmic_off_fault,
echo 1 reboot,pmic_off_fault
;;
esac
echo ${id} "${match}" # matches b/c of exact
done
}
[ "USAGE: test_kBootReasonMap
kBootReasonMap test
- (wait until screen is up, boot has completed)
- read bootstat for kBootReasonMap entries and test them all" ]
test_kBootReasonMap() {
checkDebugBuild || return
duration_test 15
local tempfile="`mktemp`"
local arg=--boot_reason_enum
adb_su bootstat ${arg} </dev/null 2>/dev/null |
filter_kBootReasonMap >${tempfile}
if [ ! -s "${tempfile}" ]; then
wait_for_screen
arg=
sed -n <${progpath}bootstat.cpp \
'/kBootReasonMap = {/,/^};/s/.*{"\([^"]*\)", *\([0-9][0-9]*\)},.*/\2 \1/p' |
sed 's/\\\\/\\/g' |
filter_kBootReasonMap >${tempfile}
fi
T=`adb_date`
retval=0
while read -r enum string; do
if [ X"${string}" != X"${string#*[[].[]]}" -o X"${string}" != X"${string#*\\.}" ]; then
if [ 'reboot\.empty' != "${string}" ]; then
echo "WARNING: regex snuck through filter_kBootReasonMap ${enum} ${string}" >&2
enum=1
fi
fi
run_kBootReasonMap ${arg} "${string}" "${enum}" </dev/null || retval=${?}
done <${tempfile}
rm ${tempfile}
( exit ${retval} )
# See filter_kBootReasonMap() for negative tests and add them here too
report_bootstat_logs -t${T} \
'-bootstat: Service started: bootstat --boot_reason_enum=' \
'-bootstat: Unknown boot reason: reboot,empty' \
'-bootstat: Unknown boot reason: reboog' \
'-bootstat: Unknown boot reason: reboot,pmic_off_fault'
}
[ "USAGE: ${progname} [-s SERIAL] [tests]...
Mainline executive to run the above tests" ]
# Rudimentary argument parsing
if [ ${#} -ge 2 -a X"-s" = X"${1}" ]; then
export ANDROID_SERIAL="${2}"
shift 2
fi
# Helpful for debugging, allows us to import the functions.
if [ X"--macros" != X"${1}" ]; then
if [ X"--help" = X"${1}" -o X"-h" = X"${1}" -o X"-?" = X"${1}" ]; then
echo "USAGE: ${progname} [-s SERIAL] [tests]..."
echo tests - `sed -n 's/^test_\([^ ()]*\)() {/\1/p' $0 </dev/null`
exit 0
fi
if [ X"--stop" = X"${1}" ]; then
STOP_ON_FAILURE=true
shift
fi
# Check if all conditions for the script are valid
if [ -z "${ANDROID_SERIAL}" ]; then
ndev=`(
adb devices | grep -v 'List of devices attached'
fastboot devices
) |
grep -v "^[${SPACE}${TAB}]*\$" |
wc -l`
if [ ${ndev} -gt 1 ]; then
echo "ERROR: no target device specified, ${ndev} connected" >&2
echo "${RED}[ FAILED ]${NORMAL}"
exit 1
fi
echo "WARNING: no target device specified" >&2
fi
ret=0
# Test Series
if [ X"all" = X"${*}" ]; then
# automagically pick up all test_<function>s.
eval set nothing `sed -n 's/^test_\([^ ()]*\)() {/\1/p' $0 </dev/null`
if [ X"nothing" = X"${1}" ]; then
shift 1
fi
fi
if [ -z "$*" ]; then
# automagically pick up all test_<function>, except test_optional_<function>.
eval set nothing `sed -n 's/^test_\([^ ()]*\)() {/\1/p' $0 </dev/null |
grep -v '^optional_'`
if [ -z "${2}" ]; then
# Hard coded should shell fail to find them (search/permission issues)
eval set properties ota cold factory_reset hard battery unknown \
kernel_panic kernel_panic_subreason kernel_panic_hung warm \
thermal_shutdown userrequested_shutdown shell_reboot adb_reboot \
Its_Just_So_Hard_reboot bootloader_normal bootloader_watchdog \
bootloader_kernel_panic bootloader_oem_powerkey \
bootloader_wdog_reset bootloader_cold bootloader_warm \
bootloader_hard bootloader_recovery kBootReasonMap
fi
if [ X"nothing" = X"${1}" ]; then
shift 1
fi
fi
echo "INFO: selected test(s): ${@}" >&2
echo
# Prepare device
setBootloaderBootReason 2>/dev/null
# Start pouring through the tests.
failures=
successes=
for t in "${@}"; do
wrap_test ${t}
retval=${?}
if [ 0 = ${retval} ]; then
if [ -z "${successes}" ]; then
successes=${t}
else
successes="${successes} ${t}"
fi
else
ret=${retval}
if [ -z "${failures}" ]; then
failures=${t}
else
failures="${failures} ${t}"
fi
fi
echo
done
if [ -n "${successes}" ]; then
echo "${GREEN}[ PASSED ]${NORMAL} ${successes}"
fi
if [ -n "${failures}" ]; then
echo "${RED}[ FAILED ]${NORMAL} ${failures}"
fi
exit ${ret}
fi
================================================
FILE: bootstat/bootstat-debug.rc
================================================
# This file is the userdebug LOCAL_INIT_RC file for the bootstat command.
# FOR TESTING
# For devices w/o bootloader boot reason reported, mirror test boot reason
# to bootloader boot reason to allow test to inject reasons
on property:persist.test.boot.reason=*
setprop ro.boot.bootreason ${persist.test.boot.reason}
================================================
FILE: bootstat/bootstat.cpp
================================================
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// The bootstat command provides options to persist boot events with the current
// timestamp, dump the persisted events, and log all events to EventLog to be
// uploaded to Android log storage via Tron.
#include <getopt.h>
#include <sys/klog.h>
#include <unistd.h>
#include <chrono>
#include <cmath>
#include <cstddef>
#include <cstdio>
#include <ctime>
#include <iterator>
#include <map>
#include <memory>
#include <regex>
#include <string>
#include <string_view>
#include <unordered_map>
#include <utility>
#include <vector>
#include <android-base/chrono_utils.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/parseint.h>
#include <android-base/properties.h>
#include <android-base/strings.h>
#include <android/log.h>
#include <cutils/android_reboot.h>
#include <cutils/properties.h>
#include <statslog.h>
#include "boot_event_record_store.h"
namespace {
struct AtomInfo {
int32_t atom;
int32_t event;
};
// Maps BootEvent used inside bootstat into statsd atom defined in
// frameworks/proto_logging/stats/atoms.proto.
const std::unordered_map<std::string_view, AtomInfo> kBootEventToAtomInfo = {
// ELAPSED_TIME
{"ro.boottime.init",
{android::util::BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED,
android::util::BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__ANDROID_INIT_STAGE_1}},
{"boot_complete",
{android::util::BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED,
android::util::BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__BOOT_COMPLETE}},
{"boot_complete_no_encryption",
{android::util::BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED,
android::util::BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__BOOT_COMPLETE_NO_ENCRYPTION}},
{"factory_reset_boot_complete",
{android::util::BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED,
android::util::BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__FACTORY_RESET_BOOT_COMPLETE}},
{"factory_reset_boot_complete_no_encryption",
{android::util::BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED,
android::util::
BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION}},
{"ota_boot_complete",
{android::util::BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED,
android::util::BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__OTA_BOOT_COMPLETE}},
{"ota_boot_complete_no_encryption",
{android::util::BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED,
android::util::BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__OTA_BOOT_COMPLETE_NO_ENCRYPTION}},
// DURATION
{"absolute_boot_time",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__ABSOLUTE_BOOT_TIME}},
{"boottime.bootloader.1BLE",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__BOOTLOADER_FIRST_STAGE_EXEC}},
{"boottime.bootloader.1BLL",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__BOOTLOADER_FIRST_STAGE_LOAD}},
{"boottime.bootloader.KL",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__BOOTLOADER_KERNEL_LOAD}},
{"boottime.bootloader.2BLE",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__BOOTLOADER_SECOND_STAGE_EXEC}},
{"boottime.bootloader.2BLL",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__BOOTLOADER_SECOND_STAGE_LOAD}},
{"boottime.bootloader.SW",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__BOOTLOADER_UI_WAIT}},
{"boottime.bootloader.total",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__BOOTLOADER_TOTAL}},
{"boottime.init.cold_boot_wait",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__COLDBOOT_WAIT}},
{"time_since_factory_reset",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__FACTORY_RESET_TIME_SINCE_RESET}},
{"ro.boottime.init.first_stage",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__ANDROID_INIT_STAGE_1}},
{"ro.boottime.init.selinux",
{android::util::BOOT_TIME_EVENT_DURATION_REPORTED,
android::util::BOOT_TIME_EVENT_DURATION__EVENT__SELINUX_INIT}},
// UTC_TIME
{"factory_reset",
{android::util::BOOT_TIME_EVENT_UTC_TIME_REPORTED,
android::util::BOOT_TIME_EVENT_UTC_TIME__EVENT__FACTORY_RESET_RESET_TIME}},
{"factory_reset_current_time",
{android::util::BOOT_TIME_EVENT_UTC_TIME_REPORTED,
android::util::BOOT_TIME_EVENT_UTC_TIME__EVENT__FACTORY_RESET_CURRENT_TIME}},
{"factory_reset_record_value",
{android::util::BOOT_TIME_EVENT_UTC_TIME_REPORTED,
android::util::BOOT_TIME_EVENT_UTC_TIME__EVENT__FACTORY_RESET_RECORD_VALUE}},
// ERROR_CODE
{"factory_reset_current_time_failure",
{android::util::BOOT_TIME_EVENT_ERROR_CODE_REPORTED,
android::util::BOOT_TIME_EVENT_ERROR_CODE__EVENT__FACTORY_RESET_CURRENT_TIME_FAILURE}},
};
// Scans the boot event record store for record files and logs each boot event
// via EventLog.
void LogBootEvents() {
BootEventRecordStore boot_event_store;
auto events = boot_event_store.GetAllBootEvents();
std::vector<std::string_view> notSupportedEvents;
for (const auto& event : events) {
const auto& name = event.first;
const auto& info = kBootEventToAtomInfo.find(name);
if (info != kBootEventToAtomInfo.end()) {
if (info->second.atom == android::util::BOOT_TIME_EVENT_ERROR_CODE_REPORTED) {
android::util::stats_write(static_cast<int32_t>(info->second.atom),
static_cast<int32_t>(info->second.event),
static_cast<int32_t>(event.second));
} else {
android::util::stats_write(static_cast<int32_t>(info->second.atom),
static_cast<int32_t>(info->second.event),
static_cast<int64_t>(event.second));
}
} else {
notSupportedEvents.push_back(name);
}
}
if (!notSupportedEvents.empty()) {
LOG(WARNING) << "LogBootEvents, atomInfo not defined for events:"
<< android::base::Join(notSupportedEvents, ',');
}
}
// Records the named boot |event| to the record store. If |value| is non-empty
// and is a proper string representation of an integer value, the converted
// integer value is associated with the boot event.
void RecordBootEventFromCommandLine(const std::string& event, const std::string& value_str) {
BootEventRecordStore boot_event_store;
if (!value_str.empty()) {
int32_t value = 0;
if (android::base::ParseInt(value_str, &value)) {
boot_event_store.AddBootEventWithValue(event, value);
}
} else {
boot_event_store.AddBootEvent(event);
}
}
void PrintBootEvents() {
printf("Boot events:\n");
printf("------------\n");
BootEventRecordStore boot_event_store;
auto events = boot_event_store.GetAllBootEvents();
for (auto i = events.cbegin(); i != events.cend(); ++i) {
printf("%s\t%d\n", i->first.c_str(), i->second);
}
}
void ShowHelp(const char* cmd) {
fprintf(stderr, "Usage: %s [options]...\n", cmd);
fprintf(stderr,
"options include:\n"
" -h, --help Show this help\n"
" -l, --log Log all metrics to logstorage\n"
" -p, --print Dump the boot event records to the console\n"
" -r, --record Record the timestamp of a named boot event\n"
" --value Optional value to associate with the boot event\n"
" --record_boot_complete Record metrics related to the time for the device boot\n"
" --record_boot_reason Record the reason why the device booted\n"
" --record_time_since_factory_reset Record the time since the device was reset\n"
" --boot_reason_enum=<reason> Report the match to the kBootReasonMap table\n");
}
// Constructs a readable, printable string from the givencommand line
// arguments.
std::string GetCommandLine(int argc, char** argv) {
std::string cmd;
for (int i = 0; i < argc; ++i) {
cmd += argv[i];
cmd += " ";
}
return cmd;
}
constexpr int32_t kEmptyBootReason = 0;
constexpr int32_t kUnknownBootReason = 1;
// A mapping from boot reason string, as read from the ro.boot.bootreason
// system property, to a unique integer ID. Viewers of log data dashboards for
// the boot_reason metric may refer to this mapping to discern the histogram
// values. Regex matching, to manage the scale, as a minimum require either
// [, \ or * to be present in the string to switch to checking.
const std::map<std::string, int32_t> kBootReasonMap = {
{"reboot,[empty]", kEmptyBootReason},
{"__BOOTSTAT_UNKNOWN__", kUnknownBootReason},
{"normal", 2},
{"recovery", 3},
{"reboot", 4},
{"PowerKey", 5},
{"hard_reset", 6},
{"kernel_panic", 7},
{"rpm_err", 8},
{"hw_reset", 9},
{"tz_err", 10},
{"adsp_err", 11},
{"modem_err", 12},
{"mba_err", 13},
{"Watchdog", 14},
{"Panic", 15},
{"power_key", 16}, // aliasReasons to cold,powerkey (Mediatek)
{"power_on", 17}, // aliasReasons to cold,powerkey
{"Reboot", 18},
{"rtc", 19},
{"edl", 20},
{"oem_pon1", 21},
{"oem_powerkey", 22}, // aliasReasons to cold,powerkey
{"oem_unknown_reset", 23},
{"srto: HWWDT reset SC", 24},
{"srto: HWWDT reset platform", 25},
{"srto: bootloader", 26},
{"srto: kernel panic", 27},
{"srto: kernel watchdog reset", 28},
{"srto: normal", 29},
{"srto: reboot", 30},
{"srto: reboot-bootloader", 31},
{"srto: security watchdog reset", 32},
{"srto: wakesrc", 33},
{"srto: watchdog", 34},
{"srto:1-1", 35},
{"srto:omap_hsmm", 36},
{"srto:phy0", 37},
{"srto:rtc0", 38},
{"srto:touchpad", 39},
{"watchdog", 40},
{"watchdogr", 41},
{"wdog_bark", 42},
{"wdog_bite", 43},
{"wdog_reset", 44},
{"shutdown,", 45}, // Trailing comma is intentional. Do NOT use.
{"shutdown,userrequested", 46},
{"reboot,bootloader", 47},
{"reboot,cold", 48},
{"reboot,recovery", 49},
{"thermal_shutdown", 50},
{"s3_wakeup", 51},
{"kernel_panic,sysrq", 52},
{"kernel_panic,NULL", 53},
{"kernel_panic,null", 53},
{"kernel_panic,BUG", 54},
{"kernel_panic,bug", 54},
{"bootloader", 55},
{"cold", 56},
{"hard", 57},
{"warm", 58},
{"reboot,kernel_power_off_charging__reboot_system", 59}, // Can not happen
{"thermal-shutdown", 60},
{"shutdown,thermal", 61},
{"shutdown,battery", 62},
{"reboot,ota", 63},
{"reboot,factory_reset", 64},
{"reboot,", 65},
{"reboot,shell", 66},
{"reboot,adb", 67},
{"reboot,userrequested", 68},
{"shutdown,container", 69}, // Host OS asking Android Container to shutdown
{"cold,powerkey", 70},
{"warm,s3_wakeup", 71},
{"hard,hw_reset", 72},
{"shutdown,suspend", 73}, // Suspend to RAM
{"shutdown,hibernate", 74}, // Suspend to DISK
{"power_on_key", 75}, // aliasReasons to cold,powerkey
{"reboot_by_key", 76}, // translated to reboot,by_key
{"wdt_by_pass_pwk", 77}, // Mediatek
{"reboot_longkey", 78}, // translated to reboot,longkey
{"powerkey", 79}, // aliasReasons to cold,powerkey
{"usb", 80}, // aliasReasons to cold,charger (Mediatek)
{"wdt", 81}, // Mediatek
{"tool_by_pass_pwk", 82}, // aliasReasons to reboot,tool (Mediatek)
{"2sec_reboot", 83}, // aliasReasons to cold,rtc,2sec (Mediatek)
{"reboot,by_key", 84},
{"reboot,longkey", 85},
{"reboot,2sec", 86}, // Deprecate in two years, replaced with cold,rtc,2sec
{"shutdown,thermal,battery", 87},
{"reboot,its_just_so_hard", 88}, // produced by boot_reason_test
{"reboot,Its Just So Hard", 89}, // produced by boot_reason_test
{"reboot,rescueparty", 90},
{"charge", 91},
{"oem_tz_crash", 92},
{"uvlo", 93}, // aliasReasons to reboot,undervoltage
{"oem_ps_hold", 94},
{"abnormal_reset", 95},
{"oemerr_unknown", 96},
{"reboot_fastboot_mode", 97},
{"watchdog_apps_bite", 98},
{"xpu_err", 99},
{"power_on_usb", 100}, // aliasReasons to cold,charger
{"watchdog_rpm", 101},
{"watchdog_nonsec", 102},
{"watchdog_apps_bark", 103},
{"reboot_dmverity_corrupted", 104},
{"reboot_smpl", 105}, // aliasReasons to reboot,powerloss
{"watchdog_sdi_apps_reset", 106},
{"smpl", 107}, // aliasReasons to reboot,powerloss
{"oem_modem_failed_to_powerup", 108},
{"reboot_normal", 109},
{"oem_lpass_cfg", 110},
{"oem_xpu_ns_error", 111},
{"power_key_press", 112}, // aliasReasons to cold,powerkey
{"hardware_reset", 113},
{"reboot_by_powerkey", 114}, // aliasReasons to cold,powerkey (is this correct?)
{"reboot_verity", 115},
{"oem_rpm_undef_error", 116},
{"oem_crash_on_the_lk", 117},
{"oem_rpm_reset", 118},
{"reboot,powerloss", 119},
{"reboot,undervoltage", 120},
{"factory_cable", 121},
{"oem_ar6320_failed_to_powerup", 122},
{"watchdog_rpm_bite", 123},
{"power_on_cable", 124}, // aliasReasons to cold,charger
{"reboot_unknown", 125},
{"wireless_charger", 126},
{"0x776655ff", 127},
{"oem_thermal_bite_reset", 128},
{"charger", 129},
{"pon1", 130},
{"unknown", 131},
{"reboot_rtc", 132},
{"cold_boot", 133},
{"hard_rst", 134},
{"power-on", 135},
{"oem_adsp_resetting_the_soc", 136},
{"kpdpwr", 137},
{"oem_modem_timeout_waiting", 138},
{"usb_chg", 139},
{"warm_reset_0x02", 140},
{"warm_reset_0x80", 141},
{"pon_reason_0xb0", 142},
{"reboot_download", 143},
{"reboot_recovery_mode", 144},
{"oem_sdi_err_fatal", 145},
{"pmic_watchdog", 146},
{"software_master", 147},
{"cold,charger", 148},
{"cold,rtc", 149},
{"cold,rtc,2sec", 150}, // Mediatek
{"reboot,tool", 151}, // Mediatek
{"reboot,wdt", 152}, // Mediatek
{"reboot,unknown", 153}, // Mediatek
{"kernel_panic,audit", 154},
{"kernel_panic,atomic", 155},
{"kernel_panic,hung", 156},
{"kernel_panic,hung,rcu", 157},
{"kernel_panic,init", 158},
{"kernel_panic,oom", 159},
{"kernel_panic,stack", 160},
{"kernel_panic,sysrq,livelock,alarm", 161}, // llkd
{"kernel_panic,sysrq,livelock,driver", 162}, // llkd
{"kernel_panic,sysrq,livelock,zombie", 163}, // llkd
{"kernel_panic,modem", 164},
{"kernel_panic,adsp", 165},
{"kernel_panic,dsps", 166},
{"kernel_panic,wcnss", 167},
{"kernel_panic,_sde_encoder_phys_cmd_handle_ppdone_timeout", 168},
{"recovery,quiescent", 169},
{"reboot,quiescent", 170},
{"reboot,rtc", 171},
{"reboot,dm-verity_device_corrupted", 172},
{"reboot,dm-verity_enforcing", 173},
{"reboot,keys_clear", 174},
{"reboot,pmic_off_fault,.*", 175},
{"reboot,pmic_off_s3rst,.*", 176},
{"reboot,pmic_off_other,.*", 177},
{"reboot,userrequested,fastboot", 178},
{"reboot,userrequested,recovery", 179},
{"reboot,userrequested,recovery,ui", 180},
{"shutdown,userrequested,fastboot", 181},
{"shutdown,userrequested,recovery", 182},
{"reboot,unknown[0-9]*", 183},
{"reboot,longkey,.*", 184},
{"reboot,boringssl-self-check-failed", 185},
{"reboot,userspace_failed,shutdown_aborted", 186},
{"reboot,userspace_failed,watchdog_triggered", 187},
{"reboot,userspace_failed,watchdog_fork", 188},
{"reboot,userspace_failed,*", 189},
{"reboot,mount_userdata_failed", 190},
{"reboot,forcedsilent", 191},
{"reboot,forcednonsilent", 192},
{"reboot,thermal,tj", 193},
{"reboot,emergency", 194},
{"reboot,factory", 195},
{"reboot,fastboot", 196},
{"reboot,gsa,hard", 197},
{"reboot,gsa,soft", 198},
{"reboot,master_dc,fault_n", 199},
{"reboot,master_dc,reset", 200},
{"reboot,ocp", 201},
{"reboot,pin", 202},
{"reboot,rom_recovery", 203},
{"reboot,uvlo", 204},
{"reboot,uvlo,pmic,if", 205},
{"reboot,uvlo,pmic,main", 206},
{"reboot,uvlo,pmic,sub", 207},
{"reboot,warm", 208},
{"watchdog,aoc", 209},
{"watchdog,apc", 210},
{"watchdog,apc,bl,debug,early", 211},
{"watchdog,apc,bl,early", 212},
{"watchdog,apc,early", 213},
{"watchdog,apm", 214},
{"watchdog,gsa,hard", 215},
{"watchdog,gsa,soft", 216},
{"watchdog,pmucal", 217},
{"reboot,early,bl", 218},
{"watchdog,apc,gsa,crashed", 219},
{"watchdog,apc,bl31,crashed", 220},
{"watchdog,apc,pbl,crashed", 221},
{"reboot,memory_protect,hyp", 222},
{"reboot,tsd,pmic,main", 223},
{"reboot,tsd,pmic,sub", 224},
{"reboot,ocp,pmic,main", 225},
{"reboot,ocp,pmic,sub", 226},
{"reboot,sys_ldo_ok,pmic,main", 227},
{"reboot,sys_ldo_ok,pmic,sub", 228},
{"reboot,smpl_timeout,pmic,main", 229},
{"reboot,ota,.*", 230},
{"reboot,periodic,.*", 231},
{"reboot,early,abl", 232},
{"reboot,early,bl2", 233},
{"reboot,longkey,pmic_cold", 234},
{"reboot,longkey,master_dc", 235},
{"reboot,ocp2,pmic,if", 236},
{"reboot,ocp,pmic,if", 237},
{"reboot,fship.*", 238},
{"reboot,ocp,.*", 239},
{"reboot,ntc,pmic,sub", 240},
};
// Converts a string value representing the reason the system booted to an
// integer representation. This is necessary for logging the boot_reason metric
// via Tron, which does not accept non-integer buckets in histograms.
int32_t BootReasonStrToEnum(const std::string& boot_reason) {
auto mapping = kBootReasonMap.find(boot_reason);
if (mapping != kBootReasonMap.end()) {
return mapping->second;
}
if (boot_reason.empty()) {
return kEmptyBootReason;
}
for (const auto& [match, id] : kBootReasonMap) {
// Regex matches as a minimum require either [, \ or * to be present.
if (match.find_first_of("[\\*") == match.npos) continue;
// enforce match from beginning to end
auto exact = match;
if (exact[0] != '^') exact = "^" + exact;
if (exact[exact.size() - 1] != '$') exact = exact + "$";
if (std::regex_search(boot_reason, std::regex(exact))) return id;
}
LOG(INFO) << "Unknown boot reason: " << boot_reason;
return kUnknownBootReason;
}
// Canonical list of supported primary reboot reasons.
const std::vector<std::string> knownReasons = {
// clang-format off
// kernel
"watchdog",
"kernel_panic",
// strong
"recovery", // Should not happen from ro.boot.bootreason
"bootloader", // Should not happen from ro.boot.bootreason
// blunt
"cold",
"hard",
"warm",
// super blunt
"shutdown", // Can not happen from ro.boot.bootreason
"reboot", // Default catch-all for anything unknown
// clang-format on
};
// Returns true if the supplied reason prefix is considered detailed enough.
bool isStrongRebootReason(const std::string& r) {
for (auto& s : knownReasons) {
if (s == "cold") break;
// Prefix defined as terminated by a nul or comma (,).
if (android::base::StartsWith(r, s) && ((r.length() == s.length()) || (r[s.length()] == ','))) {
return true;
}
}
return false;
}
// Returns true if the supplied reason prefix is associated with the kernel.
bool isKernelRebootReason(const std::string& r) {
for (auto& s : knownReasons) {
if (s == "recovery") break;
// Prefix defined as terminated by a nul or comma (,).
if (android::base::StartsWith(r, s) && ((r.length() == s.length()) || (r[s.length()] == ','))) {
return true;
}
}
return false;
}
// Returns true if the supplied reason prefix is considered known.
bool isKnownRebootReason(const std::string& r) {
for (auto& s : knownReasons) {
// Prefix defined as terminated by a nul or comma (,).
if (android::base::StartsWith(r, s) && ((r.length() == s.length()) || (r[s.length()] == ','))) {
return true;
}
}
return false;
}
// If the reboot reason should be improved, report true if is too blunt.
bool isBluntRebootReason(const std::string& r) {
if (isStrongRebootReason(r)) return false;
if (!isKnownRebootReason(r)) return true; // Can not support unknown as detail
size_t pos = 0;
while ((pos = r.find(',', pos)) != std::string::npos) {
++pos;
std::string next(r.substr(pos));
if (next.length() == 0) break;
if (next[0] == ',') continue;
if (!isKnownRebootReason(next)) return false; // Unknown subreason is good.
if (isStrongRebootReason(next)) return false; // eg: reboot,reboot
}
return true;
}
bool readPstoreConsole(std::string& console) {
if (android::base::ReadFileToString("/sys/fs/pstore/console-ramoops-0", &console)) {
return true;
}
return android::base::ReadFileToString("/sys/fs/pstore/console-ramoops", &console);
}
// Implement a variant of std::string::rfind that is resilient to errors in
// the data stream being inspected.
class pstoreConsole {
private:
const size_t kBitErrorRate = 8; // number of bits per error
const std::string& console;
// Number of bits that differ between the two arguments l and r.
// Returns zero if the values for l and r are identical.
size_t numError(uint8_t l, uint8_t r) const { return std::bitset<8>(l ^ r).count(); }
// A string comparison function, reports the number of errors discovered
// in the match to a maximum of the bitLength / kBitErrorRate, at that
// point returning npos to indicate match is too poor.
//
// Since called in rfind which works backwards, expect cache locality will
// help if we check in reverse here as well for performance.
//
// Assumption: l (from console.c_str() + pos) is long enough to house
// _r.length(), checked in rfind caller below.
//
size_t numError(size_t pos, const std::string& _r) const {
const char* l = console.c_str() + pos;
const char* r = _r.c_str();
size_t n = _r.length();
const uint8_t* le = reinterpret_cast<const uint8_t*>(l) + n;
const uint8_t* re = reinterpret_cast<const uint8_t*>(r) + n;
size_t count = 0;
n = 0;
do {
// individual character bit error rate > threshold + slop
size_t num = numError(*--le, *--re);
if (num > ((8 + kBitErrorRate) / kBitErrorRate)) return std::string::npos;
// total bit error rate > threshold + slop
count += num;
++n;
if (count > ((n * 8 + kBitErrorRate - (n > 2)) / kBitErrorRate)) {
return std::string::npos;
}
} while (le != reinterpret_cast<const uint8_t*>(l));
return count;
}
public:
explicit pstoreConsole(const std::string& console) : console(console) {}
// scope of argument must be equal to or greater than scope of pstoreConsole
explicit pstoreConsole(const std::string&& console) = delete;
explicit pstoreConsole(std::string&& console) = delete;
// Our implementation of rfind, use exact match first, then resort to fuzzy.
size_t rfind(const std::string& needle) const {
size_t pos = console.rfind(needle); // exact match?
if (pos != std::string::npos) return pos;
// Check to make sure needle fits in console string.
pos = console.length();
if (needle.length() > pos) return std::string::npos;
pos -= needle.length();
// fuzzy match to maximum kBitErrorRate
for (;;) {
if (numError(pos, needle) != std::string::npos) return pos;
if (pos == 0) break;
--pos;
}
return std::string::npos;
}
// Our implementation of find, use only fuzzy match.
size_t find(const std::string& needle, size_t start = 0) const {
// Check to make sure needle fits in console string.
if (needle.length() > console.length()) return std::string::npos;
const size_t last_pos = console.length() - needle.length();
// fuzzy match to maximum kBitErrorRate
for (size_t pos = start; pos <= last_pos; ++pos) {
if (numError(pos, needle) != std::string::npos) return pos;
}
return std::string::npos;
}
operator const std::string&() const { return console; }
};
// If bit error match to needle, correct it.
// Return true if any corrections were discovered and applied.
bool correctForBitError(std::string& reason, const std::string& needle) {
bool corrected = false;
if (reason.length() < needle.length()) return corrected;
const pstoreConsole console(reason);
const size_t last_pos = reason.length() - needle.length();
for (size_t pos = 0; pos <= last_pos; pos += needle.length()) {
pos = console.find(needle, pos);
if (pos == std::string::npos) break;
// exact match has no malice
if (needle == reason.substr(pos, needle.length())) continue;
corrected = true;
reason = reason.substr(0, pos) + needle + reason.substr(pos + needle.length());
}
return corrected;
}
// If bit error match to needle, correct it.
// Return true if any corrections were discovered and applied.
// Try again if we can replace underline with spaces.
bool correctForBitErrorOrUnderline(std::string& reason, const std::string& needle) {
bool corrected = correctForBitError(reason, needle);
std::string _needle(needle);
std::transform(_needle.begin(), _needle.end(), _needle.begin(),
[](char c) { return (c == '_') ? ' ' : c; });
if (needle != _needle) {
corrected |= correctForBitError(reason, _needle);
}
return corrected;
}
// Converts a string value representing the reason the system booted to a
// string complying with Android system standard reason.
void transformReason(std::string& reason) {
std::transform(reason.begin(), reason.end(), reason.begin(), ::tolower);
std::transform(reason.begin(), reason.end(), reason.begin(),
[](char c) { return ::isblank(c) ? '_' : c; });
std::transform(reason.begin(), reason.end(), reason.begin(),
[](char c) { return ::isprint(c) ? c : '?'; });
}
// Check subreasons for reboot,<subreason> kernel_panic,sysrq,<subreason> or
// kernel_panic,<subreason>.
//
// If quoted flag is set, pull out and correct single quoted ('), newline (\n)
// or unprintable character terminated subreason, pos is supplied just beyond
// first quote. if quoted false, pull out and correct newline (\n) or
// unprintable character terminated subreason.
//
// Heuristics to find termination is painted into a corner:
// single bit error for quote ' that we can block. It is acceptable for
// the others 7, g in reason. 2/9 chance will miss the terminating quote,
// but there is always the terminating newline that usually immediately
// follows to fortify our chances.
bool likely_single_quote(char c) {
switch (static_cast<uint8_t>(c)) {
case '\'': // '\''
case '\'' ^ 0x01: // '&'
case '\'' ^ 0x02: // '%'
case '\'' ^ 0x04: // '#'
case '\'' ^ 0x08: // '/'
return true;
case '\'' ^ 0x10: // '7'
break;
case '\'' ^ 0x20: // '\a' (unprintable)
return true;
case '\'' ^ 0x40: // 'g'
break;
case '\'' ^ 0x80: // 0xA7 (unprintable)
return true;
}
return false;
}
// ::isprint(c) and likely_space() will prevent us from being called for
// fundamentally printable entries, except for '\r' and '\b'.
//
// Except for * and J, single bit errors for \n, all others are non-
// printable so easy catch. It is _acceptable_ for *, J or j to exist in
// the reason string, so 2/9 chance we will miss the terminating newline.
//
// NB: J might not be acceptable, except if at the beginning or preceded
// with a space, '(' or any of the quotes and their BER aliases.
// NB: * might not be acceptable, except if at the beginning or preceded
// with a space, another *, or any of the quotes or their BER aliases.
//
// To reduce the chances to closer to 1/9 is too complicated for the gain.
bool likely_newline(char c) {
switch (static_cast<uint8_t>(c)) {
case '\n': // '\n' (unprintable)
case '\n' ^ 0x01: // '\r' (unprintable)
case '\n' ^ 0x02: // '\b' (unprintable)
case '\n' ^ 0x04: // 0x0E (unprintable)
case '\n' ^ 0x08: // 0x02 (unprintable)
case '\n' ^ 0x10: // 0x1A (unprintable)
return true;
case '\n' ^ 0x20: // '*'
case '\n' ^ 0x40: // 'J'
break;
case '\n' ^ 0x80: // 0x8A (unprintable)
return true;
}
return false;
}
// ::isprint(c) will prevent us from being called for all the printable
// matches below. If we let unprintables through because of this, they
// get converted to underscore (_) by the validation phase.
bool likely_space(char c) {
switch (static_cast<uint8_t>(c)) {
case ' ': // ' '
case ' ' ^ 0x01: // '!'
case ' ' ^ 0x02: // '"'
case ' ' ^ 0x04: // '$'
case ' ' ^ 0x08: // '('
case ' ' ^ 0x10: // '0'
case ' ' ^ 0x20: // '\0' (unprintable)
case ' ' ^ 0x40: // 'P'
case ' ' ^ 0x80: // 0xA0 (unprintable)
case '\t': // '\t'
case '\t' ^ 0x01: // '\b' (unprintable) (likely_newline counters)
case '\t' ^ 0x02: // '\v' (unprintable)
case '\t' ^ 0x04: // '\r' (unprintable) (likely_newline counters)
case '\t' ^ 0x08: // 0x01 (unprintable)
case '\t' ^ 0x10: // 0x19 (unprintable)
case '\t' ^ 0x20: // ')'
case '\t' ^ 0x40: // '1'
case '\t' ^ 0x80: // 0x89 (unprintable)
return true;
}
return false;
}
std::string getSubreason(const std::string& content, size_t pos, bool quoted) {
static constexpr size_t max_reason_length = 256;
std::string subReason(content.substr(pos, max_reason_length));
// Correct against any known strings that Bit Error Match
for (const auto& s : knownReasons) {
correctForBitErrorOrUnderline(subReason, s);
}
std::string terminator(quoted ? "'" : "");
for (const auto& m : kBootReasonMap) {
if (m.first.length() <= strlen("cold")) continue; // too short?
if (correctForBitErrorOrUnderline(subReason, m.first + terminator)) continue;
if (m.first.length() <= strlen("reboot,cold")) continue; // short?
if (android::base::StartsWith(m.first, "reboot,")) {
correctForBitErrorOrUnderline(subReason, m.first.substr(strlen("reboot,")) + terminator);
} else if (android::base::StartsWith(m.first, "kernel_panic,sysrq,")) {
correctForBitErrorOrUnderline(subReason,
m.first.substr(strlen("kernel_panic,sysrq,")) + terminator);
} else if (android::base::StartsWith(m.first, "kernel_panic,")) {
correctForBitErrorOrUnderline(subReason, m.first.substr(strlen("kernel_panic,")) + terminator);
}
}
for (pos = 0; pos < subReason.length(); ++pos) {
char c = subReason[pos];
if (!(::isprint(c) || likely_space(c)) || likely_newline(c) ||
(quoted && likely_single_quote(c))) {
subReason.erase(pos);
break;
}
}
transformReason(subReason);
return subReason;
}
void addKernelPanicSubReason(const pstoreConsole& console, std::string& ret) {
// Check for kernel panic types to refine information
if ((console.rfind("SysRq : Trigger a crash") != std::string::npos) ||
(console.rfind("PC is at sysrq_handle_crash+") != std::string::npos)) {
ret = "kernel_panic,sysrq";
// Invented for Android to allow daemons that specifically trigger sysrq
// to communicate more accurate boot subreasons via last console messages.
static constexpr char sysrqSubreason[] = "SysRq : Trigger a crash : '";
auto pos = console.rfind(sysrqSubreason);
if (pos != std::string::npos) {
ret += "," + getSubreason(console, pos + strlen(sysrqSubreason), /* quoted */ true);
}
return;
}
if (console.rfind("Unable to handle kernel NULL pointer dereference at virtual address") !=
std::string::npos) {
ret = "kernel_panic,null";
return;
}
if (console.rfind("Kernel BUG at ") != std::string::npos) {
ret = "kernel_panic,bug";
return;
}
std::string panic("Kernel panic - not syncing: ");
auto pos = console.rfind(panic);
if (pos == std::string::npos) return;
static const std::vector<std::pair<const std::string, const std::string>> panicReasons = {
{"Out of memory", "oom"},
{"out of memory", "oom"},
{"Oh boy, that early out of memory", "oom"}, // omg
{"BUG!", "bug"},
{"hung_task: blocked tasks", "hung"},
{"audit: ", "audit"},
{"scheduling while atomic", "atomic"},
{"Attempted to kill init!", "init"},
{"Requested init", "init"},
{"No working init", "init"},
{"Could not decompress init", "init"},
{"RCU Stall", "hung,rcu"},
{"stack-protector", "stack"},
{"kernel stack overflow", "stack"},
{"Corrupt kernel stack", "stack"},
{"low stack detected", "stack"},
{"corrupted stack end", "stack"},
{"subsys-restart: Resetting the SoC - modem crashed.", "modem"},
{"subsys-restart: Resetting the SoC - adsp crashed.", "adsp"},
{"subsys-restart: Resetting the SoC - dsps crashed.", "dsps"},
{"subsys-restart: Resetting the SoC - wcnss crashed.", "wcnss"},
};
ret = "kernel_panic";
for (auto& s : panicReasons) {
if (console.find(panic + s.first, pos) != std::string::npos) {
ret += "," + s.second;
return;
}
}
auto reason = getSubreason(console, pos + panic.length(), /* newline */ false);
if (reason.length() > 3) {
ret += "," + reason;
}
}
void addKernelPanicSubReason(const std::string& content, std::string& ret) {
addKernelPanicSubReason(pstoreConsole(content), ret);
}
const char system_reboot_reason_property[] = "sys.boot.reason";
const char last_reboot_reason_property[] = LAST_REBOOT_REASON_PROPERTY;
const char last_reboot_reason_file[] = LAST_REBOOT_REASON_FILE;
const char last_last_reboot_reason_property[] = "sys.boot.reason.last";
constexpr size_t history_reboot_reason_size = 4;
const char history_reboot_reason_property[] = LAST_REBOOT_REASON_PROPERTY ".history";
const char bootloader_reboot_reason_property[] = "ro.boot.bootreason";
// Land system_boot_reason into system_reboot_reason_property.
// Shift system_boot_reason into history_reboot_reason_property.
void BootReasonAddToHistory(const std::string& system_boot_reason) {
if (system_boot_reason.empty()) return;
LOG(INFO) << "Canonical boot reason: " << system_boot_reason;
// skip system_boot_reason(factory_reset, ota) shift since device boot up from shipmode
const auto bootloader_boot_reason =
android::base::GetProperty(bootloader_reboot_reason_property, "");
const char reg_fship[] = ".*fship.*";
if (std::regex_search(bootloader_boot_reason, std::regex(reg_fship)) != 0) {
if (system_boot_reason == "reboot,factory_reset" || system_boot_reason == "reboot,ota") {
LOG(INFO) << "skip boot reason (" << system_boot_reason
<< ") shift since device boot up from shipmode.";
return;
}
}
auto old_system_boot_reason = android::base::GetProperty(system_reboot_reason_property, "");
if (!android::base::SetProperty(system_reboot_reason_property, system_boot_reason)) {
android::base::SetProperty(system_reboot_reason_property,
system_boot_reason.substr(0, PROPERTY_VALUE_MAX - 1));
}
auto reason_history =
android::base::Split(android::base::GetProperty(history_reboot_reason_property, ""), "\n");
static auto mark = time(nullptr);
auto mark_str = std::string(",") + std::to_string(mark);
auto marked_system_boot_reason = system_boot_reason + mark_str;
if (!reason_history.empty()) {
// delete any entries that we just wrote in a previous
// call and leveraging duplicate line handling
auto last = old_system_boot_reason + mark_str;
// trim the list to (history_reboot_reason_size - 1)
ssize_t max = history_reboot_reason_size;
for (auto it = reason_history.begin(); it != reason_history.end();) {
if (it->empty() || (last == *it) || (marked_system_boot_reason == *it) || (--max <= 0)) {
it = reason_history.erase(it);
} else {
last = *it;
++it;
}
}
}
// insert at the front, concatenating mark (<epoch time>) detail to the value.
reason_history.insert(reason_history.begin(), marked_system_boot_reason);
// If the property string is too long ( > PROPERTY_VALUE_MAX)
// we get an error, so trim out last entry and try again.
while (!android::base::SetProperty(history_reboot_reason_property,
android::base::Join(reason_history, '\n'))) {
auto it = std::prev(reason_history.end());
if (it == reason_history.end()) break;
reason_history.erase(it);
}
}
// Scrub, Sanitize, Standardize and Enhance the boot reason string supplied.
std::string BootReasonStrToReason(const std::string& boot_reason) {
auto ret = android::base::GetProperty(system_reboot_reason_property, "");
std::string reason(boot_reason);
// skip BootReasonStrToReason() if device boot up from shipmode
const char reg_fship[] = ".*fship.*";
if (reason == ret && std::regex_search(reason, std::regex(reg_fship)) != 0) {
LOG(INFO) << "skip boot reason enhancement if device boot up from shipmode";
return ret;
}
// If sys.boot.reason == ro.boot.bootreason, let's re-evaluate
if (reason == ret) ret = "";
transformReason(reason);
// Is the current system boot reason sys.boot.reason valid?
if (!isKnownRebootReason(ret)) ret = "";
if (ret == "") {
// Is the bootloader boot reason ro.boot.bootreason known?
std::vector<std::string> words(android::base::Split(reason, ",_-"));
for (auto& s : knownReasons) {
std::string blunt;
for (auto& r : words) {
if (r == s) {
if (isBluntRebootReason(s)) {
blunt = s;
} else {
ret = s;
break;
}
}
}
if (ret == "") ret = blunt;
if (ret != "") break;
}
}
if (ret == "") {
// A series of checks to take some officially unsupported reasons
// reported by the bootloader and find some logical and canonical
// sense. In an ideal world, we would require those bootloaders
// to behave and follow our CTS standards.
//
// first member is the output
// second member is an unanchored regex for an alias
//
// If output has a prefix of <bang> '!', we do not use it as a
// match needle (and drop the <bang> prefix when landing in output),
// otherwise look for it as well. This helps keep the scale of the
// following table smaller.
static const std::vector<std::pair<const std::string, const std::string>> aliasReasons = {
{"watchdog", "wdog"},
{"kernel_panic", "panic"},
{"shutdown,thermal", "thermal"},
{"warm,s3_wakeup", "s3_wakeup"},
{"hard,hw_reset", "hw_reset"},
{"cold,charger", "usb|power_on_cable"},
{"cold,powerkey", "powerkey|power_key|PowerKey|power_on"},
{"cold,rtc", "rtc"},
{"cold,rtc,2sec", "2sec_reboot"},
{"!warm", "wdt_by_pass_pwk"}, // change flavour of blunt
{"!reboot", "^wdt$"}, // change flavour of blunt
{"reboot,tool", "tool_by_pass_pwk"},
{"!reboot,longkey", "reboot_longkey"},
{"!reboot,longkey", "kpdpwr"},
{"!reboot,undervoltage", "uvlo"},
{"!reboot,powerloss", "smpl"},
{"bootloader", ""},
};
for (auto& s : aliasReasons) {
size_t firstHasNot = s.first[0] == '!';
if (!firstHasNot && (reason.find(s.first) != std::string::npos)) {
ret = s.first;
break;
}
if (s.second.size() && std::regex_search(reason, std::regex(s.second))) {
ret = s.first.substr(firstHasNot);
break;
}
}
}
// If watchdog is the reason, see if there is a security angle?
if (ret == "watchdog") {
if (reason.find("sec") != std::string::npos) {
ret += ",security";
}
}
if (ret == "kernel_panic") {
// Check to see if last klog has some refinement hints.
std::string content;
if (readPstoreConsole(content)) {
addKernelPanicSubReason(content, ret);
}
} else if (isBluntRebootReason(ret)) {
// Check the other available reason resources if the reason is still blunt.
// Check to see if last klog has some refinement hints.
std::string content;
if (readPstoreConsole(content)) {
const pstoreConsole console(content);
// The toybox reboot command used directly (unlikely)? But also
// catches init's response to Android's more controlled reboot command.
if (console.rfind("reboot: Power down") != std::string::npos) {
ret = "shutdown"; // Still too blunt, but more accurate.
// ToDo: init should record the shutdown reason to kernel messages ala:
// init: shutdown system with command 'last_reboot_reason'
// so that if pstore has persistence we can get some details
// that could be missing in last_reboot_reason_property.
}
static const char cmd[] = "reboot: Restarting system with command '";
size_t pos = console.rfind(cmd);
if (pos != std::string::npos) {
std::string subReason(getSubreason(content, pos + strlen(cmd), /* quoted */ true));
if (subReason != "") { // Will not land "reboot" as that is too blunt.
if (isKernelRebootReason(subReason)) {
ret = "reboot," + subReason; // User space can't talk kernel reasons.
} else if (isKnownRebootReason(subReason)) {
ret = subReason;
} else {
ret = "reboot," + subReason; // legitimize unknown reasons
}
}
// Some bootloaders shutdown results record in last kernel message.
if (!strcmp(ret.c_str(), "reboot,kernel_power_off_charging__reboot_system")) {
ret = "shutdown";
}
}
// Check for kernel panics, allowed to override reboot command.
(void)addKernelPanicSubReason(console, ret);
}
// TODO: use the HAL to get battery level (http://b/77725702).
// Is there a controlled shutdown hint in last_reboot_reason_property?
if (isBluntRebootReason(ret)) {
// Content buffer no longer will have console data. Beware if more
// checks added below, that depend on parsing console content.
if (!android::base::ReadFileToString(last_reboot_reason_file, &content)) {
content = android::base::GetProperty(last_reboot_reason_property, "");
}
transformReason(content);
// Anything in last is better than 'super-blunt' reboot or shutdown.
if ((ret == "") || (ret == "reboot") || (ret == "shutdown") || !isBluntRebootReason(content)) {
ret = content;
}
}
// Other System Health HAL reasons?
// ToDo: /proc/sys/kernel/boot_reason needs a HAL interface to
// possibly offer hardware-specific clues from the PMIC.
}
// If unknown left over from above, make it "reboot,<boot_reason>"
if (ret == "") {
ret = "reboot";
if (android::base::StartsWith(reason, "reboot")) {
reason = reason.substr(strlen("reboot"));
while ((reason[0] == ',') || (reason[0] == '_')) {
reason = reason.substr(1);
}
}
if (reason != "") {
ret += ",";
ret += reason;
}
}
LOG(INFO) << "Canonical boot reason: " << ret;
return ret;
}
// Returns the appropriate metric key prefix for the boot_complete metric such
// that boot metrics after a system update are labeled as ota_boot_complete;
// otherwise, they are labeled as boot_complete. This method encapsulates the
// bookkeeping required to track when a system update has occurred by storing
// the UTC timestamp of the system build date and comparing against the current
// system build date.
std::string CalculateBootCompletePrefix() {
static const std::string kBuildDateKey = "build_date";
std::string boot_complete_prefix = "boot_complete";
auto build_date_str = android::base::GetProperty("ro.build.date.utc", "");
int32_t build_date;
if (!android::base::ParseInt(build_date_str, &build_date)) {
return std::string();
}
BootEventRecordStore boot_event_store;
BootEventRecordStore::BootEventRecord record;
if (!boot_event_store.GetBootEvent(kBuildDateKey, &record)) {
boot_complete_prefix = "factory_reset_" + boot_complete_prefix;
boot_event_store.AddBootEventWithValue(kBuildDateKey, build_date);
BootReasonAddToHistory("reboot,factory_reset");
} else if (build_date != record.second) {
boot_complete_prefix = "ota_" + boot_complete_prefix;
boot_event_store.AddBootEventWithValue(kBuildDateKey, build_date);
BootReasonAddToHistory("reboot,ota");
}
return boot_complete_prefix;
}
// Records the value of a given ro.boottime.init property in milliseconds.
void RecordInitBootTimeProp(BootEventRecordStore* boot_event_store, const char* property) {
auto value = android::base::GetProperty(property, "");
int32_t time_in_ms;
if (android::base::ParseInt(value, &time_in_ms)) {
boot_event_store->AddBootEventWithValue(property, time_in_ms);
}
}
// A map from bootloader timing stage to the time that stage took during boot.
typedef std::map<std::string, int32_t> BootloaderTimingMap;
// Returns a mapping from bootloader stage names to the time those stages
// took to boot.
const BootloaderTimingMap GetBootLoaderTimings() {
BootloaderTimingMap timings;
// |ro.boot.boottime| is of the form 'stage1:time1,...,stageN:timeN',
// where timeN is in milliseconds.
auto value = android::base::GetProperty("ro.boot.boottime", "");
if (value.empty()) {
// ro.boot.boottime is not reported on all devices.
return BootloaderTimingMap();
}
auto stages = android::base::Split(value, ",");
for (const auto& stageTiming : stages) {
// |stageTiming| is of the form 'stage:time'.
auto stageTimingValues = android::base::Split(stageTiming, ":");
DCHECK_EQ(2U, stageTimingValues.size());
if (stageTimingValues.size() < 2) continue;
std::string stageName = stageTimingValues[0];
int32_t time_ms;
if (android::base::ParseInt(stageTimingValues[1], &time_ms)) {
timings[stageName] = time_ms;
}
}
return timings;
}
// Returns the total bootloader boot time from the ro.boot.boottime system property.
int32_t GetBootloaderTime(const BootloaderTimingMap& bootloader_timings) {
int32_t total_time = 0;
for (const auto& timing : bootloader_timings) {
total_time += timing.second;
}
return total_time;
}
// Parses and records the set of bootloader stages and associated boot times
// from the ro.boot.boottime system property.
void RecordBootloaderTimings(BootEventRecordStore* boot_event_store,
const BootloaderTimingMap& bootloader_timings) {
int32_t total_time = 0;
for (const auto& timing : bootloader_timings) {
total_time += timing.second;
boot_event_store->AddBootEventWithValue("boottime.bootloader." + timing.first, timing.second);
}
boot_event_store->AddBootEventWithValue("boottime.bootloader.total", total_time);
}
// Returns the closest estimation to the absolute device boot time, i.e.,
// from power on to boot_complete, including bootloader times.
std::chrono::milliseconds GetAbsoluteBootTime(const BootloaderTimingMap& bootloader_timings,
std::chrono::milliseconds uptime) {
int32_t bootloader_time_ms = 0;
for (const auto& timing : bootloader_timings) {
if (timing.first.compare("SW") != 0) {
bootloader_time_ms += timing.second;
}
}
auto bootloader_duration = std::chrono::milliseconds(bootloader_time_ms);
return bootloader_duration + uptime;
}
// Records the closest estimation to the absolute device boot time in seconds.
// i.e. from power on to boot_complete, including bootloader times.
void RecordAbsoluteBootTime(BootEventRecordStore* boot_event_store,
std::chrono::milliseconds absolute_total) {
auto absolute_total_sec = std::chrono::duration_cast<std::chrono::seconds>(absolute_total);
boot_event_store->AddBootEventWithValue("absolute_boot_time", absolute_total_sec.count());
}
// Logs the total boot time and reason to statsd.
void LogBootInfoToStatsd(std::chrono::milliseconds end_time,
std::chrono::milliseconds total_duration, int32_t bootloader_duration_ms,
double time_since_last_boot_sec) {
auto reason = android::base::GetProperty(bootloader_reboot_reason_property, "<EMPTY>");
auto system_reason = android::base::GetProperty(system_reboot_reason_property, "<EMPTY>");
android::util::stats_write(android::util::BOOT_SEQUENCE_REPORTED, reason.c_str(),
system_reason.c_str(), end_time.count(), total_duration.count(),
(int64_t)bootloader_duration_ms,
(int64_t)time_since_last_boot_sec * 1000);
}
void SetSystemBootReason() {
const auto bootloader_boot_reason =
android::base::GetProperty(bootloader_reboot_reason_property, "");
const std::string system_boot_reason(BootReasonStrToReason(bootloader_boot_reason));
// Record the scrubbed system_boot_reason to the property
BootReasonAddToHistory(system_boot_reason);
// Shift last_reboot_reason_property to last_last_reboot_reason_property
std::string last_boot_reason;
if (!android::base::ReadFileToString(last_reboot_reason_file, &last_boot_reason)) {
PLOG(ERROR) << "Failed to read " << last_reboot_reason_file;
last_boot_reason = android::base::GetProperty(last_reboot_reason_property, "");
LOG(INFO) << "Value of " << last_reboot_reason_property << " : " << last_boot_reason;
} else {
LOG(INFO) << "Last reboot reason read from " << last_reboot_reason_file << " : "
<< last_boot_reason << ". Last reboot reason read from "
<< last_reboot_reason_property << " : "
<< android::base::GetProperty(last_reboot_reason_property, "");
}
if (last_boot_reason.empty() || isKernelRebootReason(system_boot_reason)) {
last_boot_reason = system_boot_reason;
} else {
transformReason(last_boot_reason);
}
LOG(INFO) << "Normalized last reboot reason : " << last_boot_reason;
android::base::SetProperty(last_last_reboot_reason_property, last_boot_reason);
android::base::SetProperty(last_reboot_reason_property, "");
if (unlink(last_reboot_reason_file) != 0) {
PLOG(ERROR) << "Failed to unlink " << last_reboot_reason_file;
}
}
// Gets the boot time offset. This is useful when Android is running in a
// container, because the boot_clock is not reset when Android reboots.
std::chrono::nanoseconds GetBootTimeOffset() {
static const int64_t boottime_offset =
android::base::GetIntProperty<int64_t>("ro.boot.boottime_offset", 0);
return std::chrono::nanoseconds(boottime_offset);
}
// Returns the current uptime, accounting for any offset in the CLOCK_BOOTTIME
// clock.
android::base::boot_clock::duration GetUptime() {
return android::base::boot_clock::now().time_since_epoch() - GetBootTimeOffset();
}
// Records several metrics related to the time it takes to boot the device.
void RecordBootComplete() {
BootEventRecordStore boot_event_store;
BootEventRecordStore::BootEventRecord record;
auto uptime_ns = GetUptime();
auto uptime_s = std::chrono::duration_cast<std::chrono::seconds>(uptime_ns);
time_t current_time_utc = time(nullptr);
time_t time_since_last_boot = 0;
if (boot_event_store.GetBootEvent("last_boot_time_utc", &record)) {
time_t last_boot_time_utc = record.second;
time_since_last_boot = difftime(current_time_utc, last_boot_time_utc);
boot_event_store.AddBootEventWithValue("time_since_last_boot", time_since_last_boot);
}
boot_event_store.AddBootEventWithValue("last_boot_time_utc", current_time_utc);
// The boot_complete metric has two variants: boot_complete and
// ota_boot_complete. The latter signifies that the device is booting after
// a system update.
std::string boot_complete_prefix = CalculateBootCompletePrefix();
if (boot_complete_prefix.empty()) {
// The system is hosed because the build date property could not be read.
return;
}
// The *_no_encryption events are emitted unconditionally, since they are left
// over from a time when encryption meant "full-disk encryption". But Android
// now always uses file-based encryption instead of full-disk encryption. At
// some point, these misleading and redundant events should be removed.
boot_event_store.AddBootEventWithValue(boot_complete_prefix + "_no_encryption",
uptime_s.count());
// Record the total time from device startup to boot complete. Note: we are
// recording seconds here even though the field in statsd atom specifies
// milliseconds.
boot_event_store.AddBootEventWithValue(boot_complete_prefix, uptime_s.count());
RecordInitBootTimeProp(&boot_event_store, "ro.boottime.init");
RecordInitBootTimeProp(&boot_event_store, "ro.boottime.init.first_stage");
RecordInitBootTimeProp(&boot_event_store, "ro.boottime.init.selinux");
RecordInitBootTimeProp(&boot_event_store, "ro.boottime.init.cold_boot_wait");
const BootloaderTimingMap bootloader_timings = GetBootLoaderTimings();
int32_t bootloader_boot_duration = GetBootloaderTime(bootloader_timings);
RecordBootloaderTimings(&boot_event_store, bootloader_timings);
auto uptime_ms = std::chrono::duration_cast<std::chrono::milliseconds>(uptime_ns);
auto absolute_boot_time = GetAbsoluteBootTime(bootloader_timings, uptime_ms);
RecordAbsoluteBootTime(&boot_event_store, absolute_boot_time);
auto boot_end_time_point = std::chrono::system_clock::now().time_since_epoch();
auto boot_end_time = std::chrono::duration_cast<std::chrono::milliseconds>(boot_end_time_point);
LogBootInfoToStatsd(boot_end_time, absolute_boot_time, bootloader_boot_duration,
time_since_last_boot);
}
// Records the boot_reason metric by querying the ro.boot.bootreason system
// property.
void RecordBootReason() {
const auto reason = android::base::GetProperty(bootloader_reboot_reason_property, "");
if (reason.empty()) {
// TODO(b/148575354): Replace with statsd.
// Log an empty boot reason value as '<EMPTY>' to ensure the value is intentional
// (and not corruption anywhere else in the reporting pipeline).
// android::metricslogger::LogMultiAction(android::metricslogger::ACTION_BOOT,
// android::metricslogger::FIELD_PLATFORM_REASON,
// "<EMPTY>");
} else {
// TODO(b/148575354): Replace with statsd.
// android::metricslogger::LogMultiAction(android::metricslogger::ACTION_BOOT,
// android::metricslogger::FIELD_PLATFORM_REASON,
// reason);
}
// Log the raw bootloader_boot_reason property value.
int32_t boot_reason = BootReasonStrToEnum(reason);
BootEventRecordStore boot_event_store;
boot_event_store.AddBootEventWithValue("boot_reason", boot_reason);
// Log the scrubbed system_boot_reason.
const auto system_reason = android::base::GetProperty(system_reboot_reason_property, "");
int32_t system_boot_reason = BootReasonStrToEnum(system_reason);
boot_event_store.AddBootEventWithValue("system_boot_reason", system_boot_reason);
if (reason == "") {
android::base::SetProperty(bootloader_reboot_reason_property, system_reason);
}
}
// Records two metrics related to the user resetting a device: the time at
// which the device is reset, and the time since the user last reset the
// device. The former is only set once per-factory reset.
void RecordFactoryReset() {
BootEventRecordStore boot_event_store;
BootEventRecordStore::BootEventRecord record;
time_t current_time_utc = time(nullptr);
if (current_time_utc < 0) {
// UMA does not display negative values in buckets, so convert to positive.
// Logging via BootEventRecordStore.
android::util::stats_write(
static_cast<int32_t>(android::util::BOOT_TIME_EVENT_ERROR_CODE_REPORTED),
static_cast<int32_t>(
android::util::BOOT_TIME_EVENT_ERROR_CODE__EVENT__FACTORY_RESET_CURRENT_TIME_FAILURE),
static_cast<int32_t>(std::abs(current_time_utc)));
// Logging via BootEventRecordStore to see if using android::metricslogger::LogHistogram
// is losing records somehow.
boot_event_store.AddBootEventWithValue("factory_reset_current_time_failure",
std::abs(current_time_utc));
return;
} else {
android::util::stats_write(
static_cast<int32_t>(android::util::BOOT_TIME_EVENT_UTC_TIME_REPORTED),
static_cast<int32_t>(
android::util::BOOT_TIME_EVENT_UTC_TIME__EVENT__FACTORY_RESET_CURRENT_TIME),
static_cast<int64_t>(current_time_utc));
// Logging via BootEventRecordStore to see if using android::metricslogger::LogHistogram
// is losing records somehow.
boot_event_store.AddBootEventWithValue("factory_reset_current_time", current_time_utc);
}
// The factory_reset boot event does not exist after the device is reset, so
// use this signal to mark the time of the factory reset.
if (!boot_event_store.GetBootEvent("factory_reset", &record)) {
boot_event_store.AddBootEventWithValue("factory_reset", current_time_utc);
// Don't log the time_since_factory_reset until some time has elapsed.
// The data is not meaningful yet and skews the histogram buckets.
return;
}
// Calculate and record the difference in time between now and the
// factory_reset time.
time_t factory_reset_utc = record.second;
android::util::stats_write(
static_cast<int32_t>(android::util::BOOT_TIME_EVENT_UTC_TIME_REPORTED),
static_cast<int32_t>(
android::util::BOOT_TIME_EVENT_UTC_TIME__EVENT__FACTORY_RESET_RECORD_VALUE),
static_cast<int64_t>(factory_reset_utc));
// Logging via BootEventRecordStore to see if using android::metricslogger::LogHistogram
// is losing records somehow.
boot_event_store.AddBootEventWithValue("factory_reset_record_value", factory_reset_utc);
time_t time_since_factory_reset = difftime(current_time_utc, factory_reset_utc);
boot_event_store.AddBootEventWithValue("time_since_factory_reset", time_since_factory_reset);
}
// List the associated boot reason(s), if arg is nullptr then all.
void PrintBootReasonEnum(const char* arg) {
int value = -1;
if (arg != nullptr) {
value = BootReasonStrToEnum(arg);
}
for (const auto& [match, id] : kBootReasonMap) {
if ((value < 0) || (value == id)) {
printf("%u\t%s\n", id, match.c_str());
}
}
}
} // namespace
int main(int argc, char** argv) {
android::base::InitLogging(argv);
const std::string cmd_line = GetCommandLine(argc, argv);
LOG(INFO) << "Service started: " << cmd_line;
int option_index = 0;
static const char value_str[] = "value";
static const char system_boot_reason_str[] = "set_system_boot_reason";
static const char boot_complete_str[] = "record_boot_complete";
static const char boot_reason_str[] = "record_boot_reason";
static const char factory_reset_str[] = "record_time_since_factory_reset";
static const char boot_reason_enum_str[] = "boot_reason_enum";
static const struct option long_options[] = {
// clang-format off
{ "help", no_argument, NULL, 'h' },
{ "log", no_argument, NULL, 'l' },
{ "print", no_argument, NULL, 'p' },
{ "record", required_argument, NULL, 'r' },
{ value_str, required_argument, NULL, 0 },
{ system_boot_reason_str, no_argument, NULL, 0 },
{ boot_complete_str, no_argument, NULL, 0 },
{ boot_reason_str, no_argument, NULL, 0 },
{ factory_reset_str, no_argument, NULL, 0 },
{ boot_reason_enum_str, optional_argument, NULL, 0 },
{ NULL, 0, NULL, 0 }
// clang-format on
};
std::string boot_event;
std::string value;
int opt = 0;
while ((opt = getopt_long(argc, argv, "hlpr:", long_options, &option_index)) != -1) {
switch (opt) {
// This case handles long options which have no single-character mapping.
case 0: {
const std::string option_name = long_options[option_index].name;
if (option_name == value_str) {
// |optarg| is an external variable set by getopt representing
// the option argument.
value = optarg;
} else if (option_name == system_boot_reason_str) {
SetSystemBootReason();
} else if (option_name == boot_complete_str) {
RecordBootComplete();
} else if (option_name == boot_reason_str) {
RecordBootReason();
} else if (option_name == factory_reset_str) {
RecordFactoryReset();
} else if (option_name == boot_reason_enum_str) {
PrintBootReasonEnum(optarg);
} else {
LOG(ERROR) << "Invalid option: " << option_name;
}
break;
}
case 'h': {
ShowHelp(argv[0]);
break;
}
case 'l': {
LogBootEvents();
break;
}
case 'p': {
PrintBootEvents();
break;
}
case 'r': {
// |optarg| is an external variable set by getopt representing
// the option argument.
boot_event = optarg;
break;
}
default: {
DCHECK_EQ(opt, '?');
// |optopt| is an external variable set by getopt representing
// the value of the invalid option.
LOG(ERROR) << "Invalid option: " << optopt;
ShowHelp(argv[0]);
return EXIT_FAILURE;
}
}
}
if (!boot_event.empty()) {
RecordBootEventFromCommandLine(boot_event, value);
}
return 0;
}
================================================
FILE: bootstat/bootstat.rc
================================================
# This file is the LOCAL_INIT_RC file for the bootstat command.
# Mirror bootloader boot reason to system boot reason
# ro.boot.bootreason should be set by init already
# before post-fs trigger
on post-fs && property:ro.boot.bootreason=*
setprop sys.boot.reason ${ro.boot.bootreason}
on post-fs-data
mkdir /data/misc/bootstat 0700 system log
# To deal with ota transition resulting from a change in DAC from
# root.root to system.log, may be deleted after ota has settled.
chown system log /data/misc/bootstat/absolute_boot_time
chown system log /data/misc/bootstat/boot_complete
chown system log /data/misc/bootstat/boot_complete_no_encryption
chown system log /data/misc/bootstat/boot_reason
chown system log /data/misc/bootstat/boottime.bootloader.1BLE
chown system log /data/misc/bootstat/boottime.bootloader.1BLL
chown system log /data/misc/bootstat/boottime.bootloader.2BLE
chown system log /data/misc/bootstat/boottime.bootloader.2BLL
chown system log /data/misc/bootstat/boottime.bootloader.AVB
chown system log /data/misc/bootstat/boottime.bootloader.KD
chown system log /data/misc/bootstat/boottime.bootloader.KL
chown system log /data/misc/bootstat/boottime.bootloader.ODT
chown system log /data/misc/bootstat/boottime.bootloader.SW
chown system log /data/misc/bootstat/boottime.bootloader.total
chown system log /data/misc/bootstat/build_date
chown system log /data/misc/bootstat/factory_reset
chown system log /data/misc/bootstat/factory_reset_boot_complete
chown system log /data/misc/bootstat/factory_reset_boot_complete_no_encryption
chown system log /data/misc/bootstat/factory_reset_current_time
chown system log /data/misc/bootstat/factory_reset_record_value
chown system log /data/misc/bootstat/last_boot_time_utc
chown system log /data/misc/bootstat/ota_boot_complete
chown system log /data/misc/bootstat/ota_boot_complete_no_encryption
chown system log /data/misc/bootstat/ro.boottime.init
chown system log /data/misc/bootstat/ro.boottime.init.cold_boot_wait
chown system log /data/misc/bootstat/ro.boottime.init.selinux
chown system log /data/misc/bootstat/time_since_factory_reset
chown system log /data/misc/bootstat/time_since_last_boot
# end ota transitional support
# Initialize bootstat state machine.
#
# sys.bootstat.first_boot_completed: responsible for making sure that record_boot_complete happens
# only once per device hard reboot. Possible values:
#
# sys.bootstat.first_boot_completed=0 - first boot completed trigger wasn't processed yet.
# sys.bootstat.first_boot_completed=1 - first boot completed trigger was processed and
# record_boot_complete was called. Subsequent boot completed
# triggers (e.g. due to userspace reboot) won't retrigger
# record_boot_complete
#
# IMPORTANT, ro.persistent_properties.ready=1 trigger is used here to ensure that we initialize
# state machine only once, which as result ensures that bootstat --set_system_boot_reason and
# bootstat --record_boot_complete will be called only once per full reboot.
on property:ro.persistent_properties.ready=true
setprop sys.bootstat.first_boot_completed 0
# Set boot reason
on property:ro.persistent_properties.ready=true
# Converts bootloader boot reason and persist.sys.boot.reason to system boot reason
# Need go after persist peroperties are loaded which is right before zygote-start trigger
exec_background - system log -- /system/bin/bootstat --set_system_boot_reason
# Record boot complete metrics.
on property:sys.boot_completed=1 && property:sys.bootstat.first_boot_completed=0
# Record boot_complete and related stats (decryption, etc).
# Record the boot reason.
# Record time since factory reset.
# Log all boot events.
exec_background - system log -- /system/bin/bootstat --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l
setprop sys.bootstat.first_boot_completed 1
================================================
FILE: bootstat/testrunner.cpp
================================================
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <android-base/logging.h>
#include <gtest/gtest.h>
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
android::base::InitLogging(argv, android::base::StderrLogger);
return RUN_ALL_TESTS();
}
================================================
FILE: cli-test/Android.bp
================================================
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_binary {
name: "cli-test",
host_supported: true,
srcs: ["cli-test.cpp"],
cflags: ["-Wall", "-Werror"],
shared_libs: ["libbase"],
}
================================================
FILE: cli-test/README.md
================================================
# cli-test
## What?
`cli-test` makes integration testing of command-line tools easier.
## Goals
* Readable syntax. Common cases should be concise, and pretty much anyone
should be able to read tests even if they've never seen this tool before.
* Minimal issues with quoting. The toybox tests -- being shell scripts --
quickly become a nightmare of quoting. Using a non ad hoc format (such as
JSON) would have introduced similar but different quoting issues. A custom
format, while annoying, side-steps this.
* Sensible defaults. We expect your exit status to be 0 unless you say
otherwise. We expect nothing on stderr unless you say otherwise. And so on.
* Convention over configuration. Related to sensible defaults, we don't let you
configure things that aren't absolutely necessary. So you can't keep your test
data anywhere except in the `files/` subdirectory of the directory containing
your test, for example.
## Non Goals
* Portability. Just being able to run on Linux (host and device) is sufficient
for our needs. macOS is probably easy enough if we ever need it, but Windows
probably doesn't make sense.
## Syntax
Any all-whitespace line, or line starting with `#` is ignored.
A test looks like this:
```
name: unzip -l
command: unzip -l $FILES/example.zip d1/d2/x.txt
after: [ ! -f d1/d2/x.txt ]
expected-stdout:
Archive: $FILES/example.zip
Length Date Time Name
--------- ---------- ----- ----
1024 2017-06-04 08:45 d1/d2/x.txt
--------- -------
1024 1 file
---
```
The `name:` line names the test, and is only for human consumption.
The `command:` line is the command to be run. Additional commands can be
supplied as zero or more `before:` lines (run before `command:`) and zero or
more `after:` lines (run after `command:`). These are useful for both
setup/teardown but also for testing post conditions (as in the example above).
Any `command:`, `before:`, or `after:` line is expected to exit with status 0.
Anything else is considered a test failure.
The `expected-stdout:` line is followed by zero or more tab-prefixed lines that
are otherwise the exact output expected from the command. (There's magic behind
the scenes to rewrite the test files directory to `$FILES` because otherwise any
path in the output would depend on the temporary directory used to run the test.)
There is currently no `expected-stderr:` line. Standard error is implicitly
expected to be empty, and any output will cause a test failure. (The support is
there, but not wired up because we haven't needed it yet.)
The fields can appear in any order, but every test must contain at least a
`name:` line and a `command:` line.
## Output
The output is intended to resemble gtest.
## Future Directions
* It's often useful to be able to *match* against stdout/stderr/a file rather
than give exact expected output. We might want to add explicit support for
this. In the meantime, it's possible to use an `after:` with `grep -q` if
you redirect in your `command:`.
* In addition to using a `before:` (which will fail a test), it can be useful
to be able to specify tests that would cause us to *skip* a test. An example
would be "am I running as root?".
* It might be useful to be able to make exit status assertions other than 0?
* There's currently no way (other than the `files/` directory) to share repeated
setup between tests.
================================================
FILE: cli-test/cli-test.cpp
================================================
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <errno.h>
#include <getopt.h>
#include <inttypes.h>
#include <libgen.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <string>
#include <vector>
#include <android-base/chrono_utils.h>
#include <android-base/file.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <android-base/test_utils.h>
// Example:
// name: unzip -n
// before: mkdir -p d1/d2
// before: echo b > d1/d2/a.txt
// command: unzip -q -n $FILES/zip/example.zip d1/d2/a.txt && cat d1/d2/a.txt
// expected-stdout:
// b
struct Test {
std::string test_filename;
std::string name;
std::string command;
std::vector<std::string> befores;
std::vector<std::string> afters;
std::string expected_stdout;
std::string expected_stderr;
int exit_status = 0;
};
static const char* g_progname;
static bool g_verbose;
static const char* g_file;
static size_t g_line;
enum Color { kRed, kGreen };
static void Print(Color c, const char* lhs, const char* fmt, ...) {
va_list ap;
va_start(ap, fmt);
if (isatty(0)) printf("%s", (c == kRed) ? "\e[31m" : "\e[32m");
printf("%s%s", lhs, isatty(0) ? "\e[0m" : "");
vfprintf(stdout, fmt, ap);
putchar('\n');
va_end(ap);
}
static void Die(int error, const char* fmt, ...) {
va_list ap;
va_start(ap, fmt);
fprintf(stderr, "%s: ", g_progname);
vfprintf(stderr, fmt, ap);
if (error != 0) fprintf(stderr, ": %s", strerror(error));
fprintf(stderr, "\n");
va_end(ap);
_exit(1);
}
static void V(const char* fmt, ...) {
if (!g_verbose) return;
va_list ap;
va_start(ap, fmt);
fprintf(stderr, " - ");
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
va_end(ap);
}
static void SetField(const char* what, std::string* field, std::string_view value) {
if (!field->empty()) {
Die(0, "%s:%zu: %s already set to '%s'", g_file, g_line, what, field->c_str());
}
field->assign(value);
}
// Similar to ConsumePrefix, but also trims, so "key:value" and "key: value"
// are equivalent.
static bool Match(std::string* s, const std::string& prefix) {
if (!android::base::StartsWith(*s, prefix)) return false;
s->assign(android::base::Trim(s->substr(prefix.length())));
return true;
}
static void CollectTests(std::vector<Test>* tests, const char* test_filename) {
std::string absolute_test_filename;
if (!android::base::Realpath(test_filename, &absolute_test_filename)) {
Die(errno, "realpath '%s'", test_filename);
}
std::string content;
if (!android::base::ReadFileToString(test_filename, &content)) {
Die(errno, "couldn't read '%s'", test_filename);
}
size_t count = 0;
g_file = test_filename;
g_line = 0;
auto lines = android::base::Split(content, "\n");
std::unique_ptr<Test> test(new Test);
while (g_line < lines.size()) {
auto line = lines[g_line++];
if (line.empty() || line[0] == '#') continue;
if (line[0] == '-') {
if (test->name.empty() || test->command.empty()) {
Die(0, "%s:%zu: each test requires both a name and a command", g_file, g_line);
}
test->test_filename = absolute_test_filename;
tests->push_back(*test.release());
test.reset(new Test);
++count;
} else if (Match(&line, "name:")) {
SetField("name", &test->name, line);
} else if (Match(&line, "command:")) {
SetField("command", &test->command, line);
} else if (Match(&line, "before:")) {
test->befores.push_back(line);
} else if (Match(&line, "after:")) {
test->afters.push_back(line);
} else if (Match(&line, "expected-exit-status:")) {
char* end_p;
errno = 0;
test->exit_status = strtol(line.c_str(), &end_p, 10);
if (errno != 0 || *end_p != '\0') {
Die(0, "%s:%zu: bad exit status: \"%s\"", g_file, g_line, line.c_str());
}
} else if (Match(&line, "expected-stdout:")) {
// Collect tab-indented lines.
std::string text;
while (g_line < lines.size() && !lines[g_line].empty() && lines[g_line][0] == '\t') {
text += lines[g_line++].substr(1) + "\n";
}
SetField("expected stdout", &test->expected_stdout, text);
} else {
Die(0, "%s:%zu: syntax error: \"%s\"", g_file, g_line, line.c_str());
}
}
if (count == 0) Die(0, "no tests found in '%s'", g_file);
}
static const char* Plural(size_t n) {
return (n == 1) ? "" : "s";
}
static std::string ExitStatusToString(int status) {
if (WIFSIGNALED(status)) {
return android::base::StringPrintf("was killed by signal %d (%s)", WTERMSIG(status),
strsignal(WTERMSIG(status)));
}
if (WIFSTOPPED(status)) {
return android::base::StringPrintf("was stopped by signal %d (%s)", WSTOPSIG(status),
strsignal(WSTOPSIG(status)));
}
return android::base::StringPrintf("exited with status %d", WEXITSTATUS(status));
}
static bool RunCommands(const char* what, const std::vector<std::string>& commands) {
bool result = true;
for (auto& command : commands) {
V("running %s \"%s\"", what, command.c_str());
int exit_status = system(command.c_str());
if (exit_status != 0) {
result = false;
fprintf(stderr, "Command (%s) \"%s\" %s\n", what, command.c_str(),
ExitStatusToString(exit_status).c_str());
}
}
return result;
}
static bool CheckOutput(const char* what, std::string actual_output,
const std::string& expected_output, const std::string& FILES) {
// Rewrite the output to reverse any expansion of $FILES.
actual_output = android::base::StringReplace(actual_output, FILES, "$FILES", true);
bool result = (actual_output == expected_output);
if (!result) {
fprintf(stderr, "Incorrect %s.\nExpected:\n%s\nActual:\n%s\n", what, expected_output.c_str(),
actual_output.c_str());
}
return result;
}
static int RunTests(const std::vector<Test>& tests) {
std::vector<std::string> failures;
Print(kGreen, "[==========]", " Running %zu tests.", tests.size());
android::base::Timer total_timer;
for (const auto& test : tests) {
bool failed = false;
Print(kGreen, "[ RUN ]", " %s", test.name.c_str());
android::base::Timer test_timer;
// Set $FILES for this test.
std::string FILES = android::base::Dirname(test.test_filename) + "/files";
V("setenv(\"FILES\", \"%s\")", FILES.c_str());
setenv("FILES", FILES.c_str(), 1);
// Make a safe space to run the test.
TemporaryDir td;
V("chdir(\"%s\")", td.path);
if (chdir(td.path)) Die(errno, "chdir(\"%s\")", td.path);
// Perform any setup specified for this test.
if (!RunCommands("before", test.befores)) failed = true;
if (!failed) {
V("running command \"%s\"", test.command.c_str());
CapturedStdout test_stdout;
CapturedStderr test_stderr;
int status = system(test.command.c_str());
test_stdout.Stop();
test_stderr.Stop();
V("system() returned status %d", status);
if (WEXITSTATUS(status) != test.exit_status) {
failed = true;
fprintf(stderr, "Incorrect exit status: expected %d but %s\n", test.exit_status,
ExitStatusToString(status).c_str());
}
if (!CheckOutput("stdout", test_stdout.str(), test.expected_stdout, FILES)) failed = true;
if (!CheckOutput("stderr", test_stderr.str(), test.expected_stderr, FILES)) failed = true;
if (!RunCommands("after", test.afters)) failed = true;
}
std::stringstream duration;
duration << test_timer;
if (failed) {
failures.push_back(test.name);
Print(kRed, "[ FAILED ]", " %s (%s)", test.name.c_str(), duration.str().c_str());
} else {
Print(kGreen, "[ OK ]", " %s (%s)", test.name.c_str(), duration.str().c_str());
}
}
// Summarize the whole run and explicitly list all the failures.
std::stringstream duration;
duration << total_timer;
Print(kGreen, "[==========]", " %zu tests ran. (%s total)", tests.size(), duration.str().c_str());
size_t fail_count = failures.size();
size_t pass_count = tests.size() - fail_count;
Print(kGreen, "[ PASSED ]", " %zu test%s.", pass_count, Plural(pass_count));
if (!failures.empty()) {
Print(kRed, "[ FAILED ]", " %zu test%s.", fail_count, Plural(fail_count));
for (auto& failure : failures) {
Print(kRed, "[ FAILED ]", " %s", failure.c_str());
}
}
return (fail_count == 0) ? 0 : 1;
}
static void ShowHelp(bool full) {
fprintf(full ? stdout : stderr, "usage: %s [-v] FILE...\n", g_progname);
if (!full) exit(EXIT_FAILURE);
printf(
"\n"
"Run tests.\n"
"\n"
"-v\tVerbose (show workings)\n");
exit(EXIT_SUCCESS);
}
int main(int argc, char* argv[]) {
g_progname = basename(argv[0]);
static const struct option opts[] = {
{"help", no_argument, 0, 'h'},
{"verbose", no_argument, 0, 'v'},
{},
};
int opt;
while ((opt = getopt_long(argc, argv, "hv", opts, nullptr)) != -1) {
switch (opt) {
case 'h':
ShowHelp(true);
break;
case 'v':
g_verbose = true;
break;
default:
ShowHelp(false);
break;
}
}
argv += optind;
if (!*argv) Die(0, "no test files provided");
std::vector<Test> tests;
for (; *argv; ++argv) CollectTests(&tests, *argv);
return RunTests(tests);
}
================================================
FILE: code_coverage/Android.bp
================================================
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
prebuilt_etc {
name: "code_coverage.policy",
sub_dir: "seccomp_policy",
filename_from_src: true,
arch: {
arm: {
src: "empty_policy/code_coverage.arm.policy",
product_variables: {
native_coverage: {
src: "seccomp_policy/code_coverage.arm.policy",
},
},
},
arm64: {
src: "empty_policy/code_coverage.arm64.policy",
product_variables: {
native_coverage: {
src: "seccomp_policy/code_coverage.arm64.policy",
},
},
},
riscv64: {
src: "empty_policy/code_coverage.riscv64.policy",
product_variables: {
native_coverage: {
src: "seccomp_policy/code_coverage.riscv64.policy",
},
},
},
x86: {
src: "empty_policy/code_coverage.x86.policy",
product_variables: {
native_coverage: {
src: "seccomp_policy/code_coverage.x86.policy",
},
},
},
x86_64: {
src: "empty_policy/code_coverage.x86_64.policy",
product_variables: {
native_coverage: {
src: "seccomp_policy/code_coverage.x86_64.policy",
},
},
},
},
required: [
"code_coverage.policy.other",
],
}
prebuilt_etc {
name: "code_coverage.policy.other",
sub_dir: "seccomp_policy",
filename_from_src: true,
arch: {
arm: {
src: "empty_policy/code_coverage.arm64.policy",
product_variables: {
native_coverage: {
src: "seccomp_policy/code_coverage.arm64.policy",
},
},
},
arm64: {
src: "empty_policy/code_coverage.arm.policy",
product_variables: {
native_coverage: {
src: "seccomp_policy/code_coverage.arm.policy",
},
},
},
riscv64: {
// riscv64 doesn't have a secondary architecture.
enabled: false,
},
x86: {
src: "empty_policy/code_coverage.x86_64.policy",
product_variables: {
native_coverage: {
src: "seccomp_policy/code_coverage.x86_64.policy",
},
},
},
x86_64: {
src: "empty_policy/code_coverage.x86.policy",
product_variables: {
native_coverage: {
src: "seccomp_policy/code_coverage.x86.policy",
},
},
},
},
}
================================================
FILE: code_coverage/empty_policy/code_coverage.arm.policy
================================================
# empty unless code_coverage is enabled.
# code_coverage.arm.policy
================================================
FILE: code_coverage/empty_policy/code_coverage.arm64.policy
================================================
# empty unless code_coverage is enabled.
# code_coverage.arm64.policy
================================================
FILE: code_coverage/empty_policy/code_coverage.riscv64.policy
================================================
# empty unless code_coverage is enabled.
# code_coverage.riscv64.policy
================================================
FILE: code_coverage/empty_policy/code_coverage.x86.policy
================================================
# empty unless code_coverage is enabled.
# code_coverage.x86.policy
================================================
FILE: code_coverage/empty_policy/code_coverage.x86_64.policy
================================================
# empty unless code_coverage is enabled.
# code_coverage.x86_64.policy
================================================
FILE: code_coverage/seccomp_policy/code_coverage.arm.policy
================================================
close: 1
fchmod: 1
mkdirat: 1
msync: 1
munmap: 1
openat: 1
write: 1
fcntl64: 1
fstat64: 1
ftruncate64: 1
geteuid32: 1
_llseek: 1
mmap2: 1
sigreturn: 1
gettimeofday: 1
prctl: 1
================================================
FILE: code_coverage/seccomp_policy/code_coverage.arm64.policy
================================================
close: 1
fchmod: 1
mkdirat: 1
msync: 1
munmap: 1
openat: 1
write: 1
fcntl: 1
fstat: 1
ftruncate: 1
geteuid: 1
lseek: 1
mmap: 1
rt_sigreturn: 1
prctl: 1
================================================
FILE: code_coverage/seccomp_policy/code_coverage.policy.def
================================================
// SECCOMP_MODE_STRICT
//
// minijail allowances for code coverage
// this is processed with generate.sh, so we can use appropriate directives
// size specific: __LP64__ for 64 bit, else 32 bit
// arch specific: __arm__, __aarch64__, __i386__, __x86_64__
// includes *all* syscalls used during the coverage dumping
// no skipping just because they might have been in another policy file.
// coverage tool uses different operations on different passes
// 1st: uses write() to fill the file
// 2nd-Nth: uses mmap() to update in place
close: 1
// fchmod allowed to set libprofile-clang-extras, which wraps `open` calls, to
// set correct permission for coverage files.
fchmod: 1
mkdirat: 1
msync: 1
munmap: 1
openat: 1
write: 1
#if defined(__LP64__)
fcntl: 1
fstat: 1
ftruncate: 1
geteuid: 1
lseek: 1
mmap: 1
rt_sigreturn: 1
#else
fcntl64: 1
fstat64: 1
ftruncate64: 1
geteuid32: 1
_llseek: 1
mmap2: 1
sigreturn: 1
#endif
#if defined(__arm__)
gettimeofday: 1
#endif
#if defined(__i386__)
madvise: 1
#endif
#if defined(__arm__)
prctl: 1
#elif defined(__aarch64__)
prctl: 1
#endif
================================================
FILE: code_coverage/seccomp_policy/code_coverage.riscv64.policy
================================================
close: 1
fchmod: 1
mkdirat: 1
msync: 1
munmap: 1
openat: 1
write: 1
fcntl: 1
fstat: 1
ftruncate: 1
geteuid: 1
lseek: 1
mmap: 1
rt_sigreturn: 1
prctl: 1
================================================
FILE: code_coverage/seccomp_policy/code_coverage.x86.policy
================================================
close: 1
fchmod: 1
mkdirat: 1
msync: 1
munmap: 1
openat: 1
write: 1
fcntl64: 1
fstat64: 1
ftruncate64: 1
geteuid32: 1
_llseek: 1
mmap2: 1
sigreturn: 1
madvise: 1
================================================
FILE: code_coverage/seccomp_policy/code_coverage.x86_64.policy
================================================
close: 1
fchmod: 1
mkdirat: 1
msync: 1
munmap: 1
openat: 1
write: 1
fcntl: 1
fstat: 1
ftruncate: 1
geteuid: 1
lseek: 1
mmap: 1
rt_sigreturn: 1
================================================
FILE: code_coverage/seccomp_policy/generate.sh
================================================
#!/bin/bash
# generate the arch-specific files from the generic one
set -ex
cd "$(dirname "$0")"
CPP='cpp -undef -E -P code_coverage.policy.def'
$CPP -D__arm__ -o code_coverage.arm.policy
$CPP -D__aarch64__ -D__LP64__ -o code_coverage.arm64.policy
$CPP -D__i386__ -o code_coverage.x86.policy
$CPP -D__x86_64__ -D__LP64__ -o code_coverage.x86_64.policy
================================================
FILE: debuggerd/Android.bp
================================================
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_defaults {
name: "debuggerd_defaults",
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-Wno-gcc-compat",
"-Wno-unused-argument",
"-Wno-unused-function",
"-Wno-nullability-completeness",
"-Wno-reorder-init-list",
"-Os",
"-fno-finite-loops",
"-DANDROID_DEBUGGABLE=0",
],
local_include_dirs: ["include"],
product_variables: {
debuggable: {
cflags: [
"-UANDROID_DEBUGGABLE",
"-DANDROID_DEBUGGABLE=1",
],
},
},
}
cc_library_headers {
name: "libdebuggerd_common_headers",
export_include_dirs: ["common/include"],
recovery_available: true,
vendor_ramdisk_available: true,
apex_available: [
"com.android.runtime",
"com.android.virt",
"//apex_available:platform",
],
}
cc_library_shared {
name: "libtombstoned_client",
defaults: ["debuggerd_defaults"],
srcs: [
"tombstoned/tombstoned_client.cpp",
"util.cpp",
],
header_libs: ["libdebuggerd_common_headers"],
static_libs: [
"libasync_safe",
],
shared_libs: [
"libbase",
"libcutils",
],
apex_available: [
"com.android.virt",
"//apex_available:platform",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["tombstoned/include"],
}
// Utility library to talk to tombstoned and get an output fd.
cc_library_static {
name: "libtombstoned_client_static",
defaults: ["debuggerd_defaults"],
recovery_available: true,
vendor_ramdisk_available: true,
srcs: [
"tombstoned/tombstoned_client.cpp",
"util.cpp",
],
header_libs: ["libdebuggerd_common_headers"],
whole_static_libs: [
"libasync_safe",
"libcutils",
"libbase",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["tombstoned/include"],
apex_available: ["com.android.runtime"],
}
// Core implementation, linked into libdebuggerd_handler and the dynamic linker.
cc_library_static {
name: "libdebuggerd_handler_core",
defaults: ["debuggerd_defaults"],
recovery_available: true,
vendor_ramdisk_available: true,
srcs: ["handler/debuggerd_handler.cpp"],
header_libs: [
"libbase_headers",
"libdebuggerd_common_headers",
"bionic_libc_platform_headers",
"gwp_asan_headers",
],
whole_static_libs: [
"libasync_safe",
"libcutils",
"libdebuggerd",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["include"],
apex_available: [
"com.android.runtime",
],
}
// Implementation with a no-op fallback.
cc_library_static {
name: "libdebuggerd_handler",
defaults: ["debuggerd_defaults"],
srcs: ["handler/debuggerd_fallback_nop.cpp"],
header_libs: ["bionic_libc_platform_headers"],
export_header_lib_headers: ["bionic_libc_platform_headers"],
whole_static_libs: [
"libdebuggerd_handler_core",
],
export_include_dirs: ["include"],
}
// Fallback implementation, for use in the Bionic linker only.
cc_library_static {
name: "libdebuggerd_handler_fallback",
visibility: ["//bionic/linker"],
apex_available: [
"com.android.runtime",
"//apex_available:platform",
],
defaults: ["debuggerd_defaults"],
recovery_available: true,
vendor_ramdisk_available: true,
srcs: [
"handler/debuggerd_fallback.cpp",
],
whole_static_libs: [
"libdebuggerd_handler_core",
"libtombstoned_client_static",
"libasync_safe",
"libbase",
"libdebuggerd",
"libunwindstack_no_dex",
"liblzma",
"libcutils",
],
header_libs: ["bionic_libc_platform_headers"],
export_header_lib_headers: ["bionic_libc_platform_headers"],
export_include_dirs: ["include"],
}
cc_library {
name: "libdebuggerd_client",
defaults: ["debuggerd_defaults"],
srcs: [
"client/debuggerd_client.cpp",
"util.cpp",
],
shared_libs: [
"libbase",
"libcutils",
"libprocinfo",
],
header_libs: [
"libdebuggerd_common_headers",
"bionic_libc_platform_headers",
],
export_header_lib_headers: [
"libdebuggerd_common_headers",
"bionic_libc_platform_headers",
],
export_include_dirs: ["include"],
}
cc_library {
name: "libdebuggerd_tombstone_proto_to_text",
defaults: ["debuggerd_defaults"],
ramdisk_available: true,
recovery_available: true,
vendor_ramdisk_available: true,
host_supported: true,
local_include_dirs: ["libdebuggerd/include"],
export_include_dirs: ["libdebuggerd/include"],
srcs: [
"libdebuggerd/tombstone_proto_to_text.cpp",
"libdebuggerd/utility_host.cpp",
],
static_libs: [
"libbase",
],
whole_static_libs: [
"libtombstone_proto",
"libprotobuf-cpp-lite",
],
shared_libs: [
"liblog",
],
apex_available: [
"//apex_available:platform",
"com.android.runtime",
],
}
cc_library_static {
name: "libdebuggerd",
defaults: ["debuggerd_defaults"],
ramdisk_available: true,
recovery_available: true,
vendor_ramdisk_available: true,
srcs: [
"libdebuggerd/backtrace.cpp",
"libdebuggerd/gwp_asan.cpp",
"libdebuggerd/open_files_list.cpp",
"libdebuggerd/scudo.cpp",
"libdebuggerd/tombstone.cpp",
"libdebuggerd/tombstone_proto.cpp",
"libdebuggerd/utility.cpp",
],
cflags: [
"-DUSE_SCUDO",
],
local_include_dirs: ["libdebuggerd/include"],
export_include_dirs: ["libdebuggerd/include"],
include_dirs: [
// Needed for private/bionic_fdsan.h
"bionic/libc",
],
header_libs: [
"bionic_libc_platform_headers",
"gwp_asan_headers",
"liblog_headers",
"scudo_headers",
],
static_libs: [
"libdexfile_support", // libunwindstack dependency
"libunwindstack",
"liblzma",
"libbase",
"libcutils",
],
whole_static_libs: [
"libdebuggerd_tombstone_proto_to_text",
"libasync_safe",
"gwp_asan_crash_handler",
"libtombstone_proto",
"libprocinfo",
"libprotobuf-cpp-lite",
"libscudo",
],
target: {
recovery: {
exclude_static_libs: [
"libdexfile_support",
],
exclude_runtime_libs: [
"libdexfile",
],
},
vendor_ramdisk: {
exclude_static_libs: [
"libdexfile_support",
],
exclude_runtime_libs: [
"libdexfile",
],
},
ramdisk: {
exclude_static_libs: [
"libdexfile_support",
],
exclude_runtime_libs: [
"libdexfile",
],
},
android: {
runtime_libs: [
"libdexfile", // libdexfile_support dependency
],
},
},
product_variables: {
debuggable: {
cflags: ["-DROOT_POSSIBLE"],
},
malloc_low_memory: {
cflags: ["-UUSE_SCUDO"],
exclude_static_libs: ["libscudo"],
},
},
apex_available: [
"com.android.runtime",
],
}
cc_binary {
name: "pbtombstone",
host_supported: true,
defaults: ["debuggerd_defaults"],
srcs: [
"pbtombstone.cpp",
"tombstone_symbolize.cpp",
],
static_libs: [
"libbase",
"libdebuggerd_tombstone_proto_to_text",
"liblog",
"libprotobuf-cpp-lite",
"libtombstone_proto",
],
}
cc_test_library {
name: "libcrash_test",
defaults: ["debuggerd_defaults"],
srcs: ["crash_test.cpp"],
}
cc_test {
name: "debuggerd_test",
defaults: ["debuggerd_defaults"],
require_root: true,
cflags: ["-Wno-missing-field-initializers"],
srcs: [
"libdebuggerd/test/dump_memory_test.cpp",
"libdebuggerd/test/elf_fake.cpp",
"libdebuggerd/test/log_fake.cpp",
"libdebuggerd/test/mte_stack_record_test.cpp",
"libdebuggerd/test/open_files_list_test.cpp",
"libdebuggerd/test/tombstone_proto_to_text_test.cpp",
],
target: {
android: {
srcs: [
"client/debuggerd_client_test.cpp",
"debuggerd_test.cpp",
],
static_libs: [
"libasync_safe",
"libtombstoned_client_static",
],
},
},
sanitize: {
memtag_heap: true,
},
shared_libs: [
"libbase",
"libcutils",
"libdebuggerd_client",
"liblog",
"libnativehelper",
"libunwindstack",
],
static_libs: [
"libdebuggerd",
"libgmock",
"libminijail",
],
header_libs: [
"bionic_libc_platform_headers",
"gwp_asan_headers",
],
local_include_dirs: [
"libdebuggerd",
],
compile_multilib: "both",
multilib: {
lib32: {
stem: "debuggerd_test32",
},
lib64: {
stem: "debuggerd_test64",
},
},
data: [
":libcrash_test",
],
test_suites: ["device-tests"],
}
cc_benchmark {
name: "debuggerd_benchmark",
defaults: ["debuggerd_defaults"],
srcs: ["debuggerd_benchmark.cpp"],
shared_libs: [
"libbase",
"libdebuggerd_client",
],
}
cc_binary {
name: "crash_dump",
srcs: [
"crash_dump.cpp",
"tombstone_handler.cpp",
"util.cpp",
],
defaults: ["debuggerd_defaults"],
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",
},
lib64: {
suffix: "64",
},
},
header_libs: [
"bionic_libc_platform_headers",
"libnative_bridge_support_accessor_headers",
],
static_libs: [
"libtombstoned_client_static",
"libdebuggerd",
"libcutils",
"libtombstone_proto",
"libprotobuf-cpp-lite",
"libnative_bridge_guest_state_accessor",
],
shared_libs: [
"libbase",
"liblog",
"libprocinfo",
"libunwindstack",
],
apex_available: [
"com.android.runtime",
],
// Required for tests.
required: ["crash_dump.policy"],
target: {
android: {
header_libs: [
"libnative_bridge_support_accessor_headers", // For dlext_namespaces.h
],
shared_libs: ["libdl_android"], // For android_get_exported_namespace implementation
},
},
}
cc_binary {
name: "debuggerd",
srcs: [
"debuggerd.cpp",
],
defaults: ["debuggerd_defaults"],
shared_libs: [
"libbase",
"libdebuggerd_client",
"liblog",
"libprocessgroup",
"libprocinfo",
],
local_include_dirs: ["include"],
}
cc_defaults {
name: "tombstoned_defaults",
srcs: [
"util.cpp",
"tombstoned/intercept_manager.cpp",
"tombstoned/tombstoned.cpp",
],
defaults: ["debuggerd_defaults"],
header_libs: [
"bionic_libc_platform_headers",
"libdebuggerd_common_headers",
],
static_libs: [
"libbase",
"libcutils",
"libevent",
"liblog",
],
}
cc_binary {
name: "tombstoned",
defaults: ["tombstoned_defaults"],
init_rc: ["tombstoned/tombstoned.rc"],
}
cc_binary {
name: "tombstoned.microdroid",
defaults: ["tombstoned_defaults"],
init_rc: ["tombstoned/tombstoned.microdroid.rc"],
}
prebuilt_etc {
name: "crash_dump.policy",
sub_dir: "seccomp_policy",
filename_from_src: true,
arch: {
arm: {
src: "seccomp_policy/crash_dump.arm.policy",
required: [
"crash_dump.policy_other",
],
},
arm64: {
src: "seccomp_policy/crash_dump.arm64.policy",
required: [
"crash_dump.policy_other",
],
},
riscv64: {
src: "seccomp_policy/crash_dump.riscv64.policy",
},
x86: {
src: "seccomp_policy/crash_dump.x86.policy",
required: [
"crash_dump.policy_other",
],
},
x86_64: {
src: "seccomp_policy/crash_dump.x86_64.policy",
required: [
"crash_dump.policy_other",
],
},
},
}
// This installs the "other" architecture (so 32-bit on 64-bit device).
prebuilt_etc {
name: "crash_dump.policy_other",
sub_dir: "seccomp_policy",
filename_from_src: true,
arch: {
arm: {
src: "seccomp_policy/crash_dump.arm64.policy",
},
arm64: {
src: "seccomp_policy/crash_dump.arm.policy",
},
riscv64: {
enabled: false,
},
x86: {
src: "seccomp_policy/crash_dump.x86_64.policy",
},
x86_64: {
src: "seccomp_policy/crash_dump.x86.policy",
},
},
}
================================================
FILE: debuggerd/MODULE_LICENSE_APACHE2
================================================
================================================
FILE: debuggerd/OWNERS
================================================
cferris@google.com
================================================
FILE: debuggerd/TEST_MAPPING
================================================
{
"presubmit": [
{
"name": "debuggerd_test"
},
{
"name": "debuggerd_test",
"keywords": ["primary-device"]
},
{
"name": "libtombstoned_client_rust_test"
},
{
"name": "MicrodroidHostTestCases"
}
],
"hwasan-presubmit": [
{
"name": "debuggerd_test"
}
],
"postsubmit": [
{
"name": "CtsCrashDetailHostTestCases"
}
]
}
================================================
FILE: debuggerd/client/debuggerd_client.cpp
================================================
/*
* Copyright 2016, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <debuggerd/client.h>
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/poll.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <chrono>
#include <iomanip>
#include <android-base/cmsg.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/parseint.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <android-base/unique_fd.h>
#include <bionic/reserved_signals.h>
#include <cutils/sockets.h>
#include <procinfo/process.h>
#include "debuggerd/handler.h"
#include "protocol.h"
#include "util.h"
using namespace std::chrono_literals;
using android::base::ReadFileToString;
using android::base::SendFileDescriptors;
using android::base::StringAppendV;
using android::base::unique_fd;
using android::base::WriteStringToFd;
#define TAG "libdebuggerd_client: "
// Log an error both to the log (via LOG(ERROR)) and to the given fd.
static void log_error(int fd, int errno_value, const char* format, ...) __printflike(3, 4) {
std::string message(TAG);
va_list ap;
va_start(ap, format);
StringAppendV(&message, format, ap);
va_end(ap);
if (errno_value != 0) {
message = message + ": " + strerror(errno_value);
}
if (fd != -1) {
dprintf(fd, "%s\n", message.c_str());
}
LOG(ERROR) << message;
}
template <typename Duration>
static void populate_timeval(struct timeval* tv, const Duration& duration) {
auto seconds = std::chrono::duration_cast<std::chrono::seconds>(duration);
auto microseconds = std::chrono::duration_cast<std::chrono::microseconds>(duration - seconds);
tv->tv_sec = static_cast<long>(seconds.count());
tv->tv_usec = static_cast<long>(microseconds.count());
}
/**
* Returns the wchan data for each thread in the process,
* or empty string if unable to obtain any data.
*/
static std::string get_wchan_data(int fd, pid_t pid) {
std::vector<pid_t> tids;
if (!android::procinfo::GetProcessTids(pid, &tids)) {
log_error(fd, 0, "failed to get process tids");
return "";
}
std::stringstream data;
for (int tid : tids) {
std::string path = "/proc/" + std::to_string(pid) + "/task/" + std::to_string(tid) + "/wchan";
std::string wchan_str;
if (!ReadFileToString(path, &wchan_str, true)) {
log_error(fd, errno, "failed to read \"%s\"", path.c_str());
continue;
}
data << "sysTid=" << std::left << std::setw(10) << tid << wchan_str << "\n";
}
std::stringstream buffer;
if (std::string str = data.str(); !str.empty()) {
buffer << "\n----- Waiting Channels: pid " << pid << " at " << get_timestamp() << " -----\n"
<< "Cmd line: " << android::base::Join(get_command_line(pid), " ") << "\n";
buffer << "\n" << str << "\n";
buffer << "----- end " << std::to_string(pid) << " -----\n";
buffer << "\n";
}
return buffer.str();
}
bool debuggerd_trigger_dump(pid_t tid, DebuggerdDumpType dump_type, unsigned int timeout_ms,
unique_fd output_fd) {
if (dump_type == kDebuggerdJavaBacktrace) {
// Java dumps always get sent to the tgid, so we need to resolve our tid to a tgid.
android::procinfo::ProcessInfo procinfo;
std::string error;
if (!android::procinfo::GetProcessInfo(tid, &procinfo, &error)) {
log_error(output_fd, 0, "failed to get process info: %s", error.c_str());
return false;
}
tid = procinfo.pid;
}
LOG(INFO) << TAG "started dumping process " << tid;
// Rather than try to deal with poll() all the way through the flow, we update
// the socket timeout between each step (and only use poll() during the final
// copy loop).
const auto end = std::chrono::steady_clock::now() + std::chrono::milliseconds(timeout_ms);
auto update_timeout = [timeout_ms, &output_fd](int sockfd, auto end) {
if (timeout_ms <= 0) return true;
auto remaining = end - std::chrono::steady_clock::now();
if (remaining < decltype(remaining)::zero()) {
log_error(output_fd, 0, "timeout expired (update_timeout)");
return false;
}
struct timeval timeout;
populate_timeval(&timeout, remaining);
if (setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)) != 0) {
log_error(output_fd, errno, "failed to set receive timeout");
return false;
}
if (setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)) != 0) {
log_error(output_fd, errno, "failed to set send timeout");
return false;
}
return true;
};
unique_fd sockfd(socket(AF_LOCAL, SOCK_SEQPACKET, 0));
if (sockfd == -1) {
log_error(output_fd, errno, "failed to create socket");
return false;
}
if (!update_timeout(sockfd, end)) return false;
if (socket_local_client_connect(sockfd.get(), kTombstonedInterceptSocketName,
ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_SEQPACKET) == -1) {
log_error(output_fd, errno, "failed to connect to tombstoned");
return false;
}
InterceptRequest req = {
.dump_type = dump_type,
.pid = tid,
};
// Create an intermediate pipe to pass to the other end.
unique_fd pipe_read, pipe_write;
if (!Pipe(&pipe_read, &pipe_write)) {
log_error(output_fd, errno, "failed to create pipe");
return false;
}
std::string pipe_size_str;
int pipe_buffer_size = 1024 * 1024;
if (android::base::ReadFileToString("/proc/sys/fs/pipe-max-size", &pipe_size_str)) {
pipe_size_str = android::base::Trim(pipe_size_str);
if (!android::base::ParseInt(pipe_size_str.c_str(), &pipe_buffer_size, 0)) {
LOG(FATAL) << "failed to parse pipe max size '" << pipe_size_str << "'";
}
}
if (fcntl(pipe_read.get(), F_SETPIPE_SZ, pipe_buffer_size) != pipe_buffer_size) {
log_error(output_fd, errno, "failed to set pipe buffer size");
}
if (!update_timeout(sockfd, end)) return false;
ssize_t rc = SendFileDescriptors(sockfd, &req, sizeof(req), pipe_write.get());
pipe_write.reset();
if (rc != sizeof(req)) {
log_error(output_fd, errno, "failed to send output fd to tombstoned");
return false;
}
auto get_response = [&output_fd](const char* kind, int sockfd, InterceptResponse* response) {
ssize_t rc = TEMP_FAILURE_RETRY(recv(sockfd, response, sizeof(*response), MSG_TRUNC));
if (rc == 0) {
log_error(output_fd, 0, "failed to read %s response from tombstoned: timeout reached?", kind);
return false;
} else if (rc == -1) {
log_error(output_fd, errno, "failed to read %s response from tombstoned", kind);
return false;
} else if (rc != sizeof(*response)) {
log_error(output_fd, 0,
"received packet of unexpected length from tombstoned while reading %s response: "
"expected %zd, received %zd",
kind, sizeof(*response), rc);
return false;
}
return true;
};
// Check to make sure we've successfully registered.
InterceptResponse response;
if (!update_timeout(sockfd, end)) return false;
if (!get_response("initial", sockfd, &response)) return false;
if (response.status != InterceptStatus::kRegistered) {
log_error(output_fd, 0, "unexpected registration response: %d",
static_cast<int>(response.status));
return false;
}
// Send the signal.
const int signal = (dump_type == kDebuggerdJavaBacktrace) ? SIGQUIT : BIONIC_SIGNAL_DEBUGGER;
sigval val = {.sival_int = (dump_type == kDebuggerdNativeBacktrace) ? 1 : 0};
if (sigqueue(tid, signal, val) != 0) {
log_error(output_fd, errno, "failed to send signal to pid %d", tid);
return false;
}
if (!update_timeout(sockfd, end)) return false;
if (!get_response("status", sockfd, &response)) return false;
if (response.status != InterceptStatus::kStarted) {
response.error_message[sizeof(response.error_message) - 1] = '\0';
log_error(output_fd, 0, "tombstoned reported failure: %s", response.error_message);
return false;
}
// Forward output from the pipe to the output fd.
while (true) {
auto remaining = end - std::chrono::steady_clock::now();
auto remaining_ms = std::chrono::duration_cast<std::chrono::milliseconds>(remaining).count();
if (timeout_ms <= 0) {
remaining_ms = -1;
} else if (remaining_ms < 0) {
log_error(output_fd, 0, "timeout expired before poll");
return false;
}
struct pollfd pfd = {
.fd = pipe_read.get(), .events = POLLIN, .revents = 0,
};
rc = poll(&pfd, 1, remaining_ms);
if (rc == -1) {
if (errno == EINTR) {
continue;
} else {
log_error(output_fd, errno, "error while polling");
return false;
}
} else if (rc == 0) {
log_error(output_fd, 0, "poll timeout expired");
return false;
}
// WARNING: It's not possible to replace the below with a splice call.
// Due to the way debuggerd does many small writes across the pipe,
// this would cause splice to copy a page for each write. The second
// pipe fills up based on the number of pages being copied, even
// though there is not much data being transferred per page. When
// the second pipe is full, everything stops since there is nothing
// reading the second pipe to clear it.
char buf[1024];
rc = TEMP_FAILURE_RETRY(read(pipe_read.get(), buf, sizeof(buf)));
if (rc == 0) {
// Done.
break;
} else if (rc == -1) {
log_error(output_fd, errno, "error while reading");
return false;
}
if (!android::base::WriteFully(output_fd.get(), buf, rc)) {
log_error(output_fd, errno, "error while writing");
return false;
}
}
LOG(INFO) << TAG "done dumping process " << tid;
return true;
}
int dump_backtrace_to_file(pid_t tid, DebuggerdDumpType dump_type, int fd) {
return dump_backtrace_to_file_timeout(tid, dump_type, 0, fd);
}
int dump_backtrace_to_file_timeout(pid_t tid, DebuggerdDumpType dump_type, int timeout_secs,
int fd) {
android::base::unique_fd copy(dup(fd));
if (copy == -1) {
return -1;
}
// debuggerd_trigger_dump results in every thread in the process being interrupted
// by a signal, so we need to fetch the wchan data before calling that.
std::string wchan_data = get_wchan_data(fd, tid);
int timeout_ms = timeout_secs > 0 ? timeout_secs * 1000 : 0;
int ret = debuggerd_trigger_dump(tid, dump_type, timeout_ms, std::move(copy)) ? 0 : -1;
// Dump wchan data, since only privileged processes (CAP_SYS_ADMIN) can read
// kernel stack traces (/proc/*/stack).
if (!WriteStringToFd(wchan_data, fd)) {
LOG(WARNING) << TAG "Failed to dump wchan data for pid: " << tid;
}
return ret;
}
================================================
FILE: debuggerd/client/debuggerd_client_test.cpp
================================================
/*
* Copyright 2017, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <debuggerd/client.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/eventfd.h>
#include <unistd.h>
#include <chrono>
#include <thread>
#include <vector>
#include <gtest/gtest.h>
#include <android-base/file.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <android-base/unique_fd.h>
#include "util.h"
using namespace std::chrono_literals;
using android::base::unique_fd;
static int getThreadCount() {
int threadCount = 1024;
std::vector<std::string> characteristics =
android::base::Split(android::base::GetProperty("ro.build.characteristics", ""), ",");
if (std::find(characteristics.begin(), characteristics.end(), "embedded")
!= characteristics.end()) {
// 128 is the realistic number for iot devices.
threadCount = 128;
}
return threadCount;
}
TEST(debuggerd_client, race) {
static int THREAD_COUNT = getThreadCount();
// Semaphore incremented once per thread started.
unique_fd barrier(eventfd(0, EFD_SEMAPHORE));
ASSERT_NE(-1, barrier.get());
pid_t forkpid = fork();
ASSERT_NE(-1, forkpid);
if (forkpid == 0) {
// Spawn a bunch of threads, to make crash_dump take longer.
std::vector<std::thread> threads;
threads.reserve(THREAD_COUNT);
for (int i = 0; i < THREAD_COUNT; ++i) {
threads.emplace_back([&barrier]() {
uint64_t count = 1;
ASSERT_NE(-1, write(barrier.get(), &count, sizeof(count)));
for (;;) {
pause();
}
});
}
for (;;) {
pause();
}
}
// Wait for the child to spawn all of its threads.
for (int i = 0; i < THREAD_COUNT; ++i) {
uint64_t count;
ASSERT_NE(-1, read(barrier.get(), &count, sizeof(count)));
}
unique_fd pipe_read, pipe_write;
ASSERT_TRUE(Pipe(&pipe_read, &pipe_write));
// 16 MiB should be enough for everyone.
constexpr int PIPE_SIZE = 16 * 1024 * 1024;
ASSERT_EQ(PIPE_SIZE, fcntl(pipe_read.get(), F_SETPIPE_SZ, PIPE_SIZE));
ASSERT_TRUE(
debuggerd_trigger_dump(forkpid, kDebuggerdNativeBacktrace, 60000, std::move(pipe_write)));
// Immediately kill the forked child, to make sure that the dump didn't return early.
ASSERT_EQ(0, kill(forkpid, SIGKILL)) << strerror(errno);
// Check the output.
std::string result;
ASSERT_TRUE(android::base::ReadFdToString(pipe_read.get(), &result));
// Look for "----- end <PID> -----"
int found_end = 0;
std::string expected_end = android::base::StringPrintf("----- end %d -----", forkpid);
std::vector<std::string> lines = android::base::Split(result, "\n");
for (const std::string& line : lines) {
if (line == expected_end) {
++found_end;
}
}
EXPECT_EQ(1, found_end) << "\nOutput: \n" << result;
}
TEST(debuggerd_client, no_timeout) {
unique_fd pipe_read, pipe_write;
ASSERT_TRUE(Pipe(&pipe_read, &pipe_write));
pid_t forkpid = fork();
ASSERT_NE(-1, forkpid);
if (forkpid == 0) {
pipe_write.reset();
char dummy;
TEMP_FAILURE_RETRY(read(pipe_read.get(), &dummy, sizeof(dummy)));
exit(0);
}
pipe_read.reset();
unique_fd output_read, output_write;
ASSERT_TRUE(Pipe(&output_read, &output_write));
ASSERT_TRUE(
debuggerd_trigger_dump(forkpid, kDebuggerdNativeBacktrace, 0, std::move(output_write)));
}
================================================
FILE: debuggerd/common/include/dump_type.h
================================================
#pragma once
/*
* Copyright 2017, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <sys/types.h>
#include <ostream>
enum DebuggerdDumpType : uint8_t {
kDebuggerdNativeBacktrace,
kDebuggerdTombstone,
kDebuggerdJavaBacktrace,
kDebuggerdAnyIntercept,
kDebuggerdTombstoneProto,
};
inline const char* get_dump_type_name(const DebuggerdDumpType& dump_type) {
switch (dump_type) {
case kDebuggerdNativeBacktrace:
return "kDebuggerdNativeBacktrace";
case kDebuggerdTombstone:
return "kDebuggerdTombstone";
case kDebuggerdJavaBacktrace:
return "kDebuggerdJavaBacktrace";
case kDebuggerdAnyIntercept:
return "kDebuggerdAnyIntercept";
case kDebuggerdTombstoneProto:
return "kDebuggerdTombstoneProto";
default:
return "[unknown]";
}
}
inline std::ostream& operator<<(std::ostream& stream, const DebuggerdDumpType& rhs) {
stream << get_dump_type_name(rhs);
return stream;
}
================================================
FILE: debuggerd/crash_dump.cpp
================================================
/*
* Copyright 2016, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <arpa/inet.h>
#include <dirent.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/prctl.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/un.h>
#include <sys/user.h>
#include <sys/wait.h>
#include <unistd.h>
#if defined(__i386__)
#include <asm/ldt.h>
#endif
#include <cstdint>
#include <limits>
#include <map>
#include <memory>
#include <set>
#include <vector>
#include <android-base/errno_restorer.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/macros.h>
#include <android-base/parseint.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <android-base/unique_fd.h>
#include <bionic/macros.h>
#include <bionic/reserved_signals.h>
#include <bionic/tls_defines.h>
#include <cutils/sockets.h>
#include <log/log.h>
#include <private/android_filesystem_config.h>
#include <procinfo/process.h>
#define ATRACE_TAG ATRACE_TAG_BIONIC
#include <utils/Trace.h>
#include <unwindstack/AndroidUnwinder.h>
#include <unwindstack/Error.h>
#include <unwindstack/MachineArm.h>
#include <unwindstack/MachineArm64.h>
#include <unwindstack/MachineRiscv64.h>
#include <unwindstack/Regs.h>
#include <unwindstack/RegsArm.h>
#include <unwindstack/RegsArm64.h>
#include <unwindstack/RegsRiscv64.h>
#include <unwindstack/UserArm.h>
#include <unwindstack/UserArm64.h>
#include <unwindstack/UserRiscv64.h>
#include <native_bridge_support/guest_state_accessor/accessor.h>
#include "libdebuggerd/backtrace.h"
#include "libdebuggerd/tombstone.h"
#include "libdebuggerd/utility.h"
#include "debuggerd/handler.h"
#include "tombstone_handler.h"
#include "protocol.h"
#include "util.h"
using android::base::ErrnoRestorer;
using android::base::StringPrintf;
using android::base::unique_fd;
// This stores guest architecture. When the architecture is supported, tombstone file will output
// guest state information.
static Architecture g_guest_arch = Architecture::NONE;
static bool pid_contains_tid(int pid_proc_fd, pid_t tid) {
struct stat st;
std::string task_path = StringPrintf("task/%d", tid);
return fstatat(pid_proc_fd, task_path.c_str(), &st, 0) == 0;
}
static pid_t get_tracer(pid_t tracee) {
// Check to see if the thread is being ptraced by another process.
android::procinfo::ProcessInfo process_info;
if (android::procinfo::GetProcessInfo(tracee, &process_info)) {
return process_info.tracer;
}
return -1;
}
// Attach to a thread, and verify that it's still a member of the given process
static bool ptrace_seize_thread(int pid_proc_fd, pid_t tid, std::string* error, int flags = 0) {
if (ptrace(PTRACE_SEIZE, tid, 0, flags) != 0) {
if (errno == EPERM) {
ErrnoRestorer errno_restorer; // In case get_tracer() fails and we fall through.
pid_t tracer_pid = get_tracer(tid);
if (tracer_pid > 0) {
*error = StringPrintf("failed to attach to thread %d, already traced by %d (%s)", tid,
tracer_pid, get_process_name(tracer_pid).c_str());
return false;
}
}
*error = StringPrintf("failed to attach to thread %d: %s", tid, strerror(errno));
return false;
}
// Make sure that the task we attached to is actually part of the pid we're dumping.
if (!pid_contains_tid(pid_proc_fd, tid)) {
if (ptrace(PTRACE_DETACH, tid, 0, 0) != 0) {
PLOG(WARNING) << "failed to detach from thread " << tid;
}
*error = StringPrintf("thread %d is not in process", tid);
return false;
}
return true;
}
static bool wait_for_stop(pid_t tid, int* received_signal) {
while (true) {
int status;
pid_t result = waitpid(tid, &status, __WALL);
if (result != tid) {
PLOG(ERROR) << "waitpid failed on " << tid << " while detaching";
return false;
}
if (WIFSTOPPED(status)) {
if (status >> 16 == PTRACE_EVENT_STOP) {
*received_signal = 0;
} else {
*received_signal = WSTOPSIG(status);
}
return true;
}
}
}
// Interrupt a process and wait for it to be interrupted.
static bool ptrace_interrupt(pid_t tid, int* received_signal) {
if (ptrace(PTRACE_INTERRUPT, tid, 0, 0) == 0) {
return wait_for_stop(tid, received_signal);
}
PLOG(ERROR) << "failed to interrupt " << tid << " to detach";
return false;
}
static bool activity_manager_notify(pid_t pid, int signal, const std::string& amfd_data,
bool recoverable_crash) {
ATRACE_CALL();
android::base::unique_fd amfd(socket_local_client(
"/data/system/ndebugsocket", ANDROID_SOCKET_NAMESPACE_FILESYSTEM, SOCK_STREAM));
if (amfd.get() == -1) {
PLOG(ERROR) << "unable to connect to activity manager";
return false;
}
struct timeval tv = {
.tv_sec = 1 * android::base::HwTimeoutMultiplier(),
.tv_usec = 0,
};
if (setsockopt(amfd.get(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1) {
PLOG(ERROR) << "failed to set send timeout on activity manager socket";
return false;
}
tv.tv_sec = 3 * android::base::HwTimeoutMultiplier(); // 3 seconds on handshake read
if (setsockopt(amfd.get(), SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == -1) {
PLOG(ERROR) << "failed to set receive timeout on activity manager socket";
return false;
}
// Activity Manager protocol:
// - 32-bit network-byte-order: pid
// - 32-bit network-byte-order: signal number
// - byte: recoverable_crash
// - bytes: raw text of the dump
// - null terminator
uint32_t datum = htonl(pid);
if (!android::base::WriteFully(amfd, &datum, sizeof(datum))) {
PLOG(ERROR) << "AM pid write failed";
return false;
}
datum = htonl(signal);
if (!android::base::WriteFully(amfd, &datum, sizeof(datum))) {
PLOG(ERROR) << "AM signo write failed";
return false;
}
uint8_t recoverable_crash_byte = recoverable_crash ? 1 : 0;
if (!android::base::WriteFully(amfd, &recoverable_crash_byte, sizeof(recoverable_crash_byte))) {
PLOG(ERROR) << "AM recoverable_crash_byte write failed";
return false;
}
if (!android::base::WriteFully(amfd, amfd_data.c_str(), amfd_data.size() + 1)) {
PLOG(ERROR) << "AM data write failed";
return false;
}
// 3 sec timeout reading the ack; we're fine if the read fails.
char ack;
android::base::ReadFully(amfd, &ack, 1);
return true;
}
// Globals used by the abort handler.
static pid_t g_target_thread = -1;
static bool g_tombstoned_connected = false;
static unique_fd g_tombstoned_socket;
static unique_fd g_output_fd;
static unique_fd g_proto_fd;
static void DefuseSignalHandlers() {
// Don't try to dump ourselves.
struct sigaction action = {};
action.sa_handler = SIG_DFL;
debuggerd_register_handlers(&action);
sigset_t mask;
sigemptyset(&mask);
if (sigprocmask(SIG_SETMASK, &mask, nullptr) != 0) {
PLOG(FATAL) << "failed to set signal mask";
}
}
static void Initialize(char** argv) {
android::base::InitLogging(argv);
android::base::SetAborter([](const char* abort_msg) {
// If we abort before we get an output fd, contact tombstoned to
gitextract_0nlnlp4w/
├── .gitignore
├── Android.bp
├── CleanSpec.mk
├── MODULE_LICENSE_APACHE2
├── OWNERS
├── PREUPLOAD.cfg
├── bootstat/
│ ├── Android.bp
│ ├── OWNERS
│ ├── README.md
│ ├── boot_event_record_store.cpp
│ ├── boot_event_record_store.h
│ ├── boot_event_record_store_test.cpp
│ ├── boot_reason_test.sh
│ ├── bootstat-debug.rc
│ ├── bootstat.cpp
│ ├── bootstat.rc
│ └── testrunner.cpp
├── cli-test/
│ ├── Android.bp
│ ├── README.md
│ └── cli-test.cpp
├── code_coverage/
│ ├── Android.bp
│ ├── empty_policy/
│ │ ├── code_coverage.arm.policy
│ │ ├── code_coverage.arm64.policy
│ │ ├── code_coverage.riscv64.policy
│ │ ├── code_coverage.x86.policy
│ │ └── code_coverage.x86_64.policy
│ └── seccomp_policy/
│ ├── code_coverage.arm.policy
│ ├── code_coverage.arm64.policy
│ ├── code_coverage.policy.def
│ ├── code_coverage.riscv64.policy
│ ├── code_coverage.x86.policy
│ ├── code_coverage.x86_64.policy
│ └── generate.sh
├── debuggerd/
│ ├── Android.bp
│ ├── MODULE_LICENSE_APACHE2
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── client/
│ │ ├── debuggerd_client.cpp
│ │ └── debuggerd_client_test.cpp
│ ├── common/
│ │ └── include/
│ │ └── dump_type.h
│ ├── crash_dump.cpp
│ ├── crash_test.cpp
│ ├── crash_test.h
│ ├── crasher/
│ │ ├── Android.bp
│ │ ├── arm/
│ │ │ └── crashglue.S
│ │ ├── arm64/
│ │ │ └── crashglue.S
│ │ ├── crasher.cpp
│ │ ├── riscv64/
│ │ │ └── crashglue.S
│ │ ├── x86/
│ │ │ └── crashglue.S
│ │ └── x86_64/
│ │ └── crashglue.S
│ ├── debuggerd.cpp
│ ├── debuggerd_benchmark.cpp
│ ├── debuggerd_test.cpp
│ ├── handler/
│ │ ├── debuggerd_fallback.cpp
│ │ ├── debuggerd_fallback_nop.cpp
│ │ ├── debuggerd_handler.cpp
│ │ └── fallback.h
│ ├── include/
│ │ └── debuggerd/
│ │ ├── client.h
│ │ └── handler.h
│ ├── libdebuggerd/
│ │ ├── backtrace.cpp
│ │ ├── gwp_asan.cpp
│ │ ├── include/
│ │ │ └── libdebuggerd/
│ │ │ ├── backtrace.h
│ │ │ ├── gwp_asan.h
│ │ │ ├── open_files_list.h
│ │ │ ├── scudo.h
│ │ │ ├── tombstone.h
│ │ │ ├── tombstone_proto_to_text.h
│ │ │ ├── types.h
│ │ │ ├── utility.h
│ │ │ └── utility_host.h
│ │ ├── open_files_list.cpp
│ │ ├── scudo.cpp
│ │ ├── test/
│ │ │ ├── UnwinderMock.h
│ │ │ ├── dump_memory_test.cpp
│ │ │ ├── elf_fake.cpp
│ │ │ ├── elf_fake.h
│ │ │ ├── log_fake.cpp
│ │ │ ├── log_fake.h
│ │ │ ├── mte_stack_record_test.cpp
│ │ │ ├── open_files_list_test.cpp
│ │ │ └── tombstone_proto_to_text_test.cpp
│ │ ├── tombstone.cpp
│ │ ├── tombstone_proto.cpp
│ │ ├── tombstone_proto_to_text.cpp
│ │ ├── utility.cpp
│ │ └── utility_host.cpp
│ ├── pbtombstone.cpp
│ ├── proto/
│ │ ├── Android.bp
│ │ ├── jarjar-rules.txt
│ │ └── tombstone.proto
│ ├── protocol.h
│ ├── rust/
│ │ └── tombstoned_client/
│ │ ├── Android.bp
│ │ ├── src/
│ │ │ └── lib.rs
│ │ ├── wrapper.cpp
│ │ └── wrapper.hpp
│ ├── seccomp_policy/
│ │ ├── crash_dump.arm.policy
│ │ ├── crash_dump.arm64.policy
│ │ ├── crash_dump.policy.def
│ │ ├── crash_dump.riscv64.policy
│ │ ├── crash_dump.x86.policy
│ │ ├── crash_dump.x86_64.policy
│ │ └── generate.sh
│ ├── test_permissive_mte/
│ │ ├── Android.bp
│ │ ├── AndroidTest.xml
│ │ ├── mte_crash.cpp
│ │ └── src/
│ │ └── com/
│ │ └── android/
│ │ └── tests/
│ │ └── debuggerd/
│ │ └── PermissiveMteTest.java
│ ├── tombstone_handler.cpp
│ ├── tombstone_handler.h
│ ├── tombstone_symbolize.cpp
│ ├── tombstone_symbolize.h
│ ├── tombstoned/
│ │ ├── include/
│ │ │ └── tombstoned/
│ │ │ └── tombstoned.h
│ │ ├── intercept_manager.cpp
│ │ ├── intercept_manager.h
│ │ ├── tombstoned.cpp
│ │ ├── tombstoned.microdroid.rc
│ │ ├── tombstoned.rc
│ │ └── tombstoned_client.cpp
│ ├── util.cpp
│ └── util.h
├── diagnose_usb/
│ ├── Android.bp
│ ├── OWNERS
│ ├── diagnose_usb.cpp
│ └── include/
│ └── diagnose_usb.h
├── fastboot/
│ ├── Android.bp
│ ├── LICENSE
│ ├── OWNERS
│ ├── README.md
│ ├── TEST_MAPPING
│ ├── bootimg_utils.cpp
│ ├── bootimg_utils.h
│ ├── constants.h
│ ├── device/
│ │ ├── commands.cpp
│ │ ├── commands.h
│ │ ├── fastboot_device.cpp
│ │ ├── fastboot_device.h
│ │ ├── flashing.cpp
│ │ ├── flashing.h
│ │ ├── main.cpp
│ │ ├── tcp_client.cpp
│ │ ├── tcp_client.h
│ │ ├── usb.cpp
│ │ ├── usb.h
│ │ ├── usb_client.cpp
│ │ ├── usb_client.h
│ │ ├── usb_iouring.cpp
│ │ ├── usb_iouring.h
│ │ ├── utility.cpp
│ │ ├── utility.h
│ │ ├── variables.cpp
│ │ └── variables.h
│ ├── fastboot.bash
│ ├── fastboot.cpp
│ ├── fastboot.h
│ ├── fastboot_driver.cpp
│ ├── fastboot_driver.h
│ ├── fastboot_driver_interface.h
│ ├── fastboot_driver_mock.h
│ ├── fastboot_driver_test.cpp
│ ├── fastboot_integration_test.xml
│ ├── fastboot_test.cpp
│ ├── filesystem.cpp
│ ├── filesystem.h
│ ├── fs.cpp
│ ├── fs.h
│ ├── fuzzer/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── fastboot_fuzzer.cpp
│ │ ├── socket_mock_fuzz.cpp
│ │ └── socket_mock_fuzz.h
│ ├── fuzzy_fastboot/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── example/
│ │ │ ├── checksum_parser.py
│ │ │ ├── config.xml
│ │ │ └── validator.py
│ │ ├── extensions.cpp
│ │ ├── extensions.h
│ │ ├── fixtures.cpp
│ │ ├── fixtures.h
│ │ ├── main.cpp
│ │ ├── test_listeners.h
│ │ ├── test_utils.cpp
│ │ ├── test_utils.h
│ │ ├── transport_sniffer.cpp
│ │ └── transport_sniffer.h
│ ├── main.cpp
│ ├── mock_transport.h
│ ├── result.h
│ ├── socket.cpp
│ ├── socket.h
│ ├── socket_mock.cpp
│ ├── socket_mock.h
│ ├── socket_test.cpp
│ ├── storage.cpp
│ ├── storage.h
│ ├── super_flash_helper.cpp
│ ├── super_flash_helper.h
│ ├── super_flash_helper_test.cpp
│ ├── task.cpp
│ ├── task.h
│ ├── task_test.cpp
│ ├── tcp.cpp
│ ├── tcp.h
│ ├── tcp_test.cpp
│ ├── test_fastboot.py
│ ├── testdata/
│ │ ├── Android.bp
│ │ ├── fastboot_gen_rand.py
│ │ ├── make_super_images.sh
│ │ ├── super.img
│ │ ├── super_empty.img
│ │ └── system.img
│ ├── transport.h
│ ├── udp.cpp
│ ├── udp.h
│ ├── udp_test.cpp
│ ├── usb.h
│ ├── usb_linux.cpp
│ ├── usb_osx.cpp
│ ├── usb_windows.cpp
│ ├── util.cpp
│ ├── util.h
│ ├── vendor_boot_img_utils.cpp
│ ├── vendor_boot_img_utils.h
│ └── vendor_boot_img_utils_test.cpp
├── fs_mgr/
│ ├── Android.bp
│ ├── NOTICE
│ ├── OWNERS
│ ├── README.overlayfs.md
│ ├── TEST_MAPPING
│ ├── blockdev.cpp
│ ├── blockdev.h
│ ├── clean_scratch_files.rc
│ ├── file_wait.cpp
│ ├── fs_mgr.cpp
│ ├── fs_mgr_dm_linear.cpp
│ ├── fs_mgr_format.cpp
│ ├── fs_mgr_overlayfs_control.cpp
│ ├── fs_mgr_overlayfs_control.h
│ ├── fs_mgr_overlayfs_mount.cpp
│ ├── fs_mgr_overlayfs_mount.h
│ ├── fs_mgr_priv.h
│ ├── fs_mgr_remount.cpp
│ ├── fs_mgr_roots.cpp
│ ├── fs_mgr_vendor_overlay.cpp
│ ├── include/
│ │ ├── fs_mgr/
│ │ │ ├── file_wait.h
│ │ │ └── roots.h
│ │ ├── fs_mgr.h
│ │ ├── fs_mgr_dm_linear.h
│ │ ├── fs_mgr_overlayfs.h
│ │ └── fs_mgr_vendor_overlay.h
│ ├── libdm/
│ │ ├── Android.bp
│ │ ├── dm.cpp
│ │ ├── dm_table.cpp
│ │ ├── dm_target.cpp
│ │ ├── dm_test.cpp
│ │ ├── include/
│ │ │ └── libdm/
│ │ │ ├── dm.h
│ │ │ ├── dm_table.h
│ │ │ ├── dm_target.h
│ │ │ └── loop_control.h
│ │ ├── loop_control.cpp
│ │ ├── loop_control_test.cpp
│ │ ├── test_util.cpp
│ │ ├── test_util.h
│ │ ├── utility.cpp
│ │ └── utility.h
│ ├── libfiemap/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── binder.cpp
│ │ ├── fiemap_status.cpp
│ │ ├── fiemap_writer.cpp
│ │ ├── fiemap_writer_test.cpp
│ │ ├── image_manager.cpp
│ │ ├── image_test.cpp
│ │ ├── include/
│ │ │ └── libfiemap/
│ │ │ ├── fiemap_status.h
│ │ │ ├── fiemap_writer.h
│ │ │ ├── image_manager.h
│ │ │ └── split_fiemap_writer.h
│ │ ├── metadata.cpp
│ │ ├── metadata.h
│ │ ├── passthrough.cpp
│ │ ├── split_fiemap_writer.cpp
│ │ ├── testdata/
│ │ │ ├── file_32k
│ │ │ ├── file_4k
│ │ │ └── unaligned_file
│ │ ├── utility.cpp
│ │ └── utility.h
│ ├── libfs_avb/
│ │ ├── Android.bp
│ │ ├── avb_ops.cpp
│ │ ├── avb_ops.h
│ │ ├── avb_util.cpp
│ │ ├── avb_util.h
│ │ ├── fs_avb.cpp
│ │ ├── fs_avb_util.cpp
│ │ ├── include/
│ │ │ └── fs_avb/
│ │ │ ├── fs_avb.h
│ │ │ ├── fs_avb_util.h
│ │ │ └── types.h
│ │ ├── run_tests.sh
│ │ ├── sha.h
│ │ ├── tests/
│ │ │ ├── avb_util_test.cpp
│ │ │ ├── basic_test.cpp
│ │ │ ├── data/
│ │ │ │ ├── testkey_rsa2048.pem
│ │ │ │ ├── testkey_rsa4096.pem
│ │ │ │ └── testkey_rsa8192.pem
│ │ │ ├── fs_avb_device_test.cpp
│ │ │ ├── fs_avb_test.cpp
│ │ │ ├── fs_avb_test_util.cpp
│ │ │ ├── fs_avb_test_util.h
│ │ │ ├── fs_avb_util_test.cpp
│ │ │ └── util_test.cpp
│ │ ├── types.cpp
│ │ ├── util.cpp
│ │ └── util.h
│ ├── libfstab/
│ │ ├── Android.bp
│ │ ├── boot_config.cpp
│ │ ├── fstab.cpp
│ │ ├── fstab_priv.h
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ ├── fs_mgr_fstab_fuzzer.cpp
│ │ │ └── fstab.dict
│ │ ├── include/
│ │ │ └── fstab/
│ │ │ └── fstab.h
│ │ ├── logging_macros.h
│ │ └── slotselect.cpp
│ ├── liblp/
│ │ ├── Android.bp
│ │ ├── OWNERS
│ │ ├── TEST_MAPPING
│ │ ├── builder.cpp
│ │ ├── builder_test.cpp
│ │ ├── device_test.cpp
│ │ ├── fuzzer/
│ │ │ ├── Android.bp
│ │ │ ├── README.md
│ │ │ ├── image_gen_rand.py
│ │ │ ├── liblp_apis_fuzzer.cpp
│ │ │ ├── liblp_builder_fuzzer.cpp
│ │ │ └── liblp_super_layout_builder_fuzzer.cpp
│ │ ├── images.cpp
│ │ ├── images.h
│ │ ├── include/
│ │ │ └── liblp/
│ │ │ ├── builder.h
│ │ │ ├── liblp.h
│ │ │ ├── metadata_format.h
│ │ │ ├── mock_property_fetcher.h
│ │ │ ├── partition_opener.h
│ │ │ ├── property_fetcher.h
│ │ │ └── super_layout_builder.h
│ │ ├── io_test.cpp
│ │ ├── liblp_test.h
│ │ ├── partition_opener.cpp
│ │ ├── property_fetcher.cpp
│ │ ├── reader.cpp
│ │ ├── reader.h
│ │ ├── super_layout_builder.cpp
│ │ ├── super_layout_builder_test.cpp
│ │ ├── test_partition_opener.cpp
│ │ ├── test_partition_opener.h
│ │ ├── utility.cpp
│ │ ├── utility.h
│ │ ├── utility_test.cpp
│ │ ├── writer.cpp
│ │ └── writer.h
│ ├── libsnapshot/
│ │ ├── Android.bp
│ │ ├── OWNERS
│ │ ├── android/
│ │ │ └── snapshot/
│ │ │ └── snapshot.proto
│ │ ├── device_info.cpp
│ │ ├── device_info.h
│ │ ├── dm_snapshot_internals.h
│ │ ├── include/
│ │ │ └── libsnapshot/
│ │ │ ├── auto_device.h
│ │ │ ├── cow_compress.h
│ │ │ ├── cow_format.h
│ │ │ ├── cow_reader.h
│ │ │ ├── cow_writer.h
│ │ │ ├── mock_cow_writer.h
│ │ │ ├── mock_device_info.h
│ │ │ ├── mock_snapshot.h
│ │ │ ├── mock_snapshot_merge_stats.h
│ │ │ ├── return.h
│ │ │ ├── snapshot.h
│ │ │ ├── snapshot_stats.h
│ │ │ └── snapshot_stub.h
│ │ ├── include_test/
│ │ │ └── libsnapshot/
│ │ │ └── test_helpers.h
│ │ ├── libsnapshot_cow/
│ │ │ ├── cow_compress.cpp
│ │ │ ├── cow_decompress.cpp
│ │ │ ├── cow_decompress.h
│ │ │ ├── cow_format.cpp
│ │ │ ├── cow_reader.cpp
│ │ │ ├── create_cow.cpp
│ │ │ ├── inspect_cow.cpp
│ │ │ ├── parser_base.h
│ │ │ ├── parser_v2.cpp
│ │ │ ├── parser_v2.h
│ │ │ ├── parser_v3.cpp
│ │ │ ├── parser_v3.h
│ │ │ ├── snapshot_reader.cpp
│ │ │ ├── snapshot_reader.h
│ │ │ ├── snapshot_reader_test.cpp
│ │ │ ├── test_v2.cpp
│ │ │ ├── test_v3.cpp
│ │ │ ├── writer_base.cpp
│ │ │ ├── writer_base.h
│ │ │ ├── writer_v2.cpp
│ │ │ ├── writer_v2.h
│ │ │ ├── writer_v3.cpp
│ │ │ └── writer_v3.h
│ │ ├── partition_cow_creator.cpp
│ │ ├── partition_cow_creator.h
│ │ ├── partition_cow_creator_test.cpp
│ │ ├── return.cpp
│ │ ├── scratch_super.cpp
│ │ ├── scratch_super.h
│ │ ├── scripts/
│ │ │ ├── Android.bp
│ │ │ ├── apply-update.sh
│ │ │ └── dump_snapshot_proto.py
│ │ ├── snapshot.cpp
│ │ ├── snapshot_metadata_updater.cpp
│ │ ├── snapshot_metadata_updater.h
│ │ ├── snapshot_metadata_updater_test.cpp
│ │ ├── snapshot_stats.cpp
│ │ ├── snapshot_stub.cpp
│ │ ├── snapshot_test.cpp
│ │ ├── snapshotctl.cpp
│ │ ├── snapuserd/
│ │ │ ├── Android.bp
│ │ │ ├── OWNERS
│ │ │ ├── dm_user_block_server.cpp
│ │ │ ├── include/
│ │ │ │ └── snapuserd/
│ │ │ │ ├── block_server.h
│ │ │ │ ├── dm_user_block_server.h
│ │ │ │ ├── snapuserd_buffer.h
│ │ │ │ ├── snapuserd_client.h
│ │ │ │ └── snapuserd_kernel.h
│ │ │ ├── snapuserd.rc
│ │ │ ├── snapuserd_buffer.cpp
│ │ │ ├── snapuserd_client.cpp
│ │ │ ├── snapuserd_daemon.cpp
│ │ │ ├── snapuserd_daemon.h
│ │ │ ├── snapuserd_extractor.cpp
│ │ │ ├── snapuserd_logging.h
│ │ │ ├── testing/
│ │ │ │ ├── dm_user_harness.cpp
│ │ │ │ ├── dm_user_harness.h
│ │ │ │ ├── harness.cpp
│ │ │ │ ├── harness.h
│ │ │ │ ├── host_harness.cpp
│ │ │ │ ├── host_harness.h
│ │ │ │ └── temp_device.h
│ │ │ ├── user-space-merge/
│ │ │ │ ├── extractor.cpp
│ │ │ │ ├── extractor.h
│ │ │ │ ├── handler_manager.cpp
│ │ │ │ ├── handler_manager.h
│ │ │ │ ├── merge_worker.cpp
│ │ │ │ ├── merge_worker.h
│ │ │ │ ├── read_worker.cpp
│ │ │ │ ├── read_worker.h
│ │ │ │ ├── snapuserd_core.cpp
│ │ │ │ ├── snapuserd_core.h
│ │ │ │ ├── snapuserd_readahead.cpp
│ │ │ │ ├── snapuserd_readahead.h
│ │ │ │ ├── snapuserd_server.cpp
│ │ │ │ ├── snapuserd_server.h
│ │ │ │ ├── snapuserd_test.cpp
│ │ │ │ ├── snapuserd_transitions.cpp
│ │ │ │ ├── snapuserd_verify.cpp
│ │ │ │ ├── snapuserd_verify.h
│ │ │ │ ├── worker.cpp
│ │ │ │ └── worker.h
│ │ │ ├── utility.cpp
│ │ │ └── utility.h
│ │ ├── test_helpers.cpp
│ │ ├── tools/
│ │ │ ├── Android.bp
│ │ │ ├── cow_benchmark.cpp
│ │ │ ├── testdata/
│ │ │ │ ├── cow_v2
│ │ │ │ └── incompressible_block
│ │ │ └── write_cow.cpp
│ │ ├── utility.cpp
│ │ ├── utility.h
│ │ └── vts_ota_config_test.cpp
│ ├── libstorage_literals/
│ │ ├── Android.bp
│ │ └── storage_literals/
│ │ └── storage_literals.h
│ ├── libvbmeta/
│ │ ├── Android.bp
│ │ ├── builder.cpp
│ │ ├── builder.h
│ │ ├── builder_test.cpp
│ │ ├── data/
│ │ │ └── testkey_rsa2048.pem
│ │ ├── include/
│ │ │ └── libvbmeta/
│ │ │ └── libvbmeta.h
│ │ ├── reader.cpp
│ │ ├── reader.h
│ │ ├── super_vbmeta_format.h
│ │ ├── super_vbmeta_format_c.h
│ │ ├── super_vbmeta_test.cpp
│ │ ├── utility.cpp
│ │ ├── utility.h
│ │ ├── writer.cpp
│ │ └── writer.h
│ ├── tests/
│ │ ├── Android.bp
│ │ ├── AndroidTest.xml
│ │ ├── adb-remount-sh.xml
│ │ ├── adb-remount-test.sh
│ │ ├── file_wait_test.cpp
│ │ ├── fs_mgr_test.cpp
│ │ ├── src/
│ │ │ └── com/
│ │ │ └── android/
│ │ │ └── tests/
│ │ │ └── vendoroverlay/
│ │ │ └── VendorOverlayHostTest.java
│ │ ├── vendor-overlay-test.xml
│ │ └── vts_fs_test.cpp
│ └── tools/
│ ├── Android.bp
│ ├── dmctl.cpp
│ └── dmuserd.cpp
├── gatekeeperd/
│ ├── Android.bp
│ ├── GateKeeperResponse.cpp
│ ├── OWNERS
│ ├── binder/
│ │ └── android/
│ │ └── service/
│ │ └── gatekeeper/
│ │ ├── GateKeeperResponse.aidl
│ │ └── IGateKeeperService.aidl
│ ├── fuzzer/
│ │ └── GateKeeperServiceFuzzer.cpp
│ ├── gatekeeperd.cpp
│ ├── gatekeeperd.h
│ ├── gatekeeperd.rc
│ ├── include/
│ │ └── gatekeeper/
│ │ └── GateKeeperResponse.h
│ └── main.cpp
├── healthd/
│ ├── Android.bp
│ ├── AnimationParser.cpp
│ ├── AnimationParser.h
│ ├── AnimationParser_test.cpp
│ ├── BatteryMonitor.cpp
│ ├── BatteryMonitor_v1.cpp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── animation.h
│ ├── api/
│ │ ├── charger_sysprop-current.txt
│ │ └── charger_sysprop-latest.txt
│ ├── charger.cpp
│ ├── charger.sysprop
│ ├── charger_test.cpp
│ ├── charger_utils.cpp
│ ├── charger_utils.h
│ ├── healthd_draw.cpp
│ ├── healthd_draw.h
│ ├── healthd_mode_charger.cpp
│ ├── healthd_mode_charger_hidl.cpp
│ ├── healthd_mode_charger_hidl.h
│ ├── healthd_mode_charger_nops.cpp
│ ├── healthd_mode_charger_nops.h
│ ├── healthd_mode_charger_test.cpp
│ ├── include/
│ │ └── healthd/
│ │ ├── BatteryMonitor.h
│ │ ├── BatteryMonitor_v1.h
│ │ └── healthd.h
│ ├── include_charger/
│ │ └── charger/
│ │ └── healthd_mode_charger.h
│ └── testdata/
│ ├── Android.bp
│ ├── empty/
│ │ └── ensure_directory_creation.txt
│ ├── legacy/
│ │ └── res/
│ │ └── values/
│ │ └── charger/
│ │ └── animation.txt
│ ├── legacy_text_system_images/
│ │ └── res/
│ │ └── values/
│ │ └── charger/
│ │ └── animation.txt
│ └── product/
│ └── product/
│ └── etc/
│ └── res/
│ └── values/
│ └── charger/
│ └── animation.txt
├── init/
│ ├── Android.bp
│ ├── AndroidTest.xml
│ ├── MODULE_LICENSE_APACHE2
│ ├── NOTICE
│ ├── OWNERS
│ ├── README.md
│ ├── README.ueventd.md
│ ├── TEST_MAPPING
│ ├── action.cpp
│ ├── action.h
│ ├── action_manager.cpp
│ ├── action_manager.h
│ ├── action_parser.cpp
│ ├── action_parser.h
│ ├── apex_init_util.cpp
│ ├── apex_init_util.h
│ ├── block_dev_initializer.cpp
│ ├── block_dev_initializer.h
│ ├── bootchart.cpp
│ ├── bootchart.h
│ ├── builtin_arguments.h
│ ├── builtins.cpp
│ ├── builtins.h
│ ├── capabilities.cpp
│ ├── capabilities.h
│ ├── check_builtins.cpp
│ ├── check_builtins.h
│ ├── compare-bootcharts.py
│ ├── debug_ramdisk.h
│ ├── devices.cpp
│ ├── devices.h
│ ├── devices_test.cpp
│ ├── epoll.cpp
│ ├── epoll.h
│ ├── epoll_test.cpp
│ ├── extra_free_kbytes.sh
│ ├── firmware_handler.cpp
│ ├── firmware_handler.h
│ ├── firmware_handler_test.cpp
│ ├── first_stage_console.cpp
│ ├── first_stage_console.h
│ ├── first_stage_init.cpp
│ ├── first_stage_init.h
│ ├── first_stage_main.cpp
│ ├── first_stage_mount.cpp
│ ├── first_stage_mount.h
│ ├── fscrypt_init_extensions.cpp
│ ├── fscrypt_init_extensions.h
│ ├── fuzzer/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── init_parser_fuzzer.cpp
│ │ ├── init_property_fuzzer.cpp
│ │ └── init_ueventHandler_fuzzer.cpp
│ ├── grab-bootchart.sh
│ ├── host_builtin_map.py
│ ├── host_import_parser.cpp
│ ├── host_import_parser.h
│ ├── host_init_stubs.h
│ ├── host_init_verifier.cpp
│ ├── import_parser.cpp
│ ├── import_parser.h
│ ├── init.cpp
│ ├── init.h
│ ├── init_test.cpp
│ ├── interface_utils.cpp
│ ├── interface_utils.h
│ ├── interprocess_fifo.cpp
│ ├── interprocess_fifo.h
│ ├── interprocess_fifo_test.cpp
│ ├── keychords.cpp
│ ├── keychords.h
│ ├── keychords_test.cpp
│ ├── keyword_map.h
│ ├── libprefetch/
│ │ └── prefetch/
│ │ ├── Android.bp
│ │ ├── Cargo.toml
│ │ ├── OWNERS
│ │ ├── prefetch.rc
│ │ └── src/
│ │ ├── arch/
│ │ │ └── android.rs
│ │ ├── args/
│ │ │ └── args_argh.rs
│ │ ├── args.rs
│ │ ├── error.rs
│ │ ├── format.rs
│ │ ├── lib.rs
│ │ ├── main.rs
│ │ ├── replay.rs
│ │ └── tracer/
│ │ ├── mem.rs
│ │ └── mod.rs
│ ├── lmkd_service.cpp
│ ├── lmkd_service.h
│ ├── main.cpp
│ ├── modalias_handler.cpp
│ ├── modalias_handler.h
│ ├── mount_handler.cpp
│ ├── mount_handler.h
│ ├── mount_namespace.cpp
│ ├── mount_namespace.h
│ ├── noop_builtins.cpp
│ ├── oneshot_on_test.cpp
│ ├── parser/
│ │ ├── tokenizer.cpp
│ │ ├── tokenizer.h
│ │ └── tokenizer_test.cpp
│ ├── parser.cpp
│ ├── parser.h
│ ├── perfboot.py
│ ├── persistent_properties.cpp
│ ├── persistent_properties.h
│ ├── persistent_properties.proto
│ ├── persistent_properties_test.cpp
│ ├── property_service.cpp
│ ├── property_service.h
│ ├── property_service.proto
│ ├── property_service_test.cpp
│ ├── property_type.cpp
│ ├── property_type.h
│ ├── property_type_test.cpp
│ ├── proto_utils.h
│ ├── reboot.cpp
│ ├── reboot.h
│ ├── reboot_test.cpp
│ ├── reboot_utils.cpp
│ ├── reboot_utils.h
│ ├── result.h
│ ├── rlimit_parser.cpp
│ ├── rlimit_parser.h
│ ├── rlimit_parser_test.cpp
│ ├── second_stage_resources.h
│ ├── security.cpp
│ ├── security.h
│ ├── selabel.cpp
│ ├── selabel.h
│ ├── selinux.cpp
│ ├── selinux.h
│ ├── service.cpp
│ ├── service.h
│ ├── service_list.cpp
│ ├── service_list.h
│ ├── service_parser.cpp
│ ├── service_parser.h
│ ├── service_test.cpp
│ ├── service_utils.cpp
│ ├── service_utils.h
│ ├── sigchld_handler.cpp
│ ├── sigchld_handler.h
│ ├── snapuserd_transition.cpp
│ ├── snapuserd_transition.h
│ ├── subcontext.cpp
│ ├── subcontext.h
│ ├── subcontext.proto
│ ├── subcontext_benchmark.cpp
│ ├── subcontext_test.cpp
│ ├── switch_root.cpp
│ ├── switch_root.h
│ ├── test_kill_services/
│ │ ├── Android.bp
│ │ ├── AndroidTest.xml
│ │ ├── OWNERS
│ │ └── init_kill_services_test.cpp
│ ├── test_service/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ ├── test_service.cpp
│ │ └── test_service.rc
│ ├── test_upgrade_mte/
│ │ ├── Android.bp
│ │ ├── AndroidTest.xml
│ │ ├── OWNERS
│ │ ├── mte_upgrade_test.rc
│ │ ├── mte_upgrade_test_helper.cpp
│ │ └── src/
│ │ └── com/
│ │ └── android/
│ │ └── tests/
│ │ └── init/
│ │ └── MteUpgradeTest.java
│ ├── test_utils/
│ │ ├── include/
│ │ │ └── init-test-utils/
│ │ │ └── service_utils.h
│ │ └── service_utils.cpp
│ ├── tokenizer.cpp
│ ├── tokenizer.h
│ ├── tokenizer_test.cpp
│ ├── uevent.h
│ ├── uevent_handler.h
│ ├── uevent_listener.cpp
│ ├── uevent_listener.h
│ ├── ueventd.cpp
│ ├── ueventd.h
│ ├── ueventd_parser.cpp
│ ├── ueventd_parser.h
│ ├── ueventd_parser_test.cpp
│ ├── ueventd_test.cpp
│ ├── util.cpp
│ ├── util.h
│ └── util_test.cpp
├── janitors/
│ └── OWNERS
├── libappfuse/
│ ├── Android.bp
│ ├── AndroidTest.xml
│ ├── EpollController.cc
│ ├── FuseAppLoop.cc
│ ├── FuseBridgeLoop.cc
│ ├── FuseBuffer.cc
│ ├── OWNERS
│ ├── include/
│ │ └── libappfuse/
│ │ ├── EpollController.h
│ │ ├── FuseAppLoop.h
│ │ ├── FuseBridgeLoop.h
│ │ └── FuseBuffer.h
│ └── tests/
│ ├── FuseAppLoopTest.cc
│ ├── FuseBridgeLoopTest.cc
│ └── FuseBufferTest.cc
├── libasyncio/
│ ├── Android.bp
│ ├── AsyncIO.cpp
│ └── include/
│ └── asyncio/
│ └── AsyncIO.h
├── libcrypto_utils/
│ ├── Android.bp
│ ├── android_pubkey.cpp
│ ├── include/
│ │ └── crypto_utils/
│ │ └── android_pubkey.h
│ └── tests/
│ ├── Android.bp
│ └── android_pubkey_test.cpp
├── libcutils/
│ ├── Android.bp
│ ├── KernelLibcutilsTest.xml
│ ├── MODULE_LICENSE_APACHE2
│ ├── NOTICE
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── abi-dumps/
│ │ ├── arm64/
│ │ │ └── source-based/
│ │ │ └── libcutils.so.lsdump
│ │ └── arm_arm64/
│ │ └── source-based/
│ │ └── libcutils.so.lsdump
│ ├── android_get_control_env.h
│ ├── android_get_control_file.cpp
│ ├── android_get_control_file_test.cpp
│ ├── android_get_control_socket_test.cpp
│ ├── android_reboot.cpp
│ ├── ashmem-dev.cpp
│ ├── ashmem-host.cpp
│ ├── ashmem-internal.h
│ ├── ashmem_base_test.cpp
│ ├── ashmem_test.cpp
│ ├── canned_fs_config.cpp
│ ├── config_utils.cpp
│ ├── fs.cpp
│ ├── fs_config.cpp
│ ├── fs_config.h
│ ├── fs_config_test.cpp
│ ├── hashmap.cpp
│ ├── include/
│ │ ├── cutils/
│ │ │ ├── android_get_control_file.h
│ │ │ ├── android_reboot.h
│ │ │ ├── ashmem.h
│ │ │ ├── atomic.h
│ │ │ ├── bitops.h
│ │ │ ├── compiler.h
│ │ │ ├── config_utils.h
│ │ │ ├── fs.h
│ │ │ ├── hashmap.h
│ │ │ ├── iosched_policy.h
│ │ │ ├── klog.h
│ │ │ ├── list.h
│ │ │ ├── log.h
│ │ │ ├── memory.h
│ │ │ ├── misc.h
│ │ │ ├── multiuser.h
│ │ │ ├── native_handle.h
│ │ │ ├── partition_utils.h
│ │ │ ├── properties.h
│ │ │ ├── qtaguid.h
│ │ │ ├── record_stream.h
│ │ │ ├── sched_policy.h
│ │ │ ├── sockets.h
│ │ │ ├── str_parms.h
│ │ │ ├── trace.h
│ │ │ └── uevent.h
│ │ └── private/
│ │ ├── android_filesystem_config.h
│ │ ├── android_projectid_config.h
│ │ ├── canned_fs_config.h
│ │ └── fs_config.h
│ ├── iosched_policy.cpp
│ ├── klog.cpp
│ ├── load_file.cpp
│ ├── multiuser.cpp
│ ├── multiuser_test.cpp
│ ├── native_handle.cpp
│ ├── native_handle_test.cpp
│ ├── partition_utils.cpp
│ ├── properties.cpp
│ ├── properties_test.cpp
│ ├── qtaguid.cpp
│ ├── record_stream.cpp
│ ├── rust/
│ │ └── aid_bindings.h
│ ├── sched_policy_test.cpp
│ ├── socket_inaddr_any_server_unix.cpp
│ ├── socket_inaddr_any_server_windows.cpp
│ ├── socket_local_client_unix.cpp
│ ├── socket_local_server_unix.cpp
│ ├── socket_local_unix.h
│ ├── socket_network_client_unix.cpp
│ ├── socket_network_client_windows.cpp
│ ├── sockets.cpp
│ ├── sockets_test.cpp
│ ├── sockets_unix.cpp
│ ├── sockets_windows.cpp
│ ├── str_parms.cpp
│ ├── str_parms_test.cpp
│ ├── strlcpy.c
│ ├── trace-container.cpp
│ ├── trace-dev.cpp
│ ├── trace-dev.inc
│ ├── trace-dev_test.cpp
│ ├── trace-host.cpp
│ └── uevent.cpp
├── libgrallocusage/
│ ├── Android.bp
│ ├── GrallocUsageConversion.cpp
│ ├── MODULE_LICENSE_APACHE2
│ ├── NOTICE
│ ├── OWNERS
│ └── include/
│ └── grallocusage/
│ └── GrallocUsageConversion.h
├── libkeyutils/
│ ├── Android.bp
│ ├── NOTICE
│ ├── include/
│ │ └── keyutils.h
│ ├── keyutils.cpp
│ └── keyutils_test.cpp
├── libmodprobe/
│ ├── Android.bp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── exthandler.cpp
│ ├── include/
│ │ ├── exthandler/
│ │ │ └── exthandler.h
│ │ └── modprobe/
│ │ └── modprobe.h
│ ├── libmodprobe.cpp
│ ├── libmodprobe_ext.cpp
│ ├── libmodprobe_ext_test.cpp
│ ├── libmodprobe_test.cpp
│ └── libmodprobe_test.h
├── libnetutils/
│ ├── Android.bp
│ ├── NOTICE
│ ├── OWNERS
│ ├── dhcpclient.c
│ ├── dhcpmsg.c
│ ├── dhcpmsg.h
│ ├── dhcptool.c
│ ├── ifc_utils.c
│ ├── include/
│ │ └── netutils/
│ │ └── ifc.h
│ ├── packet.c
│ └── packet.h
├── libpackagelistparser/
│ ├── Android.bp
│ ├── TEST_MAPPING
│ ├── include/
│ │ └── packagelistparser/
│ │ └── packagelistparser.h
│ ├── packagelistparser.cpp
│ └── packagelistparser_test.cpp
├── libprocessgroup/
│ ├── Android.bp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── build_flags.h
│ ├── cgroup_map.cpp
│ ├── cgroup_map.h
│ ├── cgrouprc/
│ │ ├── Android.bp
│ │ ├── a_cgroup_controller.cpp
│ │ ├── a_cgroup_file.cpp
│ │ ├── cgrouprc_internal.h
│ │ ├── include/
│ │ │ └── android/
│ │ │ └── cgrouprc.h
│ │ └── libcgrouprc.map.txt
│ ├── include/
│ │ └── processgroup/
│ │ ├── processgroup.h
│ │ └── sched_policy.h
│ ├── internal.h
│ ├── processgroup.cpp
│ ├── profiles/
│ │ ├── Android.bp
│ │ ├── cgroups.json
│ │ ├── cgroups.proto
│ │ ├── cgroups.recovery.json
│ │ ├── cgroups_test.h
│ │ ├── task_profiles.json
│ │ ├── task_profiles.proto
│ │ ├── task_profiles_test.h
│ │ ├── test.cpp
│ │ └── test_vendor.cpp
│ ├── sched_policy.cpp
│ ├── setup/
│ │ ├── Android.bp
│ │ ├── cgroup_descriptor.h
│ │ ├── cgroup_map_write.cpp
│ │ └── include/
│ │ └── processgroup/
│ │ └── setup.h
│ ├── task_profiles.cpp
│ ├── task_profiles.h
│ ├── task_profiles_test.cpp
│ ├── tools/
│ │ ├── Android.bp
│ │ └── settaskprofile.cpp
│ ├── util/
│ │ ├── Android.bp
│ │ ├── OWNERS
│ │ ├── TEST_MAPPING
│ │ ├── cgroup_controller.cpp
│ │ ├── cgroup_descriptor.cpp
│ │ ├── include/
│ │ │ └── processgroup/
│ │ │ ├── cgroup_controller.h
│ │ │ ├── cgroup_descriptor.h
│ │ │ └── util.h
│ │ ├── tests/
│ │ │ └── util.cpp
│ │ └── util.cpp
│ └── vts/
│ ├── Android.bp
│ └── vts_libprocessgroup.cpp
├── libsparse/
│ ├── Android.bp
│ ├── OWNERS
│ ├── append2simg.cpp
│ ├── backed_block.cpp
│ ├── backed_block.h
│ ├── defs.h
│ ├── img2simg.cpp
│ ├── include/
│ │ └── sparse/
│ │ └── sparse.h
│ ├── output_file.cpp
│ ├── output_file.h
│ ├── simg2img.cpp
│ ├── simg_dump.py
│ ├── sparse.cpp
│ ├── sparse_crc32.cpp
│ ├── sparse_crc32.h
│ ├── sparse_defs.h
│ ├── sparse_err.cpp
│ ├── sparse_file.h
│ ├── sparse_format.h
│ ├── sparse_fuzzer.cpp
│ └── sparse_read.cpp
├── libstats/
│ ├── OWNERS
│ ├── bootstrap/
│ │ ├── Android.bp
│ │ ├── BootstrapClientInternal.cpp
│ │ ├── BootstrapClientInternal.h
│ │ ├── StatsBootstrapAtomClient.cpp
│ │ └── include/
│ │ └── StatsBootstrapAtomClient.h
│ ├── expresslog/
│ │ ├── .clang-format
│ │ ├── Android.bp
│ │ ├── Counter.cpp
│ │ ├── Histogram.cpp
│ │ ├── include/
│ │ │ ├── Counter.h
│ │ │ └── Histogram.h
│ │ └── tests/
│ │ └── Histogram_test.cpp
│ ├── pull_lazy/
│ │ ├── Android.bp
│ │ ├── TEST_MAPPING
│ │ ├── libstatspull_lazy.cpp
│ │ ├── libstatspull_lazy.h
│ │ ├── libstatspull_lazy_test.xml
│ │ └── tests/
│ │ └── libstatspull_lazy_test.cpp
│ ├── pull_rust/
│ │ ├── Android.bp
│ │ ├── stats_pull.rs
│ │ └── statslog.h
│ ├── push_compat/
│ │ ├── Android.bp
│ │ ├── StatsEventCompat.cpp
│ │ ├── include/
│ │ │ ├── StatsEventCompat.h
│ │ │ └── stats_event_list.h
│ │ ├── stats_event_list.c
│ │ ├── statsd_writer.cpp
│ │ ├── statsd_writer.h
│ │ └── tests/
│ │ └── StatsEventCompat_test.cpp
│ └── socket_lazy/
│ ├── Android.bp
│ ├── TEST_MAPPING
│ ├── include/
│ │ └── statssocket_lazy.h
│ ├── libstatssocket_lazy.cpp
│ ├── libstatssocket_lazy.h
│ ├── libstatssocket_lazy_test.xml
│ └── tests/
│ └── libstatssocket_lazy_test.cpp
├── libsuspend/
│ ├── Android.bp
│ ├── autosuspend.c
│ ├── autosuspend_ops.h
│ ├── autosuspend_wakeup_count.cpp
│ └── include/
│ └── suspend/
│ └── autosuspend.h
├── libsync/
│ ├── Android.bp
│ ├── NOTICE
│ ├── OWNERS
│ ├── include/
│ │ ├── android/
│ │ │ └── sync.h
│ │ └── ndk/
│ │ └── sync.h
│ ├── libsync.map.txt
│ ├── sw_sync.h
│ ├── sync.c
│ └── tests/
│ └── sync_test.cpp
├── libsystem/
│ ├── Android.bp
│ ├── OWNERS
│ └── include/
│ └── system/
│ ├── camera.h
│ ├── graphics-base-v1.0.h
│ ├── graphics-base-v1.1.h
│ ├── graphics-base-v1.2.h
│ ├── graphics-base.h
│ ├── graphics-sw.h
│ ├── graphics.h
│ ├── radio.h
│ └── thread_defs.h
├── libsysutils/
│ ├── Android.bp
│ ├── EventLogTags.logtags
│ ├── include/
│ │ └── sysutils/
│ │ ├── FrameworkCommand.h
│ │ ├── FrameworkListener.h
│ │ ├── NetlinkEvent.h
│ │ ├── NetlinkListener.h
│ │ ├── OWNERS
│ │ ├── ServiceManager.h
│ │ ├── SocketClient.h
│ │ ├── SocketClientCommand.h
│ │ └── SocketListener.h
│ └── src/
│ ├── FrameworkCommand.cpp
│ ├── FrameworkListener.cpp
│ ├── NetlinkEvent.cpp
│ ├── NetlinkListener.cpp
│ ├── OWNERS
│ ├── ServiceManager.cpp
│ ├── SocketClient.cpp
│ ├── SocketListener.cpp
│ └── SocketListener_test.cpp
├── libusbhost/
│ ├── Android.bp
│ ├── include/
│ │ └── usbhost/
│ │ ├── usbhost.h
│ │ └── usbhost_jni.h
│ ├── usbhost.c
│ ├── usbhost_jni.cpp
│ └── usbhost_private.h
├── libutils/
│ ├── Android.bp
│ ├── BitSet_fuzz.cpp
│ ├── BitSet_test.cpp
│ ├── CallStack.cpp
│ ├── CallStack_fuzz.cpp
│ ├── CallStack_test.cpp
│ ├── CleanSpec.mk
│ ├── FileMap.cpp
│ ├── FileMap_fuzz.cpp
│ ├── FileMap_test.cpp
│ ├── JenkinsHash.cpp
│ ├── LightRefBase.cpp
│ ├── Looper.cpp
│ ├── Looper_fuzz.cpp
│ ├── Looper_test.cpp
│ ├── Looper_test_pipe.h
│ ├── LruCache_fuzz.cpp
│ ├── LruCache_test.cpp
│ ├── MODULE_LICENSE_APACHE2
│ ├── Mutex_test.cpp
│ ├── NOTICE
│ ├── NativeHandle.cpp
│ ├── OWNERS
│ ├── Printer.cpp
│ ├── Printer_fuzz.cpp
│ ├── ProcessCallStack.cpp
│ ├── ProcessCallStack_fuzz.cpp
│ ├── Singleton_test.cpp
│ ├── Singleton_test.h
│ ├── Singleton_test1.cpp
│ ├── Singleton_test2.cpp
│ ├── StopWatch.cpp
│ ├── SystemClock.cpp
│ ├── SystemClock_test.cpp
│ ├── TEST_MAPPING
│ ├── Threads.cpp
│ ├── Timers.cpp
│ ├── Timers_test.cpp
│ ├── Tokenizer.cpp
│ ├── Trace.cpp
│ ├── abi-dumps/
│ │ ├── arm64/
│ │ │ └── source-based/
│ │ │ └── libutils.so.lsdump
│ │ └── arm_arm64/
│ │ └── source-based/
│ │ └── libutils.so.lsdump
│ ├── binder/
│ │ ├── Android.bp
│ │ ├── Errors.cpp
│ │ ├── Errors_test.cpp
│ │ ├── FuzzFormatTypes.h
│ │ ├── RefBase.cpp
│ │ ├── RefBase_fuzz.cpp
│ │ ├── RefBase_test.cpp
│ │ ├── SharedBuffer.cpp
│ │ ├── SharedBuffer.h
│ │ ├── SharedBuffer_test.cpp
│ │ ├── String16.cpp
│ │ ├── String16_fuzz.cpp
│ │ ├── String16_test.cpp
│ │ ├── String8.cpp
│ │ ├── String8_fuzz.cpp
│ │ ├── String8_test.cpp
│ │ ├── StrongPointer.cpp
│ │ ├── StrongPointer_test.cpp
│ │ ├── Unicode.cpp
│ │ ├── Unicode_test.cpp
│ │ ├── VectorImpl.cpp
│ │ ├── Vector_benchmark.cpp
│ │ ├── Vector_fuzz.cpp
│ │ ├── Vector_test.cpp
│ │ └── include/
│ │ └── utils/
│ │ ├── Errors.h
│ │ ├── LightRefBase.h
│ │ ├── RefBase.h
│ │ ├── String16.h
│ │ ├── String8.h
│ │ ├── StrongPointer.h
│ │ ├── TypeHelpers.h
│ │ ├── Unicode.h
│ │ ├── Vector.h
│ │ └── VectorImpl.h
│ ├── include/
│ │ └── utils/
│ │ ├── AndroidThreads.h
│ │ ├── Atomic.h
│ │ ├── BitSet.h
│ │ ├── ByteOrder.h
│ │ ├── CallStack.h
│ │ ├── Compat.h
│ │ ├── Condition.h
│ │ ├── Debug.h
│ │ ├── Endian.h
│ │ ├── ErrorsMacros.h
│ │ ├── FastStrcmp.h
│ │ ├── FileMap.h
│ │ ├── Flattenable.h
│ │ ├── Functor.h
│ │ ├── JenkinsHash.h
│ │ ├── KeyedVector.h
│ │ ├── List.h
│ │ ├── Log.h
│ │ ├── Looper.h
│ │ ├── LruCache.h
│ │ ├── Mutex.h
│ │ ├── NativeHandle.h
│ │ ├── Printer.h
│ │ ├── ProcessCallStack.h
│ │ ├── RWLock.h
│ │ ├── Singleton.h
│ │ ├── SortedVector.h
│ │ ├── StopWatch.h
│ │ ├── SystemClock.h
│ │ ├── Thread.h
│ │ ├── ThreadDefs.h
│ │ ├── Timers.h
│ │ ├── Tokenizer.h
│ │ ├── Trace.h
│ │ ├── misc.h
│ │ └── threads.h
│ └── misc.cpp
├── libvendorsupport/
│ ├── Android.bp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── include/
│ │ └── vendorsupport/
│ │ └── api_level.h
│ ├── libvendorsupport.map.txt
│ ├── tests/
│ │ ├── Android.bp
│ │ └── version_props_test.cpp
│ └── version_props.cpp
├── libvndksupport/
│ ├── Android.bp
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── include/
│ │ └── vndksupport/
│ │ └── linker.h
│ ├── libvndksupport.map.txt
│ ├── linker.cpp
│ └── tests/
│ ├── Android.bp
│ └── linker_test.cpp
├── llkd/
│ ├── Android.bp
│ ├── OWNERS
│ ├── README.md
│ ├── include/
│ │ └── llkd.h
│ ├── libllkd.cpp
│ ├── llkd-debuggable.rc
│ ├── llkd.cpp
│ ├── llkd.rc
│ └── tests/
│ ├── Android.bp
│ └── llkd_test.cpp
├── mini_keyctl/
│ ├── Android.bp
│ ├── OWNERS
│ ├── mini_keyctl.cpp
│ ├── mini_keyctl_utils.cpp
│ └── mini_keyctl_utils.h
├── mkbootfs/
│ ├── Android.bp
│ └── mkbootfs.cpp
├── overlay_remounter/
│ ├── Android.bp
│ └── overlay_remounter.cpp
├── property_service/
│ ├── OWNERS
│ ├── TEST_MAPPING
│ ├── libpropertyinfoparser/
│ │ ├── Android.bp
│ │ ├── include/
│ │ │ └── property_info_parser/
│ │ │ └── property_info_parser.h
│ │ └── property_info_parser.cpp
│ ├── libpropertyinfoserializer/
│ │ ├── Android.bp
│ │ ├── include/
│ │ │ └── property_info_serializer/
│ │ │ └── property_info_serializer.h
│ │ ├── property_info_file.cpp
│ │ ├── property_info_serializer.cpp
│ │ ├── property_info_serializer_test.cpp
│ │ ├── space_tokenizer.h
│ │ ├── trie_builder.cpp
│ │ ├── trie_builder.h
│ │ ├── trie_builder_test.cpp
│ │ ├── trie_node_arena.h
│ │ ├── trie_serializer.cpp
│ │ └── trie_serializer.h
│ └── property_info_checker/
│ ├── Android.bp
│ └── property_info_checker.cpp
├── reboot/
│ ├── Android.bp
│ └── reboot.c
├── rootdir/
│ ├── Android.bp
│ ├── OWNERS
│ ├── adb_debug.prop
│ ├── asan.options
│ ├── asan_extract.rc
│ ├── asan_extract.sh
│ ├── avb/
│ │ ├── Android.bp
│ │ ├── q-developer-gsi.avbpubkey
│ │ ├── r-developer-gsi.avbpubkey
│ │ └── s-developer-gsi.avbpubkey
│ ├── create_root_structure.mk
│ ├── etc/
│ │ ├── OWNERS
│ │ ├── TEST_MAPPING
│ │ ├── hosts
│ │ ├── ld.config.legacy.txt
│ │ ├── ld.config.recovery.txt
│ │ ├── ld.config.txt
│ │ ├── ld.config.vndk_lite.txt
│ │ ├── linker.config.json
│ │ ├── public.libraries.android.txt
│ │ ├── public.libraries.iot.txt
│ │ └── public.libraries.wear.txt
│ ├── init-debug.rc
│ ├── init-mmd-prop.rc
│ ├── init.boringssl.zygote64.rc
│ ├── init.boringssl.zygote64_32.rc
│ ├── init.environ.rc.in
│ ├── init.no_zygote.rc
│ ├── init.rc
│ ├── init.usb.configfs.rc
│ ├── init.usb.rc
│ ├── init.zygote32.rc
│ ├── init.zygote64.rc
│ ├── init.zygote64_32.rc
│ ├── ramdisk_node_list
│ └── ueventd.rc
├── run-as/
│ ├── Android.bp
│ ├── NOTICE
│ └── run-as.cpp
├── sdcard/
│ ├── Android.bp
│ ├── OWNERS
│ └── sdcard.cpp
├── shell_and_utilities/
│ ├── Android.bp
│ ├── OWNERS
│ └── README.md
├── storaged/
│ ├── Android.bp
│ ├── EventLogTags.logtags
│ ├── OWNERS
│ ├── README.properties
│ ├── binder/
│ │ └── android/
│ │ └── os/
│ │ ├── IStoraged.aidl
│ │ └── storaged/
│ │ ├── IStoragedPrivate.aidl
│ │ └── UidInfo.aidl
│ ├── include/
│ │ ├── storaged.h
│ │ ├── storaged_diskstats.h
│ │ ├── storaged_info.h
│ │ ├── storaged_service.h
│ │ ├── storaged_uid_monitor.h
│ │ ├── storaged_utils.h
│ │ └── uid_info.h
│ ├── main.cpp
│ ├── storaged.cpp
│ ├── storaged.proto
│ ├── storaged.rc
│ ├── storaged_diskstats.cpp
│ ├── storaged_info.cpp
│ ├── storaged_service.cpp
│ ├── storaged_uid_monitor.cpp
│ ├── storaged_utils.cpp
│ ├── tests/
│ │ ├── fuzzers/
│ │ │ ├── storaged_private_service_fuzzer.cpp
│ │ │ └── storaged_service_fuzzer.cpp
│ │ └── storaged_test.cpp
│ ├── tools/
│ │ └── ranker.py
│ └── uid_info.cpp
├── toolbox/
│ ├── Android.bp
│ ├── MODULE_LICENSE_APACHE2
│ ├── NOTICE
│ ├── OWNERS
│ ├── generate-input.h-labels.py
│ ├── getevent.c
│ ├── getprop.cpp
│ ├── modprobe.cpp
│ ├── setprop.cpp
│ ├── start.cpp
│ ├── toolbox.c
│ └── tools.h
├── trusty/
│ ├── Android.bp
│ ├── OWNERS
│ ├── apploader/
│ │ ├── Android.bp
│ │ ├── apploader.cpp
│ │ ├── apploader_ipc.h
│ │ └── fuzz/
│ │ ├── Android.bp
│ │ └── app_fuzzer.cpp
│ ├── confirmationui/
│ │ ├── .clang-format
│ │ ├── Android.bp
│ │ ├── NotSoSecureInput.cpp
│ │ ├── README
│ │ ├── TrustyApp.cpp
│ │ ├── TrustyApp.h
│ │ ├── TrustyConfirmationUI.cpp
│ │ ├── TrustyConfirmationUI.h
│ │ ├── android.hardware.confirmationui-service.trusty.rc
│ │ ├── android.hardware.confirmationui-service.trusty.xml
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ ├── msg_corpus/
│ │ │ │ ├── confirmationui-recv-0AD0Mc
│ │ │ │ ├── confirmationui-recv-1b1UIl
│ │ │ │ ├── confirmationui-recv-3hmWyl
│ │ │ │ ├── confirmationui-recv-7FNOdd
│ │ │ │ ├── confirmationui-recv-7T30a0
│ │ │ │ ├── confirmationui-recv-86EumR
│ │ │ │ ├── confirmationui-recv-89b64b
│ │ │ │ ├── confirmationui-recv-8UVUCK
│ │ │ │ ├── confirmationui-recv-BSmqJ0
│ │ │ │ ├── confirmationui-recv-BdUGLb
│ │ │ │ ├── confirmationui-recv-D2ENNi
│ │ │ │ ├── confirmationui-recv-EwBsPi
│ │ │ │ ├── confirmationui-recv-HjE2Ko
│ │ │ │ ├── confirmationui-recv-J5OABY
│ │ │ │ ├── confirmationui-recv-LUVKQn
│ │ │ │ ├── confirmationui-recv-MdY9ZS
│ │ │ │ ├── confirmationui-recv-NZ8yUq
│ │ │ │ ├── confirmationui-recv-OP4Vff
│ │ │ │ ├── confirmationui-recv-OizTST
│ │ │ │ ├── confirmationui-recv-QTsc3y
│ │ │ │ ├── confirmationui-recv-S055ei
│ │ │ │ ├── confirmationui-recv-VDguJL
│ │ │ │ ├── confirmationui-recv-ZjDqjf
│ │ │ │ ├── confirmationui-recv-bMNGfb
│ │ │ │ ├── confirmationui-recv-bm0GEm
│ │ │ │ ├── confirmationui-recv-cT2nt8
│ │ │ │ ├── confirmationui-recv-e1NLbb
│ │ │ │ ├── confirmationui-recv-eOCb7t
│ │ │ │ ├── confirmationui-recv-h7Gpzu
│ │ │ │ ├── confirmationui-recv-ikJlIo
│ │ │ │ ├── confirmationui-recv-kxugwp
│ │ │ │ ├── confirmationui-recv-mY8uM5
│ │ │ │ ├── confirmationui-recv-nuYOin
│ │ │ │ ├── confirmationui-recv-obk0rP
│ │ │ │ ├── confirmationui-recv-vg2hAB
│ │ │ │ ├── confirmationui-recv-ysk3Rj
│ │ │ │ ├── confirmationui-send-2upXHa
│ │ │ │ ├── confirmationui-send-3n7SWz
│ │ │ │ ├── confirmationui-send-5SZG4U
│ │ │ │ ├── confirmationui-send-8uL1hT
│ │ │ │ ├── confirmationui-send-Anu8LZ
│ │ │ │ ├── confirmationui-send-BFP3vG
│ │ │ │ ├── confirmationui-send-BjxIpX
│ │ │ │ ├── confirmationui-send-DBzfWz
│ │ │ │ ├── confirmationui-send-GPOMKC
│ │ │ │ ├── confirmationui-send-GWcpFn
│ │ │ │ ├── confirmationui-send-HkRYSS
│ │ │ │ ├── confirmationui-send-LAyw30
│ │ │ │ ├── confirmationui-send-MtGRnC
│ │ │ │ ├── confirmationui-send-PpfYNn
│ │ │ │ ├── confirmationui-send-SVKqZi
│ │ │ │ ├── confirmationui-send-Suxofv
│ │ │ │ ├── confirmationui-send-UQPTAG
│ │ │ │ ├── confirmationui-send-Up2pbn
│ │ │ │ ├── confirmationui-send-ZjgVzs
│ │ │ │ ├── confirmationui-send-ZuQuBC
│ │ │ │ ├── confirmationui-send-bWlzZp
│ │ │ │ ├── confirmationui-send-dPozfE
│ │ │ │ ├── confirmationui-send-e952U6
│ │ │ │ ├── confirmationui-send-f7ly1r
│ │ │ │ ├── confirmationui-send-hme7P0
│ │ │ │ ├── confirmationui-send-k7J5LL
│ │ │ │ ├── confirmationui-send-rUtYXs
│ │ │ │ ├── confirmationui-send-sq5ang
│ │ │ │ ├── confirmationui-send-uOtedb
│ │ │ │ ├── confirmationui-send-vGoOUt
│ │ │ │ ├── confirmationui-send-vqAG14
│ │ │ │ ├── confirmationui-send-xKDdTw
│ │ │ │ ├── confirmationui-send-xT4sJC
│ │ │ │ ├── confirmationui-send-ypshr5
│ │ │ │ ├── confirmationui-send-ypzCDH
│ │ │ │ └── confirmationui-send-zZNPRC
│ │ │ └── msg_fuzzer.cpp
│ │ ├── fuzzer.cpp
│ │ ├── include/
│ │ │ ├── TrustyConfirmationuiHal.h
│ │ │ └── TrustyIpc.h
│ │ └── service.cpp
│ ├── coverage/
│ │ ├── Android.bp
│ │ ├── coverage.cpp
│ │ ├── coverage_test.cpp
│ │ ├── include/
│ │ │ └── trusty/
│ │ │ └── coverage/
│ │ │ ├── coverage.h
│ │ │ ├── record.h
│ │ │ ├── tipc.h
│ │ │ └── uuid.h
│ │ └── uuid.cpp
│ ├── fuzz/
│ │ ├── Android.bp
│ │ ├── counters.cpp
│ │ ├── include/
│ │ │ └── trusty/
│ │ │ └── fuzz/
│ │ │ ├── counters.h
│ │ │ └── utils.h
│ │ ├── test/
│ │ │ └── Android.bp
│ │ ├── tipc_fuzzer.cpp
│ │ └── utils.cpp
│ ├── gatekeeper/
│ │ ├── Android.bp
│ │ ├── TEST_MAPPING
│ │ ├── android.hardware.gatekeeper-service.trusty.rc
│ │ ├── android.hardware.gatekeeper-service.trusty.xml
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ └── corpus/
│ │ │ ├── gatekeeper-recv-2MMzSr
│ │ │ ├── gatekeeper-recv-Et63W0
│ │ │ ├── gatekeeper-recv-G41Iz8
│ │ │ ├── gatekeeper-recv-ItEoqJ
│ │ │ ├── gatekeeper-recv-MGXdfu
│ │ │ ├── gatekeeper-recv-Yq4f10
│ │ │ ├── gatekeeper-recv-agxKZa
│ │ │ ├── gatekeeper-recv-alhn2v
│ │ │ ├── gatekeeper-recv-eVJFHV
│ │ │ ├── gatekeeper-recv-et5K21
│ │ │ ├── gatekeeper-recv-gun5YX
│ │ │ ├── gatekeeper-recv-kXw1R9
│ │ │ ├── gatekeeper-recv-moapss
│ │ │ ├── gatekeeper-recv-u5QySb
│ │ │ ├── gatekeeper-recv-uZtvkq
│ │ │ ├── gatekeeper-recv-w5G2SF
│ │ │ ├── gatekeeper-recv-y3H74x
│ │ │ ├── gatekeeper-recv-yALfeS
│ │ │ ├── gatekeeper-send-2S1GLi
│ │ │ ├── gatekeeper-send-4j7hUc
│ │ │ ├── gatekeeper-send-6hsSQG
│ │ │ ├── gatekeeper-send-E8CE7b
│ │ │ ├── gatekeeper-send-GEDmHj
│ │ │ ├── gatekeeper-send-MpwDEN
│ │ │ ├── gatekeeper-send-Qutf8O
│ │ │ ├── gatekeeper-send-Sg1WMt
│ │ │ ├── gatekeeper-send-U6Y1My
│ │ │ ├── gatekeeper-send-WdSRky
│ │ │ ├── gatekeeper-send-Ypw6WP
│ │ │ ├── gatekeeper-send-Yyj4Af
│ │ │ ├── gatekeeper-send-amyF62
│ │ │ ├── gatekeeper-send-gu8ziA
│ │ │ ├── gatekeeper-send-iCATsM
│ │ │ ├── gatekeeper-send-kawT3I
│ │ │ ├── gatekeeper-send-sYFzM5
│ │ │ └── gatekeeper-send-yNFMdn
│ │ ├── gatekeeper_ipc.h
│ │ ├── service.cpp
│ │ ├── trusty_gatekeeper.cpp
│ │ ├── trusty_gatekeeper.h
│ │ ├── trusty_gatekeeper_ipc.c
│ │ └── trusty_gatekeeper_ipc.h
│ ├── keymaster/
│ │ ├── 3.0/
│ │ │ ├── TrustyKeymaster3Device.cpp
│ │ │ ├── android.hardware.keymaster@3.0-service.trusty.rc
│ │ │ └── service.cpp
│ │ ├── 4.0/
│ │ │ ├── TrustyKeymaster4Device.cpp
│ │ │ ├── android.hardware.keymaster@4.0-service.trusty.rc
│ │ │ ├── android.hardware.keymaster@4.0-service.trusty.xml
│ │ │ └── service.cpp
│ │ ├── Android.bp
│ │ ├── TEST_MAPPING
│ │ ├── TrustyKeymaster.cpp
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ └── corpus/
│ │ │ ├── keymaster-recv-1x0hJ5
│ │ │ ├── keymaster-recv-5GV6mx
│ │ │ ├── keymaster-recv-7RVbJ8
│ │ │ ├── keymaster-recv-9ElJHi
│ │ │ ├── keymaster-recv-9czLCR
│ │ │ ├── keymaster-recv-BFx3FN
│ │ │ ├── keymaster-recv-BXWpRA
│ │ │ ├── keymaster-recv-DanwgH
│ │ │ ├── keymaster-recv-JP2pXq
│ │ │ ├── keymaster-recv-T0YO5T
│ │ │ ├── keymaster-recv-TM26dO
│ │ │ ├── keymaster-recv-XcPQ60
│ │ │ ├── keymaster-recv-ZU4x5D
│ │ │ ├── keymaster-recv-Zbzv1t
│ │ │ ├── keymaster-recv-ZvweQK
│ │ │ ├── keymaster-recv-d3OcR1
│ │ │ ├── keymaster-recv-dc6Hmg
│ │ │ ├── keymaster-recv-fn8Ksu
│ │ │ ├── keymaster-recv-ldnX1U
│ │ │ ├── keymaster-recv-pqvh4n
│ │ │ ├── keymaster-recv-pvwjne
│ │ │ ├── keymaster-recv-pzxe39
│ │ │ ├── keymaster-recv-tpykrY
│ │ │ ├── keymaster-recv-tq6MsH
│ │ │ ├── keymaster-recv-zt2UIA
│ │ │ ├── keymaster-send-3aKtgr
│ │ │ ├── keymaster-send-5Ays9I
│ │ │ ├── keymaster-send-7X098Z
│ │ │ ├── keymaster-send-B6LYU4
│ │ │ ├── keymaster-send-BZU7LF
│ │ │ ├── keymaster-send-FxXsxg
│ │ │ ├── keymaster-send-NlxYoC
│ │ │ ├── keymaster-send-PzXetK
│ │ │ ├── keymaster-send-RFmR3D
│ │ │ ├── keymaster-send-Tp6AJW
│ │ │ ├── keymaster-send-V0leT7
│ │ │ ├── keymaster-send-X4Plz3
│ │ │ ├── keymaster-send-Xd5KiX
│ │ │ ├── keymaster-send-Ztr5Rk
│ │ │ ├── keymaster-send-f6d6wM
│ │ │ ├── keymaster-send-jbzgHv
│ │ │ ├── keymaster-send-jiL5yp
│ │ │ ├── keymaster-send-l5kqxc
│ │ │ ├── keymaster-send-l6zX2y
│ │ │ ├── keymaster-send-ltPKls
│ │ │ ├── keymaster-send-n7sdVP
│ │ │ ├── keymaster-send-pKSjkT
│ │ │ ├── keymaster-send-rhVedc
│ │ │ ├── keymaster-send-tZJ2Ex
│ │ │ └── keymaster-send-tZlTSQ
│ │ ├── include/
│ │ │ └── trusty_keymaster/
│ │ │ ├── TrustyKeyMintDevice.h
│ │ │ ├── TrustyKeyMintOperation.h
│ │ │ ├── TrustyKeymaster.h
│ │ │ ├── TrustyKeymaster3Device.h
│ │ │ ├── TrustyKeymaster4Device.h
│ │ │ ├── TrustyRemotelyProvisionedComponentDevice.h
│ │ │ ├── TrustySecureClock.h
│ │ │ ├── TrustySharedSecret.h
│ │ │ ├── ipc/
│ │ │ │ ├── keymaster_ipc.h
│ │ │ │ └── trusty_keymaster_ipc.h
│ │ │ └── legacy/
│ │ │ └── trusty_keymaster_device.h
│ │ ├── ipc/
│ │ │ └── trusty_keymaster_ipc.cpp
│ │ ├── keymint/
│ │ │ ├── TEST_MAPPING
│ │ │ ├── TrustyKeyMintDevice.cpp
│ │ │ ├── TrustyKeyMintOperation.cpp
│ │ │ ├── TrustyRemotelyProvisionedComponentDevice.cpp
│ │ │ ├── TrustySecureClock.cpp
│ │ │ ├── TrustySharedSecret.cpp
│ │ │ ├── android.hardware.security.keymint-service.trusty.rc
│ │ │ ├── android.hardware.security.keymint-service.trusty.xml
│ │ │ ├── android.hardware.security.keymint-service.trusty_tee.cpp.rc
│ │ │ └── service.cpp
│ │ ├── set_attestation_ids/
│ │ │ └── set_attestation_ids.cpp
│ │ ├── set_attestation_key/
│ │ │ ├── keymaster_soft_attestation_keys.xml
│ │ │ └── set_attestation_key.cpp
│ │ └── set_uds_certs/
│ │ ├── rkp_uds_cert_test.xml
│ │ └── set_uds_certificates.cpp
│ ├── keymint/
│ │ ├── Android.bp
│ │ ├── android.hardware.security.keymint-service.rust.trusty.rc
│ │ ├── android.hardware.security.keymint-service.rust.trusty.xml
│ │ ├── android.hardware.security.keymint-service.trusty_system_vm.rc
│ │ ├── android.hardware.security.keymint-service.trusty_system_vm.xml
│ │ ├── android.hardware.security.keymint-service.trusty_tee.rc
│ │ ├── fuzz/
│ │ │ ├── Android.bp
│ │ │ └── corpus/
│ │ │ ├── keymint-reqs-821180-0
│ │ │ ├── keymint-reqs-82128140-0
│ │ │ ├── keymint-reqs-82128143-0
│ │ │ ├── keymint-reqs-82128158-0
│ │ │ ├── keymint-reqs-82128158-1
│ │ │ ├── keymint-reqs-82138285-0
│ │ │ ├── keymint-reqs-82138285-1
│ │ │ ├── keymint-reqs-82138285-2
│ │ │ ├── keymint-reqs-82138285-3
│ │ │ ├── keymint-reqs-82138286-0
│ │ │ ├── keymint-reqs-82138286-1
│ │ │ ├── keymint-reqs-82138286-2
│ │ │ ├── keymint-reqs-82138286-3
│ │ │ ├── keymint-reqs-82138287-0
│ │ │ ├── keymint-reqs-82138287-1
│ │ │ ├── keymint-reqs-82138287-2
│ │ │ ├── keymint-reqs-82138287-3
│ │ │ ├── keymint-reqs-82138288-0
│ │ │ ├── keymint-reqs-82138288-1
│ │ │ ├── keymint-reqs-82138288-2
│ │ │ ├── keymint-reqs-82138288-3
│ │ │ ├── keymint-reqs-82138289-0
│ │ │ ├── keymint-reqs-82138289-1
│ │ │ ├── keymint-reqs-82138289-2
│ │ │ ├── keymint-reqs-82138289-3
│ │ │ ├── keymint-reqs-8213828a-0
│ │ │ ├── keymint-reqs-8213828a-1
│ │ │ ├── keymint-reqs-8213828a-2
│ │ │ ├── keymint-reqs-8213828a-3
│ │ │ ├── keymint-reqs-8213828b-0
│ │ │ ├── keymint-reqs-8213828b-1
│ │ │ ├── keymint-reqs-8213828b-2
│ │ │ ├── keymint-reqs-8213828b-3
│ │ │ ├── keymint-reqs-8213828c-0
│ │ │ ├── keymint-reqs-8213828c-1
│ │ │ ├── keymint-reqs-8213828c-2
│ │ │ ├── keymint-reqs-8213828c-3
│ │ │ ├── keymint-reqs-8213828d-0
│ │ │ ├── keymint-reqs-8213828d-1
│ │ │ ├── keymint-reqs-8213828d-2
│ │ │ ├── keymint-reqs-8213828d-3
│ │ │ ├── keymint-reqs-8213828e-0
│ │ │ ├── keymint-reqs-8213828e-1
│ │ │ ├── keymint-reqs-8213828e-2
│ │ │ ├── keymint-reqs-8213828e-3
│ │ │ ├── keymint-reqs-8213828f-0
│ │ │ ├── keymint-reqs-8213828f-1
│ │ │ ├── keymint-reqs-8213828f-2
│ │ │ ├── keymint-reqs-8213828f-3
│ │ │ ├── keymint-reqs-82138290-0
│ │ │ ├── keymint-reqs-82138290-1
│ │ │ ├── keymint-reqs-82138292-0
│ │ │ ├── keymint-reqs-82148485-0
│ │ │ ├── keymint-reqs-82148485-1
│ │ │ ├── keymint-reqs-82148485-2
│ │ │ ├── keymint-reqs-82148485-3
│ │ │ ├── keymint-reqs-82148486-0
│ │ │ ├── keymint-reqs-82148486-1
│ │ │ ├── keymint-reqs-82148486-2
│ │ │ ├── keymint-reqs-82148486-3
│ │ │ ├── keymint-reqs-82148487-0
│ │ │ ├── keymint-reqs-82148487-1
│ │ │ ├── keymint-reqs-82148487-2
│ │ │ ├── keymint-reqs-82148487-3
│ │ │ ├── keymint-reqs-82148488-0
│ │ │ ├── keymint-reqs-82148488-1
│ │ │ ├── keymint-reqs-82148488-2
│ │ │ ├── keymint-reqs-82148488-3
│ │ │ ├── keymint-reqs-82148489-0
│ │ │ ├── keymint-reqs-82148489-1
│ │ │ ├── keymint-reqs-82148489-2
│ │ │ ├── keymint-reqs-82148489-3
│ │ │ ├── keymint-reqs-8214848a-0
│ │ │ ├── keymint-reqs-8214848a-1
│ │ │ ├── keymint-reqs-8214848a-2
│ │ │ ├── keymint-reqs-8214848a-3
│ │ │ ├── keymint-reqs-8214848b-0
│ │ │ ├── keymint-reqs-82158659-0
│ │ │ ├── keymint-reqs-82158659-1
│ │ │ ├── keymint-reqs-82158659-2
│ │ │ ├── keymint-reqs-82158659-3
│ │ │ ├── keymint-reqs-82168258-0
│ │ │ ├── keymint-reqs-82168258-1
│ │ │ ├── keymint-reqs-82178158-0
│ │ │ ├── keymint-reqs-82178158-1
│ │ │ ├── keymint-reqs-82178158-2
│ │ │ ├── keymint-reqs-82178158-3
│ │ │ ├── keymint-reqs-82178159-0
│ │ │ ├── keymint-reqs-82178159-1
│ │ │ ├── keymint-reqs-82178159-2
│ │ │ ├── keymint-reqs-82178159-3
│ │ │ ├── keymint-reqs-82181a84-0
│ │ │ ├── keymint-reqs-82181a84-1
│ │ │ ├── keymint-reqs-82181a84-2
│ │ │ ├── keymint-reqs-82181a84-3
│ │ │ ├── keymint-reqs-82181e83-0
│ │ │ ├── keymint-reqs-82181e83-1
│ │ │ ├── keymint-reqs-82181e83-2
│ │ │ ├── keymint-reqs-82181e83-3
│ │ │ ├── keymint-reqs-82183184-0
│ │ │ ├── keymint-reqs-82183184-1
│ │ │ ├── keymint-reqs-82183184-2
│ │ │ ├── keymint-reqs-82183184-3
│ │ │ ├── keymint-reqs-82183284-0
│ │ │ ├── keymint-reqs-82183284-1
│ │ │ ├── keymint-reqs-82183284-2
│ │ │ ├── keymint-reqs-82183284-3
│ │ │ ├── keymint-reqs-82183386-0
│ │ │ ├── keymint-reqs-82183386-1
│ │ │ ├── keymint-reqs-82183386-2
│ │ │ ├── keymint-reqs-82183386-3
│ │ │ ├── keymint-reqs-82183481-0
│ │ │ ├── keymint-reqs-82183481-1
│ │ │ ├── keymint-reqs-82183481-2
│ │ │ ├── keymint-reqs-82183481-3
│ │ │ ├── keymint-reqs-82184180-0
│ │ │ ├── keymint-reqs-82184281-0
│ │ │ ├── keymint-rsps-00035504-0
│ │ │ ├── keymint-rsps-001e170d-0
│ │ │ ├── keymint-rsps-00303031-0
│ │ │ ├── keymint-rsps-00313563-0
│ │ │ ├── keymint-rsps-00333233-0
│ │ │ ├── keymint-rsps-00365a17-0
│ │ │ ├── keymint-rsps-003cc0cc-0
│ │ │ ├── keymint-rsps-003e7b1a-0
│ │ │ ├── keymint-rsps-0042-0
│ │ │ ├── keymint-rsps-00646630-0
│ │ │ ├── keymint-rsps-00820081-0
│ │ │ ├── keymint-rsps-00820081-1
│ │ │ ├── keymint-rsps-00820081-2
│ │ │ ├── keymint-rsps-00820081-3
│ │ │ ├── keymint-rsps-00822180-0
│ │ │ ├── keymint-rsps-00822280-0
│ │ │ ├── keymint-rsps-00822580-0
│ │ │ ├── keymint-rsps-00822680-0
│ │ │ ├── keymint-rsps-00822780-0
│ │ │ ├── keymint-rsps-00822880-0
│ │ │ ├── keymint-rsps-00822980-0
│ │ │ ├── keymint-rsps-00822a80-0
│ │ │ ├── keymint-rsps-00822b80-0
│ │ │ ├── keymint-rsps-00822c80-0
│ │ │ ├── keymint-rsps-00823080-0
│ │ │ ├── keymint-rsps-00823480-0
│ │ │ ├── keymint-rsps-00823819-0
│ │ │ ├── keymint-rsps-0082381d-0
│ │ │ ├── keymint-rsps-0082381e-0
│ │ │ ├── keymint-rsps-00823820-0
│ │ │ ├── keymint-rsps-00823825-0
│ │ │ ├── keymint-rsps-00823827-0
│ │ │ ├── keymint-rsps-0082382b-0
│ │ │ ├── keymint-rsps-00823833-0
│ │ │ ├── keymint-rsps-00823836-0
│ │ │ ├── keymint-rsps-00823837-0
│ │ │ ├── keymint-rsps-00823838-0
│ │ │ ├── keymint-rsps-00823839-0
│ │ │ ├── keymint-rsps-0082383a-0
│ │ │ ├── keymint-rsps-0082383e-0
│ │ │ ├── keymint-rsps-00823840-0
│ │ │ ├── keymint-rsps-00823841-0
│ │ │ ├── keymint-rsps-00823846-0
│ │ │ ├── keymint-rsps-0082384d-0
│ │ │ ├── keymint-rsps-0082384e-0
│ │ │ ├── keymint-rsps-0082384f-0
│ │ │ ├── keymint-rsps-00823850-0
│ │ │ ├── keymint-rsps-00823903-0
│ │ │ ├── keymint-rsps-009a81fa-0
│ │ │ ├── keymint-rsps-00b5ae79-0
│ │ │ ├── keymint-rsps-01820081-0
│ │ │ ├── keymint-rsps-01820081-1
│ │ │ ├── keymint-rsps-01820081-2
│ │ │ └── keymint-rsps-01820081-3
│ │ ├── src/
│ │ │ └── keymint_hal_main.rs
│ │ ├── trusty-keymint-apex.mk
│ │ └── trusty-keymint.mk
│ ├── libtrusty/
│ │ ├── Android.bp
│ │ ├── include/
│ │ │ └── trusty/
│ │ │ ├── ipc.h
│ │ │ └── tipc.h
│ │ ├── tipc-test/
│ │ │ ├── Android.bp
│ │ │ └── tipc_test.c
│ │ └── trusty.c
│ ├── libtrusty-rs/
│ │ ├── Android.bp
│ │ ├── src/
│ │ │ ├── lib.rs
│ │ │ └── sys.rs
│ │ └── tests/
│ │ └── test.rs
│ ├── line-coverage/
│ │ ├── Android.bp
│ │ ├── coverage.cpp
│ │ └── include/
│ │ └── trusty/
│ │ └── line-coverage/
│ │ ├── coverage.h
│ │ ├── tipc.h
│ │ └── uuid.h
│ ├── metrics/
│ │ ├── Android.bp
│ │ ├── include/
│ │ │ └── trusty/
│ │ │ └── metrics/
│ │ │ ├── metrics.h
│ │ │ └── tipc.h
│ │ ├── metrics.cpp
│ │ └── metrics_test.cpp
│ ├── secretkeeper/
│ │ ├── Android.bp
│ │ ├── android.hardware.security.secretkeeper.trusty.rc
│ │ ├── android.hardware.security.secretkeeper.trusty.xml
│ │ └── src/
│ │ └── hal_main.rs
│ ├── secure_dpu/
│ │ ├── Android.bp
│ │ └── include/
│ │ └── trusty/
│ │ └── secure_dpu/
│ │ └── SecureDpu.h
│ ├── stats/
│ │ ├── aidl/
│ │ │ ├── Android.bp
│ │ │ └── android/
│ │ │ └── trusty/
│ │ │ └── stats/
│ │ │ └── nw/
│ │ │ └── setter/
│ │ │ └── IStatsSetter.aidl
│ │ └── test/
│ │ ├── Android.bp
│ │ ├── README.md
│ │ └── stats_test.cpp
│ ├── storage/
│ │ ├── lib/
│ │ │ ├── Android.bp
│ │ │ ├── include/
│ │ │ │ └── trusty/
│ │ │ │ └── lib/
│ │ │ │ └── storage.h
│ │ │ └── storage.c
│ │ ├── proxy/
│ │ │ ├── Android.bp
│ │ │ ├── checkpoint_handling.cpp
│ │ │ ├── checkpoint_handling.h
│ │ │ ├── ipc.c
│ │ │ ├── ipc.h
│ │ │ ├── log.h
│ │ │ ├── proxy.c
│ │ │ ├── rpmb.c
│ │ │ ├── rpmb.h
│ │ │ ├── storage.c
│ │ │ ├── storage.h
│ │ │ ├── watchdog.cpp
│ │ │ └── watchdog.h
│ │ └── tests/
│ │ ├── Android.bp
│ │ └── main.cpp
│ ├── sysprops/
│ │ ├── Android.bp
│ │ ├── android/
│ │ │ └── sysprop/
│ │ │ └── trusty/
│ │ │ └── security_vm.sysprop
│ │ ├── api/
│ │ │ ├── trusty-properties-current.txt
│ │ │ └── trusty-properties-latest.txt
│ │ └── example.rs
│ ├── test/
│ │ ├── binder/
│ │ │ └── aidl/
│ │ │ ├── com/
│ │ │ │ └── android/
│ │ │ │ └── trusty/
│ │ │ │ └── binder/
│ │ │ │ └── test/
│ │ │ │ ├── ByteEnum.aidl
│ │ │ │ ├── ITestService.aidl
│ │ │ │ ├── IntEnum.aidl
│ │ │ │ └── LongEnum.aidl
│ │ │ └── rules.mk
│ │ └── driver/
│ │ ├── Android.bp
│ │ └── trusty_driver_test.py
│ ├── trusty-base.mk
│ ├── trusty-storage-cf.mk
│ ├── trusty-storage.mk
│ ├── trusty-test.mk
│ └── utils/
│ ├── acvp/
│ │ ├── Android.bp
│ │ ├── acvp_ipc.h
│ │ └── trusty_modulewrapper.cpp
│ ├── coverage-controller/
│ │ ├── Android.bp
│ │ ├── controller.cpp
│ │ └── controller.h
│ ├── rpmb_dev/
│ │ ├── Android.bp
│ │ ├── rpmb.h
│ │ ├── rpmb_dev.c
│ │ ├── rpmb_dev.rc
│ │ ├── rpmb_dev.system.rc
│ │ ├── rpmb_dev.test.system.rc
│ │ ├── rpmb_dev.wv.system.rc
│ │ └── rpmb_protocol.h
│ ├── spiproxyd/
│ │ ├── Android.bp
│ │ ├── main.c
│ │ └── proxy.rc
│ └── trusty-ut-ctrl/
│ ├── Android.bp
│ └── ut-ctrl.c
├── usbd/
│ ├── Android.bp
│ ├── usbd.cpp
│ └── usbd.rc
└── watchdogd/
├── Android.bp
└── watchdogd.cpp
Showing preview only (672K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (7569 symbols across 976 files)
FILE: bootstat/boot_event_record_store.cpp
function ParseRecordEventTime (line 40) | bool ParseRecordEventTime(const std::string& path, int32_t* uptime) {
type stat (line 79) | struct stat
type utimbuf (line 88) | struct utimbuf
type dirent (line 122) | struct dirent
FILE: bootstat/boot_event_record_store.h
function class (line 29) | class BootEventRecordStore {
FILE: bootstat/boot_event_record_store_test.cpp
function CreateEmptyBootEventRecord (line 44) | bool CreateEmptyBootEventRecord(const std::string& record_path, int32_t ...
function FuzzUptimeEquals (line 65) | bool FuzzUptimeEquals(int32_t a, int32_t b) {
function DeleteDirectory (line 71) | void DeleteDirectory(const std::string& path) {
function time_t (line 95) | time_t GetUptimeSeconds() {
class BootEventRecordStoreTest (line 101) | class BootEventRecordStoreTest : public ::testing::Test {
method BootEventRecordStoreTest (line 103) | BootEventRecordStoreTest() { store_path_ = std::string(store_dir_.path...
method TearDown (line 108) | void TearDown() {
function TEST_F (line 130) | TEST_F(BootEventRecordStoreTest, AddSingleBootEvent) {
function TEST_F (line 145) | TEST_F(BootEventRecordStoreTest, AddMultipleBootEvents) {
function TEST_F (line 177) | TEST_F(BootEventRecordStoreTest, AddBootEventWithValue) {
function TEST_F (line 189) | TEST_F(BootEventRecordStoreTest, GetBootEvent) {
function TEST_F (line 214) | TEST_F(BootEventRecordStoreTest, GetBootEventNoFileContent) {
FILE: bootstat/bootstat.cpp
type AtomInfo (line 55) | struct AtomInfo {
function LogBootEvents (line 141) | void LogBootEvents() {
function RecordBootEventFromCommandLine (line 171) | void RecordBootEventFromCommandLine(const std::string& event, const std:...
function PrintBootEvents (line 183) | void PrintBootEvents() {
function ShowHelp (line 194) | void ShowHelp(const char* cmd) {
function GetCommandLine (line 211) | std::string GetCommandLine(int argc, char** argv) {
function BootReasonStrToEnum (line 478) | int32_t BootReasonStrToEnum(const std::string& boot_reason) {
function isStrongRebootReason (line 522) | bool isStrongRebootReason(const std::string& r) {
function isKernelRebootReason (line 534) | bool isKernelRebootReason(const std::string& r) {
function isKnownRebootReason (line 546) | bool isKnownRebootReason(const std::string& r) {
function isBluntRebootReason (line 557) | bool isBluntRebootReason(const std::string& r) {
function readPstoreConsole (line 574) | bool readPstoreConsole(std::string& console) {
class pstoreConsole (line 583) | class pstoreConsole {
method numError (line 590) | size_t numError(uint8_t l, uint8_t r) const { return std::bitset<8>(l ...
method numError (line 602) | size_t numError(size_t pos, const std::string& _r) const {
method pstoreConsole (line 625) | explicit pstoreConsole(const std::string& console) : console(console) {}
method pstoreConsole (line 627) | explicit pstoreConsole(const std::string&& console) = delete;
method pstoreConsole (line 628) | explicit pstoreConsole(std::string&& console) = delete;
method rfind (line 631) | size_t rfind(const std::string& needle) const {
method find (line 649) | size_t find(const std::string& needle, size_t start = 0) const {
function correctForBitError (line 665) | bool correctForBitError(std::string& reason, const std::string& needle) {
function correctForBitErrorOrUnderline (line 686) | bool correctForBitErrorOrUnderline(std::string& reason, const std::strin...
function transformReason (line 699) | void transformReason(std::string& reason) {
function likely_single_quote (line 721) | bool likely_single_quote(char c) {
function likely_newline (line 754) | bool likely_newline(char c) {
function likely_space (line 775) | bool likely_space(char c) {
function getSubreason (line 800) | std::string getSubreason(const std::string& content, size_t pos, bool qu...
function addKernelPanicSubReason (line 834) | void addKernelPanicSubReason(const pstoreConsole& console, std::string& ...
function addKernelPanicSubReason (line 899) | void addKernelPanicSubReason(const std::string& content, std::string& re...
function BootReasonAddToHistory (line 913) | void BootReasonAddToHistory(const std::string& system_boot_reason) {
function BootReasonStrToReason (line 967) | std::string BootReasonStrToReason(const std::string& boot_reason) {
function CalculateBootCompletePrefix (line 1153) | std::string CalculateBootCompletePrefix() {
function RecordInitBootTimeProp (line 1179) | void RecordInitBootTimeProp(BootEventRecordStore* boot_event_store, cons...
function BootloaderTimingMap (line 1193) | const BootloaderTimingMap GetBootLoaderTimings() {
function GetBootloaderTime (line 1222) | int32_t GetBootloaderTime(const BootloaderTimingMap& bootloader_timings) {
function RecordBootloaderTimings (line 1233) | void RecordBootloaderTimings(BootEventRecordStore* boot_event_store,
function GetAbsoluteBootTime (line 1246) | std::chrono::milliseconds GetAbsoluteBootTime(const BootloaderTimingMap&...
function RecordAbsoluteBootTime (line 1262) | void RecordAbsoluteBootTime(BootEventRecordStore* boot_event_store,
function LogBootInfoToStatsd (line 1269) | void LogBootInfoToStatsd(std::chrono::milliseconds end_time,
function SetSystemBootReason (line 1280) | void SetSystemBootReason() {
function GetBootTimeOffset (line 1313) | std::chrono::nanoseconds GetBootTimeOffset() {
function GetUptime (line 1321) | android::base::boot_clock::duration GetUptime() {
function RecordBootComplete (line 1326) | void RecordBootComplete() {
function RecordBootReason (line 1386) | void RecordBootReason() {
function RecordFactoryReset (line 1421) | void RecordFactoryReset() {
function PrintBootReasonEnum (line 1481) | void PrintBootReasonEnum(const char* arg) {
function main (line 1495) | int main(int argc, char** argv) {
FILE: bootstat/testrunner.cpp
function main (line 20) | int main(int argc, char** argv) {
FILE: cli-test/cli-test.cpp
type Test (line 47) | struct Test {
type Color (line 64) | enum Color { kRed, kGreen }
function Print (line 66) | static void Print(Color c, const char* lhs, const char* fmt, ...) {
function Die (line 76) | static void Die(int error, const char* fmt, ...) {
function V (line 87) | static void V(const char* fmt, ...) {
function SetField (line 98) | static void SetField(const char* what, std::string* field, std::string_v...
function Match (line 107) | static bool Match(std::string* s, const std::string& prefix) {
function CollectTests (line 113) | static void CollectTests(std::vector<Test>* tests, const char* test_file...
function ExitStatusToString (line 174) | static std::string ExitStatusToString(int status) {
function RunCommands (line 186) | static bool RunCommands(const char* what, const std::vector<std::string>...
function CheckOutput (line 200) | static bool CheckOutput(const char* what, std::string actual_output,
function RunTests (line 213) | static int RunTests(const std::vector<Test>& tests) {
function ShowHelp (line 286) | static void ShowHelp(bool full) {
function main (line 298) | int main(int argc, char* argv[]) {
FILE: debuggerd/client/debuggerd_client.cpp
function populate_timeval (line 77) | static void populate_timeval(struct timeval* tv, const Duration& duratio...
function get_wchan_data (line 88) | static std::string get_wchan_data(int fd, pid_t pid) {
function debuggerd_trigger_dump (line 117) | bool debuggerd_trigger_dump(pid_t tid, DebuggerdDumpType dump_type, unsi...
function dump_backtrace_to_file (line 306) | int dump_backtrace_to_file(pid_t tid, DebuggerdDumpType dump_type, int f...
function dump_backtrace_to_file_timeout (line 310) | int dump_backtrace_to_file_timeout(pid_t tid, DebuggerdDumpType dump_typ...
FILE: debuggerd/client/debuggerd_client_test.cpp
function getThreadCount (line 41) | static int getThreadCount() {
function TEST (line 53) | TEST(debuggerd_client, race) {
function TEST (line 117) | TEST(debuggerd_client, no_timeout) {
FILE: debuggerd/common/include/dump_type.h
type DebuggerdDumpType (line 23) | enum DebuggerdDumpType : uint8_t {
FILE: debuggerd/crash_dump.cpp
function pid_contains_tid (line 93) | static bool pid_contains_tid(int pid_proc_fd, pid_t tid) {
function pid_t (line 99) | static pid_t get_tracer(pid_t tracee) {
function ptrace_seize_thread (line 109) | static bool ptrace_seize_thread(int pid_proc_fd, pid_t tid, std::string*...
function wait_for_stop (line 137) | static bool wait_for_stop(pid_t tid, int* received_signal) {
function ptrace_interrupt (line 158) | static bool ptrace_interrupt(pid_t tid, int* received_signal) {
function activity_manager_notify (line 167) | static bool activity_manager_notify(pid_t pid, int signal, const std::st...
function DefuseSignalHandlers (line 234) | static void DefuseSignalHandlers() {
function Initialize (line 247) | static void Initialize(char** argv) {
function ParseArgs (line 272) | static void ParseArgs(int argc, char** argv, pid_t* pseudothread_tid, De...
function ReadCrashInfo (line 302) | static void ReadCrashInfo(unique_fd& fd, siginfo_t* siginfo,
function pid_t (line 369) | static pid_t wait_for_clone(pid_t pid, bool resume_child) {
function pid_t (line 409) | static pid_t wait_for_vm_process(pid_t pseudothread_tid) {
function InstallSigPipeHandler (line 420) | static void InstallSigPipeHandler() {
function PtracePeek (line 427) | static bool PtracePeek(int request, pid_t tid, uintptr_t addr, void* dat...
function GetGuestRegistersFromCrashedProcess (line 438) | static bool GetGuestRegistersFromCrashedProcess(pid_t tid, NativeBridgeG...
function ReadGuestRegisters (line 512) | static void ReadGuestRegisters(std::unique_ptr<unwindstack::Regs>* regs,...
function main (line 561) | int main(int argc, char** argv) {
FILE: debuggerd/crash_test.cpp
function crash (line 25) | void crash() {
FILE: debuggerd/crash_test.h
type JITCodeEntry (line 26) | struct JITCodeEntry {
type JITDescriptor (line 33) | struct JITDescriptor {
FILE: debuggerd/crasher/crasher.cpp
function noinline (line 73) | noinline void maybe_abort() {
function noinline (line 80) | noinline void smash_stack_dummy_function(volatile int* plen) {
function noinline (line 88) | noinline int smash_stack(volatile int* plen) {
function noinline (line 103) | noinline void overflow_stack(void* p) {
function noinline (line 112) | noinline void* thread_callback(void* raw_arg) {
function noinline (line 117) | noinline int do_action_on_thread(const char* arg) {
function noinline (line 125) | noinline int crash_null() {
function noinline (line 130) | noinline int crash3(int a) {
function noinline (line 135) | noinline int crash2(int a) {
function noinline (line 140) | noinline int crash(int a) {
function noinline (line 148) | noinline void abuse_heap() {
function noinline (line 154) | noinline void leak() {
function noinline (line 162) | noinline void sigsegv_non_null() {
function noinline (line 167) | noinline void fprintf_null() {
function noinline (line 172) | noinline void readdir_null() {
function noinline (line 177) | noinline int strlen_null() {
function usage (line 182) | static int usage() {
function CheckCpuFeature (line 249) | [[maybe_unused]] static void CheckCpuFeature(const std::string& name) {
function noinline (line 264) | noinline int do_action(const char* arg) {
function main (line 407) | int main(int argc, char** argv) {
FILE: debuggerd/debuggerd.cpp
function usage (line 36) | static void usage(int exit_code) {
function main (line 44) | int main(int argc, char* argv[]) {
FILE: debuggerd/debuggerd_benchmark.cpp
type ThreadState (line 34) | enum class ThreadState { Starting, Started, Stopping }
function SetScheduler (line 36) | static void SetScheduler() {
function GetMaximumPause (line 46) | static std::chrono::duration<double> GetMaximumPause(std::atomic<ThreadS...
function PerformDump (line 66) | static void PerformDump() {
function BM_maximum_pause_impl (line 96) | static void BM_maximum_pause_impl(benchmark::State& state, const Fn& fun...
function BM_maximum_pause_noop (line 117) | static void BM_maximum_pause_noop(benchmark::State& state) {
function BM_maximum_pause_debuggerd (line 121) | static void BM_maximum_pause_debuggerd(benchmark::State& state) {
FILE: debuggerd/debuggerd_test.cpp
function tombstoned_intercept (line 119) | static void tombstoned_intercept(pid_t target_pid, unique_fd* intercept_...
function pac_supported (line 172) | static bool pac_supported() {
class CrasherTest (line 180) | class CrasherTest : public ::testing::Test {
function ConsumeFd (line 303) | static void ConsumeFd(unique_fd fd, std::string* output) {
class LogcatCollector (line 307) | class LogcatCollector {
method LogcatCollector (line 309) | LogcatCollector() { system("logcat -c"); }
method Collect (line 311) | void Collect(std::string* output) {
function TEST_F (line 320) | TEST_F(CrasherTest, smoke) {
function TEST_F (line 351) | TEST_F(CrasherTest, tagged_fault_addr) {
function TEST_F (line 384) | TEST_F(CrasherTest, heap_addr_in_register) {
function SetTagCheckingLevelSync (line 427) | static void SetTagCheckingLevelSync() {
function SetTagCheckingLevelAsync (line 433) | static void SetTagCheckingLevelAsync() {
type SizeParamCrasherTest (line 440) | struct SizeParamCrasherTest : CrasherTest, testing::WithParamInterface<s...
function TEST_P (line 444) | TEST_P(SizeParamCrasherTest, mte_uaf) {
function TEST_P (line 491) | TEST_P(SizeParamCrasherTest, mte_oob_uaf) {
function TEST_P (line 523) | TEST_P(SizeParamCrasherTest, mte_overflow) {
function TEST_P (line 566) | TEST_P(SizeParamCrasherTest, mte_underflow) {
function mte_illegal_setjmp_helper (line 601) | __attribute__((noinline)) void mte_illegal_setjmp_helper(jmp_buf& jump_b...
function TEST_F (line 609) | TEST_F(CrasherTest, DISABLED_mte_illegal_setjmp) {
function TEST_F (line 649) | TEST_F(CrasherTest, mte_async) {
function TEST_F (line 679) | TEST_F(CrasherTest, mte_multiple_causes) {
function CreateTagMapping (line 745) | static uintptr_t CreateTagMapping() {
function TEST_F (line 765) | TEST_F(CrasherTest, mte_register_tag_dump) {
function TEST_F (line 798) | TEST_F(CrasherTest, mte_fault_tag_dump_front_truncated) {
function TEST_F (line 829) | TEST_F(CrasherTest, mte_fault_tag_dump) {
function TEST_F (line 863) | TEST_F(CrasherTest, mte_fault_tag_dump_rear_truncated) {
function TEST_F (line 899) | TEST_F(CrasherTest, LD_PRELOAD) {
function TEST_F (line 919) | TEST_F(CrasherTest, abort) {
function TEST_F (line 937) | TEST_F(CrasherTest, signal) {
function TEST_F (line 962) | TEST_F(CrasherTest, abort_message) {
function crash_detail_t (line 992) | inline crash_detail_t* _Nullable android_register_crash_detail_strs(cons...
function TEST_F (line 997) | TEST_F(CrasherTest, crash_detail_single) {
function TEST_F (line 1016) | TEST_F(CrasherTest, crash_detail_replace_data) {
function TEST_F (line 1039) | TEST_F(CrasherTest, crash_detail_replace_name) {
function TEST_F (line 1062) | TEST_F(CrasherTest, crash_detail_single_byte_name) {
function TEST_F (line 1082) | TEST_F(CrasherTest, crash_detail_single_bytes) {
function TEST_F (line 1102) | TEST_F(CrasherTest, crash_detail_mixed) {
function TEST_F (line 1122) | TEST_F(CrasherTest, crash_detail_many) {
function TEST_F (line 1152) | TEST_F(CrasherTest, crash_detail_single_changes) {
function TEST_F (line 1172) | TEST_F(CrasherTest, crash_detail_multiple) {
function TEST_F (line 1193) | TEST_F(CrasherTest, crash_detail_remove) {
function TEST_F (line 1215) | TEST_F(CrasherTest, abort_message_newline_trimmed) {
function TEST_F (line 1234) | TEST_F(CrasherTest, abort_message_multiple_newlines_trimmed) {
function TEST_F (line 1253) | TEST_F(CrasherTest, abort_message_backtrace) {
function TEST_F (line 1273) | TEST_F(CrasherTest, intercept_timeout) {
function TEST_F (line 1291) | TEST_F(CrasherTest, wait_for_debugger) {
function TEST_F (line 1312) | TEST_F(CrasherTest, backtrace) {
function TEST_F (line 1344) | TEST_F(CrasherTest, PR_SET_DUMPABLE_0_crash) {
function TEST_F (line 1364) | TEST_F(CrasherTest, capabilities) {
function TEST_F (line 1421) | TEST_F(CrasherTest, fake_pid) {
function setup_jail (line 1455) | static void setup_jail(minijail* jail) {
function pid_t (line 1492) | static pid_t seccomp_fork_impl(void (*prejail)()) {
function pid_t (line 1525) | static pid_t seccomp_fork() {
function TEST_F (line 1529) | TEST_F(CrasherTest, seccomp_crash) {
function pid_t (line 1546) | static pid_t seccomp_fork_rlimit() {
function TEST_F (line 1559) | TEST_F(CrasherTest, seccomp_crash_oom) {
function raise_debugger_signal (line 1586) | raise_debugger_signal(DebuggerdDumpType dump_type) {
function foo (line 1606) | void foo() {
function bar (line 1611) | void bar() {
function TEST_F (line 1616) | TEST_F(CrasherTest, seccomp_tombstone) {
function TEST_F (line 1646) | TEST_F(CrasherTest, seccomp_tombstone_thread_abort) {
function TEST_F (line 1672) | TEST_F(CrasherTest, seccomp_tombstone_multiple_threads_abort) {
function TEST_F (line 1703) | TEST_F(CrasherTest, seccomp_backtrace) {
function TEST_F (line 1733) | TEST_F(CrasherTest, seccomp_backtrace_from_thread) {
function TEST_F (line 1767) | TEST_F(CrasherTest, seccomp_crash_logcat) {
function TEST_F (line 1778) | TEST_F(CrasherTest, seccomp_tombstone_no_allocation) {
function TEST_F (line 1811) | TEST_F(CrasherTest, seccomp_backtrace_no_allocation) {
function TEST_F (line 1844) | TEST_F(CrasherTest, competing_tracer) {
type GwpAsanTestParameters (line 1880) | struct GwpAsanTestParameters {
type GwpAsanCrasherTest (line 1887) | struct GwpAsanCrasherTest
function TEST_P (line 1931) | TEST_P(GwpAsanCrasherTest, run_gwp_asan_test) {
function TEST_P (line 2000) | TEST_P(GwpAsanCrasherTest, DISABLED_run_gwp_asan_test) {
function TEST_F (line 2034) | TEST_F(CrasherTest, fdsan_warning_abort_message) {
function TEST (line 2059) | TEST(crash_dump, zombie) {
function TEST (line 2088) | TEST(tombstoned, no_notify) {
function TEST (line 2111) | TEST(tombstoned, stress) {
function TEST (line 2191) | TEST(tombstoned, intercept_java_trace_smoke) {
function TEST (line 2223) | TEST(tombstoned, intercept_multiple_dump_types) {
function TEST (line 2238) | TEST(tombstoned, intercept_bad_pid) {
function TEST (line 2248) | TEST(tombstoned, intercept_bad_dump_types) {
function TEST (line 2269) | TEST(tombstoned, intercept_already_registered) {
function TEST (line 2284) | TEST(tombstoned, intercept_tombstone_proto_matched_to_tombstone) {
function TEST (line 2305) | TEST(tombstoned, intercept_any) {
function TEST (line 2325) | TEST(tombstoned, intercept_any_failed_with_multiple_intercepts) {
function TEST (line 2343) | TEST(tombstoned, intercept_multiple_verify_intercept) {
function TEST (line 2396) | TEST(tombstoned, interceptless_backtrace) {
function overflow_stack (line 2435) | static __attribute__((__noinline__)) void overflow_stack(void* p) {
function TEST_F (line 2445) | TEST_F(CrasherTest, stack_overflow) {
function GetTestLibraryPath (line 2462) | static std::string GetTestLibraryPath() {
function CreateEmbeddedLibrary (line 2473) | static void CreateEmbeddedLibrary(int out_fd) {
function TEST_F (line 2487) | TEST_F(CrasherTest, non_zero_offset_in_library) {
function CopySharedLibrary (line 2524) | static bool CopySharedLibrary(const char* tmp_dir, std::string* tmp_so_n...
function TEST_F (line 2534) | TEST_F(CrasherTest, unreadable_elf) {
function CheckForTombstone (line 2573) | void CheckForTombstone(const struct stat& text_st, std::optional<std::st...
function TEST (line 2596) | TEST(tombstoned, proto) {
function TEST (line 2637) | TEST(tombstoned, proto_intercept) {
function TEST_F (line 2661) | TEST_F(CrasherTest, intercept_for_main_thread_signal_on_side_thread) {
function format_pointer (line 2685) | static std::string format_pointer(uintptr_t ptr) {
function format_pointer (line 2694) | static std::string format_pointer(void* ptr) {
function format_full_pointer (line 2698) | static std::string format_full_pointer(uintptr_t ptr) {
function format_full_pointer (line 2706) | static std::string format_full_pointer(void* ptr) {
function crash_call (line 2710) | __attribute__((__noinline__)) int crash_call(uintptr_t ptr) {
function TEST_F (line 2717) | TEST_F(CrasherTest, fault_address_before_first_map) {
function TEST_F (line 2745) | TEST_F(CrasherTest, fault_address_after_last_map) {
function TEST_F (line 2786) | TEST_F(CrasherTest, fault_address_between_maps) {
function TEST_F (line 2837) | TEST_F(CrasherTest, fault_address_in_map) {
function TEST_F (line 2893) | TEST_F(CrasherTest, verify_dex_pc_with_function_name) {
function format_map_pointer (line 3001) | static std::string format_map_pointer(uintptr_t ptr) {
function TEST_F (line 3011) | TEST_F(CrasherTest, verify_map_format) {
function TEST_F (line 3100) | TEST_F(CrasherTest, verify_header) {
function TEST_F (line 3124) | TEST_F(CrasherTest, verify_thread_header) {
function TEST_F (line 3178) | TEST_F(CrasherTest, verify_build_id) {
function TEST_F (line 3221) | TEST_F(CrasherTest, logd_skips_reading_logs) {
function TEST_F (line 3244) | TEST_F(CrasherTest, logd_skips_reading_logs_not_main_thread) {
function TEST_F (line 3275) | TEST_F(CrasherTest, DISABLED_max_log_messages) {
function TEST_F (line 3298) | TEST_F(CrasherTest, log_with_newline) {
function TEST_F (line 3318) | TEST_F(CrasherTest, log_with_non_printable_ascii_verify_encoded) {
function TEST_F (line 3377) | TEST_F(CrasherTest, log_with_with_special_printable_ascii) {
FILE: debuggerd/handler/debuggerd_fallback.cpp
class ScopedUseFallbackAllocator (line 66) | class ScopedUseFallbackAllocator {
method ScopedUseFallbackAllocator (line 68) | ScopedUseFallbackAllocator() { Enable(); }
method Enable (line 72) | bool Enable() {
method Disable (line 83) | void Disable() {
method enabled (line 90) | bool enabled() { return enabled_; }
function debuggerd_fallback_trace (line 96) | static void debuggerd_fallback_trace(int output_fd, ucontext_t* ucontext) {
function forward_output (line 116) | static bool forward_output(int src_fd, int dst_fd, pid_t expected_tid) {
type packed_thread_output (line 156) | struct __attribute__((__packed__)) packed_thread_output {
function pack_thread_fd (line 161) | static uint64_t pack_thread_fd(pid_t tid, int fd) {
function unpack_thread_fd (line 169) | static std::pair<pid_t, int> unpack_thread_fd(uint64_t value) {
function trace_handler (line 175) | static void trace_handler(siginfo_t* info, ucontext_t* ucontext) {
function crash_handler (line 316) | static void crash_handler(siginfo_t* info, ucontext_t* ucontext, void* a...
function debuggerd_fallback_handler (line 355) | void debuggerd_fallback_handler(siginfo_t* info, ucontext_t* ucontext,
FILE: debuggerd/handler/debuggerd_fallback_nop.cpp
function debuggerd_fallback_handler (line 17) | void debuggerd_fallback_handler(struct siginfo_t*, struct ucontext_t*, v...
FILE: debuggerd/handler/debuggerd_handler.cpp
type FdsanBypassCloser (line 63) | struct FdsanBypassCloser {
method Close (line 64) | static void Close(int fd) {
function pid_t (line 84) | static pid_t __getpid() {
function pid_t (line 88) | static pid_t __gettid() {
function property_parse_bool (line 92) | static bool property_parse_bool(const char* name) {
function is_permissive_mte (line 105) | static bool is_permissive_mte() {
function parse_uint_with_error_reporting (line 120) | static bool parse_uint_with_error_reporting(const char* s, const char* n...
function property_parse_int (line 130) | static bool property_parse_int(const char* name, int* out) {
function permissive_mte_renable_timer (line 149) | static int permissive_mte_renable_timer() {
function futex_wait (line 173) | static inline void futex_wait(volatile void* ftx, int value) {
class ErrnoRestorer (line 177) | class ErrnoRestorer {
method ErrnoRestorer (line 179) | ErrnoRestorer() : saved_errno_(errno) {
function fatal (line 200) | static void __noreturn __printflike(1, 2) fatal(const char* fmt, ...) {
function fatal_errno (line 207) | static void __noreturn __printflike(1, 2) fatal_errno(const char* fmt, ....
function get_main_thread_name (line 217) | static bool get_main_thread_name(char* buf, size_t len) {
function log_signal_summary (line 245) | static void log_signal_summary(const siginfo_t* si) {
function have_siginfo (line 288) | static bool have_siginfo(int signum) {
function raise_caps (line 298) | static void raise_caps() {
function create_vm_process (line 335) | static void create_vm_process() {
type debugger_thread_info (line 368) | struct debugger_thread_info {
function DebuggerdDumpType (line 383) | static DebuggerdDumpType get_dump_type(const debugger_thread_info* threa...
function debuggerd_dispatch_pseudothread (line 399) | static int debuggerd_dispatch_pseudothread(void* arg) {
function resend_signal (line 572) | static void resend_signal(siginfo_t* info) {
function debuggerd_signal_handler (line 590) | static void debuggerd_signal_handler(int signal_number, siginfo_t* info,...
function debuggerd_init (line 820) | void debuggerd_init(debuggerd_callbacks_t* callbacks) {
function debuggerd_handle_gwp_asan_signal (line 859) | bool debuggerd_handle_gwp_asan_signal(int signal_number, siginfo_t* info...
function debuggerd_handle_signal (line 908) | bool debuggerd_handle_signal(int signal_number, siginfo_t* info, void* c...
FILE: debuggerd/include/debuggerd/client.h
type DebuggerdDumpType (line 29) | enum DebuggerdDumpType
type DebuggerdDumpType (line 32) | enum DebuggerdDumpType
type DebuggerdDumpType (line 33) | enum DebuggerdDumpType
FILE: debuggerd/include/debuggerd/handler.h
function __BEGIN_DECLS (line 27) | __BEGIN_DECLS
type crash_detail_page_t (line 36) | struct crash_detail_page_t
type debugger_process_info (line 40) | struct __attribute__((packed)) debugger_process_info {
type gwp_asan_callbacks_t (line 57) | typedef struct {
type debuggerd_callbacks_t (line 65) | typedef struct {
function debuggerd_register_handlers (line 81) | static void __attribute__((__unused__)) debuggerd_register_handlers(stru...
FILE: debuggerd/libdebuggerd/backtrace.cpp
function dump_process_header (line 47) | static void dump_process_header(log_t* log, pid_t pid,
function dump_process_footer (line 57) | static void dump_process_footer(log_t* log, pid_t pid) {
function dump_backtrace_thread (line 61) | void dump_backtrace_thread(int output_fd, unwindstack::AndroidUnwinder* ...
function dump_backtrace (line 79) | void dump_backtrace(android::base::unique_fd output_fd, unwindstack::And...
function dump_backtrace_header (line 103) | void dump_backtrace_header(int output_fd) {
function dump_backtrace_footer (line 112) | void dump_backtrace_footer(int output_fd) {
FILE: debuggerd/libdebuggerd/gwp_asan.cpp
function retrieve_gwp_asan_state (line 32) | static bool retrieve_gwp_asan_state(unwindstack::Memory* process_memory,...
FILE: debuggerd/libdebuggerd/include/libdebuggerd/backtrace.h
function namespace (line 32) | namespace unwindstack {
FILE: debuggerd/libdebuggerd/include/libdebuggerd/gwp_asan.h
function namespace (line 33) | namespace unwindstack {
function class (line 38) | class GwpAsanCrashData {
FILE: debuggerd/libdebuggerd/include/libdebuggerd/open_files_list.h
type FDInfo (line 30) | struct FDInfo {
FILE: debuggerd/libdebuggerd/include/libdebuggerd/scudo.h
function namespace (line 32) | namespace unwindstack {
function class (line 37) | class ScudoCrashData {
FILE: debuggerd/libdebuggerd/include/libdebuggerd/tombstone.h
function namespace (line 39) | namespace unwindstack {
FILE: debuggerd/libdebuggerd/include/libdebuggerd/types.h
type ThreadInfo (line 25) | struct ThreadInfo {
type ProcessInfo (line 50) | struct ProcessInfo {
FILE: debuggerd/libdebuggerd/include/libdebuggerd/utility.h
type log_t (line 29) | struct log_t {
FILE: debuggerd/libdebuggerd/open_files_list.cpp
function populate_open_files_list (line 41) | void populate_open_files_list(OpenFilesList* list, pid_t pid) {
function populate_fdsan_table (line 67) | void populate_fdsan_table(OpenFilesList* list, std::shared_ptr<unwindsta...
function dump_open_files_list (line 121) | void dump_open_files_list(log_t* log, const OpenFilesList& files, const ...
FILE: debuggerd/libdebuggerd/scudo.cpp
function AllocAndReadFully (line 32) | std::unique_ptr<char[]> AllocAndReadFully(unwindstack::Memory* process_m...
FILE: debuggerd/libdebuggerd/test/UnwinderMock.h
function class (line 25) | class UnwinderMock : public unwindstack::Unwinder {
FILE: debuggerd/libdebuggerd/test/dump_memory_test.cpp
function GetMemoryString (line 32) | std::string GetMemoryString(uintptr_t addr, const std::vector<uint64_t>&...
function GetFullDumpString (line 77) | std::string GetFullDumpString() {
function GetPartialDumpString (line 83) | std::string GetPartialDumpString() {
class MemoryMock (line 91) | class MemoryMock : public unwindstack::Memory {
method Read (line 95) | virtual size_t Read(uint64_t addr, void* buffer, size_t bytes) override {
method SetReadData (line 121) | void SetReadData(uint8_t* buffer, size_t bytes) {
method SetPartialReadAmount (line 128) | void SetPartialReadAmount(size_t bytes) {
class DumpMemoryTest (line 143) | class DumpMemoryTest : public ::testing::Test {
method SetUp (line 145) | virtual void SetUp() {
method TearDown (line 173) | virtual void TearDown() {
function TEST_F (line 185) | TEST_F(DumpMemoryTest, aligned_addr) {
function TEST_F (line 204) | TEST_F(DumpMemoryTest, partial_read) {
function TEST_F (line 224) | TEST_F(DumpMemoryTest, unaligned_addr) {
function TEST_F (line 243) | TEST_F(DumpMemoryTest, memory_unreadable) {
function TEST_F (line 256) | TEST_F(DumpMemoryTest, memory_partially_unreadable) {
function TEST_F (line 275) | TEST_F(DumpMemoryTest, memory_partially_unreadable_unaligned_return) {
function TEST_F (line 300) | TEST_F(DumpMemoryTest, memory_partially_unreadable_two_unaligned_reads) {
function TEST_F (line 329) | TEST_F(DumpMemoryTest, address_low_fence) {
function TEST_F (line 348) | TEST_F(DumpMemoryTest, memory_address_too_high) {
function TEST_F (line 371) | TEST_F(DumpMemoryTest, memory_address_nearly_too_high) {
function TEST_F (line 404) | TEST_F(DumpMemoryTest, first_read_empty) {
function TEST_F (line 434) | TEST_F(DumpMemoryTest, first_read_empty_second_read_stops) {
function TEST_F (line 460) | TEST_F(DumpMemoryTest, first_read_empty_next_page_out_of_range) {
function TEST_F (line 481) | TEST_F(DumpMemoryTest, first_read_empty_next_page_out_of_range_fence_pos...
FILE: debuggerd/libdebuggerd/test/elf_fake.cpp
type unwindstack (line 23) | namespace unwindstack {
class Memory (line 24) | class Memory
function elf_set_fake_build_id (line 29) | void elf_set_fake_build_id(const std::string& build_id) {
function elf_get_build_id (line 33) | bool elf_get_build_id(unwindstack::Memory*, uintptr_t, std::string* buil...
FILE: debuggerd/libdebuggerd/test/log_fake.cpp
class Backtrace (line 28) | class Backtrace
type EventTagMap (line 29) | struct EventTagMap
type AndroidLogEntry (line 30) | struct AndroidLogEntry
function resetLogs (line 36) | void resetLogs() {
function getFakeLogBuf (line 41) | std::string getFakeLogBuf() {
function getFakeLogPrint (line 45) | std::string getFakeLogPrint() {
function __android_log_buf_write (line 49) | int __android_log_buf_write(int bufId, int prio, const char* tag, const ...
function __android_log_print (line 57) | int __android_log_print(int prio, const char* tag, const char* fmt, ...) {
function log_id_t (line 72) | log_id_t android_name_to_log_id(const char*) {
type logger_list (line 76) | struct logger_list
function android_logger_list_read (line 81) | int android_logger_list_read(struct logger_list*, struct log_msg*) {
function EventTagMap (line 85) | EventTagMap* android_openEventTagMap(const char*) {
function android_log_processBinaryLogBuffer (line 89) | int android_log_processBinaryLogBuffer(
function android_logger_list_free (line 95) | void android_logger_list_free(struct logger_list*) {
FILE: debuggerd/libdebuggerd/test/mte_stack_record_test.cpp
type ScopedUnmap (line 35) | struct ScopedUnmap {
class MteStackHistoryTest (line 41) | class MteStackHistoryTest : public ::testing::TestWithParam<int> {
method SetUp (line 42) | void SetUp() override {
function TEST (line 57) | TEST(MteStackHistoryUnwindTest, TestOne) {
function FindMapping (line 87) | static std::optional<android::procinfo::MapInfo> FindMapping(void* data) {
function TEST_P (line 99) | TEST_P(MteStackHistoryTest, TestFree) {
function TEST_P (line 114) | TEST_P(MteStackHistoryTest, TestEmpty) {
function TEST_P (line 127) | TEST_P(MteStackHistoryTest, TestFull) {
function TEST_P (line 155) | TEST_P(MteStackHistoryTest, TestHalfFull) {
FILE: debuggerd/libdebuggerd/test/open_files_list_test.cpp
function TEST (line 30) | TEST(OpenFilesListTest, BasicTest) {
FILE: debuggerd/libdebuggerd/test/tombstone_proto_to_text_test.cpp
class TombstoneProtoToTextTest (line 30) | class TombstoneProtoToTextTest : public ::testing::Test {
method SetUp (line 32) | void SetUp() {
method ProtoToString (line 62) | void ProtoToString() {
function TEST_F (line 82) | TEST_F(TombstoneProtoToTextTest, tagged_addr_ctrl) {
function TEST_F (line 106) | TEST_F(TombstoneProtoToTextTest, pac_enabled_keys) {
function TEST_F (line 127) | TEST_F(TombstoneProtoToTextTest, crash_detail_string) {
function TEST_F (line 135) | TEST_F(TombstoneProtoToTextTest, crash_detail_bytes) {
function TEST_F (line 143) | TEST_F(TombstoneProtoToTextTest, stack_record) {
function TEST_F (line 171) | TEST_F(TombstoneProtoToTextTest, symbolize) {
function TEST_F (line 179) | TEST_F(TombstoneProtoToTextTest, uid) {
FILE: debuggerd/libdebuggerd/tombstone.cpp
function engrave_tombstone_ucontext (line 55) | void engrave_tombstone_ucontext(int tombstone_fd, int proto_fd, uint64_t...
function engrave_tombstone (line 125) | void engrave_tombstone(unique_fd output_fd, unique_fd proto_fd,
FILE: debuggerd/libdebuggerd/tombstone_proto.cpp
function Architecture (line 88) | static Architecture get_arch() {
function get_stack_overflow_cause (line 104) | static std::optional<std::string> get_stack_overflow_cause(uint64_t faul...
function set_human_readable_cause (line 140) | void set_human_readable_cause(Cause* cause, uint64_t fault_addr) {
function dump_stack_history (line 213) | void dump_stack_history(unwindstack::AndroidUnwinder* unwinder, uintptr_...
function pid_t (line 283) | static pid_t get_containing_thread(unwindstack::MapInfo* map_info, pid_t...
function maybe_stack_mte_cause (line 297) | static std::optional<std::string> maybe_stack_mte_cause(
function dump_probable_cause (line 320) | static void dump_probable_cause(Tombstone* tombstone, unwindstack::Andro...
function dump_crash_details (line 388) | static void dump_crash_details(Tombstone* tombstone,
function dump_abort_message (line 428) | static void dump_abort_message(Tombstone* tombstone,
function dump_open_fds (line 473) | static void dump_open_fds(Tombstone* tombstone, const OpenFilesList* ope...
function fill_in_backtrace_frame (line 498) | void fill_in_backtrace_frame(BacktraceFrame* f, const unwindstack::Frame...
function dump_registers (line 532) | static void dump_registers(unwindstack::AndroidUnwinder* unwinder,
function dump_thread_backtrace (line 586) | static void dump_thread_backtrace(std::vector<unwindstack::FrameData>& f...
function dump_thread (line 612) | static void dump_thread(Tombstone* tombstone, unwindstack::AndroidUnwind...
function dump_mappings (line 664) | static void dump_mappings(Tombstone* tombstone, unwindstack::Maps* maps,
function add_error_log_msg (line 695) | static void add_error_log_msg(Tombstone* tombstone, const std::string&& ...
function dump_log_file (line 712) | static void dump_log_file(Tombstone* tombstone, const char* logger, pid_...
function dump_logcat (line 790) | static void dump_logcat(Tombstone* tombstone, pid_t pid) {
function dump_tags_around_fault_addr (line 795) | static void dump_tags_around_fault_addr(Signal* signal, const Tombstone&...
function engrave_tombstone_proto (line 838) | void engrave_tombstone_proto(Tombstone* tombstone, unwindstack::AndroidU...
FILE: debuggerd/libdebuggerd/tombstone_proto_to_text.cpp
function describe_end (line 55) | static std::string describe_end(long value, std::string& desc) {
function pointer_width (line 79) | static int pointer_width(const Tombstone& tombstone) {
function untag_address (line 96) | static uint64_t untag_address(Architecture arch, uint64_t addr) {
function print_thread_header (line 103) | static void print_thread_header(CallbackType callback, const Tombstone& ...
function print_register_row (line 125) | static void print_register_row(CallbackType callback, int word_size,
function print_thread_registers (line 135) | static void print_thread_registers(CallbackType callback, const Tombston...
function print_backtrace (line 190) | static void print_backtrace(CallbackType callback, SymbolizeCallbackType...
function print_thread_backtrace (line 221) | static void print_thread_backtrace(CallbackType callback, SymbolizeCallb...
function print_thread_memory_dump (line 234) | static void print_thread_memory_dump(CallbackType callback, const Tombst...
function print_thread (line 284) | static void print_thread(CallbackType callback, SymbolizeCallbackType sy...
function print_tag_dump (line 292) | static void print_tag_dump(CallbackType callback, const Tombstone& tombs...
function print_memory_maps (line 347) | static void print_memory_maps(CallbackType callback, const Tombstone& to...
function print_main_thread (line 423) | static void print_main_thread(CallbackType callback, SymbolizeCallbackTy...
function print_logs (line 542) | void print_logs(CallbackType callback, const Tombstone& tombstone, int t...
function print_guest_thread (line 566) | static void print_guest_thread(CallbackType callback, SymbolizeCallbackT...
function tombstone_proto_to_text (line 581) | bool tombstone_proto_to_text(const Tombstone& tombstone, CallbackType ca...
FILE: debuggerd/libdebuggerd/utility.cpp
function is_allowed_in_logcat (line 50) | bool is_allowed_in_logcat(enum logtype ltype) {
function should_write_to_kmsg (line 54) | static bool should_write_to_kmsg() {
function _LOG (line 67) | __attribute__((__weak__, visibility("default")))
function _VLOG (line 75) | __attribute__((__weak__, visibility("default")))
function dump_memory (line 129) | ssize_t dump_memory(void* out, size_t len, uint8_t* tags, size_t tags_le...
function dump_memory (line 204) | void dump_memory(log_t* log, unwindstack::Memory* memory, uint64_t addr,...
function drop_capabilities (line 249) | void drop_capabilities() {
function signal_has_si_addr (line 267) | bool signal_has_si_addr(const siginfo_t* si) {
function signal_has_sender (line 286) | bool signal_has_sender(const siginfo_t* si, pid_t caller_pid) {
function get_signal_sender (line 290) | void get_signal_sender(char* buf, size_t n, const siginfo_t* si) {
function log_backtrace (line 449) | void log_backtrace(log_t* log, unwindstack::AndroidUnwinder* unwinder,
FILE: debuggerd/libdebuggerd/utility_host.cpp
function describe_end (line 77) | static std::string describe_end(long value, std::string& desc) {
function describe_tagged_addr_ctrl (line 84) | std::string describe_tagged_addr_ctrl(long value) {
function describe_pac_enabled_keys (line 96) | std::string describe_pac_enabled_keys(long value) {
function oct_encode (line 106) | static std::string oct_encode(const std::string& data, bool (*should_enc...
function oct_encode_non_ascii_printable (line 127) | std::string oct_encode_non_ascii_printable(const std::string& data) {
function oct_encode_non_printable (line 131) | std::string oct_encode_non_printable(const std::string& data) {
FILE: debuggerd/pbtombstone.cpp
function usage (line 34) | [[noreturn]] void usage(bool error) {
function main (line 43) | int main(int argc, char* argv[]) {
FILE: debuggerd/protocol.h
type class (line 32) | enum class
type DumpRequest (line 47) | struct DumpRequest {
type TombstonedCrashPacket (line 53) | struct TombstonedCrashPacket {
type InterceptRequest (line 62) | struct InterceptRequest {
type class (line 67) | enum class
type InterceptResponse (line 78) | struct InterceptResponse {
type CrashInfoHeader (line 84) | struct __attribute__((__packed__)) CrashInfoHeader {
type CrashInfoDataStatic (line 88) | struct __attribute__((__packed__)) CrashInfoDataStatic {
function CrashInfoDataStatic (line 94) | struct __attribute__((__packed__)) CrashInfoDataDynamic : public CrashIn...
type CrashInfo (line 107) | struct __attribute__((__packed__)) CrashInfo {
FILE: debuggerd/rust/tombstoned_client/src/lib.rs
type Error (line 25) | pub struct Error;
type TombstonedConnection (line 28) | pub struct TombstonedConnection {
method from_raw_fds (line 45) | unsafe fn from_raw_fds(
method connect (line 69) | pub fn connect(pid: i32, dump_type: DebuggerdDumpType) -> Result<Self,...
method notify_completion (line 89) | pub fn notify_completion(&self) -> Result<(), Error> {
type DebuggerdDumpType (line 101) | enum DebuggerdDumpType {
function tombstoned_connect_files (line 124) | fn tombstoned_connect_files(
function tombstoned_notify_completion (line 132) | fn tombstoned_notify_completion(tombstoned_socket: i32) -> bool;
function test (line 144) | fn test() {
FILE: debuggerd/rust/tombstoned_client/wrapper.cpp
function tombstoned_connect_files (line 25) | bool tombstoned_connect_files(pid_t pid, int& tombstoned_socket, int& te...
FILE: debuggerd/test_permissive_mte/mte_crash.cpp
function main (line 20) | int main(int, char**) {
FILE: debuggerd/test_permissive_mte/src/com/android/tests/debuggerd/PermissiveMteTest.java
class PermissiveMteTest (line 35) | @RunWith(DeviceJUnit4ClassRunner.class)
method setUp (line 39) | @Before
method parseTombstone (line 47) | Tombstone parseTombstone(String tombstonePath) throws Exception {
method tearDown (line 59) | @After
method testCrash (line 77) | @Test
method testReenableCrash (line 101) | @Test
method testCrashProperty (line 128) | @Test
FILE: debuggerd/tombstone_handler.cpp
function is_microdroid (line 36) | static bool is_microdroid() {
function connect_tombstone_server_microdroid (line 40) | static bool connect_tombstone_server_microdroid(unique_fd* text_output_fd,
function notify_completion_microdroid (line 96) | static bool notify_completion_microdroid(int vsock_out, int vsock_proto) {
function connect_tombstone_server (line 100) | bool connect_tombstone_server(pid_t pid, unique_fd* tombstoned_socket, u...
function notify_completion (line 108) | bool notify_completion(int tombstoned_socket, int vsock_out, int vsock_p...
FILE: debuggerd/tombstone_symbolize.cpp
function symbolize_backtrace_frame (line 151) | void symbolize_backtrace_frame(const BacktraceFrame& frame, Symbolizer& ...
FILE: debuggerd/tombstone_symbolize.h
function class (line 26) | class Symbolizer {
FILE: debuggerd/tombstoned/intercept_manager.cpp
function intercept_close_cb (line 41) | static void intercept_close_cb(evutil_socket_t sockfd, short event, void...
function intercept_request_cb (line 83) | static void intercept_request_cb(evutil_socket_t sockfd, short ev, void*...
function intercept_accept_cb (line 155) | static void intercept_accept_cb(evconnlistener* listener, evutil_socket_...
function DebuggerdDumpType (line 182) | static DebuggerdDumpType canonical_dump_type(const DebuggerdDumpType dum...
function Intercept (line 191) | Intercept* InterceptManager::Get(const pid_t pid, const DebuggerdDumpTyp...
FILE: debuggerd/tombstoned/intercept_manager.h
type InterceptManager (line 30) | struct InterceptManager
type InterceptRequest (line 31) | struct InterceptRequest
type InterceptResponse (line 32) | struct InterceptResponse
type InterceptManager (line 47) | struct InterceptManager {
FILE: debuggerd/tombstoned/tombstoned.cpp
type CrashStatus (line 57) | enum CrashStatus {
type CrashArtifact (line 62) | struct CrashArtifact {
method CrashArtifact (line 65) | static CrashArtifact devnull() {
type CrashArtifactPaths (line 72) | struct CrashArtifactPaths {
type CrashOutput (line 77) | struct CrashOutput {
type Crash (line 85) | struct Crash {
class CrashQueue (line 96) | class CrashQueue {
method CrashQueue (line 98) | CrashQueue(const std::string& dir_path, const std::string& file_name_p...
method CrashQueue (line 120) | static CrashQueue* for_crash(const Crash* crash) {
method CrashQueue (line 124) | static CrashQueue* for_crash(const std::unique_ptr<Crash>& crash) {
method CrashQueue (line 128) | static CrashQueue* for_tombstones() {
method CrashQueue (line 136) | static CrashQueue* for_anrs() {
method CrashArtifact (line 144) | CrashArtifact create_temporary_file() const {
method get_output (line 163) | std::optional<CrashOutput> get_output(DebuggerdDumpType dump_type) {
method borrowed_fd (line 193) | borrowed_fd dir_fd() { return dir_fd_; }
method CrashArtifactPaths (line 195) | CrashArtifactPaths get_next_artifact_paths() {
method maybe_enqueue_crash (line 208) | bool maybe_enqueue_crash(std::unique_ptr<Crash>&& crash) {
method maybe_dequeue_crashes (line 217) | void maybe_dequeue_crashes(void (*handler)(std::unique_ptr<Crash> cras...
method on_crash_started (line 225) | void on_crash_started() { ++num_concurrent_dumps_; }
method on_crash_completed (line 227) | void on_crash_completed() { --num_concurrent_dumps_; }
method find_oldest_artifact (line 230) | void find_oldest_artifact() {
function perform_request (line 285) | static void perform_request(std::unique_ptr<Crash> crash) {
function crash_accept_cb (line 335) | static void crash_accept_cb(evconnlistener* listener, evutil_socket_t so...
function crash_request_cb (line 349) | static void crash_request_cb(evutil_socket_t sockfd, short ev, void* arg) {
function rename_tombstone_fd (line 410) | static bool rename_tombstone_fd(borrowed_fd fd, borrowed_fd dirfd, const...
function crash_completed (line 431) | static void crash_completed(borrowed_fd sockfd, std::unique_ptr<Crash> c...
function crash_completed_cb (line 478) | static void crash_completed_cb(evutil_socket_t sockfd, short ev, void* a...
function main (line 492) | int main(int, char* []) {
FILE: debuggerd/tombstoned/tombstoned_client.cpp
function tombstoned_connect (line 35) | bool tombstoned_connect(pid_t pid, unique_fd* tombstoned_socket, unique_...
function tombstoned_connect (line 40) | bool tombstoned_connect(pid_t pid, unique_fd* tombstoned_socket, unique_...
function tombstoned_notify_completion (line 100) | bool tombstoned_notify_completion(int tombstoned_socket) {
FILE: debuggerd/util.cpp
function get_command_line (line 30) | std::vector<std::string> get_command_line(pid_t pid) {
function get_process_name (line 50) | std::string get_process_name(pid_t pid) {
function get_thread_name (line 57) | std::string get_thread_name(pid_t tid) {
function get_timestamp (line 63) | std::string get_timestamp() {
function iterate_tids (line 79) | bool iterate_tids(pid_t pid, std::function<void(pid_t)> callback) {
FILE: diagnose_usb/diagnose_usb.cpp
function GetUdevProblem (line 37) | static std::string GetUdevProblem() {
function UsbNoPermissionsShortHelpText (line 83) | std::string UsbNoPermissionsShortHelpText() {
function UsbNoPermissionsLongHelpText (line 96) | std::string UsbNoPermissionsLongHelpText() {
FILE: fastboot/bootimg_utils.cpp
function bootimg_set_cmdline_v3_and_above (line 37) | static void bootimg_set_cmdline_v3_and_above(boot_img_hdr_v3* h, const s...
function bootimg_set_cmdline (line 42) | void bootimg_set_cmdline(boot_img_hdr_v2* h, const std::string& cmdline) {
function mkbootimg_v3_and_above (line 50) | static void mkbootimg_v3_and_above(const std::vector<char>& kernel,
function mkbootimg (line 79) | void mkbootimg(const std::vector<char>& kernel, const std::vector<char>&...
FILE: fastboot/device/commands.cpp
type VariableHandlers (line 65) | struct VariableHandlers {
function IsSnapshotUpdateInProgress (line 72) | static bool IsSnapshotUpdateInProgress(FastbootDevice* device) {
function IsProtectedPartitionDuringMerge (line 81) | static bool IsProtectedPartitionDuringMerge(FastbootDevice* device, cons...
function GetAllVars (line 90) | static void GetAllVars(FastbootDevice* device, const std::string& name,
function GetVarAll (line 154) | static bool GetVarAll(FastbootDevice* device) {
function PostWipeData (line 161) | static void PostWipeData() {
function GetVarHandler (line 174) | bool GetVarHandler(FastbootDevice* device, const std::vector<std::string...
function OemPostWipeData (line 202) | bool OemPostWipeData(FastbootDevice* device) {
function EraseHandler (line 225) | bool EraseHandler(FastbootDevice* device, const std::vector<std::string>...
function OemCmdHandler (line 262) | bool OemCmdHandler(FastbootDevice* device, const std::vector<std::string...
function DownloadHandler (line 284) | bool DownloadHandler(FastbootDevice* device, const std::vector<std::stri...
function SetActiveHandler (line 320) | bool SetActiveHandler(FastbootDevice* device, const std::vector<std::str...
function ShutDownHandler (line 382) | bool ShutDownHandler(FastbootDevice* device, const std::vector<std::stri...
function RebootHandler (line 390) | bool RebootHandler(FastbootDevice* device, const std::vector<std::string...
function RebootBootloaderHandler (line 398) | bool RebootBootloaderHandler(FastbootDevice* device, const std::vector<s...
function RebootFastbootHandler (line 406) | bool RebootFastbootHandler(FastbootDevice* device, const std::vector<std...
function EnterRecovery (line 414) | static bool EnterRecovery() {
function RebootRecoveryHandler (line 440) | bool RebootRecoveryHandler(FastbootDevice* device, const std::vector<std...
class PartitionBuilder (line 454) | class PartitionBuilder {
method Valid (line 459) | bool Valid() const { return !!builder_; }
method MetadataBuilder (line 460) | MetadataBuilder* operator->() const { return builder_.get(); }
function CreatePartitionHandler (line 489) | bool CreatePartitionHandler(FastbootDevice* device, const std::vector<st...
function DeletePartitionHandler (line 527) | bool DeletePartitionHandler(FastbootDevice* device, const std::vector<st...
function ResizePartitionHandler (line 549) | bool ResizePartitionHandler(FastbootDevice* device, const std::vector<st...
function CancelPartitionSnapshot (line 587) | void CancelPartitionSnapshot(FastbootDevice* device, const std::string& ...
function FlashHandler (line 601) | bool FlashHandler(FastbootDevice* device, const std::vector<std::string>...
function UpdateSuperHandler (line 632) | bool UpdateSuperHandler(FastbootDevice* device, const std::vector<std::s...
function IsLockedDsu (line 645) | static bool IsLockedDsu() {
function GsiHandler (line 651) | bool GsiHandler(FastbootDevice* device, const std::vector<std::string>& ...
function SnapshotUpdateHandler (line 693) | bool SnapshotUpdateHandler(FastbootDevice* device, const std::vector<std...
class PartitionFetcher (line 750) | class PartitionFetcher {
method Fetch (line 752) | static bool Fetch(FastbootDevice* device, const std::vector<std::strin...
method PartitionFetcher (line 770) | PartitionFetcher(FastbootDevice* device, const std::vector<std::string...
method Open (line 775) | bool Open() {
method Fetch (line 853) | void Fetch() {
function FetchHandler (line 916) | bool FetchHandler(FastbootDevice* device, const std::vector<std::string>...
FILE: fastboot/device/commands.h
function FastbootResult (line 27) | enum class FastbootResult {
FILE: fastboot/device/fastboot_device.cpp
function get_health_service (line 48) | std::shared_ptr<aidl::android::hardware::health::IHealth> get_health_ser...
function get_fastboot_service (line 68) | std::shared_ptr<aidl::android::hardware::fastboot::IFastboot> get_fastbo...
function BootControlClient (line 153) | BootControlClient* FastbootDevice::boot1_1() const {
FILE: fastboot/device/fastboot_device.h
function class (line 33) | class FastbootDevice {
FILE: fastboot/device/flashing.cpp
function WipeOverlayfsForPartition (line 52) | void WipeOverlayfsForPartition(FastbootDevice* device, const std::string...
function FlashRawDataChunk (line 79) | int FlashRawDataChunk(PartitionHandle* handle, const char* data, size_t ...
function FlashRawData (line 113) | int FlashRawData(PartitionHandle* handle, const std::vector<char>& downl...
function WriteCallback (line 121) | int WriteCallback(void* priv, const void* data, size_t len) {
function FlashSparseData (line 134) | int FlashSparseData(PartitionHandle* handle, std::vector<char>& download...
function FlashBlockDevice (line 145) | int FlashBlockDevice(PartitionHandle* handle, std::vector<char>& downloa...
function CopyAVBFooter (line 155) | static void CopyAVBFooter(std::vector<char>* data, const uint64_t block_...
function Flash (line 176) | int Flash(FastbootDevice* device, const std::string& partition_name) {
function RemoveScratchPartition (line 206) | static void RemoveScratchPartition() {
function UpdateSuper (line 211) | bool UpdateSuper(FastbootDevice* device, const std::string& super_name, ...
FILE: fastboot/device/main.cpp
function LogSparseVerboseMessage (line 25) | static void LogSparseVerboseMessage(const char* fmt, ...) {
function main (line 36) | int main(int /*argc*/, char* argv[]) {
FILE: fastboot/device/tcp_client.cpp
function ExtractMessageLength (line 33) | static uint64_t ExtractMessageLength(const void* buffer) {
function EncodeMessageLength (line 42) | static void EncodeMessageLength(uint64_t length, void* buffer) {
FILE: fastboot/device/tcp_client.h
function class (line 23) | class ClientTcpTransport : public Transport {
FILE: fastboot/device/usb.cpp
function aio_block_init (line 57) | static void aio_block_init(aio_block* aiob, unsigned num_bufs) {
function getMaxPacketSize (line 71) | int getMaxPacketSize(int ffs_fd) {
function usb_ffs_write (line 81) | static int usb_ffs_write(usb_handle* h, const void* data, int len) {
function usb_ffs_read (line 101) | static int usb_ffs_read(usb_handle* h, void* data, int len, bool allow_p...
function usb_ffs_do_aio (line 132) | static int usb_ffs_do_aio(usb_handle* h, const void* data, int len, bool...
function usb_ffs_aio_read (line 188) | static int usb_ffs_aio_read(usb_handle* h, void* data, int len, bool /* ...
function usb_ffs_aio_write (line 192) | static int usb_ffs_aio_write(usb_handle* h, const void* data, int len) {
function usb_ffs_close (line 196) | static void usb_ffs_close(usb_handle* h) {
function DoesKernelSupportIouring (line 212) | bool DoesKernelSupportIouring() {
function create_usb_handle (line 226) | std::unique_ptr<usb_handle> create_usb_handle(unsigned num_bufs, unsigne...
FILE: fastboot/device/usb.h
type aio_block (line 31) | struct aio_block {
function AIOType (line 42) | enum class AIOType { SYNC_IO, AIO, IO_URING };
FILE: fastboot/device/usb_client.cpp
type FuncDesc (line 42) | struct FuncDesc {
type usb_interface_descriptor (line 43) | struct usb_interface_descriptor
type usb_endpoint_descriptor_no_audio (line 44) | struct usb_endpoint_descriptor_no_audio
type usb_endpoint_descriptor_no_audio (line 45) | struct usb_endpoint_descriptor_no_audio
type SsFuncDesc (line 48) | struct SsFuncDesc {
type usb_interface_descriptor (line 49) | struct usb_interface_descriptor
type usb_endpoint_descriptor_no_audio (line 50) | struct usb_endpoint_descriptor_no_audio
type usb_ss_ep_comp_descriptor (line 51) | struct usb_ss_ep_comp_descriptor
type usb_endpoint_descriptor_no_audio (line 52) | struct usb_endpoint_descriptor_no_audio
type usb_ss_ep_comp_descriptor (line 53) | struct usb_ss_ep_comp_descriptor
type DescV2 (line 56) | struct DescV2 {
type usb_functionfs_descs_head_v2 (line 57) | struct usb_functionfs_descs_head_v2
type FuncDesc (line 62) | struct FuncDesc
type SsFuncDesc (line 63) | struct SsFuncDesc
type usb_interface_descriptor (line 66) | struct usb_interface_descriptor
type FuncDesc (line 77) | struct FuncDesc
type usb_interface_descriptor (line 43) | struct usb_interface_descriptor
type usb_endpoint_descriptor_no_audio (line 44) | struct usb_endpoint_descriptor_no_audio
type usb_endpoint_descriptor_no_audio (line 45) | struct usb_endpoint_descriptor_no_audio
type FuncDesc (line 97) | struct FuncDesc
type usb_interface_descriptor (line 43) | struct usb_interface_descriptor
type usb_endpoint_descriptor_no_audio (line 44) | struct usb_endpoint_descriptor_no_audio
type usb_endpoint_descriptor_no_audio (line 45) | struct usb_endpoint_descriptor_no_audio
type SsFuncDesc (line 117) | struct SsFuncDesc
type usb_interface_descriptor (line 49) | struct usb_interface_descriptor
type usb_endpoint_descriptor_no_audio (line 50) | struct usb_endpoint_descriptor_no_audio
type usb_ss_ep_comp_descriptor (line 51) | struct usb_ss_ep_comp_descriptor
type usb_endpoint_descriptor_no_audio (line 52) | struct usb_endpoint_descriptor_no_audio
type usb_ss_ep_comp_descriptor (line 53) | struct usb_ss_ep_comp_descriptor
type usb_functionfs_strings_head (line 152) | struct usb_functionfs_strings_head
type DescV2 (line 172) | struct DescV2
type usb_functionfs_descs_head_v2 (line 57) | struct usb_functionfs_descs_head_v2
type FuncDesc (line 62) | struct FuncDesc
type SsFuncDesc (line 63) | struct SsFuncDesc
function CloseFunctionFs (line 189) | static void CloseFunctionFs(usb_handle* h) {
function InitFunctionFs (line 195) | static bool InitFunctionFs(usb_handle* h) {
FILE: fastboot/device/usb_client.h
function class (line 24) | class ClientUsbTransport : public Transport {
FILE: fastboot/device/usb_iouring.cpp
function prep_async_read (line 22) | static int prep_async_read(struct io_uring* ring, int fd, void* data, si...
function prep_async_write (line 36) | static int prep_async_write(struct io_uring* ring, int fd, const void* d...
function prep_async_io (line 52) | int prep_async_io(struct io_uring* ring, int fd, T* data, size_t len, in...
function T (line 61) | static constexpr T DivRoundup(T x, T y) {
function usb_ffs_do_aio (line 68) | static int usb_ffs_do_aio(usb_handle* h, T* const data, const int len) {
function usb_ffs_io_uring_read (line 118) | static int usb_ffs_io_uring_read(usb_handle* h, void* data, int len, boo...
function usb_ffs_io_uring_write (line 122) | static int usb_ffs_io_uring_write(usb_handle* h, const void* data, int l...
function exit_io_uring_ffs (line 126) | void exit_io_uring_ffs(usb_handle* h) {
function init_io_uring_ffs (line 130) | bool init_io_uring_ffs(usb_handle* h, size_t queue_depth) {
FILE: fastboot/device/utility.cpp
function OpenPhysicalPartition (line 42) | bool OpenPhysicalPartition(const std::string& name, PartitionHandle* han...
function OpenLogicalPartition (line 51) | bool OpenLogicalPartition(FastbootDevice* device, const std::string& par...
function OpenPartition (line 79) | bool OpenPartition(FastbootDevice* device, const std::string& name, Part...
function FindPhysicalPartition (line 95) | std::optional<std::string> FindPhysicalPartition(const std::string& name) {
function LpMetadataPartition (line 107) | static const LpMetadataPartition* FindLogicalPartition(const LpMetadata&...
function LogicalPartitionExists (line 117) | bool LogicalPartitionExists(FastbootDevice* device, const std::string& n...
function GetSlotNumber (line 139) | bool GetSlotNumber(const std::string& slot, int32_t* number) {
function ListPartitions (line 150) | std::vector<std::string> ListPartitions(FastbootDevice* device) {
function GetDeviceLockStatus (line 197) | bool GetDeviceLockStatus() {
function UpdateAllPartitionMetadata (line 201) | bool UpdateAllPartitionMetadata(FastbootDevice* device, const std::strin...
function GetSuperSlotSuffix (line 216) | std::string GetSuperSlotSuffix(FastbootDevice* device, const std::string...
FILE: fastboot/device/utility.h
function class (line 31) | class PartitionHandle {
function class (line 96) | class AutoMountMetadata {
FILE: fastboot/device/variables.cpp
function GetVersion (line 50) | bool GetVersion(FastbootDevice* /* device */, const std::vector<std::str...
function GetBootloaderVersion (line 56) | bool GetBootloaderVersion(FastbootDevice* /* device */, const std::vecto...
function GetBasebandVersion (line 62) | bool GetBasebandVersion(FastbootDevice* /* device */, const std::vector<...
function GetOsVersion (line 68) | bool GetOsVersion(FastbootDevice* /* device */, const std::vector<std::s...
function GetVndkVersion (line 74) | bool GetVndkVersion(FastbootDevice* /* device */, const std::vector<std:...
function GetProduct (line 80) | bool GetProduct(FastbootDevice* /* device */, const std::vector<std::str...
function GetSerial (line 86) | bool GetSerial(FastbootDevice* /* device */, const std::vector<std::stri...
function GetSecure (line 92) | bool GetSecure(FastbootDevice* /* device */, const std::vector<std::stri...
function GetVariant (line 98) | bool GetVariant(FastbootDevice* device, const std::vector<std::string>& ...
function GetBatteryVoltageHelper (line 118) | bool GetBatteryVoltageHelper(FastbootDevice* device, int32_t* battery_vo...
function GetBatterySoCHelper (line 133) | bool GetBatterySoCHelper(FastbootDevice* device, int32_t* battery_soc) {
function GetBatterySoCOk (line 148) | bool GetBatterySoCOk(FastbootDevice* device, const std::vector<std::stri...
function GetOffModeChargeState (line 174) | bool GetOffModeChargeState(FastbootDevice* device, const std::vector<std...
function GetBatteryVoltage (line 192) | bool GetBatteryVoltage(FastbootDevice* device, const std::vector<std::st...
function GetBatterySoC (line 203) | bool GetBatterySoC(FastbootDevice* device, const std::vector<std::string...
function GetCurrentSlot (line 214) | bool GetCurrentSlot(FastbootDevice* device, const std::vector<std::strin...
function GetSlotCount (line 221) | bool GetSlotCount(FastbootDevice* device, const std::vector<std::string>...
function GetSlotSuccessful (line 232) | bool GetSlotSuccessful(FastbootDevice* device, const std::vector<std::st...
function GetSlotUnbootable (line 256) | bool GetSlotUnbootable(FastbootDevice* device, const std::vector<std::st...
function GetMaxDownloadSize (line 280) | bool GetMaxDownloadSize(FastbootDevice* /* device */, const std::vector<...
function GetUnlocked (line 286) | bool GetUnlocked(FastbootDevice* /* device */, const std::vector<std::st...
function GetHasSlot (line 292) | bool GetHasSlot(FastbootDevice* device, const std::vector<std::string>& ...
function GetPartitionSize (line 312) | bool GetPartitionSize(FastbootDevice* device, const std::vector<std::str...
function GetPartitionType (line 336) | bool GetPartitionType(FastbootDevice* device, const std::vector<std::str...
function GetPartitionIsLogical (line 380) | bool GetPartitionIsLogical(FastbootDevice* device, const std::vector<std...
function GetIsUserspace (line 402) | bool GetIsUserspace(FastbootDevice* /* device */, const std::vector<std:...
function GetIsForceDebuggable (line 408) | bool GetIsForceDebuggable(FastbootDevice* /* device */, const std::vecto...
function GetAllPartitionArgsWithSlot (line 414) | std::vector<std::vector<std::string>> GetAllPartitionArgsWithSlot(Fastbo...
function GetAllPartitionArgsNoSlot (line 423) | std::vector<std::vector<std::string>> GetAllPartitionArgsNoSlot(Fastboot...
function GetHardwareRevision (line 448) | bool GetHardwareRevision(FastbootDevice* /* device */, const std::vector...
function GetSuperPartitionName (line 454) | bool GetSuperPartitionName(FastbootDevice* device, const std::vector<std...
function GetSnapshotUpdateStatus (line 461) | bool GetSnapshotUpdateStatus(FastbootDevice* device, const std::vector<s...
function GetCpuAbi (line 486) | bool GetCpuAbi(FastbootDevice* /* device */, const std::vector<std::stri...
function GetSystemFingerprint (line 492) | bool GetSystemFingerprint(FastbootDevice* /* device */, const std::vecto...
function GetVendorFingerprint (line 501) | bool GetVendorFingerprint(FastbootDevice* /* device */, const std::vecto...
function GetDynamicPartition (line 507) | bool GetDynamicPartition(FastbootDevice* /* device */, const std::vector...
function GetFirstApiLevel (line 513) | bool GetFirstApiLevel(FastbootDevice* /* device */, const std::vector<st...
function GetSecurityPatchLevel (line 519) | bool GetSecurityPatchLevel(FastbootDevice* /* device */, const std::vect...
function GetTrebleEnabled (line 525) | bool GetTrebleEnabled(FastbootDevice* /* device */, const std::vector<st...
function GetMaxFetchSize (line 531) | bool GetMaxFetchSize(FastbootDevice* /* device */, const std::vector<std...
function GetDmesg (line 541) | bool GetDmesg(FastbootDevice* device) {
function GetBatterySerialNumber (line 574) | bool GetBatterySerialNumber(FastbootDevice* device, const std::vector<st...
function GetBatteryPartStatus (line 607) | bool GetBatteryPartStatus(FastbootDevice* device, const std::vector<std:...
FILE: fastboot/fastboot.cpp
function find_item_given_name (line 184) | static std::string find_item_given_name(const std::string& img_name) {
function find_item (line 192) | std::string find_item(const std::string& item) {
function Status (line 205) | static void Status(const std::string& message) {
function Epilog (line 213) | static void Epilog(int status) {
function InfoMessage (line 223) | static void InfoMessage(const std::string& info) {
function TextMessage (line 227) | static void TextMessage(const std::string& text) {
function ReadFileToVector (line 231) | bool ReadFileToVector(const std::string& file, std::vector<char>* out) {
function match_fastboot_with_serial (line 243) | static int match_fastboot_with_serial(usb_ifc_info* info, const char* lo...
function ifc_match_func (line 256) | static ifc_match_func match_fastboot(const char* local_serial = serial) {
function PrintDevice (line 263) | static void PrintDevice(const char* local_serial, const char* status = n...
function list_devices_callback (line 288) | static int list_devices_callback(usb_ifc_info* info) {
function ParseNetworkSerial (line 308) | Result<NetworkSerial, FastbootError> ParseNetworkSerial(const std::strin...
function open_device (line 348) | static std::unique_ptr<Transport> open_device(const char* local_serial, ...
function NetworkDeviceConnected (line 390) | static std::unique_ptr<Transport> NetworkDeviceConnected(bool print = fa...
function open_device (line 427) | static std::unique_ptr<Transport> open_device() {
function Connect (line 455) | static int Connect(int argc, char* argv[]) {
function Disconnect (line 479) | static int Disconnect(const char* local_serial) {
function Disconnect (line 493) | static int Disconnect() {
function Disconnect (line 503) | static int Disconnect(int argc, char* argv[]) {
function list_devices (line 521) | static void list_devices() {
function syntax_error (line 529) | void syntax_error(const char* fmt, ...) {
function show_help (line 541) | static int show_help() {
function LoadBootableImage (line 657) | static std::vector<char> LoadBootableImage(const std::string& kernel, co...
function UnzipToMemory (line 716) | static bool UnzipToMemory(ZipArchiveHandle zip, const std::string& entry...
function FILE (line 747) | static FILE* win32_tmpfile() {
function make_temporary_fd (line 764) | static int make_temporary_fd(const char* /*what*/) {
function make_temporary_template (line 771) | static std::string make_temporary_template() {
function make_temporary_fd (line 777) | static int make_temporary_fd(const char* what) {
function unique_fd (line 790) | static unique_fd UnzipToFile(ZipArchiveHandle zip, const char* entry_nam...
function CheckRequirement (line 817) | static bool CheckRequirement(const std::string& cur_product, const std::...
function ParseRequirementLine (line 870) | bool ParseRequirementLine(const std::string& line, std::string* name, st...
function HandlePartitionExists (line 911) | static void HandlePartitionExists(const std::vector<std::string>& option...
function CheckRequirements (line 931) | static void CheckRequirements(const std::string& data, bool force_flash) {
function DisplayVarOrError (line 967) | static void DisplayVarOrError(const std::string& label, const std::strin...
function DumpInfo (line 978) | static void DumpInfo() {
function resparse_file (line 986) | std::vector<SparsePtr> resparse_file(sparse_file* s, int64_t max_size) {
function load_sparse_files (line 1005) | static std::vector<SparsePtr> load_sparse_files(int fd, int64_t max_size) {
function get_uint_var (line 1012) | static uint64_t get_uint_var(const char* var_name, fastboot::IFastBootDr...
function get_sparse_limit (line 1031) | int64_t get_sparse_limit(int64_t size, const FlashingPlan* fp) {
function load_buf_fd (line 1055) | static bool load_buf_fd(unique_fd fd, struct fastboot_buffer* buf, const...
function load_buf (line 1091) | static bool load_buf(const char* fname, struct fastboot_buffer* buf, con...
function rewrite_vbmeta_buffer (line 1110) | static void rewrite_vbmeta_buffer(struct fastboot_buffer* buf, bool vbme...
function has_vbmeta_partition (line 1162) | static bool has_vbmeta_partition() {
function is_vbmeta_partition (line 1169) | static bool is_vbmeta_partition(const std::string& partition) {
function is_logical (line 1177) | bool is_logical(const std::string& partition) {
function get_partition_size (line 1182) | static uint64_t get_partition_size(const std::string& partition) {
function copy_avb_footer (line 1202) | static void copy_avb_footer(const ImageSource* source, const std::string...
function flash_partition_files (line 1260) | void flash_partition_files(const std::string& partition, const std::vect...
function flash_buf (line 1271) | static void flash_buf(const ImageSource* source, const std::string& part...
function get_current_slot (line 1300) | std::string get_current_slot() {
function get_slot_count (line 1307) | static int get_slot_count(fastboot::IFastBootDriver* fb) {
function supports_AB (line 1317) | bool supports_AB(fastboot::IFastBootDriver* fb) {
function get_other_slot (line 1322) | static std::string get_other_slot(const std::string& current_slot, int c...
function get_other_slot (line 1329) | static std::string get_other_slot(const std::string& current_slot) {
function get_other_slot (line 1333) | static std::string get_other_slot(int count) {
function get_other_slot (line 1337) | static std::string get_other_slot() {
function verify_slot (line 1341) | static std::string verify_slot(const std::string& slot_name, bool allow_...
function verify_slot (line 1377) | static std::string verify_slot(const std::string& slot) {
function do_for_partition (line 1381) | static void do_for_partition(const std::string& part, const std::string&...
function do_for_partitions (line 1417) | void do_for_partitions(const std::string& part, const std::string& slot,
function fetch_partition (line 1442) | static uint64_t fetch_partition(const std::string& partition, borrowed_f...
function do_fetch (line 1465) | static void do_fetch(const std::string& partition, const std::string& sl...
function repack_ramdisk (line 1476) | static std::string repack_ramdisk(const char* pname, struct fastboot_buf...
function do_flash (line 1524) | void do_flash(const char* pname, const char* fname, const bool apply_vbm...
function set_active (line 1557) | static void set_active(const std::string& slot_override) {
function is_userspace_fastboot (line 1570) | bool is_userspace_fastboot() {
function reboot_to_userspace_fastboot (line 1575) | void reboot_to_userspace_fastboot() {
function CancelSnapshotIfNeeded (line 1598) | static void CancelSnapshotIfNeeded() {
function GetPartitionName (line 1606) | std::string GetPartitionName(const ImageEntry& entry, const std::string&...
function ParseFlashCommand (line 1620) | std::unique_ptr<FlashTask> ParseFlashCommand(const FlashingPlan* fp,
function ParseRebootCommand (line 1652) | std::unique_ptr<RebootTask> ParseRebootCommand(const FlashingPlan* fp,
function ParseWipeCommand (line 1663) | std::unique_ptr<WipeTask> ParseWipeCommand(const FlashingPlan* fp,
function ParseFastbootInfoLine (line 1673) | std::unique_ptr<Task> ParseFastbootInfoLine(const FlashingPlan* fp,
function AddResizeTasks (line 1696) | bool AddResizeTasks(const FlashingPlan* fp, std::vector<std::unique_ptr<...
function IsIgnore (line 1730) | static bool IsIgnore(const std::vector<std::string>& command) {
function CheckFastbootInfoRequirements (line 1737) | bool CheckFastbootInfoRequirements(const std::vector<std::string>& command,
function ParseFastbootInfo (line 1767) | std::vector<std::unique_ptr<Task>> ParseFastbootInfo(const FlashingPlan*...
function unique_fd (line 1960) | unique_fd ZipImageSource::OpenFile(const std::string& name) const {
function do_update (line 1964) | static void do_update(const char* filename, FlashingPlan* fp) {
function unique_fd (line 1985) | unique_fd LocalImageSource::OpenFile(const std::string& name) const {
function do_flashall (line 1990) | static void do_flashall(FlashingPlan* fp) {
function next_arg (line 1996) | static std::string next_arg(std::vector<std::string>* args) {
function do_oem_command (line 2003) | static void do_oem_command(const std::string& cmd, std::vector<std::stri...
function fb_get_flash_block_size (line 2013) | static unsigned fb_get_flash_block_size(std::string name) {
function fb_perform_format (line 2033) | void fb_perform_format(const std::string& partition, int skip_if_not_sup...
function should_flash_in_userspace (line 2122) | bool should_flash_in_userspace(const ImageSource* source, const std::str...
function wipe_super (line 2145) | static bool wipe_super(const android::fs_mgr::LpMetadata& metadata, cons...
function do_wipe_super (line 2195) | static void do_wipe_super(const std::string& image, const std::string& s...
function FastbootLogger (line 2216) | static void FastbootLogger(android::base::LogId /* id */, android::base:...
function FastbootAborter (line 2231) | static void FastbootAborter(const char* message) {
type option (line 2249) | struct option
type fastboot_buffer (line 2568) | struct fastboot_buffer
FILE: fastboot/fastboot.h
function class (line 45) | class FastBootTool {
type fb_buffer_type (line 54) | enum fb_buffer_type {
type fastboot_buffer (line 59) | struct fastboot_buffer {
function ImageType (line 68) | enum class ImageType {
FILE: fastboot/fastboot_driver.cpp
type fastboot (line 58) | namespace fastboot {
function RetCode (line 74) | RetCode FastBootDriver::Boot(std::string* response, std::vector<std::s...
function RetCode (line 78) | RetCode FastBootDriver::Continue(std::string* response, std::vector<st...
function RetCode (line 82) | RetCode FastBootDriver::CreatePartition(const std::string& partition, ...
function RetCode (line 87) | RetCode FastBootDriver::DeletePartition(const std::string& partition) {
function RetCode (line 91) | RetCode FastBootDriver::Erase(const std::string& partition, std::strin...
function RetCode (line 96) | RetCode FastBootDriver::Flash(const std::string& partition, std::strin...
function RetCode (line 101) | RetCode FastBootDriver::GetVar(const std::string& key, std::string* val,
function RetCode (line 106) | RetCode FastBootDriver::GetVarAll(std::vector<std::string>* response) {
function RetCode (line 111) | RetCode FastBootDriver::Reboot(std::string* response, std::vector<std:...
function RetCode (line 115) | RetCode FastBootDriver::RebootTo(std::string target, std::string* resp...
function RetCode (line 120) | RetCode FastBootDriver::ResizePartition(const std::string& partition, ...
function RetCode (line 125) | RetCode FastBootDriver::SetActive(const std::string& slot, std::string...
function RetCode (line 131) | RetCode FastBootDriver::SnapshotUpdateCommand(const std::string& comma...
function RetCode (line 140) | RetCode FastBootDriver::FlashPartition(const std::string& partition,
function RetCode (line 149) | RetCode FastBootDriver::FlashPartition(const std::string& partition, a...
function RetCode (line 158) | RetCode FastBootDriver::FlashPartition(const std::string& partition, s...
function RetCode (line 167) | RetCode FastBootDriver::Partitions(std::vector<std::tuple<std::string,...
function RetCode (line 188) | RetCode FastBootDriver::Download(const std::string& name, android::bas...
function RetCode (line 197) | RetCode FastBootDriver::Download(android::base::borrowed_fd fd, size_t...
function RetCode (line 220) | RetCode FastBootDriver::Download(const std::string& name, const std::v...
function RetCode (line 228) | RetCode FastBootDriver::Download(const std::vector<char>& buf, std::st...
function RetCode (line 250) | RetCode FastBootDriver::Download(const std::string& partition, struct ...
function RetCode (line 260) | RetCode FastBootDriver::Download(sparse_file* s, bool use_crc, std::st...
function RetCode (line 300) | RetCode FastBootDriver::Upload(const std::string& outfile, std::string...
function RetCode (line 311) | RetCode FastBootDriver::RunAndReadBuffer(
function RetCode (line 345) | RetCode FastBootDriver::UploadInner(const std::string& outfile, std::s...
function RetCode (line 366) | RetCode FastBootDriver::FetchToFd(const std::string& partition, androi...
function RetCode (line 423) | RetCode FastBootDriver::WaitForDisconnect() {
function RetCode (line 428) | RetCode FastBootDriver::RawCommand(const std::string& cmd, const std::...
function RetCode (line 437) | RetCode FastBootDriver::RawCommand(const std::string& cmd, std::string...
function RetCode (line 454) | RetCode FastBootDriver::DownloadCommand(uint32_t size, std::string* re...
function RetCode (line 464) | RetCode FastBootDriver::HandleResponse(std::string* response, std::vec...
function RetCode (line 532) | RetCode FastBootDriver::SendBuffer(android::base::borrowed_fd fd, size...
function RetCode (line 558) | RetCode FastBootDriver::SendBuffer(const std::vector<char>& buf) {
function RetCode (line 563) | RetCode FastBootDriver::SendBuffer(const void* buf, size_t size) {
function RetCode (line 583) | RetCode FastBootDriver::ReadBuffer(void* buf, size_t size) {
FILE: fastboot/fastboot_driver.h
function namespace (line 47) | namespace fastboot {
function class (line 56) | class FastBootDriver : public IFastBootDriver {
FILE: fastboot/fastboot_driver_interface.h
function namespace (line 24) | namespace fastboot {
FILE: fastboot/fastboot_driver_mock.h
function namespace (line 21) | namespace fastboot {
FILE: fastboot/fastboot_driver_test.cpp
class DriverTest (line 28) | class DriverTest : public ::testing::Test {
function TEST_F (line 33) | TEST_F(DriverTest, GetVar) {
function TEST_F (line 48) | TEST_F(DriverTest, InfoMessage) {
function TEST_F (line 65) | TEST_F(DriverTest, TextMessage) {
FILE: fastboot/fastboot_test.cpp
function TEST (line 22) | TEST(FastBoot, ParseOsPatchLevel) {
function TEST (line 37) | TEST(FastBoot, ParseOsVersion) {
function ParseRequirementLineTest (line 67) | static void ParseRequirementLineTest(const std::string& line, const std:...
function TEST (line 83) | TEST(FastBoot, ParseRequirementLineSuccesses) {
function ParseRequirementLineTestMalformed (line 174) | static void ParseRequirementLineTestMalformed(const std::string& line) {
function TEST (line 183) | TEST(FastBoot, ParseRequirementLineMalformed) {
function ParseNetworkSerialTest (line 206) | static void ParseNetworkSerialTest(const std::string& description, const...
function ParseNetworkSerialNegativeTest (line 220) | static void ParseNetworkSerialNegativeTest(const std::string& description,
function TEST (line 229) | TEST(FastBoot, ParseNetworkSerial) {
function main (line 254) | int main(int argc, char* argv[]) {
FILE: fastboot/filesystem.cpp
function LockFile (line 37) | int LockFile(int fd) {
function GetHomeDirPath (line 53) | std::string GetHomeDirPath() {
function FileExists (line 86) | bool FileExists(const std::string& path) {
function EnsureDirectoryExists (line 90) | bool EnsureDirectoryExists(const std::string& directory_path) {
FILE: fastboot/filesystem.h
function class (line 37) | class FileLock {
FILE: fastboot/fs.cpp
function exec_cmd (line 31) | static int exec_cmd(const char* path, const char** argv, const char** en...
function exec_cmd (line 86) | static int exec_cmd(const char* path, const char** argv, const char** en...
function generate_ext4_image (line 114) | static int generate_ext4_image(const char* fileName, long long partSize,...
function generate_f2fs_image (line 181) | static int generate_f2fs_image(const char* fileName, long long partSize,...
type fs_generator (line 222) | struct fs_generator {
type fs_generator (line 234) | struct fs_generator
function fs_generator_generate (line 243) | int fs_generator_generate(const struct fs_generator* gen, const char* fi...
FILE: fastboot/fs.h
type fs_generator (line 6) | struct fs_generator
type FS_OPTION (line 8) | enum FS_OPTION {
type fs_generator (line 14) | struct fs_generator
type fs_generator (line 15) | struct fs_generator
FILE: fastboot/fuzzer/fastboot_fuzzer.cpp
class FastbootFuzzer (line 53) | class FastbootFuzzer {
function string (line 164) | static string PacketValue(uint16_t value) {
function string (line 168) | static string ErrorPacket(uint16_t sequence, const string& message = "",
function string (line 173) | static string InitPacket(uint16_t sequence, uint16_t version, uint16_t m...
function string (line 178) | static string QueryPacket(uint16_t sequence, uint16_t new_sequence) {
function string (line 183) | static string QueryPacket(uint16_t sequence) {
function string (line 187) | static string FastbootPacket(uint16_t sequence, const string& data = "",
function LLVMFuzzerTestOneInput (line 274) | int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
FILE: fastboot/fuzzer/socket_mock_fuzz.h
function class (line 28) | class SocketMockFuzz : public Socket {
FILE: fastboot/fuzzy_fastboot/example/checksum_parser.py
function main (line 13) | def main():
FILE: fastboot/fuzzy_fastboot/example/validator.py
function eprint (line 7) | def eprint(msg):
function main (line 15) | def main():
FILE: fastboot/fuzzy_fastboot/extensions.cpp
type fastboot (line 44) | namespace fastboot {
type extension (line 45) | namespace extension {
function MakeRegex (line 51) | std::regex MakeRegex(const std::string& regex_str, int line_num,
function XMLAssert (line 70) | bool XMLAssert(bool cond, const tinyxml2::XMLElement* elem, const ch...
function XMLAttribute (line 77) | const std::string XMLAttribute(const tinyxml2::XMLElement* elem, con...
function XMLYesNo (line 86) | bool XMLYesNo(const tinyxml2::XMLElement* elem, const std::string ke...
function ExtractPartitions (line 100) | bool ExtractPartitions(tinyxml2::XMLConstHandle handle, Configuratio...
function ExtractPacked (line 132) | bool ExtractPacked(tinyxml2::XMLConstHandle handle, Configuration* c...
function ExtractGetVars (line 195) | bool ExtractGetVars(tinyxml2::XMLConstHandle handle, Configuration* ...
function ExtractOem (line 212) | bool ExtractOem(tinyxml2::XMLConstHandle handle, Configuration* conf...
function ExtractChecksum (line 262) | bool ExtractChecksum(tinyxml2::XMLConstHandle handle, Configuration*...
function ParseXml (line 276) | bool ParseXml(const std::string& file, Configuration* config) {
FILE: fastboot/fuzzy_fastboot/extensions.h
function namespace (line 36) | namespace fastboot {
FILE: fastboot/fuzzy_fastboot/fixtures.cpp
type fastboot (line 62) | namespace fastboot {
function RetCode (line 105) | RetCode FastBootTest::DownloadCommand(uint32_t size, std::string* resp...
function RetCode (line 110) | RetCode FastBootTest::SendBuffer(const std::vector<char>& buf) {
function RetCode (line 114) | RetCode FastBootTest::HandleResponse(std::string* response, std::vecto...
class ModeTest<true> (line 287) | class ModeTest<true>
class ModeTest<false> (line 288) | class ModeTest<false>
class ExtensionsPartition<true> (line 341) | class ExtensionsPartition<true>
class ExtensionsPartition<false> (line 342) | class ExtensionsPartition<false>
FILE: fastboot/fuzzy_fastboot/fixtures.h
function namespace (line 36) | namespace fastboot {
FILE: fastboot/fuzzy_fastboot/main.cpp
type fastboot (line 63) | namespace fastboot {
function PartitionHash (line 102) | bool PartitionHash(FastBootDriver* fb, const std::string& part, std::s...
function SparseToBuf (line 145) | bool SparseToBuf(sparse_file* sf, std::vector<char>* out, bool with_cr...
function TEST (line 167) | TEST(USBFunctionality, USBConnect) {
function TEST_F (line 184) | TEST_F(LogicalPartitionCompliance, SuperPartition) {
function TEST_F (line 203) | TEST_F(LogicalPartitionCompliance, GetVarIsLogical) {
function TEST_F (line 231) | TEST_F(LogicalPartitionCompliance, FastbootRebootTest) {
function TEST_F (line 241) | TEST_F(LogicalPartitionCompliance, CreateResizeDeleteLP) {
function TEST_F (line 274) | TEST_F(Conformance, GetVar) {
function TEST_F (line 283) | TEST_F(Conformance, GetVarVersionBootloader) {
function TEST_F (line 293) | TEST_F(Conformance, GetVarVersionBaseband) {
function TEST_F (line 302) | TEST_F(Conformance, GetVarSerialNo) {
function TEST_F (line 311) | TEST_F(Conformance, GetVarSecure) {
function TEST_F (line 317) | TEST_F(Conformance, GetVarOffModeCharge) {
function TEST_F (line 323) | TEST_F(Conformance, GetVarVariant) {
function TEST_F (line 330) | TEST_F(Conformance, GetVarRevision) {
function TEST_F (line 339) | TEST_F(Conformance, GetVarBattVoltage) {
function TEST_F (line 349) | TEST_F(Conformance, GetVarBattVoltageOk) {
function AssertHexUint32 (line 355) | void AssertHexUint32(const std::string& name, const std::string& var) {
function TEST_F (line 371) | TEST_F(Conformance, GetVarDownloadSize) {
function TEST_F (line 378) | TEST_F(Conformance, GetVarFetchSize) {
function TEST_F (line 386) | TEST_F(Conformance, GetVarAll) {
function TEST_F (line 396) | TEST_F(Conformance, UnlockAbility) {
function TEST_F (line 419) | TEST_F(Conformance, PartitionInfo) {
function TEST_F (line 447) | TEST_F(Conformance, Slots) {
function TEST_F (line 505) | TEST_F(Conformance, SetActive) {
function TEST_F (line 523) | TEST_F(Conformance, LockAndUnlockPrompt) {
function TEST_F (line 550) | TEST_F(Conformance, SparseBlockSupport0) {
function TEST_F (line 565) | TEST_F(Conformance, SparseBlockSupport1) {
function TEST_F (line 584) | TEST_F(Conformance, SparseDownload0) {
function TEST_F (line 591) | TEST_F(Conformance, SparseDownload1) {
function TEST_F (line 601) | TEST_F(Conformance, SparseDownload2) {
function TEST_F (line 614) | TEST_F(Conformance, SparseDownload3) {
function TEST_F (line 645) | TEST_F(Conformance, SparseVersionCheck) {
function TEST_F (line 662) | TEST_F(UnlockPermissions, Download) {
function TEST_F (line 667) | TEST_F(UnlockPermissions, DownloadFlash) {
function TEST_F (line 676) | TEST_F(UnlockPermissions, FetchVendorBoot) {
function TEST_F (line 702) | TEST_F(LockPermissions, DownloadFlash) {
function TEST_F (line 717) | TEST_F(LockPermissions, Erase) {
function TEST_F (line 729) | TEST_F(LockPermissions, SetActive) {
function TEST_F (line 753) | TEST_F(LockPermissions, Boot) {
function TEST_F (line 763) | TEST_F(LockPermissions, FetchVendorBoot) {
function TEST_F (line 773) | TEST_F(Fuzz, DownloadSize) {
function TEST_F (line 789) | TEST_F(Fuzz, DownloadPartialBuf) {
function TEST_F (line 805) | TEST_F(Fuzz, DownloadOverRun) {
function TEST_F (line 830) | TEST_F(Fuzz, DownloadInvalid1) {
function TEST_F (line 835) | TEST_F(Fuzz, DownloadInvalid2) {
function TEST_F (line 841) | TEST_F(Fuzz, DownloadInvalid3) {
function TEST_F (line 847) | TEST_F(Fuzz, DownloadInvalid4) {
function TEST_F (line 853) | TEST_F(Fuzz, DownloadInvalid5) {
function TEST_F (line 859) | TEST_F(Fuzz, DownloadInvalid6) {
function TEST_F (line 865) | TEST_F(Fuzz, DownloadInvalid7) {
function TEST_F (line 871) | TEST_F(Fuzz, DownloadInvalid8) {
function TEST_F (line 878) | TEST_F(Fuzz, DownloadInvalid9) {
function TEST_F (line 884) | TEST_F(Fuzz, GetVarAllSpam) {
function TEST_F (line 898) | TEST_F(Fuzz, BadCommandTooLarge) {
function TEST_F (line 936) | TEST_F(Fuzz, CommandTooLarge) {
function TEST_F (line 951) | TEST_F(Fuzz, CommandMissingArgs) {
function TEST_F (line 970) | TEST_F(Fuzz, SparseZeroLength) {
function TEST_F (line 986) | TEST_F(Fuzz, SparseZeroBlkSize) {
function TEST_F (line 1004) | TEST_F(Fuzz, SparseVeryLargeBlkSize) {
function TEST_F (line 1018) | TEST_F(Fuzz, SparseTrimmed) {
function TEST_F (line 1036) | TEST_F(Fuzz, SparseInvalidChurk) {
function TEST_F (line 1054) | TEST_F(Fuzz, SparseTooManyChunks) {
function TEST_F (line 1079) | TEST_F(Fuzz, USBResetSpam) {
function TEST_F (line 1092) | TEST_F(Fuzz, USBResetCommandSpam) {
function TEST_F (line 1105) | TEST_F(Fuzz, USBResetAfterDownload) {
function TEST_P (line 1115) | TEST_P(ExtensionsGetVarConformance, VarExists) {
function TEST_P (line 1120) | TEST_P(ExtensionsGetVarConformance, VarMatchesRegex) {
function TEST_P (line 1131) | TEST_P(AnyPartition, ReportedGetVarAll) {
function TEST_P (line 1151) | TEST_P(AnyPartition, Hashable) {
function TEST_P (line 1172) | TEST_P(WriteablePartition, FlashCheck) {
function TEST_P (line 1185) | TEST_P(WriteablePartition, EraseCheck) {
function TEST_P (line 1193) | TEST_P(WriteHashNonParsedPartition, EraseZerosData) {
function TEST_P (line 1262) | TEST_P(FuzzWriteablePartition, BoundsCheck) {
function TEST_P (line 1296) | TEST_P(FuzzWriteableParsedPartition, FlashGarbageImageSmall) {
function TEST_P (line 1324) | TEST_P(FuzzWriteableParsedPartition, FlashGarbageImageLarge) {
function TEST_P (line 1352) | TEST_P(FuzzWriteableParsedPartition, FlashGarbageImageLarge2) {
function TEST_P (line 1380) | TEST_P(FuzzWriteableParsedPartition, FlashGarbageImageLarge3) {
function TEST_P (line 1412) | TEST_P(FuzzAnyPartitionLocked, RejectFlash) {
function TEST_P (line 1424) | TEST_P(UserdataPartition, UnlockErases) {
function TEST_P (line 1459) | TEST_P(ExtensionsPackedValid, TestDeviceUnpack) {
function TEST_P (line 1550) | TEST_P(ExtensionsPackedInvalid, TestDeviceUnpack) {
function TEST_P (line 1625) | TEST_P(ExtensionsOemConformance, RunOEMTest) {
function TEST_P (line 1692) | TEST_P(SparseTestPartition, SparseSingleBlock) {
function TEST_P (line 1717) | TEST_P(SparseTestPartition, SparseFill) {
function TEST_P (line 1750) | TEST_P(SparseTestPartition, SparseMultiple) {
function GenerateXmlTests (line 1794) | void GenerateXmlTests(const extension::Configuration& config) {
function main (line 1860) | int main(int argc, char** argv) {
FILE: fastboot/fuzzy_fastboot/test_listeners.h
function class (line 32) | class MinimalistPrinter : public ::testing::EmptyTestEventListener {
FILE: fastboot/fuzzy_fastboot/test_utils.cpp
type fastboot (line 35) | namespace fastboot {
function rand_legal (line 42) | char rand_legal() {
function rand_illegal (line 46) | char rand_illegal() {
function rand_char (line 50) | char rand_char() {
function random_int (line 54) | int random_int(int start, int end) {
function RandomString (line 59) | std::string RandomString(size_t length, std::function<char(void)> prov...
function RandomBuf (line 65) | std::vector<char> RandomBuf(size_t length, std::function<char(void)> p...
function SplitBySpace (line 72) | std::vector<std::string> SplitBySpace(const std::string& s) {
function GeneratePartitionNames (line 78) | std::vector<std::string> GeneratePartitionNames(const std::string& bas...
function ParseArgs (line 90) | std::unordered_map<std::string, std::string> ParseArgs(int argc, char*...
function ConfigureSerial (line 114) | int ConfigureSerial(const std::string& port) {
function StartProgram (line 147) | int StartProgram(const std::string program, const std::vector<std::str...
function WaitProgram (line 185) | int WaitProgram(const int pid, const int pipe, std::string* error_msg) {
FILE: fastboot/fuzzy_fastboot/test_utils.h
function namespace (line 43) | namespace fastboot {
FILE: fastboot/fuzzy_fastboot/transport_sniffer.cpp
type fastboot (line 10) | namespace fastboot {
type timeval (line 166) | struct timeval
FILE: fastboot/fuzzy_fastboot/transport_sniffer.h
function namespace (line 40) | namespace fastboot {
FILE: fastboot/main.cpp
function main (line 31) | int main(int argc, char* argv[]) {
FILE: fastboot/mock_transport.h
function class (line 27) | class MockTransport : public Transport {
function class (line 35) | class RawDataMatcher {
FILE: fastboot/result.h
function class (line 30) | class FastbootError {
FILE: fastboot/socket.cpp
class UdpSocket (line 114) | class UdpSocket : public Socket {
type Type (line 116) | enum class Type { kClient, kServer }
class TcpSocket (line 174) | class TcpSocket : public Socket {
method TcpSocket (line 176) | explicit TcpSocket(cutils_socket_t sock) : Socket(sock) {}
FILE: fastboot/socket.h
function class (line 46) | class Socket {
FILE: fastboot/socket_mock.h
function class (line 53) | class SocketMock : public Socket {
FILE: fastboot/socket_test.cpp
function MakeConnectedSockets (line 35) | bool MakeConnectedSockets(Socket::Protocol protocol, std::unique_ptr<Soc...
function SendString (line 64) | static bool SendString(Socket* sock, const std::string& message) {
function ReceiveString (line 70) | static bool ReceiveString(Socket* sock, const std::string& message) {
function TEST (line 77) | TEST(SocketTest, TestSendAndReceive) {
function TEST (line 91) | TEST(SocketTest, TestReceiveTimeout) {
function TEST (line 112) | TEST(SocketTest, TestReceiveFailure) {
function TEST (line 136) | TEST(SocketTest, TestLargePackets) {
function TEST (line 157) | TEST(SocketTest, TestUdpReceiveOverflow) {
function TEST (line 174) | TEST(SocketTest, TestUdpSendBuffers) {
function TEST (line 211) | TEST(SocketTest, TestTcpSendBuffers) {
function TEST (line 283) | TEST(SocketMockTest, TestSendSuccess) {
function TEST (line 295) | TEST(SocketMockTest, TestSendFailure) {
function TEST (line 315) | TEST(SocketMockTest, TestReceiveSuccess) {
function TEST (line 333) | TEST(SocketMockTest, TestReceiveFailure) {
function TEST (line 363) | TEST(SocketMockTest, TestAcceptSuccess) {
function TEST (line 374) | TEST(SocketMockTest, TestAcceptFailure) {
FILE: fastboot/storage.cpp
function FileLock (line 61) | FileLock ConnectedDevicesStorage::Lock() const {
FILE: fastboot/storage.h
function class (line 24) | class ConnectedDevicesStorage {
FILE: fastboot/super_flash_helper.cpp
function SparsePtr (line 73) | SparsePtr SuperFlashHelper::GetSparseLayout() {
FILE: fastboot/super_flash_helper.h
function class (line 30) | class SuperFlashHelper final {
FILE: fastboot/super_flash_helper_test.cpp
function unique_fd (line 28) | unique_fd OpenTestFile(const std::string& file, int flags) {
class TestImageSource (line 40) | class TestImageSource final : public ImageSource {
method ReadFile (line 42) | bool ReadFile(const std::string&, std::vector<char>*) const override {
method unique_fd (line 46) | unique_fd OpenFile(const std::string& name) const override {
function TEST (line 51) | TEST(SuperFlashHelper, ImageEquality) {
FILE: fastboot/task.h
type FlashingPlan (line 23) | struct FlashingPlan
type Image (line 24) | struct Image
function class (line 33) | class Task {
FILE: fastboot/task_test.cpp
class ParseTest (line 30) | class ParseTest : public ::testing ::Test {
method SetUp (line 32) | void SetUp() override {
method TearDown (line 38) | void TearDown() override {}
function collectTasks (line 45) | static std::vector<std::unique_ptr<Task>> collectTasks(FlashingPlan* fp,
function ParseCommand (line 58) | std::unique_ptr<Task> ParseCommand(FlashingPlan* fp, std::string command) {
function compareTaskList (line 65) | static bool compareTaskList(std::vector<std::unique_ptr<Task>>& tasks_a,
function tasksToString (line 81) | static std::string tasksToString(std::vector<std::unique_ptr<Task>>& tas...
function TEST_F (line 90) | TEST_F(ParseTest, CorrectFlashTaskFormed) {
function TEST_F (line 118) | TEST_F(ParseTest, VersionCheckCorrect) {
function TEST_F (line 143) | TEST_F(ParseTest, BadFastbootInput) {
function TEST_F (line 161) | TEST_F(ParseTest, CorrectTaskFormed) {
function TEST_F (line 174) | TEST_F(ParseTest, CorrectDriverCalls) {
function TEST_F (line 190) | TEST_F(ParseTest, CorrectTaskLists) {
function TEST_F (line 236) | TEST_F(ParseTest, IsDynamicPartitiontest) {
function TEST_F (line 265) | TEST_F(ParseTest, CanOptimizeTest) {
function TEST_F (line 307) | TEST_F(ParseTest, OptimizedFlashSuperPatternMatchTest) {
FILE: fastboot/tcp.cpp
type tcp (line 34) | namespace tcp {
function ExtractMessageLength (line 41) | static uint64_t ExtractMessageLength(const void* buffer) {
function EncodeMessageLength (line 50) | static void EncodeMessageLength(uint64_t length, void* buffer) {
class TcpTransport (line 56) | class TcpTransport : public Transport {
method TcpTransport (line 70) | explicit TcpTransport(std::unique_ptr<Socket> sock) : socket_(std::m...
function Connect (line 186) | std::unique_ptr<Transport> Connect(const std::string& hostname, int po...
type internal (line 191) | namespace internal {
function Connect (line 193) | std::unique_ptr<Transport> Connect(std::unique_ptr<Socket> sock, std...
FILE: fastboot/tcp.h
function namespace (line 39) | namespace tcp {
FILE: fastboot/tcp_test.cpp
function TEST (line 35) | TEST(TcpConnectTest, TestSuccess) {
function TEST (line 45) | TEST(TcpConnectTest, TestNewerVersionSuccess) {
function TEST (line 55) | TEST(TcpConnectTest, TestSendFailure) {
function TEST (line 64) | TEST(TcpConnectTest, TestNoResponseFailure) {
function TEST (line 74) | TEST(TcpConnectTest, TestBadResponseFailure) {
function TEST (line 84) | TEST(TcpConnectTest, TestUnknownVersionFailure) {
class TcpTest (line 95) | class TcpTest : public ::testing::Test {
method SetUp (line 97) | void SetUp() override {
method Write (line 109) | bool Write(const std::string& message) {
method Read (line 115) | bool Read(const std::string& message) {
function TEST_F (line 128) | TEST_F(TcpTest, TestWriteSuccess) {
function TEST_F (line 134) | TEST_F(TcpTest, TestReadSuccess) {
function TEST_F (line 142) | TEST_F(TcpTest, TestReadFragmentSuccess) {
function TEST_F (line 152) | TEST_F(TcpTest, TestLargeWriteSuccess) {
function TEST_F (line 163) | TEST_F(TcpTest, TestLargeReadSuccess) {
function TEST_F (line 176) | TEST_F(TcpTest, TestFastbootProtocolSuccess) {
function TEST_F (line 198) | TEST_F(TcpTest, TestReadLengthFailure) {
function TEST_F (line 205) | TEST_F(TcpTest, TestReadDataFailure) {
function TEST_F (line 213) | TEST_F(TcpTest, TestWriteFailure) {
function TEST_F (line 219) | TEST_F(TcpTest, TestTransportClose) {
FILE: fastboot/test_fastboot.py
class DevicesTest (line 25) | class DevicesTest(unittest.TestCase):
method test_devices (line 29) | def test_devices(self):
FILE: fastboot/transport.h
function class (line 23) | class Transport {
FILE: fastboot/udp.cpp
type udp (line 45) | namespace udp {
type Index (line 52) | enum Index {
function ExtractUint16 (line 60) | static uint16_t ExtractUint16(const uint8_t* bytes) {
class Header (line 65) | class Header {
method id (line 70) | uint8_t id() const { return bytes_[kIndexId]; }
class UdpTransport (line 102) | class UdpTransport : public Transport {
method UdpTransport (line 115) | explicit UdpTransport(std::unique_ptr<Socket> socket) : socket_(std:...
function Connect (line 378) | std::unique_ptr<Transport> Connect(const std::string& hostname, int po...
type internal (line 383) | namespace internal {
function Connect (line 385) | std::unique_ptr<Transport> Connect(std::unique_ptr<Socket> sock, std...
FILE: fastboot/udp.h
function namespace (line 37) | namespace udp {
FILE: fastboot/udp_test.cpp
function PacketValue (line 32) | static std::string PacketValue(uint16_t value) {
function ErrorPacket (line 37) | static std::string ErrorPacket(uint16_t sequence, const std::string& mes...
function QueryPacket (line 43) | static std::string QueryPacket(uint16_t sequence) {
function QueryPacket (line 48) | static std::string QueryPacket(uint16_t sequence, uint16_t new_sequence) {
function InitPacket (line 54) | static std::string InitPacket(uint16_t sequence, uint16_t version, uint1...
function FastbootPacket (line 60) | static std::string FastbootPacket(uint16_t sequence, const std::string& ...
class UdpConnectTest (line 67) | class UdpConnectTest : public ::testing::Test {
method UdpConnectTest (line 69) | UdpConnectTest() : mock_socket_(new SocketMock) {}
method UdpConnect (line 73) | bool UdpConnect(std::string* error = nullptr) {
function TEST_F (line 88) | TEST_F(UdpConnectTest, InitializationSuccess) {
function TEST_F (line 100) | TEST_F(UdpConnectTest, InitializationContinuationSuccess) {
function TEST_F (line 121) | TEST_F(UdpConnectTest, InitializationVersionMismatch) {
function TEST_F (line 137) | TEST_F(UdpConnectTest, QueryResponseTimeoutFailure) {
function TEST_F (line 146) | TEST_F(UdpConnectTest, QueryResponseReceiveFailure) {
function TEST_F (line 153) | TEST_F(UdpConnectTest, InitResponseTimeoutFailure) {
function TEST_F (line 164) | TEST_F(UdpConnectTest, InitResponseReceiveFailure) {
function TEST_F (line 174) | TEST_F(UdpConnectTest, ResponseRecovery) {
function TEST_F (line 195) | TEST_F(UdpConnectTest, ExtraResponseDataSuccess) {
function TEST_F (line 206) | TEST_F(UdpConnectTest, WrongSequenceRecovery) {
function TEST_F (line 219) | TEST_F(UdpConnectTest, WrongIdRecovery) {
function TEST_F (line 232) | TEST_F(UdpConnectTest, InvalidQueryResponseFailure) {
function TEST_F (line 249) | TEST_F(UdpConnectTest, InvalidInitResponseFailure) {
function TEST_F (line 269) | TEST_F(UdpConnectTest, ErrorResponseFailure) {
function TEST_F (line 288) | TEST_F(UdpConnectTest, ErrorContinuationFailure) {
class UdpTest (line 303) | class UdpTest : public ::testing::Test {
method SetUp (line 305) | void SetUp() override {
method InitializeTransport (line 313) | bool InitializeTransport(uint16_t starting_sequence, int device_max_pa...
method Write (line 328) | bool Write(const std::string& message) {
method Read (line 334) | bool Read(const std::string& message) {
function TEST_F (line 348) | TEST_F(UdpTest, SequenceIncrementCheck) {
function TEST_F (line 365) | TEST_F(UdpTest, ReadAndWriteSmallPackets) {
function TEST_F (line 392) | TEST_F(UdpTest, ResponseTimeoutFailure) {
function TEST_F (line 401) | TEST_F(UdpTest, ResponseReceiveFailure) {
function TEST_F (line 408) | TEST_F(UdpTest, ResponseTimeoutRecovery) {
function TEST_F (line 423) | TEST_F(UdpTest, ContinuationPackets) {
function TEST_F (line 458) | TEST_F(UdpTest, SmallContinuationPackets) {
function TEST_F (line 468) | TEST_F(UdpTest, ContinuationPacketError) {
function TEST_F (line 478) | TEST_F(UdpTest, ContinuationTimeoutRecovery) {
function TEST_F (line 490) | TEST_F(UdpTest, MultipleReadPacket) {
function TEST_F (line 499) | TEST_F(UdpTest, IgnoreOutOfOrderPackets) {
function TEST_F (line 510) | TEST_F(UdpTest, ErrorResponse) {
function TEST_F (line 526) | TEST_F(UdpTest, CloseTransport) {
FILE: fastboot/usb.h
type usb_ifc_info (line 36) | struct usb_ifc_info {
function class (line 60) | class UsbTransport : public Transport {
type std (line 67) | typedef std::function<int(usb_ifc_info*)> ifc_match_func;
FILE: fastboot/usb_linux.cpp
type usb_handle (line 99) | struct usb_handle
class LinuxUsbTransport (line 107) | class LinuxUsbTransport : public UsbTransport {
method LinuxUsbTransport (line 109) | explicit LinuxUsbTransport(std::unique_ptr<usb_handle> handle, uint32_...
function badname (line 132) | static inline int badname(const char *name)
function check (line 143) | static int check(void *_desc, int len, unsigned type, int size)
function filter_usb_device (line 155) | static int filter_usb_device(char* sysfs_name,
function read_sysfs_string (line 301) | static int read_sysfs_string(const char *sysfs_name, const char *sysfs_n...
function read_sysfs_number (line 326) | static int read_sysfs_number(const char *sysfs_name, const char *sysfs_n...
function convert_to_devfs_name (line 343) | static int convert_to_devfs_name(const char* sysfs_name,
function find_usb_device (line 360) | static std::unique_ptr<usb_handle> find_usb_device(const char* base, ifc...
type usbdevfs_urb (line 422) | struct usbdevfs_urb
type usbdevfs_urb (line 460) | struct usbdevfs_urb
type usbdevfs_bulktransfer (line 513) | struct usbdevfs_bulktransfer
function usb_open (line 577) | std::unique_ptr<UsbTransport> usb_open(ifc_match_func callback, uint32_t...
FILE: fastboot/usb_osx.cpp
type usb_handle (line 56) | struct usb_handle
class OsxUsbTransport (line 68) | class OsxUsbTransport : public UsbTransport {
method OsxUsbTransport (line 71) | OsxUsbTransport(std::unique_ptr<usb_handle> handle, uint32_t ms_timeou...
function try_interfaces (line 89) | static int try_interfaces(IOUSBDeviceInterface500** dev, usb_handle* han...
function try_device (line 285) | static int try_device(io_service_t device, usb_handle *handle) {
function init_usb (line 407) | static int init_usb(ifc_match_func callback, std::unique_ptr<usb_handle>...
function usb_open (line 472) | std::unique_ptr<UsbTransport> usb_open(ifc_match_func callback, uint32_t...
FILE: fastboot/usb_windows.cpp
type usb_handle (line 55) | struct usb_handle {
class WindowsUsbTransport (line 69) | class WindowsUsbTransport : public UsbTransport {
method WindowsUsbTransport (line 71) | WindowsUsbTransport(std::unique_ptr<usb_handle> handle) : handle_(std:...
function do_usb_open (line 101) | std::unique_ptr<usb_handle> do_usb_open(const wchar_t* interface_name) {
function usb_cleanup_handle (line 231) | void usb_cleanup_handle(usb_handle* handle) {
function usb_kick (line 247) | void usb_kick(usb_handle* handle) {
function recognized_device (line 278) | int recognized_device(usb_handle* handle, ifc_match_func callback) {
function find_usb_device (line 337) | static std::unique_ptr<usb_handle> find_usb_device(ifc_match_func callba...
function usb_open (line 384) | std::unique_ptr<UsbTransport> usb_open(ifc_match_func callback, uint32_t) {
FILE: fastboot/util.cpp
function now (line 45) | double now() {
function die (line 51) | void die(const char* fmt, ...) {
function die (line 61) | void die(const std::string& str) {
function set_verbose (line 65) | void set_verbose() {
function verbose (line 69) | void verbose(const char* fmt, ...) {
function should_flash_in_userspace (line 82) | bool should_flash_in_userspace(const android::fs_mgr::LpMetadata& metadata,
function is_sparse_file (line 100) | bool is_sparse_file(borrowed_fd fd) {
function get_file_size (line 105) | int64_t get_file_size(borrowed_fd fd) {
function fb_fix_numeric_var (line 113) | std::string fb_fix_numeric_var(std::string var) {
FILE: fastboot/util.h
function class (line 35) | class ImageSource {
FILE: fastboot/vendor_boot_img_utils.cpp
class DataUpdater (line 31) | class DataUpdater {
method DataUpdater (line 33) | DataUpdater(const std::string& old_data) : old_data_(&old_data) {
method Copy (line 39) | [[nodiscard]] Result<void> Copy(uint32_t num_bytes) {
method Replace (line 51) | [[nodiscard]] Result<void> Replace(uint32_t old_num_bytes, const std::...
method Replace (line 54) | [[nodiscard]] Result<void> Replace(uint32_t old_num_bytes, const void*...
method Skip (line 70) | [[nodiscard]] Result<void> Skip(uint32_t old_skip, uint32_t new_skip) {
method Seek (line 80) | [[nodiscard]] Result<void> Seek(uint32_t offset) {
method Finish (line 87) | std::string Finish() {
method CheckOffset (line 92) | [[nodiscard]] Result<void> CheckOffset(uint32_t old_offset, uint32_t n...
method size (line 102) | uint64_t size() const { return old_data_->size(); }
method CheckAdvance (line 112) | [[nodiscard]] Result<void> CheckAdvance(const char* current, const cha...
function get_vendor_boot_header_size (line 130) | [[nodiscard]] Result<uint32_t> get_vendor_boot_header_size(const vendor_...
function check_vendor_boot_hdr (line 137) | [[nodiscard]] Result<void> check_vendor_boot_hdr(const std::string& cont...
function load_file (line 165) | [[nodiscard]] Result<std::string> load_file(android::base::borrowed_fd f...
function store_file (line 182) | [[nodiscard]] Result<void> store_file(android::base::borrowed_fd fd, con...
function copy_avb_footer (line 197) | [[nodiscard]] Result<void> copy_avb_footer(DataUpdater* updater) {
function round_up (line 206) | inline uint32_t round_up(uint32_t value, uint32_t page_size) {
function replace_default_vendor_ramdisk (line 211) | [[nodiscard]] Result<std::string> replace_default_vendor_ramdisk(const s...
function find_unique_ramdisk (line 290) | [[nodiscard]] Result<const vendor_ramdisk_table_entry_v4*> find_unique_r...
function replace_vendor_ramdisk_fragment (line 316) | [[nodiscard]] Result<std::string> replace_vendor_ramdisk_fragment(const ...
function replace_vendor_ramdisk (line 431) | [[nodiscard]] Result<void> replace_vendor_ramdisk(
FILE: fastboot/vendor_boot_img_utils_test.cpp
function FileSize (line 68) | Result<uint64_t> FileSize(borrowed_fd fd, std::filesystem::path path) {
function ReadStartOfFdToString (line 75) | Result<std::string> ReadStartOfFdToString(borrowed_fd fd, std::filesyste...
function round_up (line 84) | inline uint32_t round_up(uint32_t value, uint32_t page_size) {
type TestFileHandle (line 113) | struct TestFileHandle {
method Open (line 116) | android::base::Result<void> Open() {
method size (line 122) | uint64_t size() {
method fsize (line 128) | Result<uint64_t> fsize() {
method borrowed_fd (line 132) | borrowed_fd fd() {
method Read (line 136) | Result<std::string> Read() {
method OpenImpl (line 148) | android::base::Result<void> OpenImpl() {
method TestFileHandle (line 165) | TestFileHandle(const std::filesystem::path& rel_path)
type ReadOnlyTestFileHandle (line 174) | struct ReadOnlyTestFileHandle : TestFileHandle {
method ReadOnlyTestFileHandle (line 175) | ReadOnlyTestFileHandle(const std::filesystem::path& rel_path) : TestFi...
method Transform (line 179) | android::base::Result<borrowed_fd> Transform(const std::filesystem::pa...
type ReadWriteTestFileHandle (line 187) | struct ReadWriteTestFileHandle : TestFileHandle {
method ReadWriteTestFileHandle (line 188) | ReadWriteTestFileHandle(const std::filesystem::path& rel_path) : TestF...
method Transform (line 193) | android::base::Result<borrowed_fd> Transform(const std::filesystem::pa...
class RepackVendorBootImgTestEnv (line 209) | class RepackVendorBootImgTestEnv : public ::testing::Environment {
method SetUp (line 211) | virtual void SetUp() {
method OpenTestFile (line 231) | void OpenTestFile(const char* rel_path, std::unique_ptr<TestFileHandle...
type RepackVendorBootImgTestParam (line 242) | struct RepackVendorBootImgTestParam {
class RepackVendorBootImgTest (line 251) | class RepackVendorBootImgTest : public ::testing::TestWithParam<RepackVe...
method SetUp (line 253) | virtual void SetUp() {
function TEST_P (line 266) | TEST_P(RepackVendorBootImgTest, InvalidSize) {
function TEST_P (line 294) | TEST_P(RepackVendorBootImgTest, ReplaceUnknown) {
function TEST_P (line 307) | TEST_P(RepackVendorBootImgTest, ReplaceDefault) {
function GetRamdiskName (line 378) | std::string_view GetRamdiskName(const vendor_ramdisk_table_entry_v4* ent...
class RepackVendorBootImgTestV4 (line 383) | class RepackVendorBootImgTestV4 : public ::testing::TestWithParam<uint32...
method SetUp (line 385) | virtual void SetUp() {
function TEST_P (line 392) | TEST_P(RepackVendorBootImgTestV4, Replace) {
function main (line 472) | int main(int argc, char* argv[]) {
FILE: fs_mgr/blockdev.cpp
function PartitionParent (line 39) | static std::string PartitionParent(const std::string& blockdev) {
function BlockdevName (line 62) | static std::string BlockdevName(dev_t dev) {
function rtrim (line 81) | static void rtrim(std::string& s) {
function BlockDeviceQueueDepth (line 87) | static Result<uint32_t> BlockDeviceQueueDepth(const std::string& file_pa...
function ConfigureQueueDepth (line 129) | Result<void> ConfigureQueueDepth(const std::string& loop_device_path,
FILE: fs_mgr/file_wait.cpp
type android (line 35) | namespace android {
type fs_mgr (line 36) | namespace fs_mgr {
function PollForFile (line 41) | bool PollForFile(const std::string& path, const std::chrono::millise...
function PollForFileDeleted (line 55) | bool PollForFileDeleted(const std::string& path, const std::chrono::...
class OneShotInotify (line 70) | class OneShotInotify {
type Result (line 82) | enum class Result { Success, Timeout, Error }
type pollfd (line 154) | struct pollfd
type inotify_event (line 193) | struct inotify_event
function WaitForFile (line 218) | bool WaitForFile(const std::string& path, const std::chrono::millise...
function WaitForFileDeleted (line 228) | bool WaitForFileDeleted(const std::string& path, const std::chrono::...
FILE: fs_mgr/fs_mgr.cpp
type FsStatFlags (line 117) | enum FsStatFlags {
function log_fs_stat (line 137) | static void log_fs_stat(const std::string& blk_device, int fs_stat) {
function is_extfs (line 147) | static bool is_extfs(const std::string& fs_type) {
function is_f2fs (line 151) | static bool is_f2fs(const std::string& fs_type) {
function realpath (line 155) | static std::string realpath(const std::string& blk_device) {
function should_force_check (line 163) | static bool should_force_check(int fs_stat) {
function umount_retry (line 171) | static bool umount_retry(const std::string& mount_point) {
function check_fs (line 187) | static void check_fs(const std::string& blk_device, const std::string& f...
function ext4_fsblk_t (line 295) | static ext4_fsblk_t ext4_blocks_count(const struct ext4_super_block* es) {
function ext4_fsblk_t (line 300) | static ext4_fsblk_t ext4_r_blocks_count(const struct ext4_super_block* e...
function is_ext4_superblock_valid (line 305) | static bool is_ext4_superblock_valid(const struct ext4_super_block* es) {
function read_ext4_superblock (line 314) | static bool read_ext4_superblock(const std::string& blk_device, struct e...
function fs_mgr_is_ext4 (line 343) | bool fs_mgr_is_ext4(const std::string& blk_device) {
function tune2fs_available (line 355) | static bool tune2fs_available(void) {
function run_command (line 359) | static bool run_command(const char* argv[], int argc) {
function tune_quota (line 367) | static void tune_quota(const std::string& blk_device, const FstabEntry& ...
function tune_reserved_size (line 408) | static void tune_reserved_size(const std::string& blk_device, const Fsta...
function tune_encrypt (line 450) | static void tune_encrypt(const std::string& blk_device, const FstabEntry...
function tune_verity (line 495) | static void tune_verity(const std::string& blk_device, const FstabEntry&...
function tune_casefold (line 532) | static void tune_casefold(const std::string& blk_device, const FstabEntr...
function resize2fs_available (line 567) | static bool resize2fs_available(void) {
function tune_metadata_csum (line 572) | static void tune_metadata_csum(const std::string& blk_device, const Fsta...
function read_f2fs_superblock (line 613) | static bool read_f2fs_superblock(const std::string& blk_device, int* fs_...
function fs_mgr_is_f2fs (line 643) | bool fs_mgr_is_f2fs(const std::string& blk_device) {
function SetReadAheadSize (line 659) | static void SetReadAheadSize(const std::string& entry_block_device, off6...
function check_if_preventative_fsck_needed (line 706) | static bool check_if_preventative_fsck_needed(const FstabEntry& entry) {
function prepare_fs_for_mount (line 731) | static int prepare_fs_for_mount(const std::string& blk_device, const Fst...
function fs_mgr_set_blk_ro (line 795) | bool fs_mgr_set_blk_ro(const std::string& blockdev, bool readonly) {
function fs_mgr_is_device_unlocked (line 807) | bool fs_mgr_is_device_unlocked() {
function __mount (line 818) | static int __mount(const std::string& source, const std::string& target,...
function fs_match (line 894) | static bool fs_match(const std::string& in1, const std::string& in2) {
function should_use_metadata_encryption (line 922) | static bool should_use_metadata_encryption(const FstabEntry& entry) {
function mount_with_alternatives (line 933) | static bool mount_with_alternatives(Fstab& fstab, int start_idx, bool in...
function TranslateExtLabels (line 1024) | static bool TranslateExtLabels(FstabEntry* entry) {
function handle_encryptable (line 1080) | static int handle_encryptable(const FstabEntry& entry) {
function set_type_property (line 1095) | static void set_type_property(int status) {
function call_vdc (line 1105) | static bool call_vdc(const std::vector<std::string>& args, int* ret) {
function fs_mgr_update_logical_partition (line 1124) | bool fs_mgr_update_logical_partition(FstabEntry* entry) {
function SupportsCheckpoint (line 1142) | static bool SupportsCheckpoint(FstabEntry* entry) {
class CheckpointManager (line 1146) | class CheckpointManager {
method CheckpointManager (line 1148) | CheckpointManager(int needs_checkpoint = -1, bool metadata_encrypted =...
method NeedsCheckpoint (line 1154) | bool NeedsCheckpoint() {
method Update (line 1165) | bool Update(FstabEntry* entry, const std::string& block_device = std::...
method Revert (line 1186) | bool Revert(FstabEntry* entry) {
method UpdateCheckpointPartition (line 1208) | bool UpdateCheckpointPartition(FstabEntry* entry, const std::string& b...
function fs_mgr_find_bow_device (line 1287) | std::string fs_mgr_find_bow_device(const std::string& block_device) {
function WrapUserdata (line 1343) | static void WrapUserdata(FstabEntry* entry, dev_t dev, const std::string...
function WrapUserdataIfNeeded (line 1382) | static void WrapUserdataIfNeeded(FstabEntry* entry, const std::string& a...
function IsMountPointMounted (line 1418) | static bool IsMountPointMounted(const std::string& mount_point) {
function fs_mgr_metadata_encryption_in_progress_file_name (line 1427) | std::string fs_mgr_metadata_encryption_in_progress_file_name(const Fstab...
function WasMetadataEncryptionInterrupted (line 1431) | bool WasMetadataEncryptionInterrupted(const FstabEntry& entry) {
function FstabEntry (line 1436) | static FstabEntry* LocateFormattableEntry(FstabEntry* const begin, Fstab...
function fs_mgr_mount_all (line 1470) | int fs_mgr_mount_all(Fstab* fstab, int mount_mode) {
function fs_mgr_umount_all (line 1742) | int fs_mgr_umount_all(android::fs_mgr::Fstab* fstab) {
function fs_mgr_do_mount_one (line 1777) | int fs_mgr_do_mount_one(const FstabEntry& entry, const std::string& alt_...
function fs_mgr_do_mount (line 1802) | int fs_mgr_do_mount(Fstab* fstab, const std::string& n_name, const std::...
function ConfigureIoScheduler (line 1908) | static bool ConfigureIoScheduler(const std::string& device_path) {
function InstallZramDevice (line 1937) | static bool InstallZramDevice(const std::string& device) {
function ZramBackingDeviceSizeAvailable (line 1951) | static bool ZramBackingDeviceSizeAvailable(off64_t size) {
function PrepareZramBackingDevice (line 1975) | static bool PrepareZramBackingDevice(off64_t size) {
function IsRecovery (line 2032) | static bool IsRecovery() {
function ShouldSkipZramSetup (line 2040) | static bool ShouldSkipZramSetup() {
function fs_mgr_swapon_all (line 2104) | bool fs_mgr_swapon_all(const Fstab& fstab) {
function fs_mgr_is_verity_enabled (line 2183) | bool fs_mgr_is_verity_enabled(const FstabEntry& entry) {
function fs_mgr_get_hashtree_info (line 2208) | std::optional<HashtreeInfo> fs_mgr_get_hashtree_info(const android::fs_m...
function fs_mgr_verity_is_check_at_most_once (line 2245) | bool fs_mgr_verity_is_check_at_most_once(const android::fs_mgr::FstabEnt...
function fs_mgr_get_super_partition_name (line 2251) | std::string fs_mgr_get_super_partition_name(int slot) {
function fs_mgr_create_canonical_mount_point (line 2275) | bool fs_mgr_create_canonical_mount_point(const std::string& mount_point) {
function fs_mgr_mount_overlayfs_fstab_entry (line 2295) | bool fs_mgr_mount_overlayfs_fstab_entry(const FstabEntry& entry) {
function fs_mgr_load_verity_state (line 2368) | bool fs_mgr_load_verity_state(int* mode) {
function fs_mgr_filesystem_available (line 2387) | bool fs_mgr_filesystem_available(const std::string& filesystem) {
function fs_mgr_get_context (line 2393) | std::string fs_mgr_get_context(const std::string& mount_point) {
function fs_mgr_f2fs_ideal_block_size (line 2405) | int fs_mgr_f2fs_ideal_block_size() {
type android (line 2413) | namespace android {
type fs_mgr (line 2414) | namespace fs_mgr {
function OverlayfsCheckResult (line 2416) | OverlayfsCheckResult CheckOverlayfs() {
FILE: fs_mgr/fs_mgr_dm_linear.cpp
type android (line 46) | namespace android {
type fs_mgr (line 47) | namespace fs_mgr {
function GetPhysicalPartitionDevicePath (line 55) | static bool GetPhysicalPartitionDevicePath(const CreateLogicalPartit...
function CreateDmTableInternal (line 92) | bool CreateDmTableInternal(const CreateLogicalPartitionParams& param...
function CreateDmTable (line 133) | bool CreateDmTable(CreateLogicalPartitionParams params, DmTable* tab...
function CreateLogicalPartitions (line 139) | bool CreateLogicalPartitions(const std::string& block_device) {
function ReadCurrentMetadata (line 149) | std::unique_ptr<LpMetadata> ReadCurrentMetadata(const std::string& b...
function CreateLogicalPartitions (line 154) | bool CreateLogicalPartitions(const LpMetadata& metadata, const std::...
function CreateLogicalPartition (line 234) | bool CreateLogicalPartition(CreateLogicalPartitionParams params, std...
function UnmapDevice (line 262) | bool UnmapDevice(const std::string& name) {
function DestroyLogicalPartition (line 270) | bool DestroyLogicalPartition(const std::string& name) {
FILE: fs_mgr/fs_mgr_format.cpp
function get_dev_sz (line 45) | static int get_dev_sz(const std::string& fs_blkdev, uint64_t* dev_sz) {
function format_ext4 (line 61) | static int format_ext4(const std::string& fs_blkdev, const std::string& ...
function format_f2fs (line 128) | static int format_f2fs(const std::string& fs_blkdev, uint64_t dev_sz, bo...
function fs_mgr_do_format (line 189) | int fs_mgr_do_format(const FstabEntry& entry) {
FILE: fs_mgr/fs_mgr_overlayfs_control.cpp
function fs_mgr_boot_completed (line 71) | static bool fs_mgr_boot_completed() {
function ScratchIsOnData (line 76) | static bool ScratchIsOnData() {
function fs_mgr_rm_all (line 84) | static bool fs_mgr_rm_all(const std::string& path, bool* change = nullpt...
function fs_mgr_overlayfs_setup_dir (line 125) | std::string fs_mgr_overlayfs_setup_dir(const std::string& dir) {
function fs_mgr_overlayfs_setup_one (line 142) | bool fs_mgr_overlayfs_setup_one(const std::string& overlay, const std::s...
function fs_mgr_overlayfs_slot_number (line 187) | static uint32_t fs_mgr_overlayfs_slot_number() {
function fs_mgr_overlayfs_has_logical (line 191) | static bool fs_mgr_overlayfs_has_logical(const Fstab& fstab) {
function OverlayfsTeardownResult (line 200) | OverlayfsTeardownResult TeardownDataScratch(IImageManager* images,
function GetOverlaysActiveFlag (line 222) | bool GetOverlaysActiveFlag() {
function SetOverlaysActiveFlag (line 233) | bool SetOverlaysActiveFlag(bool flag) {
function OverlayfsTeardownResult (line 251) | OverlayfsTeardownResult fs_mgr_overlayfs_teardown_scratch(const std::str...
function fs_mgr_overlayfs_teardown_one (line 313) | bool fs_mgr_overlayfs_teardown_one(const std::string& overlay, const std...
function GetDsuScratchDevice (line 373) | static std::string GetDsuScratchDevice() {
function MakeScratchFilesystem (line 383) | bool MakeScratchFilesystem(const std::string& scratch_device) {
function TruncatePartitionsWithSuffix (line 411) | static void TruncatePartitionsWithSuffix(MetadataBuilder* builder, const...
function CreateDynamicScratch (line 430) | static bool CreateDynamicScratch(std::string* scratch_device, bool* part...
function GetIdealDataScratchSize (line 509) | static inline uint64_t GetIdealDataScratchSize() {
function CreateScratchOnData (line 532) | static bool CreateScratchOnData(std::string* scratch_device, bool* parti...
function CanUseSuperPartition (line 577) | static bool CanUseSuperPartition(const Fstab& fstab) {
function fs_mgr_overlayfs_create_scratch (line 590) | bool fs_mgr_overlayfs_create_scratch(const Fstab& fstab, std::string* sc...
function fs_mgr_overlayfs_setup_scratch (line 615) | bool fs_mgr_overlayfs_setup_scratch(const Fstab& fstab) {
function OverlayfsTeardownAllowed (line 656) | constexpr bool OverlayfsTeardownAllowed() {
function fs_mgr_overlayfs_setup (line 663) | bool fs_mgr_overlayfs_setup(const Fstab& fstab, const char* mount_point,...
type MapInfo (line 730) | struct MapInfo {
method MapInfo (line 738) | MapInfo() = default;
method MapInfo (line 739) | MapInfo(MapInfo&&) = default;
function EnsureScratchMapped (line 751) | static std::optional<MapInfo> EnsureScratchMapped() {
function MapDsuScratchDevice (line 807) | static bool MapDsuScratchDevice(std::string* device) {
function OverlayfsTeardownResult (line 828) | static OverlayfsTeardownResult TeardownMountsAndScratch(const char* moun...
function OverlayfsTeardownResult (line 860) | OverlayfsTeardownResult fs_mgr_overlayfs_teardown(const char* mount_poin...
type android (line 885) | namespace android {
type fs_mgr (line 886) | namespace fs_mgr {
function MapScratchPartitionIfNeeded (line 888) | void MapScratchPartitionIfNeeded(Fstab* fstab,
function CleanupOldScratchFiles (line 914) | void CleanupOldScratchFiles() {
function GetBootScratchDevice (line 934) | std::string GetBootScratchDevice() {
function TeardownAllOverlayForMountPoint (line 956) | void TeardownAllOverlayForMountPoint(const std::string& mount_point) {
FILE: fs_mgr/fs_mgr_overlayfs_control.h
function OverlayfsTeardownResult (line 28) | enum class OverlayfsTeardownResult {
FILE: fs_mgr/fs_mgr_overlayfs_mount.cpp
function fs_mgr_is_dsu_running (line 68) | bool fs_mgr_is_dsu_running() {
function OverlayMountPoints (line 77) | std::vector<std::string> OverlayMountPoints() {
function GetEncodedBaseDirForMountPoint (line 96) | std::string GetEncodedBaseDirForMountPoint(const std::string& mount_poin...
function fs_mgr_is_dir (line 109) | static bool fs_mgr_is_dir(const std::string& path) {
function fs_mgr_filesystem_has_space (line 116) | bool fs_mgr_filesystem_has_space(const std::string& mount_point) {
function fs_mgr_update_blk_device (line 132) | static bool fs_mgr_update_blk_device(FstabEntry* entry) {
function fs_mgr_has_shared_blocks (line 155) | static bool fs_mgr_has_shared_blocks(const std::string& mount_point, con...
function fs_mgr_is_read_only_f2fs (line 180) | static bool fs_mgr_is_read_only_f2fs(const std::string& dev) {
function fs_mgr_overlayfs_enabled (line 195) | static bool fs_mgr_overlayfs_enabled(FstabEntry* entry) {
function fs_mgr_mount_point (line 221) | const std::string fs_mgr_mount_point(const std::string& mount_point) {
function fs_mgr_get_overlayfs_options (line 227) | static std::string fs_mgr_get_overlayfs_options(const FstabEntry& entry) {
function fs_mgr_overlayfs_umount_scratch (line 278) | bool fs_mgr_overlayfs_umount_scratch() {
function fs_mgr_overlayfs_set_shared_mount (line 288) | static bool fs_mgr_overlayfs_set_shared_mount(const std::string& mount_p...
function fs_mgr_overlayfs_move_mount (line 299) | static bool fs_mgr_overlayfs_move_mount(const std::string& source, const...
function fs_mgr_overlayfs_mount (line 308) | static bool fs_mgr_overlayfs_mount(const std::string& mount_point, const...
type mount_info (line 327) | struct mount_info {
function ReadMountinfoFromFile (line 332) | static std::vector<mount_info> ReadMountinfoFromFile(const std::string& ...
function fs_mgr_overlayfs_mount_one (line 399) | static bool fs_mgr_overlayfs_mount_one(const FstabEntry& fstab_entry) {
function MountScratch (line 554) | bool MountScratch(const std::string& device_path, bool readonly) {
function OverlayfsSetupAllowed (line 618) | bool OverlayfsSetupAllowed(bool verbose) {
function fs_mgr_wants_overlayfs (line 642) | bool fs_mgr_wants_overlayfs(FstabEntry* entry) {
function Fstab (line 663) | Fstab fs_mgr_overlayfs_candidate_list(const Fstab& fstab) {
function TryMountScratch (line 697) | static void TryMountScratch() {
function fs_mgr_overlayfs_mount_all (line 721) | bool fs_mgr_overlayfs_mount_all(Fstab* fstab) {
function fs_mgr_overlayfs_is_setup (line 761) | bool fs_mgr_overlayfs_is_setup() {
function fs_mgr_overlayfs_already_mounted (line 777) | bool fs_mgr_overlayfs_already_mounted(const std::string& mount_point, bo...
type android (line 800) | namespace android {
type fs_mgr (line 801) | namespace fs_mgr {
function MountOverlayfs (line 803) | void MountOverlayfs(const FstabEntry& fstab_entry, bool* scratch_can...
FILE: fs_mgr/fs_mgr_overlayfs_mount.h
function class (line 36) | class AutoSetFsCreateCon final {
FILE: fs_mgr/fs_mgr_priv.h
function namespace (line 90) | namespace android {
FILE: fs_mgr/fs_mgr_remount.cpp
function usage (line 56) | void usage() {
function system_mount_point (line 87) | const std::string system_mount_point(const android::fs_mgr::FstabEntry& ...
class MyLogger (line 92) | class MyLogger {
method MyLogger (line 94) | explicit MyLogger(bool verbose) : verbose_(verbose) {}
function reboot (line 111) | [[noreturn]] void reboot(const std::string& name) {
function GetVold (line 120) | static android::sp<android::os::IVold> GetVold() {
function ReadFstab (line 132) | static bool ReadFstab(const char* fstab_file, android::fs_mgr::Fstab* fs...
function VerifyCheckpointing (line 152) | bool VerifyCheckpointing() {
function IsRemountable (line 186) | static bool IsRemountable(Fstab& candidates, const FstabEntry& entry) {
function FindPartition (line 203) | static Fstab::const_iterator FindPartition(const Fstab& fstab, const std...
function Fstab (line 225) | static Fstab GetAllRemountablePartitions(Fstab& fstab) {
function GetRemountList (line 237) | bool GetRemountList(const Fstab& fstab, const std::vector<std::string>& ...
type RemountCheckResult (line 270) | struct RemountCheckResult {
function CheckOverlayfs (line 278) | bool CheckOverlayfs(Fstab* partitions, RemountCheckResult* result) {
function EnableDsuIfNeeded (line 304) | bool EnableDsuIfNeeded() {
function RemountPartition (line 342) | bool RemountPartition(Fstab& fstab, Fstab& mounts, FstabEntry& entry) {
type SetVerityStateResult (line 399) | struct SetVerityStateResult {
function SetVerityStateResult (line 404) | SetVerityStateResult SetVerityState(bool enable_verity) {
function SetupOrTeardownOverlayfs (line 437) | bool SetupOrTeardownOverlayfs(bool enable) {
function do_remount (line 469) | bool do_remount(Fstab& fstab, const std::vector<std::string>& partition_...
function main (line 539) | int main(int argc, char* argv[]) {
FILE: fs_mgr/fs_mgr_roots.cpp
type android (line 30) | namespace android {
type fs_mgr (line 31) | namespace fs_mgr {
function FstabEntry (line 37) | FstabEntry* GetEntryForPath(Fstab* fstab, const std::string& path) {
function GetEntriesForPath (line 49) | std::vector<FstabEntry*> GetEntriesForPath(Fstab* fstab, const std::...
type MountState (line 63) | enum class MountState {
function MountState (line 69) | static MountState GetMountState(const std::string& mount_point) {
function TryPathMount (line 83) | bool TryPathMount(FstabEntry* rec, const std::string& mount_pt) {
function EnsurePathMounted (line 142) | bool EnsurePathMounted(Fstab* fstab, const std::string& path, const ...
function EnsurePathUnmounted (line 157) | bool EnsurePathUnmounted(Fstab* fstab, const std::string& path) {
function GetSystemRoot (line 190) | std::string GetSystemRoot() {
function LogicalPartitionsMapped (line 205) | bool LogicalPartitionsMapped() {
FILE: fs_mgr/fs_mgr_vendor_overlay.cpp
function fs_mgr_get_vendor_overlay_dirs (line 47) | std::vector<std::pair<std::string, std::string>> fs_mgr_get_vendor_overl...
function fs_mgr_vendor_overlay_mount (line 70) | bool fs_mgr_vendor_overlay_mount(const std::pair<std::string, std::strin...
function fs_mgr_vendor_overlay_mount_all (line 110) | bool fs_mgr_vendor_overlay_mount_all() {
FILE: fs_mgr/include/fs_mgr.h
type verity_mode (line 38) | enum verity_mode {
type mount_mode (line 47) | enum mount_mode {
type HashtreeInfo (line 64) | struct HashtreeInfo {
type FsMgrUmountStatus (line 113) | enum FsMgrUmountStatus : int {
FILE: fs_mgr/include/fs_mgr/file_wait.h
function namespace (line 20) | namespace android {
FILE: fs_mgr/include/fs_mgr/roots.h
function namespace (line 23) | namespace android {
FILE: fs_mgr/include/fs_mgr_dm_linear.h
function namespace (line 39) | namespace android {
FILE: fs_mgr/include/fs_mgr_overlayfs.h
function namespace (line 30) | namespace android {
FILE: fs_mgr/libdm/dm.cpp
type android (line 46) | namespace android {
type dm (line 47) | namespace dm {
function DeviceMapper (line 58) | DeviceMapper& DeviceMapper::Instance() {
type dm_ioctl (line 74) | struct dm_ioctl
type dm_ioctl (line 116) | struct dm_ioctl
type dm_ioctl (line 149) | struct dm_ioctl
function GenerateUuid (line 167) | static std::string GenerateUuid() {
function IsRecovery (line 177) | static bool IsRecovery() {
type dm_ioctl (line 238) | struct dm_ioctl
type dm_ioctl (line 254) | struct dm_ioctl
type dm_ioctl (line 273) | struct dm_ioctl
function DmDeviceState (line 281) | DmDeviceState DeviceMapper::GetState(const std::string& name) const {
type dm_ioctl (line 298) | struct dm_ioctl
type dm_ioctl (line 320) | struct dm_ioctl
type dm_ioctl (line 323) | struct dm_ioctl
type dm_ioctl (line 323) | struct dm_ioctl
type dm_ioctl (line 326) | struct dm_ioctl
type dm_ioctl (line 343) | struct dm_ioctl
type dm_target_versions (line 358) | struct dm_target_versions
type dm_ioctl (line 364) | struct dm_ioctl
type dm_ioctl (line 374) | struct dm_ioctl
type dm_ioctl (line 374) | struct dm_ioctl
type dm_target_versions (line 400) | struct dm_target_versions
type dm_target_versions (line 401) | struct dm_target_versions
type dm_target_versions (line 409) | struct dm_target_versions
type dm_name_list (line 435) | struct dm_name_list
type dm_ioctl (line 441) | struct dm_ioctl
type dm_ioctl (line 451) | struct dm_ioctl
type dm_ioctl (line 451) | struct dm_ioctl
type dm_name_list (line 477) | struct dm_name_list
type dm_name_list (line 478) | struct dm_name_list
type dm_name_list (line 487) | struct dm_name_list
type dm_ioctl (line 496) | struct dm_ioctl
type dm_ioctl (line 511) | struct dm_ioctl
type dm_ioctl (line 523) | struct dm_ioctl
function RedactTableInfo (line 554) | void RedactTableInfo(const struct dm_target_spec& spec, std::string*...
type dm_ioctl (line 569) | struct dm_ioctl
type dm_ioctl (line 572) | struct dm_ioctl
type dm_target_spec (line 588) | struct dm_target_spec
type dm_target_spec (line 594) | struct dm_target_spec
type dm_target_spec (line 594) | struct dm_target_spec
type dm_ioctl (line 612) | struct dm_ioctl
type dm_target_spec (line 626) | struct dm_target_spec
function ExtractBlockDeviceName (line 634) | std::optional<std::string> ExtractBlockDeviceName(const std::string&...
function DmNameFilter (line 708) | static int DmNameFilter(const dirent* de) {
type utsname (line 768) | struct utsname
type dm_ioctl (line 788) | struct dm_ioctl
type dm_target_msg (line 788) | struct dm_target_msg
type dm_ioctl (line 792) | struct dm_ioctl
type dm_ioctl (line 792) | struct dm_ioctl
type dm_ioctl (line 795) | struct dm_ioctl
type dm_target_msg (line 796) | struct dm_target_msg
type dm_target_msg (line 797) | struct dm_target_msg
type dm_ioctl (line 797) | struct dm_ioctl
FILE: fs_mgr/libdm/dm_table.cpp
type android (line 22) | namespace android {
type dm (line 23) | namespace dm {
FILE: fs_mgr/libdm/dm_target.cpp
type android (line 30) | namespace android {
type dm (line 31) | namespace dm {
type dm_target_spec (line 47) | struct dm_target_spec
type dm_target_spec (line 47) | struct dm_target_spec
FILE: fs_mgr/libdm/dm_test.cpp
class DmTest (line 51) | class DmTest : public ::testing::Test {
method SetUp (line 53) | void SetUp() override {
method TearDown (line 61) | void TearDown() override {
function TEST_F (line 74) | TEST_F(DmTest, HasMinimumTargets) {
function TEST_F (line 81) | TEST_F(DmTest, DmLinear) {
function TEST_F (line 157) | TEST_F(DmTest, DmSuspendResume) {
function TEST_F (line 186) | TEST_F(DmTest, StripeArgs) {
function TEST_F (line 193) | TEST_F(DmTest, DmVerityArgsAvb2) {
function TEST_F (line 215) | TEST_F(DmTest, DmSnapshotArgs) {
function TEST_F (line 237) | TEST_F(DmTest, DmSnapshotOriginArgs) {
class SnapshotTestHarness (line 243) | class SnapshotTestHarness final {
method origin_dev (line 248) | std::string origin_dev() const { return origin_dev_->path(); }
method snapshot_dev (line 249) | std::string snapshot_dev() const { return snapshot_dev_->path(); }
method base_fd (line 251) | int base_fd() const { return base_fd_; }
function CheckSnapshotAvailability (line 348) | bool CheckSnapshotAvailability() {
function TEST_F (line 367) | TEST_F(DmTest, DmSnapshot) {
function TEST_F (line 411) | TEST_F(DmTest, DmSnapshotOverflow) {
function TEST_F (line 458) | TEST_F(DmTest, ParseStatusText) {
function TEST_F (line 485) | TEST_F(DmTest, DmSnapshotMergePercent) {
function TEST_F (line 539) | TEST_F(DmTest, CryptArgs) {
function TEST_F (line 555) | TEST_F(DmTest, DefaultKeyArgs) {
function TEST_F (line 566) | TEST_F(DmTest, DefaultKeyLegacyArgs) {
function TEST_F (line 574) | TEST_F(DmTest, DeleteDeviceWithTimeout) {
function TEST_F (line 607) | TEST_F(DmTest, IsDmBlockDevice) {
function TEST_F (line 626) | TEST_F(DmTest, GetDmDeviceNameByPath) {
function TEST_F (line 647) | TEST_F(DmTest, GetParentBlockDeviceByPath) {
function TEST_F (line 667) | TEST_F(DmTest, DeleteDeviceDeferredNoReferences) {
function TEST_F (line 693) | TEST_F(DmTest, DeleteDeviceDeferredWaitsForLastReference) {
function TEST_F (line 728) | TEST_F(DmTest, CreateEmptyDevice) {
function TEST_F (line 738) | TEST_F(DmTest, UeventAfterLoadTable) {
function TEST_F (line 766) | TEST_F(DmTest, GetNameAndUuid) {
function TEST_F (line 779) | TEST_F(DmTest, ThinProvisioning) {
function TEST_F (line 818) | TEST_F(DmTest, RedactDmCrypt) {
FILE: fs_mgr/libdm/include/libdm/dm.h
function namespace (line 49) | namespace dm {
FILE: fs_mgr/libdm/include/libdm/dm_table.h
function namespace (line 28) | namespace android {
FILE: fs_mgr/libdm/include/libdm/dm_target.h
function namespace (line 26) | namespace android {
function SnapshotStorageMode (line 207) | enum class SnapshotStorageMode {
function AllowEncryptOverride (line 282) | void AllowEncryptOverride() { allow_encrypt_override_ = true; }
function SetIvLargeSectors (line 283) | void SetIvLargeSectors() { iv_large_sectors_ = true; }
function SetSectorSize (line 284) | void SetSectorSize(uint32_t sector_size) { sector_size_ = sector_size; }
function SetUseLegacyOptionsFormat (line 315) | void SetUseLegacyOptionsFormat() { use_legacy_options_format_ = true; }
function SetSetDun (line 316) | void SetSetDun() { set_dun_ = true; }
function SetWrappedKeyV0 (line 317) | void SetWrappedKeyV0() { is_hw_wrapped_ = true; }
FILE: fs_mgr/libdm/include/libdm/loop_control.h
function namespace (line 25) | namespace android {
FILE: fs_mgr/libdm/loop_control.cpp
type android (line 32) | namespace android {
type dm (line 33) | namespace dm {
type loop_info64 (line 137) | struct loop_info64
FILE: fs_mgr/libdm/loop_control_test.cpp
function unique_fd (line 35) | static unique_fd TempFile() {
function TEST (line 52) | TEST(libdm, LoopControl) {
FILE: fs_mgr/libdm/test_util.cpp
type android (line 26) | namespace android {
type dm (line 27) | namespace dm {
function unique_fd (line 33) | unique_fd CreateTempFile(const std::string& name, size_t size) {
FILE: fs_mgr/libdm/test_util.h
function namespace (line 29) | namespace android {
FILE: fs_mgr/libdm/utility.cpp
type android (line 26) | namespace android {
type dm (line 27) | namespace dm {
function WaitForCondition (line 29) | bool WaitForCondition(const std::function<WaitResult()>& condition,
function WaitForFile (line 45) | bool WaitForFile(const std::string& path, const std::chrono::millise...
function WaitForFileDeleted (line 61) | bool WaitForFileDeleted(const std::string& path, const std::chrono::...
FILE: fs_mgr/libdm/utility.h
function namespace (line 20) | namespace android {
FILE: fs_mgr/libfiemap/binder.cpp
type android (line 26) | namespace android {
type fiemap (line 27) | namespace fiemap {
class ProgressCallback (line 32) | class ProgressCallback final : public BnProgressCallback {
method ProgressCallback (line 34) | ProgressCallback(std::function<bool(uint64_t, uint64_t)>&& callback)
method onProgress (line 38) | android::binder::Status onProgress(int64_t current, int64_t total) {
class ImageManagerBinder (line 50) | class ImageManagerBinder final : public IImageManager {
function FiemapStatus (line 79) | static FiemapStatus ToFiemapStatus(const char* func, const binder::S...
function FiemapStatus (line 95) | FiemapStatus ImageManagerBinder::CreateBackingImage(
function FiemapStatus (line 184) | FiemapStatus ImageManagerBinder::ZeroFillNewImage(const std::string&...
FILE: fs_mgr/libfiemap/fiemap_status.cpp
type android::fiemap (line 19) | namespace android::fiemap {
FILE: fs_mgr/libfiemap/fiemap_writer.cpp
type android (line 43) | namespace android {
type fiemap (line 44) | namespace fiemap {
function cleanup (line 60) | static inline void cleanup(const std::string& file_path, bool create...
function ValidateDmTarget (line 67) | static bool ValidateDmTarget(const DeviceMapper::TargetInfo& target) {
function DeviceMapperStackPop (line 92) | static bool DeviceMapperStackPop(const std::string& bdev, std::strin...
type stat (line 173) | struct stat
function GetBlockDeviceSize (line 215) | static bool GetBlockDeviceSize(int bdev_fd, const std::string& bdev_...
function GetFileSize (line 227) | static uint64_t GetFileSize(const std::string& file_path) {
function PerformFileChecks (line 237) | static bool PerformFileChecks(const std::string& file_path, uint64_t...
function FiemapStatus (line 266) | static FiemapStatus FallocateFallback(int file_fd, uint64_t block_si...
function IsFilePinned (line 319) | static bool IsFilePinned(int file_fd, const std::string& file_path, ...
function PinFile (line 359) | static bool PinFile(int file_fd, const std::string& file_path, uint3...
function FiemapStatus (line 386) | static FiemapStatus WriteZeroes(int file_fd, const std::string& file...
function FiemapStatus (line 433) | static FiemapStatus AllocateFile(int file_fd, const std::string& fil...
type statfs64 (line 519) | struct statfs64
function IsValidExtent (line 527) | static bool IsValidExtent(const fiemap_extent* extent, std::string_v...
function IsLastExtent (line 536) | static bool IsLastExtent(const fiemap_extent* extent) {
function FiemapToExtents (line 540) | static bool FiemapToExtents(struct fiemap* fiemap, std::vector<struc...
function ReadFiemap (line 590) | static bool ReadFiemap(int file_fd, const std::string& file_path,
function ReadFibmap (line 613) | static bool ReadFibmap(int file_fd, const std::string& file_path,
function FiemapUniquePtr (line 665) | FiemapUniquePtr FiemapWriter::Open(const std::string& file_path, uin...
function FiemapStatus (line 674) | FiemapStatus FiemapWriter::Open(const std::string& file_path, uint64...
FILE: fs_mgr/libfiemap/fiemap_writer_test.cpp
type android (line 48) | namespace android {
type fiemap (line 49) | namespace fiemap {
class FiemapWriterTest (line 62) | class FiemapWriterTest : public ::testing::Test {
method SetUp (line 64) | void SetUp() override {
method TearDown (line 69) | void TearDown() override {
class SplitFiemapTest (line 79) | class SplitFiemapTest : public ::testing::Test {
method SetUp (line 81) | void SetUp() override {
method TearDown (line 86) | void TearDown() override {
function TEST_F (line 97) | TEST_F(FiemapWriterTest, CreateImpossiblyLargeFile) {
function TEST_F (line 107) | TEST_F(FiemapWriterTest, CreateUnalignedFile) {
function TEST_F (line 115) | TEST_F(FiemapWriterTest, CheckFilePath) {
function TEST_F (line 123) | TEST_F(FiemapWriterTest, CheckFileSize) {
function TEST_F (line 133) | TEST_F(FiemapWriterTest, CheckProgress) {
function TEST_F (line 153) | TEST_F(FiemapWriterTest, CheckPinning) {
function TEST_F (line 159) | TEST_F(FiemapWriterTest, CheckBlockDevicePath) {
function TEST_F (line 169) | TEST_F(FiemapWriterTest, CheckFileCreated) {
function TEST_F (line 176) | TEST_F(FiemapWriterTest, CheckFileSizeActual) {
function TEST_F (line 185) | TEST_F(FiemapWriterTest, CheckFileExtents) {
function TEST_F (line 191) | TEST_F(FiemapWriterTest, ExistingFile) {
function TEST_F (line 202) | TEST_F(FiemapWriterTest, FileDeletedOnError) {
function TEST_F (line 210) | TEST_F(FiemapWriterTest, MaxBlockSize) {
function TEST_F (line 216) | TEST_F(FiemapWriterTest, FibmapBlockAddressing) {
function TEST_F (line 271) | TEST_F(FiemapWriterTest, CheckEmptyFile) {
function TEST_F (line 278) | TEST_F(SplitFiemapTest, Create) {
function TEST_F (line 296) | TEST_F(SplitFiemapTest, Open) {
function TEST_F (line 309) | TEST_F(SplitFiemapTest, DeleteOnFail) {
function TEST_F (line 320) | TEST_F(SplitFiemapTest, CorruptSplit) {
function string (line 341) | static string ReadSplitFiles(const std::string& base_path, size_t nu...
function TEST_F (line 354) | TEST_F(SplitFiemapTest, WriteWholeFile) {
function TEST_F (line 372) | TEST_F(SplitFiemapTest, WriteFileInChunks1) {
function TEST_F (line 399) | TEST_F(SplitFiemapTest, WriteFileInChunks2) {
function TEST_F (line 426) | TEST_F(SplitFiemapTest, WritePastEnd) {
function GetBigFileLimit (line 441) | std::pair<uint64_t, uint64_t> GetBigFileLimit(const std::string& mou...
class FsTest (line 456) | class FsTest : public ::testing::Test {
method SetUp (line 462) | void SetUp() {
method SetUpExt4 (line 481) | void SetUpExt4() {
method SetUpF2fs (line 505) | void SetUpF2fs() {
method TearDown (line 530) | void TearDown() override {
function TEST_F (line 541) | TEST_F(FsTest, LowSpaceError) {
function DetermineBlockSize (line 558) | bool DetermineBlockSize() {
function main (line 578) | int main(int argc, char** argv) {
FILE: fs_mgr/libfiemap/image_manager.cpp
type android (line 36) | namespace android {
type fiemap (line 37) | namespace fiemap {
function GetStatusPropertyName (line 105) | static std::string GetStatusPropertyName(const std::string& image_na...
function FiemapStatus (line 162) | FiemapStatus ImageManager::CreateBackingImage(
function FiemapStatus (line 218) | FiemapStatus ImageManager::ZeroFillNewImage(const std::string& name,...
function CreateLoopDevice (line 333) | static bool CreateLoopDevice(LoopControl& control, const std::string...
class AutoDetachLoopDevices (line 349) | class AutoDetachLoopDevices final {
method AutoDetachLoopDevices (line 351) | AutoDetachLoopDevices(LoopControl& control, const std::vector<std:...
method Commit (line 361) | void Commit() { commit_ = true; }
function OptimizeLoopDevices (line 443) | static bool OptimizeLoopDevices(const std::vector<std::string>& devi...
function CompareExtent (line 772) | static bool CompareExtent(android::fs_mgr::Extent* a, android::fs_mg...
function CompareExtents (line 785) | static bool CompareExtents(android::fs_mgr::Partition* oldp, android...
FILE: fs_mgr/libfiemap/image_test.cpp
class TestPartitionOpener (line 58) | class TestPartitionOpener final : public PartitionOpener {
method Open (line 60) | android::base::unique_fd Open(const std::string& partition_name, int f...
method GetInfo (line 63) | bool GetInfo(const std::string& partition_name, BlockDeviceInfo* info)...
method GetDeviceString (line 66) | std::string GetDeviceString(const std::string& partition_name) const o...
method GetPathForBlockDeviceName (line 71) | static std::string GetPathForBlockDeviceName(const std::string& name) {
class NativeTest (line 80) | class NativeTest : public ::testing::Test {
method SetUp (line 82) | void SetUp() override {
method TearDown (line 92) | void TearDown() override {
method PropertyName (line 97) | std::string PropertyName() { return "gsid.mapped_image." + base_name_; }
function TEST_F (line 103) | TEST_F(NativeTest, CreateAndMap) {
function TEST_F (line 122) | TEST_F(NativeTest, DisableImage) {
function TEST_F (line 131) | TEST_F(NativeTest, GetMappedImageDevice) {
type IsSubdirTestParam (line 144) | struct IsSubdirTestParam {
class IsSubdirTest (line 150) | class IsSubdirTest : public ::testing::TestWithParam<IsSubdirTestParam> {}
function TEST_P (line 152) | TEST_P(IsSubdirTest, Test) {
function IsSubdirTestValues (line 159) | std::vector<IsSubdirTestParam> IsSubdirTestValues() {
class VfatTest (line 188) | class VfatTest : public ::testing::Test {
method SetUp (line 194) | void SetUp() override {
method TearDown (line 240) | void TearDown() override {
function TEST_F (line 280) | TEST_F(VfatTest, DeviceIsRequestedSize) {
function Mkdir (line 300) | bool Mkdir(const std::string& path) {
function main (line 308) | int main(int argc, char** argv) {
FILE: fs_mgr/libfiemap/include/libfiemap/fiemap_status.h
function namespace (line 24) | namespace android::fiemap {
FILE: fs_mgr/libfiemap/include/libfiemap/fiemap_writer.h
function namespace (line 32) | namespace android {
FILE: fs_mgr/libfiemap/include/libfiemap/image_manager.h
function namespace (line 32) | namespace android {
FILE: fs_mgr/libfiemap/include/libfiemap/split_fiemap_writer.h
function namespace (line 31) | namespace android {
FILE: fs_mgr/libfiemap/metadata.cpp
type android (line 29) | namespace android {
type fiemap (line 30) | namespace fiemap {
function GetMetadataFile (line 37) | std::string GetMetadataFile(const std::string& metadata_dir) {
function MetadataExists (line 41) | bool MetadataExists(const std::string& metadata_dir) {
function OpenMetadata (line 52) | std::unique_ptr<LpMetadata> OpenMetadata(const std::string& metadata...
function OpenOrCreateMetadata (line 63) | std::unique_ptr<MetadataBuilder> OpenOrCreateMetadata(const std::str...
function SaveMetadata (line 101) | bool SaveMetadata(MetadataBuilder* builder, const std::string& metad...
function RemoveAllMetadata (line 122) | bool RemoveAllMetadata(const std::string& dir) {
function FillPartitionExtents (line 132) | bool FillPartitionExtents(MetadataBuilder* builder, Partition* parti...
function RemoveImageMetadata (line 167) | bool RemoveImageMetadata(const std::string& metadata_dir, const std:...
function UpdateMetadata (line 185) | bool UpdateMetadata(const std::string& metadata_dir, const std::stri...
function AddAttributes (line 209) | bool AddAttributes(const std::string& metadata_dir, const std::strin...
FILE: fs_mgr/libfiemap/metadata.h
function namespace (line 26) | namespace android {
FILE: fs_mgr/libfiemap/passthrough.cpp
type android (line 19) | namespace android {
type fiemap (line 20) | namespace fiemap {
FILE: fs_mgr/libfiemap/split_fiemap_writer.cpp
type android (line 37) | namespace android {
type fiemap (line 38) | namespace fiemap {
function FiemapStatus (line 55) | FiemapStatus SplitFiemap::Create(const std::string& file_path, uint6...
type fiemap_extent (line 218) | struct fiemap_extent
FILE: fs_mgr/libfiemap/utility.cpp
type android (line 32) | namespace android {
type fiemap (line 33) | namespace fiemap {
function FiemapStatus (line 40) | FiemapStatus DetermineMaximumFileSize(const std::string& file_path, ...
function GetDevicePathForFile (line 79) | std::string GetDevicePathForFile(SplitFiemap* file) {
function JoinPaths (line 92) | std::string JoinPaths(const std::string& dir, const std::string& fil...
function F2fsPinBeforeAllocate (line 99) | bool F2fsPinBeforeAllocate(int file_fd, bool* supported) {
function BlockDeviceToName (line 126) | bool BlockDeviceToName(uint32_t major, uint32_t minor, std::string* ...
function FilesystemHasReliablePinning (line 151) | bool FilesystemHasReliablePinning(const std::string& file, bool* sup...
function IsSubdir (line 170) | bool IsSubdir(const std::string& child, const std::string& parent) {
FILE: fs_mgr/libfiemap/utility.h
function namespace (line 25) | namespace android {
FILE: fs_mgr/libfs_avb/avb_ops.cpp
type android (line 49) | namespace android {
type fs_mgr (line 50) | namespace fs_mgr {
function AvbIOResult (line 52) | static AvbIOResult read_from_partition(AvbOps* ops, const char* part...
function DeriveMountPoint (line 112) | static std::string DeriveMountPoint(const std::string& partition_name,
function AvbIOResult (line 191) | AvbIOResult FsManagerAvbOps::GetSizeOfPartition(const char* partition,
function AvbIOResult (line 210) | AvbIOResult FsManagerAvbOps::ReadFromPartition(const char* partition...
function AvbSlotVerifyResult (line 255) | AvbSlotVerifyResult FsManagerAvbOps::AvbSlotVerify(const std::string...
FILE: fs_mgr/libfs_avb/avb_ops.h
function namespace (line 34) | namespace android {
FILE: fs_mgr/libfs_avb/avb_util.cpp
type android (line 36) | namespace android {
type fs_mgr (line 37) | namespace fs_mgr {
function ConstructVerityTable (line 42) | bool ConstructVerityTable(const FsAvbHashtreeDescriptor& hashtree_desc,
function HashtreeDmVeritySetup (line 92) | bool HashtreeDmVeritySetup(FstabEntry* fstab_entry, const FsAvbHasht...
function GetHashtreeDescriptor (line 120) | std::unique_ptr<FsAvbHashtreeDescriptor> GetHashtreeDescriptor(
function LoadAvbHashtreeToEnableVerity (line 179) | bool LoadAvbHashtreeToEnableVerity(FstabEntry* fstab_entry, bool wai...
function AvbPartitionToDevicePatition (line 210) | std::string AvbPartitionToDevicePatition(const std::string& avb_part...
function DeriveAvbPartitionName (line 233) | std::string DeriveAvbPartitionName(const FstabEntry& fstab_entry, co...
function off64_t (line 258) | off64_t GetTotalSize(int fd) {
function GetAvbFooter (line 280) | std::unique_ptr<AvbFooter> GetAvbFooter(int fd) {
function ValidatePublicKeyBlob (line 301) | bool ValidatePublicKeyBlob(const uint8_t* key, size_t length,
function ValidatePublicKeyBlob (line 315) | bool ValidatePublicKeyBlob(const std::string& key_blob_to_validate,
function VBMetaVerifyResult (line 330) | VBMetaVerifyResult VerifyVBMetaSignature(const VBMetaData& vbmeta,
function VerifyVBMetaData (line 382) | std::unique_ptr<VBMetaData> VerifyVBMetaData(int fd, const std::stri...
function RollbackDetected (line 432) | bool RollbackDetected(const std::string& partition_name ATTRIBUTE_UN...
function GetChainPartitionInfo (line 438) | std::vector<ChainInfo> GetChainPartitionInfo(const VBMetaData& vbmet...
function LoadAndVerifyVbmetaByPath (line 480) | std::unique_ptr<VBMetaData> LoadAndVerifyVbmetaByPath(
function VBMetaVerifyResult (line 549) | VBMetaVerifyResult LoadAndVerifyVbmetaByPartition(
FILE: fs_mgr/libfs_avb/avb_util.h
function namespace (line 29) | namespace android {
FILE: fs_mgr/libfs_avb/fs_avb.cpp
type android (line 51) | namespace android {
type fs_mgr (line 52) | namespace fs_mgr {
function VerifyVbmetaDigest (line 55) | std::pair<size_t, bool> VerifyVbmetaDigest(const std::vector<VBMetaD...
function CalculateVbmetaDigest (line 70) | std::pair<std::string, size_t> CalculateVbmetaDigest(const std::vect...
class AvbVerifier (line 92) | class AvbVerifier {
method AvbVerifier (line 99) | AvbVerifier() = default;
function AvbUniquePtr (line 191) | AvbUniquePtr AvbHandle::LoadAndVerifyVbmeta(
function IsAvbPermissive (line 280) | static bool IsAvbPermissive() {
function IsPublicKeyMatching (line 292) | bool IsPublicKeyMatching(const FstabEntry& fstab_entry, const std::s...
function IsHashtreeDescriptorRootDigestMatching (line 332) | bool IsHashtreeDescriptorRootDigestMatching(const FstabEntry& fstab_...
function AvbUniquePtr (line 366) | AvbUniquePtr AvbHandle::LoadAndVerifyVbmeta(const FstabEntry& fstab_...
function AvbUniquePtr (line 437) | AvbUniquePtr AvbHandle::LoadAndVerifyVbmeta(const std::string& slot_...
function AvbUniquePtr (line 454) | AvbUniquePtr AvbHandle::Open() {
function AvbHashtreeResult (line 539) | AvbHashtreeResult AvbHandle::SetUpStandaloneAvbHashtree(FstabEntry* ...
function AvbHashtreeResult (line 549) | AvbHashtreeResult AvbHandle::SetUpAvbHashtree(FstabEntry* fstab_entr...
FILE: fs_mgr/libfs_avb/fs_avb_util.cpp
type android (line 32) | namespace android {
type fs_mgr (line 33) | namespace fs_mgr {
function LoadAndVerifyVbmeta (line 36) | std::unique_ptr<VBMetaData> LoadAndVerifyVbmeta(const FstabEntry& fs...
function GetHashtreeDescriptor (line 69) | std::unique_ptr<FsAvbHashtreeDescriptor> GetHashtreeDescriptor(
function GetHashDescriptor (line 78) | std::unique_ptr<FsAvbHashDescriptor> GetHashDescriptor(
function GetHashDescriptor (line 137) | std::unique_ptr<FsAvbHashDescriptor> GetHashDescriptor(const std::st...
function GetAvbPropertyDescriptor (line 146) | std::string GetAvbPropertyDescriptor(const std::string& key,
FILE: fs_mgr/libfs_avb/include/fs_avb/fs_avb.h
function namespace (line 28) | namespace android {
FILE: fs_mgr/libfs_avb/include/fs_avb/fs_avb_util.h
function namespace (line 25) | namespace android {
FILE: fs_mgr/libfs_avb/include/fs_avb/types.h
type class (line 28) | enum class
function AvbHashtreeResult (line 36) | enum class AvbHashtreeResult {
FILE: fs_mgr/libfs_avb/sha.h
function namespace (line 21) | namespace android {
FILE: fs_mgr/libfs_avb/tests/avb_util_test.cpp
type fs_avb_host_test (line 46) | namespace fs_avb_host_test {
class AvbUtilTest (line 48) | class AvbUtilTest : public BaseFsAvbTest {
method AvbUtilTest (line 50) | AvbUtilTest(){}
function TEST_F (line 92) | TEST_F(AvbUtilTest, AvbPartitionToDevicePatition) {
function TEST_F (line 103) | TEST_F(AvbUtilTest, DeriveAvbPartitionName) {
function TEST_F (line 160) | TEST_F(AvbUtilTest, GetFdTotalSize) {
function TEST_F (line 175) | TEST_F(AvbUtilTest, GetFdTotalSizeWithOffset) {
function TEST_F (line 188) | TEST_F(AvbUtilTest, GetAvbFooter) {
function TEST_F (line 254) | TEST_F(AvbUtilTest, GetAvbFooterErrorVerification) {
function TEST_F (line 265) | TEST_F(AvbUtilTest, GetAvbFooterInsufficientSize) {
function TEST_F (line 276) | TEST_F(AvbUtilTest, GetAvbPropertyDescriptor_Basic) {
function TEST_F (line 295) | TEST_F(AvbUtilTest, GetAvbPropertyDescriptor_SecurityPatchLevel) {
function TEST_F (line 337) | TEST_F(AvbUtilTest, GetVBMetaHeader) {
function TEST_F (line 424) | TEST_F(AvbUtilTest, ValidatePublicKeyBlob) {
function TEST_F (line 442) | TEST_F(AvbUtilTest, VerifyEmptyPublicKeyBlob) {
function TEST_F (line 454) | TEST_F(AvbUtilTest, ValidatePublicKeyBlob_MultipleAllowedKeys) {
function TEST_F (line 484) | TEST_F(AvbUtilTest, VerifyVBMetaSignature) {
function TEST_F (line 504) | TEST_F(AvbUtilTest, VerifyVBMetaSignatureOutputPublicKeyData) {
function TEST_F (line 545) | TEST_F(AvbUtilTest, VerifyVBMetaSignatureWithModification) {
function TEST_F (line 574) | TEST_F(AvbUtilTest, VerifyVBMetaSignatureNotSigned) {
function TEST_F (line 586) | TEST_F(AvbUtilTest, VerifyVBMetaSignatureInvalidVBMeta) {
function TEST_F (line 629) | TEST_F(AvbUtilTest, VerifyVBMetaDataWithoutFooter) {
function TEST_F (line 685) | TEST_F(AvbUtilTest, VerifyVBMetaDataWithFooter) {
function TEST_F (line 745) | TEST_F(AvbUtilTest, VerifyVBMetaDataError) {
function TEST_F (line 821) | TEST_F(AvbUtilTest, GetChainPartitionInfo) {
function TEST_F (line 931) | TEST_F(AvbUtilTest, GetChainPartitionInfoNone) {
function TEST_F (line 1002) | TEST_F(AvbUtilTest, LoadAndVerifyVbmetaByPath) {
function TEST_F (line 1036) | TEST_F(AvbUtilTest, LoadAndVerifyVbmetaByPathErrorVerification) {
function TEST_F (line 1111) | TEST_F(AvbUtilTest, LoadAndVerifyVbmetaByPathUnexpectedPublicKey) {
function TEST_F (line 1169) | TEST_F(AvbUtilTest, LoadAndVerifyVbmetaByPathVerificationDisabled) {
function TEST_F (line 1216) | TEST_F(AvbUtilTest, LoadAndVerifyVbmetaByPartition) {
function TEST_F (line 1293) | TEST_F(AvbUtilTest, LoadAndVerifyVbmetaByPartitionWithSuffixes) {
function TEST_F (line 1381) | TEST_F(AvbUtilTest, LoadAndVerifyVbmetaByPartitionErrorVerification) {
function TEST_F (line 1498) | TEST_F(AvbUtilTest, LoadAndVerifyVbmetaByPartitionVerificationDisabled) {
function TEST_F (line 1591) | TEST_F(AvbUtilTest, LoadAndVerifyVbmetaByPartitionUnexpectedPublicKey) {
FILE: fs_mgr/libfs_avb/tests/basic_test.cpp
type fs_avb_host_test (line 24) | namespace fs_avb_host_test {
function TEST_F (line 26) | TEST_F(BaseFsAvbTest, GenerateImage) {
function TEST_F (line 49) | TEST_F(BaseFsAvbTest, GenerateVBMetaImage) {
function TEST_F (line 72) | TEST_F(BaseFsAvbTest, AddHashFooter) {
function TEST_F (line 111) | TEST_F(BaseFsAvbTest, AddHashtreeFooter) {
function TEST_F (line 157) | TEST_F(BaseFsAvbTest, GenerateVBMetaImageWithDescriptors) {
function TEST_F (line 221) | TEST_F(BaseFsAvbTest, GenerateVBMetaImageWithChainDescriptors) {
function main (line 281) | int main(int argc, char** argv) {
FILE: fs_mgr/libfs_avb/tests/fs_avb_device_test.cpp
type fs_avb_device_test (line 33) | namespace fs_avb_device_test {
function TEST (line 37) | TEST(FsAvbUtilTest, DISABLED_LoadAndVerifyVbmeta_SystemVbmeta) {
function TEST (line 57) | TEST(FsAvbUtilTest, GetHashtreeDescriptor_SystemOther) {
function TEST (line 96) | TEST(AvbHandleTest, LoadAndVerifyVbmeta_SystemOther) {
function TEST (line 125) | TEST(AvbHandleTest, GetSecurityPatchLevel) {
FILE: fs_mgr/libfs_avb/tests/fs_avb_test.cpp
type fs_avb_host_test (line 33) | namespace fs_avb_host_test {
class PublicFsAvbTest (line 35) | class PublicFsAvbTest : public BaseFsAvbTest {
method PublicFsAvbTest (line 37) | PublicFsAvbTest(){}
function TEST_F (line 63) | TEST_F(PublicFsAvbTest, LoadAndVerifyVbmeta) {
function TEST_F (line 134) | TEST_F(PublicFsAvbTest, LoadAndVerifyVbmetaWithModifications) {
function TEST_F (line 239) | TEST_F(PublicFsAvbTest, LoadAndVerifyVbmetaWithPublicKeys) {
FILE: fs_mgr/libfs_avb/tests/fs_avb_test_util.cpp
type fs_avb_host_test (line 26) | namespace fs_avb_host_test {
function VBMetaData (line 187) | VBMetaData BaseFsAvbTest::GenerateImageAndExtractVBMetaData(
function VBMetaData (line 209) | VBMetaData BaseFsAvbTest::LoadVBMetaData(const std::string& file_name) {
function VBMetaData (line 224) | VBMetaData BaseFsAvbTest::ExtractAndLoadVBMetaData(const base::FilePat...
FILE: fs_mgr/libfs_avb/tests/fs_avb_test_util.h
function namespace (line 47) | namespace fs_avb_host_test {
FILE: fs_mgr/libfs_avb/tests/fs_avb_util_test.cpp
type fs_avb_host_test (line 21) | namespace fs_avb_host_test {
class PublicFsAvbUtilTest (line 23) | class PublicFsAvbUtilTest : public BaseFsAvbTest {
method PublicFsAvbUtilTest (line 25) | PublicFsAvbUtilTest(){}
function TEST_F (line 31) | TEST_F(PublicFsAvbUtilTest, GetHashtreeDescriptor) {
function TEST_F (line 105) | TEST_F(PublicFsAvbUtilTest, GetHashtreeDescriptor_NotFound) {
FILE: fs_mgr/libfs_avb/tests/util_test.cpp
type fs_avb_host_test (line 38) | namespace fs_avb_host_test {
function TEST (line 40) | TEST(BasicUtilTest, NibbleValue09) {
function TEST (line 65) | TEST(BasicUtilTest, NibbleValueAF) {
function TEST (line 95) | TEST(BasicUtilTest, NibbleValueInvalid) {
function TEST (line 106) | TEST(BasicUtilTest, HexToBytes) {
function TEST (line 116) | TEST(BasicUtilTest, HexToBytes2) {
function TEST (line 126) | TEST(BasicUtilTest, BytesToHex) {
function TEST (line 139) | TEST(BasicUtilTest, HexToBytesInValidOddLenHex) {
function TEST (line 146) | TEST(BasicUtilTest, HexToBytesInsufficientByteLen) {
function TEST (line 153) | TEST(BasicUtilTest, WaitForFile) {
function TEST (line 169) | TEST(BasicUtilTest, WaitForFileNonExist) {
function TEST (line 174) | TEST(BasicUtilTest, WaitForFileDeferCreation) {
function TEST (line 195) | TEST(BasicUtilTest, WaitForFileDeferCreationFailure) {
function TEST (line 216) | TEST(BasicUtilTest, ListFiles) {
function TEST (line 247) | TEST(BasicUtilTest, ListFilesShouldDiscardSymlink) {
function TEST (line 279) | TEST(BasicUtilTest, ListFilesOpenDirFailure) {
function TEST (line 293) | TEST(BasicUtilTest, ListFilesEmptyDir) {
FILE: fs_mgr/libfs_avb/types.cpp
type android (line 19) | namespace android {
type fs_mgr (line 20) | namespace fs_mgr {
FILE: fs_mgr/libfs_avb/util.cpp
type android (line 30) | namespace android {
type fs_mgr (line 31) | namespace fs_mgr {
function NibbleValue (line 33) | bool NibbleValue(const char& c, uint8_t* value) {
function HexToBytes (line 53) | bool HexToBytes(uint8_t* bytes, size_t bytes_len, const std::string&...
function BytesToHex (line 76) | std::string BytesToHex(const uint8_t* bytes, size_t bytes_len) {
function WaitForFile (line 90) | bool WaitForFile(const std::string& filename, const std::chrono::mil...
function IsDeviceUnlocked (line 110) | bool IsDeviceUnlocked() {
function SetBlockDeviceReadOnly (line 119) | bool SetBlockDeviceReadOnly(const std::string& blockdev) {
function ListFiles (line 129) | Result<std::vector<std::string>> ListFiles(const std::string& dir) {
FILE: fs_mgr/libfs_avb/util.h
function namespace (line 46) | namespace android {
FILE: fs_mgr/libfstab/boot_config.cpp
type android (line 28) | namespace android {
type fs_mgr (line 29) | namespace fs_mgr {
function ImportBootconfigFromString (line 52) | void ImportBootconfigFromString(const std::string& bootconfig,
function GetBootconfigFromString (line 87) | bool GetBootconfigFromString(const std::string& bootconfig, const st...
function ImportBootconfig (line 99) | void ImportBootconfig(const std::function<void(std::string, std::str...
function GetBootconfig (line 105) | bool GetBootconfig(const std::string& key, std::string* out) {
function ImportKernelCmdlineFromString (line 111) | void ImportKernelCmdlineFromString(const std::string& cmdline,
function GetKernelCmdlineFromString (line 143) | bool GetKernelCmdlineFromString(const std::string& cmdline, const st...
function ImportKernelCmdline (line 155) | void ImportKernelCmdline(const std::function<void(std::string, std::...
function GetKernelCmdline (line 161) | bool GetKernelCmdline(const std::string& key, std::string* out) {
function fs_mgr_get_boot_config (line 173) | bool fs_mgr_get_boot_config(const std::string& key, std::string* out_val) {
FILE: fs_mgr/libfstab/fstab.cpp
type android (line 50) | namespace android {
type fs_mgr (line 51) | namespace fs_mgr {
type FlagList (line 56) | struct FlagList {
function off64_t (line 82) | off64_t CalculateZramSize(int percentage) {
function ReadDtFile (line 96) | bool ReadDtFile(const std::string& file_name, std::string* dt_value) {
function ParseFileEncryption (line 108) | void ParseFileEncryption(const std::string& arg, FstabEntry* entry) {
function SetMountFlag (line 113) | bool SetMountFlag(const std::string& flag, FstabEntry* entry) {
function ParseMountFlags (line 123) | void ParseMountFlags(const std::string& flags, FstabEntry* entry) {
function ParseUserDevices (line 152) | void ParseUserDevices(const std::string& arg, FstabEntry* entry) {
function ParseFsMgrFlags (line 176) | bool ParseFsMgrFlags(const std::string& flags, FstabEntry* entry) {
function IsDtFstabCompatible (line 360) | bool IsDtFstabCompatible() {
function ReadFstabFromDt (line 375) | std::string ReadFstabFromDt() {
function ExtraBootDevices (line 469) | std::set<std::string> ExtraBootDevices(const Fstab& fstab) {
type FstabPtrEntry (line 504) | struct FstabPtrEntry {
function GetEntriesByPred (line 511) | std::vector<FstabPtrEntryType*> GetEntriesByPred(FstabPtr fstab, con...
function GetRecoveryFstabPath (line 529) | std::string GetRecoveryFstabPath() {
function GetFstabPath (line 551) | std::string GetFstabPath() {
function ParseFstabFromString (line 575) | bool ParseFstabFromString(const std::string& fstab_str, bool proc_mo...
function TransformFstabForDsu (line 630) | void TransformFstabForDsu(Fstab* fstab, const std::string& dsu_slot,
function EnableMandatoryFlags (line 712) | void EnableMandatoryFlags(Fstab* fstab) {
function ReadFstabFromFileCommon (line 735) | static bool ReadFstabFromFileCommon(const std::string& path, Fstab* ...
function ReadFstabFromFile (line 754) | bool ReadFstabFromFile(const std::string& path, Fstab* fstab) {
function ReadFstabFromProcMounts (line 781) | bool ReadFstabFromProcMounts(Fstab* fstab) {
function ReadFstabFromDt (line 788) | bool ReadFstabFromDt(Fstab* fstab, bool verbose) {
function SkipMountingPartitions (line 820) | bool SkipMountingPartitions(Fstab* fstab, bool verbose) {
function SkipMountWithConfig (line 836) | bool SkipMountWithConfig(const std::string& skip_mount_config, Fstab...
function ReadDefaultFstab (line 866) | bool ReadDefaultFstab(Fstab* fstab) {
function GetEntriesForMountPoint (line 882) | std::vector<FstabEntry*> GetEntriesForMountPoint(Fstab* fstab, const...
function FstabEntry (line 887) | FstabEntry* GetEntryForMountPoint(Fstab* fstab, const std::string_vi...
function GetEntriesForMountPoint (line 895) | std::vector<const FstabEntry*> GetEntriesForMountPoint(const Fstab* ...
function FstabEntry (line 901) | FstabEntry* GetEntryForMountPoint(Fstab* fstab, const std::string& p...
function FstabEntry (line 906) | const FstabEntry* GetEntryForMountPoint(const Fstab* fstab, const st...
function GetBootDevices (line 911) | std::set<std::string> GetBootDevices() {
function GetBootPartUuid (line 950) | std::string GetBootPartUuid() {
function GetVerityDeviceName (line 966) | std::string GetVerityDeviceName(const FstabEntry& entry) {
function InRecovery (line 980) | bool InRecovery() {
function is_dt_compatible (line 994) | bool is_dt_compatible() {
FILE: fs_mgr/libfstab/fstab_priv.h
function namespace (line 31) | namespace android {
FILE: fs_mgr/libfstab/fuzz/fs_mgr_fstab_fuzzer.cpp
function LLVMFuzzerTestOneInput (line 25) | int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
FILE: fs_mgr/libfstab/include/fstab/fstab.h
function namespace (line 30) | namespace android {
FILE: fs_mgr/libfstab/slotselect.cpp
function other_suffix (line 30) | static std::string other_suffix(const std::string& slot_suffix) {
function fs_mgr_get_other_slot_suffix (line 42) | std::string fs_mgr_get_other_slot_suffix() {
function fs_mgr_get_slot_suffix (line 48) | std::string fs_mgr_get_slot_suffix() {
function fs_mgr_update_for_slotselect (line 56) | bool fs_mgr_update_for_slotselect(Fstab* fstab) {
type android (line 78) | namespace android {
type fs_mgr (line 79) | namespace fs_mgr {
function OtherSlotSuffix (line 81) | std::string OtherSlotSuffix(const std::string& suffix) {
FILE: fs_mgr/liblp/builder.cpp
type android (line 31) | namespace android {
type fs_mgr (line 32) | namespace fs_mgr {
function Interval (line 85) | Interval LinearExtent::AsInterval() const {
function Partition (line 149) | Partition Partition::GetBeginningExtents(uint64_t aligned_size) const {
function VerifyDeviceProperties (line 360) | static bool VerifyDeviceProperties(const BlockDeviceInfo& device_inf...
function Partition (line 525) | Partition* MetadataBuilder::AddPartition(const std::string& name, ui...
function Partition (line 529) | Partition* MetadataBuilder::AddPartition(std::string_view name, std:...
function Partition (line 547) | Partition* MetadataBuilder::FindPartition(std::string_view name) con...
function PartitionGroup (line 556) | PartitionGroup* MetadataBuilder::FindGroup(std::string_view group_na...
function Interval (line 673) | Interval Interval::Intersect(const Interval& a, const Interval& b) {
function CompareBlockDevices (line 1130) | static bool CompareBlockDevices(const LpMetadataBlockDevice& first,
FILE: fs_mgr/liblp/builder_test.cpp
class Environment (line 37) | class Environment : public ::testing::Environment {
method SetUp (line 39) | void SetUp() override { ResetMockPropertyFetcher(); }
function main (line 42) | int main(int argc, char** argv) {
class BuilderTest (line 47) | class BuilderTest : public LiblpTest {}
function TEST_F (line 49) | TEST_F(BuilderTest, BuildBasic) {
function TEST_F (line 64) | TEST_F(BuilderTest, ResizePartition) {
function TEST_F (line 125) | TEST_F(BuilderTest, PartitionAlignment) {
function TEST_F (line 141) | TEST_F(BuilderTest, DiskAlignment) {
function TEST_F (line 151) | TEST_F(BuilderTest, MetadataAlignment) {
function TEST_F (line 160) | TEST_F(BuilderTest, InternalAlignment) {
function TEST_F (line 208) | TEST_F(BuilderTest, InternalPartitionAlignment) {
function TEST_F (line 243) | TEST_F(BuilderTest, UseAllDiskSpace) {
function TEST_F (line 269) | TEST_F(BuilderTest, BuildComplex) {
function TEST_F (line 303) | TEST_F(BuilderTest, AddInvalidPartition) {
function TEST_F (line 318) | TEST_F(BuilderTest, BuilderExport) {
function TEST_F (line 377) | TEST_F(BuilderTest, BuilderImport) {
function TEST_F (line 415) | TEST_F(BuilderTest, ExportNameTooLong) {
function TEST_F (line 426) | TEST_F(BuilderTest, MetadataTooLarge) {
function TEST_F (line 451) | TEST_F(BuilderTest, UpdateBlockDeviceInfo) {
function TEST_F (line 494) | TEST_F(BuilderTest, InvalidBlockSize) {
function TEST_F (line 500) | TEST_F(BuilderTest, AlignedExtentSize) {
function TEST_F (line 511) | TEST_F(BuilderTest, AlignedFreeSpace) {
function TEST_F (line 518) | TEST_F(BuilderTest, HasDefaultGroup) {
function TEST_F (line 526) | TEST_F(BuilderTest, GroupSizeLimits) {
function TEST_F (line 543) | TEST_F(BuilderTest, ListPartitionsInGroup) {
function TEST_F (line 566) | TEST_F(BuilderTest, ChangeGroups) {
function TEST_F (line 595) | TEST_F(BuilderTest, RemoveAndAddFirstPartition) {
function TEST_F (line 618) | TEST_F(BuilderTest, ListGroups) {
function TEST_F (line 628) | TEST_F(BuilderTest, RemoveGroupAndPartitions) {
function TEST_F (line 645) | TEST_F(BuilderTest, MultipleBlockDevices) {
function TEST_F (line 690) | TEST_F(BuilderTest, ImportPartitionsOk) {
function TEST_F (line 730) | TEST_F(BuilderTest, ImportPartitionsFail) {
function TEST_F (line 751) | TEST_F(BuilderTest, ABExtents) {
function TEST_F (line 789) | TEST_F(BuilderTest, PartialExtents) {
function TEST_F (line 815) | TEST_F(BuilderTest, UpdateSuper) {
type android (line 887) | namespace android {
type fs_mgr (line 888) | namespace fs_mgr {
function TEST_F (line 895) | TEST_F(BuilderTest, Interval) {
function TEST_F (line 920) | TEST_F(BuilderTest, ExpandedHeader) {
function Interval (line 939) | static Interval ToInterval(const std::unique_ptr<Extent>& extent) {
function AddPartition (line 946) | static void AddPartition(const std::unique_ptr<MetadataBuilder>& builder,
function TEST_F (line 968) | TEST_F(BuilderTest, CollidedExtents) {
function TEST_F (line 1004) | TEST_F(BuilderTest, LinearExtentOverlap) {
function TEST_F (line 1022) | TEST_F(BuilderTest, AlignFreeRegion) {
function TEST_F (line 1054) | TEST_F(BuilderTest, ResizeOverflow) {
function TEST_F (line 1068) | TEST_F(BuilderTest, VerifyExtent) {
FILE: fs_mgr/liblp/device_test.cpp
class DeviceTest (line 33) | class DeviceTest : public LiblpTest {
method SetUp (line 35) | void SetUp() override {
function TEST_F (line 45) | TEST_F(DeviceTest, BlockDeviceInfo) {
function TEST_F (line 56) | TEST_F(DeviceTest, ReadSuperPartitionCurrentSlot) {
function TEST_F (line 64) | TEST_F(DeviceTest, ReadSuperPartitionOtherSlot) {
FILE: fs_mgr/liblp/fuzzer/liblp_apis_fuzzer.cpp
class LiplpApisFuzzer (line 59) | class LiplpApisFuzzer {
method LiplpApisFuzzer (line 61) | LiplpApisFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}
function BlockDeviceInfo (line 86) | BlockDeviceInfo LiplpApisFuzzer::getBlockDevice() {
function LLVMFuzzerTestOneInput (line 238) | int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
FILE: fs_mgr/liblp/fuzzer/liblp_builder_fuzzer.cpp
class BuilderFuzzer (line 65) | class BuilderFuzzer {
method BuilderFuzzer (line 67) | BuilderFuzzer(const uint8_t* data, size_t size) : mFdp(data, size){}
method T (line 97) | T getParamValue(T validValue) {
function LLVMFuzzerTestOneInput (line 441) | int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
FILE: fs_mgr/liblp/fuzzer/liblp_super_layout_builder_fuzzer.cpp
class SuperLayoutBuilderFuzzer (line 50) | class SuperLayoutBuilderFuzzer {
method SuperLayoutBuilderFuzzer (line 52) | SuperLayoutBuilderFuzzer(const uint8_t* data, size_t size) : mFdp(data...
function LLVMFuzzerTestOneInput (line 145) | int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
FILE: fs_mgr/liblp/images.cpp
type android (line 28) | namespace android {
type fs_mgr (line 29) | namespace fs_mgr {
function IsEmptySuperImage (line 38) | static bool IsEmptySuperImage(borrowed_fd fd) {
function IsEmptySuperImage (line 61) | bool IsEmptySuperImage(const std::string& file) {
function ReadFromImageFile (line 70) | std::unique_ptr<LpMetadata> ReadFromImageFile(int fd) {
function ReadFromImageBlob (line 87) | std::unique_ptr<LpMetadata> ReadFromImageBlob(const void* data, size...
function ReadFromImageFile (line 104) | std::unique_ptr<LpMetadata> ReadFromImageFile(const std::string& ima...
function WriteToImageFile (line 113) | bool WriteToImageFile(borrowed_fd fd, const LpMetadata& input) {
function FsyncDirectory (line 127) | bool FsyncDirectory(const char* dirname) {
function WriteToImageFile (line 146) | bool WriteToImageFile(const std::string& file, const LpMetadata& inp...
function HasFillValue (line 337) | static inline bool HasFillValue(uint32_t* buffer, size_t count) {
function WriteToImageFile (line 514) | bool WriteToImageFile(const std::string& file, const LpMetadata& met...
function WriteSplitImageFiles (line 520) | bool WriteSplitImageFiles(const std::string& output_dir, const LpMet...
FILE: fs_mgr/liblp/images.h
function namespace (line 26) | namespace android {
FILE: fs_mgr/liblp/include/liblp/builder.h
function namespace (line 32) | namespace android {
FILE: fs_mgr/liblp/include/liblp/liblp.h
function namespace (line 32) | namespace android {
FILE: fs_mgr/liblp/include/liblp/metadata_format.h
type LpMetadataGeometry (line 116) | typedef struct LpMetadataGeometry {
type LpMetadataTableDescriptor (line 152) | typedef struct LpMetadataTableDescriptor {
type LpMetadataHeader (line 182) | typedef struct LpMetadataHeader {
type LpMetadataPartition (line 249) | typedef struct LpMetadataPartition {
type LpMetadataExtent (line 284) | typedef struct LpMetadataExtent {
type LpMetadataPartitionGroup (line 311) | typedef struct LpMetadataPartitionGroup {
type LpMetadataBlockDevice (line 332) | typedef struct LpMetadataBlockDevice {
type LpMetadataHeaderV1_0 (line 386) | typedef struct LpMetadataHeaderV1_0 {
type LpMetadataHeader (line 400) | typedef LpMetadataHeader LpMetadataHeaderV1_2;
FILE: fs_mgr/liblp/include/liblp/mock_property_fetcher.h
function namespace (line 23) | namespace android {
FILE: fs_mgr/liblp/include/liblp/partition_opener.h
function namespace (line 25) | namespace android {
FILE: fs_mgr/liblp/include/liblp/property_fetcher.h
function namespace (line 21) | namespace android {
FILE: fs_mgr/liblp/include/liblp/super_layout_builder.h
function namespace (line 29) | namespace android {
FILE: fs_mgr/liblp/io_test.cpp
function unique_fd (line 55) | static unique_fd CreateFakeDisk(off_t size) {
function unique_fd (line 81) | static unique_fd CreateFakeDisk() {
function CreateDefaultBuilder (line 86) | static unique_ptr<MetadataBuilder> CreateDefaultBuilder() {
class DefaultPartitionOpener (line 92) | class DefaultPartitionOpener final : public TestPartitionOpener {
method DefaultPartitionOpener (line 94) | explicit DefaultPartitionOpener(int fd)
function AddDefaultPartitions (line 98) | static bool AddDefaultPartitions(MetadataBuilder* builder) {
function unique_fd (line 107) | static unique_fd CreateFlashedDisk() {
function TEST_F (line 130) | TEST_F(LiblpTest, CreateFakeDisk) {
function TEST_F (line 146) | TEST_F(LiblpTest, ExportDiskTooSmall) {
function TEST_F (line 163) | TEST_F(LiblpTest, FlashAndReadback) {
function TEST_F (line 213) | TEST_F(LiblpTest, UpdateAnyMetadataSlot) {
function TEST_F (line 258) | TEST_F(LiblpTest, InvalidMetadataSlot) {
function TEST_F (line 277) | TEST_F(LiblpTest, NoChangingGeometry) {
function TEST_F (line 306) | TEST_F(LiblpTest, BitFlipGeometry) {
function TEST_F (line 325) | TEST_F(LiblpTest, ReadBackupGeometry) {
function TEST_F (line 345) | TEST_F(LiblpTest, ReadBackupMetadata) {
function TEST_F (line 372) | TEST_F(LiblpTest, TooManyPartitions) {
function TEST_F (line 426) | TEST_F(LiblpTest, ImageFiles) {
function TEST_F (line 442) | TEST_F(LiblpTest, ImageFilesInMemory) {
class BadWriter (line 462) | class BadWriter {
method Reset (line 480) | void Reset() {
method FailOnWrite (line 485) | void FailOnWrite(int number) {
method FailAfterWrite (line 489) | void FailAfterWrite(int number) {
function TEST_F (line 502) | TEST_F(LiblpTest, UpdatePrimaryMetadataFailure) {
function TEST_F (line 530) | TEST_F(LiblpTest, UpdateBackupMetadataFailure) {
function TEST_F (line 559) | TEST_F(LiblpTest, UpdateMetadataCleanFailure) {
function TEST_F (line 596) | TEST_F(LiblpTest, FlashSparseImage) {
function TEST_F (line 630) | TEST_F(LiblpTest, AutoSlotSuffixing) {
function TEST_F (line 673) | TEST_F(LiblpTest, UpdateRetrofit) {
function TEST_F (line 705) | TEST_F(LiblpTest, UpdateNonRetrofit) {
function TEST_F (line 721) | TEST_F(LiblpTest, UpdateVirtualAB) {
function TEST_F (line 750) | TEST_F(LiblpTest, ReadExpandedHeader) {
FILE: fs_mgr/liblp/liblp_test.h
function namespace (line 23) | namespace android {
FILE: fs_mgr/liblp/partition_opener.cpp
type android (line 33) | namespace android {
type fs_mgr (line 34) | namespace fs_mgr {
function GetPartitionAbsolutePath (line 40) | std::string GetPartitionAbsolutePath(const std::string& path) {
function GetBlockDeviceInfo (line 65) | bool GetBlockDeviceInfo(const std::string& block_device, BlockDevice...
function unique_fd (line 111) | unique_fd PartitionOpener::Open(const std::string& partition_name, i...
FILE: fs_mgr/liblp/property_fetcher.cpp
type android (line 23) | namespace android {
type fs_mgr (line 24) | namespace fs_mgr {
function IPropertyFetcher (line 39) | IPropertyFetcher* IPropertyFetcher::GetInstance() {
FILE: fs_mgr/liblp/reader.cpp
type android (line 31) | namespace android {
type fs_mgr (line 32) | namespace fs_mgr {
class Reader (line 38) | class Reader {
class FileReader (line 44) | class FileReader final : public Reader {
method FileReader (line 46) | explicit FileReader(int fd) : fd_(fd) {}
method ReadFully (line 47) | bool ReadFully(void* buffer, size_t length) override {
class MemoryReader (line 55) | class MemoryReader final : public Reader {
method MemoryReader (line 57) | MemoryReader(const void* buffer, size_t size)
method ReadFully (line 59) | bool ReadFully(void* out, size_t length) override {
function ParseGeometry (line 75) | bool ParseGeometry(const void* buffer, LpMetadataGeometry* geometry) {
function ReadPrimaryGeometry (line 118) | bool ReadPrimaryGeometry(int fd, LpMetadataGeometry* geometry) {
function ReadBackupGeometry (line 131) | bool ReadBackupGeometry(int fd, LpMetadataGeometry* geometry) {
function ReadLogicalPartitionGeometry (line 148) | bool ReadLogicalPartitionGeometry(int fd, LpMetadataGeometry* geomet...
function ValidateTableBounds (line 155) | static bool ValidateTableBounds(const LpMetadataHeader& header,
function ReadMetadataHeader (line 167) | static bool ReadMetadataHeader(Reader* reader, LpMetadata* metadata) {
function ParseMetadata (line 246) | static std::unique_ptr<LpMetadata> ParseMetadata(const LpMetadataGeo...
function ParseMetadata (line 365) | std::unique_ptr<LpMetadata> ParseMetadata(const LpMetadataGeometry& ...
function ParseMetadata (line 371) | std::unique_ptr<LpMetadata> ParseMetadata(const LpMetadataGeometry& ...
function ReadPrimaryMetadata (line 376) | std::unique_ptr<LpMetadata> ReadPrimaryMetadata(int fd, const LpMeta...
function ReadBackupMetadata (line 386) | std::unique_ptr<LpMetadata> ReadBackupMetadata(int fd, const LpMetad...
function AdjustMetadataForSlot (line 398) | bool AdjustMetadataForSlot(LpMetadata* metadata, uint32_t slot_numbe...
function ReadMetadata (line 439) | std::unique_ptr<LpMetadata> ReadMetadata(const IPartitionOpener& ope...
function ReadMetadata (line 477) | std::unique_ptr<LpMetadata> ReadMetadata(const std::string& super_pa...
function NameFromFixedArray (line 481) | static std::string NameFromFixedArray(const char* name, size_t buffe...
function GetPartitionName (line 491) | std::string GetPartitionName(const LpMetadataPartition& partition) {
function GetPartitionGroupName (line 495) | std::string GetPartitionGroupName(const LpMetadataPartitionGroup& gr...
function GetBlockDevicePartitionName (line 499) | std::string GetBlockDevicePartitionName(const LpMetadataBlockDevice&...
FILE: fs_mgr/liblp/reader.h
function namespace (line 26) | namespace android {
FILE: fs_mgr/liblp/super_layout_builder.cpp
type android (line 29) | namespace android {
type fs_mgr (line 30) | namespace fs_mgr {
function AddGapExtents (line 88) | static bool AddGapExtents(std::vector<SuperImageExtent>* extents, Su...
FILE: fs_mgr/liblp/super_layout_builder_test.cpp
function TEST (line 29) | TEST(SuperImageTool, Layout) {
function TEST (line 68) | TEST(SuperImageTool, NoWritablePartitions) {
function TEST (line 82) | TEST(SuperImageTool, NoRetrofit) {
function TEST (line 99) | TEST(SuperImageTool, NoRetrofit2) {
function TEST (line 114) | TEST(SuperImageTool, NoFixedPartitions) {
function TEST (line 129) | TEST(SuperImageTool, LargeAlignedMetadata) {
FILE: fs_mgr/liblp/test_partition_opener.cpp
type android (line 21) | namespace android {
type fs_mgr (line 22) | namespace fs_mgr {
function unique_fd (line 31) | unique_fd TestPartitionOpener::Open(const std::string& partition_nam...
FILE: fs_mgr/liblp/test_partition_opener.h
function namespace (line 25) | namespace android {
FILE: fs_mgr/liblp/utility.cpp
type android (line 44) | namespace android {
type fs_mgr (line 45) | namespace fs_mgr {
function GetDescriptorSize (line 47) | bool GetDescriptorSize(int fd, uint64_t* size) {
function SeekFile64 (line 71) | int64_t SeekFile64(int fd, int64_t offset, int whence) {
function GetPrimaryGeometryOffset (line 76) | int64_t GetPrimaryGeometryOffset() {
function GetBackupGeometryOffset (line 80) | int64_t GetBackupGeometryOffset() {
function GetPrimaryMetadataOffset (line 84) | int64_t GetPrimaryMetadataOffset(const LpMetadataGeometry& geometry,...
function GetBackupMetadataOffset (line 91) | int64_t GetBackupMetadataOffset(const LpMetadataGeometry& geometry, ...
function GetTotalMetadataSize (line 98) | uint64_t GetTotalMetadataSize(uint32_t metadata_max_size, uint32_t m...
function LpMetadataBlockDevice (line 103) | const LpMetadataBlockDevice* GetMetadataSuperBlockDevice(const LpMet...
function SHA256 (line 110) | void SHA256(const void* data, size_t length, uint8_t out[32]) {
function SlotNumberForSlotSuffix (line 117) | uint32_t SlotNumberForSlotSuffix(const std::string& suffix) {
function GetTotalSuperPartitionSize (line 129) | uint64_t GetTotalSuperPartitionSize(const LpMetadata& metadata) {
function GetBlockDevicePartitionNames (line 137) | std::vector<std::string> GetBlockDevicePartitionNames(const LpMetada...
function LpMetadataPartition (line 145) | const LpMetadataPartition* FindPartition(const LpMetadata& metadata,...
function GetPartitionSize (line 154) | uint64_t GetPartitionSize(const LpMetadata& metadata, const LpMetada...
function GetPartitionSlotSuffix (line 163) | std::string GetPartitionSlotSuffix(const std::string& partition_name) {
function SlotSuffixForSlotNumber (line 171) | std::string SlotSuffixForSlotNumber(uint32_t slot_number) {
function UpdateBlockDevicePartitionName (line 176) | bool UpdateBlockDevicePartitionName(LpMetadataBlockDevice* device, c...
function UpdatePartitionGroupName (line 184) | bool UpdatePartitionGroupName(LpMetadataPartitionGroup* group, const...
function UpdatePartitionName (line 192) | bool UpdatePartitionName(LpMetadataPartition* partition, const std::...
function SetBlockReadonly (line 200) | bool SetBlockReadonly(int fd, bool readonly) {
function GetControlFileOrOpen (line 211) | base::unique_fd GetControlFileOrOpen(std::string_view path, int flag...
function UpdateMetadataForInPlaceSnapshot (line 225) | bool UpdateMetadataForInPlaceSnapshot(LpMetadata* metadata, uint32_t...
function ToHexString (line 291) | inline std::string ToHexString(uint64_t value) {
function SetMetadataHeaderV0 (line 295) | void SetMetadataHeaderV0(LpMetadata* metadata) {
FILE: fs_mgr/liblp/utility.h
function namespace (line 40) | namespace android {
FILE: fs_mgr/liblp/utility_test.cpp
function TEST (line 28) | TEST(liblp, SlotNumberForSlotSuffix) {
function TEST (line 38) | TEST(liblp, SlotSuffixForSlotNumber) {
function TEST (line 43) | TEST(liblp, GetMetadataOffset) {
function AlignTo (line 63) | std::optional<uint64_t> AlignTo(uint64_t base, uint32_t alignment) {
function TEST (line 71) | TEST(liblp, AlignTo) {
function TEST (line 87) | TEST(liblp, GetPartitionSlotSuffix) {
type android (line 95) | namespace android {
type fs_mgr (line 96) | namespace fs_mgr {
function GetPartitionExtents (line 106) | static std::vector<LinearExtent> GetPartitionExtents(Partition* p) {
function TEST (line 116) | TEST(liblp, UpdateMetadataForInPlaceSnapshot) {
FILE: fs_mgr/liblp/writer.cpp
type android (line 31) | namespace android {
type fs_mgr (line 32) | namespace fs_mgr {
function SerializeGeometry (line 34) | std::string SerializeGeometry(const LpMetadataGeometry& input) {
function CompareGeometry (line 44) | static bool CompareGeometry(const LpMetadataGeometry& g1, const LpMe...
function SerializeMetadata (line 50) | std::string SerializeMetadata(const LpMetadata& input) {
function ValidateAndSerializeMetadata (line 86) | static bool ValidateAndSerializeMetadata([[maybe_unused]] const IPar...
function ValidateMetadataRegion (line 173) | static bool ValidateMetadataRegion(const LpMetadata& metadata, uint6...
function WritePrimaryMetadata (line 187) | static bool WritePrimaryMetadata(int fd, const LpMetadata& metadata,...
function WriteBackupMetadata (line 205) | static bool WriteBackupMetadata(int fd, const LpMetadata& metadata, ...
function WriteMetadata (line 223) | static bool WriteMetadata(int fd, const LpMetadata& metadata, uint32...
function DefaultWriter (line 240) | static bool DefaultWriter(int fd, const std::string& blob) {
function FlashPartitionTable (line 248) | bool FlashPartitionTable(const IPartitionOpener& opener, const std::...
function FlashPartitionTable (line 314) | bool FlashPartitionTable(const std::string& super_partition, const L...
function CompareMetadata (line 318) | static bool CompareMetadata(const LpMetadata& a, const LpMetadata& b) {
function UpdatePartitionTable (line 323) | bool UpdatePartitionTable(const IPartitionOpener& opener, const std:...
function UpdatePartitionTable (line 402) | bool UpdatePartitionTable(const IPartitionOpener& opener, const std:...
function UpdatePartitionTable (line 407) | bool UpdatePartitionTable(const std::string& super_partition, const ...
FILE: fs_mgr/liblp/writer.h
function namespace (line 25) | namespace android {
FILE: fs_mgr/libsnapshot/device_info.cpp
type android (line 23) | namespace android {
type snapshot (line 24) | namespace snapshot {
FILE: fs_mgr/libsnapshot/device_info.h
function namespace (line 25) | namespace android {
FILE: fs_mgr/libsnapshot/dm_snapshot_internals.h
function namespace (line 24) | namespace android {
FILE: fs_mgr/libsnapshot/include/libsnapshot/auto_device.h
function namespace (line 21) | namespace android {
FILE: fs_mgr/libsnapshot/include/libsnapshot/cow_compress.h
function namespace (line 24) | namespace android {
FILE: fs_mgr/libsnapshot/include/libsnapshot/cow_format.h
function namespace (line 24) | namespace android {
FILE: fs_mgr/libsnapshot/include/libsnapshot/cow_reader.h
function namespace (line 27) | namespace chromeos_update_engine {
function namespace (line 31) | namespace android {
FILE: fs_mgr/libsnapshot/include/libsnapshot/cow_writer.h
function namespace (line 34) | namespace android {
FILE: fs_mgr/libsnapshot/include/libsnapshot/mock_cow_writer.h
function namespace (line 20) | namespace android::snapshot {
FILE: fs_mgr/libsnapshot/include/libsnapshot/mock_device_info.h
function namespace (line 21) | namespace android::snapshot {
FILE: fs_mgr/libsnapshot/include/libsnapshot/mock_snapshot.h
function namespace (line 22) | namespace android::snapshot {
FILE: fs_mgr/libsnapshot/include/libsnapshot/mock_snapshot_merge_stats.h
function namespace (line 24) | namespace android::snapshot {
FILE: fs_mgr/libsnapshot/include/libsnapshot/return.h
function namespace (line 22) | namespace android::snapshot {
FILE: fs_mgr/libsnapshot/include/libsnapshot/snapshot.h
function namespace (line 48) | namespace aidl::android::hardware::boot {
function namespace (line 54) | namespace fiemap {
function namespace (line 58) | namespace fs_mgr {
type AutoDeleteCowImage (line 68) | struct AutoDeleteCowImage
type AutoDeleteSnapshot (line 69) | struct AutoDeleteSnapshot
type AutoDeviceList (line 70) | struct AutoDeviceList
type PartitionCowCreator (line 71) | struct PartitionCowCreator
type class (line 85) | enum class
type class (line 91) | enum class
function virtual (line 106) | virtual ~IDeviceInfo() {}
function virtual (line 107) | virtual std::string GetMetadataDir() const = 0;
function BeginUpdate (line 373) | bool BeginUpdate() override;
function NeedSnapshotsInFirstStageMount (line 385) | bool MapUpdateSnapshot(const CreateLogicalPartitionParams& params,
type class (line 435) | enum class
function IImageManager (line
Copy disabled (too large)
Download .json
Condensed preview — 1803 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (10,430K chars).
[
{
"path": ".gitignore",
"chars": 9,
"preview": "*~\n*.pyc\n"
},
{
"path": "Android.bp",
"chars": 128,
"preview": "dirgroup {\n name: \"trusty_dirgroup_system_core\",\n dirs: [\".\"],\n visibility: [\"//trusty/vendor/google/aosp/scrip"
},
{
"path": "CleanSpec.mk",
"chars": 5395,
"preview": "# Copyright (C) 2007 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "MODULE_LICENSE_APACHE2",
"chars": 0,
"preview": ""
},
{
"path": "OWNERS",
"chars": 39,
"preview": "# Bug component: 128577\nenh@google.com\n"
},
{
"path": "PREUPLOAD.cfg",
"chars": 311,
"preview": "[Builtin Hooks]\nclang_format = true\nrustfmt = true\nbpfmt = true\n\n[Builtin Hooks Options]\nclang_format = --commit ${PREUP"
},
{
"path": "bootstat/Android.bp",
"chars": 2458,
"preview": "//\n// Copyright (C) 2016 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "bootstat/OWNERS",
"chars": 58,
"preview": "dvander@google.com\nachant@google.com\nmarkcheng@google.com\n"
},
{
"path": "bootstat/README.md",
"chars": 1672,
"preview": "# bootstat #\n\nThe bootstat command records boot events (e.g., `firmware_loaded`,\n`boot_complete`) and the relative time "
},
{
"path": "bootstat/boot_event_record_store.cpp",
"chars": 4558,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "bootstat/boot_event_record_store.h",
"chars": 2644,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "bootstat/boot_event_record_store_test.cpp",
"chars": 6976,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "bootstat/boot_reason_test.sh",
"chars": 44142,
"preview": "#! /bin/bash\n#\n# Bootstat boot reason tests\n#\n# throughout testing:\n# - manual tests can only run on eng/userdebug build"
},
{
"path": "bootstat/bootstat-debug.rc",
"chars": 322,
"preview": "# This file is the userdebug LOCAL_INIT_RC file for the bootstat command.\n\n# FOR TESTING\n# For devices w/o bootloader bo"
},
{
"path": "bootstat/bootstat.cpp",
"chars": 62956,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "bootstat/bootstat.rc",
"chars": 4119,
"preview": "# This file is the LOCAL_INIT_RC file for the bootstat command.\n\n# Mirror bootloader boot reason to system boot reason\n#"
},
{
"path": "bootstat/testrunner.cpp",
"chars": 850,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "cli-test/Android.bp",
"chars": 224,
"preview": "package {\n default_applicable_licenses: [\"Android-Apache-2.0\"],\n}\n\ncc_binary {\n name: \"cli-test\",\n host_support"
},
{
"path": "cli-test/README.md",
"chars": 3451,
"preview": "# cli-test\n\n## What?\n\n`cli-test` makes integration testing of command-line tools easier.\n\n## Goals\n\n* Readable syntax. C"
},
{
"path": "cli-test/cli-test.cpp",
"chars": 10072,
"preview": "/*\n * Copyright (C) 2019 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "code_coverage/Android.bp",
"chars": 2847,
"preview": "\npackage {\n default_applicable_licenses: [\"Android-Apache-2.0\"],\n}\n\nprebuilt_etc {\n name: \"code_coverage.policy\",\n"
},
{
"path": "code_coverage/empty_policy/code_coverage.arm.policy",
"chars": 68,
"preview": "# empty unless code_coverage is enabled.\n# code_coverage.arm.policy\n"
},
{
"path": "code_coverage/empty_policy/code_coverage.arm64.policy",
"chars": 70,
"preview": "# empty unless code_coverage is enabled.\n# code_coverage.arm64.policy\n"
},
{
"path": "code_coverage/empty_policy/code_coverage.riscv64.policy",
"chars": 72,
"preview": "# empty unless code_coverage is enabled.\n# code_coverage.riscv64.policy\n"
},
{
"path": "code_coverage/empty_policy/code_coverage.x86.policy",
"chars": 68,
"preview": "# empty unless code_coverage is enabled.\n# code_coverage.x86.policy\n"
},
{
"path": "code_coverage/empty_policy/code_coverage.x86_64.policy",
"chars": 71,
"preview": "# empty unless code_coverage is enabled.\n# code_coverage.x86_64.policy\n"
},
{
"path": "code_coverage/seccomp_policy/code_coverage.arm.policy",
"chars": 176,
"preview": "close: 1\nfchmod: 1\nmkdirat: 1\nmsync: 1\nmunmap: 1\nopenat: 1\nwrite: 1\nfcntl64: 1\nfstat64: 1\nftruncate64: 1\ngeteuid32: 1\n_l"
},
{
"path": "code_coverage/seccomp_policy/code_coverage.arm64.policy",
"chars": 152,
"preview": "close: 1\nfchmod: 1\nmkdirat: 1\nmsync: 1\nmunmap: 1\nopenat: 1\nwrite: 1\nfcntl: 1\nfstat: 1\nftruncate: 1\ngeteuid: 1\nlseek: 1\nm"
},
{
"path": "code_coverage/seccomp_policy/code_coverage.policy.def",
"chars": 1101,
"preview": "// SECCOMP_MODE_STRICT\n//\n// minijail allowances for code coverage\n// this is processed with generate.sh, so we can use "
},
{
"path": "code_coverage/seccomp_policy/code_coverage.riscv64.policy",
"chars": 152,
"preview": "close: 1\nfchmod: 1\nmkdirat: 1\nmsync: 1\nmunmap: 1\nopenat: 1\nwrite: 1\nfcntl: 1\nfstat: 1\nftruncate: 1\ngeteuid: 1\nlseek: 1\nm"
},
{
"path": "code_coverage/seccomp_policy/code_coverage.x86.policy",
"chars": 162,
"preview": "close: 1\nfchmod: 1\nmkdirat: 1\nmsync: 1\nmunmap: 1\nopenat: 1\nwrite: 1\nfcntl64: 1\nfstat64: 1\nftruncate64: 1\ngeteuid32: 1\n_l"
},
{
"path": "code_coverage/seccomp_policy/code_coverage.x86_64.policy",
"chars": 143,
"preview": "close: 1\nfchmod: 1\nmkdirat: 1\nmsync: 1\nmunmap: 1\nopenat: 1\nwrite: 1\nfcntl: 1\nfstat: 1\nftruncate: 1\ngeteuid: 1\nlseek: 1\nm"
},
{
"path": "code_coverage/seccomp_policy/generate.sh",
"chars": 355,
"preview": "#!/bin/bash\n\n# generate the arch-specific files from the generic one\n\nset -ex\n\ncd \"$(dirname \"$0\")\"\nCPP='cpp -undef -E -"
},
{
"path": "debuggerd/Android.bp",
"chars": 13547,
"preview": "package {\n default_applicable_licenses: [\"Android-Apache-2.0\"],\n}\n\ncc_defaults {\n name: \"debuggerd_defaults\",\n "
},
{
"path": "debuggerd/MODULE_LICENSE_APACHE2",
"chars": 0,
"preview": ""
},
{
"path": "debuggerd/OWNERS",
"chars": 19,
"preview": "cferris@google.com\n"
},
{
"path": "debuggerd/TEST_MAPPING",
"chars": 414,
"preview": "{\n \"presubmit\": [\n {\n \"name\": \"debuggerd_test\"\n },\n {\n \"name\": \"debuggerd_test\",\n \"keywords\": ["
},
{
"path": "debuggerd/client/debuggerd_client.cpp",
"chars": 11363,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/client/debuggerd_client_test.cpp",
"chars": 3934,
"preview": "/*\n * Copyright 2017, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/common/include/dump_type.h",
"chars": 1500,
"preview": "#pragma once\n\n/*\n * Copyright 2017, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0"
},
{
"path": "debuggerd/crash_dump.cpp",
"chars": 29892,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/crash_test.cpp",
"chars": 803,
"preview": "/*\n * Copyright 2021, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/crash_test.h",
"chars": 1143,
"preview": "/*\n * Copyright 2021, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/crasher/Android.bp",
"chars": 1574,
"preview": "package {\n default_applicable_licenses: [\"Android-Apache-2.0\"],\n}\n\ncc_defaults {\n name: \"crasher-defaults\",\n\n c"
},
{
"path": "debuggerd/crasher/arm/crashglue.S",
"chars": 1304,
"preview": "/*\n * Copyright 2006, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/crasher/arm64/crashglue.S",
"chars": 2321,
"preview": "/*\n * Copyright 2013, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/crasher/crasher.cpp",
"chars": 15422,
"preview": "/*\n * Copyright 2006, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/crasher/riscv64/crashglue.S",
"chars": 1578,
"preview": "/*\n * Copyright 2022, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/crasher/x86/crashglue.S",
"chars": 951,
"preview": "/*\n * Copyright 2010, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/crasher/x86_64/crashglue.S",
"chars": 951,
"preview": "/*\n * Copyright 2010, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/debuggerd.cpp",
"chars": 3534,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/debuggerd_benchmark.cpp",
"chars": 3504,
"preview": "/*\n * Copyright 2017, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/debuggerd_test.cpp",
"chars": 110958,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/handler/debuggerd_fallback.cpp",
"chars": 12512,
"preview": "/*\n * Copyright 2017 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\""
},
{
"path": "debuggerd/handler/debuggerd_fallback_nop.cpp",
"chars": 709,
"preview": "/*\n * Copyright 2017 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\""
},
{
"path": "debuggerd/handler/debuggerd_handler.cpp",
"chars": 37160,
"preview": "/*\n * Copyright 2008 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\""
},
{
"path": "debuggerd/handler/fallback.h",
"chars": 814,
"preview": "/*\n * Copyright 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\""
},
{
"path": "debuggerd/include/debuggerd/client.h",
"chars": 1269,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/include/debuggerd/handler.h",
"chars": 3550,
"preview": "/*\n * Copyright 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\""
},
{
"path": "debuggerd/libdebuggerd/backtrace.cpp",
"chars": 3469,
"preview": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/gwp_asan.cpp",
"chars": 6725,
"preview": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/include/libdebuggerd/backtrace.h",
"chars": 1483,
"preview": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/include/libdebuggerd/gwp_asan.h",
"chars": 2900,
"preview": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/include/libdebuggerd/open_files_list.h",
"chars": 1408,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/include/libdebuggerd/scudo.h",
"chars": 1438,
"preview": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/include/libdebuggerd/tombstone.h",
"chars": 2934,
"preview": "/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/include/libdebuggerd/tombstone_proto_to_text.h",
"chars": 919,
"preview": "/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/include/libdebuggerd/types.h",
"chars": 1772,
"preview": "#pragma once\n\n/*\n * Copyright (C) 2012 The Android Open Source Project\n *\n * Licensed under the Apache License, Version "
},
{
"path": "debuggerd/libdebuggerd/include/libdebuggerd/utility.h",
"chars": 2608,
"preview": "/*\n * Copyright 2008, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/libdebuggerd/include/libdebuggerd/utility_host.h",
"chars": 1278,
"preview": "/*\n * Copyright 2024, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/libdebuggerd/open_files_list.cpp",
"chars": 4628,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/scudo.cpp",
"chars": 5575,
"preview": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/test/UnwinderMock.h",
"chars": 1381,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/test/dump_memory_test.cpp",
"chars": 16935,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/test/elf_fake.cpp",
"chars": 1009,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/test/elf_fake.h",
"chars": 797,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/test/log_fake.cpp",
"chars": 2321,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/test/log_fake.h",
"chars": 827,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/test/mte_stack_record_test.cpp",
"chars": 6280,
"preview": "/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/test/open_files_list_test.cpp",
"chars": 1431,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/test/tombstone_proto_to_text_test.cpp",
"chars": 6163,
"preview": "/*\n * Copyright (C) 2021 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/tombstone.cpp",
"chars": 5658,
"preview": "/*\n * Copyright (C) 2012-2014 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the "
},
{
"path": "debuggerd/libdebuggerd/tombstone_proto.cpp",
"chars": 33701,
"preview": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/tombstone_proto_to_text.cpp",
"chars": 23186,
"preview": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/libdebuggerd/utility.cpp",
"chars": 16382,
"preview": "/*\n * Copyright 2008, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/libdebuggerd/utility_host.cpp",
"chars": 3556,
"preview": "/*\n * Copyright 2024, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/pbtombstone.cpp",
"chars": 2447,
"preview": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/proto/Android.bp",
"chars": 1134,
"preview": "package {\n default_applicable_licenses: [\"Android-Apache-2.0\"],\n}\n\nfilegroup {\n name: \"libtombstone_proto-src\",\n "
},
{
"path": "debuggerd/proto/jarjar-rules.txt",
"chars": 62,
"preview": "rule com.google.protobuf.** com.android.server.os.protobuf.@1\n"
},
{
"path": "debuggerd/proto/tombstone.proto",
"chars": 5096,
"preview": "//\n// Protobuf definition for Android tombstones.\n//\n// An app can get hold of these for any `REASON_CRASH_NATIVE` insta"
},
{
"path": "debuggerd/protocol.h",
"chars": 3232,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/rust/tombstoned_client/Android.bp",
"chars": 1332,
"preview": "package {\n default_applicable_licenses: [\"Android-Apache-2.0\"],\n}\n\ncc_library_static {\n name: \"libtombstoned_clien"
},
{
"path": "debuggerd/rust/tombstoned_client/src/lib.rs",
"chars": 5302,
"preview": "// Copyright 2022, The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
},
{
"path": "debuggerd/rust/tombstoned_client/wrapper.cpp",
"chars": 1357,
"preview": "/*\n * Copyright 2022, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/rust/tombstoned_client/wrapper.hpp",
"chars": 858,
"preview": "/*\n * Copyright 2022, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/seccomp_policy/crash_dump.arm.policy",
"chars": 559,
"preview": "read: 1\nwrite: 1\nexit: 1\nrt_sigreturn: 1\nsigreturn: 1\nexit_group: 1\nclock_gettime: 1\ngettimeofday: 1\nfutex: 1\ngetrandom:"
},
{
"path": "debuggerd/seccomp_policy/crash_dump.arm64.policy",
"chars": 600,
"preview": "read: 1\nwrite: 1\nexit: 1\nrt_sigreturn: 1\nexit_group: 1\nclock_gettime: 1\ngettimeofday: 1\nfutex: 1\ngetrandom: 1\ngetpid: 1\n"
},
{
"path": "debuggerd/seccomp_policy/crash_dump.policy.def",
"chars": 1921,
"preview": "// SECCOMP_MODE_STRICT\nread: 1\nwrite: 1\nexit: 1\nrt_sigreturn: 1\n#if !defined(__LP64__)\nsigreturn: 1\n#endif\n\nexit_group: "
},
{
"path": "debuggerd/seccomp_policy/crash_dump.riscv64.policy",
"chars": 533,
"preview": "read: 1\nwrite: 1\nexit: 1\nrt_sigreturn: 1\nexit_group: 1\nclock_gettime: 1\ngettimeofday: 1\nfutex: 1\ngetrandom: 1\ngetpid: 1\n"
},
{
"path": "debuggerd/seccomp_policy/crash_dump.x86.policy",
"chars": 559,
"preview": "read: 1\nwrite: 1\nexit: 1\nrt_sigreturn: 1\nsigreturn: 1\nexit_group: 1\nclock_gettime: 1\ngettimeofday: 1\nfutex: 1\ngetrandom:"
},
{
"path": "debuggerd/seccomp_policy/crash_dump.x86_64.policy",
"chars": 533,
"preview": "read: 1\nwrite: 1\nexit: 1\nrt_sigreturn: 1\nexit_group: 1\nclock_gettime: 1\ngettimeofday: 1\nfutex: 1\ngetrandom: 1\ngetpid: 1\n"
},
{
"path": "debuggerd/seccomp_policy/generate.sh",
"chars": 338,
"preview": "#!/bin/bash\n\nset -ex\n\ncd \"$(dirname \"$0\")\"\nCPP='cpp -undef -E -P crash_dump.policy.def'\n$CPP -D__arm__ -o crash_dump.arm"
},
{
"path": "debuggerd/test_permissive_mte/Android.bp",
"chars": 1236,
"preview": "// Copyright (C) 2022 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/test_permissive_mte/AndroidTest.xml",
"chars": 1218,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2022 The Android Open Source Project\n\n Licensed under the "
},
{
"path": "debuggerd/test_permissive_mte/mte_crash.cpp",
"chars": 1035,
"preview": "/*\n * Copyright (C) 2022 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/test_permissive_mte/src/com/android/tests/debuggerd/PermissiveMteTest.java",
"chars": 5793,
"preview": "/*\n * Copyright (C) 2022 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/tombstone_handler.cpp",
"chars": 3993,
"preview": "/*\n * Copyright 2023, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/tombstone_handler.h",
"chars": 1048,
"preview": "/*\n * Copyright 2023, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/tombstone_symbolize.cpp",
"chars": 4521,
"preview": "/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/tombstone_symbolize.h",
"chars": 1146,
"preview": "/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "debuggerd/tombstoned/include/tombstoned/tombstoned.h",
"chars": 1195,
"preview": "#pragma once\n\n/*\n * Copyright 2017, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0"
},
{
"path": "debuggerd/tombstoned/intercept_manager.cpp",
"chars": 10220,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/tombstoned/intercept_manager.h",
"chars": 1863,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/tombstoned/tombstoned.cpp",
"chars": 17586,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/tombstoned/tombstoned.microdroid.rc",
"chars": 271,
"preview": "service tombstoned /system/bin/tombstoned.microdroid\n user tombstoned\n group system\n\n socket tombstoned_crash s"
},
{
"path": "debuggerd/tombstoned/tombstoned.rc",
"chars": 297,
"preview": "service tombstoned /system/bin/tombstoned\n user tombstoned\n group system\n\n socket tombstoned_crash seqpacket 06"
},
{
"path": "debuggerd/tombstoned/tombstoned_client.cpp",
"chars": 3973,
"preview": "/*\n * Copyright 2017, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/util.cpp",
"chars": 2845,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "debuggerd/util.h",
"chars": 956,
"preview": "/*\n * Copyright 2016, The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "diagnose_usb/Android.bp",
"chars": 577,
"preview": "package {\n default_applicable_licenses: [\"Android-Apache-2.0\"],\n}\n\ncc_library_static {\n name: \"libdiagnose_usb\",\n "
},
{
"path": "diagnose_usb/OWNERS",
"chars": 18,
"preview": "yabinc@google.com\n"
},
{
"path": "diagnose_usb/diagnose_usb.cpp",
"chars": 3446,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "diagnose_usb/include/diagnose_usb.h",
"chars": 983,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/Android.bp",
"chars": 10142,
"preview": "// Copyright (C) 2018 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "fastboot/LICENSE",
"chars": 1267,
"preview": " Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the follo"
},
{
"path": "fastboot/OWNERS",
"chars": 95,
"preview": "dvander@google.com\nelsk@google.com\nenh@google.com\nsanglardf@google.com\nzhangkelvin@google.com\n\n"
},
{
"path": "fastboot/README.md",
"chars": 23313,
"preview": "Fastboot\n--------\n\nThe fastboot protocol is a mechanism for communicating with bootloaders\nover USB or ethernet. It is "
},
{
"path": "fastboot/TEST_MAPPING",
"chars": 67,
"preview": "{\n \"presubmit\": [\n {\n \"name\": \"fastboot_test\"\n }\n ]\n}\n"
},
{
"path": "fastboot/bootimg_utils.cpp",
"chars": 5484,
"preview": "/*\n * Copyright (C) 2008 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/bootimg_utils.h",
"chars": 1833,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/constants.h",
"chars": 3417,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/commands.cpp",
"chars": 35091,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/commands.h",
"chars": 2610,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/fastboot_device.cpp",
"chars": 9601,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/fastboot_device.h",
"chars": 2517,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/flashing.cpp",
"chars": 10478,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/flashing.h",
"chars": 849,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/main.cpp",
"chars": 1276,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/tcp_client.cpp",
"chars": 5480,
"preview": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/tcp_client.h",
"chars": 1231,
"preview": "/*\n * Copyright (C) 2020 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/usb.cpp",
"chars": 8490,
"preview": "/*\n * Copyright (C) 2007 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/usb.h",
"chars": 1998,
"preview": "#pragma once\n\n/*\n * Copyright (C) 2017 The Android Open Source Project\n *\n * Licensed under the Apache License, Version "
},
{
"path": "fastboot/device/usb_client.cpp",
"chars": 10577,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/usb_client.h",
"chars": 1092,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/usb_iouring.cpp",
"chars": 4822,
"preview": "/*\n * Copyright (C) 2022 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/usb_iouring.h",
"chars": 738,
"preview": "/*\n * Copyright (C) 2022 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/utility.cpp",
"chars": 8557,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/utility.h",
"chars": 4607,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/variables.cpp",
"chars": 21017,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/device/variables.h",
"chars": 5781,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/fastboot.bash",
"chars": 5320,
"preview": "# /* vim: set ai ts=4 ft=sh: */\n#\n# Copyright 2017, The Android Open Source Project\n#\n# Licensed under the Apache Licens"
},
{
"path": "fastboot/fastboot.cpp",
"chars": 103011,
"preview": "/*\n * Copyright (C) 2008 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fastboot.h",
"chars": 7163,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fastboot_driver.cpp",
"chars": 22448,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fastboot_driver.h",
"chars": 8276,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fastboot_driver_interface.h",
"chars": 2692,
"preview": "//\n// Copyright (C) 2023 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/fastboot_driver_mock.h",
"chars": 2236,
"preview": "//\n// Copyright (C) 2023 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/fastboot_driver_test.cpp",
"chars": 3950,
"preview": "//\n// Copyright (C) 2023 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/fastboot_integration_test.xml",
"chars": 1032,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2023 The Android Open Source Project\n Licensed under the A"
},
{
"path": "fastboot/fastboot_test.cpp",
"chars": 13213,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/filesystem.cpp",
"chars": 2761,
"preview": "/*\n * Copyright (C) 2023 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/filesystem.h",
"chars": 1132,
"preview": "/*\n * Copyright (C) 2023 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/fs.cpp",
"chars": 8119,
"preview": "#include \"fs.h\"\n\n\n#include <errno.h>\n#include <fcntl.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#incl"
},
{
"path": "fastboot/fs.h",
"chars": 463,
"preview": "#pragma once\n\n#include <string>\n#include <stdint.h>\n\nstruct fs_generator;\n\nenum FS_OPTION {\n FS_OPT_CASEFOLD,\n FS_"
},
{
"path": "fastboot/fuzzer/Android.bp",
"chars": 1919,
"preview": "/*\n * Copyright (C) 2021 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/fuzzer/README.md",
"chars": 1710,
"preview": "# Fuzzer for libfastboot\n\n## Plugin Design Considerations\nThe fuzzer plugin for libfastboot is designed based on the und"
},
{
"path": "fastboot/fuzzer/fastboot_fuzzer.cpp",
"chars": 11105,
"preview": "/*\n * Copyright (C) 2021 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/fuzzer/socket_mock_fuzz.cpp",
"chars": 3596,
"preview": "/*\n * Copyright (C) 2021 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/fuzzer/socket_mock_fuzz.h",
"chars": 2180,
"preview": "/*\n * Copyright (C) 2021 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/fuzzy_fastboot/Android.bp",
"chars": 1435,
"preview": "package {\n // See: http://go/android-license-faq\n // A large-scale-change added 'default_applicable_licenses' to i"
},
{
"path": "fastboot/fuzzy_fastboot/README.md",
"chars": 25386,
"preview": "# Fuzzy Fastboot\n\nFuzzy Fastboot (FF) is a standalone automated conformance and penetration tester for\nvalidating device"
},
{
"path": "fastboot/fuzzy_fastboot/example/checksum_parser.py",
"chars": 1254,
"preview": "'''\nSome bootloader's support hashing partitions. This is a great feature for testing\ncorrectness. However, the format f"
},
{
"path": "fastboot/fuzzy_fastboot/example/config.xml",
"chars": 2421,
"preview": "<?xml version=\"1.0\"?>\n<config>\n<!-- All the device getvar variables should be listed here -->\n<getvar>\n\t<var key=\"produc"
},
{
"path": "fastboot/fuzzy_fastboot/example/validator.py",
"chars": 1022,
"preview": "'''\nThis is an example validator to be used with oem commands that allow you to\nupload data afterwards that you wish to "
},
{
"path": "fastboot/fuzzy_fastboot/extensions.cpp",
"chars": 13018,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fuzzy_fastboot/extensions.h",
"chars": 4479,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fuzzy_fastboot/fixtures.cpp",
"chars": 12089,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fuzzy_fastboot/fixtures.h",
"chars": 5297,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fuzzy_fastboot/main.cpp",
"chars": 86655,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fuzzy_fastboot/test_listeners.h",
"chars": 2311,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fuzzy_fastboot/test_utils.cpp",
"chars": 6270,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fuzzy_fastboot/test_utils.h",
"chars": 3203,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/fuzzy_fastboot/transport_sniffer.cpp",
"chars": 5961,
"preview": "#include \"transport_sniffer.h\"\n#include <android-base/stringprintf.h>\n#include <sys/select.h>\n#include <sys/time.h>\n#inc"
},
{
"path": "fastboot/fuzzy_fastboot/transport_sniffer.h",
"chars": 3154,
"preview": "/*\n * Copyright (C) 2018 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/main.cpp",
"chars": 1512,
"preview": "/*\n * Copyright (C) 2008 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/mock_transport.h",
"chars": 2205,
"preview": "//\n// Copyright (C) 2023 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/result.h",
"chars": 1356,
"preview": "/*\n * Copyright (C) 2023 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/socket.cpp",
"chars": 9695,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/socket.h",
"chars": 5826,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/socket_mock.cpp",
"chars": 5035,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/socket_mock.h",
"chars": 3503,
"preview": "/*\n * Copyright (C) 2016 The Android Open Source Project\n * All rights reserved.\n *\n * Redistribution and use in source "
},
{
"path": "fastboot/socket_test.cpp",
"chars": 14203,
"preview": "/*\n * Copyright (C) 2015 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/storage.cpp",
"chars": 2526,
"preview": "/*\n * Copyright (C) 2023 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/storage.h",
"chars": 1105,
"preview": "/*\n * Copyright (C) 2023 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/super_flash_helper.cpp",
"chars": 4441,
"preview": "//\n// Copyright (C) 2023 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/super_flash_helper.h",
"chars": 1873,
"preview": "//\n// Copyright (C) 2023 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/super_flash_helper_test.cpp",
"chars": 2989,
"preview": "//\n// Copyright (C) 2023 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/task.cpp",
"chars": 11256,
"preview": "//\n// Copyright (C) 2023 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/task.h",
"chars": 4844,
"preview": "//\n// Copyright (C) 2020 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
},
{
"path": "fastboot/task_test.cpp",
"chars": 14691,
"preview": "//\n// Copyright (C) 2023 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"Lice"
}
]
// ... and 1603 more files (download for full content)
About this extraction
This page contains the full source code of the android/platform_system_core GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1803 files (9.4 MB), approximately 2.6M tokens, and a symbol index with 7569 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.