Commit graph

342 commits

Author SHA1 Message Date
bohu
70fefe0066 emulator: remove opengles property
BUG: 73812167
Change-Id: I5bdc475c6bdd5bdcb32c5a12f49c18c6a391b95c
2018-02-23 09:08:45 -08:00
bohu
58a877d853 Merge "emulator: grant fingerprint hal data permission" am: b2cc4ddafd
am: 96fecf5b08

Change-Id: If1bc358d6a761146ec86af0ccf84613b2fff325d
2018-02-15 16:54:57 +00:00
bohu
72fa12db3c emulator: grant fingerprint hal data permission
Test: build sdk_gphone_x86-userdebug
launch emulator, enroll fingerprint, close emulator
relaunch emulator, check previously enrolled fingerprint still work

Change-Id: I27552509368f08cc6a7aa52b0e9efc5ae952469d
2018-02-14 15:37:31 -08:00
Tri Vo
abdf6ef257 Merge "Fix /sys denials." am: d8e3c4eb07
am: 55bb62895e

Change-Id: I6507cb7c04af3e61984ea57dea553f13386403cb
2018-01-29 22:15:38 +00:00
Tri Vo
a7c4cc4b1d Merge "healthd: fix /sys denials." am: 88114b0b0b
am: 09f34add81

Change-Id: Iee7f7c30ed91ca6ddf126c3ce4dfa2349147349f
2018-01-25 03:02:09 +00:00
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
Tri Vo
654b55305f Merge "bootanim: remove access to vendor_file type" am: e320da7dce
am: 43f0f6d197

Change-Id: I72b888f6a3fab6a65ee4b6c5a71026d571073f71
2018-01-10 22:44:40 +00: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
Bo Hu
2076ee8eaf Merge "emulator: allows goldfish to disable bootanimation" am: 303a5f0c2d
am: e262a65a1d

Change-Id: Ib7e8064b3aca27c6324d002784270d015c07b9ac
2017-12-05 22:09:04 +00: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
d78a7ceb7f Merge "emulator: api 26 fix guest rendering (build)" am: fb46f47085
am: c6e1046dfb

Change-Id: I5dcd84170c6f9ac7be5ef155263bfae10de93b6e
2017-12-01 20:35:40 +00: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
5909b07cc4 Merge "emulator: support system-as-root" am: 44e363f1e3
am: 253dfc22a6

Change-Id: I9eab659873195ee7a46e8fc83556a0a5b011d746
2017-11-30 20:16:28 +00: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
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
bohu
2ca363a63e 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:24:06 -07:00
bohu
8d5f2e8622 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:23:44 -07:00
bohu
4ac55e0bbb emulator: squash misc modifications from oc-emu-dev
Change-Id: Ia6c3ff0805b88ef284524a4e6faa5615016b359c
Merged-In: I7380292cd4dc851a987683bdf61d511dbf74aff6
2017-10-26 16:23:14 -07:00
bohu
a76b9228ca 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:21:43 -07:00
bohu
5356718c02 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:20:56 -07:00
Yahan Zhou
fcdc30a4e6 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:11:58 -07:00
Tri Vo
7fd5858547 Merge "Label emulator devicetree dir." am: 8716646d63
am: 73d36f64b1

Change-Id: I3945cb34c9d41a2834b1da85a980ac335bf2fa58
2017-10-24 20:45:38 +00:00
Tri Vo
8716646d63 Merge "Label emulator devicetree dir." 2017-10-24 20:36:22 +00: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
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
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
bb7ece439b Remove world writable sysfs files
Test: build
Change-Id: I9d18d31a9a65f785cf4bc69f011990e9f8182228
2017-10-05 14:50:17 -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
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
Mathieu Chartier
418258cee9 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
Change-Id: I49f2a23337fdd2bc2e628b683d26a0c135b2aabe
2017-08-28 18:40:30 -07:00
bohu
90da258962 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
2017-08-25 11:17:23 -07:00
bohu
2ab3cf3c1f emulator: fix selinux issues
with cas/camera/drm hals

BUG: 64726466

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

Change-Id: I8a154fdb5d7aa7763aab2b912976eb9e1d329cdb
2017-08-24 21:29:56 -07:00
bohu
753e9e4462 emulator: squash misc modifications from oc-emu-dev
Change-Id: I7380292cd4dc851a987683bdf61d511dbf74aff6
2017-08-13 22:32:01 -07:00
bohu
cb694ebb34 emulator: move rild.libpath to vendor
BUG: 62137708
Test: buld sdk_gphone_x86-user, launch
emulator make sure radio works

Change-Id: I4ef1483a8d95a74b54deb6f0d4b2461c733c8140
2017-08-13 22:31:45 -07:00
bohu
d5f90a52e7 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
2017-08-13 22:31:22 -07:00
Yahan Zhou
c61b6bd2ed 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
2017-08-13 22:28:58 -07:00
Bo Hu
d80d922083 Merge "Revert "Revert "emulator: create qemu images for system,vendor""" am: 5af2027e34 am: abd33cdba6
am: 1b86b7581c

Change-Id: I0c8bf4c8db0cb783c7116d2f9d0734b98341401a
2017-08-01 23:30:23 +00:00
Bo Hu
1b86b7581c Merge "Revert "Revert "emulator: create qemu images for system,vendor""" am: 5af2027e34
am: abd33cdba6

