Commit graph

1507 commits

Author SHA1 Message Date
Bowgo Tsai
144893e5ec Removing $(PRODUCT_OUT)/root/root
Bug: 65570851
Test: boot sailfish
Change-Id: I80c3c3de23c57343187fde207980731b5341bc1f
Merged-In: I80c3c3de23c57343187fde207980731b5341bc1f
(cherry picked from commit ededee3e40)
2017-09-28 18:10:58 +08:00
Treehugger Robot
3d6f85167e Merge "Move adbd from root to system" 2017-08-31 06:22:16 +00:00
Tom Cherry
cb5fccc83c Globally allow up to 32K FDs open per process
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
2017-08-28 13:08:24 -07:00
Mark Salyzyn
73e6b49c0c Switch /data/misc/reboot/last_reboot_reason to persistent property
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
2017-08-24 15:13:48 -07:00
Bowgo Tsai
7b9a4d5bcd Move adbd from root to system
Bug: 63910933
Test: normal boot sailfish, checks adb works
Test: recovery boot sailfish, checks adb works
Test: normal boot bullhead, checks adb works
Test: recovery boot bullhead, checks adb works

Change-Id: I1b27910c06a4172ca718b3344736ec8e3429f477
Merged-In: I1b27910c06a4172ca718b3344736ec8e3429f477
(cherry picked from commit 93defc17f3)
2017-08-24 14:22:07 +08:00
Ryan Campbell
725fa57109 Merge "Include asan options from data partition."
am: 5d89e6c7fe

Change-Id: I22bfd9e46cd377b4532e1726522b8c9fdcdfeb04
2017-08-10 01:11:22 +00:00
Ryan Campbell
ce30d07b11 Include asan options from data partition.
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
2017-08-09 15:32:23 -07:00
Elliott Hughes
601e5ac55b Merge "Add comments to "public.libraries.*.txt"."
am: e7b8fc22af

Change-Id: I8519a128238758433d194f35f6090633aeb85f0a
2017-08-02 19:43:01 +00:00
Treehugger Robot
e7b8fc22af Merge "Add comments to "public.libraries.*.txt"." 2017-08-02 19:34:26 +00:00
Elliott Hughes
bd0ad88202 Add comments to "public.libraries.*.txt".
Folks don't know how to add public native API. Point them in the right
direction.

Bug: 63905942
Test: boots
Change-Id: I5e1f04fb852348255a2f7f87aa961948c41c47fd
2017-07-28 18:07:44 -07:00
Joel Galenson
c4f2163954 Merge "Move chmod of /sys/kernel/debug/tracing to fix tracing."
am: 13c3a582de

Change-Id: I63ca85ffce7aead567c34069135fb066c5a026de
2017-07-28 16:12:23 +00:00
Joel Galenson
d48c4cf234 Move chmod of /sys/kernel/debug/tracing to fix tracing.
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)
2017-07-27 18:06:40 -07:00
Siqi Lin
e5fa38c731 Merge "rootdir: record last build fingerprint"
am: 4e8227420e

Change-Id: I59664c816a8fbf4d7776270b28f4673418d30bcb
2017-07-27 14:33:02 +00:00
Siqi Lin
16bb36197b rootdir: record last build fingerprint
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)
2017-07-26 16:45:10 -07:00
Mark Salyzyn
97e90c6bb8 Merge "rootdir: record last build signature and kernel version"
am: 91a17a41f6

Change-Id: I86afacf1540ad02f5e70c08f39a5c76f98d47c4e
2017-07-14 21:20:22 +00:00
Mark Salyzyn
93394034a2 rootdir: record last build signature and kernel version
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
2017-07-14 11:39:14 -07:00
Robert Benea
92ad7c02d4 Merge "Use mem cgroups in libprocessgroup if they're available"
am: 3c7f566495

Change-Id: I7b50c83c5ba053faf6be62200570738744dd1e7b
2017-07-11 22:01:09 +00:00
Robert Benea
3280e48847 Use mem cgroups in libprocessgroup if they're available
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
2017-07-11 12:48:10 -07:00
Tim Murray
7f857bb9ff Merge "Revert "Use mem cgroups in libprocessgroup if they're available""
am: e8a75e8f76

Change-Id: Iec01b90ae7d49d1eaf4a6e0c5324749a358db5d6
2017-07-08 01:45:50 +00:00
Treehugger Robot
e8a75e8f76 Merge "Revert "Use mem cgroups in libprocessgroup if they're available"" 2017-07-08 01:41:19 +00:00
Tim Murray
fc10e3d5e5 Revert "Use mem cgroups in libprocessgroup if they're available"
This reverts commit 32375c2328.

bug 63164307

Change-Id: I3336bbf7c2f3297b231c5b0a1ef538faff9513fd
2017-07-08 00:04:42 +00:00
Keun-young Park
a4ad5d0328 Merge "add "shutdown critical" to service"
am: b3915d113d

Change-Id: I25b6f42478efda7077e00141042a427245393d28
2017-07-06 00:46:31 +00:00
Treehugger Robot
b3915d113d Merge "add "shutdown critical" to service" 2017-07-06 00:40:55 +00:00
Wei Wang
5b89535442 Merge "init: Support custom shutdown actions"
am: c1bc4241f8

