Commit graph

1924 commits

Author SHA1 Message Date
Anton Hansson
c38a63646b Create /data/preloads on post-fs-data
This directory is used for preloads that are typically placed in
the system_other image and copied to /data on first boot if the
cppreopts script is installed.

Bug: 80508492
Test: make
Change-Id: I4121b07ee2fc96d533075d1907557de7e4be4ee0
2018-10-24 15:29:16 +01:00
Evgenii Stepanov
d33653a26e Remove bcp_dep.
Since the build system move to kati/ninja, build command is an
implicit dependency of a target. This makes the bcp_dep / bcp_md5
thing obsolete.

Test: make

Change-Id: I4ce9ebdabfc72b188e49f12888054d63b3cda64d
2018-10-22 16:08:01 -07:00
Tom Cherry
f18b748b91 Start logd and service managers during the 'init' trigger
Now that we mount partitions early, services can be started before the
'fs' trigger.  We therefore start the service managers as early as
possible to ensure their transports are online, without device
specific rc files needing to handle that.  We also start logd even
one step earlier to ensure that we capture all possible logd.

Bug: 89689596
Test: logging works for early services, include the servicemanagers
Change-Id: I75dbfcd26eb6fa77f002de10afd00f085c93aa07
2018-10-17 14:21:37 -07:00
Treehugger Robot
03ea74aa91 Merge "Adding /odm/usr -> /vendor/odm/usr symlink" 2018-10-17 00:20:07 +00:00
Bowgo Tsai
15f872aee4 Adding /odm/usr -> /vendor/odm/usr symlink
Bug: 112880217
Test: build and checks symlink is created
Change-Id: Ib9635fc1cd425664cfa8f79d8f034f3cb615cbbc
2018-10-16 18:24:08 +08:00
Treehugger Robot
8e842dd365 Merge "Call markBootAttempt when serice manager available" 2018-10-16 01:45:51 +00:00
Daniel Rosenberg
6156b9b8ba Call markBootAttempt when serice manager available
This causes adds a call the fucntion to decrement the
checkpoint's retry count as soon as service manager is
available.

Test: vdc setCheckpoint 2 then reboot 3 times checking state
Bug: 112901762
Change-Id: Ie0a78b1eb05b340718e76175509d1ebefae68017
2018-10-15 22:16:19 +00:00
Elliott Hughes
4b38722c12 rootdir: add ccross to OWNERS.
Bug: N/A
Test: N/A
Change-Id: I285f66a69fa86e03cfc213abc2fe85e938f849df
2018-10-15 14:18:04 -07:00
Evgenii Stepanov
b3bc842750 Merge "Export HWASAN_OPTIONS when SANITIZE_TARGET:=hwaddress" 2018-10-12 21:45:56 +00:00
Evgenii Stepanov
30917f77ba Export HWASAN_OPTIONS when SANITIZE_TARGET:=hwaddress
Bug: 112438058
Test: adb shell env | grep HWASAN_OPTIONS
Change-Id: I6ea4ef03269a7413b97cc62ea5b76597137bd980
2018-10-09 15:33:59 -07:00
Paul Lawrence
b920cb44aa Handle retry count correctly
Test: vdc startCheckpoint 2 then reboot 3 times checking state

Change-Id: I4eeda7f73d82a7c8b2469571fa558df2fac47354
2018-10-08 14:06:06 -07:00
Martijn Coenen
c3b40a5793 Merge "Add /apex tmpfs mount and mount it." 2018-10-04 07:08:54 +00:00
Martijn Coenen
344a91a5f1 Add /apex tmpfs mount and mount it.
APEX filesystem images will now be mounted in /apex.

Also, make sure /data/apex is created with the right ACL.

Bug: 112455435
Test: flash and wipe, /apex is mounted as tmpfs, /data/apex is created
Change-Id: Ie27775e9f40a27b510272f212762624a04e94f1d
2018-10-03 09:48:38 +02:00
Paul Lawrence
786d0b27a2 make checkpointing work on ext4
Test: Test script passes

