Commit graph

764 commits

Author SHA1 Message Date
huans
3d31afe594 emulator: add missing apns config
We add goldfish specific apns config files to /data/misc/apns/etc/
for aosp_* targets to have working telephony and wifi.

BUG: 79584197
Change-Id: I46591d923496420212cd279c0b90f0b4eb11cea4
2018-05-30 14:48:25 -07:00
TreeHugger Robot
92267a5d02 Merge "Temporarily whitelisting system domains writing vendor props" into pi-dev 2018-05-22 05:04:40 +00:00
Paul Crowley
66bad03f08 Revert "Add metadata/ to aosp_arm64 temporarily"
This reverts commit eee6e39145.
Bug: 79781913
Test: Compile for this target.

Change-Id: Ia635c124557ccad6cfef1a8867ca099de6b3f3db
2018-05-21 11:57:16 -07:00
Jiyong Park
bb1432b61b Temporarily whitelisting system domains writing vendor props
system properties must not be used as a communication channel in between
system and vendor processes. However, there has been no enforcement on
this: system process could write system properties that are owned and
read by vendor processes and vice versa. Such communication should be
done over hwbinder and should be formally specified in HIDL.

Until we finish migrating the existing use cases of sysprops to HIDL,
whitelisting them in system_writes_vendor_properties_violators so that
the violators are clearly tracked.

These violators are allowed only for P, but not for Q.

Bug: 78598545
Test: m -j selinux_policy when choosecombo'ed to aosp_arm64
Change-Id: I8f66aa20bb2d926cf517d40c93f4300c4d16b04b
2018-05-18 20:16:51 +09:00
TreeHugger Robot
8b6eda5f49 Merge "Add metadata/ to aosp_arm64 temporarily" into pi-dev 2018-05-16 18:43:02 +00:00
SzuWei Lin
eee6e39145 Add metadata/ to aosp_arm64 temporarily
FBE needs metadata/ under root folder. Adds metadata to
root folder before it has a final solution.

Bug: 79572884
Test: Boot on some pixel devices + aosp_arm64-userdebug with the patch
Change-Id: I5ef5763b755615dad4c8c711f9c9ef8987d3bb68
2018-05-16 18:32:48 +00:00
Isaac Chen
8f222b9e15 Merge "Enable PRODUCT_COMPATIBLE_PROPERTY for aosp_$arch" into pi-dev 2018-05-15 04:09:36 +00:00
Bowgo Tsai
4e9ff91935 Enable /cache mount point
Non-A/B devices using AOSP OTA flow will mount /cache in the
fstab file. Without setting BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE,
/cache will be a symlink to /data/cache which introduces the
failure of `mount_all /vendor/etc/fstab.{ro.hardware}`. This is
because all devices laucned in P need to switch to "system-as-root".

This CL sets board config to create /cache directory in rootfs
(system-as-root GSI image). Note that A/B devices doesn't mount
or use /cache so leaving an empty /cache in rootfs has no harm.

Bug: 78485405
Test: Boot GSI on walleye
Change-Id: Ic260d2917cc64c9497f5f60ea11303e953e80efd
2018-05-10 15:20:49 +08:00
Isaac Chen
075ee920fb Enable PRODUCT_COMPATIBLE_PROPERTY for aosp_$arch
GSI Pi (for newly launched devices) need to enable this to pass
VtsTrebleSysProp.

Bug: 79395858
Test: Built aosp_{arm,arm64,x86,x86_64}. Check system/etc/prop.default
    and found "ro.actionable_compatible_property.enabled=true".
    aosp_x86(_64) could boot to home screen.

Change-Id: I04a4ff7c5feee7671d727c04c9d9657b63ec0912
2018-05-10 13:13:21 +08:00
Isaac Chen
e63c937bc3 Build disabled vbmeta.img for aosp_$arch
System images of aosp_$arch are used as GSIs in P, and traditional GSI
users often need a special vbmeta image to disable verity (if AVB is
employed) befrre they flash the GSI.

