Commit Graph

40366 Commits

Author SHA1 Message Date
Greg Kaiser d8e76e1e43 Revert "Support Speck encryption."
This reverts commit 49c27c5cb2.

Remove the Speck encryption support. It was eventually
decided not to allow Speck in Android P, so this code
is no longer needed and wasn't used outside of testing.

Bug: 112009351
Test: Confirmed AES continues to work with FBE.
Change-Id: Ia5458143be5687fff8d541d8fa2c8ee24a369da4
(cherry picked from commit 270e90f033)
2018-08-16 16:40:38 +00:00
android-build-team Robot 0fac9018f2 Merge cherrypicks of [4392181, 4392182, 4392183, 4392184, 4392201, 4392202] into pi-release
Change-Id: I82b5577e2ecdbf50a73df940db72964b9c6969af
2018-06-21 00:58:42 +00:00
Doheon Lee 9e9970d7ce 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
Merged-In: I6ca177d0c9c5af00ad821879fece40848331fc8d
(cherry picked from commit cccad0bf84)
(cherry picked from commit 93d837f3a9)
2018-06-21 00:58:38 +00:00
Inseob Kim 987e94eb8f 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
Merged-In: Icd102d44511702e4ec66c07a367b59c3d9700a44
(cherry picked from commit 3918936b9e)
(cherry picked from commit c4cf62f4b4)
2018-06-21 00:58:31 +00:00
android-build-team Robot 68078ca2b8 Merge cherrypicks of [4368877, 4369031, 4369032, 4369033, 4369034, 4368878, 4369035, 4369036, 4369008] into pi-release
Change-Id: I05769d63a54c76d20b8724dce36b30e54cba9be6
2018-06-18 23:34:51 +00:00
Hridya Valsaraju c1cc7eca84 Populate recovery DTBO offset correctly
Also, remove recovery_dtbo_offset argument
for mkbootimg as this is calculated based
on sizes of kernel, ramdisk and second
binaries.

Also, modify unpack_bootimg to use the recovery_dtbo_offset
field to extract recovery_dtbo.

Test: make recoveryimage showcommands -j32
Bug: 80207223
unpack_bootimg --boot_img $OUT/recovery.img
diff recovery_dtbo dtbo.img

Change-Id: I588ccc8b739c169b6f78c17ffe554c5562397d98
Merged-In: I588ccc8b739c169b6f78c17ffe554c5562397d98
(cherry picked from commit 26e01bbdc5)
(cherry picked from commit b8371d532d)
2018-06-18 23:34:31 +00:00
Hridya Valsaraju 59ef43ef1f Correct comment in boot image header
Test: make
Bug: 80207223
Change-Id: I88cf7683e036ff43bbe3ff5418519c7e35e08b79
Merged-In: I88cf7683e036ff43bbe3ff5418519c7e35e08b79
(cherry picked from commit d0ab4e3701)
(cherry picked from commit f514f6f66a)
2018-06-18 23:34:26 +00:00
android-build-team Robot f309407c6c Snap for 4826885 from 820ef15058 to pi-release
Change-Id: Ifbb0531108a6292880957b7f4a4a5225926e32c6
2018-06-07 07:20:19 +00:00
TreeHugger Robot 820ef15058 Merge "Parse IfIndex for Netlink RTM_NEWADDR / RTM_DELADDR event" into pi-dev 2018-06-06 13:51:24 +00:00
android-build-team Robot 84240055f4 Snap for 4824048 from ea03e1f841 to pi-release
Change-Id: I0f4785f6e473990eb636cea655c7d1c78022de93
2018-06-06 07:21:53 +00:00
Mark Salyzyn ea03e1f841 liblog: expect content only if ro.logd.kernel is enabled
On svelte devices, CTS test liblog#android_logger_get_ fails on the
missing kernel buffer because it is not enabled to save space.

Test: gTest liblog_unit_tests
Bug: 109669791
Change-Id: Iaf46fe9713d3462a56885515a67db640544345ab
2018-06-05 08:42:51 -07:00
android-build-team Robot 5f1febdeef Snap for 4818534 from 9bd3ee1c4f to pi-release
Change-Id: Idc9af3a531d434302036e2d1d61e172bd9a7849d
2018-06-03 07:20:49 +00:00
Inseob Kim 9bd3ee1c4f Support /product/bin
Bug: 80422611
Test: m -j succeeded and permissions of files under /product/bin are set
correctly

