Commit graph

31696 commits

Author SHA1 Message Date
Hung-ying Tyan
810d71b005 Load default prop from /system/etc/prop.default
/default.prop is moved to /system/etc/prop.default for full Treblized
devices. Modifies property_service to load it from there first.

Bug: 37815285
Test: Tested with ag/2371424. Booted pixel phones, checked the location
      of pro.default, verified the symlink at /default.prop, checked a
      few properties via adb shell and manually tested a few apps.

Change-Id: I485231f21fc86b0aec58edf867e229a31e77d85e
2017-06-09 13:02:56 +08:00
Josh Gao
a1c9e943c0 debuggerd_client: increase pipe buffer size to max.
If a process tries to dump itself (e.g. system_server during ANRs),
crash_dump will block trying to write to its pipe if it's not
sufficiently large. Increase the pipe size to the max, and add a test
to make sure that it's always at least 1MB (the default value).

Bug: http://b/38427757
Test: debuggerd_test
Merged-In: Iddb0cb1e5ce9e687efa9e94c2748a1edfe09f119
Change-Id: Iddb0cb1e5ce9e687efa9e94c2748a1edfe09f119
(cherry picked from commit 5675f3c321)
2017-06-01 16:26:23 -07:00
Josh Gao
8126d2de3e crash_dump: don't notify ActivityManager if it crashed.
Bug: http://b/38427757
Test: killall -ABRT system_server, plus added logging
Merged-In: Ic15e0b0870b1ec08a2f165ad0e5356afed02eece
Change-Id: Ic15e0b0870b1ec08a2f165ad0e5356afed02eece
(cherry picked from commit b0e51e388b)
2017-06-01 16:26:10 -07:00
Josh Gao
615d939974 crash_dump: clear the signal mask.
crash_dump inherits its signal mask from the thread that forked it,
which always has all of its signals blocked, now that sigchain respects
sa_mask.

Manually clear the signal mask, and reduce the timeout to a
still-generous 2 seconds.