Change-Id: I4ec03f912aa03156114859432f4331f50b5d60b2
2017-08-01 23:26:17 +00:00
Bo Hu
abd33cdba6 Merge "Revert "Revert "emulator: create qemu images for system,vendor"""
am: 5af2027e34

Change-Id: I61b9598d6b69d74a42ad0dc445c866e3034ff638
2017-08-01 23:22:17 +00:00
Bo Hu
bc88ff69cf Revert "Revert "emulator: create qemu images for system,vendor""
This reverts commit 9b99ddc8a5.
and add syste-qemu.img to the dependency list of sdk target

BUG: 64235252

Test: build sdk target successfully

(cherry picked from commit f0d50bbef0)

Change-Id: I813233c7c3f06eb1eca18aad5ea890a55814eb1b
2017-08-01 14:34:15 -07:00
Bo Hu
f0d50bbef0 Revert "Revert "emulator: create qemu images for system,vendor""
This reverts commit 9b99ddc8a5.
and add syste-qemu.img to the dependency list of sdk target

Test: build sdk target successfully

Change-Id: Idb0bee56275f3bfe33ba7d29463e4b8e0699ec33
2017-08-01 13:00:53 -07:00
Bo Hu
b0ca7302aa Merge "Revert "emulator: create qemu images for system,vendor"" am: a2ea9626e5 am: b7e5cf8b6d
am: 471e2ba1d6

Change-Id: I89357469dfcb50f03771e733a41ea704801ce044
2017-08-01 07:07:07 +00:00
Bo Hu
471e2ba1d6 Merge "Revert "emulator: create qemu images for system,vendor"" am: a2ea9626e5
am: b7e5cf8b6d

Change-Id: I2929dae53386a287864d3166d707bfe9137a7803
2017-08-01 07:03:36 +00:00
Bo Hu
b7e5cf8b6d Merge "Revert "emulator: create qemu images for system,vendor""
am: a2ea9626e5

Change-Id: I0118d5355aa3ffcd728b22e964609f02561df2db
2017-08-01 07:00:06 +00:00
Bo Hu
9b99ddc8a5 Revert "emulator: create qemu images for system,vendor"
This reverts commit b5d0503758.

Change-Id: Ie46a3a3dd99dec42673b3e3bd5b9085ca0480a8d
2017-08-01 06:50:07 +00:00
bohu
69121fd68c Merge "emulator: create qemu images for system,vendor" am: 571e5d47b7 am: dbbd3311ae
am: fe3b305516

Change-Id: I5cb77655098ff078c4677e083843e5d7e4a57f07
2017-08-01 02:12:16 +00:00
bohu
fe3b305516 Merge "emulator: create qemu images for system,vendor" am: 571e5d47b7
am: dbbd3311ae

Change-Id: I00b15a3ab05ce7d64fad7e9700169fd67ae699fb
2017-08-01 01:58:40 +00:00
bohu
dbbd3311ae Merge "emulator: create qemu images for system,vendor"
am: 571e5d47b7

Change-Id: Id80d452017384769146879bec205f39da79e37ae
2017-08-01 01:56:12 +00:00
bohu
b5d0503758 emulator: create qemu images for system,vendor
For raw system.img and vendor.img do not have
partition table and init refuses to mount them
in first stage mounting.

For emulator build:
create partitioned system-qemu.img for system.img;
create partitioned vendor-qemu.img for vendor.img
if applicable.

Change-Id: I64fdcdafc303cf2f74a1e96653e7afe259f0af98
2017-07-31 16:28:40 -07:00
Jeff Vander Stoep
9a8f6775ec sepolicy: remove all use of domain_deprecated
This attribute has been removed from public policy and is no longer
available.

Bug: 38316109
Test: build policy
Change-Id: I3407ced2d725de982e19b77345827de03d93c426
(cherry picked from commit ec488e1fee)
2017-07-24 08:17:39 -07:00
bohu
7b6320773a emulator: fix emulator booting
1. update rild libpath to vendor instead of system

Test: build sdk_phone_x86-eng and launch emulator
it should boot to home screen.

Change-Id: I7b9946e61de952e4b7ae89b740050b768be1cf99
2017-07-05 23:12:29 -07:00
bohu
0f4de2f8aa emulator: get emulator booting
am: d665b020f2

Change-Id: Idf376eae7d42242f17fdef99ce0d6de9067a2236
2017-07-06 02:17:22 +00:00
bohu
d665b020f2 emulator: get emulator booting
1. add missing hals
2. setup missing selinux
3. install manifest.xml to vendor/
4. install emulator setup scripts and setup
   selinux domain

BUG: 63268696
Test: build sdk_gphone_x86-userdebug
and launch emulator, boot to home

Change-Id: Ibacea9c761bc06736a8baa39d891d1c2ed3d74f4
2017-07-05 17:02:56 -07:00
Jeff Vander Stoep
3eed2e5808 Merge "sepolicy: remove all use of domain_deprecated" into oc-dev am: 2e8ce7628d
am: 455a336fb4

Change-Id: Iee72bbc4a37450c70b10dc1085f7ad0f856d3fb6
2017-05-16 21:49:12 +00:00
Jeff Vander Stoep
ec488e1fee sepolicy: remove all use of domain_deprecated
This attribute has been removed from public policy and is no longer
available.

