Commit Graph

2348 Commits

Author SHA1 Message Date
Bowgo Tsai 14b8c451c4 Adding new GSI public keys
Adding two new public keys for R-Developer-GSI and S-Developer-GSI,
respectively.

Bug: 149805495
Test: m r-developer-gsi.avbpubkey
Test: m s-developer-gsi.avbpubkey

Change-Id: Iaa7521ef40b94f13fe3c9c61d276678f47c60b98
Merged-In: Iaa7521ef40b94f13fe3c9c61d276678f47c60b98
(cherry picked from commit b697d47eb3)
2020-02-19 17:42:25 +08:00
Automerger Merge Worker 101e437515 Move gcov output to /data/misc/trace am: e6fa0a6af2
Change-Id: I8294c4704ae3f3eaaa997aa1e2c4504b811cca03
2020-02-03 19:16:54 +00:00
Jaegeuk Kim be9114f220 Merge "rootdir: init.rc to limit discard size to 128MB" into qt-qpr1-dev 2020-02-01 01:49:24 +00:00
Oliver Nguyen e6fa0a6af2 Move gcov output to /data/misc/trace
Gcov output location has world write on debuggable builds.

Test: N/A
Bug: 128524141
Bug: 148178774
Change-Id: Ia6b94e26352dd66f5c6819f6157b4b73dd777a90
Merged-In: Ia6b94e26352dd66f5c6819f6157b4b73dd777a90
(cherry picked from commit 360eb055e0)
2020-01-29 18:59:28 +00:00
Jaegeuk Kim 9e09cbceb0 rootdir: init.rc to limit discard size to 128MB
In any case, UFS storage suffers from long discard latency.

Bug: 148209614
Change-Id: Iaa8ef6eb862934af43254bd10873a12c3d34e926
Merged-In: Iaa8ef6eb862934af43254bd10873a12c3d34e926
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-01-23 19:39:52 +00:00
Bowgo Tsai d1bdcba625 Adding the AVB public key for Q-Developer-GSI
Bug: 144399552
Test: m q-developer-gsi.avbpubkey

Change-Id: If140c429c8b8324c0c2364aa67e72e41748b42b4
Merged-In: If140c429c8b8324c0c2364aa67e72e41748b42b4
(cherry picked from commit bd0853602b)
2019-12-16 14:45:43 +08:00
Paul Crowley 04908a85f0 Create /data/per_boot
Bug: 140882488
Test: Booted twice, checked logs to ensure encryption
    is different each time, adb created files in directory.
Cherry-Picked-From: 570d20d2ac
Merged-In: I44f746acd1040f7baa9123d4824ba39b194f287b
Change-Id: I44f746acd1040f7baa9123d4824ba39b194f287b
2019-09-17 18:44:16 +00:00
Kiyoung Kim 1d85de658c Replace xargs with other shell command
Recently Android build team changed environment to use prebuilt toybox
binaries for common tools (aosp/852849). However, as toybox xargs does
not support -I option, update_and_install_ld_config.mk started to fail
filtering out private vndk libraries from the list. To resolve this,
xargs usages are replaced with other shell command (read).

Bug: 137832162
Test: m -j && tested on Cuttlefish
Change-Id: I218ce6272c781f826b87c8efc0d3c77bf6bc3af5
Merged-In: I218ce6272c781f826b87c8efc0d3c77bf6bc3af5
(cherry picked from commit 95d55818a4)
2019-08-02 11:15:28 +09:00
Daniel Rosenberg 0d9c4080f4 Merge "Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev
am: 11bf3545ab

Change-Id: I9c7af0807d12ef60636d407fbba64ec664a7d31a
2019-07-15 13:22:03 -07:00
Daniel Rosenberg 11bf3545ab Merge "Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev 2019-07-15 19:56:35 +00:00
Daniel Rosenberg 35708b9d7b Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""
This reverts commit 997a2d93d7.

Reason for revert: This revert is needed, just also need some selinux rules for changes to the script that runs if this folder is present.

Bug: 136199978
Change-Id: Ie0544954965e3c90abc2f833c41949976c3bea65
2019-07-12 23:43:56 +00:00
Gerry Fan c9aff9869d Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev
am: ff7da227db

