Commit graph

47456 commits

Author SHA1 Message Date
Josh Gao
6848befe69 Merge "adb: restore generation of public key in adb keygen."
am: fe6cc3e2d3

Change-Id: Ifaa0d70091189374c2294d021ede28d8786b5710
2019-04-29 15:53:43 -07:00
Treehugger Robot
fe6cc3e2d3 Merge "adb: restore generation of public key in adb keygen." 2019-04-29 22:31:17 +00:00
Josh Gao
032989a2ba adb: restore generation of public key in adb keygen.
We don't need the public key to be generated at ~/.android/adbkey.pub,
but it's still useful to be able to generate the public key for use with
ADB_VENDOR_KEYS.

Bug: http://b/119634232
Test: manual
Change-Id: Iecd6ff1bba4af4ba142456034f3faf52bb9e017d
2019-04-29 12:36:32 -07:00
Tianjie Xu
979f05c621 Merge "Support adb rescue wipe command"
am: 56311071fe

Change-Id: I19eea45c09b8a5bc1064701af9b5f4d6bb8494a4
2019-04-29 11:00:14 -07:00
Tianjie Xu
56311071fe Merge "Support adb rescue wipe command" 2019-04-29 17:47:20 +00:00
Andreas Gampe
7b3377cdc6 Merge "Nativeloader: Restrict anonymous namespace creation"
am: d21a090f79

Change-Id: Ic080bbb6bb6f0a8ecadd31ee3d29b89546475782
2019-04-29 09:26:07 -07:00
Treehugger Robot
d21a090f79 Merge "Nativeloader: Restrict anonymous namespace creation" 2019-04-29 16:08:15 +00:00
Martin Stjernholm
487b5784b6 Merge "Fix libnativeloader to correctly link to the platform namespace."
am: bce25d2363

Change-Id: Ic5178afa9241f697d04a8ea93534620582b6d291
2019-04-29 08:21:46 -07:00
Treehugger Robot
bce25d2363 Merge "Fix libnativeloader to correctly link to the platform namespace." 2019-04-29 15:08:52 +00:00
Martin Stjernholm
4ca0ca67bf Fix libnativeloader to correctly link to the platform namespace.
This affected binaries in the Runtime APEX, where the platform namespace is
"platform" rather than "default".

Also extend ANDROID_ADDITIONAL_PUBLIC_LIBRARIES to create links to both to
platform and runtime namespaces, so that it can be used to open up access to
internal libraries in the Runtime APEX as well, which is used by ART gtests
and run tests.

Also update some comments in the ld.config*.txt files to accurately explain
why some namespaces need to be visible, and some other minor changes for
consistency. There are no semantically significant changes in those files.

Test: Flash and boot
Test: Run an ART run test with the internal libarttest.so library
Bug: 130293232
Bug: 121117762
Change-Id: I7ebaf5370dd0f533b1bb5f0e67e7c3c1df48e512
2019-04-29 13:09:08 +01:00
xunchang
c2265c5343 Support adb rescue wipe command
Support `adb rescue wipe` command on the host side. This command runs
under the rescue mode and wipes data (and cache/metadata).

Bug: 131037235
Test: run adb rescue wipe

Change-Id: Ib3a3f2d564cc19d0446540d616cc21489ba558c2
2019-04-26 10:37:13 -07:00
Andreas Gampe
b9df7d936c Nativeloader: Restrict anonymous namespace creation
Create the anonymous namespace only from a non-empty library path.

This is a better heuristic than the current "first-come" one. It
allows creating classloaders that are not directly related to an
app's "main" classloader, that is, do not have any library path.
This is the case, for example, for shared libraries, including
preloaded ones.

Longer-term, the anonymous namespace creation should be made
explicit, so that the framework can have full control.

Bug: 130623656
Test: m
Test: manual
Change-Id: I8251363b372e365d10ae09d23df93d76388ac7f9
2019-04-26 08:55:53 -07:00
Joseph Jang
57f086ea4c Merge "init: Add reboot timeout handler"
am: 67231474fe

Change-Id: I233976350653d41b76c1413aa4b6212b4a206a13
2019-04-26 01:40:51 -07:00
Misha Wagner
2ded863997 Merge "Add UID printing to tombstone headers"
am: 79474ce6f3

Change-Id: I9284850d1dafe216e44feb041c21ca78a8ec64ee
2019-04-26 01:40:11 -07:00
Joseph Jang
67231474fe Merge "init: Add reboot timeout handler" 2019-04-26 08:23:06 +00:00
Misha Wagner
79474ce6f3 Merge "Add UID printing to tombstone headers" 2019-04-26 08:22:17 +00:00
josephjang
aaddf282ec init: Add reboot timeout handler
In order to prevent device stuck at reboot, we try to create shutdownt
monitor thread with a timeout (default 30s). It will dump init process
and blocked tasks call trace in last kmsg then trigger kernel panic to
reboot device.

