Commit graph

156 commits

Author SHA1 Message Date
Oliver Nguyen
38b33c09f9 Merge "Set Clang coverage environment variables." 2020-01-22 22:34:35 +00:00
Oliver Nguyen
c1f7035c31 Set Clang coverage environment variables.
Bug: 143977934
Test: m CLANG_COVERAGE=true and check LLVM_PROFILE_FILE is set
Change-Id: I5aea5a38b9bec1670bf9c8d11d9c466c3b83e4d8
2020-01-13 14:38:15 -08:00
Kiyoung Kim
32082a7e28 Use generated linker config only
Remove prebuilt ld.config.txt to use linker config from generator only,
including legacy and vndk_lite case.

Bug: 139638519
Test: m -j passed

Change-Id: I043d51daca8cde1977236f9fbda919176a18618d
2019-12-24 14:18:53 +09:00
Kiyoung Kim
986e453d9c Remove ld.config.recovery.txt build
Remove ld.config.recovery.txt build as this will be replaced to be
generated from linkerconfig during build time.

Bug: 146414198
Test: m -j passed
Test: Checked linker config generated under recovery's system/etc
Change-Id: I0d2aa121973c4c99e68f44f4e76e4eab74dc2f95
2019-12-19 16:37:43 +09:00
Ricky Wai
3cca270e95 Create /data_mirror in init.rc
Mount a tmpfs on top of it, and serve as a mirror of /data/data
and /data/user_de, which will be used when zygote forks and
overlay its CE and DE storage to prevent app can see other applications.

Also, changed /data/user/0 from symlink to bind mount, so
/data_mirror/data_ce/null can just bind to /data/user directly.

Bug: 143937733
Test: Directories are created and mounted
Change-Id: Ic72c47c9d3dc0ffc98510f5bb351eccf76524232
2019-12-12 14:44:44 +00:00
Kiyoung Kim
597eca8a8c Merge "Move linker config under /linkerconfig" 2019-12-11 02:55:06 +00:00
Kiyoung Kim
99df54be93 Move linker config under /linkerconfig
Currently linker config locates under /dev, but this makes some problem
in case of using two system partitions with chroot. To match system
image and configuration, linker config better stays under /linkerconfig

Bug: 144966380
Test: m -j passed && tested from cuttelfish
Change-Id: Iaae5af65721eee8106311c1efb4760a9db13564a
2019-12-09 19:45:11 +09:00
Elliott Hughes
3af236c693 Be more careful about symlinking a file that actually exists on the host.
Avoids this error on later runs:

  ln: cannot create symbolic link from '/sys/kernel/debug' to 'out/target/product/walleye/root/d/debug': Permission denied

Bug: http://b/145148158
Test: touch * ; mm -j32 -k
Change-Id: I0c1c0c6e7666c0bc3373687d8c1c7bdf0847913f
2019-12-06 17:43:23 -08:00
Tom Cherry
47cdf6c078 Merge "Move init and ueventd scripts from / to /system/etc" 2019-11-13 14:36:47 +00:00
Tom Cherry
c9f5353ad3 Move init and ueventd scripts from / to /system/etc
There is no reason for these scripts to continue to exist in /, when
they are better suited for /system/etc.  There are problems keeping
them at / as well, particularly that they cannot be updated with
overlayfs.

Bug: 131087886
Bug: 140313207
Test: build/boot
Merged-In: I043d9a02ba588ca37ceba2c4e28ed631792b2586
Change-Id: I043d9a02ba588ca37ceba2c4e28ed631792b2586
2019-11-08 10:15:49 -08:00
Jooyung Han
c2b56dc10e migrate *.libraries.txt from Make to Soong
Migrating these files to soong modules and those modules are defined
under /packages/modules/vndk since they are highly coupled with vndk.

Bug: 141450808
Test: m llndk.libraries.txt
Change-Id: Id33366f604e3e6696a9be95dc50f40d143325697
2019-11-06 16:55:32 +09:00
Jooyung Han
a18363cb97 Use soong-generated vndk*libraries.txt files
linkerconfig reads vndk-related libraries.txt files. Now these files are
generated by soong.