Bug: 38316109
Test: build policy
Change-Id: I3407ced2d725de982e19b77345827de03d93c426
2017-05-15 13:25:06 -07:00
Lingfeng Yang
a70b40f60a Set emulator framebuffer display device buffer count to 3
Otherwise, we get deadlock.

bug: 36439031

Change-Id: Icffeca757120deb2b1392d8fc3531e3737d7cdc4
2017-05-09 22:36:07 +00:00
Lingfeng Yang
450cd0ba62 Use HWC2 for all emulator images.
bug: 36375335

Change-Id: I1a220d7ea0174a87713e3009ceba22a5e3f66f25
2017-03-23 19:33:33 +00:00
bohu
7a0f58cfd7 Merge "Emulator: Enable logcat -Q to run in emulator" am: 406d3b6df1 am: 5c8080cc18
am: 4e0937222d

Change-Id: I93add2438689c5c02eb2155e68ba8514d8f8b81f
2017-03-17 16:38:34 +00:00
bohu
5c8080cc18 Merge "Emulator: Enable logcat -Q to run in emulator"
am: 406d3b6df1

Change-Id: I9f429980942e043ea874ad45bb88646d1c036f5b
2017-03-17 16:30:33 +00:00
bohu
8c3364bd59 Emulator: Enable logcat -Q to run in emulator
Create qemu_cmdline property and make sure logcat
can read it.

Change-Id: I83261a1ba29ecf9fd9b51a815425742177018c87
2017-03-15 22:27:08 -07:00
Yahan Zhou
93d1636508 Increase system image size to 2GB for the emulator
This is needed as GTS requires us to pre-install more google apps into
the system image.

Change-Id: Iaf72f745df97604c2d0bc3fbdca01730ca7be94d
2017-01-24 12:30:07 -08:00
Lingfeng Yang
f17d83fd89 Allow /dev/goldfish_sync am: bdceef4325
am: 60a8826f53

Change-Id: I8739e950a1a6bbbd77ce0c6a320ff5d41976214b
2017-01-17 00:50:29 +00:00
Lingfeng Yang
bdceef4325 Allow /dev/goldfish_sync
Change-Id: I41883eafd2b261d000c41eaf3ba04af7e2b89349
(cherry picked from commit 5d6ae8a3d467dd23a2f09a96bc4fdbea2d0353a2)
2017-01-12 11:35:53 -08:00
Weilun Du
0499d282a7 Merge "Allow /dev/goldfish_sync" 2017-01-10 19:32:23 +00:00
Lingfeng Yang
ee3bd46245 Merge "Allow goldfish-setup to take wake locks" am: 10f6bf093d am: 528a561d4e am: f0069a0c7f
am: f5bb5b739a

Change-Id: I46f1077c114e1e7f972dc1823277d66b01348424
2017-01-06 20:18:51 +00:00
Lingfeng Yang
de0eaf2b7b Allow goldfish-setup to take wake locks
Change-Id: I6a5db8586168e47e974a82afd2e75fd858aa5750
2017-01-06 10:12:08 -08:00
Lingfeng Yang
e1b174f11c Allow /dev/goldfish_sync
manual cherry pick of:
https://googleplex-android-review.git.corp.google.com/#/c/1024926/

Change-Id: I41883eafd2b261d000c41eaf3ba04af7e2b89349
(cherry picked from commit 10bbf13fe7a3c2bfa28a4f560bb6f85de4edf786)
2017-01-05 18:54:59 +00:00
Mark Salyzyn
99fe879424 Merge "logpersist: introduce split to logcat and logpersist domains" am: 04f2cbd92a am: 76b36cfb98 am: 76e0e2a53e
am: f4f347cf06

Change-Id: Ib5776224c1a854c481756fb10f133aad2074fefd
2016-12-20 22:24:54 +00:00
Mark Salyzyn
239ef9d502 logpersist: introduce split to logcat and logpersist domains
logcat_exec transition to logpersist from init with perms

Test: compile
Bug: 30566487
Change-Id: I0cea55f71be011e921841ef9d3e1283f11606f36
2016-12-20 20:32:01 +00:00
Richard Haines
227fa5d597 Merge "goldfish_setup: grant ifconfig priv_sock_ioctls" am: 4a0f550cc7 am: f80ed9f08e
am: d1cb2ac13a

Change-Id: Ic908915602bfdade8e3d5fadf0197f02839ea790
2016-10-20 18:03:58 +00:00
Richard Haines
f80ed9f08e Merge "goldfish_setup: grant ifconfig priv_sock_ioctls"
am: 4a0f550cc7

Change-Id: Ie7cfadf3dd2b8e0687bcfcb8f14c5234854dc727
2016-10-20 17:47:57 +00:00
Treehugger Robot
4a0f550cc7 Merge "goldfish_setup: grant ifconfig priv_sock_ioctls" 2016-10-20 17:37:43 +00:00
Richard Haines
8a09cc2297 goldfish_setup: grant ifconfig priv_sock_ioctls
The goldfish_setup shell script needs the ability to set the interface
address via ifconfig. This requires SIOCSIFADDR plus other ioctl
permissions, therefore allow the set of priv_sock_ioctls permissions.

Addresses the following denial that stops internet access via browser:
avc: denied { ioctl } for pid=712 comm="ifconfig" path="socket:[1825]"
dev="sockfs" ino=1825 ioctlcmd=8916 scontext=u:r:goldfish_setup:s0
tcontext=u:r:goldfish_setup:s0 tclass=udp_socket permissive=0

