Commit graph

35582 commits

Author SHA1 Message Date
Hung-ying Tyan
7d81b4e081 Move trusty reference implementations to /vendor
Trusty implementations are provided by vendors. This patch moves
the AOSP reference implementations to the vendor partition.

Bug: 63085384
Test: build gordon_peak which adopts trusty as the TEE and confirm
      that libtrusty and gateway.trusty are moved to /vendor.
Test: build marlin which does not adopt trusty as the TEE and confirm
      that this patch has no effect on the build result.
Change-Id: I9a5440071386b929058207fdef560ed2d7223ba3
2017-08-10 10:48:17 +08:00
TreeHugger Robot
42a2f5c992 Merge "Permit /system/lib/vndk-sp/hw/ for 'sphal' namespace" into oc-mr1-dev 2017-08-09 05:08:30 +00:00
Jin Qian
9c54268dce storaged: call getNamesForUids to get uid names
Calls getNamesForUids when one of the two conditions are true.
1. entries for new uids are reported from io stats
2. previous getNamesForUids failed

Bug: 62805090
Merged-In: I120b81e1857b2aa0a90d0fb85c8d749e985df78e
Change-Id: I120b81e1857b2aa0a90d0fb85c8d749e985df78e
2017-08-08 20:59:03 +00:00
TreeHugger Robot
1146fa1379 Merge "Mark libmemtrack as VNDK in Android.bp" into oc-mr1-dev 2017-08-08 00:30:03 +00:00
Jin Qian
1a92eda0b0 fastboot: add mke2fs and e2fsdroid to build package
am: c2ca105575

Change-Id: I74925ef2808e16c0eb055eec4cbcdfd0ab31a27d
2017-08-04 16:18:43 +00:00
Jin Qian
a81b6e8d21 fastboot: call mke2fs to format ext4 filesystem on windows
am: 92064ef073

Change-Id: Ifbaca8b1afdb122a8188133e0eb01644c83bbdad
2017-08-04 16:18:25 +00:00
Jin Qian
6e9bbddc04 fastboot: call mke2fs tools to generate ext4 image
am: ffef31cef1  -s ours

Change-Id: Ib6c72d7e34adb80761fd67d4808bc29f2aaf4011
2017-08-04 16:18:06 +00:00
Jiyong Park
7d4cf3fd33 Permit /system/lib/vndk-sp/hw/ for 'sphal' namespace
android.hidl.memory@1.0-impl.so is a SP-HAL located in
/system/lib/vndk-sp/hw. This can't be moved to /vendor/lib since it is a
framework HAL.

Bug: 62930720
Test: 2017 pixel builds and boots with BOARD_VNDK_VERSION on
Change-Id: I9c456983ef68120c5e8c629efc6dd66a26220ecb
2017-08-04 16:38:39 +09:00
Robert Benea
85d9063ff7 Merge "Make lmkd memory pressure levels configurable." into oc-mr1-dev 2017-08-04 03:48:03 +00:00
Yifan Hong
f004d8de4d Merge "Move android_filesystem_config.h => fs_config.h" into oc-mr1-dev 2017-08-03 22:53:07 +00:00
Yifan Hong
b3ecb59163 Merge "Remove private headers from libcutils.vendor" into oc-mr1-dev 2017-08-03 22:53:07 +00:00
Jin Qian
c2ca105575 fastboot: add mke2fs and e2fsdroid to build package
Bug: 23686092
Bug: 63849632
Change-Id: Iff0d92b7174597d43ee646847888aedc2080052a
(cherry picked from commit 6ce78321a2)
2017-08-03 14:50:17 -07:00
Jin Qian
92064ef073 fastboot: call mke2fs to format ext4 filesystem on windows
Bug: 35219933
Change-Id: I0cc8c165176e8dc9cbe4b6a52679937bc872e2d0
(cherry picked from commit 29fc859a6d)
2017-08-03 14:40:43 -07:00
Jin Qian
ffef31cef1 fastboot: call mke2fs tools to generate ext4 image
Set MKE2FS_CONFIG to empty to use mke2fs default configs