Bug: http://b/38427757
Test: manually inserted sleep in crash_dump
Merged-In: If1c9adb68777b71fb19d9b0f47d6998733ed8f52
Change-Id: If1c9adb68777b71fb19d9b0f47d6998733ed8f52
(cherry picked from commit e740250b9d)
2017-06-01 16:25:39 -07:00
TreeHugger Robot
8ecf59439c Merge "init: allow ':' in property names" into oc-dev 2017-05-31 18:09:10 +00:00
TreeHugger Robot
147743176a Merge "libvndksupport: Do not lookup default namespace for sphal failure" into oc-dev 2017-05-31 07:01:41 +00:00
Jayant Chowdhary
f751b13401 Merge "Add vendor_available:true to libmemunreachable" into oc-dev 2017-05-31 03:59:47 +00:00
Jayant Chowdhary
30a365a488 Merge "Mark libprocinfo vendor_avaialable." into oc-dev 2017-05-31 03:59:47 +00:00
Jayant Chowdhary
c9b14b96c1 Merge "Mark libion vendor_available." into oc-dev 2017-05-31 03:59:47 +00:00
Jayant Chowdhary
942e5b2808 Merge "Mark libdiskconfig vendor_available." into oc-dev 2017-05-31 03:59:47 +00:00
Jayant Chowdhary
534d886507 Merge "Mark libnetutils vendor_available." into oc-dev 2017-05-31 03:59:47 +00:00
Jayant Chowdhary
571cee730f Merge "Mark libmetricslogger vendor_available." into oc-dev 2017-05-31 03:59:47 +00:00
Jayant Chowdhary
83c5121b5e Merge "Mark libsuspend vendor_available." into oc-dev 2017-05-31 03:59:47 +00:00
Jayant Chowdhary
b532d0d921 Merge "Mark libsysutils vendor_available." into oc-dev 2017-05-31 03:59:47 +00:00
Jayant Chowdhary
b8c0f4fb04 Merge "Mark libziparchive vendor_available." into oc-dev 2017-05-31 03:59:47 +00:00
Jayant Chowdhary
9feff960e3 Mark libnetutils vendor_available.
libneutils is a library which belongs to vndk-cap. Mark it
vendor_available to enable vndk abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Merged-In: Ief58111dea549224b3bce5cb52fd691d4381fb88
Change-Id: I32938e3e0bcc1e771290d87f561cc06b9b019046
(cherry picked from commit 409731efc1)
2017-05-31 02:02:17 +00:00
Jayant Chowdhary
7633221265 Mark libsysutils vendor_available.
libsysutils belongs to vndk-cap. Mark it vendor_available to enable vndk
abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Merged-In: Ib1490362c5c800e2bdc96ef06e607c93da1006b2
Change-Id: I3ef1d09c7e836549eb13ce68ac7cdcd5923bde0f
(cherry picked from commit a1bdd2412e)
2017-05-31 01:59:42 +00:00
Jayant Chowdhary
6703270d4b Mark libziparchive vendor_available.
libziparchive is a library which belongs to vndk-cap. Mark it
vendor_available to enable header-abi-dumper's invocation to identify it
as a part of the vndk.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Merged-In: Ic414d368d7043083ce9cf9c09d124fb700ac8866
Change-Id: Ibe490cc6c2cfca0f8d58df45317bb3a491d530f0
(cherry picked from commit 2c87bccf46)
2017-05-31 01:58:06 +00:00
Jayant Chowdhary
8cfdf1ba6a Mark libion vendor_available.
libion belongs to vndk-cap. Mark it vendor_available to enable vndk
abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Merged-In: I195145af90433c29ce9e408197e8d7183cb960bc
Change-Id: I8ac290d435b7c4dc5e669bfccb4562495ce92516
(cherry picked from commit 2e31a8c4f9)
2017-05-31 01:56:38 +00:00
Jayant Chowdhary
a3b4253f4e Mark libdiskconfig vendor_available.
libdisckonfig is a library which belongs to vndk-cap. Mark it
vendor_available to enable vndk abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Merged-In: I18ed695d6df0e9848e979ad15eb56fba8923726c
Change-Id: I079869f0120fa33893540b72044ddf25c1d04bf2
(cherry picked from commit 69d1a88097)
2017-05-31 01:54:31 +00:00
Jayant Chowdhary
df1ddab40d Mark libmetricslogger vendor_available.
libmetricslogger is a library which belongs to vndk-cap. Mark it
vendor_available to enable vndk abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Merged-In: Id50e1bb8a7a4fecfde35a63439ac28b1be883e21
Change-Id: If4bb63d3769317bc7cfc0f2f326e8bdd7b565ebe
(cherry picked from commit 7f96d49370)
2017-05-31 01:52:59 +00:00
Jayant Chowdhary
24b34b10c6 Mark libprocinfo vendor_avaialable.
libprocinfo belongs to vndk-cap. Mark it vendor_available to enable vndk
abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Merged-In: I05212410225d4cdb0cfa9abbd8b81071c79667db
Change-Id: Ib79c7e3bdde1c7d3cd9f2bb95c284b4690a22ebb
(cherry picked from commit 4362e5b0f8)
2017-05-31 01:52:14 +00:00
Jayant Chowdhary
8e1b591c57 Mark libsuspend vendor_available.
libsuspend belongs to vndk-cap. Mark it vendor_available to enable vndk
abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Merged-In: Id716171806d71fabd9a67aa6a60189f30a35d2e2
Change-Id: I2243c6d8710b6b2f80375849e82afba28a735507
(cherry picked from commit e37259ec8b)
2017-05-31 01:51:00 +00:00
Vijay Venkatraman
447e14d12f Add vendor_available:true to libmemunreachable
Bug: 38244611
Test: build sailfish

Merged-In: I5f238377784b3a30308e9e5cb0817c71675edddf
Change-Id: Ieb7fdcae4b96a1e1622ba98a7cfb56a95b798452
(cherry picked from commit 52eaeb4825)
2017-05-31 01:48:40 +00:00
TreeHugger Robot
b560e6db6a Merge "fix: ATRACE does not work for libs loaded in sphal namespace" into oc-dev 2017-05-31 00:26:13 +00:00
Tom Cherry
5543b0e848 init: allow ':' in property names
Bug: 62114389
Test: boot bullhead, get/set properties with ':' via command line
Test: trigger an init trigger with a property containing a ':'
Change-Id: Ib51853a1ef9d4f79d510c8175c0d9684e2025e23
(cherry picked from commit 1369379e33)
2017-05-30 16:53:01 -07:00
Jiyong Park
0b3c24bd4f fix: ATRACE does not work for libs loaded in sphal namespace
From O, libutils.so is loaded twice. Once in the default namespace and
once in the sphal namespace for vendor libs. However, since the
framework only communicates with the instance loaded in the default
namespace, report_sysprop_change() event is not notified to the instance
in sphal namespace. This causes ATRACE to not work for vendor libs
loaded in sphal namespace.