"BOARD_BUILD_DISABLED_VBMETAIMAGE := true" builds such vbmeta.img

Bug: 79393905
Test: # For arch in arm, arm64, x86, x86_64, do
    $ lunch aosp_$arch; m -j # found vbmeta.img under $OUT

Change-Id: I113006385991a2daab60d3c55dc03f23f1b383b8
2018-05-08 18:10:06 +08:00
SzuWei Lin
c71d9863c6 Disable privapp_permissions checking in GSI temporarily
Some vendor apps are using shared UID without white-listing the apps.
A runtime checking with these apps causes some devcies cannot boot
with GSI. We disable the checking before bug b/78105955 solved.

Bug: 79174430
Bug: 78105955
Test: Boot pixel devices with GSI applied the patch.
Change-Id: Ic25f5e2c4506b79564959adf57839a7ddc4330c2
2018-05-03 13:34:26 +08:00
SzuWei Lin
3fc49fede8 Create system.prop for GSI Pi
Properties for GSI Pi are not exactly the same as those for legacy GSI.
Create a new gsi_system.prop for GSI Pi to avoid reusing legacy
treble_system.prop used by legacy GSI (aosp_$arch_a(b) products).

Bug: 78605339
Test: build and observe the system/build.prop
Change-Id: I435e33558e244009af9a91a97580fd56591ff6f3
2018-04-26 08:55:43 +00:00
Isaac Chen
f71547079a Enable VNDK for aosp_arm(64)
This is needed for the system images of aosp_arm(64) products to
be used as their respective GSIs in P, and for also aosp_arm(64)
products to boot with the current GSIs.

Bug: 78255604
Test: Built and booted the following products to home screen
    $ lunch aosp_arm-userdebug; m -j; emulator
    $ lunch aosp_arm64-userdebug; m -j; emulator
    # The system image, both userdebug and user builds, of
    # aosp_arm64 could also boot to home screen and browse
    # the network on a physical device.

Change-Id: I83b79fd4d4e6e522ee78c720fb8c5f6f67ee411b
2018-04-23 19:19:29 +08:00
Isaac Chen
164eed2e7d Make aosp_$arch system images closer to GSIs
This change modifies aosp_$arch product makefiles so their
system images can be closer to their respective GSIs.

The added contents in this CL are based on treble_common*.mk.
Contents specific to GSI are in aosp_$arch.mk.
Contents common to all devices are moved to full_base.mk.
Contents related to specific device are moved to device.mk.

BoardConfig related makefiles will be changed in another CL.

Bug: 70772101
Test: The following products can boot to home screen:
    $ lunch aosp_x86-userdebug; m -j; emulator
    $ lunch aosp_x86_64-userdebug; m -j; emulator
    $ lunch aosp_arm-userdebug; m -j; emulator
    $ lunch aosp_arm64-userdebug; m -j; emulator

Change-Id: I225a13dd74b3e748cc5d1705e1a453348b01d43f
2018-04-18 18:28:41 +08:00
Isaac Chen
dfa8e7796b ARM emulator: aosp_arm on 64-bit binder and kernel
Starting in P, all 32-bit and 64-bit architectures use 64-bit
binder interface. This is similar to ag/3576770 for x86.

Bug: 71861550
Test: the following products can boot to home screen successfully:
    lunch aosp_arm-userdebug; m -j; emulator
    lunch sdk_phone_armv7-userdebug; m -j; emulator
Change-Id: Ibe1f53a5798342555e2e84395a13b48d461f483d
2018-04-12 16:06:26 +08:00
SzuWei Lin
d24396d4df Remove adding /odm from GSI makefile
The odm/ is default created under the root directory.
We don't need adding /odm mount pointer now in GSI.