Test: fastboot --wipe-and-use-fbe
Bug: 35219933
Change-Id: Ibc97bb125899e1f1fe820d53709fdb2ab291c171
(cherry picked from commit d14d7c14cb)
2017-08-03 14:39:12 -07:00
TreeHugger Robot
5e404f3e87 Merge "storaged: fix excessive accounting when io usage has negative delta" into oc-mr1-dev 2017-08-03 19:49:01 +00:00
Jin Qian
ccae2b5779 storaged: fix excessive accounting when io usage has negative delta
When current io bytes are smaller than previous bytes, add 0 to delta
instead of adding current io bytes.

Bug: 64317562
Merged-In: If0c9814892ad61b790baa6395649af10b11d5b7c
Change-Id: I1ffd7ac33649ab3b8405c83b1328fa9bf49702c0
2017-08-03 17:28:52 +00:00
Yifan Hong
aadcb26adb Move android_filesystem_config.h => fs_config.h
The non AID_ things in android_filesystem_config.h are moved
to fs_config.h. For libcutils.vendor and libcutils_headers.vendor,
fs_config.h is not exported.

An empty system/core/include/private/fs_config.h is placed to
appease the dependency from certain modules (logd, etc.)
that includes system/core/include/private/android_filesystem_config.h
directly.

Test: m -j
Test: BOARD_VNDK_VERSION=current m -j
Bug: 63135587
Change-Id: I95dfb874a426941022b100c0ca26a0576b0f4aa3
Merged-In: I95dfb874a426941022b100c0ca26a0576b0f4aa3
2017-08-03 17:20:27 +00:00
TreeHugger Robot
041abda3df Merge "Mark the modules as VNDK in Android.bp" into oc-mr1-dev 2017-08-03 09:06:27 +00:00
TreeHugger Robot
68e0bef34c Merge "Mark an SP-NDK, libsync.so as VNDK libs." into oc-mr1-dev 2017-08-03 08:41:06 +00:00
Justin Yun
7aeb5bb86c Mark libmemtrack as VNDK in Android.bp
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
    enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Change-Id: I4b9e560ca6d4751889a7b14f205e678b68c20008
2017-08-03 15:49:19 +09:00
Justin Yun
9b0ed72942 Mark the modules as VNDK in Android.bp
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
        enabled: true,
},
    
VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Change-Id: Icecb22ed2ed0f58c3168605d4cf64815e2dda750
2017-08-03 06:43:23 +00:00
TreeHugger Robot
c5ebe0f5a0 Merge "libvndksupport: Change log level and message." into oc-mr1-dev 2017-08-03 05:08:54 +00:00
TreeHugger Robot
58f38017f7 Merge "Mark the modules as VNDK-SP in Android.bp" into oc-mr1-dev 2017-08-03 01:01:06 +00:00
Yifan Hong
6c21096251 Remove private headers from libcutils.vendor
Bug: 63135587
Test: m -j
Test: BOARD_VNDK_VERSION=current m -j
Test: mma -j
Test: BOARD_VNDK_VERSION=current mma -j

Change-Id: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513
Merged-In: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513
2017-08-02 16:43:50 -07:00
Robert Benea
58891d59b7 Make lmkd memory pressure levels configurable.
By doing so different platforms can customize them accordingly.
For instance a low mem, 512MB device can do
ro.lmk.medium=400, while a device with more memory can keep
the default(800).

Test: tested on gobo.
Bug: 64316084
Change-Id: Ifc4f3853bc06f30488adb25883ccd9aaf683ba9b
2017-08-02 23:42:48 +00:00
TreeHugger Robot
3bb2dfd252 Merge "sync: store the num_fences from first SYNC_IOC_FILE_INFO" into oc-mr1-dev 2017-08-02 15:41:55 +00:00
Justin Yun
9560088743 libvndksupport: Change log level and message.
If no 'sphal' namespace exist, the sphal library may be found in
current namespace.
Change the log level and message to note this.

Bug: 64162324
Test: Check log message for vndksupport tag.
Change-Id: I5ed6ba1e48f99e7d11d80a465177ac9f3a7fbd97
2017-08-02 14:21:14 +09:00
Jin Qian
216ed8f61a fastboot: call mke2fs to format ext4 filesystem on windows
Bug: 35219933
Change-Id: I0cc8c165176e8dc9cbe4b6a52679937bc872e2d0
(cherry picked from commit 29fc859a6d)
2017-08-01 17:47:57 -07:00
Jin Qian
a86141aa81 fastboot: enable uninit_bg for ext4
This speeds up mke2fs as well as e2fsck.

