Commit graph

311 commits

Author SHA1 Message Date
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
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
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
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
Andreas Gampe
13761c43c4 Build: Update Mips64 generic build for ART
For ART testing, we need:

1) A larger userdata partition. A lot of files end up there as it
is multi-arch.

2) Don't strip prebuilts. Technically we only care about core-libart,
but this is the best high-level change that doesn't impact other
files.

Change-Id: Ic36bfcf80ba50a602752ca0a3031dda89a0f3051
2015-05-06 21:00:44 -07:00
Stephen Smalley
21ebc213bb Define BOARD_SEPOLICY_DIRS for 64-bit emulators.
Define BOARD_SEPOLICY_DIRS for the arm64, mips64, and x86_64
emulator targets.  As a first cut, simply inherit from the
existing policy directories used for generic and generic_x86.
We may need further board-specific policy added for these targets
but testing will require first enabling SELinux in the relevant
kernel configs.

Change-Id: I7b4459b32298698fc2908cbbdd0e3afadbe5ac24
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-04-29 09:55:08 -04: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
Duane Sand
e53cf413e1 Bump generic_mips64 system partition size.
Fix broken mips64 build via 20% increase.

Change-Id: Ie30418c6fc7cf8810139abe53537ef8259a49a2f
2015-03-30 17:02:00 -07:00
Ying Wang
6c194cb0c5 Bump generic_arm64 system partition size.
Change-Id: Ic53fdaa0143ee2c0cce5a2f750da4c52adc6fdb9
2015-03-20 13:29:10 -07:00
Ying Wang
779e9cc806 Bump generic_mips system partition size.
Change-Id: Ieb3becc3ddc1efa19c6e6d34b4a31c0440d3479d
2015-03-20 09:18:33 -07:00
Douglas Leung
3713ded238 Increase system and userdata partition sizes.
The extra system space is needed for mips64r6/mips32r6 quick
mode images and the extra userdata is needed to run ART tests.

Change-Id: I96dc1553d950dcf046b57feff10a369e9155bd4d
2015-03-11 16:36:54 +00:00
Ying Wang
0487ab1ec0 am 58aeaed9: Merge "goldfish_logcat: remove permissive_or_unconfined()"
* commit '58aeaed9ce5c3738dd8eb36d56484a9614fb00e0':
  goldfish_logcat:  remove permissive_or_unconfined()
2015-02-23 17:34:38 +00:00
Ying Wang
723d003929 am aa67c0ce: Merge "qemud: remove permissive_or_unconfined()"
* commit 'aa67c0ce9a9697f5ac192020ee8b75734862b129':
  qemud:  remove permissive_or_unconfined()
2015-02-23 17:34:37 +00:00
Ying Wang
4ca5ab5d4a am 4be75b37: Merge "qemu_props: remove permissive_or_unconfined()"
* commit '4be75b37333f22e8ce10cc8aff7e9756b2f82689':
  qemu_props:  remove permissive_or_unconfined()
2015-02-23 17:34:36 +00:00
Ying Wang
a65c7cf1a6 am 5d47a481: Merge "goldfish_setup: remove permissive_or_unconfined()"
* commit '5d47a481fb88ca4dba853d064eb5dfd671f9b68a':
  goldfish_setup:  remove permissive_or_unconfined()
2015-02-23 17:34:35 +00: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
Ying Wang
5d47a481fb Merge "goldfish_setup: remove permissive_or_unconfined()" 2015-02-23 17:30:28 +00:00
Bill Yi
251412b472 Merge commit 'b89ec38113a22d09b0832ed2d3cb8fc413a14a75' into HEAD 2015-02-19 14:30:26 -08:00
Elliott Hughes
24374e5752 Merge "Remove ARCH_ARM_HAVE_TLS_REGISTER." 2015-02-17 17:47:10 +00:00
Elliott Hughes
e033c6df7d Remove ARCH_ARM_HAVE_TLS_REGISTER.
This was only needed for platform builds, and was removed in the gap between
armv5 being removed and being added back again for tapas builds. Otherwise it
would have been removed back then.