Test: reboot device

bug: 128561401
Change-Id: Ieb400ab9fbd983544b61241a4f4b8aa2f4baa863
2019-04-26 06:02:09 +08:00
Ian Kasprzak
e285dbeae3 Merge "Revert "Add a way to turn off unique_fd's operator int.""
am: e30fe5fe89

Change-Id: Icfde91e105016922777dc24e0676de9b88b42058
2019-04-25 10:24:50 -07:00
Ian Kasprzak
e30fe5fe89 Merge "Revert "Add a way to turn off unique_fd's operator int."" 2019-04-25 17:16:55 +00:00
Tom Cherry
b7ff39410f Merge "liblog: remove LIBLOG_WEAK"
am: 81f5424560

Change-Id: Ib47fb2cf497fd76159614ae8f8da4383761ee882
2019-04-25 08:59:31 -07:00
Ian Kasprzak
2c58e1924a Revert "Add a way to turn off unique_fd's operator int."
This reverts commit 93d63c010a.

Reason for revert: b/131312539 - All aosp-master-with-phones phones failing boot / health check.

Change-Id: Id4239f93484b7d6b8d9bcd355a59cbd40d9766e2
2019-04-25 15:59:28 +00:00
Tom Cherry
81f5424560 Merge "liblog: remove LIBLOG_WEAK" 2019-04-25 15:43:36 +00:00
Josh Gao
1c6d4f3663 Merge "adbd: reduce queue depths."
am: 0fcd9292c4

Change-Id: Ib73e5111a82c42627df6a8645f58db8a7831bba6
2019-04-24 18:24:49 -07:00
Josh Gao
0fcd9292c4 Merge "adbd: reduce queue depths." 2019-04-25 01:09:23 +00:00
Tom Cherry
927c3d9184 liblog: remove LIBLOG_WEAK
I'm not sure why I didn't remove this when I got rid of the other
functions marked as weak.

Test: build
Change-Id: I45e6bca7be0497e33be88d15afea8bb1d5165380
2019-04-24 17:24:23 -07:00
Nick Kralevich
ba658099a6 Merge "logd: remove SELinux dup handling"
am: 8e6fb82af6

Change-Id: Ifaf6e94171bf99a52fa78697de1aa8ec1047651b
2019-04-24 17:21:04 -07:00
Treehugger Robot
8e6fb82af6 Merge "logd: remove SELinux dup handling" 2019-04-25 00:06:43 +00:00
Dongwon Kang
47a38645c4 Merge "Fix a warning on namespace.media.link.default.shared_libs"
am: 4b43299132

Change-Id: I3dfe37d3c9155071bcdcc20a091d38b472b36b1e
2019-04-24 16:28:02 -07:00
Treehugger Robot
4b43299132 Merge "Fix a warning on namespace.media.link.default.shared_libs" 2019-04-24 23:16:37 +00:00
Josh Gao
7653723999 Merge "Add a way to turn off unique_fd's operator int."
am: 971bae0bcf

Change-Id: I8940d68e1a60ee800df6512da8c269edec7018fe
2019-04-24 16:04:06 -07:00
Josh Gao
4a749cc3f1 Merge "adb: silence warning from libusb."
am: ee5083b3c7

Change-Id: Ib2e398b1c327bd0d6111ab9b686e826683f62833
2019-04-24 16:00:10 -07:00
Josh Gao
a8a1f75147 Merge "adb: fix double close in wait-for-*."
am: e923e5ef62

Change-Id: I78a3ec7ed8c7e438986515217d2e0b3613d89dce
2019-04-24 15:59:10 -07:00
Josh Gao
971bae0bcf Merge "Add a way to turn off unique_fd's operator int." 2019-04-24 22:58:00 +00:00
Treehugger Robot
ee5083b3c7 Merge "adb: silence warning from libusb." 2019-04-24 22:46:28 +00:00
Treehugger Robot
e923e5ef62 Merge "adb: fix double close in wait-for-*." 2019-04-24 22:38:31 +00:00
Josh Gao
28293f16a8 adbd: reduce queue depths.
Each operation we submit results in a contiguous allocation in the
kernel which can trigger OOM-killing. Tune the queue depths to reduce
the chances of this happening, with a minimal impact on performance.

Bug: http://b/126582877
Test: ./benchmark_device.py with blueline
Change-Id: I4b0f83d54a9a9a69f0ab48322d78fb137c94dd35
2019-04-24 15:05:21 -07:00
Nick Kralevich
512a7bfd83 logd: remove SELinux dup handling
Remove the code which attempts to collapse multiple similar SELinux
denials into one denial. SELinux logs are already rate throttled by the
kernel
(https://android-review.googlesource.com/c/platform/system/core/+/941357
for example), so additional filtering here only adds complexity and may
result in SELinux denials being inappropriately suppressed or dropped.