Test: With update can access internet via browser.

Change-Id: I77a52c0b72bb0ebe9451f45c346a399c1f61672d
Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
2016-10-20 16:46:22 +01:00
Dan Willemsen
8134339d26 Merge "For emulator builds preopt system apps even if doing eng build" am: 6dfd788fda am: cb3991d670
am: 178d8647e1

Change-Id: I3a0938d14708568f21cdc3eb7eeb6d741b24e570
2016-10-19 18:18:06 +00:00
Dan Willemsen
cb3991d670 Merge "For emulator builds preopt system apps even if doing eng build"
am: 6dfd788fda

Change-Id: I5556244da69ca46583a63cfa83a321efa14b2381
2016-10-19 18:04:34 +00:00
Nikola Veljkovic
dcef8d3470 For emulator builds preopt system apps even if doing eng build
Following change disabled preopt for system apps when doing eng build:
    4df565786a

    Build: Only preopt boot images in eng builds

    As a middle way between full preopt/high performance/long builds,
    and no preopt/low performance/fast turnaround, preopt only the
    boot image in eng builds.

    I4a2692f3ce84823cd40c6b7d672fd73257739ef8

This works well for devices, but first boot on emulator takes 10+mins.
Bypass the change by forcing preopt inside the BoardConfig.

Change-Id: I58d100cd65d2a09b644a90d91261102aab31fcbb
2016-09-27 16:07:32 +00:00
Dan Stoza
8b0d255331 Remove DispSync default value/docs am: ae5e550f81 am: 92df306bd9
am: cddda45883

Change-Id: I3073c1f3b7d4de885519a9f0a9120069687a37d3
2016-09-12 18:03:38 +00:00
Dan Stoza
cddda45883 Remove DispSync default value/docs am: ae5e550f81
am: 92df306bd9

Change-Id: I0b21afde084512b622f74983456491749aa7c5a7
2016-09-12 17:51:17 +00:00
Dan Stoza
ae5e550f81 Remove DispSync default value/docs
Moves DispSync phase offset default values and documentation to
frameworks/native/services/surfaceflinger/Android.mk.

Bug: 30801895
Change-Id: I44a4355b2d112561b94ccfc6e9c3365885c205ad
2016-09-09 13:53:52 -07:00
Roozbeh Pournader
8e9eddba35 Remove last mention of EXTENDED_FONT_FOOTPRINT.
Setting EXTENDED_FONT_FOOTPRINT has been a no-op for a while, since
no one reads it anymore. Also do the same for naver-fonts, which had
also become a no-op.

Bug: 21785576
Change-Id: I3818adcbba11398024b82c2f22fe2d545b55418d
2016-06-09 17:51:16 -07:00
Nick Kralevich
80099408c9 goldfish_setup: grant /system/bin/sh exec access am: 501c88c029
am: 477ff93b14

* commit '477ff93b14ff46bef46fe7ca5242329b14328d8e':
  goldfish_setup: grant /system/bin/sh exec access

Change-Id: I0e4222bb838715423225337745537432ac57f1a0
2016-05-25 05:20:24 +00:00
Nick Kralevich
ce2e90308e goldfish_setup: grant /system/bin/sh exec access
am: 501c88c029

* commit '501c88c0290eb2308c110398f106411260863bb8':
  goldfish_setup: grant /system/bin/sh exec access

Change-Id: I9cf86d98f355342416a584ca74ac189f1873c6d7
2016-05-25 05:17:42 +00:00
Nick Kralevich
501c88c029 goldfish_setup: grant /system/bin/sh exec access
The goldfish_setup shell script needs the ability to execute
the shell script interpreter. Allow it.

Addresses the following denial:

avc: denied { getattr } for pid=1220 comm="init.goldfish.s"
path="/system/bin/sh" dev="vda" ino=442 scontext=u:r:goldfish_setup:s0
tcontext=u:object_r:shell_exec:s0 tclass=file permissive=0

Bug: 28941573
Change-Id: I22d26e90f107c8d801229354a5e0513c37e6c31d
2016-05-24 17:40:53 -07:00
Bo Hu
030f257836 Merge "Fix emulator specific SELinux denials related to qemu.gles" into nyc-dev am: 94f576d
am: 525a720

* commit '525a720a628ca425d434eec2339fa6ccfa8215a1':
  Fix emulator specific SELinux denials related to qemu.gles

Change-Id: I1944ea9d249024f477f548dce4cba5beb86218bd
2016-04-20 21:04:37 +00:00
bohu
d7f734024f Merge "Fix emulator specific SELinux denials related to qemu.gles" into nyc-dev
am: 94f576d

* commit '94f576d18cb61e672bcc849a324eab244dd4f3f8':
  Fix emulator specific SELinux denials related to qemu.gles

Change-Id: Iba1c077238ec1c41434c87e8ac96467a081383fc
2016-04-20 21:04:31 +00:00
Bo Hu
94f576d18c Merge "Fix emulator specific SELinux denials related to qemu.gles" into nyc-dev 2016-04-20 18:46:38 +00:00
bohu
bf863dbffc Fix emulator specific SELinux denials related to qemu.gles
init: avc:  denied  { set } for property=qemu.gles pid=108 uid=1003 gid=1003 scontext=u:r:bootanim:s0 tcontext=u:object_r:qemu_prop:s0 tclass=property_service permissive=1
init: avc:  denied  { set } for property=qemu.gles pid=75 uid=0 gid=0 scontext=u:r:zygote:s0 tcontext=u:object_r:qemu_prop:s0 tclass=property_service permissive=1

