Commit graph

1898 commits

Author SHA1 Message Date
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
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
Yabin Cui
4f0da7cb82 Add debug system properties to control profiling limits.
When security.perf_harden is disabled through adb, use some debug
system properties to set profiling limits in the kernel, including
cpu percentage, memory, and max sample rate.

Bug: 110706031
Test: boot hikey960 and manually set system properties to make
Test: sure it works.

Change-Id: I44c0adf3a000bb393905233f2a097c97b5fe91ec
2018-07-09 16:03:30 -07:00
Mark Salyzyn
fbe32e723b Merge "rootdir: access to pstore denied to bootstat"
am: 8b80960417

Change-Id: I02884961f2b782e57a9dcac028c2bd6ae7b33f48
2018-06-29 15:20:57 -07:00
Mark Salyzyn
7ab805ea1d rootdir: access to pstore denied to bootstat
Test: boot_reason_test.sh
Bug: 110925971
Change-Id: Iba7b7325fe8c9ad18a7f8dbda550d6008400693e
2018-06-29 13:10:08 -07:00
Doheon Lee
ac7756307f Merge "Determine product partition path on build time"
am: 2bf8328c54

Change-Id: I773864c5dcf6adbea8e1947b969de69d25454521
2018-06-19 14:49:21 -07:00
Doheon Lee
cccad0bf84 Determine product partition path on build time
Path of product partitoin can be set as /product or /system/product
whether generate extra product partition or not.
Substitute %PRODUCT% to relevant path to know linker which path should
search and permit.

Bug: 110286945
Test: m -j # Check /system/etc/ld.config.$(PLATFORM_VNDK_VERSION).txt
Change-Id: I6ca177d0c9c5af00ad821879fece40848331fc8d
2018-06-19 08:10:14 +00:00
Inseob Kim
af818a799d Merge "Add /system/product/* paths to permitted paths"
am: c733e5af3c

