Commit graph

49861 commits

Author SHA1 Message Date
Jiyong Park
69eaa6b07b Merge "Don't defer zygote" am: e820afdadb
am: 7b1d78b008

Change-Id: Iedc907e47211ac0867c7a5850edb293618796217
2019-03-07 06:14:12 -08:00
Jiyong Park
7b1d78b008 Merge "Don't defer zygote"
am: e820afdadb

Change-Id: I22ef906c81669e54e6d699260dbc1d66d0d582c6
2019-03-07 06:10:03 -08:00
Treehugger Robot
e820afdadb Merge "Don't defer zygote" 2019-03-07 13:59:17 +00:00
Jiyong Park
1a789db2e3 Don't defer zygote
Removing 'updatable' from zygote as zygote is started after apexd. All
APEXes are guaranteed to be activated at the moment.

Sequence of actions:
1) /data mounted. post-fs-data is triggered.
2) apexd starts. APEXes are activated. Init does not execute more
commands until the activation finishes.
3) all post-fs-data sections from other *.rc are executed.
4) zygote-start is triggered.

Bug: 123404717
Bug: 126555629
Bug: 125549215
Test: device boots
Test: no following message on the logcat log
Could not restart 'zygote': Cannot start an updatable service 'zygote' before configs from APEXes are all loaded. Queued for execution.

Merged-In: Ib4d0716ed5225b6ade3adaa247ff6140a9b2b9d5
Change-Id: Ib4d0716ed5225b6ade3adaa247ff6140a9b2b9d5
(cherry picked from commit 3bddd540dd)
2019-03-07 22:21:32 +09:00
TreeHugger Robot
770929ad36 Merge "Don't defer zygote" 2019-03-07 13:17:18 +00:00
Tim Baverstock
25173c808a Restrict scanning port range, not emulator count
Our servers can comfortably run more than 16 emulators, and this is
much easier than messing with hypervisors or docker port allocation.

Assumes you know how to avoid clashes with Google Wear's default port.

Test: manual - still registers emulators.

Change-Id: I47cfd28725a550de0bd77fd11fcd94cdd11d2cc2
2019-03-07 12:28:31 +00:00
TreeHugger Robot
46f753a320 Merge "Update comments on native_handle_create." 2019-03-07 09:20:33 +00:00
Kiyoung Kim
4639f6946a Add product apk support from libnativeloader
Currently libnativeloader appends vendor lib path if apk is from vendor
partition. Similar to this we should add product lib path if apk if from product partition.

Bug: 124705551
Test: m -j && tested from crosshatch with product apps (such as Wallpaper)
Change-Id: I8c3473f1f70b1c22dcaed7eb2d5f9c3deee9e1a5
Merged-In: I8690167ca8098015c8ae4bbb4f028404c5e94dc0
2019-03-07 15:01:52 +09:00
Kiyoung Kim
ada6112cc2 Merge "Add product apk support from libnativeloader" 2019-03-07 05:46:27 +00:00
Jiyong Park
780d3236b8 Merge "Make /apex on ramdisk" am: 96dc80f97a am: 93f1ce510e
am: 9069b5cd9c

Change-Id: Ib294f05939dc704e680824b2e2dbfbf9cc681f9d
2019-03-06 21:19:44 -08:00
Jiyong Park
9069b5cd9c Merge "Make /apex on ramdisk" am: 96dc80f97a
am: 93f1ce510e

Change-Id: I208928407fb44f4ac18159f352cb56a18933c509
2019-03-06 21:15:13 -08:00
Jiyong Park
93f1ce510e Merge "Make /apex on ramdisk"
am: 96dc80f97a

Change-Id: I6fad2e40c683c1e447d02d0338335e53c03d0eb9
2019-03-06 21:11:07 -08:00
Yuvraj Saxena
bc5a0ecd8a mkbootimg: print addresses and offsets in hex
Change-Id: Ia8a8d68acd8d68750f9ae49ccd341f0f4d3f4e9c
2019-03-07 05:06:09 +00:00
Treehugger Robot
96dc80f97a Merge "Make /apex on ramdisk" 2019-03-07 05:03:05 +00:00
Jiyong Park
3bddd540dd Don't defer zygote
Removing 'updatable' from zygote as zygote is started after apexd. All
APEXes are guaranteed to be activated at the moment.