So, the instance loaded in default namespace now explicitly redirects
the event to the other instance.

Bug: 62084107
Test: start an app, run 'adb shell atrace gfx --stream'. atrace from the
graphics driver are visible.

Change-Id: Ia6c2ca6bcb9a8849ebb09b5c38d60480c92d4571
2017-05-27 15:32:01 +09:00
Sandeep Patil
be4302bf58 Respect that status property when parsing fstab from device tree
For an fstab entry in device tree, fs_mgr now honors the status property
as done by linux. i.e. the node (in this case, the fstab entry) is
enabled if status is not set, "ok" or "okay". For every other value, the
node is considered as disabled.

Bug: 62127741
Test: Test sailfish w/ no status property, result: boots
Test: Test with status = "disabled", result: skips mounting /vendor
Test: Test with status = "ok", result: boots

Change-Id: I5ff8f710de2c54afc76b4af28108ca9075357ad1
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-05-26 18:09:06 -07:00
Justin Yun
7a1d8a10a8 libvndksupport: Do not lookup default namespace for sphal failure
Instead of looking up default namespace for the failure of loading
sphal libs, report failure. This is only for the devices that have
sphal namespace.

Bug: 38435840
Test: sailfish builds and boots
Test: libvndksupport-tests passes
Change-Id: Ibbff5f2d5d83f6482f98677a5492777db6416967
Merged-In: Ibbff5f2d5d83f6482f98677a5492777db6416967
(cherry picked from commit 17baed1012)
2017-05-26 12:21:56 +09:00
Mark Salyzyn
e57b353597 Merge "liblog: test: android_logger_get_ "kernel" log buffer can be empty" into oc-dev 2017-05-25 16:58:05 +00:00
Dimitry Ivanov
bb958f0f50 Merge "Load vendor public libraries to sphal namespace" into oc-dev 2017-05-25 16:19:31 +00:00
TreeHugger Robot
6ab008d183 Merge "fs_mgr: fix SIGSEGV when ostream << nullptr" into oc-dev 2017-05-25 01:49:01 +00:00
Mark Salyzyn
558f2a166b liblog: test: android_logger_get_ "kernel" log buffer can be empty
(cherry picked from commit 37eaefa9a0)

If user build and for the "kernel" log buffer, allow an empty report.

Test: CTS: User: liblog#android_logger_get_
Test: remove ro.debuggable line from /default.prop,
      run liblog-unit-tests --gtest_filter=*.android_logger_get_
Bug: 62030309
Change-Id: I5f91af07608988f322b3c46574becc308e1d8b13
2017-05-24 12:50:38 -07:00
Dimitry Ivanov
af0264bbe9 Load vendor public libraries to sphal namespace
Load vendor public libraries to sphal namespace
if it exists - preserve old behavior of loading
these libraries to default namespace if sphal
namespace is not present on the device.

Bug: http://b/37410104
Test: cts-tradefed run singleCommand cts --skip-preconditions -m CtsJniTestCases
      on marlin (with enabled sphal configuration) and on angler where ld.config.txt
      is not present.

Change-Id: Iaa3fa437ba2900acc2e5b9c78039fe1553e4c9dd
2017-05-24 11:02:31 -07:00
Bowgo Tsai
98af6b320a fs_mgr: fix SIGSEGV when ostream << nullptr
fstab_rec.fs_options might be nullptr when printing error message.
Use android::base::StringPrintf() to '(null)' when needed.

Bug: 37759782
Test: Boot device and manaully trigger the output
Change-Id: I1bdf4ba57331aaea9dd5e790f6bf9d9b8bdc8b53
Merged-In: I1bdf4ba57331aaea9dd5e790f6bf9d9b8bdc8b53
(cherry picked from commit 59af33c9ed)
2017-05-25 00:25:24 +08:00
Mark Salyzyn
928e606d5a liblog: test: enoent requires userdebug or eng to run
(cherry picked from commit 38dad6c9e4)

