Commit Graph

2315 Commits

Author SHA1 Message Date
Dongwon Kang a04e48dbec Merge "Fix a warning on namespace.media.link.default.shared_libs" into qt-dev 2019-04-24 17:57:14 +00:00
Dongwon Kang 9d7a979a99 Fix a warning on namespace.media.link.default.shared_libs
Test: build & dumpsys media.extractor
Bug: 130882530
Change-Id: Ifd46858b5a864f0fbed87baa3321f233ea12954e
2019-04-23 14:56:21 -07:00
TreeHugger Robot 347f1ccf4b Merge "Adding adb_debug.prop into debug ramdisk" into qt-dev 2019-04-23 16:30:24 +00:00
Bowgo Tsai 6386c3207b 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
Merged-In: Id6962414197fc8f47f7c07818e8fb16107dc17a3
(cherry picked from commit 05f07d89a6)
2019-04-23 11:13:46 +08:00
Wei Wang ec78cca331 init.rc: set fsck log permission on post-fs-data
Fixes: 130829745
Test: build and trigger fsck
      crosshatch:/ # ls -l /dev/fscklogs/log
      -rwxrwx--- 1 root system 1584 1970-04-08 14:48 /dev/fscklogs/log
Change-Id: Ifd0734e121d07b941a73d7cabde04928ce5e5c59
Merged-In: Ifd0734e121d07b941a73d7cabde04928ce5e5c59
2019-04-22 18:24:55 -07:00
Bowgo Tsai 630fcdf153 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
Merged-In: I63f5f846e82ba78427062bf7615c26173878d8f3
(cherry picked from commit 30afda71c0)
2019-04-20 08:01:06 +08:00
Wei Wang 50b7b4c113 Merge "init: set oom_adj early before fork vendor_init" into qt-dev 2019-04-19 17:13:39 +00:00
Wei Wang bb2bc1586d init: set oom_adj early before fork vendor_init
right now vendor_init is forked before we set oom_adj for init which
leaves a chance vendor_init could be killed in heavy memory pressure.

this CL set the oom_adj before forking everything to ensure all native
have correct oom_adj settings.

Fixes: 130824864
Test: procrank -o

(cherry picked from commit 45d8174fe7)

Change-Id: I68c18f9db24d55239f7f0608592fcc702f04542e
2019-04-18 16:31:11 -07:00
Dongwon Kang a8e4b89768 Remove libandroid.so from media namespace.
Test: adb shell dumpsys media.extractor
Bug: 130637522
Change-Id: Ia6366834613d1e12498fa90377e79f62a2149776
2019-04-17 10:47:33 -07:00
Yifan Hong c9a9d279ef charger: Allow to rw /sys/power/[state,wakeup_count]
charger needs to suspend the device when the power goes away
when it doesn't have root. These two files are marked with
group system, user system, mode 0600 in 'on boot', but
it is not executed in charger. Hence, move these actions
to 'on init'.

Test: no failure in libsuspend in charger

Bug: 129138950

Change-Id: I787b935b4ff6177601329aeedccdac361b119ca3
2019-04-09 13:13:33 -07:00
Yifan Hong bd5853cb48 Merge changes from topic "libprocessgroup_rc"
* changes:
  CgroupSetupCgroups -> CgroupSetup
  Add libcgrouprc to ld.config.*.txt.
  libprocessgroup: use libcgrouprc to read cgroup.rc
  libprocessgroup_setup: use libcgrouprc_format
  libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup
  libprocessgroup: Add libcgrouprc
  libprocessgroup: Add libcgrouprc_format
2019-04-03 16:41:21 +00:00
Yifan Hong 169a3e6095 Add libcgrouprc to ld.config.*.txt.
Test: boots (sanity)
Bug: 123664216
Change-Id: I23c3ece44816e4e213f9630b915e19978a259823
2019-04-02 17:34:37 -07:00
Jiyong Park 28429ff8c1 Merge "Search rs namespace prior to vndk namespace" am: 5ccb6a5cdc am: 8b524e9b45
am: deeedf9783

Change-Id: Id1f3e8d310bd1b8f3b7c67e0ab7485d96fd541bb
2019-04-02 01:47:06 -07:00
Treehugger Robot 5ccb6a5cdc Merge "Search rs namespace prior to vndk namespace" 2019-04-02 08:24:42 +00:00
Jiyong Park fa4971f3c3 Search rs namespace prior to vndk namespace
With the recent change that removed get_exported_namespace out of libdl,
the RenderScript SP-HAL stopped using android_dlopen_ext which it used
to load libRS_internal.so in the "rs" namespace. Instead, it now falls
back to the ordinary dlopen() call. The dlopen() call tries to load the
lib in the current namespace (which is sphal) and then falls back to the
linked namespaces: default, vndk, rs.