Bug: 77297861
Test: build aosp_arm64_ab-userdebug and boot on a Pixel 2 device.
Change-Id: Ied48439f366acc33595b958b75c2f30d8f6ad57e
2018-03-30 13:39:49 +08:00
TreeHugger Robot
dc855f7c85 Merge "Remove redundant BOARD_VNDK_VERSION" into pi-dev 2018-03-26 19:34:37 +00:00
SzuWei Lin
3d98bb086b Remove redundant BOARD_VNDK_VERSION
board/treble_common.mk already has the setting.

Bug: 76126824
Test: build aosp_arm64_ab-userdebug pass
Change-Id: I7e3680a1cb36c38bdb29564c39b17b9a16067e21
2018-03-26 11:29:15 +08:00
Bjoern Johansson
a27d4b7270 Allow radio to read emulator network properties
A recent change added SELinux labels to the properties used by the DHCP
software and RIL to configure the network. Unfortunately that change
didn't give RIL the permissions needed to read those properties which
broke radio networking for the emulator. Fix it by allowing radio
related code to read the properties again.

BUG: 76211046
Test: Run emulator with -feature -Wifi and verify network connectivity
Change-Id: I7663a6598e2d501ee8336b2dae5fd78ff4ff69bc
2018-03-23 11:26:40 -07:00
Bjoern Johansson
ca5bfb1ca7 Update SELinux rules to support emulator WiFi
SELinux policies have become stricter, this updates the emulator SELinux
rules to accomodate these changes. It also adds rules for the new
createns command with the accompanying execns changes that are needed
to work with an updated filesystem layout.

BUG: 74514143
Test: Compile emulator images and verify that WiFi works
Change-Id: I4b58cea681a1e41b0cb7368e1c696f74ce28f871
2018-03-22 12:59:49 -07:00
Bjoern Johansson
275bdb08cd Build emulator images with emulator WiFi HAL
Use the new emulator WiFi HAL. This is specified by the
BOARD_WLAN_DEVICE setting. This also requires that the wifi HAL service
is included.

BUG: 74514143
Bug: 68338427
Test: run cts -m CtsIncidentHostTestCases -t
com.android.server.cts.BatteryStatsValidationTest#testWifiDownload
Change-Id: Ib59550b6cfba1e2e8686a5c805cd6b3913e8508e
(cherry picked from commit 23073c6ee33eca56f1ae0c45615b87ec9aec712e)
(cherry picked from commit 2d51c9b2bf0774ac46837a93181c83329e6fc662)
2018-03-22 12:59:20 -07:00
Bjoern Johansson
760871c753 Fix SELinux settings for WiFi in Treble
Update SELinux permissions to work with Treble and the much stricter
SELinux rules.

BUG: 74514143
Test: Compile and manually test that WiFi is working
Change-Id: Ic0a6417fb4fed1597fee70367924e5d59f37e725
(cherry picked from commit 37d7bc2adcc4bfd4c0f03dcddf1c7fbd31e87a4f)
(cherry picked from commit 1b0158a4ab6ca4f05b4b186ec3a080c689492b58)
2018-03-22 12:58:32 -07:00
Bjoern Johansson
3c4b342323 Add SELinux configuration for new DHCP programs
Add the dhcpclient and dhcpserver binary files to the makefile and
file_contexts and give them the appropriate SELinux permissions to run.

BUG: 74514143
Test: Build emulator image and manually verify WiFi functionality
Change-Id: Ia472ef4c86c9b6ba967c0fc7443db607aed1e485
(cherry picked from commit 917bda2587d219e35404a298c05a7179519815c1)
(cherry picked from commit 87b9f937113801b50612863cb13e6391cc1f3105)
(cherry picked from commit 760a19890ac99144f6b143015c36e7aaa3797c73)
2018-03-22 12:58:29 -07:00
Bjoern Johansson
12fd2d8824 Enable WiFi for arm, arm64 and x86_64
Set the required parameters in BoardConfigs to allow WiFi to work on
remaining architectures. Also update SELinux policy needed to make WiFi
work on arm and arm64. This was not required on x86 but refused to work
on arm without these changes.