Change-Id: Iafa337947f2fd456aa692ecb112ccc56638f7947
2018-10-02 10:12:33 -07:00
Martijn Coenen
1e3764575e Merge "init: start apexd as early as we can." 2018-09-26 06:56:26 +00:00
Anton Hansson
ece0a74691 Add product_services support to ld.config.vndk_lite
We're moving apps and their libs to product_services for older
devices too, so mimic the rules in the default ld.config related
to product_services.

Also fix a one-off disparity between /product and /product_services
in ld.config.txt.

Bug: 114804489
Test: m out/target/product/marlin/system/etc/ld.config.vndk_lite
Change-Id: I166275c035c85b4d69cff8e9d51af3d6d0ff4857
2018-09-19 02:53:33 +01:00
Anton Hansson
0244428c8e Update ld config to use build-time determined paths.
A few places had /product and /product_services hardcoded. Update
them to use values that get set at build time.

Bug: 114804489
Test: m out/target/product/marlin/system/etc/ld.config.vndk_lite.txt
Change-Id: Ie48dbb2453ae941c1b5ee57f092d12a5497d878f
2018-09-19 00:47:12 +01:00
Steven Moreland
a285a8416c Merge "Add libbinder_ndk to public.libraries.*" 2018-09-18 15:19:44 +00:00
Steven Moreland
dd8eee871b Add libbinder_ndk to public.libraries.*
Bug: 111445392
Test: atest android.binder.cts.NdkBinderTest
Change-Id: I8ccb1f74654dcb925cd3ac20042cbffd2f594bb9
Merged-In: I8ccb1f74654dcb925cd3ac20042cbffd2f594bb9
2018-09-17 20:05:27 +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
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
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
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
Isaac Lee
f32c201743 Show bootanimation after decrypt
Because the original modification (restart SF which is added
for display bootanimation) from O to P causes bootanimation NPE,
 we remove the part of restart SF and add other flow to show
 bootanimation.

Test: manual, ran the test 10 times and it cause no NPE and
      display BootAnimation after decrypt
Test: boot aosp_sailfish

Bug: 79547653
Change-Id: I355ccdbb2e2f27d897e2e0ee00f9300ef38ede03
2018-08-30 16:44:34 +00:00
Elliott Hughes
5a0a51b81f Add /dev/stdin, /dev/stdout, and /dev/stderr.
Bug: http://b/31824379
Test: `adb shell ls -l /dev/std*`
Change-Id: I6af7ff205e12c10e958be263c3f1c429d48c0bbc
2018-08-22 13:21:21 -07:00
Tao Bao
7cbebb2ba0 Merge "Install ld.config.recovery.txt to $(TARGET_RECOVERY_ROOT_OUT)/system/etc." 2018-08-21 22:35:49 +00:00
Yifan Hong
de39afd1e0 Merge "s/product-services/product_services/g" 2018-08-21 01:07:56 +00:00
Dario Freni
ab5583b585 s/product-services/product_services/g
Attempting to reduce the number of different spellings we have for
"product services" partition in the codebase.

Bug: 112431447
Test: m
Change-Id: I1a87d7e040a8b1f91f973ac7d90d6360b5b54f71
Merged-In: I1a87d7e040a8b1f91f973ac7d90d6360b5b54f71
2018-08-20 17:46:42 +00:00
Tao Bao
e82b83201b Install ld.config.recovery.txt to $(TARGET_RECOVERY_ROOT_OUT)/system/etc.
Bug: 112780007
Test: Build with other changes in the topic (aosp_taimen-userdebug).
Test: Boot into recovery. Verify basic functionalities (`adb shell` and
      `adb sideload`, factory reset).
Change-Id: I8686bbc68c9c8a1570289ecd21bcfcb551d1700c
2018-08-18 10:22:03 -07:00
Treehugger Robot
cdad28c4d5 Merge "Add NDK folks to OWNERS for library configuration." 2018-08-17 16:50:35 +00:00
Martijn Coenen
3848e1ba12 init: start apexd as early as we can.
apexd needs to run right after mounting /data.

Bug: 112455435
Test: apexd is running
Change-Id: I71c834bcaf26a3133aef57bb1d1953010a6d137c
2018-08-17 13:52:25 +02:00
Dario Freni
ad58bf9b1d s/PRODUCTSERVICES/PRODUCT_SERVICES/g
Attempting to reduce the number of different spellings we have for
"product-services" in the codebase.

