Commit graph

541 commits

Author SHA1 Message Date
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
8bd17a1df4 Merge "sepolicy: add owners file"
am: 750b8e84c1

Change-Id: I9cad69598bd74e3136fb9780e725b95d67c10823
2017-10-06 04:30:08 +00:00
Treehugger Robot
750b8e84c1 Merge "sepolicy: add owners file" 2017-10-06 04:25:27 +00:00
Jeff Vander Stoep
10c69455c0 Remove world writable sysfs files
Test: build
Change-Id: I8c4b705726af8629413c5563c2cdba07d9815661
Merged-In: I9d18d31a9a65f785cf4bc69f011990e9f8182228
2017-10-05 15:38:40 -07:00
Jeff Vander Stoep
381f4ea490 sepolicy: add owners file
Test: build
Change-Id: Ic11f283d3d1eeb2fec8b4745d7c0bc647cb7e717
2017-10-05 14:52:12 -07:00
Jeff Vander Stoep
0ce25ee468 Remove sysfs_writable type
It's not used.

Test: build and boot aosp_x86 emulator. No selinux denials.
Change-Id: Ibfc8bfc4f930bac006c86cc05009dc96e78bcf48
2017-10-04 16:43:13 -07:00
Jeff Vander Stoep
178d04e39c allow setting opengles property
Addresses:
avc:  denied  { set } for property=ro.opengles.version
scontext=u:r:qemu_props:s0 tcontext=u:object_r:opengles_prop:s0
tclass=property_service

Test: build
Change-Id: Ia7445344726b941ad153a126dfe66df4bc8536ab
2017-10-04 16:12:36 -07:00
Jiyong Park
03eb06150b Don't reserve size for bad blocks when checking image size
When checking *.img size with the partition size, the build system
reserves additional bits for spare bits and spare bad blocks.

However, for emmc and ufs, the space bits and blocks are entirely
managed by the underlying controller and thus not visible from outside
of the controller. In fact the check routine was made for legacy MTD
storages where raw flash blocks are directly exposed.

This makes the size checking a little bit conservative in modern devices.
Builds were failed even though the *.img can actually fit into the
partition. To handle this problem, the additional size is no longer
reserved when checking *.img size with the partition size.

This change also removes following build flags that are meaningful
only for devices having MTD storages:
BOARD_NAND_PAGE_SIZE
BOARD_NAND_SPARE_SIZE
Further use of them breaks the build

Bug: 35790399
Bug: 66399382
Test: build

Merged-In: I954bf261441b53844e75d05788866f1692a2ad43
Change-Id: I954bf261441b53844e75d05788866f1692a2ad43
2017-10-04 21:25:08 +09:00
Steve Muckle
634ab481da Merge "get kernel configs from kernel/configs"
am: b4a3124822

Change-Id: Ib6a306a7bf4725e4030893bdb24d2de394fb38be
2017-09-13 21:08:28 +00:00
Steve Muckle
b4a3124822 Merge "get kernel configs from kernel/configs" 2017-09-13 19:33:19 +00:00
Steve Muckle
378c2bb42a get kernel configs from kernel/configs
The kernel configs have moved out of VTS and into their own
repository.

Test: build and boot
Change-Id: I649af63216e7b18604586f70396bceff626c30d0
2017-09-12 16:26:28 -07:00
Steven Moreland
16d7c08dab Merge "aosp_arm64_ab is vndk"
am: f38900dc92

Change-Id: I09157be57b71386912b0b96b9748932c30813acd
2017-09-12 19:48:12 +00:00
Steven Moreland
fdce598ed8 aosp_arm64_ab is vndk
Test: builds with BOARD_VNDK_VERSION=current
Test: test only one product is using this w/ multiproduct_kati
Bug: 65375837
Merged-In: I972ab897a8bc23ba5c5f6bf133db0017e4334f40
Change-Id: I972ab897a8bc23ba5c5f6bf133db0017e4334f40
2017-09-05 22:31:30 +00:00
Bo Hu
35149ca0b7 Merge changes from topic "aosp-emulator-oc"
* changes:
  emulator: fix widevine drm vndbinder denial
  emulator: fix selinux issues
  emulator: squash misc modifications from oc-emu-dev
  emualtor: keep libopenjdkjvmti*.so on sdk images
  emulator: move rild.libpath to vendor
  sdk:enable emulator to launch in build environment
  build-emulator: fully treblize emulator image
  Build vendor image for emulator