Change-Id: I42b5fdcdb6b87afe44353d830f6b1b5c0c645fc0
2019-07-12 10:24:00 -07:00
Gerry Fan ff7da227db Merge "Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""" into qt-dev 2019-07-12 17:11:23 +00:00
Gerry Fan 997a2d93d7 Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb.""
This reverts commit 891a011394.

Reason for revert: Some Test failed, need more investigation

Bug: 136199978
Change-Id: Ibad0dad02a6701447c39ddcc805d44c9e68bdcce
2019-07-12 15:23:12 +00:00
Hung-ying Tyan b8aaa13a5f Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev
am: 346c17bbc9

Change-Id: I501695115c2c84345db0c78e8694fd31686b7ee7
2019-07-12 02:49:37 -07:00
Hung-ying Tyan 346c17bbc9 Merge "Revert "rootdir / sdcard : Stop creating /data/media/obb."" into qt-dev 2019-07-12 09:27:01 +00:00
Gerry Fan 891a011394 Revert "rootdir / sdcard : Stop creating /data/media/obb."
This reverts commit c6ca823710.
Reason for revert: Q-GSI on Pie devices would crash kernel.

Bug: 136199978

Change-Id: I16a2cb81a1f21627db0cb00324679a322ba42fe0
2019-07-12 00:16:06 +00:00
Jaegeuk Kim bb0838b511 rootdir: init.rc: use gc_urgent_sleep_time for f2fs
This accelerates f2fs GC when IdleMaint.

Bug: 128594671
Bug: 137190790
Change-Id: I1cea7c99ffd5963711c66460f1c8368b43aeaee2
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-07-10 17:02:12 +00:00
Daniel Rosenberg 23c454fa3d Merge "Start Vold on early-fs" into qt-dev
am: d6253fc917

Change-Id: I64a4f4a557bf737c0fac1b2f5f94ed28f263ee06
2019-06-18 12:58:08 -07:00
TreeHugger Robot d6253fc917 Merge "Start Vold on early-fs" into qt-dev 2019-06-18 19:17:01 +00:00
Daniel Rosenberg 1be83e30c5 Start Vold on early-fs
We need vold on early-fs so we can handle userdata checkpointing.
Without this, devices will take an extra minute or two as checkpointing
related vdc calls attempt to reach vold before it is available.

Bug: 134114000
Test: Boot, see vold has started before vdc checkpointing tries to call
      out to vold.

Change-Id: Idfdb304503a163fbb91f9317949eb98c06fecce1
2019-06-17 22:30:44 +00:00
Peter Collingbourne c58c10a973 Link the sanitizer runtime libraries to the default unrestricted namespace.
Without this, binaries can't be run out of /data/local/tmp on a HWASANified
device.

Bug: http://b/134503977
Test: Chromium's /data/local/tmp/md5sum/md5sum_bin works on walleye_hwasan-userdebug
Change-Id: Ieceaab8aae0024864022ca42b38aa36e6212cf31
(cherry picked from commit 563ca38154)
2019-06-14 14:57:45 -07:00
Min Yun 702981f54f Merge "Add libcgrouprc to ld.config.txt." into qt-dev
am: 4e5fddd5f5

Change-Id: Ia28f8fb8e68deb24e17504ea8369da61501f0b5b
2019-06-12 15:49:23 -07:00
Min Yun 8d502fc150 Add libcgrouprc to ld.config.txt.
- In GSI, media.extractor has follow dependency.
media.extractor -> libmpeg2extractor (media ns) ->
libprocessgroup (media ns) -> libcgrouprc (default ns).
If libcgroupsrc can't link from libmpeg2extractor, media.extractor is crashed.

Test: media.extractor didn't die.
Bug: 134981805
Merged-In: I7d3e7e6477708a505b87a884e05cd719f5a3d496
(cherry picked from commit d695733df9)

Change-Id: I7d3e7e6477708a505b87a884e05cd719f5a3d496
2019-06-12 13:56:31 +09:00
Peter Collingbourne 3bdd3cfab6 Link the "runtime" namespace to more namespaces.
The canonical location of the HWASAN runtime, an LL-NDK library, is being moved
to the runtime APEX. It is apparently the first LL-NDK library in the runtime
APEX that does not require a legacy symlink in /system/${LIB}. Therefore we
need to link the HWASAN runtime in the runtime namespace to various namespaces
so that the library can be loaded from outside of the namespace.