Sequence of actions:
1) /data mounted. post-fs-data is triggered.
2) apexd starts. APEXes are activated. Init does not execute more
commands until the activation finishes.
3) all post-fs-data sections from other *.rc are executed.
4) zygote-start is triggered.

Bug: 123404717
Bug: 126555629
Bug: 125549215
Test: device boots
Test: no following message on the logcat log
Could not restart 'zygote': Cannot start an updatable service 'zygote' before configs from APEXes are all loaded. Queued for execution.

Change-Id: Ib4d0716ed5225b6ade3adaa247ff6140a9b2b9d5
2019-03-07 12:41:16 +09:00
David Anderson
6b4b265abf Add write support to SplitFiemap.
This adds few new methods to introduce write support to SplitFiemap:

(1) Write(), which has an internal cursor to stream data into the split
    files. As the end of one file is reached, the next is opened.
(2) Flush(), which calls fsync() on each internal FiemapWriter.
(3) HasPinnedExtents(), which calls the same on each internal
    FiemapWriter.

Included are some tests for edge cases in Write().

Bug: 126230649
Test: fiemap_writer_test gtest
Change-Id: I9fd509215975dbbb20a44b020315d3c1b287d1a0
2019-03-06 19:32:20 -08:00
Kiyoung Kim
cd8b96cb7c Add product apk support from libnativeloader
Currently libnativeloader appends vendor lib path if apk is from vendor
partition. Similar to this, as part of mainline core, we should add
product lib path if apk if from product partition.

Bug: 124705551
Test: m -j && tested from crosshatch with product apps (such as Wallpaper)
Change-Id: I8690167ca8098015c8ae4bbb4f028404c5e94dc0
2019-03-07 12:01:23 +09:00
Josh Gao
2d918cde58 Merge "adbd: cleanups in remount/verity." am: 98efc485de am: d659bb49be
am: b7dc01a570

Change-Id: Ia1f05becfdbba49606fb9bd47123e81c73d55e97
2019-03-06 18:46:04 -08:00
Josh Gao
b7dc01a570 Merge "adbd: cleanups in remount/verity." am: 98efc485de
am: d659bb49be

Change-Id: Ia3353280f106dffd16a4cbdfc05ce110c23fb086
2019-03-06 18:41:35 -08:00
Josh Gao
d659bb49be Merge "adbd: cleanups in remount/verity."
am: 98efc485de

Change-Id: Ideadb9d6633d5529710932e849bdf3a4bc9a9999
2019-03-06 18:37:26 -08:00
Josh Gao
98efc485de Merge "adbd: cleanups in remount/verity." 2019-03-07 02:32:42 +00:00
Jiyong Park
e5dc674a95 Make /apex on ramdisk
Bug: 127576519
Bug: 127653919
Test: build hikey, check ramdisk has /apex directory
Change-Id: I4e844caa032c0717bd36d323675852ce3681fb01
2019-03-07 11:17:44 +09:00
Sudheer Shanka
95a5a0518c Merge "Allow callers to pass a flag to not link obb dirs of multiple users." am: 0c8b8af74a am: 5a8d603d9d
am: 5abe405b9e

Change-Id: I516e776107d193291033a1768e31364ebfcc42b7
2019-03-06 17:29:17 -08:00
Sudheer Shanka
5abe405b9e Merge "Allow callers to pass a flag to not link obb dirs of multiple users." am: 0c8b8af74a
am: 5a8d603d9d

Change-Id: Ia996870b58caecce6077f5144aeb6b9b59135ade
2019-03-06 17:02:15 -08:00
Sudheer Shanka
5a8d603d9d Merge "Allow callers to pass a flag to not link obb dirs of multiple users."
am: 0c8b8af74a

