Commit graph

42589 commits

Author SHA1 Message Date
Treehugger Robot
c2501fda60 Merge "adbd: fix remount on non-system-as-root devices." 2018-09-14 23:24:44 +00:00
Peter Collingbourne
9cd2a8c2b5 Merge "libadbd_services: Link libselinux dynamically instead of statically." 2018-09-14 22:45:55 +00:00
Josh Gao
96d445d846 adbd: fix remount on non-system-as-root devices.
The system image is now a root image, even on devices that don't use
system-as-root. Fix remount to always remount /, to account for this.

Bug: http://b/115751838
Test: `adb remount; adb shell mount | grep " / "`
Change-Id: I2d89a795bd0bc53af33fe69c9d049bbb64d26f3b
2018-09-14 14:32:27 -07:00
Treehugger Robot
8485d59790 Merge "Add OWNERS for libprocessgroup" 2018-09-14 21:08:32 +00:00
Tom Cherry
b1cb37b077 Add OWNERS for libprocessgroup
Test: n/a
Change-Id: I7c069e439cf1d9d26fd5274647567fb1c5575a72
2018-09-14 11:13:22 -07:00
Tom Cherry
0799f44497 Merge "Fixed the can not kill some process using libprocessgroup" 2018-09-14 18:11:17 +00:00
Treehugger Robot
6d899718ef Merge "storaged: change log level for health HAL calls" 2018-09-14 15:37:00 +00:00
Tom Cherry
11b4cde8be Merge "init: allow using the recovery image for 1st stage init" 2018-09-13 23:46:14 +00:00
Tom Cherry
bbb1d1a698 init: allow using the recovery image for 1st stage init
For A/B devices, the recovery image is typically provided as a ramdisk
paired with boot.img.  Instead of repartitioning these devices to have
a separate recovery partition and have the new 1st stage ramdisk
paired with the boot.img, this allows setting
androidboot.force_normal_boot=1 on the kernel command line to have init
in recovery boot directly to a normal boot.

This requires /system_recovery_mount to be added in the DT fstab for
the system partition.

Bug: 114062208
Test: hikey boots
Change-Id: I1e331b5cca91152d20ca92549779ab41aa9cd431
2018-09-13 23:45:58 +00:00
Peter Collingbourne
fc0373706d libadbd_services: Link libselinux dynamically instead of statically. 2018-09-13 14:34:04 -07:00
Yifan Hong
539ee58b41 storaged: change log level for health HAL calls
Devices that does not implement getDiskStats and getStorageInfo
returns NOT_SUPPORTED as a value. Do not log to error stream in
this case.
Fixes: 114475810
Test: boots

Change-Id: I95e9ebe23b4dee451cb8f6e8dc0b60a224006600
2018-09-13 09:41:46 -07:00
fengshaobo
950f6f367e Fixed the can not kill some process using libprocessgroup
In DoKillProcessGroupOnce function, if process has a child process, pids set
will be clear probability and initialPid will not be killed, when the pid
is equal to initialPid.

Test: manual - start duomi app and remove it use recent apps key
Change-Id: Ifb9f4acacd725d2c367e547d2b5512807bb44fec
2018-09-13 15:13:13 +08:00
Treehugger Robot
4cd979fe67 Merge "Fix multithreaded backtraces for seccomp processes." 2018-09-13 05:11:25 +00:00
Josh Gao
6f9eeecd2b Fix multithreaded backtraces for seccomp processes.
Add threads to the existing seccomp backtrace test to prevent
regressing this.

Bug: http://b/114139908
Bug: http://b/115349586
Test: debuggerd_test32
Test: debuggerd_test64
Change-Id: I07fbe1619b60f0008deb045a249f9045404478c2
2018-09-12 18:12:13 -07:00
Dimitry Ivanov
6590255dbb Merge "Add error_msg argument to CloseNativeLibrary" 2018-09-12 17:49:36 +00:00
Martijn Coenen
dc78882bd1 Merge "init: Allow restricted use of binder." 2018-09-12 08:39:50 +00:00
dimitry
3150f7c7af Add error_msg argument to CloseNativeLibrary
error_msg is set when dlclose/NativeBridgeUnloadLibrary fails.

Bug: https://issuetracker.google.com/79126103
Test: make
Change-Id: I043580209538ff47320e8d9a304a21c00c4b149f
2018-09-12 01:36:06 +02:00
Treehugger Robot
d361839b30 Merge "add the impementation of delete_key, delete_all_key for Legacy HAL" 2018-09-11 22:40:31 +00:00
Justin Yun
84d462d885 Merge "Restore "Check if current ld.config.txt files is backward compatible"" 2018-09-11 05:12:44 +00:00
Justin Yun
79d07bcfc3 Restore "Check if current ld.config.txt files is backward compatible"
This reverts commit bd2b0c78a1.

Reason for revert:
Solved the build error on mac_sdk build by using python2

Bug: 112738739
Bug: 111417344
Test: make ld.config.txt

