Commit graph

46901 commits

Author SHA1 Message Date
David Anderson
53fabb5a09 Merge changes I88689889,Ibfd66734
am: e2d977bffd

Change-Id: I01ca951c36aa0c0458296839810eac341b7b0b30
2019-03-18 14:00:01 -07:00
David Anderson
e2d977bffd Merge changes I88689889,Ibfd66734
* changes:
  liblp: Reclaim wasted space from unaligned partitions, v2.
  Revert "liblp: Reclaim wasted space from unaligned partitions."
2019-03-18 20:09:44 +00:00
Yifan Hong
98d4fc0d13 Merge changes from topic "libprocessgroup"
am: 830f837231

Change-Id: Icb325b97b2177538a2bcada2cd398f562e8f7da1
2019-03-18 10:06:09 -07:00
Yifan Hong
830f837231 Merge changes from topic "libprocessgroup"
* changes:
  libprocessgroup: Add VTS tests for vendor JSON files
  libprocessgroup_proto_test split into multiple files
2019-03-18 16:53:47 +00:00
Victor Hsieh
67111febbe Merge "mini-keyctl: support printing security label"
am: 9555bd40ce

Change-Id: Ia9d3afcc37c5b0b66f4214aad8acd1c8f1792070
2019-03-18 09:09:48 -07:00
Treehugger Robot
9555bd40ce Merge "mini-keyctl: support printing security label" 2019-03-18 15:52:28 +00:00
Dongwon Kang
5698f77f5f Merge "List stable libraries media apex relies on."
am: fc0f79f8a8

Change-Id: I5acb7f6e867c40b929446d99d81c601837a1b5ac
2019-03-15 22:39:18 -07:00
Dongwon Kang
fc0f79f8a8 Merge "List stable libraries media apex relies on." 2019-03-16 05:34:09 +00:00
Josh Gao
a6397564b6 Merge "adb: avoid sign extension of shell return code."
am: b5ac15a936

Change-Id: Ib4018e339435eb8a4c79070c1096f076996d0386
2019-03-15 21:14:34 -07:00
Treehugger Robot
b5ac15a936 Merge "adb: avoid sign extension of shell return code." 2019-03-16 04:07:20 +00:00
Andreas Gampe
a0cc42381c Merge "Init: Load fsverity keys earlier"
am: f09ef56056

Change-Id: Id4fa13d970a379d449376be56a37eae1ac1f118b
2019-03-15 19:19:33 -07:00
Treehugger Robot
f09ef56056 Merge "Init: Load fsverity keys earlier" 2019-03-16 02:05:33 +00:00
Mark Salyzyn
7c55e2a88d Merge "init: add MountHandler property handler"
am: f2dadd019d

Change-Id: I4bcff7b7fa81b357710cb2a6df06ad6b93dccf9f
2019-03-15 18:25:30 -07:00
Treehugger Robot
f2dadd019d Merge "init: add MountHandler property handler" 2019-03-16 01:15:18 +00:00
Dongwon Kang
a013e3d53d List stable libraries media apex relies on.
With allow_all_shared_libs, the libs under /system/lib may be used
instead of libs included in the apex. This change adds stable libraries
the media apex relies on to prevent this case.

Test: dumpsys media.extractor, atest MediaPlayer2Test
Bug: 127791685

Change-Id: I6a0419e6da9e9f48a394257b1e8f977ec2dfa9a1
2019-03-15 17:23:03 -07:00
Yifan Hong
e8e2756f93 libprocessgroup: Add VTS tests for vendor JSON files
Test: vts_processgroup_validate_test
Bug: 123664216
Change-Id: I5518e34cde6fc30195fc99133f86cb23ae3be92f
2019-03-15 16:28:42 -07:00
Victor Hsieh
327037f063 mini-keyctl: support printing security label
Test: mini-keyctl security <key_id>
Bug: 128607724
Change-Id: If92b41d0aa96d626933546391b964ca2a8a48703
2019-03-15 16:01:01 -07:00
Josh Gao
e60f681f7c Merge "adb: attempt to exec newer adb servers on Linux."
am: eecd5cc532

Change-Id: Idceeb6dee8a2ecba374657dcb786d2a3960ea84d
2019-03-15 15:35:41 -07:00
Andreas Gampe
e8565ac94a Init: Load fsverity keys earlier
Keys may be required for apex updates (post-installs), so load them
before starting apexd.

Bug: 125474642
Test: m
Test: manual
Change-Id: I32ddb6ae6854334e8ee7e195173ecfaed565d783
2019-03-15 15:14:35 -07:00
Josh Gao
1e1ae45a8c adb: avoid sign extension of shell return code.
Windows has int32_t return codes, which results in return codes 128-255
being sign extended into a negative number. Manually truncate the return
codes we get to preserve their values.