(I suspect that we don't need the system.prop file in here, either, but I
don't really know how to test that.)

Change-Id: I212ff7b3568b5d5ff3cc66150ec7c4fa0b8cac92
2015-02-13 20:51:12 -08:00
Ying Wang
f5a6279c4c am bdfec89d: Merge "Increase BOARD_SYSTEMIMAGE_PARTITION_SIZE to 900MB for mips64."
* commit 'bdfec89d96819cf78faa4a61635c2ec536b4545f':
  Increase BOARD_SYSTEMIMAGE_PARTITION_SIZE to 900MB for mips64.
2015-02-12 20:11:19 +00:00
bohu
05defc16b6 am d857abd1: am 151205c3: Merge "Bump generic_mips and generic_x86_64 system partition size" into lmp-mr1-dev
* commit 'd857abd1ff8b3436d15765e93b0d4d0ec1a9147a':
  Bump generic_mips and generic_x86_64 system partition size
2015-02-12 01:16:22 +00:00
bohu
4c49eaadf3 Bump generic_mips and generic_x86_64 system partition size
This fixes the sdk_google_phone_mips and sdk_google_phone_x86-64
builds

Change-Id: I971d02b07a6aa917d7e0f3750b48e657205aae52
2015-02-11 16:51:54 -08: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
Stephen Smalley
063b6b85d6 goldfish_setup: remove permissive_or_unconfined()
Change-Id: I3b44f24554f288f4fb1e18a53fa68e8a7cd8c8c7
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-10 17:28:11 -05:00
Stephen Smalley
de78c2776a goldfish_logcat: remove permissive_or_unconfined()
Change-Id: I1a26b07bf723c944c7dcb8beec96537500a3bc60
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-02-10 17:27:41 -05:00
Douglas Leung
206cbdb68e Increase BOARD_SYSTEMIMAGE_PARTITION_SIZE to 900MB for mips64.
This is needed to build mips64 ART in quick mode.

Change-Id: I8a9e62389a3d4edb84bf1d6814d6594565bc98ba
2015-02-10 11:55:12 -08:00
Brian Carlstrom
d169346b05 am 7a1125bc: Merge "Make TARGET_CPU_VARIANT the same as TARGET_ARCH_VARIANT for Mips."
* commit '7a1125bc632e150b934538036102807374406d2f':
  Make TARGET_CPU_VARIANT the same as TARGET_ARCH_VARIANT for Mips.
2015-01-09 18:02:20 +00:00
Douglas Leung
3cf3d78600 Make TARGET_CPU_VARIANT the same as TARGET_ARCH_VARIANT for Mips.
This is used to set --instruction-set-variant for dex2oat.

Change-Id: Ic93d1bfab634489e004ccf1195cdcfc767f092ef
2015-01-07 18:50:06 -08:00
Ying Wang
904e88b5be am 8750cfc5: am 111ba923: Bump generic_arm64 system partition size to 900M.
* commit '8750cfc5b5af821c90b224e727729e721c981e78':
  Bump generic_arm64 system partition size to 900M.
2014-12-10 22:36:49 +00:00
Ying Wang
111ba923be Bump generic_arm64 system partition size to 900M.
This fixes the arm64 sdk build.

Change-Id: Ic7b7ada79027845974cbcfc68941cfc87ed050fd
2014-12-10 09:56:06 -08:00
Ying Wang
276a543e71 am ea6113f0: Merge "arm: Support qemu-android on generic arm targets"
* commit 'ea6113f0f1a7069f1dd16bb2c0c7c29700bfda96':
  arm: Support qemu-android on generic arm targets
2014-11-20 17:27:35 +00:00
Christoffer Dall
a60edd110f arm: Support qemu-android on generic arm targets
When building a generic arm 32-bit target, we also want to include
support for the ranchu board model for the updated Android emulator
based on recent upstream QEMU.

Since the emulator.mk file is included by both the generic and
generic_arm64 targets and already defines a PRODUCT_COPY_FILES and
PRODUCT_PACKAGES, move duplicate entries from
target/board/generic*/device.mk to target/product/emulator.mk.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Change-Id: I7922ec0c4097776a185dbb245301d760ff332386
2014-11-19 12:17:59 -08:00
Daniel Cashman
111efa94bf am 1cffe219: am b0efa98d: Merge "Switch qemud to permissive_or_unconfined()."
* commit '1cffe219790a316ba36ef2495867d7b306b0f861':
  Switch qemud to permissive_or_unconfined().
2014-11-06 19:27:48 +00:00
Daniel Cashman
1cffe21979 am b0efa98d: Merge "Switch qemud to permissive_or_unconfined()."
* commit 'b0efa98d97c04f4f97f57aae954aa61cb14683fe':
  Switch qemud to permissive_or_unconfined().
2014-11-06 19:22:01 +00:00
Stephen Smalley
82b6f21be3 Switch qemud to permissive_or_unconfined().
Switch the qemud domain from unconfined_domain() to
permissive_or_unconfined() so that we can start collecting and
addressing denials in -userdebug/-eng builds.

Also allow access to the serial device.

Change-Id: I9c7a6ddc8c2e64bfc6c5bb896eed1729ab205d60
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-11-06 09:36:40 -05:00
Nick Kralevich
8de5b64a08 am 54e18379: am 36084e64: Merge "Label goldfish block devices with their own types."
* commit '54e1837910cb3c40d22436bc40a7c0469df184b0':
  Label goldfish block devices with their own types.
2014-10-31 18:34:12 +00:00
Nick Kralevich
54e1837910 am 36084e64: Merge "Label goldfish block devices with their own types."
* commit '36084e64a1b603f0ca848bba5ca91938f853dc4c':
  Label goldfish block devices with their own types.
2014-10-31 18:31:34 +00:00
Stephen Smalley
2ef5bf74fa Label goldfish block devices with their own types.
This assigns block device types as per device/generic/goldfish/fstab.goldfish.
Eliminates (permissive) avc:  denied messages for fsck.

Change-Id: Ia72bdfb16975f051548b6b2c0636e4f907295789
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-10-31 14:19:55 -04:00
Nick Kralevich
61d13ba425 am 4fe702e4: am dfa2f8a6: Merge "Mark qemu_device as a mlstrustedobject."
* commit '4fe702e4dcf5ff3e6dcc4dea1e842d7977ff3393':
  Mark qemu_device as a mlstrustedobject.
2014-10-31 17:40:47 +00:00
Nick Kralevich
4fe702e4dc am dfa2f8a6: Merge "Mark qemu_device as a mlstrustedobject."
* commit 'dfa2f8a6e309bca516a11d83abd1aa8733acce69':
  Mark qemu_device as a mlstrustedobject.
2014-10-31 17:36:28 +00:00
Stephen Smalley
968ce565f7 Mark qemu_device as a mlstrustedobject.
Allow apps running with any level to write to it.

Change-Id: I8fca1f377e14c624db5273bdacf8400addc6210d
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-10-31 13:28:09 -04:00
Ying Wang
9e4f5326b0 am 9318a22f: am b6f60d57: Use the lowest common denominator 32-bit abi for arm64 cts build.
* commit '9318a22f96dd1d4ffcae76fb20520a303ef10fdf':
  Use the lowest common denominator 32-bit abi for arm64 cts build.
2014-10-23 19:46:53 +00:00
Ying Wang
b6f60d57e3 Use the lowest common denominator 32-bit abi for arm64 cts build.
So the 32-bit code can be run any supported 32-bit arm devices.

Bug: 18038310
Change-Id: Ie8864cfdb87a4759d1a775d43cb5316b1f022e2b
2014-10-21 21:20:41 -07:00
Vince Harron
7320c4f535 am ee2dbee3: am 3e8b79c2: Merge "Increase system image partition size to fix build" into lmp-dev
* commit 'ee2dbee387b46323e6bc68cf0f51cf290d5f756f':
  Increase system image partition size to fix build
2014-10-08 07:48:53 +00:00