Change-Id: I6bb1789dbc5edbb10f2f4d712e9ca83e6302fdf4
2017-07-05 23:54:56 +00:00
Keun-young Park
cccb34fce8 add "shutdown critical" to service
- "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
2017-07-05 14:55:22 -07:00
Wei Wang
eeab491efd init: Support custom shutdown actions
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
2017-07-05 14:49:57 -07:00
Robert Benea
46706e6824 Merge "Use mem cgroups in libprocessgroup if they're available"
am: d3afc124b6

Change-Id: Idd72671eb144343a73a02bfbde8603265ca78650
2017-06-30 02:32:24 +00:00
Robert Benea
32375c2328 Use mem cgroups in libprocessgroup if they're available
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
2017-06-29 23:49:00 +00:00
Mark Salyzyn
3a156e6c2b Merge changes Ibe1feb39,I05be83e4,If1422e4d
am: a4f086ab20

Change-Id: I7e5d431c992f9860ca7b42ca81edfbfd1d8e0a1c
2017-06-27 21:52:06 +00:00
Mark Salyzyn
4eb0ba058c init.rc: setup console-ramoops-0
On later kernels /sys/fs/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: Ibe1feb39ef9081b1ab2316510674bf181bdc7b0c
2017-06-27 09:32:38 -07:00
Logan Chien
735a32e30e ld-config: Export android.hidl.memory@1.0-impl
am: fb2a4f0874

Change-Id: Ib23a91581514f275642cb05afddbfc5324bca3bb
2017-06-23 05:07:34 +00:00
Logan Chien
fb2a4f0874 ld-config: Export android.hidl.memory@1.0-impl
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)
2017-06-22 20:13:01 +08:00
Logan Chien
7b66b21773 ld-config: Add HIDL memory libs to VNDK-SP
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
2017-06-21 20:15:36 +08:00
Logan Chien
ea2719f9f1 ld-config: Add HIDL memory libs to VNDK-SP
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
2017-06-21 20:10:56 +08:00
Logan Chien
184505597f Add libion.so to vndk-sp
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
2017-06-07 18:31:49 +08:00
Logan Chien
40624c5d1d Add libion.so to vndk-sp
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
2017-06-07 18:13:32 +08:00
Robert Benea
9c18097147 Merge "cgroups used by init must be mounted before any services start" am: 63c15c1b11 am: cc6da8ec5b
am: b30ad069ec

Change-Id: I5627d6720aa0c237aca0cdd1cb75b654cb183158
2017-06-01 08:17:03 +00:00
Robert Benea
c638569c2e cgroups used by init must be mounted before any services start
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
2017-05-31 16:12:23 -07:00
Yueyao Zhu
f97d96b8f4 init.rc: import /vendor/etc/init/hw/init.${ro.hardware}.rc
/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)
2017-05-25 12:02:32 -07:00
Thierry Strudel
b1fad8a5b0 Merge "init.rc: import /vendor/etc/init/hw/init.${ro.hardware}.rc" into oc-dev
am: 64bea883cb

Change-Id: I785aac40d7ee2617213f949fd9074bf6f394c952
2017-05-19 18:12:51 +00:00
Yueyao Zhu
f7c34ad4bf init.rc: import /vendor/etc/init/hw/init.${ro.hardware}.rc
/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
2017-05-18 17:29:49 -07:00
Jiyong Park
ee7da4f37d Allow vndk-sp to be extended by vendors
am: eb9694a2d1

Change-Id: I35e4a6f0f7a712e01923a9e1d3456c81d5c0367a
2017-05-17 16:52:13 +00:00
Jiyong Park
eb9694a2d1 Allow vndk-sp to be extended by vendors
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
2017-05-18 01:42:27 +09:00
Jiyong Park
c9c527f81f resolve merge conflicts of fbe942724 to oc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Merged-In: I137c17d55940b783eab6d0125bc4d26b96bcc2f2
Change-Id: I90c3ff7c82a9b53ce00057fd87cf227d5faf0975
2017-05-17 14:29:44 +09:00
Jiyong Park
15d7483bb7 add libvndksupport.so to ll-ndk
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)
2017-05-15 11:35:34 +09:00
Jiyong Park
abaab6ff03 libbacktrace is VNDK-SP
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)
2017-05-15 11:35:34 +09:00
Steve Muckle
e8240c4551 Revert "disable module loading after BOOT_COMPLETED broadcast"
am: f59c55aa7a

Change-Id: Ib871ab1f2005c074dad0dd207e4dc41bd35568d6
2017-05-12 18:26:20 +00:00
Siarhei Vishniakou
b995b58631 Merge "Adding 'uhid' permission for access to /dev/uhid." am: cecbc9993d am: 04daed4793
am: d819380f50

Change-Id: If06b07c88276c32cdf5b53e6afcf0563e6538544
2017-05-12 01:00:46 +00:00
Siarhei Vishniakou
cecbc9993d Merge "Adding 'uhid' permission for access to /dev/uhid." 2017-05-11 19:02:32 +00:00
Siarhei Vishniakou
0729dd1edb Adding 'uhid' permission for access to /dev/uhid.
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
2017-05-11 01:28:53 +00:00