Change-Id: I49f1f35d1033655664a5b335351921f6a286d9e7
2019-03-06 16:46:51 -08:00
Sudheer Shanka
0c8b8af74a Merge "Allow callers to pass a flag to not link obb dirs of multiple users." 2019-03-07 00:34:59 +00:00
Tao Bao
bd95736a22 Merge "mkbootimg: extract to 'second' if size not 0" am: a3d394e9bb am: 9130f5c950
am: 189e4a7c26

Change-Id: I201c0bb709be7559a9fedd61ea2b0ae8a91afa95
2019-03-06 16:33:53 -08:00
Mark Salyzyn
666a39e491 Merge changes I3506c8e7,I198c0e8c,I8a5d4e36 am: 6bd04c1570 am: 492ae86814
am: 0530d529a9

Change-Id: I6333eed7da2625a07f24a687a4c1adaee1b4ce70
2019-03-06 16:13:22 -08:00
Tao Bao
189e4a7c26 Merge "mkbootimg: extract to 'second' if size not 0" am: a3d394e9bb
am: 9130f5c950

Change-Id: Ia54d08b87b993c7aad6fba4d908d57d2ea22cbb5
2019-03-06 15:33:43 -08:00
Mark Salyzyn
0530d529a9 Merge changes I3506c8e7,I198c0e8c,I8a5d4e36 am: 6bd04c1570
am: 492ae86814

Change-Id: I04f5defda4427c5ba1518bd1b196e5b9e2f1ce59
2019-03-06 15:29:57 -08:00
Tao Bao
9130f5c950 Merge "mkbootimg: extract to 'second' if size not 0"
am: a3d394e9bb

Change-Id: I0c4fdf31f94e841cdfb00df12845157d9ac750b8
2019-03-06 14:53:04 -08:00
Tao Bao
a3d394e9bb Merge "mkbootimg: extract to 'second' if size not 0" 2019-03-06 22:43:33 +00:00
Tao Bao
5747e228f7 healthd: Add charger.recovery module.
This CL splits out healthd_mode_charger_nops for building
charger.recovery. It doesn't change the functionality of the charger
module under recovery, i.e. a) it still doesn't do much work other than
reporting the battery status periodically; b) it keeps calling
device-specific healthd functions (healthd_board_init and
healthd_board_battery_update) via the statically linked HAL.

Previously `charger -r` was used to indicate starting charger under
recovery mode. This CL makes it a noop since we've changed the caller in
recovery.

Bug: 73660730
Bug: 114042635
Test: Boot into charger mode on walleye. Check that charger UI works.
Test: Boot into recovery mode on walleye. Check that /system/bin/charger
      keeps working.
Test: Run charger_test on walleye.
Change-Id: Id91acfcc77ec315c2382392dc54e36c3e85de2eb
2019-03-06 14:41:47 -08:00
Mark Salyzyn
492ae86814 Merge changes I3506c8e7,I198c0e8c,I8a5d4e36
am: 6bd04c1570

Change-Id: If0bf047ecc94463415455ad48e82390dbef6b8a4
2019-03-06 14:40:21 -08:00
Tao Bao
f2455d8068 healthd: charger uses shared libraries.
With the change in [1], /sbin/charger always gets included into
system.img (as opposed to ramdisk) and started by second-stage-init. It
no longer needs to be statically linked. This CL switches it to use
shared libraries, and moves it to /system/bin/charger.

With this change, charger no longer gets installed into recovery image,
which will be handled by a follow-up CL.

[1] https://android-review.googlesource.com/c/platform/build/+/728287

Bug: 73660730
Test: Boot into charger mode on taimen. Check that charger UI works.
Test: Run charger_test on taimen.
Change-Id: Idff70cfad09c825cdba4d35a471ff7ecd5f8a8f7
2019-03-06 14:36:59 -08:00
Treehugger Robot
6bd04c1570 Merge changes I3506c8e7,I198c0e8c,I8a5d4e36
* changes:
  fs_mgr: remount: automatically disable verity
  fs_mgr: remount: pull root device from fstab
  fs_mgr: test: track device active slot throughout