Bug: 142963962
Bug: 141450808
Test: m && device boots && TH
Change-Id: I98c2f934815238cacd4ec8536ce2f9f24bbf1b32
2019-10-31 11:40:22 +09:00
Jooyung Han
e5811e8967 Revert "Revert "Revert "Revert "Use com.android.vndk.current variant for vndk list""""
This reverts commit 3cb19a74f2.

Reason for revert: Fix b/143374795

Change-Id: I21dae5ff3c9bf05ac15ac26210d7c8d7f9c46e1c
2019-10-28 21:08:04 +00:00
Jooyung Han
3cb19a74f2 Revert "Revert "Revert "Use com.android.vndk.current variant for vndk list"""
This reverts commit 74f23d7ae6.

Reason for revert: b/143374795

Change-Id: I35cb387b87d3eb2eb0963b669e359ff538c28c90
2019-10-28 05:07:46 +00:00
Jooyung Han
74f23d7ae6 Revert "Revert "Use com.android.vndk.current variant for vndk list""
This reverts commit 08f2376d70.

Bug: 141451661
Test: m && device boot
2019-10-19 02:32:28 +09:00
Jooyung Han
08f2376d70 Revert "Use com.android.vndk.current variant for vndk list"
This reverts commit 82f94d61cb.

Reason for revert: some targets are broken

Bug: 142773030
Change-Id: Ida59c52af3d2fd694855fcee60b5bb0d99c85f8d
2019-10-16 23:47:32 +00:00
Jooyung Han
82f94d61cb Use com.android.vndk.current variant for vndk list
New linkerconfig reads some txt files which list various kinds of
vndk libraries. For example, vndksp.libraries.txt file has the list of
VNDKSP type libraries. The exact file names are retrieved from .vendor
variants.

With VNDK APEX, .vendor variants are not installed but
.com.android.vndk.current variants are packaged into VNDK APEX.

This CL changes the variant type from .vendor to
.com.android.vndk.current so that *.libraries.txt files can list the
installed files correctly.

Bug: 141451661
Test: m && device boot
Change-Id: Ibbc27b1ae6a44cc2337a0b14918caa27107a4c8e
2019-10-13 22:03:50 +09:00
Kiyoung Kim
7f5ec44dbc Disable to build ld.config.txt with previous vndk version
As generic ld.config.txt will be covered with linker config generator,
ld.config.txt with previous vndk build is no longer required. This
change removes this part so there will be no unnecessary build step for
multiple vndk version build. Also vndk snapshot will have vndkcore and
vndkprivate files with version number, update_and_install_ld_config.mk
has been updated temporary for vndk_lite build.

Bug: 142072719
Test: m -j passed with aosp_arm64 build
Change-Id: Ia7529c80b179dc262c6e7646a34c2a05a0d9be84
2019-10-07 17:30:42 +09:00
Kiyoung Kim
2e7b3df686 Temporary add ld.config.txt build
Last generic ld.config.txt deprecation caused build error from
build_test build because of invalid ld.config.txt build target. To fix
this ld.config.txt build target should be enabled until
ld.config.vndklite.txt and ld.config.legacy.txt also become deprecated.

Bug: 138920271
Test: m ld.config.txt passed
Test: build_test passed
Change-Id: I7f45ee66d3ed70a1a698261e1e801a30729f592f
2019-10-07 11:10:37 +09:00
Kiyoung Kim
e5013de9ac Merge "Deprecate ld.config.txt for fully treblelized devices" 2019-10-07 01:07:58 +00:00
Treehugger Robot
6547c276fe Merge "Delete fsverity_init.sh for the C++ implementation" 2019-10-02 16:17:47 +00:00
Kiyoung Kim
f064a1dd8c Deprecate ld.config.txt for fully treblelized devices
From latest change fully treblelized devices started to use
ld.config.txt from generator instead of the one under /system/etc. As so
existing ld.config.txt is no longer required. This change removes all
ld.config.txt content and build script for it.