Bug: 112431447
Test: m
Change-Id: I8714cc9c1ca63eb54745054aaeebd6b51f203f11
2018-08-17 00:20:11 +01:00
Jae Shin
f6c6aaaf13 Parse the list of supported vndk snapshot versions
This allows the target, ld.config.$VER.txt, to be defined for all
$VERs for which a VNDK snapshot exists under /prebuilts/vndk/v$VER.
With this fix,
1) supported_vndk_snaphsot_versions do not need to
be manually updated everytime a new VNDK snapshot is added and,
2) ld.config.$VER.txt will not be ill-defined in a tree that does
not have the required dependency files under /prebuilts/vndk/v$VER.

Test: m -j ld.config.28.txt
Bug: 74658756
Merged-In: Idb056c21412d4cb7c7a7cb3c247b1d82a4a759ff
Change-Id: Idb056c21412d4cb7c7a7cb3c247b1d82a4a759ff
(cherry picked from commit baeaaf9429)
2018-08-13 02:19:42 +00:00
Justin Yun
61f474f457 Add '.bak' for sed -i that is required by BSD sed
BSD version of sed requires a parameter for '-i' option.
Add '.bak' for back up and remove the back up file at the end of the
sed command

Bug: 112478836
Test: checkbuild on a mac machine
Merged-In: Iedc93c2b5239004d2bbb8011488041c54b29996b
Change-Id: Iedc93c2b5239004d2bbb8011488041c54b29996b
(cherry picked from commit 6009d874aa)
2018-08-13 10:39:56 +09:00
Jae Shin
f6dff6dd33 Build ld.config.txt for older VNDK versions
Until now, the ld.config.$VER.txt for $VER older than
PLATFORM_VNDK_VERSION was installed from a prebuilt stored under
/prebuilts/vndk/v$VER. At runtime, the VNDK version needed by the
vendor partition (ro.vndk.version) determines which
ld.config.$VER.txt is loaded and this configuration is used for
both system and vendor processes. In a system-only-upgrade
scenario, where the system partition is a newer Android version
than the vendor partition, this is a problem because the prebuilt
linker config file will not reflect the most recent
system partition related changes made in the newer Android
version.

To fix this problem, this change builds ld.config.$VER.txt for
older VNDK versions from the source tree by getting the lists of
VNDK libraries from the /prebuilts/vndk/v{VER} directory.

Test: m -j ld.config.txt ld.config.28.txt ld.config.vndk_lite.txt
Bug: 74658756
Merged-In: I1fa2469fc0bce2f2aab507104cd9717b6112d738
Change-Id: I1fa2469fc0bce2f2aab507104cd9717b6112d738
(cherry picked from commit c30e0709bb)
2018-08-13 10:37:27 +09:00
Xin Li
5d707816ac Merge "Merge Android Pie into master" 2018-08-07 16:51:24 +00:00
Tom Cherry
31438489c0 split first stage init into a separate executable
In the future, systems with dm-linear will require a ramdisk to set up
the mount for system.  In this world, first stage init will be a part
of this ramdisk and handle setting up dm-linear, mounting the
necessary partitions, then pivoting to the system image, which will
become the root partition.

This also enables previous devices without system-as-root, to be
unified with system-as-root devices for all aspects of boot after the
pivot_root.

Bug: 79758715
Test: boot hikey
Test: boot sailfish, boot sailfish into recovery
Change-Id: Iefa88a3ec5994e7989aa9f26f2de0351ffa5468b
2018-08-06 10:36:43 -07:00
Luis Hector Chavez
c4a8b5a595 Merge "Make /acct have 0555 permissions after mounting"
am: f2878cf15b

Change-Id: I961153c5af23a7f094aea16c8958b0d2bb36391b
2018-07-30 16:49:55 -07:00
Treehugger Robot
f2878cf15b Merge "Make /acct have 0555 permissions after mounting" 2018-07-30 23:37:59 +00:00
Luis Hector Chavez
0451fd6584 Make /acct have 0555 permissions after mounting
This change adds a `chmod 0555 /acct` just after mounting the cgroup fs
on it. This makes it such that even on systems where the rootdir+system
partitions are shared, the permissions allow for the system user to open
files within /acct, which in turn makes libprocessgroup not complain
that it can never do anything with those files.