2019-03-06 21:53:52 +00:00
Josh Gao
3ed90b75da adbd: cleanups in remount/verity.
1. Don't clear O_CLOEXEC on an fd we're duping to stdin/out/err: dup2
   does that for us if oldfd != newfd, and we know the fd can't be
   stdin/out/err.
2. Use unique_fd.
3. Remove gotos by breaking the remount logic into its own function.

Test: mma
Change-Id: If9929e7f20de445322fd498e1379a2d4e572cb52
2019-03-06 13:03:30 -08:00
Jiyong Park
c2776173cb Merge "Access apex sysprops via the generated API" am: 51deeb569f am: 7c8576d435
am: 504ba80ad7

Change-Id: Ib98559e083d9ef1721576dc8d7f5d653f3777437
2019-03-06 10:40:21 -08:00
Jiyong Park
504ba80ad7 Merge "Access apex sysprops via the generated API" am: 51deeb569f
am: 7c8576d435

Change-Id: I1a98c36da437c7a63faab1551214b694758ad9e3
2019-03-06 10:10:11 -08:00
Jiyong Park
7c8576d435 Merge "Access apex sysprops via the generated API"
am: 51deeb569f

Change-Id: I7424032df0258fae058ee87faeb52b672cb8bc1b
2019-03-06 09:51:44 -08:00
Treehugger Robot
51deeb569f Merge "Access apex sysprops via the generated API" 2019-03-06 17:38:46 +00:00
Florian Mayer
9d3b79374d Merge "Fix copy / move behaviour of Maps object." am: 30c898f1ca am: 7e345a00a1
am: 449355f920

Change-Id: I4cf3802f650a22bbf56ebdf1c87253a402b21aa6
2019-03-06 08:55:00 -08:00
Florian Mayer
449355f920 Merge "Fix copy / move behaviour of Maps object." am: 30c898f1ca
am: 7e345a00a1

Change-Id: Iee40ba119988f964dc86ea603a64044f7d0e20e3
2019-03-06 08:50:41 -08:00
Florian Mayer
7e345a00a1 Merge "Fix copy / move behaviour of Maps object."
am: 30c898f1ca

Change-Id: I7912a4c29393b7e0fb0e1e26c09160989f8544f2
2019-03-06 08:46:39 -08:00
Florian Mayer
30c898f1ca Merge "Fix copy / move behaviour of Maps object." 2019-03-06 16:31:10 +00:00
Mark Salyzyn
6a26b4b74d fs_mgr: remount: automatically disable verity
Disable verity even if -R flag is not supplied.

Test: adb-remount-test.sh
Bug: 127494168
Change-Id: I3506c8e7d5525ca1d0685004c1fb7e26448fa648
2019-03-06 08:25:36 -08:00
Mark Salyzyn
3babd8488b fs_mgr: remount: pull root device from fstab
For devices that do not support overlayfs that are system as root,
need to pull /dev/root device from / mount point in fstab.

Test: adb-remount-test.sh
Bug: 126256072
Change-Id: I198c0e8c60770508737318afde95db2966294ff5
2019-03-06 08:25:36 -08:00
Mark Salyzyn
448fc9783c fs_mgr: test: track device active slot throughout
Report any discrepancy in the active slot.

Fix a problem with problematic error propagation for adb_cat()

Test: adb-remount-test.sh
Bug: 126256072
Change-Id: I8a5d4e364945c5e60d252333886987b8dca0cfb3
2019-03-06 08:25:36 -08:00
Yuvraj Saxena
ff5e99a6cd mkbootimg: extract to 'second' if size not 0
Change-Id: I5f6804be6372371d51d5757f6a5700c07ed5e57f
2019-03-06 14:23:02 +00:00
Martijn Coenen
538e0b98c4 Update comments on native_handle_create.
To indicate limits.

Test: builds
Change-Id: Id5129a7f6a8f413911544dedeb02bb4e7a2f6e10
2019-03-06 14:22:10 +01:00