Change-Id: Ic5a3ed2e6b091813c0310f859b7d20935514a7c6
2018-09-11 09:45:09 +09:00
Roberto Pereira
9a56873214 Merge "trusty: keymaster: remove unnecessary group from trusty KM3 HAL service" 2018-09-10 19:20:04 +00:00
Roberto Pereira
1b4ab72459 trusty: keymaster: remove unnecessary group from trusty KM3 HAL service
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: Ib943a9aa5a0cab27913173a68932db651e991907
2018-09-10 19:19:44 +00:00
Treehugger Robot
2bb47ecb4c Merge "Revert "Check if current ld.config.txt files is backward compatible"" 2018-09-10 18:53:32 +00:00
Yohei Yukawa
bd2b0c78a1 Revert "Check if current ld.config.txt files is backward compatible"
This reverts commit 15bac6bdaf.

Reason for revert:
This caused build errors in mac_sdk build.
Seems that our mac builders do not have python3.

  env: python3: No such file or directory

Bug: 112738739
Bug: 111417344
Test: presubmit
Change-Id: I9796f2e9a54a66fc7a4e1c780c8c272b98ed437f
2018-09-10 16:40:59 +00:00
Treehugger Robot
8307ad3d2d Merge "Check if current ld.config.txt files is backward compatible" 2018-09-10 08:11:46 +00:00
Justin Yun
15bac6bdaf Check if current ld.config.txt files is backward compatible
The ld.config.txt file is a template to be used for current build as
well as for the VNDK snapshots for old vendor partitions.
To work with the old Android vendor partitions, the ld.config.txt
template must be backward compatible.
This script checks if the current ld.config.txt template modifies or
deletes the vendor directores in every section. If the change is
detected, it will report a build error.

Bug: 112738739
Bug: 111417344
Test: make ld.config.txt
Change-Id: I1211696d6a00a37d531d40c894f1d7e64b210ae5
2018-09-10 11:42:35 +09:00
Idries Hamadi
5e26856b98 Merge "Small clean ups for issues raised in reviews of fastdeploy" 2018-09-08 12:11:48 +00:00
Treehugger Robot
e9997f8152 Merge "Integrate with fastboot HAL to get partition type" 2018-09-08 02:47:41 +00:00
Treehugger Robot
756e28ee0c Merge "adb: win32: test for Unicode console output" 2018-09-08 01:35:29 +00:00
Josh Gao
c8d3853a14 Merge "adb: win32: set thread names" 2018-09-07 22:18:18 +00:00
Treehugger Robot
d812d0dada Merge "fs_mgr: liblp: delete all MetadataBuilder copy and move constructors" 2018-09-07 20:23:34 +00:00
Hridya Valsaraju
bf9f8d1a64 Integrate with fastboot HAL to get partition type
Bug: 79480454
Bug: 78793464

Test: fastboot getvar partition-type:userdata

Change-Id: Ib096ee8061568b8503f3a3f2dbb7e19a932162c4
2018-09-07 12:22:00 -07:00
Treehugger Robot
74fa589e94 Merge "fastbootd: Wait for /dev/block paths when opening logical partitions." 2018-09-07 18:25:48 +00:00
Idries Hamadi
4af6ee4784 Small clean ups for issues raised in reviews of fastdeploy
Removed support for -f shortcut flag as this conflicts with some package manager flags
Renamed use_localagent global to match conventions
Fixed case where tmp files were created unnecessarily
Removed dead code (delete_host_file)
Cleaned up multiple layers of error handling by using fatal() as soon as error conditions occur

Fix: 113631900

Test: mm
Test: adb install -r --fastdeploy --nostreaming --force-agent --local-agent ~/example_apks/example.apk
Test: adb install -r --fastdeploy --no-streaming --force-agent --local-agent ~/example_apks/example.apk
Test: observe that fast deploy works as usual

Test: adb install -r -f --nostreaming --force-agent --local-agent ~/example_apks/example.apk
Test: adb install -r -f --no-streaming --force-agent --local-agent ~/example_apks/example.apk
Test: observe that fast deploy is no longer invoked by -f
Change-Id: Ic719df1003ac319e48b32f7f377f6f91d17f6a6f
(cherry picked from commit 0584689beaff604ceeccaf706dc368213d07b977)
2018-09-07 15:35:19 +01:00
Martijn Coenen
62e985a954 init: Allow restricted use of binder.
Allow init to use binder, but in a restricted way:
- No binder threadpool
- Other processes can't initiate calls to init
- No death recipients

This change adds libbinder/libutils and calls into ProcessState,
which also calls into the kernel driver and sets up state there.
No other binder calls are made, so that we can let this soak for
a while to see if there any bad side effects of just loading
these libraries and initializing the kernel driver.

This introduces about 120kB of additional memory usage (PSS),
mostly due to pulling in libbinder and libutils and the private
state they have.

We also don't include these libraries in the recovery version of
init, because space on the recovery partition is limited.

