The style file .clang-format is copied from adb/.clang-format.
Each sub folders still can have different style by adding their own
.clang-format because git-clang-format uses the style file located
in one of the parent directories of the *source file*.
Also see the following link for previous discussions:
https://android-review.googlesource.com/#/c/340106
Bug: 36046320
Test: repo upload, checks pre-submit fails when the uploading commit
doesn't meet the style
Change-Id: I94369af197da1ccce581bbd861c8737f6a197429
While recovering from endpoint errors, the gadget stack was being
signalled even when desriptors were NOT being rewritten. Avoid this
as this might cause enumeration loops.
Bug: 36036550
Change-Id: Iff2b2fc8cded001ef3c77dc170dce3b96848970c
Test: Verified ADB over mDNS on a Windows machine
Bug: 30482671
(cherry picked from 9fdd77101f49d03ff29342e12e23edf241f68522)
Change-Id: If955ca304db71a5b08c5a9654f1e27ab74af9af8
We have to disable IPv6 to get this going, but nobody was yet using
IPv6, so that should be fine for now.
Test: Verified mDNS discovery on a MacBook
Bug: 31042497
(cherry picked from 9ae65de087171072f3890a81b074ae27db319508)
Change-Id: I628f0a1e9c4784db42fa56f5faf2904b6e1cf548
Test: Was able to discover a raspberry pi.
Bug: 28074466
(cherry picked from e292cd16760321fccc99c8c261cb92fa4b6462ab)
Change-Id: Id9571576457a4a0a078e48a274a4e8eac78bfe2b
Now all devices won't appear as "Android." Should make it easier to
multiplex.
Test: Verified locally on a raspberry pi 3
Bug: 28887278
(cherry picked from 815b23319635d264ae0ce2c8c29a5776a57b8051)
Change-Id: Icfd0116477543af6a3049c14d818c1cff7fc3b93
We now request mdnsd from adb and register a service of type _adb._tcp
for clients to connect to.
Test: Verified service appears in avahi-browse
Bug: 28074466
(cherry picked from 379ac414e4d9f53388d903913022a55695292775)
Change-Id: Ie871b9c8b40e86063cc1e68e8f3e4290ead2d279
Was leaking log_device_t in command path. Cleanup leak in command
path and add thorough clean up on destroy for insurance.
Start grouping related like-type variables in the context structure
for more effective layout.
Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: Ibfbddec2d0e1bce24b87b035d67726cac1395574
The purpose of this demangler is to avoid crashes for any string.
- It does one pass and should avoid going past the end of the string.
- The code avoids recursion to minimize the amount of stack required.
- It cannot demangle all mangled names, but it should be able to work
on nearly all names in normal stack traces.
- If the mangled name is too large, it will stop demangling and return
as if the name is not a demangled name.
Test: Passes new unit tests.
Change-Id: I596f74a533c0e093d1517c6bd11cced07009d321
This patch makes ueventd create by-name symlinks for virtual block
devices when Android is running as a Xen guest OS.
The symlinks will be created under /dev/block/vbd/. For example:
/dev/block/vbd/768/by-name/
Change-Id: Id45da560d13f641d7c8419511c154de9ae8a4ec9
Test: manual
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
- This is to collect data to understand if e2fsck -f option
can be dropped wholly based on information from fs.
- Ideally e2fsck should not fix fs if it was clean shutdown
or if it is not enabling quota.
- The log is added to /dev/fscklogs/log and other system components
can collect it later.
TODO: add mechanism to distinguish old vs new fs generation tool.
bug: 32246772
Test: reboot and check saved logs under different shutdown conditions (clean, non-clean)
Change-Id: Id00fad4c5f8ebbb9f9908164a1026e415df06721
* changes:
DO NOT MERGE ANYWHERE Qemu: make the qemu_pipe_open compatible with old apis
DO NOT MERGE ANYWHERE Emulator: Enhance qemu_pipe.h to handle partial read and write
So _LOG could be overridden by customized logging
implementations in non-Android systems.
Bug: 35919515
Test: Test on device
Change-Id: I0885c15353c0b1bf66f6f156e7f502f326b85d57
Don't try to connect to ourselves in a signal handler (e.g. if someone
does `killall -ABRT tombstoned`).
Test: killall -ABRT tombstoned
Change-Id: Ib69a206f741acb523c9f2883d474c940b6ebfab2
Make tombstones group readable to allow them to be picked up by the
dropbox service.
Bug: http://b/35979630
Test: killall -ABRT rild; dumpsys dropbox
Change-Id: If57cc17563c80d5b5c4887b0937905bffef6b231
Resolve one of the threading issues by creating a private C++ified
copy of getopt_long_r that started out its life as the bionic
getopt_long, but is reentrant. Adds a new state context for the
stderr stream called optstderr. Utilize this new function in logcat.
Control opterr and optstderr to match liblogcat expectations. Correct
and fortify const.
Alternative would be to lock around _all_ getopt callers. This has
the advantage of requiring _no_ locks that could get in the way of
using liblogcat in a signal handler. The log reader interface does
run the risk of incurring locks and heap allocations though, so there
is more work to be done for that final goal.
Test: gTest logcat-unit-tests
Bug: 35326290
Change-Id: Ibb1b374c55d357d5d7fa5ad00bfaf07ae0bc4ba5
To start Treble VTS test, a single AOSP system.img will be flashed onto
the device. The size of AOSP system.img might be different than the
system partition size on device, making locating verity metadata fail
(at the last fixed size of the partition).
This change allows disabling dm-verity on system partition when the
device is unlocked (orange device state) with invalid metadata.
BUG: 35603549
Test: Boot bullhead with a different-sized system.img, checks verity is
not enabled via:
"adb shell getprop | grep partition.system.verified"
Change-Id: Id89d023e82c78ff1902ab7a528431cf7f65e49ad
This makes init log stderr of secilc invoked to compile SELinux
policy. Having an explanation for why secilc failed is very useful for
debugging boot issues.
Test: Device with PRODUCT_FULL_TREBLE boots up just fine
Test: Modified init.cpp to reference non-existent .cil file on a device
with PRODUCT_FULL_TREBLE and confirmed that dmesg now contains the
error message from secilc saying that the file was not found.
Bug: 31363362
Change-Id: I6a3b3576daf0d6fd09e2c79bc43ae63850f44a00
- three properties: .early, .default, .late
- for tracking critical early boot times
bug: 35949600
Test: manual, getprop after boot
Change-Id: I851891518428e6e21cb43a2a6f982ab7db281d4c
Some unittests require libbinderwrapper_test_support.so and fail
because it isn't on userdebug images.
Bug: 30631078, 35804180
Test: `make dist`
(cherry picked from commit 6515f36e43082ea105115de7e34d9cd09c77220a)
Change-Id: I4d8878de8963d0cbd29d6aca4b233ba674121688
android_log_processBinaryLogBuffer and android_log_processLogBuffer
error return should have message and messageLen fields set to zero,
or to a valid-but-truncated buffer so that we can discern the
difference. This will resolve an issue with reporting content from
an uninitialized field in liblogcat should caller add --debug flag.
To enhance the debugging capability, truncated string events because
of the logger limits are provided rather than dropping the field, but
still with an error return.
Some minor coding style issues resolved. Add required, or remove
extraneous spaces. Use C-style comments only.
Test: gtest liblog-unit-tests
Bug: 27405083
Bug: 35326290
Change-Id: I4a7ddd7278fb1c582f921e1ba10e0765fadb791b
The three CIL files comprising split sepolicy are being moved from the
root directory to system and vendor directories based on whether the
file is for platform/system policy or non-platform/vendor policy.
Test: Device boots, no additional SELinux denials. This test was run
for a device which has split policy and for a device which has
monolithic policy.
Bug: 31363362
Change-Id: Ica49f0beae56be0f1cea7117e48bf2f6af8b848b
Commit c7b098ceb5 has changed
the qemu_pipe_open interface to require the "pipe:" prefix in
the service name.
However in APIs 24 and before, the "pipe:" prefix is not required
This causes quite some confusion and bugs since it is very common
to forget the difference when working across differnet APIs.
This CL is meant to make qemu_pipe_open work in both cases by
doing the following:
1. try the service name as is;
2. if it fails, add 'pipe:' prefix and try the service name again.
Change-Id: If9782396c03780fad1aadeb8374eb308517dc963
Include the ABI in seccomp causes.
Slightly improved command-line usage information.
Fix crasher for seccomp failures.
Bug: N/A
Test: crasher
Change-Id: Ie419ecfe72ee4f5ccf49c927be18350a58a66a90
This makes the build system include split SELinux policy (three CIL
files and the secilc compiler needed to compile them) if
PRODUCT_FULL_TREBLE is set to true. Otherwise, the monolitic SELinux
policy is included.
Split policy currently adds around 400 ms to boot time (measured on
marlin/sailfish and bullhead) because the policy needs to be compiled
during boot. This is the main reason why we include split policy only
on devices which require it.
Test: Device boots, no additional SELinux denials. This test is
performed on a device with PRODUCT_FULL_TREBLE set to true, and
on a device with PRODUCT_FULL_TREBLE set to false.
Test: Device with PRODUCT_FULL_TREBLE set to true contains secilc and
the three *.cil files, but does not contain the sepolicy file.
Device with PRODUCT_FULL_TREBLE set to false contains sepolicy
file but does not contain the secilc file or any *.cil files.
Bug: 31363362
Change-Id: I419aa35bad6efbc7f936bddbdc776de5633846fc
Also, remove the clarification that Condition::signal() wakes exactly
one thread as in the presence of spurious wake ups, this clarification
does not provide a safe guarantee to developers.
Bug: 34592766
Test: Build
Change-Id: I34df02e44a70a18fe04ceda858d002ef129c1fd9
The adf hwc event thread now responds to pthread_kill which
allows adf_hwc_close to succeed.
Test: Call "adb shell stop" and check if thread exits.
This change will allow testing of libadfhwc in future patches.
Change-Id: I66d4fc71a058db42af8d42b5d6193378a8b5d972
Add the necessary set mode support to enable HWC2's set_active_config
Test: run gtests located in frameworks/native/services/surfaceflinger/tests/hwc2
Change-Id: I686dce91a2d8fe86db13c66d22f81960c2f8e8f2
adf_getDisplayAttributes_hwc2 gets the display attributes using the updated
enums from HWC2
Test: run gtests located in frameworks/native/services/surfaceflinger/tests/hwc2
Change-Id: I31325c764ccaf65c6d970727b56327d24c7b16d8