BUG: 74514143
Test: Build emulator image and manually verify WiFi functionality
Change-Id: Ic645ccf7249f84ae0320770b0ef7b1b6102b7b14
(cherry picked from commit 6d28bfbeefea8fe1919ff0987ae3d935d974dc6d)
(cherry picked from commit 023a7ba64bd3b189a148ad388606ca5747ea20b1)
(cherry picked from commit 9c9cefdafbae50c0e371c30bcccb98a8b7697e98)
2018-03-22 12:57:41 -07:00
Bjoern Johansson
127395fc8f Add support for WiFi in emulator
Add required SELinux permissions to run services required for WiFi and
network namespaces. Add required executables and files required to run
WiFi services such as hostapd to create an access point and
wpa_supplicant to connect to it.

BUG: 74514143
Test: Build emulator image and manually verify WiFi functionality
Change-Id: I38461b878abcaae842b4656dea82792e23100174
(cherry picked from commit 21c5c3dcf91b1be71abe8618e2eb31529438e325)
(cherry picked from commit 68a36140f7a3a766b8adc16cd85c2f0c81bfb44b)
(cherry picked from commit e6dab593b8eebccb1e6311e626c8aca943ba6933)
2018-03-22 12:57:36 -07:00
bohu
a9127502d3 emulator: allows drm hal vendor access
BUG: 76029272
Change-Id: Ib4de8b4cd5cf5899bee23c798156006d3680ab8d
2018-03-21 10:24:25 -07:00
Greg Hartman
2bfe38144f Increase size of data to accomodate ASAN and CTS
BUG: 74946342
Test: Local build works
Change-Id: I17e9973549ba96edb7cfbd574f68a2bc0bf55f98
2018-03-15 11:06:02 -07:00
Yahan Zhou
cf50451225 Merge "Add board name for emulator" am: 39acbe6446 am: 0547230ac1
am: dddbf1fecb

Change-Id: I2783184d28c2987c481bc1aa0b3f1a5941996896
2018-02-28 18:59:28 +00:00
Yahan Zhou
dddbf1fecb Merge "Add board name for emulator" am: 39acbe6446
am: 0547230ac1

Change-Id: Ia998564a709841a7ab162891164f73aea639b7d4
2018-02-28 18:53:20 +00:00
Yahan Zhou
12b5395c2f Add board name for emulator
VTS checks for ro.product.board before running. Emulator does not have
that value and causes an exception.

So let's add it to the emulator and call it goldfish_$(TARGET_ARCH).

BUG: 73741117
Test: vts-tradefed run vts, should run the tests
Change-Id: I6b00f2923bc9609d4d05c45d47ceddd2bd7be091
2018-02-27 18:11:48 -08:00
Nick Kralevich
ad80d5461b Merge "remove nnk from OWNERS" am: d6fa5bbc51 am: 439ecf8088
am: ee79f54630

Change-Id: I524d927a255b1b4b13a033a95d49466fece9d0eb
2018-02-27 19:34:32 +00:00
Nick Kralevich
ee79f54630 Merge "remove nnk from OWNERS" am: d6fa5bbc51
am: 439ecf8088

Change-Id: Ic428009c4d93f44354f16edb52b4bbb117a1ea6b
2018-02-27 19:27:30 +00:00
Nick Kralevich
0aa64275e8 remove nnk from OWNERS
See https://android-review.googlesource.com/c/platform/system/sepolicy/+/626014

Also remove klyubin who is no longer at Google.

Test: none
Change-Id: I98534c0cc676e41129b73331ad0e71e7fc1aa1ab
2018-02-27 09:15:10 -08:00
Justin Yun
5bbc56f825 Merge "Create firmware and persist in GSI for arm_ab" am: 19db058484 am: 308fbbdb54
am: ffffefd791