Bug: 112684055
Test: device still boots, /d/binder/proc/1 shows init state
Change-Id: I972b1eebdb16337f52e20d1f614e3a0dce0f06d2
2018-09-07 15:47:21 +02:00
Treehugger Robot
29247e5133 Merge "healthd: Drop the unneeded include path." 2018-09-07 02:44:31 +00:00
David Anderson
c8ac4e7644 fastbootd: Wait for /dev/block paths when opening logical partitions.
Note that in addition to waiting for the path to appear, we must also
wait for it to be unlinked. Otherwise, we could accidentally access an
older device when opening and closing the same partition twice in a row.

Bug: 114198005
Test: fastboot flashall works
Change-Id: Iddffc34e1ac8aa066c28e7b1a92b09b6dfd7945c
2018-09-06 17:38:06 -07:00
Treehugger Robot
0a8f61530b Merge "debuggerd_client: improve error logging." 2018-09-06 22:37:18 +00:00
Tao Bao
b6ccc78e0c healthd: Drop the unneeded include path.
libminui has been exporting headers since Oreo.

Test: mmma -j system/core/healthd
Change-Id: Iaadfa526619dcd4837a97b78cfa03dc69ffa4000
2018-09-06 15:14:31 -07:00
Treehugger Robot
e36f911a92 Merge "libdm: GetDmDevicePathByName log warning" 2018-09-06 21:58:30 +00:00
Josh Gao
be0c1af6f0 debuggerd_client: improve error logging.
system_server is sometimes failing to dump with the following error:

    libdebuggerd_client: received packet of unexpected length from tombstoned: expected 128, received -1

Improve the logging to try to figure out what's going on.

Bug: http://b/114139908
Test: treehugger
Change-Id: Iee1bdc0891b9fc7bd80a330495ec22a530febddb
2018-09-06 13:00:57 -07:00
Suren Baghdasaryan
83193c6c78 Merge "lmkd: rate-limit and cleanup failed kill reports" 2018-09-06 18:25:49 +00:00
Tom Cherry
5b993e3861 Merge "Move zygote start after loading persist properties" 2018-09-06 18:23:42 +00:00
Wei Wang
fa14d21ca4 Move zygote start after loading persist properties
Currently zygote is started before loading persistent properties which
stops ART honor experiment flags planned landed as persistent
properties.

The original motivation is we would like zygote be started as early as
possible and loading persistent properties taking time, but after fix of
b/64392887 loading persist properties is now only taking 3ms on P18, 6ms
on P16 respectively.

Bug: 114044733
Test: Boot
Change-Id: Ibc118966e975c741ee8ea47091b14d691692bf2c
2018-09-06 10:29:00 -07:00
Greg Kaiser
1fd4b364fc Merge changes I891f64fb,I6182d84e
* changes:
  logcat: Fix buffer size
  UsbTransportSniffer: Defensively use 'final'
2018-09-06 17:11:13 +00:00
Tom Cherry
04ccbfd62c Merge "fastboot: remove command queue" 2018-09-06 16:07:18 +00:00
Idries Hamadi
50fe7eab0a Merge "Modified fastdeploy dependencies to ensure that fast deploy is build as part of 'sdk' target" 2018-09-06 15:32:47 +00:00
Greg Kaiser
5b0bf8ae55 logcat: Fix buffer size
We need an additional byte for the NUL terminator in two
buffers.

Test: TreeHugger
Change-Id: I891f64fb29170c803da65743d6b911b69ce6e4f4
2018-09-06 06:20:09 -07:00
Greg Kaiser
33b07ba96c UsbTransportSniffer: Defensively use 'final'
UsbTransportSniffer invokes the virtual method Close() within
its destructor.  This usage is fine right now, but if a future
class inherited from UsbTransportSniffer and overrode the Close()
method, then this destructor would not act as expected.

To protect against this, we declare Close() 'final' in
UsbTransportSniffer, and add a comment.

Test: Treehugger
Change-Id: I6182d84e7caf67cb06f37c22c6203ad6d6e57f34
2018-09-06 06:18:01 -07:00
Idries Hamadi
7575cd90e5 Modified fastdeploy dependencies to ensure that fast deploy is build as part of 'sdk' target
deploypatchgenerator is now a dependency of adb
deployagent is now a java_binary target and uses the built in 'wrapper' parameter to bundle deployagent.sh
fastdeploy.cpp code in adb modified to reference deployagent rather than deployagent.sh (required to work with built in wrapper functionality).
removed near-redundant fastdeploy_init and TFastDeployConfig singleton as per:
https://android-review.googlesource.com/c/platform/system/core/+/740521/12/adb/client/fastdeploy.cpp#36
relocated kFastDeployMinApi to more appropriate location

Test: rm -rf $ANDROID_ROOT/out
Test: make sdk -j40

Test: find out/ -iname deploypatchgenerator
Test: observe that deploypatchgenerator.jar has been built as a dependency of the sdk target

Test: mm
Test: adb install -r -f --force-agent --local-agent ~/example_apks/example.apk
Test: adb install -r -f --no-streaming --force-agent --local-agent ~/example_apks/example.apk

Change-Id: I4e52d32f87774b44845bf6b5be0bae331a0b2324
2018-09-06 10:05:54 +00:00