These will be used as a GID for the Android/data and Android/obb
directories respectively, on devices that don't have sdcardfs.
Bug: 146419093
Test: builds
Change-Id: I52a3235e872eb4b0402f918d5c47661f16626ba6
When debugfs is not mounted, atrace should look for
tracefs in /sys/kernel/tracing.
Test: CtsAtraceHostTestCases
Bug: 148436518
Change-Id: I45c0e664892bcda277fd9612106ad5216aea0a1b
libadbd_auth was accidentally linked as a static library, which defeats
the entire purpose.
Test: treehugger
Test: readelf -d $ANDROID_PRODUCT_OUT/apex/com.android.adbd/bin/adbd
Change-Id: Id5b66745946a8b92e368ee5f3965275ff03e056d
In a device with malformed metadata, the MetadataBuilder returns a
nullptr that may cause segmentation faults when using the builder.
Fix by handling the nullptr exception in CreateUpdateSnapshot and
propagating the error to its caller.
Bug: n/a
Test: libsnapshot_test
Change-Id: Ie9148a552cf4bb223ab8d54b1d30d2b13d92bb22
Signed-off-by: Alessio Balsini <balsini@google.com>
* When __FAKE_USE_VA_ARGS has args that are not constexpr,
reaching it in a constexpr function will be make the
constexpr function invalid.
To allow LOG_ALWAYS_FATAL_IF in a constexpr functions when
the tested condition is false, it should call __FAKE_USE_VA_ARGS
only when the tested condition is true.
* Other ALOG*_IF macros are also changed to call
__FAKE_USE_VA_ARGS only when the tested condition is true.
Bug: 148548418
Test: WITH_TIDY=1 make
Change-Id: Ie8a444dffbf9cbef78e5e0b49b44f4092bcf9982
The libsnapshot features are currently not used anywhere else than the
update system with Virtual A/B.
Ignore libsnapshot tests for devices that are not implementing this
feature.
Test: m, snapshot_test, OTA
Bug: 142513589
Change-Id: I4580bae5ed315f21501556eea062e6af1f982ab3
Signed-off-by: Alessio Balsini <balsini@google.com>
This is the expected location on Linux and this makes 'ip tuntap' work.
Before:
vsoc_x86_64:/ # ip tuntap add dev tun0 mode tun
open: No such file or directory
vsoc_x86_64:/ # ip tuntap add dev tap0 mode tap
open: No such file or directory
vsoc_x86_64:/ # ip tuntap list
After:
vsoc_x86_64:/ # ip tuntap add dev tun0 mode tun
vsoc_x86_64:/ # ip tuntap add dev tap0 mode tap
vsoc_x86_64:/ # ip tuntap list
tap0: tap UNKNOWN_FLAGS:800
tun0: tun UNKNOWN_FLAGS:800
$ adbz shell ls -ldZ / /dev /dev/tun /dev/net /dev/net/tun
drwxr-xr-x 25 root root u:object_r:rootfs:s0 4096 2020-01-25 09:48 /
drwxr-xr-x 21 root root u:object_r:device:s0 1240 2020-01-25 09:48 /dev
drwxr-xr-x 2 root root u:object_r:device:s0 60 2020-01-25 09:48 /dev/net
lrwxrwxrwx 1 root root u:object_r:device:s0 6 2020-01-25 09:48 /dev/net/tun -> ../tun
crw-rw---- 1 system vpn u:object_r:tun_device:s0 10, 200 2020-01-25 09:48 /dev/tun
Test: see above
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2aa215711454ce4f8a0ef1f34c17621629060fa1
Mount binderfs at /dev/binderfs. Also add symlinks from /dev/binder,
/dev/hwbinder and /dev/vndbinder to /dev/binderfs/binder,
/dev/binderfs/hwbinder and /dev/binderfs/vndbinder respectively.
Bug: 136497735
Test: Cuttlefish boots on Android Common Kernel 4.19 with kernel config
CONFIG_ANDROID_BINDERFS=y.
Change-Id: I349face22a2e73bfd79af0188e41188c323388f7
CreateLogicalAndSnapshotPartition is used in first-stage init and by
default never blocks (thanks to a timeout set to 0). This causes some
libsnapshot tests to fail, because snapshot devices may be accessed
before there actual creation is complete.
Fix by introducing a timeout_ms argument, set to 0 if unspecified.
Test: libsnapshot_test
Bug: 142513589
Change-Id: I5e23adaaf6df8603df501b9a25fdd1e9d8c15252
Signed-off-by: Alessio Balsini <balsini@google.com>
ACgroupController_getFlags was reverted due to LLNDK breakage, however
it allows detection of cgroups that failed to mount in a more efficient
way. Revive the function as a weakly linked symbol to allow for it to
be missing in case older LLNDK library is being used with the new
system software. This effectively reverts the commit
aa1d54f0cc "Remove ACgroupController_getFlags to fix API breakage"'
except it declares ACgroupController_getFlags function as weak and
targets it for API level 30. If LLNKD library does not contain
ACgroupController_getFlags the behavior falls back to the current
way of identifying cgroups that failed to mount.
Test: build and verify correct operation with a missing cgroup
Change-Id: I9158ef53aba97972d41d71dd3396ac43796a7004
Merged-In: I9158ef53aba97972d41d71dd3396ac43796a7004
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
In Android kernels >4.4 we will see an empty /sys/kernel/tracing
directory which is notionally where you should mount tracefs if you
don't want to mount debugfs. As we move towards not mounting debugfs,
ensure that the non-legacy location also has adequate permissions to be
read by tracing tools.
Note that this change will be OK even if the board init.rc doesn't mount
tracefs here, because sysfs will always create this directory.
Bug: 148436518
Change-Id: I674587d0f08effdb8471a82e3b1ceec3af8588de
Reorder, remove and fix some of the dependencies in the Android.bp for
snapshot.
Test: m, snapshot_test, OTA
Bug: 142513589
Change-Id: Id214a8d6453a5675e60cda4352094dc3987292ec
Signed-off-by: Alessio Balsini <balsini@google.com>
Add flag in Android.bp to force the execution of libsnapshot_test as
root.
Test: m
Bug: 142513589
Change-Id: I9d047a9e1f9ea6d6e5540fa66fb42603ea136641
Signed-off-by: Alessio Balsini <balsini@google.com>
1) Fix up the host tests for new logging format
2) Add recently added tests to the host test
3) Ensure that properties are cleaned up by liblog-unit-tests
Test: unit tests
Change-Id: I303549aecc26d11ec87e59d48758ced4c198b72c
Do not write to binary buffers, this was already done for logd,
but wasn't explicitly done for other loggers, so do that too.
Test: unit tests
Change-Id: Ia36e0d2e1b6c833780239a5ef459abea99bc4a1f
Currently, this is only enabled for Virtual A/B devices. When /data uses
F2FS, then proper pinning support must be enabled.
Because /data cannot be mounted in recovery, we can't delete the scratch
image backed by /data while in fastbootd. Instead, we mark it as
disabled in /metadata. The remount command now has an init script that
checks for and removes a disabled scratch partition.
Bug: 134949511
Test: adb remount on V A/B device with patched F2FS
Change-Id: Ifc8720378259654472d3822e97059b6c366f601d
This is now dead code as __android_log_stderr_logger() has superseded it.
Bug: 147496863
Test: build
Change-Id: Ibdea2961ec4fc093bf9e35581dc1c46db2cff06a
Also reset some more properties to make bootanimation work properly.
Test: adb reboot userspace
Bug: 148172262
Change-Id: I0154d4fe9377c019150f5b1a709c406925db584d
Some recent changes can have these logging functions potentially set
errno. This change places android::base::ErrnoRestorer at the entry
point of the public functions where we want to guarantee errno is
restored to ensure this will not happen again.
Test: build
Change-Id: Iab4170ab16b9c7301474a509ee42d38b370b91a4
Currently when vendor overrides a profile the profile object is being
replaced with a new one. However the old profile might have been
referenced by an aggregate profile and with such profile replacement
the aggregate profile is left referencing a stale object. Fix this by
replacing the content of the old profile with the content from the new
one instead of replacing the object itself.
Bug: 148311066
Test: override profiles referenced in aggregate profile and verify
Test: correct replacement
Change-Id: Iabddbf3580455e5263fedad6665cf52fb323e50a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
In the current state, schedboost_enabled() is true if and only if
schedtune is in use. As a result, all tests conditioned by
schedboost_enabled() will be skipped on devices using uclamp since it is
and extension of the CPU controller.
Fix this by making schedboost_enabled() return true if either schedtune
or the CPU controller is enabled.
Bug: 44953631
Change-Id: Idaadf252c9cf411a176180ab8988d559ca8a1332
Signed-off-by: Quentin Perret <qperret@google.com>