The problem is that rs is listed as the last namespace and therefore the
linker tries the namespace only when it failed to load the library in
other namespaces: default and vndk. libRS_internal.so is accessible to
both vndk and rs namespaces. So, the dlopen() call always goes into the
vndk namespace and there is no chance for the lib to be loaded in the rs
namespace.

To fix the problem, the rs namespace is placed before vndk so that the
namespace is tried first.

Bug: 129550847
Test: runtest -x cts/tests/camera/src/android/hardware/
Change-Id: Idafc32f8a309dd12495768931d7ea17a2f791c50
2019-04-02 02:43:23 +00:00
Jaegeuk Kim cc563077bf Merge "init.rc: tune F2FS to be aligned to system settings" am: 99ba4b36e8 am: d2060b771d
am: e727f6612c

Change-Id: I7a6b250ebb79baf726de6f6493fc2f11262682c4
2019-04-01 09:34:17 -07:00
Treehugger Robot 99ba4b36e8 Merge "init.rc: tune F2FS to be aligned to system settings" 2019-04-01 16:10:28 +00:00
Bowgo Tsai d03dfdf984 Merge "Adding GSI public keys" am: ddaf736a88 am: aea89ed3ea
am: 7e4834ce7f

Change-Id: If46aa415528d998afc4fbac7a2d6992fc285045d
2019-04-01 07:14:57 -07:00
Treehugger Robot ddaf736a88 Merge "Adding GSI public keys" 2019-04-01 13:43:34 +00: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
Jaegeuk Kim f65df964c0 init.rc: tune F2FS to be aligned to system settings
Android sets /proc/sys/vm/dirty_expire_centisecs to 200, so f2fs
doesn't need to do checkpoint in 60 seconds.

Bug: 127511432
Change-Id: I2ba0623053d4480b82003eb1cca85ff03c61fc0f
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-03-29 22:43:29 +00:00
Suren Baghdasaryan f33436d720 Merge "Set /proc/pressure/memory file permissions" am: 3cf9850cef am: e337910a35
am: d8a1ee860c

Change-Id: I46d066d35a97a0d0fc01240c58a8060a40d6cea7
2019-03-29 13:36:57 -07:00
Tim Murray 1504cb5b6e Set /proc/pressure/memory file permissions
Change access mode and ownership for /proc/pressure/memory file
to allow system components access memory pressure information.

Bug: 129476847
Change-Id: I25b6bc9d47aee857936f050b66e7bee6363b53be
Signed-off-by: Tim Murray <timmurray@google.com>
2019-03-28 22:12:06 +00:00
Martin Stjernholm d2c8014b13 Merge "Apply the standard system linker config to all of /data." am: 60de348654 am: 0ec4836b71
am: e7540ff272

Change-Id: I928e2d7f4e274d753a23c7a10b647abefa6096b7
2019-03-28 05:59:01 -07:00
Martin Stjernholm 60de348654 Merge "Apply the standard system linker config to all of /data." 2019-03-28 12:37:29 +00:00
Victor Hsieh c4430f3489 Merge "Initialize fs-verity keys in shell script" am: 7f43e9fa40 am: ef787edd24
am: 98d7696248

Change-Id: Ie144188d08d295b1c34b1593772f74fed96a4197
2019-03-27 13:51:14 -07:00
Treehugger Robot 7f43e9fa40 Merge "Initialize fs-verity keys in shell script" 2019-03-27 20:31:19 +00:00
Martin Stjernholm 6ba5d996d7 Merge "Remove links to libart(d).so in the runtime." am: fdf70f1ba8 am: fd7f92372d
am: 0c0deebf98

Change-Id: If5fcd8b69ac72c436141140f155ad1c4d99524a4
2019-03-27 10:43:21 -07:00
Martin Stjernholm adf4503de1 Apply the standard system linker config to all of /data.
This is necessary to get the correct APEX namespace setup for apps that
executes binaries from there.

In older releases no linker config applied to binaries in /data, so the
fallback config in /system/bin/linker was used, which basically just looked
up libraries in /system/{lib,lib64}. With the introduction of APEXes that
location no longer contains the complete set of libraries, so this is
necessary to retain functional parity.

Strictly speaking this fallback rule should apply as last resort for a
binary in any location, but the linker does not accept "dir.system = /".

Test: Flash and boot
Test: The app regression in b/128569634
Bug: 128569634
Change-Id: Icfcd66f0a7d8d898618be1b6186bb1111d20d688
2019-03-26 18:10:51 +00:00
Martin Stjernholm 5c074e0ab9 Remove links to libart(d).so in the runtime.
They are not needed since the binaries and relevant exported libraries have
moved to the Runtime APEX.

