Which will dump all the allowed properties, similar to `adb shell
getprop`.
Bug: 134027350
Test: Run the command under rescue mode.
Change-Id: Id668224098006d71ee192c8c2bea5d791d2423c1
If we just disabled verity, take the step to setup the backing
storage for overlayfs.
Test: adb-remount-test.sh
Bug: 130131892
Change-Id: Ic56569eaf363e4417a0ce5df11ee5480a07b8b03
This works around a deadlock when a bridge that is about to be closed
is reused for a new call to openFile. The call to open() ends up holding
the vold lock, waiting for appfuse to respond. The appfuse event loop
calls onClosed(), which ends up calling vold.unmountAppFuse(), which
cannot get the lock.
Closing this file descriptor causes any current calls to open() on its
mount path to fail with either ECONNABORTED or ENOTCONN, allowing the
event loop to make progress, call onClosed() and unmount the path.
Note that the failed call to open() will result in a retry, which
will create a new appfuse bridge. This is not ideal but not a new
problem -- the common case here is that that each call to
openProxyFileDescriptor creates a new bridge. This should ideally
be improved.
Bug: 132344997
Test: flick through info of photos with location info attached
Change-Id: I878e5cf86f18c5233f8505f52eb9db076bd72d01
Merged-In: I878e5cf86f18c5233f8505f52eb9db076bd72d01
Read function exits before reading all requested bytes. Fix that by
looping until the len requested is completed.
This will fix the issue execting get_staged command for a staged image
bigger than 1MB
Test: fastboot get_staged file.txt
Change-Id: Ic70ab48f3a8c8d78c225db638892501d4dc20b13
Signed-off-by: Fernando Lugo <flugo@google.com>
Factors out utility functions into service_utils.h/cpp, so that they
can be reused by the upcoming native zygote.
Bug: 133443795
Test: Build and boot cuttlefish.
Change-Id: I0531b6f17561119c8cc33dd9ba375b351747fcfe
Cosmetic fix.
If overlayfs gets setup by the remount command, ask user to reboot
since the device is not 100% in a state to run, and is merely only
in a state to take push and sync operations.
overlayfs is only truly ready for developing and running if the
overly mounts had occurred in first stage init, this happens when
the device is rebooted.
We did not completely remove overlapping dead ext4 dedupe code in a
previous change, complete the process.
Simplification for adb remount, the message:
Now reboot your device for settings to take effect
will only occur on the pass that causes the overlays to be populated,
in the same boot session. If subsequent, and ineffectual in any case,
remount command occurs again, it will not request a reboot.
Test: adb-remount-test.sh
Bug: 130131892
Change-Id: I7c4f408546687c49249883e2641b9bc63f68afd0
non-aio USB read function was stuck in a loop waiting for more data
because data length parameter is always set 64 for fastbootd commands.
It should be a normal case to get less data than expected
since lengths of these commands are usually less than 64.
Add logic to check this and one more parameter to distinguish
fastbootd from general adbd case.
Bug: 133189029
Test: try various fastbootd commands
Change-Id: I6690324840d78f3f1e04235040301520329976db
Merged-In: I6690324840d78f3f1e04235040301520329976db
This change factors out functions that handle selabels from
selinux.h/cpp into selabel.h/cpp. This allows util.cpp to be used by
the upcoming native zygote without a bunch of define flags that are
required for selinux.cpp.
Bug: 133443795
Test: Build and boot cuttlefish.
Change-Id: Ie238a96c6407c6698a605dd8803c1727abfaae7b
Currently, if init encounters a fatal issues it reboots to fastboot
but this may be not desirable in all cases, especially the case of
critical services crashing. Therefore this change adds the ability
for vendors to customize the reboot target via the
androidboot.init_fatal_reboot_target= kernel command line.
This applies to all LOG(FATAL) messages as well as fatal signals in
userdebug/eng builds, except for signals before logging is enabled in
first stage init.
Bug: 121006328
Test: device reboots to configurable target with LOG(FATAL)
Test: device reboots to configurable target after a segfault in the
various stages of init
Test: device reboots to fastboot without a configured target
Change-Id: I16ea9e32e2fee08dece3d33b697d7a08191d607b
Dump init stacks when aborting either due to LOG(FATAL) or in
userdebug/eng builds due to signals, including signals from
sanitizers.
Doesn't work for static first stage init yet, b/133450393 tracks
that.
Also, ensure that LOG(FATAL) in child processes calls abort() in all
stages of init, not just 2nd stage init.
Bug: 131747478
Test: abort init in various ways and see stacks
Test: hang or crash in backtrace handler and see child reboot
Change-Id: Ib53b5d3e7e814244203f875de016ada9900dfce8
This is a follow-up change of 7d89fb164b.
- Some of the missing conditions for SFNAIE were added
- Fixed indentation
- The assignment operator became "= default"
Bug: 132145659
Test: libbase_test
Change-Id: Ib5232a6e5e1d3df67e185d6e8c03374105c1ce94
When TARGET_FLATTEN_APEX is true (= ro.apex.updatable is unset or set to
false), apexd is not used to activate the built-in flattened APEXes.
Init simply bind-mounts /system/apex to /apex.
However, there is a special case here. The runtime APEX is installed as
either /system/apex/com.android.runtime.debug or
/system/apex/com.android.runtime.release, whereas it should be activated
on /apex/com.android.runtime - without the .debug or .release suffix.
To handle that case, the build system creates an empty directory
/system/apex/com.android.runtime and the .debug or .release directory
is bind-mounted to the empty directory by init at runtime.
This change also fixes a minor bug that native watchdog is triggered
for all post-apexd processes regardless of whether ro.apex.updatable
is true or not. Since apexd is expected to shutdown itself when ro.apex
.updatable is false, we don't trigger the watchdog in that case.
Bug: 132413565
Bug: 133305381
Test: marlin and sdk_gphone are bootable
Merged-In: I219465b8b81decb960e2c5f46bab6e0768b31317
Change-Id: I219465b8b81decb960e2c5f46bab6e0768b31317
(cherry picked from commit f93088ba2b)
restore() should not run adb enable-verity if device does not
use overlayfs even though it supports it.
Test: adb-remount-test
Bug: 132070014
Change-Id: I55d0e1a87eca9c5f258a1587c844f2a6e4b13b29
Check to make sure st_dev and st_ino for the uploaded content
is as expected.
Test: adb-remount-test
Bug: 129319403
Bug: 132395411
Change-Id: I89826fc2740dfd2ead4bcd8988cfbbc315b77b09
For the wipe and remount vendor test, report the df and
mount states to help triage.
Test: adb-remount-test.sh
Bug: 129319403
Change-Id: I4d9a87766d9857a974e601324ab77f69681bfd28
Check if adb remount resulted in any unlabeled references just before
rebooting the device.
Test: adb-remount-test.sh
Bug: 129319403
Bug: 132395411
Change-Id: Ica0c14da39773f615d9b5e4cfc4602bd50c70e4e
Increase adb_wait time to 3 minutes since blueline device takes
maximum 2:38 (ten samples) to perform a ramdump should an
inopportune kernel panic occur.
Test: adb-remount-test.sh
Bug: 132070014
Change-Id: Icfbb799f9420035a755090c9fc5fc2ee05dd68d3
Report any unusual durations for how long it took to wait for the
device to come back if --print-time flag. Also report the boot
reason if unexpected.
Test: adb-remount-test.sh
Bug: 132070014
Change-Id: I233bbc7b01b025739d7d63191cb62952fa4b7b2a
When developing and using the adb remount test, if device under test
is flashed from another source than the current visible tree, make
sure that the vendor image as-built and visible in a sandbox build
is not used indiscriminantly.
Test: adb-remount-test.sh
Bug: 132070014
Change-Id: I30569a7c871f4c4038b0f7f9c05f5f1a5d12c766
If we reboot too agressively after a fresh flash either just before
test is run, or after vendor is flashed, we run the risk the device
will consider it a bad boot and head towards recovery or revert to
previous system.
Add checks to wait for the screen.
This can result in the test reporting issues with boot complete,
which will not fail the test currently, but can be used to determine
if the device under test is in a boot loop or fragile state.
Test: fastboot flashall ; adb-remount-test.sh
Bug: 132070014
Change-Id: Ia1b3800c44222cb8fbd9b00e897b32a256996ebc
A recent change
(https://android-review.googlesource.com/c/platform/bionic/+/961601)
caused this test to fail. This change allowed LLVM to optimize what was
previously `__write_chk` into a standard call to `write`.
LLVM knows things about `write`. In particular, it knows that `write`
doesn't capture its buffer param, which `Ref` assumes isn't possible.
LLVM can't reason much about `volatile` operations; storing this to a
`volatile` ptr should be good enough. If not, there are a few other
tricks we can play here.
Bug: 133479661
Test: `atest
memunreachable_test:memunreachable_test.MemunreachableTest#stack --
--abi x86` on internal-master
Change-Id: I905e510210cafdf83fa1b50f2f090d4f8b9653da
Logcatd has capability to output logs to filesystem with certain size
and certain file count, however file size is not configurable, fixed
as 1024 kbytes, file count is configurable, but original property
name didn't match the logcat parameter well.
This patch add interface rotate_kbytes and count into logcatd.rc.
rotate_kbytes used to control each logcat file size.
count is another alias for logd.logpersistd.size to control file number.
Bug: 133362078
Test: Can use logcat -r -n with configures
Change-Id: I9954c9c125a4ab4e49310986f81c734bf8ee96b3
Signed-off-by: Tian, Baofeng <baofeng.tian@intel.com>
Signed-off-by: Duan, YayongX <yayongx.duan@intel.com>