Bug: 138920271
Test: m -j passed
Test: Tested from Cuttlefish
Change-Id: I9e2d4b305442a4fccc4378a997ec92bfd6cddb84
2019-10-01 13:31:05 +09:00
Kiyoung Kim
862c07f22b Add library list for VNDK using core variant
Some device requires VNDK_USING_CORE_VARIANT list, but it was not
implemented in previous. Adding this library list to the build target so
it can be added to system image.

Bug: 141695559
Test: m -j passed & Tested from Cuttlefish
Change-Id: I52750583050401098ca8dacee9cf84e8c5727e36
2019-09-27 14:11:19 +09:00
Kiyoung Kim
fce2838611 Find or guess installed libraries for VNDK library list
Current implementation just uses VNDK library list from variable.
However this does not match with expected library name as some libraries
change their names from initial one by appending extra information such
as version. To match this name each libraries should be searched from
installed module list.

Bug: 141584631
Test: m -j passed
Test: Tested from cuttlefish
Change-Id: If9685be59404226de4db16642781546e478694fb
2019-09-25 10:38:56 +09:00
Martin Stjernholm
c72fd9a9ca Limit the compat symlinks to ART binaries.
For now, keep symlinks only to the binaries demonstrably in use by apps
(dex2oat and dalvikvm).

Test: adb shell ls -l /system/bin
Bug: 124106384
Change-Id: Id662beb4c13785ac9d44bf41f9f33907219b69be
2019-09-02 12:32:42 +00:00
Martin Stjernholm
df96e1f25c Update paths and names for the new ART APEX.
Test: Build & boot
Test: atest CtsJniTestCases
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
Merged-In: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
2019-08-30 17:47:31 +01:00
Victor Hsieh
88da3c4943 Delete fsverity_init.sh for the C++ implementation
Test: fsverity keys are still loaded
Bug: 112038744
Change-Id: I0503ba6bfb7008872e30c1b5052b46d77b2b91d4
2019-08-26 11:22:46 -07:00
vichang
ef0bc63043 Merge "Move ICU .dat" 2019-08-08 11:06:53 +00:00
Victor Chang
7ea6c1691c Move ICU .dat
Move the symlink destination of /system/usr/icu from Runtime APEX to
i18n APEX

Bug: 137009149
Test: Device boots
Change-Id: I86ff83a28d4124892d2b5d84ff09bc539f76c941
2019-07-26 18:40:33 +01:00
Kiyoung Kim
178129d1c7 Add libraries txt file to build target
Linkerconfig requires more libraries txt files to get library list
related variable values. To make this available from runtime, those
should be added as build target and included in system image.

Bug: 137511540
Test: m -j && tested from cuttlefish
Change-Id: Id3304eea5a7d8f2ffc171cd3b110b7d65e881f8c
2019-07-24 19:19:01 +09:00
Justin Yun
5d0ac62995 Rename product_services to system_ext
Update adb, fastboot and mount point

Bug: 134359158
Test: build and check if system_ext.img can be flashed
Change-Id: I6219f72242c5fe42a508008c0b1fd218d74da5b6
2019-07-09 08:56:53 +00:00
Treehugger Robot
2ddb8df2ef Merge "Adding adb_debug.prop into debug ramdisk" 2019-04-23 02:01:36 +00:00
Bowgo Tsai
05f07d89a6 Adding adb_debug.prop into debug ramdisk
The debug ramdisk can only be used if the device is unlocked.
When it's used, init will load adb_debug.prop and the userdebug
sepolicy from the debug ramdisk, to allow adb root on a user build.