2017-08-31 22:56:31 +00:00
bohu
dc745a9090 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: Ied1268878236c42fbb0751a0f33014b332d78c32
Merged-In: Ied1268878236c42fbb0751a0f33014b332d78c32
2017-08-30 17:13:55 -07:00
bohu
913a990249 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: I8a154fdb5d7aa7763aab2b912976eb9e1d329cdb
Merged-In: I8a154fdb5d7aa7763aab2b912976eb9e1d329cdb
2017-08-30 17:13:51 -07:00
bohu
7b5e1abacb emulator: squash misc modifications from oc-emu-dev
Change-Id: I7380292cd4dc851a987683bdf61d511dbf74aff6
Merged-In: I7380292cd4dc851a987683bdf61d511dbf74aff6
2017-08-30 17:13:47 -07:00
bohu
bc43c4ec29 emulator: move rild.libpath to vendor
BUG: 62137708
Test: buld sdk_gphone_x86-user, launch
emulator make sure radio works

Change-Id: I4ef1483a8d95a74b54deb6f0d4b2461c733c8140
Merged-In: I4ef1483a8d95a74b54deb6f0d4b2461c733c8140
2017-08-30 17:13:37 -07:00
bohu
e3f4e9f025 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: I70f58947e98b41b195d77b4347d2efdc09348392
Merged-In: I70f58947e98b41b195d77b4347d2efdc09348392
2017-08-30 17:13:26 -07:00
Yahan Zhou
3cf7441dbe 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: I75b9f0de17fece3dec5ae1662400808af321bd4d
Merged-In: I75b9f0de17fece3dec5ae1662400808af321bd4d
2017-08-30 17:13:20 -07:00
Yifan Hong
fd8eded8f9 Merge changes from topic "kernel_config_arch"
am: 4b7cbf8395

Change-Id: Ic48088745d443c39cdea9d967412e21af2d28107
2017-08-29 18:34:48 +00:00
Yifan Hong
63e264d142 fwk comp mat: add arch specific kernel requirements
Test: m system_compatibility_matrix.xml -j
Bug: 64124223
Change-Id: Ieda3ea43e5d3b7d393461bd54b311b58af443f7c
Merged-In: Ieda3ea43e5d3b7d393461bd54b311b58af443f7c
2017-08-28 17:32:59 -07:00
Yifan Hong
a508b30df5 fwk comp mat: use a for loop for supported kernel versions
Test: m system_compatibility_matrix.xml -j

Bug: 64124223
Change-Id: Ife95bfb5b7103239e116df1ae844cc3a643b4c28
Merged-In: Ife95bfb5b7103239e116df1ae844cc3a643b4c28
2017-08-28 17:32:59 -07:00
Isaac Chen
9f55141c5f Merge "Revert "Revert "Build support for 32-bit armv8-a"""
am: 9a888ebb51

Change-Id: I4f0b7b55de9a0b79d9f81f4aaa6c04ebd1e409b1
2017-08-25 02:03:26 +00:00
Isaac Chen
9a888ebb51 Merge "Revert "Revert "Build support for 32-bit armv8-a""" 2017-08-25 01:55:56 +00:00
Yifan Hong
0998353f08 Merge changes from topic "libvintf_cp"
am: 9bab2f5fa2

Change-Id: If2a7759c2d2f2596417814383a6a8aff91bceaa9
2017-08-24 19:53:47 +00:00
Yifan Hong
1aecc84239 Add <kernel> entry to fwk compat mat.
Test: builds and verify that system/compatibility_matrix.xml
      has configs filled.
Test: `vintf | tail` on marlin shows that fwk compat mat
      is compatible with runtime info.

Bug: 38324908
Change-Id: I8a35ea582fea1faa083c409ec58813c3ac82dc9c
Merged-In: I8a35ea582fea1faa083c409ec58813c3ac82dc9c
2017-08-24 11:28:04 -07:00
Bowgo Tsai
eb7b438994 Pass FRAMEWORK_VBMETA_VERSION to assemble_vintf
Note that this depends on a change in avbtool:
  https://android-review.googlesource.com/#/c/406374/

