We've seen crashes due to processes exceeding the current soft limit
for open FDs of 1024, mainly due to increases in using FDs for shared
memory and gralloc memory objects.
There is not a compelling reason to keep this limit artificially low,
so we raise it to 32K. This matches my desktop linux limit, so it is
with precedent.
Bug: 64894637
Test: open 32K FDs in a process without failure then fail after 32K
Change-Id: Ibecfc486e9c61f273a432a108893137d2d13a530
Switch from /data/misc/reboot/last_reboot_reason to persistent
Android property persist.sys.boot.reason for indicating why the
device is rebooted or shutdown.
persist.sys.boot.reason has a standard as outlined in b/63736262 and
the associated investigation. Made adjustments to the values so that
we did not create a problem even before we started. Compliance is
part of the tests in boot_reason_test.sh.
Test: system/core/bootstat/boot_reason_test.sh
Bug: 64687998
Change-Id: I812c55a12faf7cb7ff92101009be058ad9958d07
Look for asan options under /data/asan so that multi-process coverage
can be enabled on a newly-started remote process without disabling
verity and without forcing it to be always-on.
Test: adb shell echo "include_if_exists=/data/asan/asan.options.%b" >>
/system/asan.options && adb shell echo
"coverage=1\ncoverage_dir=/data/misc/trace" >
/data/asan/asan.options.android.hardware.light@2.0-service && adb shell killall
android.hardware.light@2.0-service
Bug: 64019182
Change-Id: I241ad8478439323681dc1cfde2fa0770f030ae75
Folks don't know how to add public native API. Point them in the right
direction.
Bug: 63905942
Test: boots
Change-Id: I5e1f04fb852348255a2f7f87aa961948c41c47fd
This is a temporary fix, since we're still not sure exactly what the
bug is.
Bug: 62547086
Test: Built, flashed, and booted Sailfish. Verified that the file has
the correct permission and that wifi and atrace work.
Change-Id: I43275e974a11754eca274f1b77d15cdd03a3b365
(cherry picked from commit 62962dd5b7)
We can't copy /default.prop so just write the value of
$(ro.build.fingerprint) to /data/misc/recovery/ro.build.fingerprint
and rotate it after reboot instead.
Bug: 62793047
Test: manual - reboot phone and check /data/misc/recovery
Change-Id: I130a4b7a01d9e1bfe9baecde2781626eb72e768b
(cherry picked from commit b9b76de6ff)
Rotate /default.prop and /proc/version into /data/misc/recovery/
as an aid in determining the vintage of the LAST_LOGCAT and
LAST_DMESG in the bugreport collection.
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: manually confirm content rotation through reboots
Bug: 62793047
Change-Id: Ibbe546c76041f20e308e58e5548939afac75db97
Use mem cgroups if the kernel is built with CONFIG_MEMCG=y,
additionally add system group.
test: verified on both kernel with/without memcg enabled
Change-Id: Ia2ae89efa3905e9da68fa77adac1225c667864d1
- "shutdown critical" prevents killing the service during
shutdown. And the service will be started if not running.
- Without it, services will be killed by SIGTERM / SIGKILL during shutdown.
- Even services with "shutdown critical" will be killed if shutdown
times out.
- Removes ueventd and vold from hard coded list. Each service's rc will
be updated to add "shutdown critical". watchdogd is still kept in the list.
bug: 37626581
Test: reboot and check last kmsg
Change-Id: Ie8cc699d1efbc59b9a2561bdd40fec64aed5a4bb
We have been seeing panics and errors during shutdown sequence in
some vendor's platform, and it is required to disable error handling
during shutdown.
This CL separates the shutdown request to execute another "shutdown"
trigger at the beginning of shutdown stage. And vendor can use this
trigger to add custom commands needed for shutting down gracefully.
Bug: 38203024
Bug: 62084631
Test: device reboot/shutdown
Change-Id: I3fac4ed59f06667d86e477ee55ed391cf113717f
Use mem cgroups if the kernel is built with CONFIG_MEMCG=y,
additionally add system group.
test: verified on both kernel with/without memcg enabled
Change-Id: Ib9d1c8e3c797e75f160e0e92edf3f11c9d8e9f17
This commit exports android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace. This fixes
libhidlmemory.so failure.
Note: Exposing android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace shall be fine because its
APIs are frozen and won't be changed in the future.
Note: android.hidl.memory@1.0-impl.so is NOT exported to sphal linker
namespace.
Bug: 35107583
Bug: 62778280
Test: Write a test SP-HAL lib which links libhidlmemory.so, load that
SP-HAL lib into system executable, and make sure mapMemory() works.
Test: sailfish boots w/o problems.
Merged-In: Ia36350dcf1f8c8dc6d7bf2c7a6ae65e0ebaef578
Merged-In: Iddb723558c3a814a905cd42797594a707bc651da
Change-Id: I69034595b2cd355e786ce7943fed7dddf1b12525
(cherry picked from commit bd7503dae7)
(cherry picked from commit 3251e582f2)
This commit adds libhidlmemory.so and android.hidl.memory@1.0.so to the
exported libs of the `vndk` linker namespace (aka. VNDK-SP). This is
necessary because some vendors' GLES implementation uses
libhidlmemory.so. Check http://b/35107583#comment15 for the context.
Bug: 35107583
Test: sailfish boots
Merged-In: Idb5ba4ed4a89795e0e6105d55a84e7f6bbffff51
Change-Id: I1556b7499bd981af995f000519b7a314c70567d1
This commit adds libhidlmemory.so and android.hidl.memory@1.0.so to the
exported libs of the `vndk` linker namespace (aka. VNDK-SP). This is
necessary because some vendors' GLES implementation uses
libhidlmemory.so. Check http://b/35107583#comment15 for the context.
Bug: 35107583
Test: sailfish boots
Merged-In: Idb5ba4ed4a89795e0e6105d55a84e7f6bbffff51
Merged-In: I1556b7499bd981af995f000519b7a314c70567d1
Change-Id: I5af7c954d432a2e8de6c6b744cedbada836bbd98
This commit adds libion.so to VNDK-SP so that some vendor's
gralloc.${chipset}.so can run without problems.
Bug: 62280700
Test: Boots a device from our partners
Merged-In: I2bcfe40ed9342de6d81dd310313e984a2c64964b
Change-Id: Ib745dfe52107d792296426b097e13b7c7755d88c
This commit adds libion.so to VNDK-SP so that some vendor's
gralloc.${chipset}.so can run without problems.
Bug: 62280700
Test: Boots a device from our partners
Merged-In: Ib745dfe52107d792296426b097e13b7c7755d88c
Merged-In: I2bcfe40ed9342de6d81dd310313e984a2c64964b
Change-Id: If30657b93157a2abea29fadcdb0004b37ad9eaf2
init uses /acct and optionally /dev/memcg for tracking services and
therefore these must be started before any services start.
Test: check that cgroups are mounted appropriately.
Change-Id: Ice095287963181fe687dbe6b7d291076e674d1cc
/init.${ro.hardware}.rc would sometime rely on being parsed before other
.rc files. In this case all vendors are still able to have a .rc file
included before all the ones in /vendor/etc/init.
Merged-In: I3fb6df13a39204a516874ea94f5e5ad84bca42c6
Bug: 38301110
Change-Id: I3fb6df13a39204a516874ea94f5e5ad84bca42c6
(cherry picked from commit f7c34ad4bf)
/init.${ro.hardware}.rc would sometime rely on being parsed before other
.rc files. In this case all vendors are still able to have a .rc file
included before all the ones in /vendor/etc/init.
Bug: 38301110
Change-Id: I3fb6df13a39204a516874ea94f5e5ad84bca42c6
Exteded vndk-sp should go to /vendor/lib/vndk-sp.
Bug: 37940694
Test: sailfish builds and boots
Test: manually copying a lib from /system/lib/vndk-sp to
/vendor/lib/vndk-sp. Check that the copied one in /vendor partition is
loaded instead of the original one.
Change-Id: Ia5dd6f35bd31d4a20a794bec148e1fc3c6d7b72b
Test: I solemnly swear I tested this conflict resolution.
Merged-In: I137c17d55940b783eab6d0125bc4d26b96bcc2f2
Change-Id: I90c3ff7c82a9b53ce00057fd87cf227d5faf0975
libvndksupport.so is a new member of ll-ndk.
Bug: 37323945
Test: sailfish builds and boots
Merged-In: Ic5db48292a30a6face7f263d939f27a0760240b1
Change-Id: Ic5db48292a30a6face7f263d939f27a0760240b1
(cherry picked from commit 7000859b7c)
libbacktrace and its dependents are now VNDK-SP. Since they are in
/vendor/lib/vndk-sp directory, they are accessible directly from the
vndk namespace. Therefore, libbacktrace is removed from the exported
shared libs list of the default namespace.
Bug: 37413104
Test: sailfish builds and boots
Merged-In: I137c17d55940b783eab6d0125bc4d26b96bcc2f2
Change-Id: I137c17d55940b783eab6d0125bc4d26b96bcc2f2
(cherry picked from commit b2a4b8cd18)
This CL is in support of another CL c/2048848, topic
'Refactor hid command in /frameworks/base/cmds' in
internal master. Adding the permissions for
shell here to access uhid_node as part of the
new 'uhid' group.
Bug: 34052337
Test: Tested on angler, bluetooth mouse works OK.
Change-Id: If9e100aa1262d689fb8adc5c0ce93f157c96399e
This reverts commit 6ed19d1675.
Allow devices to decide for themselves whether to allow
module loading after boot.
Bug: 38204366
Test: boot sailfish, load a kernel module
Change-Id: Ib9e77381de9003fb5160463664015a95316ddfc5