bug: 28221393
Change-Id: Icb0ee7fbf9a7b985f66fac087a48d9b5789e2b67
2016-04-19 15:04:58 -07:00
Nick Kralevich
6910622a70 Merge "Move sysfs_writable to emulator specific policy" am: 821e3fd
am: ef77794259

* commit 'ef77794259155f5a8bd3f5be56dcd49463d3ad65':
  Move sysfs_writable to emulator specific policy

Change-Id: Idb7c6a37c5da58450e6332ccafca83ad6754f701
2016-04-19 00:28:42 +00:00
Nick Kralevich
db411cf903 Move sysfs_writable to emulator specific policy
This type is never used in core policy, only by emulators.
Move the definition of this type to where it's used.

Bug: 28221393
Change-Id: I38dbc12dbe9813f323d4bcd5f07679db57b2fd4a
2016-04-18 15:18:09 -07:00
Nick Kralevich
1eb14d0d61 Address emulator specific SELinux denials
(cherrypicked from commit 841f6d870d)

Fix the following denials:

  avc: denied { search } for pid=222 comm="system_server"
  name="qemu_trace" dev="sysfs" ino=45 scontext=u:r:system_server:s0
  tcontext=u:object_r:sysfs_writable:s0 tclass=dir permissive=1

  avc: denied { open } for pid=222 comm="system_server"
  name="u:object_r:opengles_prop:s0" dev="tmpfs" ino=1429
  scontext=u:r:system_server:s0 tcontext=u:object_r:opengles_prop:s0
  tclass=file permissive=1

  avc: denied { read } for pid=222 comm="system_server"
  name="u:object_r:radio_noril_prop:s0" dev="tmpfs" ino=1430
  scontext=u:r:system_server:s0 tcontext=u:object_r:radio_noril_prop:s0
  tclass=file permissive=1

  avc: denied { open } for pid=222 comm="system_server"
  name="u:object_r:radio_noril_prop:s0" dev="tmpfs" ino=1430
  scontext=u:r:system_server:s0 tcontext=u:object_r:radio_noril_prop:s0
  tclass=file permissive=1

  avc: denied { getattr } for pid=222 comm="system_server"
  path="/dev/__properties__/u:object_r:radio_noril_prop:s0" dev="tmpfs"
  ino=1430 scontext=u:r:system_server:s0
  tcontext=u:object_r:radio_noril_prop:s0 tclass=file permissive=1

  avc: denied { search } for pid=424 comm="putmethod.latin"
  name="qemu_trace" dev="sysfs" ino=45
  scontext=u:r:untrusted_app:s0:c512,c768
  tcontext=u:object_r:sysfs_writable:s0 tclass=dir permissive=1

Bug: 28221393
Change-Id: I6fce1127d9d9e8bc0119bace3f142d51382401c0
2016-04-18 14:57:24 -07:00
Nick Kralevich
841f6d870d Address emulator specific SELinux denials
Fix the following denials:

  avc: denied { search } for pid=222 comm="system_server"
  name="qemu_trace" dev="sysfs" ino=45 scontext=u:r:system_server:s0
  tcontext=u:object_r:sysfs_writable:s0 tclass=dir permissive=1

  avc: denied { open } for pid=222 comm="system_server"
  name="u:object_r:opengles_prop:s0" dev="tmpfs" ino=1429
  scontext=u:r:system_server:s0 tcontext=u:object_r:opengles_prop:s0
  tclass=file permissive=1

  avc: denied { read } for pid=222 comm="system_server"
  name="u:object_r:radio_noril_prop:s0" dev="tmpfs" ino=1430
  scontext=u:r:system_server:s0 tcontext=u:object_r:radio_noril_prop:s0
  tclass=file permissive=1

  avc: denied { open } for pid=222 comm="system_server"
  name="u:object_r:radio_noril_prop:s0" dev="tmpfs" ino=1430
  scontext=u:r:system_server:s0 tcontext=u:object_r:radio_noril_prop:s0
  tclass=file permissive=1

  avc: denied { getattr } for pid=222 comm="system_server"
  path="/dev/__properties__/u:object_r:radio_noril_prop:s0" dev="tmpfs"
  ino=1430 scontext=u:r:system_server:s0
  tcontext=u:object_r:radio_noril_prop:s0 tclass=file permissive=1

  avc: denied { search } for pid=424 comm="putmethod.latin"
  name="qemu_trace" dev="sysfs" ino=45
  scontext=u:r:untrusted_app:s0:c512,c768
  tcontext=u:object_r:sysfs_writable:s0 tclass=dir permissive=1

Bug: 28221393
Change-Id: I6fce1127d9d9e8bc0119bace3f142d51382401c0
2016-04-18 13:28:04 -07:00
Prathmesh Prabhu
316654fc23 Emulator: Bump arm(64) system image partition size to 1.75 GB
Change-Id: If9ce0346ed4ca7ceab3fda217e5c9de6d89b6c94
2016-03-14 18:07:31 +00:00
bohu
37f5b608e1 emulator: allows surfaceflinger to change qemu.gles value
This is to allow surfaceflinger to always load vendor provided
egl libraries first and fall back to software renderer, and then
set the qemu.gles to correct value reflecting what libraries
are actually used.