Bug: 126493225
Test: 'make' and checks the file is installed
Change-Id: Id6962414197fc8f47f7c07818e8fb16107dc17a3
2019-04-20 06:08:51 +00:00
Bowgo Tsai
30afda71c0 Copying debug ramdisk files to /debug_ramdisk/*
In previous implementation, userdebug sepoilcy and property files are
loaded from the system.img. This CL changes this to:

  - first-stage init copies userdebug files from ramdisk to /debug_ramisk/*
  - second-stage init loads files from /debug_ramdisk/*.

Note: same as before, the above can only be triggered, if the device
is UNLOCKED

With this, we don't have to put userdebug related files into the USER
system.img.

Bug: 126493225
Test: boot device with a ramdisk with /force_debuggable, checks related
      files are loaded
Change-Id: I63f5f846e82ba78427062bf7615c26173878d8f3
2019-04-19 09:56:14 +08:00
Tom Cherry
3ec821fcfb Do not create /sbin
/sbin was traditionally used for static binaries on the ramdisk for
Android, but now everything is a shared binary, so this directory is
empty and we do not want to encourage creation of new libraries in
this directory.

Bug: 73660730
Test: build
Change-Id: I0d0aa052e1eaf529d18921c45169473df0ee51ff
2019-04-16 15:22:33 -07:00
Oliver Nguyen
360eb055e0 Move gcov output to /data/misc/trace
Gcov output location has world write on debuggable builds.

Test: N/A
Bug: 128524141
Change-Id: Ia6b94e26352dd66f5c6819f6157b4b73dd777a90
2019-04-04 13:57:59 -07:00
Bowgo Tsai
5fdd7861bb Adding GSI public keys
This CL adds three GSI keys, to allow booting a GSI with AVB
to enable dm-verity.

   https://android.googlesource.com/platform/external/avb/

The keys for R and S GSI is to allow a device boots a new
version of GSI in a Treble-compatible manner.

For more information about GSI, please visit:

    https://source.android.com/setup/build/gsi

Bug: 112293933
Test: m q-gsi.avbpubkey r-gsi.avbpubkey s-gsi.avbpubkey
Change-Id: I4439e44fbd5da3240d7f6c7987f66445ec4590c5
2019-03-30 03:07:31 +00:00
Victor Hsieh
59183120c2 Initialize fs-verity keys in shell script
This gives us two benefits:
  - Better compatibility to keyctl(1), which doesn't have "dadd"
  - Pave the way to specify key's security labels, since keyctl(1)
    doesn't support, and we want to avoid adding incompatible option.

Test: See keys loaded in /proc/keys
Bug: 128607724
Change-Id: Ia45f6e9dea80d037c0820cf1fd2bc9d7c8bb6302
2019-03-22 09:18:00 -07:00
Neil Fuller
3b0da85b22 Address syntax / error case nits
Observe some best practices in the APEX symlink
shell commands. No functional changes intended except with error
handling.

Bug: 128687472
Bug: 124106384
Bug: 122985829
Bug: 128249030
Test: make installclean / make droid / inspect one symlink
Change-Id: I099fed5ac8f25cc3911ce0e7ea2b9f74c2172193
2019-03-15 19:05:05 +00:00
Neil Fuller
16e5ae3b39 Move the logic for creating APEX-related symlinks
The existing location of logic for creating symlinks to files that have
moved into APEX does not get executed for -user builds, only
-userdebug and -eng. The new location is equally arbitrary but appears
to be invoked for -user, -userdebug and -eng targets.

Tested with:
make cleaninstall && lunch taimen-[user|userdebug|eng] && make droid

Inspected:
ls -l out/target/product/taimen/system/usr/icu

Bug: 128249030
Bug: 122985829
Bug: 124106384
Test: see above
Merged-In: I92a52d0b5ef97e8cb4f780691f8594e40f2fa6b3
Change-Id: I92a52d0b5ef97e8cb4f780691f8594e40f2fa6b3
(cherry picked from commit 0ed52b789d)
2019-03-14 10:38:54 +00:00
Nicolas Geoffray
0c49d1759c Add a DEX2OAT_BOOTCLASSPATH variable.
Bug: 119800099
Test: m
Change-Id: I8ae4ecea6da2ef541736a38822b100a620d72a8a
2019-02-26 12:57:17 +00:00
Martin Stjernholm
96949370ce Add compat symlink preferred-arch /system/bin/dalvikvm.
Test: Flash and boot
Test: adb shell ls -l /system/bin/dalvikvm
Bug: 124106384
Bug: 124924906
Change-Id: I1766af561e6b268a1c914808e872fce97a09631e
2019-02-22 20:14:15 +00:00
Yifan Hong
98a61dd583 Move rootdir/*.json to libprocessgroup
They are installed to /system/etc, not /. Hence, move
out of rootdir/ and move into the code that parse these
files (i.e. libprocessgroup).

Also, Android.mk->bp.

Test: builds

Change-Id: I1763c26f81ae51ee159552e39d252fd643c35b94
2019-02-14 16:06:49 -08:00
Suren Baghdasaryan
d032a92c04 Fix cgroup support for recovery mode
In recovery mode a separate set of cgroups should be mounted. Add a
cgroups.recovery.json file to describe cgroups mounted during recovery.
Change cgroups descriptor parset to allow cgroups and cgroups2 sections
to be omitted.

Bug: 124270406
Test: "adb reboot sideload; adb devices" shows 'sideload' as expected

Change-Id: Ic32bd2b4612ec8390064f87d4655d1bd1183d741
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-14 17:08:40 +00:00
Martin Stjernholm
7f77dbfe64 Add compat symlinks into the Runtime APEX for the ART binaries.
This is a precaution in case there are dependencies on the binaries in the
old location. b/124106384 tracks eliminating them (if any).

Test: Flash and check symlinks are there with adb shell ls -l system/bin
Test: adb shell system/bin/<binary>
Bug: 113373927
Bug: 124106384
Change-Id: Ib4102fe55117611f68184102e68a10ea47de0065
2019-02-13 15:10:11 +00:00
Suren Baghdasaryan
503cf84f76 rootdir: Add cgroups and task profiles description files
Add cgroups.json and task_profiles.json file to be places under /etc/ on
the device to describe cgroups to be mounted and task profiles that
processes can request. This adds additional layer of abstraction between
what a process wants to achieve and how system implements that request.

Bug: 111307099
test: builds, boots

Change-Id: If92f011230ef5d24750e184bad776f30ba226f86
Merged-In: If92f011230ef5d24750e184bad776f30ba226f86
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-02 21:28:05 -08:00
Neil Fuller
e41489a9a1 Merge "Move APEX symlink creation to alternative module" 2019-01-25 18:42:12 +00:00
Neil Fuller
48a92d715d Move APEX symlink creation to alternative module
Move APEX symlink creation to alternative module, one that
is targeted at /system not /. Also added comments to reflect
the tenuous connection between the module chosen and the
symlink creation.

Tested with:
rm -rf out/target/product/taimen/system \
  && make droid \
  && ls -l out/target/product/taimen/system/usr

Test: See above
Bug: 122985829
Bug: 123333111
Change-Id: I841dd42827ac2e082505ebf039f40fd394514e54
2019-01-24 13:01:38 +00:00
Neil Fuller
792fd03955 Merge "Add a symlink for the ICU .dat file" 2019-01-24 10:02:26 +00:00
Neil Fuller
f40156d69c Add a symlink for the ICU .dat file
The ICU .dat file was moved into the runtime APEX file
in commit b6d855f081c232309961f31c7c7c8a76abf79c3c.
There are some apps that know the old location and its
absence causes them to fail.

This change adds a symlink from the old directory to
the new directory. The ICU .dat file changes its name
with every ICU major release so this is simpler than
linking the file itself.

Bug: 119293618
Bug: 120853401
Bug: 122985829
Test: make droid / inspect output
Test: Confirm broken app works on an internal master build
Change-Id: I452dcb5e52975011c9ebd3db2caa621bbefedaf3
2019-01-23 12:03:48 +00:00