Change-Id: I83377d809c47c92da6b226d2853ea6a7462fb127
Merged-In: I83377d809c47c92da6b226d2853ea6a7462fb127
(cherry picked from commit 25195daaca)
2018-06-01 10:38:57 +09:00
TreeHugger Robot f88508898c Merge "Support product-specific libraries" into pi-dev 2018-06-01 01:00:28 +00:00
Yin-Chia Yeh c5c84baaf8 Camera: add DISABLE error code
Test: CTS CameraEvictionTest + IdleUidTest
Bug: 77486868
Change-Id: I1411d6667776963435ce25bd643a33c41d224921
2018-05-31 12:14:14 -07:00
Inseob Kim e5c2de355b 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
Merged-In: I7c386813c72a7b225a7f244b6c5fec4ac0660fd3
(cherry picked from commit 67cb05654c)
2018-05-31 09:59:21 +09:00
android-build-team Robot 2d48594be4 Snap for 4807121 from 39edb87aaf to pi-release
Change-Id: Ie984edd49d1535bd3fc0686a3b6144b2659b25a9
2018-05-27 07:28:13 +00:00
android-build-team Robot aa0ede2d31 Snap for 4801384 from c70e76f1a4 to pi-release
Change-Id: I33f4e3cdd7a211df7432408c810cf3194112db93
2018-05-24 07:24:19 +00:00
TreeHugger Robot 39edb87aaf Merge "healthd_mode_charger: unblank the screen only on first frame" into pi-dev 2018-05-24 07:03:36 +00:00
Andrew Chant c70e76f1a4 Merge "Add cwren to libmetricslogger OWNERS" into pi-dev 2018-05-24 01:30:58 +00:00
TreeHugger Robot f6f8751fd6 Merge "Make per-application memcg hierarchy configurable via a property" into pi-dev 2018-05-24 01:20:17 +00:00
Thierry Strudel ac2aa7d7b1 healthd_mode_charger: unblank the screen only on first frame
Original code is unblank screen for all frames of the first
cycle, unblank is needed only before the first frame of the
first cycle.

Bug: 74771887
Change-Id: I51d8390e359335a0b1cb127b096db1a8b889b169
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2018-05-23 17:30:16 -07:00
Suren Baghdasaryan cbb690299f Make per-application memcg hierarchy configurable via a property
Introduce ro.config.per_app_memcg Android property to enable/disable
per-application memcg hierarchy.
On low-ram devices (ro.config.low_ram=true) ro.config.per_app_memcg
defaults to true, otherwise it defaults to false.

Bug: 80201565
Test: set ro.config.per_app_memcg=true and verify /proc/<app_pid>/cgroup
membership (memory:/apps/uid_xxx/pid_xxx)
Test: set ro.config.per_app_memcg=false and verify /proc/<app_pid>/cgroup
membership (memory:/)
Change-Id: Iabd3ef6c9c16c774b9da959a7f43b5f66df120a3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-05-23 16:23:20 -07:00
Andrew Chant 2cd9d92a1d Merge "Add Hardware Reliabilty metrics to C header" into pi-dev 2018-05-23 21:25:45 +00:00
Andrew Chant 77b720e458 Add cwren to libmetricslogger OWNERS
Bug: 69978775
Test: None.
Change-Id: Ic48e37fa4a1fa192bcd948954dc056219535e0b8
2018-05-23 14:16:42 -07:00
android-build-team Robot a8992075c0 Snap for 4799153 from 428a6ffaf8 to pi-release
Change-Id: I8b50c825ba0cdcaedd4729b759cecf5ee3d48a4c
2018-05-23 07:28:01 +00:00
Andrew Chant 358471f749 Add Hardware Reliabilty metrics to C header
Expose Hardware Reliabilty TRON metrics constants
for logging via C++ interfaces.

Bug: 69978775
Test: Logged events from Pixelstats HAL
Change-Id: I9a1c4467d31f64ae3c43e35b0a4cf5a92157c39f
2018-05-22 15:55:49 -07:00
Jordan Liu 428a6ffaf8 Merge "Add a new directory to store downloaded apns" into pi-dev 2018-05-22 21:12:31 +00:00
Tom Cherry 8b491495a3 Merge "init: finer grained permissions for ctl. properties" into pi-dev 2018-05-22 20:15:07 +00:00
Tom Cherry 9ad11c0eee Merge "init: allow entering of network namespaces" into pi-dev 2018-05-22 17:13:41 +00:00
Christopher Ferris 1ddef8852a Merge "Fix bug when doing signal handler lookup." into pi-dev 2018-05-22 16:24:45 +00:00
Tom Cherry 1debdcf1cf init: finer grained permissions for ctl. properties
Currently, permissions for ctl. property apply to each action verb, so
if a domain has permissions for controlling service 'foo', then it can
start, stop, and restart foo.

