Commit graph

644 commits

Author SHA1 Message Date
Tri Vo
82ca9a743a Fix /sys denials.
Labeled files linked from /sys/class/{rtc, net}.
Fixes these denials:
avc: denied { read } for pid=6413 comm="system_server" name="hctosys"
dev="sysfs" ino=10068 scontext=u:r:system_server:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

avc: denied { write } for pid=4785 comm="Binder:4785_2" name="mtu"
dev="sysfs" ino=9213 scontext=u:r:netd:s0 tcontext=u:object_r:sysfs:s0
tclass=file permissive=0

Test: files labeled as expected; emulator boots without above denials.
Change-Id: I8fd8cc993ede0ddfd4404c0647a60da4867ef128
2018-01-24 12:39:47 -08:00
Tri Vo
30a532a1bf healthd: fix /sys denials.
Label /sys/class/power_supply/* appropriately and give healthd read
permissions to that directory.

Fixes this denial:
avc: denied { read } for pid=1386 comm="healthd" name="power_supply"
dev="sysfs" ino=2562 scontext=u:r:healthd:s0
tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0

Bug: 72437093
Test: emulator boots with no denials from healthd
Change-Id: Ie3853cb5e9167fcd70f393ff589971ad6212c580
2018-01-24 11:13:22 -08:00
Yifan Hong
5ff1f0a38a Add System SDK Versions to VINTF.
Add PLATFORM_SYSTEMSDK_VERSIONS to framework manifest
and BOARD_SYSTEMSDK_VERSIONS to device comp matrix.

Test: m framework_manifest.xml -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m device_compatibility_matrix.xml -j

Bug: 69088799
Change-Id: I0b5ac6f1c2802c353b2989b017c1cdfc9fe27987
2018-01-22 14:18:16 -08:00
Yifan Hong
65310d6b06 Merge "move VINTF metadata to /etc/vintf/ ." 2018-01-19 22:01:28 +00:00
Yifan Hong
8f863693c9 move VINTF metadata to /etc/vintf/ .
In particular,
/vendor/manifest.xml => /vendor/etc/vintf/manifest.xml
/system/manifest.xml => /system/etc/vintf/manifest.xml
/vendor/compatibility_matrix.xml =>
    /vendor/etc/vintf/compatibility_matrix.xml

Test: verify that fileis exist in destination
Test: hwservicemanager can read these files
Bug: 36790901
Change-Id: Ic361a48e170fb9a77faec76ad0e829625427820d
2018-01-19 10:52:27 -08:00
Treehugger Robot
469aafe421 Merge "Normalize the 2nd CPU architect of 64 bits arm GSI" 2018-01-19 04:26:40 +00:00
bohu
1695288dc0 emulator: enable 32bit x86 to run on 64bit kernel
BUG: 71861550
Change-Id: Iea8fae11375d66a141babd40f66dd2e3da6075e0
2018-01-18 22:26:32 +00:00
Yifan Hong
238c6ba8fe add <vendor-ndk> to VINTF.
Test: libvintf_test
Test: vintf_object_test
Test: build and verify that <vendor-ndk> tags
are in framework manifest and device compatibility
matrix.

Fixes: 36400653

Change-Id: I4d44bff81fecc8fd2f7ab8e15770544b7b85aef9
2018-01-16 21:49:52 +00:00
Yifan Hong
1e7ab9db8f Merge "framework_cm.xml: move to hardware/interfaces" 2018-01-11 19:14:24 +00:00
Nicolas Geoffray
08e7159672 Merge "Remove copy/paste code." 2018-01-11 09:20:05 +00:00
Yifan Hong
919dcf1b6e framework_cm.xml: move to hardware/interfaces
Test: m dist
Bug: 69636193

Change-Id: Ic15a445d700552cb0973d6919ed5843bdecba363
2018-01-10 16:32:04 -08:00
Tri Vo
c727d6d40e bootanim: remove access to vendor_file type
This domain should instead depend on same_process_hal_file, to which all
domains already have access.

Bug: 70990973
Test: emulator -gpu guest; boots with no denials from bootanim.
Change-Id: Ic577dd3c3895f8471d68a0da245d37a17cd6a3f3
2018-01-10 09:13:44 -08:00
Nicolas Geoffray
b7c5e3bbb9 Remove copy/paste code.
The options passed are already the default.

This is also to reduce the difference between user and userdebug
related to dexopt.

Test: m
Change-Id: Id62c38f145909b511761b471160028915000fc23
2018-01-10 10:01:11 +00:00
Dan Willemsen
dd3a27394f Remove armv5te
This architecture only existed for unbundled use, but even the NDK is
removing support in their r17 release, so just remove support for it.

Test: build/soong/build_test.bash -only-config
Test: check buildserver configs, I don't see anything still using armv5
Change-Id: Ic183b510c9ada94438bd4cc2b9362fa438a29ced
2018-01-08 15:26:16 -08:00
Treehugger Robot
b2e9b2b34f Merge "Correct some GSI settings to board makefile" 2018-01-05 08:17:44 +00:00
SzuWei Lin
43672c0fc5 Normalize the 2nd CPU architect of 64 bits arm GSI
In order to let GSI more generic. Normalize the 64 bits arm GSI
to be:

    TARGET_2ND_ARCH_VARIANT := armv8-a
    TARGET_2ND_CPU_VARIANT := generic

Bug: 64775084
Test: Build pass and boot to home screen
Change-Id: I1dd5aa8524c1d243f832372bf7e3e64fae09e945
Merged-In: I1dd5aa8524c1d243f832372bf7e3e64fae09e945
2018-01-04 11:07:29 +08:00
SzuWei Lin
83890eb262 Correct some GSI settings to board makefile
Some setting currently in target/product/treble_common.mk, but
they should be board config variables. So, move them to
target/board/treble_common.mk.

Bug: 70951849
Test: Build pass and check on a Pixel device with GSI
Change-Id: I511fbc481583555182dab76503e67c5f56efa8eb
Merged-In: I511fbc481583555182dab76503e67c5f56efa8eb
2017-12-26 03:36:33 +00:00
Steven Moreland
b14b530f82 Allow devices to extend the system manifest.
Introduces DEVICE_FRAMEWORK_MANIFEST_FILE, a list
of files which are added to system/manifest.xml.
This is required for devices to properly display
what hals they implement and also therefore for
them to pass vts_treble_vintf_test since it
now tests manifests based on hal origin.

Notice, this is named singularly to match
DEVICE_MANIFEST_FILE which is also a list of files.
They may be better both named "FILES", but for
consistency and legacy reasons, they can be thought
of as "everything that composes the X manifest
file".

Fixes: 70042049
Test: add system manifest extension which needs it
  and it no longer fails vts_treble_vintf_test for
  hals being served from the wrong partitions.

Change-Id: I1f59d5c3cadb7a7d4576b73196ca7b41103a49c5
2017-12-22 14:02:11 -08:00
Yifan Hong
b1b5a0969b Merge changes from topic "fcm_version"
* changes:
  Move fwk comp mat level logic into assemble_vintf
  PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE is deprecated.
2017-12-15 18:58:34 +00:00
Yifan Hong
43ec6ead28 Rename VINTF XML module names
* system_compatibility_matrix/manifest.xml
   => framework_...
* compatibility_matrix/manifest.xml
   => device_...

This is to follow the naming scheme in VINTF
doc.

Test: build all four targets

Change-Id: If5f6a99ded9964f3500c8e5fb97278f8fd0de387
2017-12-14 18:19:44 -08:00
Yifan Hong
ed42caf94d Move fwk comp mat level logic into assemble_vintf
Deprecation schedule requirements is specified in assemble_vintf.
Move all checking logic to assemble_vintf.

Test: builds

Bug: 69636193
Change-Id: I2d62555633494014dc0005931de6c8ae9e6877fa
Merged-In: I2d62555633494014dc0005931de6c8ae9e6877fa
2017-12-14 15:35:15 -08:00
Treehugger Robot
973301af79 Merge "Replace build/tools with build/make/tools" 2017-12-13 02:34:42 +00:00
Treehugger Robot
6553fd6cad Merge changes I8f20db07,Id3a8dd20,I0275a5d4
* changes:
  Enable VNDK runtime checking
  Add vintf into GSI
  Add a default apn-conf.xml into GSI
2017-12-12 04:50:26 +00:00
SzuWei Lin
596c026fd6 Enable VNDK runtime checking
GSI enabled "BOARD_VNDK_VERSION := current" on O-MR1,
but disabled VNDK runtime checking. This patch enables the checking

Bug: 69393797
Test: Build pass and boot to home screen on a Pixel device with GSI
Change-Id: I8f20db0798a07e63c453a9fe64638b99b41cd166
Merged-In: I8f20db0798a07e63c453a9fe64638b99b41cd166
(cherry picked from commit 7323f1d4ec)
2017-12-11 02:05:50 +00:00
Isaac Chen
d9fed02138 Enable VNDK for aosp_x86 and aosp_x86_64
When VNDK version is not enabled, libminijail.so are built under
system directory. It is not found in GSI, though.

Enable VNDK version causes it to be built under vendor directory.

Bug: 69395141
Test: Both of the following 2 products can boot to home screen.
    $ lunch aosp_x86-userdebug; m -j; emulator
    $ lunch aosp_x86_64-userdebug; m -j; emulator

Change-Id: I6356ffe4a806b3d8fc79057bf772d139209a5f11
Merged-In: I6356ffe4a806b3d8fc79057bf772d139209a5f11
(cherry picked from commit 532d5adf7b)
2017-12-07 15:03:25 +08:00
Colin Cross
fdea893833 Replace build/tools with build/make/tools
Test: m checkbuild
Change-Id: I8db6c27a6d2372f142d10568fe92d6f2e9a59252
2017-12-06 16:12:40 -08:00
Bo Hu
e262a65a1d Merge "emulator: allows goldfish to disable bootanimation"
am: 303a5f0c2d

Change-Id: I153a54fca751889aac73ffd54fd9197188599596
2017-12-05 22:03:55 +00:00
bohu
7b46d578e7 emulator: allows goldfish to disable bootanimation
[    2.447332] type=1400 audit(1512424670.440:8): avc: denied { write } for pid=1408 comm="setprop" name="property_service" dev="tmpfs" ino=1216 scontext=u:r:goldfish_setup:s0 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0
[    2.455350] init: Created socket '/dev/socket/adbd', mode 660, user 1000, group 1000
console:/ $ [    2.470594] init: Service 'ranchu-setup' (pid 1387) killed by signal 1

BUG: 70176291

Change-Id: I309ff3cb89ec01673e84fb275fe795f95711edd6
2017-12-05 09:10:16 -08:00
Bo Hu
c6e1046dfb Merge "emulator: api 26 fix guest rendering (build)"
am: fb46f47085

Change-Id: Ifb7faacf00ce8af275868869e324fe25e9e9c64a
2017-12-01 20:27:37 +00:00
Lingfeng Yang
8bed4d0ce6 emulator: api 26 fix guest rendering (build)
As swiftshader is open sourced, put it into emulator
targets to enable -gpu guest option.

Test: build aosp_x86-eng, launch emulator -gpu guest
and it should boot to home screen.

Change-Id: I2140d7cec28d5f00b7463b1d37d9cf62120398fb
Merged-In: I2140d7cec28d5f00b7463b1d37d9cf62120398fb
2017-12-01 08:57:53 -08:00
bohu
253dfc22a6 Merge "emulator: support system-as-root"
am: 44e363f1e3

Change-Id: Ib1ea4ec4f388a1d28f6db2789029aa06c169c3da
2017-11-30 20:12:53 +00:00
bohu
e9046cbbaa emulator: support system-as-root
BUG: 69770927

Test: build sdk_gphone_x86-userdebug, boot up
to home with Tot emulator

Test: build sdk_phone_armv7-userdebug, boot up
to home with Tot emulator

Change-Id: I39348bf35cb748c08ed68a048389bbfc2279a91c
Merged-In: I39348bf35cb748c08ed68a048389bbfc2279a91c
2017-11-29 22:08:28 -08:00
Xin Li
44dd4881de Merge commit '66b8b530187b129934a685bf0c4349eef00e4b0c' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: I7594bb72dd7e847292eb502edd918e41318aac29
Merged-In: Ide82473d358719f7e01cd2a4a85db954f3722f14
2017-11-14 11:36:22 -08:00
Steven Moreland
9588438023 Use PRODUCT_ENFORCE_VINTF_MANIFEST.
PRODUCT_FULL_TREBLE is being split up into smaller,
more manageable flags.

Bug: 62019611
Test: manual
Change-Id: I046f9eb4099cf441842f3d0e6908d99df063c27e
2017-11-13 09:32:24 -08:00
bohu
30b232885a emulator: fix widevine drm vndbinder denial
[   86.252399] type=1400 audit(1503684692.153:25): avc: denied { read write } for pid=4160 comm="android.hardwar" name="vndbinder" dev="tmpfs" ino=5163 scontext=u:r:hal_drm_widevine:s0 tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file permissive=0

BUG: 64726466

Test: build sdk_gphone_x86-user target, launch it
and the above denial should be fixed.

Change-Id: I85dfbc3acdcbdf0431d4657c7d664ac4c781736b
Merged-In: Ied1268878236c42fbb0751a0f33014b332d78c32
2017-10-26 16:45:05 -07:00
bohu
97252db917 emulator: fix selinux issues
with cas/camera/drm hals

BUG: 64726466

Test: build aosp_x86-eng, boot emulator
without camera/drm hals killed by
selinux avc denials; camera can take
pictures

Change-Id: I332bc4dfa958f5213a8650c7314963b6bf33d519
Merged-In: I8a154fdb5d7aa7763aab2b912976eb9e1d329cdb
2017-10-26 16:45:05 -07:00
bohu
813249bfdf emulator: squash misc modifications from oc-emu-dev
Change-Id: Ia6c3ff0805b88ef284524a4e6faa5615016b359c
Merged-In: I7380292cd4dc851a987683bdf61d511dbf74aff6
2017-10-26 16:45:05 -07:00
bohu
4a6cc6a8fc emulator: move rild.libpath to vendor
BUG: 62137708
Test: buld sdk_gphone_x86-user, launch
emulator make sure radio works

Change-Id: Ib25ae4a1c7f86ef20a45af2f88732067ad95c5f4
Merged-In: I4ef1483a8d95a74b54deb6f0d4b2461c733c8140
2017-10-26 16:45:05 -07:00
bohu
cb0bebbeda build-emulator: fully treblize emulator image
Install emulator specific binaries and libraries
to vendor partition; update selinux; add vndk.

BUG: 37511975

Test: build user build, launch emualtor, run CTS.

Change-Id: I7f5317d52e552367a1390789fe7ce6e0955ba8de
Merged-In: I70f58947e98b41b195d77b4347d2efdc09348392
2017-10-26 16:45:05 -07:00
Yahan Zhou
3afe69d846 Build vendor image for emulator
BUG: 37511975

Test: lunch sdk_gphone_x86-user, make with dist option, unzip
sdk_gphone_x86-emulator-eng.xxxx.zip to system image folder, emulator
can boot

Change-Id: I330adc6da2999031d4ed2d8c4ade4667c1d0b511
Merged-In: I75b9f0de17fece3dec5ae1662400808af321bd4d
2017-10-26 16:45:05 -07:00
Yabin Cui
42c9da3ef7 Merge "Use armv7-a when building sdk." 2017-10-24 21:18:33 +00:00
Tri Vo
8716646d63 Merge "Label emulator devicetree dir." 2017-10-24 20:36:22 +00:00
Yabin Cui
1fe7ac7534 Use armv7-a when building sdk.
Bug: http://b/68201917
Test: make sdk.
Change-Id: I7817bc03beb109b4152d3bc751f0d2438cc93e3b
2017-10-24 12:44:13 -07:00
Tri Vo
e275275d31 Label emulator devicetree dir.
Bug: 67416435
Test: booted emulator and checked that
/sys/bus/platform/devices/ANDR0001:00/properties/android/ is labeled
as sysfs_dt_firmware_android
Change-Id: Ib90552b1ccaa8ddcc389e6829221ba63075df7ed
2017-10-20 16:26:22 -07:00
Mathieu Chartier
6c1aa4584a Merge "Allow system server jars for WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY"
am: dcb1f24e9b

Change-Id: I4cc653c7d4218d2e4b983f4ec1b6f8df77b2d1f4
2017-10-12 22:37:24 +00:00
Mathieu Chartier
f834eccd52 Allow system server jars for WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
Renamed WITH_DEXPREOPT_BOOT_IMG_ONLY to
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY and changed the
behavior accordingly.

Preopt system server jars since selinux prevents system server from
loading anything from /data. If we don't do this they will need to
be extracted which is not favorable for RAM usage or performance.

Test: make and flash and look at system server maps
Bug: 65122284
Bug: 62356545

(cherry picked from commit 418258cee9)

Merged-In: I2e70c80a86327b455450b95144f21020e7bf0c6f
Change-Id: I316e79c7c6d45e2ccbfff4065137cc3ef9d2738e
2017-10-12 20:40:41 +00:00
Jiyong Park
bc8a222efe Merge "Don't reserve size for bad blocks when checking image size"
am: dd68a6cb74

Change-Id: Ibea8f1f19b6ec4a3cf1969dde726a90265439128
2017-10-06 19:55:45 +00:00
Treehugger Robot
dd68a6cb74 Merge "Don't reserve size for bad blocks when checking image size" 2017-10-06 19:40:29 +00:00
Jeff Vander Stoep
222a2e511b Merge "sepolicy: add owners file" am: 750b8e84c1 am: 8bd17a1df4
am: c4e07ce19b

Change-Id: Icf67bc129db832b7d4c88bd7646597adfdc4e250
2017-10-06 04:37:54 +00:00
Jeff Vander Stoep
8bd17a1df4 Merge "sepolicy: add owners file"
am: 750b8e84c1

Change-Id: I9cad69598bd74e3136fb9780e725b95d67c10823
2017-10-06 04:30:08 +00:00