Change-Id: I010dc1ad943fbf4c2c8524bb4df4cd6d0c699caa
2018-06-18 00:31:48 -07:00
Inseob Kim
3918936b9e Add /system/product/* paths to permitted paths
As linker doesn't resolve paths in permitted paths, /system/product
variants should be added to support devices having product partition
under /system.

Bug: 110286945
Test: m -j succeeds on taimen and libraries under /system can dlopen
libraries under /system/product/apps

Change-Id: Icd102d44511702e4ec66c07a367b59c3d9700a44
2018-06-18 14:16:49 +09:00
Jiyong Park
4ebda908de Shared libs are supported in recovery mode
am: 011ee12b1d

Change-Id: I867dbafecf11215b82d952c532774cdf12c6e782
2018-06-13 16:43:09 -07:00
Jiyong Park
011ee12b1d Shared libs are supported in recovery mode
adbd has been built as a static executable since the same binary was
copied to the recovery partition where shared library is not supported.
However, since we now support shared library in the recovery partition,
adbd is built as a dynamic executable.

In addition, the dependency from adbd to libdebuggerd_handler is removed
as debuggerd is handled by the dynamic linker.

A few more modules in /system/core are marked as recovery_available:
true as they are transitive dependencies of the dynamic linker.

This change also includes ld.config.recovery.txt which is the linker
config file for the recovery mode. It is installed to /etc/ld.config.txt
and contains linker namespace config for the dynamic binaries under
/sbin.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: Select 'mount /system' in the recovery mode, then `adb shell`.
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.

Change-Id: I363d5a787863f1677ee40afb5d5841321ddaae77
2018-06-10 08:32:24 +09:00
Inseob Kim
cf5e8f1575 Merge "Support /product/bin" am: 36b61f061d
am: 931e0f268a

Change-Id: If507c7206c6e1c43e0fe5a6af411250b7879e2e3
2018-05-31 20:09:45 -07:00
Inseob Kim
25195daaca Support /product/bin
Bug: 80422611
Test: m -j succeeded and permissions of files under /product/bin are set
correctly

Change-Id: I83377d809c47c92da6b226d2853ea6a7462fb127
2018-06-01 08:33:04 +09:00
Inseob Kim
4f0e967eaa Merge "Support product-specific libraries" am: 39cab7cd25
am: d9debeefd6

Change-Id: I06da5ca113c97af66d6a17caab5e1fb35bb12be3
2018-05-24 10:42:19 -07:00
Treehugger Robot
39cab7cd25 Merge "Support product-specific libraries" 2018-05-24 03:04:48 +00:00
Logan Chien
dda4678a11 Merge "Always use versioned VNDK directory" 2018-05-22 04:04:07 +00:00
Jordan Liu
2f51c3ec25 Merge "Add a new directory to store downloaded apns" am: e0a52774b4
am: c25eeeca52

Change-Id: I0e4fc27f07aea7a050ed06d7206256319d4204bc
2018-05-21 14:49:10 -07:00
Paul Crowley
36bd69f826 Add option to create metadata mount point
am: fe305ab286

Change-Id: If035ab553e75afd4ac6e07ee1c97d6218c3ce397
2018-05-21 10:46:33 -07:00
Niklas Lindgren
fd66538ef3 Add a new directory to store downloaded apns
downloaded apns-conf.xml will be stored in the folder
/data/misc/apns/ to make sure TelephonyProvider gets
access.

Bug: 79948106
Test: Manual
Change-Id: I4ba0596fa6523c0eb96328dbe46ead02587bd9b8
2018-05-21 18:48:28 +02:00
Paul Crowley
fe305ab286 Add option to create metadata mount point
Test: booted metadata-encrypted device
Bug: 79781913
Change-Id: Ie922db20314c04409c98700bfb1aff3d111275f0
2018-05-18 14:10:56 -07:00
Logan Chien
5a35d12e62 Always use versioned VNDK directory
Bug: 78605339
Test: sailfish-userdebug builds and boots
Test: sailfish boots with GSI
Change-Id: I7da5845b5c1caed3b73d7665f1db672f2764c2a8
(cherry picked from commit 6a145749be)
2018-05-17 14:29:44 +08:00
Logan Chien
85e72361ac Merge "Always use versioned VNDK directory" into pi-dev
am: 5789b80a2b

Change-Id: If3c7ef539f32a73caaa42e23507c3c5e3396fe16
2018-05-16 02:43:46 -07:00
Logan Chien
6a145749be Always use versioned VNDK directory
Bug: 78605339
Test: sailfish-userdebug builds and boots
Test: sailfish boots with GSI
Change-Id: I7da5845b5c1caed3b73d7665f1db672f2764c2a8
2018-05-16 11:34:05 +08:00
Inseob Kim
67cb05654c Support product-specific libraries
Product-specific libraries in /product/lib can be exposed to Android
apps by adding the list of the libs into
/product/etc/public.libraries-<companyname>.txt. The libs MUST be named
as lib<name>.<companyname>.so.

Bug: 73095206
Test: with taimen
mma -j and runtest.sh. The libs are all loaded in system, but not in
vendor. After reinstalling app using adb -r and reopening app, only
libraries listed in .txt are loaded

Change-Id: I7c386813c72a7b225a7f244b6c5fec4ac0660fd3
2018-05-16 01:36:25 +00:00
Ralph Nathan
f8d80b16a6 Merge "Add a public.libraries.txt file for iot devices." am: ca07de4214
am: 3b0360a572

Change-Id: I4dc565134b129765f97093c3ee3a25ca4e30dc05
2018-04-23 17:35:28 -07:00
Ralph Nathan
ab39ce88e4 Add a public.libraries.txt file for iot devices.
Previously on Android Things, we used a vendor public.libraries.txt
file. This cl enables us to tag our library correctly.

Bug: 78226207
Test: test app works
Change-Id: I9e69717e5968a903e84f59c1d889c8e4cf9bcc35
2018-04-20 13:46:55 -07:00
Tim Murray
3188458f36 cutils: add restricted cpuset
am: 658ae90f69

Change-Id: I94d05991e95f79282b0ad980a97edb75d2e908f7
2018-04-18 17:00:21 -07:00
Tim Murray
658ae90f69 cutils: add restricted cpuset
Bug 78197570
Test: CTS
Exempt-From-Owner-Approval: owner OOO, build cop says it's fine

Change-Id: I6df972950b75a839caa463ae282ad000b959e8ae
2018-04-18 16:42:12 -07:00