Bug: 23686092
Bug: 64032335
Change-Id: I9f2d4c15e431647bb845d50a2361b2a9a091fba6
(cherry picked from commit 99e3964e0d)
2017-08-01 17:47:51 -07:00
Saurabh Shah
cad5925fc9 sync: store the num_fences from first SYNC_IOC_FILE_INFO
Fixes a bug with the signal time of devices using the
modern sync file interface. The bug only affects kernels running
an Android kernel 4.9 and later.

b/63395253

Test: tests/sync_test.cpp

Change-Id: I6fb00bcb8e16a3268c357153edd8e35a44546caa
2017-08-01 21:05:33 +00:00
Jean-Luc Brouillet
24d43899cd Merge "Make the Neural Networks library loadable by apps." into oc-mr1-dev 2017-08-01 02:26:10 +00:00
Justin Yun
aeb68e86e4 Mark the modules as VNDK-SP in Android.bp
As a VNDK-SP module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK-SP formated as follows:
vndk: {
    enabled: true,
    support_system_process: true,
},

VNDK-SP modules will be installed both in system/lib(64) as normal
and in system/lib(64)/vndk-sp as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Change-Id: I51fe0859f63ad58b7b91909e7d7d4206443228cd
2017-07-31 23:37:32 +00:00
Yu Ning
6a38aa83b6 Allow the use of a custom Android DT directory
On platforms that use ACPI instead of Device Tree (DT), such as
Ranchu x86/x86_64, /proc/device-tree/firmware/android/ does not
exist. As a result, Android O is unable to mount /system, etc.
at the first stage of init:

 init: First stage mount skipped (missing/incompatible fstab in
 device tree)

Those platforms may create another directory that mimics the layout
of the standard DT directory in procfs, and store early mount
configuration there. E.g., Ranchu x86/x86_64 creates one in sysfs
using information encoded in the ACPI tables:

 https://android-review.googlesource.com/442472
 https://android-review.googlesource.com/443432
 https://android-review.googlesource.com/442393
 https://android-review.googlesource.com/442395

Therefore, instead of hardcoding the Android DT path, load it from
the kernel command line using a new Android-specific property key
("androidboot.android_dt_dir"). If no such property exists, fall
back to the standard procfs path (so no change is needed for DT-
aware platforms).

Note that init/ and fs_mgr/ each have their own copy of the Android
DT path, because they do not share any global state. A future CL
should remove the duplication by refactoring.

With this CL as well as the above ones, the said warning is gone,
but early mount fails. That is a separate bug, though, and will be
addressed by another CL.

Test: Boot patched sdk_phone_x86-userdebug system image with patched
      Goldfish 3.18 x86 kernel in patched Android Emulator, verify
      the "init: First stage mount skipped" warning no longer shows
      in dmesg.

Signed-off-by: Yu Ning <yu.ning@intel.com>

(cherry picked from commit c08d2cb0fb7ce470e128c7571553aa12ae9b57a4)

Change-Id: Ia8d5f68e044fde0ecf5c7b14e40f040ff42bc35d
2017-07-31 15:27:09 -07:00
James Hawkins
f415d1253c bootstat: Log even more boot reasons.
Bug: 27555866
Test: None
Change-Id: I8ab6597a323f5973d8b1c22c2c7422ef0c2efcc3
(cherry picked from commit 8d7f63da26)
2017-07-28 14:50:16 -07:00
TreeHugger Robot
8e5c465ee7 Merge changes I60250d10,I08effe32 into oc-mr1-dev
* changes:
  init: fix type of 2nd argument passed to prctl
  init: only use signed-integer-overflow sanitizer
2017-07-28 00:47:54 +00:00
Christine Hallstrom
9741b4392d DO NOT MERGE ANYWHERE make /data/misc/bluetooth owner to be bluetooth am: 2e06a0ff6e -s ours am: 3c31204e68 -s ours am: 3a66fd2174 -s ours
am: c1f776d7d1  -s ours

Change-Id: Iaf1ca67f9f2d33c2be9af9a4cef1935308cd0c36
2017-07-27 22:41:37 +00:00
Christine Hallstrom
c1f776d7d1 DO NOT MERGE ANYWHERE make /data/misc/bluetooth owner to be bluetooth am: 2e06a0ff6e -s ours am: 3c31204e68 -s ours
am: 3a66fd2174  -s ours