Test: Flash and boot
Test: atest CtsJniTestCases CtsJdwpTestCases
Bug: 119867084
Change-Id: If416fbae7057aec02059bb31a4dcd8b63dcc0cad
2019-03-26 17:24:12 +00:00
Pete Bentley 57616a7307 Merge "Tighten native API surface." am: d2c4eb0dae am: 5f920a0a57
am: ae89bfb67d

Change-Id: I73608d1d987c00a08452d98ebe13620eb1237d1b
2019-03-26 02:48:14 -07:00
Pete Bentley d2c4eb0dae Merge "Tighten native API surface." 2019-03-26 09:19:37 +00:00
Vic Yang 034bfeba6f Merge "Fix sed command on Mac builds" am: 42a5dd9c41 am: ad7bf56b1d
am: e22977e8fa

Change-Id: I672a5fbbff66fb98a4dcbbf714532f628dab57d7
2019-03-25 06:58:18 -07: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
Vic Yang 4a85f3c92a Fix sed command on Mac builds
Bug: 119423884
Test: Manually test sed command on Mac
Change-Id: I8df32b2476a01e2b758ea81f00dae0b6179ba79a
2019-03-21 10:16:06 -07:00
Pete Bentley cc6c50a123 Tighten native API surface.
AsynchronousCloseMonitor is moved into libandroidio by
r.android.com/910073 and so libjavacore no longer needs to
be linked to the conscrypt namespace.

Bug: 123744297
Test: m && flashall
Test: atest CtsLibcoreOkHttpTestCases
Test: atest CtsLibcoreTestCases
Change-Id: Id720b59e4ef42a2c0226b497a1cc3c54f7a837d0
2019-03-21 17:13:14 +00:00
Vic Yang 60e3c55900 Merge "Add support for no-vendor-variant VNDK" am: c3e96512c0 am: 5e9c91c404
am: 1a41a41bcc

Change-Id: I13d4a8e9a97f6b229581f29400fbe50647f8fdde
2019-03-20 21:59:29 -07:00
Vic Yang c3e96512c0 Merge "Add support for no-vendor-variant VNDK" 2019-03-21 04:30:47 +00:00
Xiaoyong Zhou ed98d4f249 Merge "Enable fsverity signature checking" am: aaee497db2 am: 0d8d105e32
am: f0ac994384

Change-Id: I400ba966f1e23400bb3e4a2f3bb8ab0b3ba10368
2019-03-19 10:11:11 -07:00
Treehugger Robot aaee497db2 Merge "Enable fsverity signature checking" 2019-03-19 16:40:48 +00:00
Roland Levillain 44cbfa1ac7 Merge "Include tests directories in the linker legacy configuration." am: d503239292 am: 5481e3aec8
am: 315a0513f1

Change-Id: I56ada3fd79c09e2f52e12e233d06a5980e02611b
2019-03-19 05:37:09 -07:00
Roland Levillain d503239292 Merge "Include tests directories in the linker legacy configuration." 2019-03-19 10:17:10 +00:00
Neil Fuller 5f2e4f7871 Merge "Address syntax / error case nits" am: ed6b5177e2 am: 6ac873c3b9
am: d836b1dca9

Change-Id: Ia2ce435666fa3d2cc1f5ff171e5612878afdceb0
2019-03-19 02:58:50 -07:00
Neil Fuller ed6b5177e2 Merge "Address syntax / error case nits" 2019-03-19 09:37:55 +00:00
Xiaoyong Zhou 66fc7eb195 Enable fsverity signature checking
This CL enable fsverity signature checking.

Bug: 112038861
Test: cat /proc/sys/fs/verity/require_signatures -> 1
Change-Id: I57aaf6094aa503bdcac93306cafd7f71f202e711
2019-03-18 14:28:18 -07:00
Roland Levillain 5c99a0c067 Include tests directories in the linker legacy configuration.
Make ld.config.legacy.txt similar to other linker configurations with
respect to tests in /data/{nativetest,benchmarktest}{,64}.

Note: The linker legacy configuration is used by the ART generic build
targets, defined in project device/generic/art.

Test: ART chroot-based on-device testing using the master-art
Bug: 121117762
Change-Id: I6c8fafa2568862e450aa7b9fea1177a184cb9705
2019-03-18 19:07:32 +00:00
Dongwon Kang aca2e799ee Merge "List stable libraries media apex relies on." am: fc0f79f8a8 am: 5698f77f5f
am: cd557657bc

Change-Id: Ib6b863c7b07f587c2a1d54e1c686d03b75c527ac
2019-03-15 22:47:37 -07:00
Dongwon Kang fc0f79f8a8 Merge "List stable libraries media apex relies on." 2019-03-16 05:34:09 +00:00
Andreas Gampe 514fc03638 Merge "Init: Load fsverity keys earlier" am: f09ef56056 am: a0cc42381c
am: a7597deed2

Change-Id: Ibe40afdbed4af22f207600a94307448191287f29
2019-03-15 19:34:32 -07: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