bug: 27273457

Change-Id: Ifaca31aa2e562f50baa41fd228df9836bc3b1667
2016-02-20 01:39:27 +00:00
dcashman
cb1fb3156c Label ranchu block devices.
Address the following denials:
avc:  denied  { getattr } for  pid=1166 comm="e2fsck" path="/dev/block/vdc" dev="tmpfs" ino=2880 scontext=u:r:fsck:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
avc:  denied  { read write } for  pid=1166 comm="e2fsck" name="vdc" dev="tmpfs" ino=2880 scontext=u:r:fsck:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0

Bug: 27224003
Change-Id: I4792420822d238e6ad1bf757634c924b95150515
2016-02-19 05:32:02 +00:00
Chih-Hung Hsieh
6dc7147fb0 Remove USE_CLANG_PLATFORM_BUILD in BoardConfig.mk
Use global default USE_CLANG_PLATFORM_BUILD set in core/envsetup.mk,
or user provided environment variable USE_CLANG_PLATFORM_BUILD.

BUG: 26102335
Change-Id: I7e12219a60f36bb44797bb028b4a5873a67c9210
2016-02-04 10:55:56 -08:00
Tom Cherry
69035cd4aa Remove special case handling of "ro." properties
Currently, properties that begin with "ro." are special cased to skip
over the "ro." part of the prefix before matching with entries in
property_contexts.  A change to init is removing this special case and
therefore, the "ro." prefixes must be explicitly added to
property_contexts.

Bug 26425619

Change-Id: I735eb9fc208eeec284cda8d778db946eeec24192
2016-01-11 13:16:45 -08:00
Miroslav Tisma
36a76ec098 sepolicy: Fix 'avc denied' issues for the emulators
This commit fixes the avc denied issues in the emulators:
- goldfish_setup is granted for network access
- netd dontaudit for sys_module
- qemu_prop is granted domain for get_prop

Critical issue was that SELinux denied reading the lcd_density property
by SurfaceFlinger via qemu_prop and this commit fixes it.

Change-Id: I633d96f4d2ee6659f18482a53e21f816abde2a5f
Signed-off-by: Miroslav Tisma <miroslav.tisma@imgtec.com>
2015-12-11 16:21:00 +01:00
Mike Frysinger
db4883ca93 sepolicy: drop -- marker
It's not needed and is a bit confusing.

BUG=26018537

Change-Id: Ibb1c3995de97a442c95d5eea823523b5f0f26393
2015-12-10 18:18:27 +00:00
Griff Hazen
0517540e8d Let qemu_props service set system properties in ro.emu and ro.emulator
These boot properties are used by android wear emulator to configure
round and chin shaped devices.

Bug: 23324757
Change-Id: I812da02d771bba0ffc63b14459c7de7cbdeed142
2015-11-07 16:53:59 -08:00
Jeff Vander Stoep
7890fc4d2e selinux: Grant all processes the domain_deprecated attribute
Bug: 25433265
Change-Id: Iafad5abd6e75c5a46f844ef3e744adf1c904b362
2015-11-04 08:49:07 -08:00
Chih-Hung Hsieh
557fa2f3cd Move arm target to clang by default.
Bug: 23163853
Change-Id: I4cb95ed652ca697461e2fb22811779aa2df8d262
2015-10-27 13:42:34 -07:00
Nick Kralevich
ce1062629f allow qemu_props to set opengles.version
Addresses the following denial:

  init: avc:  denied  { set } for property=opengles.version scontext=u:r:qemu_props:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service

Bug: 25148690
Change-Id: I4b197eeabfe37e794104e4e686e9e388b5bc3e0c
2015-10-21 10:55:21 -07:00
Nick Kralevich
64e4d8a211 am 35a075db: am 36d91b53: Merge "Only allow toolbox exec where /system exec was already allowed."
* commit '35a075db60bc5553b57ef3311b9643d3b04ea7da':
  Only allow toolbox exec where /system exec was already allowed.
2015-08-25 22:53:03 +00:00
Stephen Smalley
75770de701 Only allow toolbox exec where /system exec was already allowed.
When the toolbox domain was introduced, we allowed all domains to exec it
to avoid breakage.  However, only domains that were previously allowed the
ability to exec /system files would have been able to do this prior to the
introduction of the toolbox domain.  Remove the rule from domain.te and add
rules to all domains that are already allowed execute_no_trans to system_file.
Requires coordination with device-specific policy changes with the same Change-Id.

Change-Id: Ie46209f0412f9914857dc3d7c6b0917b7031aae5
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-08-25 11:46:12 -04:00
Ian Pedowitz
c3bc0b112c resolved conflicts for merge of e5a63158 to mnc-dev-plus-aosp
Change-Id: Ifcbf55d0f4a158602867c01546f4c0f7e668697f
2015-08-11 15:06:29 -07:00
Ian Pedowitz
4e0d34c7c7 Increasing arm(64)? emulator partition sizes to 1.5GB
Bug: 23093319
Change-Id: I5e493ef4715cee96ae6ab40d6415f5330075fad6
2015-08-11 12:53:39 -07:00
Nick Kralevich
385457dc31 am 4a5f5a7b: am a972891f: Merge "file_contexts: Label /dev/ttyS2 as console_device"
* commit '4a5f5a7b15e27ed159e2398c77de1de7f9fd4da9':
  file_contexts: Label /dev/ttyS2 as console_device