Bug: 111996377
Test: adb shell 'ls -ldZ /acct'  # Before and after, on an aosp_sailfish
      dr-xr-xr-x 48 root root u:object_r:cgroup:s0 0 1971-12-29 17:41 /acct

Change-Id: Iee6531126c6e81aa7794e44500555bd3c1cdf7b8
2018-07-30 13:06:46 -07:00
Yifan Hong
7f9ba18e25 Merge "BOARD_USES_PRODUCT_SERVICES_IMAGE => BOARD_USES_PRODUCT_SERVICESIMAGE"
am: d5f825c78b

Change-Id: Ica5d41ee4832b3da6420b730d20b91057d2452e4
2018-07-30 09:26:44 -07:00
Yifan Hong
bcdfe0d795 BOARD_USES_PRODUCT_SERVICES_IMAGE => BOARD_USES_PRODUCT_SERVICESIMAGE
This is the name used by envsetup.sh.

Test: `m init.environ.rc` and see directory
$OUT/root/product-services and see symlink $OUT/system/product-services

Change-Id: Ie615b6d76e2c60e6472900c33d9a87cfe99c4064
2018-07-27 11:14:43 -07:00
Dario Freni
3613710099 Add support for /product-services partition.
This CL is largely and adaptation of
Ie996def20e25dc1afe0c74af2096af844934b2dc

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and
flashed on device. Also successfully built image with
/system/product-services and no dedicated /product-services partition.

Change-Id: I1046dfe19bf874da929c9131b76a1f85422fbb80
Merged-In: I1046dfe19bf874da929c9131b76a1f85422fbb80
2018-07-26 16:27:28 +00:00
Dario Freni
4fa866a467 Add support for /product-services partition.
This CL is largely and adaptation of
Ie996def20e25dc1afe0c74af2096af844934b2dc

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and
flashed on device. Also successfully built image with
/system/product-services and no dedicated /product-services partition.
Change-Id: I1046dfe19bf874da929c9131b76a1f85422fbb80
2018-07-23 16:14:36 +01:00
Tom Cherry
689d86a029 Merge "ueventd: let scripts provide firmware directories"
am: b504f38d7e

Change-Id: I6dd9cfe20b733fad5afb066b07484c33eb599c02
2018-07-16 17:15:18 -07:00
Tom Cherry
b504f38d7e Merge "ueventd: let scripts provide firmware directories" 2018-07-16 23:00:53 +00:00
Tom Cherry
7421fa1aed ueventd: let scripts provide firmware directories
Since some vendors will have firmware in mount points in
/mnt/vendor/..., we extend the ueventd script language to allow
specifying the firmware directories.

Also, move the existing 4 directories to ueventd.rc as a primary user
of this mechanism.

Bug: 111337229
Test: boot sailfish; firmwares load
Change-Id: I0854b0b786ad761e40d2332312c637610432fce2
2018-07-13 15:34:25 -07:00
Luis Hector Chavez
81c97bc46f Merge "init.rc: Remount / with MS_REMOUNT|MS_BIND|MS_NODEV"
am: 19ef02ef42

Change-Id: I94c5641308b7b2760bdc4734158011d9cb7146aa
2018-07-11 10:49:41 -07:00
Luis Hector Chavez
d07d0942c6 init.rc: Remount / with MS_REMOUNT|MS_BIND|MS_NODEV
/ should not have any character/block devices, so might as well pass in
the nodev flag.

Bug: 73255020
Test: aosp_sailfish still boots
Test: sailfish:/ # find / -xdev -a \( -type b -o -type c -o -type p -o -type s \)
      sailfish:/ #
Test: rootfs on / type rootfs (rw,seclabel)
      /dev/root on / type ext4 (ro,seclabel,nodevrelatime)

Change-Id: Ia73e04b53a47506892d9d3cb61b471b81bb72dc3
2018-07-11 08:36:00 -07:00
Yabin Cui
329e12fb57 Merge "Add debug system properties to control profiling limits."
am: 1db3789252

Change-Id: I32d3d93bc97aab5a9c21be0f0af5191b581aa32a
2018-07-10 11:11:09 -07:00