Also, add $SANITIZER_RUNTIME_LIBRARIES to
namespace.default.link.system.shared_libs. This is necessary because in
the accompanying Soong change, we cause the HWASAN runtime to be removed
from $LLNDK_LIBRARIES. In most cases, except for this one, this was a no-op
because we were already including both sets of libraries in shared_libs.

Bug: http://b/134503977
Test: Builds

Change-Id: I67d64788855d28f3a156a1b9cf8a897617277730
Merged-In: I67d64788855d28f3a156a1b9cf8a897617277730
(cherry picked from commit fb1c5a724e)
2019-06-06 02:12:30 -07:00
Narayan Kamath c6ca823710 rootdir / sdcard : Stop creating /data/media/obb.
This directory is no longer used. OBB content is
placed in /data/media/$user/Android.

Test: make
Test: manually verify the path doesn't exist.
Bug: 129167772

Change-Id: I8549826586b9a68c8cfa3fe2e51295363f9b4e11
2019-05-23 15:09:54 +01:00
Victor Chang 28904625b8 Merge "Allow linking to libicuuc.so and libicui18n.so from executable in /data" into qt-dev 2019-05-22 15:43:44 +00:00
Victor Chang 32190f45e0 Allow linking to libicuuc.so and libicui18n.so from executable in /data
Executable in /data/ runs in default linker namespace, not
classloader namespace.
In Q, we moved libicuuc.so and libicui18n into the runtime
namespace, and allow linking from runtime namespace and classloader
namespace.

This change further allows linking from default namespace, and tries
to fix the regression temporarily.

Bug: 130788466
Test: The app issue is fixed after this CL
Merged-In: Ifae52b554124514e433cfe78875643a7450fbabd
Change-Id: Ifae52b554124514e433cfe78875643a7450fbabd
(cherry picked from commit 0c7edece94)
2019-05-20 11:59:51 +01:00
Jiyong Park 78e6b181ac Add asan.permitted.paths for the media namespace
Permitted paths were empty for ASAN builds with the media namespace.

Bug: 131625115
Test: no dlopen failure on libflacextractor.so in aosp_cf_x86_pasan
Change-Id: I90050fc54820ba68d64931412572f3b0954e6616
2019-05-15 12:41:01 +09:00
Michael Groover b9c555e2cf Merge "Notify the framework when an adb key is authorized" into qt-dev 2019-05-10 22:54:55 +00:00
Michael Groover 7eeda6ba03 Notify the framework when an adb key is authorized
Bug: 124076524
Test: atest AdbDebuggingManagerTest
Change-Id: If73b81ca73ba4d64763cf49c1bbe42de81fa1cb6
2019-05-09 16:05:40 -07:00
Rick Yiu c7bf1a01fd Apply initial settings for blkio cgroup
Bug: 117857342
Test: values are applied
Change-Id: Id28d9619fc2fd2287fe656b8032025184ae7f631
(cherry picked from commit a8aaf198d5)
Merged-In: Id28d9619fc2fd2287fe656b8032025184ae7f631
2019-05-09 03:14:11 +00:00
Martijn Coenen f0bc58a42d Support for stopping/starting post-data-mount class subsets.
On devices that use FDE and APEX at the same time, we need to bring up a
minimal framework to be able to mount the /data partition. During this
period, a tmpfs /data filesystem is created, which doesn't contain any
of the updated APEXEs. As a consequence, all those processes will be
using the APEXes from the /system partition.

This is obviously not desired, as APEXes in /system may be old and/or
contain security issues. Additionally, it would create a difference
between FBE and FDE devices at runtime.

Ideally, we restart all processes that have started after we created the
tmpfs /data. We can't (re)start based on class names alone, because some
classes (eg 'hal') contain services that are required to start apexd
itself and that shouldn't be killed (eg the graphics HAL).

To address this, keep track of which processes are started after /data
is mounted, with a new 'mark_post_data' keyword. Additionally, create
'class_reset_post_data', which resets all services in the class that
were created after the initial /data mount, and 'class_start_post_data',
which starts all services in the class that were started after /data was
mounted.

On a device with FBE, these keywords wouldn't be used; on a device with
FDE, we'd use them to bring down the right processes after the user has
entered the correct secret, and restart them.

Bug: 118485723
Test: manually verified process list
Change-Id: I16adb776dacf1dd1feeaff9e60639b99899905eb
2019-04-26 11:54:19 +02:00
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