This change implements finer grainer permissions such that permission
can be given to strictly start a given service, but not stop or
restart it.  This new permission scheme is mandatory for the new
control functions, sigstop_on, sigstop_off, interface_start,
interface_stop, interface_restart.

Bug: 78511553
Test: see appropriate successes and failures based on permissions
Change-Id: I6ce915ae39954a67eb6fe1795a93cf715c352ae4
2018-05-22 08:02:35 -07:00
android-build-team Robot f2ca6c24b7 Snap for 4796401 from 93d48fe0b6 to pi-release
Change-Id: I9d5a3d4d48b6944b00e032511151eb1a4a391d4b
2018-05-22 07:27:05 +00:00
TreeHugger Robot 93d48fe0b6 Merge "Add files to CleanSpec.mk" into pi-dev 2018-05-22 05:26:16 +00:00
Suren Baghdasaryan 20686f061e lmkd: Do not set soft_limit_in_bytes on high-end devices
Setting memory.soft_limit_in_bytes on high-end devices with large memory
reserves affects performance of memory-hungry applications that have
large workingsets and keep thrashing because of the memory limits imposed.
Limit the usage of memory.soft_limit_in_bytes to low-memory devices only.
Add debug messages for future troubleshooting to capture cases when
vmpressure events are being ignored.

Bug: 78916015
Test: collect vmstat while running a heavy app
Change-Id: Ib4434b96d2be802ef89960b573486eae8d12f198
Merged-In: Ib4434b96d2be802ef89960b573486eae8d12f198
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-05-21 23:17:46 +00:00
TreeHugger Robot 34de3c84fe Merge changes from topic "generic_by_name" into pi-dev
* changes:
  Adds /dev/block/by-name/<partition> symlinks
  Removing block device by-num symlinks
2018-05-21 23:14:38 +00:00
Christopher Ferris d299a7ab58 Fix bug when doing signal handler lookup.
The new lld linker uses all non-zero offset executable maps. There was
a bug when trying to find if the stack is in a signal handler that caused
the code to read the wrong place in the elf. Fixed by not adding the elf
offset to the relative pc.

Also fixed the unwind_for_offline tool to dump multiple stacks if necessary.

Added new offline unit test that would have failed with the old code.

Bug: 79936827

Test: Ran unit tests and libbacktrace unit tests.
Test: Dumped backtraces of system pids.
Test: Ran 137-cfi art test.
Change-Id: Iaca8c18c2a314902e64c3f72831234297e8dcb1b
Merged-In: Iaca8c18c2a314902e64c3f72831234297e8dcb1b
(cherry picked from commit 239425b9fa)
2018-05-21 21:33:02 +00:00
Niklas Lindgren f0a5bbda88 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
Merged-In: I4ba0596fa6523c0eb96328dbe46ead02587bd9b8
2018-05-21 12:09:10 -07:00
Tom Cherry 2fa7451e9b init: allow entering of network namespaces
Add the ability to enter a network namespace when launching a service.
Typical usage of this would be something similar to the below:

on fs
  exec ip netns add namespace_name

service vendor_something /vendor/...
  capabilities <lower than root>
  user not_root
  enter_namespace net /mnt/.../namespace_name

Note changes to the `ip` tool are needed to create the namespace in
the correct directory.

Bug: 73334854
Test: auto team verified
Merged-In: Ifa91c873d36d69db399bb9c04ff2362518a0b07d
Change-Id: Ifa91c873d36d69db399bb9c04ff2362518a0b07d
(cherry picked from commit aead51b418)
2018-05-21 15:52:13 +00:00
Bowgo Tsai 5ee7dae840 Adds /dev/block/by-name/<partition> symlinks
During uevent processing, some "by-name" symlinks will be created.
    /dev/block/<type>/<device>/by-name/<partition>

<type> can be: platform, pci or vbd.
<device> might be: soc.0/f9824900.sdhci, soc.0/f9824900.sdhci, etc.
<partition> might be: system, vendor, system_a, system_b, etc.

e.g., on a non-A/B device:
    /dev/block/platform/soc.0/f9824900.sdhci/by-name/system
    /dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor

On a A/B device:
    /dev/block/platform/soc/1da4000.ufshc/by-name/system_a
    /dev/block/platform/soc/1da4000.ufshc/by-name/system_b
    /dev/block/platform/soc/1da4000.ufshc/by-name/vendor_a
    /dev/block/platform/soc/1da4000.ufshc/by-name/vendor_b

However, those symlinks are "device-specific".

This change adds the "generic" symlinks in ueventd, in addition to
the existing symlinks, when the possible "boot devices" are specified
in device tree. e.g.,

    &firmware_android {
	compatible = "android,firmware";
	boot_devices ="soc/1da4000.ufshc,soc.0/f9824900.sdhci";
    }

The following symlinks will then be created on the aforementioned non-A/B
and A/B devices, respectively.

    /dev/block/by-name/system
    /dev/block/by-name/vendor

    /dev/block/by-name/system_a
    /dev/block/by-name/system_b
    /dev/block/by-name/vendor_a
    /dev/block/by-name/vendor_b

Note that both <type> and <device> are skipped in the newly create symlinks.
It assumes there is no more than one devices with the same <partition>,
which is the assumption of current first stage mount flow.

Finally, when 'boot_devices' in DT is absent, it fallbacks to extract
'boot_devices' from fstab settings. e.g., using 'soc/1da4000.ufshc',
'soc.0/f9824900.sdhci' for a fstab with the following content:

   /dev/block/platform/soc/1da4000.ufshc/by-name/system
   /dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor

Bug: 78613232
Test: adb shell ls /dev/block/by-name
Change-Id: Iec920b5a72409b6a2bdbeeb290f0a3acd2046b5d
Merged-In: Iec920b5a72409b6a2bdbeeb290f0a3acd2046b5d
(cherry picked from commit 8eec38f4e4)
2018-05-19 09:31:35 +08:00
Bowgo Tsai ff17cc31e5 Removing block device by-num symlinks
The uevent.partition_num easily collides between partitions, for
example:

  Both /dev/block/sda3 and /dev/block/sdd3 will generate the same symlink:
    /dev/block/platform/soc/1da4000.ufshc/by-num/p3

This change remove those by-num symlinks as there seems no effective
user of it.

Bug: 78613232
Test: m init_tests && \
      adb push $OUT/data/nativetest64/init_tests/init_tests /data/. && \
      adb shell /data/init_tests

Change-Id: I8dfa8dc1a2f9fc9296aa30f33e905bf158b501de
Merged-In: I8dfa8dc1a2f9fc9296aa30f33e905bf158b501de
(cherry picked from commit 95591bd00e)
2018-05-19 09:28:42 +08: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
android-build-team Robot f7cb192aed Snap for 4787078 from 7905b1e162 to pi-release
Change-Id: Id0a5125ffd734a0b158ab867f8ffd9c0e0ae930a
2018-05-17 07:22:36 +00:00
Rubin Xu 3668291d8e Parse IfIndex for Netlink RTM_NEWADDR / RTM_DELADDR event
Bug: 64692591
Test: cts-tradefed run commandAndExit cts-dev -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideVpnTests
Change-Id: Icb2ae1264f0d2fcd285b04edd27641175dd2646f
2018-05-16 23:39:09 +01:00
TreeHugger Robot 7905b1e162 Merge "Only log the lmkd state change when the killing really happened." into pi-dev 2018-05-16 16:03:19 +00:00
Logan Chien 5789b80a2b Merge "Always use versioned VNDK directory" into pi-dev 2018-05-16 09:38:57 +00:00
android-build-team Robot 7c365bcc92 Snap for 4784261 from 05dca7ae96 to pi-release
Change-Id: I274d523e2a7d8733586aa73a39583c1e01d5dbb6
2018-05-16 07:22:42 +00:00
Logan Chien 9afd9b488f Add files to CleanSpec.mk
This commit removes stale files from incremental builds:

* /system/etc/ld.config.txt,
* /system/etc/llndk.libraries.txt
* /system/etc/public.libraries.txt

These files are replaced by versioned ones.

Bug: 78605339
Test: Those files are removed in incremental builds
Change-Id: I7925fa45b47397829bde835ab3c479611faffa33
2018-05-16 11:34:11 +08: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
Yang Lu 5564f4ee08 Only log the lmkd state change when the killing really happened.
BUG: b/78603347

Test: statsd test

Change-Id: I0345a47e1cd1c79a67103e401a2eb0a7fbe0631b
2018-05-15 16:54:45 +00:00