am skip reason: Change-Id Ice773436e85d3bf636bb0a892f3f6002bdf996b6 with SHA-1 802864c782 is in history
Change-Id: I5d9baa362fe10e66c7043f47aff86ce6d63e83a0
We were ending up with multiple copies of the proto runtime in the
recovery image, when we need zero.
Before:
784K recovery/root/system/lib64/libadbd_services.so
832K recovery/root/system/lib64/libadbd.so
After:
360K recovery/root/system/lib64/libadbd_services.so
344K recovery/root/system/lib64/libadbd.so
Bug: http://b/150317254
Test: treehugger
Change-Id: I39fbb3959128994f0de2ae0ea47dbc0800c516fe
We want to ignore SIGPIPE within init, but if we use SIG_IGN, that
would be inherited by child processes through exec(), which we do not
want to have happen. We instead set up a real signal handler with a
no-op handler function, that will ignore SIGPIPE within init, but will
not be inherited across exec().
This fixes c29c2baa69 ("init: Add support for native service
registration with lmkd"), when SIG_IGN was introduced.
Note that we caught this issue before shipping a release with that
change, so the major motivation here is to not cause a behavior change
in init.
Bug: 151581751
Test: children of init that don't explicitly block SIGPIPE exit when
sent SIGPIPE
Test: children of init that do explicitly block SIGPIPE do not exit
when sent SIGPIPE
Test: init does not exit when sent SIGPIPE
Test: init exits when sent SIGABRT
Change-Id: Ieda8555fd03836bcd672a422fe673a8369ad9beb
A previous change moved property_service into its own thread, since
there was otherwise a deadlock whenever a process called by init would
try to set a property. This new thread, however, would send a message
via a blocking socket to init for each property that it received,
since init may need to take action depending on which property it is.
Unfortunately, this means that the deadlock is still possible, the
only difference is the socket's buffer must be filled before init deadlocks.
This change, therefore, adds the following:
1) A lock for instructing init to reboot
2) A lock for waiting on properties
3) A lock for queueing new properties
A previous version of this change was reverted and added locks around
all service operations and allowed the property thread to spawn
services directly. This was complex due to the fact that this code
was not designed to be multi-threaded. It was reverted due to
apparent issues during reboot. This change keeps a queue of processes
pending control messages, which it will then handle in the future. It
is less flexible but safer.
Bug: 146877356
Bug: 148236233
Bug: 150863651
Bug: 151251827
Test: multiple reboot tests, safely restarting hwservicemanager
Merged-In: Ice773436e85d3bf636bb0a892f3f6002bdf996b6
Change-Id: Ice773436e85d3bf636bb0a892f3f6002bdf996b6
(cherry picked from commit 802864c782)
This is apparently causing problems with reboot.
This reverts commit d2dab830d3.
Bug: 150863651
Test: build
Merged-In: Ib8a4835cdc8358a54c7acdebc5c95038963a0419
Change-Id: Ib8a4835cdc8358a54c7acdebc5c95038963a0419
am skip reason: Change-Id Ia5f32579a8dcf62d700d974c7f4e3c65647f3b8b with SHA-1 f6abdf6e0d is in history
Change-Id: Id8977e85ca282f029babf366881a283d64329967
am skip reason: Change-Id Id67203bbfbc3e116b6b6efd40428afe48203dcfc with SHA-1 6085cd5a64 is in history
Change-Id: I858a04a8ee2d28599b5f0105919ffffb5e230cf9
am skip reason: Change-Id I2e0bc055ac0c7ba8262875801cdaed9cc30d2cef with SHA-1 227ac56454 is in history
Change-Id: Ifc303527ec4a360247213698fce6a54ba43676b6
am skip reason: Change-Id I0c1dd57f7499e432bb881e1da1beb55f1ff7de05 with SHA-1 f1a975bece is in history
Change-Id: Iab9e62aa760829029ba7b5f17ff0f5ba5d812940
__ANDROID_API__ isn't defined on host, so this check will fail due to
-Wundef. The || is short circuited through, so we can check for host
first and only have the right side of the || evaluated for device
builds.
Bug: 150898477
Bug: 151255209
Test: build
Merged-In: I2e0bc055ac0c7ba8262875801cdaed9cc30d2cef
Change-Id: I2e0bc055ac0c7ba8262875801cdaed9cc30d2cef
(cherry picked from commit 227ac56454)
As requested during the API review.
Bug: 150898477
Test: liblog and libbase unit tests
Merged-In: Id67203bbfbc3e116b6b6efd40428afe48203dcfc
Change-Id: Id67203bbfbc3e116b6b6efd40428afe48203dcfc
(cherry picked from commit 6085cd5a64)
As requested during the API review.
Bug: 150898477
Test: liblog and libbase unit tests
Merged-In: I0c1dd57f7499e432bb881e1da1beb55f1ff7de05
Change-Id: I0c1dd57f7499e432bb881e1da1beb55f1ff7de05
(cherry picked from commit f1a975bece)
This steps up our garbage collection threshold over time when mounting
userdata with checkpointing=disable for f2fs. With this scheme, we step
up the percent of disk we will tolerate being unusable during
checkpointing. At 100%, the filesystem will be able to always mount.
This means we will attempt to mount at most 10 times, for a max time of
about 50 seconds.
Also logs mount time under ro.boottime.init.mount.[target]
If the device does not support checkpoint=disable:[n%], it will mount
with checkpoint=disable, which is equivalent to checkpoint=disable:0%
Test: Boot in checkpointing mode
Bug: 150506496
Change-Id: I047ff98513f4ea832e1216b91e454a57fd2e8bf6
am skip reason: Change-Id I4132fe1a491e7b789311afcf693c1f6493fb9dc5 with SHA-1 843f46e674 is in history
Change-Id: I6d6130bd197b3fbd2df32f8d387d1e58ac1526e5
To be submitted along with changes in apksigner tool and the framework.
Merged to AOSP after that.
Test: adb install --incremental <apk>
go/apk-v4-signature-format
Bug: b/151241461
Change-Id: I26e187f8e389e31e2759037057b96fc6c9cb1e94
am skip reason: Change-Id If418cbe3abdeacb759d59052e6dca4c2067678dd with SHA-1 3ffdad0cb5 is in history
Change-Id: If52caf2e5cc308faef47086fbd749e731eeb1caa
libselinux is currently being copied to APEXes. This is risky because
the library is not designed to be portable; part of it is tied to the
specific version of the Android that it was developed for.
This change fixes the problem by declaring that the library supports
a stub with the list of C APIs that are included in the stub. Then there
is only one copy of libselinux in /system/lib and other APEXes use the
copy by dynamically linking to it.
Also, adbd no longer statically links to it, because doing so brings
libselinux in it.
Bug: 151053366
Test: m com.android.adbd. It doesn't include libselinux in it.
Test: m com.android.adbd-deps-info. then inspect
out/soong/com.android.adbd-deps-info.txt. The dependency to libselinux
is shown as '(external)'.
Exempt-From-Owner-Approval: cherry-pick from AOSP
Merged-In: If418cbe3abdeacb759d59052e6dca4c2067678dd
(cherry picked from commit 3ffdad0cb5)
Change-Id: If418cbe3abdeacb759d59052e6dca4c2067678dd