Test: test_device.py on windows
Change-Id: If41d6d469350301704f6ecff72ad17b412db3e04
2019-03-15 14:54:32 -07:00
Josh Gao
eecd5cc532 Merge "adb: attempt to exec newer adb servers on Linux." 2019-03-15 21:54:10 +00:00
Yifan Hong
28a44eb6f6 libprocessgroup_proto_test split into multiple files
... so that they can be reused later.

Also, removed test to strull and inline static constexpr variable.

Bug: 123664216
Test: libprocessgroup_proto_test
Change-Id: Ia6b93c6689d7531e6f597d1387434aed1b3efb0a
2019-03-15 12:34:42 -07:00
Mark Salyzyn
a73ed22cb7 init: add MountHandler property handler
Set properties dev.mnt.blk.<mount_point>=<device_block_class> for mount
and umount operations by setting up an Epoll handler to catch
EPOLLERR or EPOLLPRI signals when /proc/mounts is changed.  Only
update properties associated with block devices.  For the mount
point of /, use the designation of /root instead.

Can use the properties in init rc expansion like:

on property dev.mnt.blk.root=*
    write /sys/block/${dev.mnt.blk.root}/queue/read_ahead_kb ${boot_read_ahead_kb:-2048}

on property dev.mnt.blk.data=*
    write /sys/block/${dev.mnt.blk.data}/queue/read_ahead_kb ${boot_read_ahead_kb:-2048}

on late-fs
    setprop boot_read_ahead_kb 128
    write /sys/block/${dev.mnt.blk.root}/queue/read_ahead_kb ${boot_read_ahead_kb}
    write /sys/block/${dev.mnt.blk.data}/queue/read_ahead_kb ${boot_read_ahead_kb}

Test: boot and inspect getprop results.
Bug: 124072565
Change-Id: I1b8aff44f922ba372cd926de2919c215c40ee874
2019-03-15 11:54:38 -07:00
Elliott Hughes
9403b8883c Merge "libprocessgroup: PLOG already includes strerror(errno)."
am: 0e5b74deff

Change-Id: Iedbb582e7d917e772bc0ddacb725733059120292
2019-03-15 08:27:26 -07:00
Elliott Hughes
0e5b74deff Merge "libprocessgroup: PLOG already includes strerror(errno)." 2019-03-15 15:19:22 +00:00
Jiyong Park
a4015c04df Merge changes from topic "apex_earlymount_no_bionic_bindmount"
am: 4cd0914048

Change-Id: If31c1ac798d3aacd2a2aaa1f1c6e0695e3952a82
2019-03-15 02:19:35 -07:00
Jiyong Park
8b9fa0a44d Revert "Handle adb sync with Bionic under /bionic"
am: fc97d2a116

Change-Id: I8c8780f0009795d281b93efa691791427402ef45
2019-03-15 02:18:42 -07:00
Jiyong Park
2f2b99a20d Don't bind-mount bionic files
am: 7b4801a921

Change-Id: I80ded3b5efbee209eb705556bc92e2708497da20
2019-03-15 02:17:48 -07:00
Treehugger Robot
4cd0914048 Merge changes from topic "apex_earlymount_no_bionic_bindmount"
* changes:
  /bionic path is gone
  Revert "Handle adb sync with Bionic under /bionic"
  Don't bind-mount bionic files
2019-03-15 09:02:18 +00:00
Bowgo Tsai
ac5d9460f2 Merge changes from topic "adb_root_in_user"
am: da1251d6a5

Change-Id: Ia9959008ac5cc571efe46bd0b80cbae53356d5ed
2019-03-14 21:55:02 -07:00
Treehugger Robot
da1251d6a5 Merge changes from topic "adb_root_in_user"
* changes:
  Allow overriding ro.debuggable to 1 on USER builds
  adbd: allowing adb root when the device is unlocked
2019-03-15 04:40:43 +00:00
Elliott Hughes
08b4d32139 libprocessgroup: PLOG already includes strerror(errno).
Test: builds
Change-Id: Ic1fe6b46144f7dbeb7ffba5534d94b4dae192d5c
2019-03-14 20:06:36 -07:00
Josh Gao
d10b7c4e02 adb: attempt to exec newer adb servers on Linux.
Test: manual
Change-Id: Iebdfa292f21b2871e6010ab6cc964134fec447e9
2019-03-14 15:41:41 -07:00
Bowgo Tsai
1dacd42ae1 Allow overriding ro.debuggable to 1 on USER builds
When init found "/force_debuggable" in the first-stage ramdisk, it will
do the following if the device is unlocked:
  1. load /system/etc/adb_debug.prop (with ro.debuggable=1)
  2 .load userdebug_plat_sepolicy.cil instead of original plat_sepolicy.cil from
    /system/etc/selinux/.

This make it possible to run VTS on a USER build GSI, by using a special
ramdisk containing "/force_debuggable".