Change-Id: I38828c768cfd363f3a05fea074d9c48ed11c041c
2018-02-27 00:26:42 +00:00
Justin Yun
ffffefd791 Merge "Create firmware and persist in GSI for arm_ab" am: 19db058484
am: 308fbbdb54

Change-Id: Id8df567bb351cc02859055c10cf37a9c3f1c82fd
2018-02-27 00:20:00 +00:00
Justin Yun
38e934a38e Create firmware and persist in GSI for arm_ab
Some SoC vendors require firmware and persist directores to mount.
This must be provided in GSI for arm_ab not only for arm64_ab.
Once the directories are moved to /vendor, these policies for root
must be removed.

Bug: 36764215
Bug: 73720182
Test: GSI boot with 32bit devices
Change-Id: Ic5c6bb615c39853d51d233c00d2d9e8ee2c57802
2018-02-26 23:10:47 +00:00
Bo Hu
c75bf85314 Merge "emulator: remove opengles property" am: c187fdf751 am: 438eebab81
am: 6dc9db6051

Change-Id: Ic3c9c3b70f20f88fa507411ae55f06040140aa35
2018-02-23 23:18:25 +00:00
Bo Hu
6dc9db6051 Merge "emulator: remove opengles property" am: c187fdf751
am: 438eebab81

Change-Id: I5d616d60bb4e082d493fb66f49c4abfb0fcd7c64
2018-02-23 23:11:47 +00:00
bohu
70fefe0066 emulator: remove opengles property
BUG: 73812167
Change-Id: I5bdc475c6bdd5bdcb32c5a12f49c18c6a391b95c
2018-02-23 09:08:45 -08:00
bohu
b654f33a0f Merge "emulator: grant fingerprint hal data permission" am: b2cc4ddafd am: 96fecf5b08
am: 58a877d853

Change-Id: Ie510c648c6e85c497f32879a9cc4c07bc1a85b20
2018-02-15 17:02:27 +00: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
Michael Wright
74e5ccb28b Merge "Revert "Correct some GSI settings to board makefile"" am: 0b733a2036 am: e869d4e158
am: 80a013a7e2

Change-Id: I30ffb6bc51f7e41c5a90472d078ba8f47384402e
2018-02-07 15:25:19 +00:00
Michael Wright
80a013a7e2 Merge "Revert "Correct some GSI settings to board makefile"" am: 0b733a2036
am: e869d4e158

Change-Id: I690d03dbee97f97fb98e67f403dce7654f3d0810
2018-02-07 15:19:44 +00:00
Michael Wright
0b733a2036 Merge "Revert "Correct some GSI settings to board makefile"" 2018-02-07 15:11:07 +00:00
Michael Wright
87163300c2 Revert "Correct some GSI settings to board makefile"
This reverts commit 6e96487968.

Reason for revert: build_test broken by this change.

Change-Id: I0f48bb84dc8c521540c745814daa11c2900ac2c8
2018-02-07 12:08:51 +00:00
SzuWei Lin
fce672a2bd Merge "Correct some GSI settings to board makefile" am: 2f7f7ca1c0 am: 0c6f675b62
am: 2646ca50e5

Change-Id: If8bb17c3477b474c5f96130e1a5db4c20ab0a4a0
2018-02-07 10:42:30 +00:00
SzuWei Lin
2646ca50e5 Merge "Correct some GSI settings to board makefile" am: 2f7f7ca1c0
am: 0c6f675b62

Change-Id: I32de3a5d39b9759bb3dcdde930a314c2e7833cb0
2018-02-07 09:14:43 +00:00
Treehugger Robot
2f7f7ca1c0 Merge "Correct some GSI settings to board makefile" 2018-02-07 09:02:40 +00:00
Yifan Hong
2c2a24421a Merge "Move system manifest / device matrix build rules" am: fe34c5b52c am: 6e79817411
am: 19687f25f0

Change-Id: I897635ade816d146f41ef3a3421e16446e9d0252
2018-02-06 02:29:27 +00:00