2015-07-16 19:19:20 +00:00
Miodrag Dinic
df2620ada4 file_contexts: Label /dev/ttyS2 as console_device
This fixes the issue with the emulator "-shell" option.
Init tries to open the console which is passed through
the kernel androidboot.console property, but fails to
open it because "avc" denies it. Init only has permissions
to open console_device in rw mode. This ensures that
/dev/ttyS2 is properly labeled as console_device.

Replaced tabs with spaces.

Change-Id: I9ef94576799bb724fc22f6be54f12de10ed56768
2015-07-16 20:36:07 +02:00
dcashman
19eeccdaf2 Allow init to create /mnt/sdcard symlink.
Addresses the following denial:
avc:  denied  { create } for  pid=1 comm="init" name="sdcard" scontext=u:r:init:s0 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=0

Bug: 22084499
Change-Id: Icffef8330d07b00f36fda11374e39e0df7181ca3
2015-07-01 09:14:18 -07:00
Mark Salyzyn
9f8e1e1c7d goldfish: rename goldfish_logcat.te to logd.te
(cherrypicked from commit fd8c30177c)

Bug: 19608716
Change-Id: I5c76648a4bcbbb15a033465e8af66b12af6e0a18
2015-06-03 10:48:35 -07:00
Mark Salyzyn
94871b94ef goldfish: logcat -Q in logd domain
Deal with a build failure in conflict with cl/152105

(cherrypicked from commit 1cc7735ffa)

Bug: 19608716
Change-Id: I1078046db3b159c1baf0a22435c3e777424453a1
2015-06-03 10:47:34 -07:00
Mark Salyzyn
fd8c30177c goldfish: rename goldfish_logcat.te to logd.te
Bug: 19608716
Change-Id: I5c76648a4bcbbb15a033465e8af66b12af6e0a18
2015-06-03 09:00:14 -07:00
Mark Salyzyn
1cc7735ffa goldfish: logcat -Q in logd domain
Deal with a build failure in conflict with cl/152105

Bug: 19608716
Change-Id: I1078046db3b159c1baf0a22435c3e777424453a1
2015-06-03 07:52:21 -07:00
Yu Ning
0f54ada1cd Allow goldfish-setup to put the emulator in WiFi-only mode
The goldfish-setup service (essentially /system/etc/init.goldfish.sh)
executes the following commands when certain conditions are met:

 setprop ro.radio.noril yes
 stop ril-daemon

so as to stop the RIL daemon and emulate a WiFi-only device. Both would
fail, though, because goldfish-setup does not have the permissions to
set relevant properties.

This CL modifies the emulator's SELinux policy to grant the necessary
permissions. It is a step towards fixing the ril-daemon-keeps-getting-
killed-and-restarted problem with the new ("ranchu") emulator, which
does not support telephony emulation yet. (The other step is to have
init start goldfish-setup, which will be done in a seperate CL.)

(cherrypicked from commit 33dca8090f)

Change-Id: Ice7e7898804b7353ac4a8c49d871b1b2571d7a5f
Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-05-18 19:46:18 -07:00
William Roberts
c434f71bd8 Update device to use set_prop() macro
(cherrypicked from commit cccc901639)

Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
Signed-off-by: William Roberts <william.c.roberts@linux.intel.com>
2015-05-18 19:20:03 -07:00
Yu Ning
33dca8090f Allow goldfish-setup to put the emulator in WiFi-only mode
The goldfish-setup service (essentially /system/etc/init.goldfish.sh)
executes the following commands when certain conditions are met:

 setprop ro.radio.noril yes
 stop ril-daemon

so as to stop the RIL daemon and emulate a WiFi-only device. Both would
fail, though, because goldfish-setup does not have the permissions to
set relevant properties.

This CL modifies the emulator's SELinux policy to grant the necessary
permissions. It is a step towards fixing the ril-daemon-keeps-getting-
killed-and-restarted problem with the new ("ranchu") emulator, which
does not support telephony emulation yet. (The other step is to have
init start goldfish-setup, which will be done in a seperate CL.)

Change-Id: Ice7e7898804b7353ac4a8c49d871b1b2571d7a5f
Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-05-19 08:22:41 +08:00
Yu Ning
e9ec053e99 Label /dev/ttyGF* as serial_device
In goldfish kernel 3.10, the goldfish_tty device instantiates virtual
serial ports as /dev/ttyGF* (e.g. /dev/ttyGF0), not as /dev/ttyS* as in
goldfish kernel 3.4. However, in the emulator's SELinux security policy,
there is no specific security context assigned to /dev/ttyGF*, and the
one inherited from /dev (u:object_r:device:s0) prevents services such as
qemud and goldfish-logcat from reading and writing ttyGF*. Consequently,
qemud terminates abnormally on the classic x86_64 emulator:

 init: Service 'qemud' (pid XXX) exited with status 1

Fix this issue by assigning /dev/ttyGF* the same security context as
/dev/ttyS*.

(cherrypicked from commit 4783467922)