Change-Id: I5a2222a551bdfe4077f061131a99c9951cd9c152
2017-07-27 22:38:35 +00:00
Christine Hallstrom
3a66fd2174 DO NOT MERGE ANYWHERE make /data/misc/bluetooth owner to be bluetooth am: 2e06a0ff6e -s ours
am: 3c31204e68  -s ours

Change-Id: I251108805c58aabdd41f31a015a6760ea36878e0
2017-07-27 22:35:35 +00:00
Christine Hallstrom
3c31204e68 DO NOT MERGE ANYWHERE make /data/misc/bluetooth owner to be bluetooth
am: 2e06a0ff6e  -s ours

Change-Id: Ib595080a5bd778e6f844657c785708a37277633f
2017-07-27 22:33:22 +00:00
Ben Fennema
7d7e7cdf34 init: fix type of 2nd argument passed to prctl
prctl(PR_SET_SECUREBITS, ...) expects an unsigned long as its 2nd argument.
Passing in a int64_t happens to work with a 64-bit kernel, but does not
work with a 32-bit kernel.

Bug: 63680332
Test: boot 32-bit kernel; verify services with capabilities can successfully
      set those capabilties
Change-Id: I60250d107a77b54b2e9fe3419b4480b921c7e2f8
Signed-off-by: Ben Fennema <fennema@google.com>
(cherry picked from commit a72436067d)
2017-07-27 21:57:40 +00:00
Tom Cherry
684f4883b3 init: only use signed-integer-overflow sanitizer
We've blown up twice in init due to the unsigned integer overflow
sanitizer despite the overflows in question being both defined and
intentional.

Bug: 63680332
Test: boot
Change-Id: I08effe3202ac1367d858982ff5478b3a088bab37
(cherry picked from commit 2ffd65e1d1)
2017-07-27 21:54:47 +00:00
Christine Hallstrom
2e06a0ff6e DO NOT MERGE ANYWHERE make /data/misc/bluetooth owner to be bluetooth
Bug: 62410937
Change-Id: Ic6ddba03ee6316dc54d5d41b35c90fe3d9057723
2017-07-27 20:55:12 +00:00
TreeHugger Robot
97d2b6d785 Merge "Add system/${LIB}/vndk to default namespace for vendor." into oc-mr1-dev 2017-07-27 15:47:48 +00:00
Josh Gao
60364171da Merge "adbd: add logging to troubleshoot usb issues." into oc-dr1-dev
am: 4ee59e0b51

Change-Id: I418023c78988508c72557f2c7572efa163a174ef
2017-07-27 15:34:59 +00:00
TreeHugger Robot
4ee59e0b51 Merge "adbd: add logging to troubleshoot usb issues." into oc-dr1-dev 2017-07-27 15:26:00 +00:00
Josh Gao
8f484a6896 adbd: add logging to troubleshoot usb issues.
Bug: http://b/63899881
Bug: http://b/63901259
Bug: http://b/63904904
Test: treehugger
Change-Id: Ifbc3caa6b416093bf8e127194003747c910352dc
(cherry picked from commit 184f571cfd)
2017-07-27 00:34:31 -07:00
Siqi Lin
8703536332 rootdir: record last build fingerprint
am: b9b76de6ff

Change-Id: I2d781eb8684a860dbb4cb9590ba43bf9d2f3b4c6
2017-07-27 01:21:50 +00:00
Siqi Lin
b9b76de6ff rootdir: record last build fingerprint
We can't copy /default.prop so just write the value of
$(ro.build.fingerprint) to /data/misc/recovery/ro.build.fingerprint
and rotate it after reboot instead.

Bug: 62793047
Test: manual - reboot phone and check /data/misc/recovery
Change-Id: I130a4b7a01d9e1bfe9baecde2781626eb72e768b
2017-07-26 13:40:15 -07:00
Justin Yun
48647f6db1 Mark an SP-NDK, libsync.so as VNDK libs.
libsync.so is categorized as SP-NDK and vendor_available.
However, it is marked as VNDK because it is needed by some VNDK libs.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Change-Id: I116a442ce284a6e5ba1c76f99d44329a9f00fed7
2017-07-26 13:25:27 +09:00
Wei Wang
ba6705f9de Do not umount roofs even if it is R/W.
am: b7a8764a12

Change-Id: I56014ac0ae01a5666a58225eed5f89e08859c0d8
2017-07-25 21:34:50 +00:00