Added missing partitions (/product and /vendor).
APEXes can be put in /system, /system_ext, /product, and /vendor.
Binaries within "flattened" apexes should be marked as executable.
Bug: 167383491
Bug: 169025459
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m vendorimage with a vendor apex
simg2img $OUT/vendor.img vendor.img
debugfs -R 'ls -l /vendor/apex/com.android.foo/bin' vendor.img
=> check if binaries are executable
Change-Id: I67284166d70c98a2a184b47e7052ade8b9039df9
In addition to "firmware_directories", ueventd scans /apex/*/firmware/
directory as well to find firmware files.
Bug: 167942098
Test: loading firmware from vibrator apex successfully.
(sunfish)
Change-Id: I90fc8f9ad843a08b1ca98a2be1b5d22c0c5954a3
android_filesystem_config.h is found since system/core/include is on
the include path for all projects and contains a symlink to the real
android_filesystem_config.h. This is fragile and the below bug seeks
to remove this symlink and have users correctly depend on
libcutils_headers.
Bug: 165825252
Test: build
Change-Id: I1aad6a2e8fbe87635e97b0ac1be3414403353382
block->payload and its size are not valid when it is used to check
against bytes_left due to std::move() performed on its just prior
to the check. Hence check will always fail to detect the case where
received data is more than expected. To detect this condition and
allow error handling with std::move(), remove extra payload variable
and directly use block->payload.
Bug: http://b/168917244
Change-Id: I992bbba9d9a9861a195834f69d62e69b90658210
There are libraries built with the NDK but bundled with the platform
that were otherwise directly including the header path. It's better
for them to include liblog_headers instead.
Test: build
Change-Id: Icca3684ba5b2539789d30de9df840da4ade0dc67
The check for a signal handler was checking for the instruction after
the syscall. On cuttlefish 64 bit, the instruction was not a nop, so
the check failed, and the signal handler was not working. Only check
the instructions up to the syscall instead.
Bug: 168806886
Test: Ran on x86_64.
Change-Id: I605ed22248748f525939e55d734caa5b08c80bb2
android_filesystem_capability.h should be included as part of
libcutils, not as a global include. It looks like the few users of
this file already do this correctly, so it's time to remove the
symlink.
Test: treehugger
Change-Id: I150dc5fee24bef3518b1f26728ef2bec669ee63a
canned_fs_config.h should be included as part of libcutils, not as a
global include. It looks like the few users of this file already do
this correctly, so it's time to remove the symlink.
Test: treehugger
Change-Id: I72d327c2f1f374a1fa9e22b5ee1cceb0311a6818
Document the internals of adb pipeline. In particular the fdevent,
smart socket, and transport flow.
Bug: NA
Test: NA
Change-Id: Ia8fd8a6da843b8e91ca3005545f33bd0a82cc0c3
This value indicates whether memory tagging is enabled on a thread,
the mode (sync or async) and the set of excluded tags. This information
can sometimes be important for understanding an MTE related crash,
so include it in the per-thread tombstone output.
Bug: 135772972
Change-Id: I25a16e10ac7fbb2b1ab2a961a5279f787039000b
Add basic support for daemon creation and handle signals
Test: Add test case to test system and product COW partitions
Bug: 162790322
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Icf8dbe49d2237cec6f7dbcdd84256eb6c5afa1cd
When in append mode, CowWriter will re-open the existing COW and resume
writing at the end of the old data position. All existing operations
will be reimported and buffered in memory.
The size calculation has been simplified to make this work. We now
advance ops_offset and no longer track the number of bytes written.
Additionally, a "header_size" field has been added to the header. This
was missing from the original format and is useful for introducing
forward compatibility later.
Finally, Finalize has been renamed to Flush. It's still mandatory, but
it can be called multiple times to continue appending data without
reopening.
Bug: 168554689
Test: cow_api_test gtest
Change-Id: I637e99ae08a4db5b273c06318e6db523ea8ec7c5
This makes looking up device UUIDs a bit easier, as rather than depending on
the device mapper's sysfs layout we can depend on dmctl. There's some
associated libdm plumbing, but the UUID was already pretty much availiable.
Test: I just ran this by hand.
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Change-Id: I7028eec6ab04601308047b67057e51a0ff44c0a7
Currently it falls back to /sys/kernel/tracing if debugfs is not found.
/sys/kernel/tracing must be checked first since debugfs is not allowed
to be mounted in user builds starting with Android R launching devices.
Test: manual
Change-Id: I2fb5ec91bbf7d5304a1a6efcb06530969485e78f
"init subcontext" is responsible to handle a few commands in vendor
context. To support Vendor APEX, "init subcontext" is now started in
"default" mount namespace so that those commands can access /apex/*.
For example, insmod should see the contents of /apex to install kernel
modules in apexes.
Bug: 162701747
Test: adb shell ps -ef | grep init
=> check pid of <init subcontext>
adb shell readlink /proc/<pid: init>/ns/mnt
adb shell readlink /proc/<pid: init subcontext>/ns/mnt
=> check if these are equal
Change-Id: Icd5e862e52d78635e83824b267b6d32d8f3e9eea