Bug: 126493225
Test: unlock a USER build device, check 'adb root' can work
Change-Id: I9b4317bac1ce92f2c0baa67c83d4b12deba62c92
2019-03-15 06:12:00 +08:00
David Anderson
71fc3f358b liblp: Reclaim wasted space from unaligned partitions, v2.
When allocating a partition with a size that is unaligned (to the
optimal alignment), the remaining sectors are wasted since they are
never reallocated. This is because the free list is guaranteed to only
contain optimally-aligned regions. Unfortunately this means when a
partition is resized, we are wasting a small amount of space each time.
On a non-A/B device, this could wind up being significant.

For example, with an alignment of 512KiB, a 4KiB partition at offset 0
will waste 508KiB of space. The next extent to be allocated by any
partition will start at the next 512KiB.

To address this, we check if the last extent for a partition can be
extended to cover the difference between its last sector and the next
optimally aligned sector. We also verify that this region was not
allocated to any other partition, and does not appear in the free list,
to make sure we're not stealing space that will be used somewhere else.

Bug: 120434950
Test: liblp_test gtest
Change-Id: I88689889d44a4d2c51e659241918aaf2c064e049
2019-03-14 12:09:09 -07:00
Bowgo Tsai
9b30c0a7e6 adbd: allowing adb root when the device is unlocked
As there is no security guarantee when the device is unlocked,
allowing adb root gives us more rooms to debug a USER build images.

Also, this makes it possible to run VTS on a USER build GSI, with
setting ro.debuggable=1 and unlocking the device.

This basically re-lands a reverted change:
https://android-review.googlesource.com/c/platform/system/core/+/437815

Which isn't needed after we moved /sbin/adbd to /system/bin/adbd in
USERDEBUG GSI. But it's still needed for USER build GSI.

Bug: 126493225
Test: unlock a USER build device, check 'adb root' can work
Change-Id: I93f12c8a3fe65c96c947e4602795eadfe591c521
2019-03-15 03:04:46 +08:00
David Anderson
2cf4f08bd5 Merge "libfiemap_writer: Calculate FIBMAP blocks correctly."
am: 9d3310c019

Change-Id: I37ff4a029fc722518a11caab744c4f5378e6eb3b
2019-03-14 10:14:29 -07:00
David Anderson
9d3310c019 Merge "libfiemap_writer: Calculate FIBMAP blocks correctly." 2019-03-14 17:08:19 +00:00
Tao Bao
583f5fafb6 Merge changes from topic "charger-shared-libs"
am: 74cece70bc

Change-Id: Ib6922f38638a33e6ebae9ca10293d980281687c3
2019-03-14 10:05:05 -07:00
Hans Boehm
8d1aef81d6 Merge "Revert "Revert "Fix wp and sp comparison bugs"""
am: bca89d7bbc

Change-Id: I6a0fbce87209d40ca788e7b2ba891488725ee29a
2019-03-14 10:03:52 -07:00
Tao Bao
74cece70bc Merge changes from topic "charger-shared-libs"
* changes:
  healthd: Add charger.recovery module.
  healthd: charger uses shared libraries.
2019-03-14 16:56:29 +00:00
Hans Boehm
bca89d7bbc Merge "Revert "Revert "Fix wp and sp comparison bugs""" 2019-03-14 16:55:49 +00:00
Neil Fuller
26fc502a64 Merge "Move the logic for creating APEX-related symlinks"
am: cb7ac9d752

Change-Id: Ia0a5e6be6c8a15fa5720e0087823677d389a887c
2019-03-14 09:23:50 -07:00
Neil Fuller
cb7ac9d752 Merge "Move the logic for creating APEX-related symlinks" 2019-03-14 16:06:08 +00:00
Christopher Ferris
cb839e8475 Merge "Add support for displaying soname in an apk."
am: 4886a5bd59

Change-Id: Id99d7d57656cc841d35162f37aa70f36f77db65c
2019-03-14 08:55:00 -07:00
Christopher Ferris
4886a5bd59 Merge "Add support for displaying soname in an apk." 2019-03-14 15:40:59 +00:00
Gavin Corkery
a5589e817b Merge "Rename data/pkg_staging to data/app-staging."
am: ff3c13f52f

Change-Id: I4e63493ec05eb92fbcce6c7ed446a9f08a29bd88
2019-03-14 07:21:14 -07:00
Mark Salyzyn
b7154087a4 Merge "init: epoll: add events argument to RegisterHandler"
am: 873ee642f2

Change-Id: I45d4e0d034a3878f6f76ccceb5e0a6ac91d965e7
2019-03-14 07:15:52 -07:00
Gavin Corkery
ff3c13f52f Merge "Rename data/pkg_staging to data/app-staging." 2019-03-14 14:14:38 +00:00
Mark Salyzyn
873ee642f2 Merge "init: epoll: add events argument to RegisterHandler" 2019-03-14 14:11:27 +00:00