Bug: 118815957
Test: atest logd-unit-tests
Change-Id: I611fa43dc56c99aa992aad002c16c742e6034e5c
2019-04-24 13:32:58 -07:00
Josh Gao
93d63c010a Add a way to turn off unique_fd's operator int.
unique_fd's implicit conversion to int has led to tons of problems (see
all of the overloads for close, fdopen, fdopendir, etc.). Add a switch
that can turn it off, and reduce the ridiculous amount of work to fix up
callers by introducing a borrowed_fd type that can be constructed from
either int or unique_fd.

Test: treehugger
Change-Id: If77cf5cbcaddacdaec5919a15b3520fb68f51a62
2019-04-24 12:59:42 -07:00
Elliott Hughes
f9110b2a3e Merge "libion: convert a header file using update_all.py"
am: 4d89dc0f54

Change-Id: I39a6a7e9ae33b85caa718a68defe4d6f429d68ed
2019-04-24 12:31:02 -07:00
Tom Cherry
b7bcfdbdda Merge "init: simplify async restorecon"
am: 7a03b5d314

Change-Id: Iedb74f126c36151543fee059d71b11842ffaed3e
2019-04-24 12:26:01 -07:00
Elliott Hughes
4d89dc0f54 Merge "libion: convert a header file using update_all.py" 2019-04-24 19:24:32 +00:00
Tom Cherry
7a03b5d314 Merge "init: simplify async restorecon" 2019-04-24 19:14:28 +00:00
Mark Salyzyn
be32ed52ed Merge "bootstat: add .* positive/negative test"
am: 6fbefd1806

Change-Id: Ia82677db63150ee5d17a6705d20926267a67cbc6
2019-04-24 10:21:51 -07:00
Mark Salyzyn
6fbefd1806 Merge "bootstat: add .* positive/negative test" 2019-04-24 17:06:34 +00:00
Mark Salyzyn
aeac7a43d0 bootstat: add .* positive/negative test
Missing test from aosp/949599

Test: boot_reason_test.sh kBootReasonMap
Bug: 116838876
Bug: 128929506
Change-Id: I3a0690cff80b3b2117cf821ece4b81ffdcf50aec
2019-04-24 17:01:58 +00:00
Tom Cherry
fe8154175c init: simplify async restorecon
In the future, property service may run in its own thread or process,
which means that PropertyChildReap() needs to be refactored to not run
as part of the init signal handler.

The new method spawns a new thread that handles the queue of paths
that require restorecon. It then communicates back to property service
via android::base::SetProperty(). Property service distinguishes the
thread from other callers of SetProperty() by checking the pid in the
credentials for the socket connection, thus avoiding dependencies on
the rest of init.

The new method also drops the genericness, since restorecon is the
only function that we should ever need to run asynchronously

Test: async restorecon works, including with queued requests
Change-Id: I2ca00459969e77b1820776dac23d0a0d974e330b
2019-04-24 08:50:10 -07:00
Jone Chou
43571eaa77 Merge "bootstat: add 3 pmic off reasons to known set"
am: f9e9d38697

Change-Id: I5933da45e11a627edbcfc59e6ce770f27a8cb236
2019-04-24 08:01:12 -07:00
Treehugger Robot
f9e9d38697 Merge "bootstat: add 3 pmic off reasons to known set" 2019-04-24 14:51:30 +00:00
Yoshitaka Seto
f86ef1070e libion: convert a header file using update_all.py
ion_4.12.h is ported from old Linux Kernel Driver.
According to the header comment, this is licensed under GPLv2.
This header is referred from ion.c.

To clarify license matter just in case, let's convert it using
update_all.py in bionic repository.

The original header is moved under original-kernel-headers/linux
directory.

Found this during FOSSID trial.

Test: build and boot
Change-Id: Iabd46f33968a0fbce14a501238730714c4f2cfc6
Signed-off-by: Yoshitaka Seto <yoshitaka.seto@sony.com>
2019-04-24 07:02:42 +00:00
Jone Chou
446d6c6d01 bootstat: add 3 pmic off reasons to known set
regular expression:
- "reboot,pmic_off_fault,.*" (175)
- "reboot,pmic_off_s3rst,.*" (176)
- "reboot,pmic_off_other,.*" (177)

regex is dependent on:
https://android-review.googlesource.com/947976

Test: none
Bug: 116838876
Bug: 128929506
Change-Id: I7fae9ecee536f790c8f493c3f5e5f75b03efb1d6
Signed-off-by: Jone Chou <jonechou@google.com>
2019-04-24 14:14:10 +08:00