Change-Id: Ia7394dc217bd82f566c4d1b7eda3cc8ce3ac612f
Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-05-18 09:55:07 -07:00
Yu Ning
4783467922 Label /dev/ttyGF* as serial_device
In goldfish kernel 3.10, the goldfish_tty device instantiates virtual
serial ports as /dev/ttyGF* (e.g. /dev/ttyGF0), not as /dev/ttyS* as in
goldfish kernel 3.4. However, in the emulator's SELinux security policy,
there is no specific security context assigned to /dev/ttyGF*, and the
one inherited from /dev (u:object_r:device:s0) prevents services such as
qemud and goldfish-logcat from reading and writing ttyGF*. Consequently,
qemud terminates abnormally on the classic x86_64 emulator:

 init: Service 'qemud' (pid XXX) exited with status 1

Fix this issue by assigning /dev/ttyGF* the same security context as
/dev/ttyS*.

Change-Id: Ia7394dc217bd82f566c4d1b7eda3cc8ce3ac612f
Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-05-18 17:19:08 +08:00
Nick Kralevich
e89b6f5df1 Merge "Update device to use set_prop() macro" 2015-05-15 19:26:56 +00:00
Yu Ning
b23b5cc4a4 Label /dev/goldfish_pipe as qemu_device
In goldfish kernel 3.10, qemu_pipe has been renamed to goldfish_pipe.
However, in the emulator's SELinux policy, there is no specific security
context assigned to /dev/goldfish_pipe, and the one inherited from /dev
(u:object_r:device:s0) prevents various processes (qemud, qemu-props,
etc.) from reading and writing goldfish_pipe. Consequently, the classic
x86_64 emulator will not boot if GPU emulation is enabled ("-gpu host"),
and does not render the UI correctly if launched with "-gpu off".

Fix this issue by assigning /dev/goldfish_pipe the same security context
as /dev/qemu_pipe.

This CL also benefits the new ("ranchu") emulator, where all supported
ABIs (arm64, mips64, x86 and x86_64) use 3.10-based kernels. Without
this fix, the new emulator boots and works, but there are avc denials
related to goldfish_pipe.

Last but not least, it is now possible to boot the classic x86 emulator
with a 3.10-based kernel instead of the current 3.4-based one, without
disabling SELinux.

(cherry-pick of commit: a5053e6b35)

Change-Id: I52e75c94d3ae3758cbbf5bc0e1d84254fdf5c6cb
Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-05-15 07:44:28 -07:00
Yu Ning
a5053e6b35 Label /dev/goldfish_pipe as qemu_device
In goldfish kernel 3.10, qemu_pipe has been renamed to goldfish_pipe.
However, in the emulator's SELinux policy, there is no specific security
context assigned to /dev/goldfish_pipe, and the one inherited from /dev
(u:object_r:device:s0) prevents various processes (qemud, qemu-props,
etc.) from reading and writing goldfish_pipe. Consequently, the classic
x86_64 emulator will not boot if GPU emulation is enabled ("-gpu host"),
and does not render the UI correctly if launched with "-gpu off".

Fix this issue by assigning /dev/goldfish_pipe the same security context
as /dev/qemu_pipe.

This CL also benefits the new ("ranchu") emulator, where all supported
ABIs (arm64, mips64, x86 and x86_64) use 3.10-based kernels. Without
this fix, the new emulator boots and works, but there are avc denials
related to goldfish_pipe.

Last but not least, it is now possible to boot the classic x86 emulator
with a 3.10-based kernel instead of the current 3.4-based one, without
disabling SELinux.

Change-Id: Iad979c0ee9d0a410be12b83ac1bef9476b50a6dc
Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-05-15 16:30:57 +08:00
William Roberts
cccc901639 Update device to use set_prop() macro
Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
Signed-off-by: William Roberts <william.c.roberts@linux.intel.com>
2015-05-12 20:44:37 -07:00
bohu
22f1bc5db2 Bump sdk arm system image size to 750M
To fix broken build of arm system images.

Change-Id: I960dbb2a5a895557499fcf38655cd8907e768ef9
(cherry picked from commit 9f42be14b8)
2015-04-27 19:59:57 +00:00
Stephen Smalley
5699c6cf90 Drop BOARD_SEPOLICY_UNION.
As suggested in the comments on
https://android-review.googlesource.com/#/c/141560/
drop BOARD_SEPOLICY_UNION and simplify the build_policy logic.
Union all files found under BOARD_SEPOLICY_DIRS.

Change-Id: I4214893c999c23631f5456cb1b8edd59771ef13b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-04-01 10:33:24 -04:00
Ying Wang
58aeaed9ce Merge "goldfish_logcat: remove permissive_or_unconfined()" 2015-02-23 17:30:50 +00:00
Ying Wang
aa67c0ce9a Merge "qemud: remove permissive_or_unconfined()" 2015-02-23 17:30:43 +00:00
Ying Wang
4be75b3733 Merge "qemu_props: remove permissive_or_unconfined()" 2015-02-23 17:30:28 +00:00
Stephen Smalley
7b4a69adf4 qemud: remove permissive_or_unconfined()
Change-Id: Ia15cf87de1d03364f80d3d0cbc546475abfef448
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-10 17:29:01 -05:00
Stephen Smalley
25a150c5e1 qemu_props: remove permissive_or_unconfined()
Change-Id: I29f37822ccac22dd884d88f9dcd23237b5a3e2de
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-10 17:28:41 -05:00