Bypass test if we do not have all the prerequisites to run this check
of liblog failure propagation.  We need to be root, or be able to
call su, in order to temporarily stop logd to measure the error
response from liblog.  Basically a "user" build can not have the
levers to deny or fail the logger, preventing our ability to run the
liblog.enoent test.

Test: CTS: User: liblog#enoent
Test: remove ro.debuggable line from /default.prop,
      run liblog-unit-tests --gtest_filter=*.enoent
Bug: 62030441
Change-Id: I52177b8dd3c66d433bddf630e840ee088e13cddc
2017-05-24 09:15:27 -07:00
TreeHugger Robot
ea6826448b Merge "Always print the initial bugreport progress message." into oc-dev 2017-05-24 03:47:09 +00:00
Felipe Leme
899e6321aa Always print the initial bugreport progress message.
Otherwise, it might take seconds to display the initial percentage,
and the user might thing something is wrong and CTRL-C the process.

Fixes: 62003852
Test: added BugreportTest.OkProgressZeroPercentIsNotIgnored
Test: m -j32 adb_test && ./out/host/linux-x86/nativetest64/adb_test/adb_test --gtest_filter=BugreportTest.*

Change-Id: I8e7dbb28666c825c1408d5d204f813064fc3048f
(cherry picked from commit e5d665b46f)
2017-05-23 19:01:18 -07:00
Sandeep Patil
3c8476cd99 shell_and_utils: add vendor shell and toybox targets
Bug: 36463595
Test: Build and boot.

Change-Id: I245d1755546fa597e941badce251c2e8293e998e
Signed-off-by: Sandeep Patil <sspatil@google.com>
(cherry picked from commit 52b20877dc)
2017-05-23 12:58:47 -07:00
Elliott Hughes
00be8a3ecf Switch to a shell_and_utilities phony module.
(cherrypick of 8ad0e66e77c795d11e9cd5c7b576eed0da60537e.)

Bug: 36463595
Test: builds
Change-Id: I700700abb4de76017a2ff811ceff19ea2ee86eb2
2017-05-23 12:58:34 -07:00
Thierry Strudel
64bea883cb Merge "init.rc: import /vendor/etc/init/hw/init.${ro.hardware}.rc" into oc-dev 2017-05-19 18:07:43 +00:00
TreeHugger Robot
6a93fd7e7c Merge "Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."" into oc-dev 2017-05-19 18:07:04 +00:00
Mark Salyzyn
cb0b5e6753 Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."
This reverts commit 6db432daf7.

Test: Build
Bug: 37921982
Bug: 37483427
Bug: 37703469
Change-Id: Ie19221f4383a45e317bc0b190e9a70459706fc79
2017-05-19 14:31:41 +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
Keun-young Park
9c91d90294 add ueventd to shutdown critial process
- In some devices, some drivers still try to load firmware while shutting
  down, and crashes the kernel. So keep ueventd to prevent such case.

bug: 38203024
Test: reboots

(cherry picked from commit 7264bee975)

Change-Id: Ifc725f906de01eba552c782b8ec0d7bd11d089d0
2017-05-18 14:01:53 -07: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
TreeHugger Robot
bf6e949727 Merge "Change the CHECK failure into function failure." into oc-dev 2017-05-17 03:22:27 +00:00
TreeHugger Robot
165dad791d Merge "Use SO_SNDBUFFORCE instead of SO_SNDBUF" into oc-dev 2017-05-17 02:26:01 +00:00
TreeHugger Robot
fbe9427241 Merge changes from topic 'synchronize_vndk-sp' into oc-dev
* changes:
  add libvndksupport.so to ll-ndk
  libbacktrace is VNDK-SP
  add libvndksupport
2017-05-17 01:53:56 +00:00
Daichi Hirono
3df060d6d0 Change the CHECK failure into function failure.
Previously we have CHECK in WriteInternal function to observe short
writing. However it turns out short write can happen according to the
bug report.

To prevent app from crashing due to CHECK failure, the CL removes the
CHECK and let WriteInternal return a failure value.

Bug: 37561460
Test: libappfuse_tests, manually re-wrote the return value of write()
      and checked logcat.
Change-Id: I6a1e233c3ddb8eb68f59e7c606ad0459b5ca2c6e
2017-05-17 10:30:02 +09:00