Bug: 38325029
Test: builds system.img, checks $OUT/system/compatibility_matrix.xml
      contains correct vbmeta-version
Change-Id: Iacc0a2687fb39600ad6b8e9cfbfe5c1a3b90b40b
Merged-In: Iacc0a2687fb39600ad6b8e9cfbfe5c1a3b90b40b
2017-08-24 11:28:04 -07:00
Yifan Hong
dae462bdd1 Accept multiple input files for device manifest.
Test: test with DEVICE_MANIFEST_FILE variable split
      into multiple files

Bug: 38217107
Change-Id: I1146898e4ccf0e8bac7d8541032f160476dbc148
Merged-In: I1146898e4ccf0e8bac7d8541032f160476dbc148
2017-08-24 11:28:02 -07:00
Isaac Chen
f5af850a29 Revert "Revert "Build support for 32-bit armv8-a""
This reverts commit 7de79cbeaf.

Fixed CTS build issue by adding -march=armv7-a in cts/tests/tests/os/jni/Android.mk since the library built here needs/uses instruction (swp) obsolete in ARMv8.

Bug: 64964151
Test: lunch aosp_arm64-userdebug; make -j cts
      lunch aosp_x86-userdebug; make -j cts
      lunch aosp_sailfish-userdebug; make -j cts
      lunch aosp_bullhead-userdebug; make -j cts

Change-Id: Ic3a121600da8e2a9a2d5176b9680cd18ce457959
2017-08-23 10:58:57 +00:00
Tobias Thierer
bc9829fb3f Merge "Revert "Build support for 32-bit armv8-a"" am: 1da1c6d056 am: 0d35b9fba3
am: ff4ba02d5b

Change-Id: I1d112aad1ebb715fa4990db53ed1347a9e8bf11c
2017-08-22 10:48:44 +00:00
Tobias Thierer
ff4ba02d5b Merge "Revert "Build support for 32-bit armv8-a"" am: 1da1c6d056
am: 0d35b9fba3

Change-Id: Id2ed78457ec3014812326ee34895bf705c741052
2017-08-22 10:42:35 +00:00
Tobias Thierer
0d35b9fba3 Merge "Revert "Build support for 32-bit armv8-a""
am: 1da1c6d056

Change-Id: I7a5ae22c984ffe8781998b5ae8e20aeb7516fac1
2017-08-22 10:36:35 +00:00
Tobias Thierer
7de79cbeaf Revert "Build support for 32-bit armv8-a"
This reverts commit 0daa78eef4.

Reason for revert: Broke the build for some targets (including marlin and angler).

$ make cts
build/core/combo/TARGET_linux-arm.mk:43: kryo is armv8-a.
build/core/combo/TARGET_linux-arm.mk:45: TARGET_2ND_ARCH_VARIANT, armv7-a-neon, ignored! Use armv8-a instead.
[...]
cts/tests/tests/os/jni/android_os_cts_CpuInstructions.cpp:88:20: error: instruction requires: armv7 or earlier
    asm volatile ( "swp r0, r0, [%0]" : "+r"(ptr) : : "r0" );
                   ^
<inline asm>:1:2: note: instantiated into assembly here
        swp r0, r0, [r1]
        ^

Change-Id: I65a91ed5a4461eca6646df13642a87a5c37d6c85
2017-08-21 15:03:16 +00:00
Isaac Chen
e5dd3915f7 Merge "Build support for 32-bit armv8-a" am: 70fe80491c am: ef1e443e14
am: 43b2504cd2

Change-Id: Ib2d66b827d2562dfc247fc97dc89baa960f735bf
2017-08-19 06:23:14 +00:00
Isaac Chen
43b2504cd2 Merge "Build support for 32-bit armv8-a" am: 70fe80491c
am: ef1e443e14

Change-Id: I4086a8e63dbda784686fd42fedd38dedbbac8771
2017-08-19 06:19:44 +00:00
Isaac Chen
ef1e443e14 Merge "Build support for 32-bit armv8-a"
am: 70fe80491c

Change-Id: I6b4291a893ff42eca1933b8783e342855f22917f
2017-08-19 06:16:49 +00:00