Merge remote-tracking branch 'goog/master-cf-common' into derp

Merging cuttlefish_common master into cuttlefish master

Bug: 143774116
Test: Treehugger
Change-Id: I7123f11dd33a151d0bd8461c6a6e9a4b6108f7b4
diff --git a/temp/Android.bp b/temp/Android.bp
new file mode 100644
index 0000000..3daac1d
--- /dev/null
+++ b/temp/Android.bp
@@ -0,0 +1,74 @@
+//
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+cc_defaults {
+  name: "cuttlefish_recovery_available",
+  recovery_available : true
+}
+
+cc_defaults {
+  name: "enabled_on_p_and_later",
+  enabled: true
+}
+
+cc_defaults {
+  name: "enabled_on_q_and_later",
+  enabled: true
+}
+
+cc_defaults {
+  name: "enabled_on_q_internal_and_later",
+  enabled: true
+}
+
+cc_defaults {
+    name: "cuttlefish_host_config",
+    target: {
+        linux_glibc: {
+            static_libs: [
+                 "libcuttlefish_host_config",
+            ],
+        },
+    },
+}
+
+cc_defaults {
+    name: "cuttlefish_libicuuc",
+    shared_libs: [
+        "libicuuc",
+        "libandroidicu",
+    ],
+}
+
+cc_defaults {
+    name: "cuttlefish_health_storage",
+    defaults: ["enabled_on_q_and_later"],
+    vintf_fragments: [
+        "[email protected]",
+    ],
+}
+
+java_test_host {
+    name: "tombstone_transmit_tests",
+
+    libs: ["tradefed"],
+
+    srcs:  ["tests/src/**/TombstoneTransmitTest.java"],
+
+    test_config: "tests/tombstone-transmit-tests.xml",
+
+    test_suites: ["general-tests"],
+}
diff --git a/temp/Android.mk b/temp/Android.mk
new file mode 100644
index 0000000..f80aa86
--- /dev/null
+++ b/temp/Android.mk
@@ -0,0 +1,27 @@
+#
+# Copyright 2017 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ifneq ($(filter $(TARGET_BOARD_PLATFORM), vsoc_arm64 vsoc_x86 vsoc_x86_64),)
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/fetcher.mk
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/host_package.mk
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
+endif
diff --git a/temp/AndroidProducts.mk b/temp/AndroidProducts.mk
new file mode 100644
index 0000000..ad736c4
--- /dev/null
+++ b/temp/AndroidProducts.mk
@@ -0,0 +1,33 @@
+#
+# Copyright 2017 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+PRODUCT_MAKEFILES := \
+	aosp_cf_arm64_phone:$(LOCAL_DIR)/vsoc_arm64/phone/aosp_cf.mk \
+	aosp_cf_x86_64_phone:$(LOCAL_DIR)/vsoc_x86_64/phone/aosp_cf.mk \
+	aosp_cf_x86_auto:$(LOCAL_DIR)/vsoc_x86/auto/device.mk \
+	aosp_cf_x86_pasan:$(LOCAL_DIR)/vsoc_x86/pasan/aosp_cf.mk \
+	aosp_cf_x86_phone:$(LOCAL_DIR)/vsoc_x86/phone/aosp_cf.mk \
+	aosp_cf_x86_phone_noapex:$(LOCAL_DIR)/vsoc_x86_noapex/aosp_cf_noapex.mk \
+	aosp_cf_x86_go_phone:$(LOCAL_DIR)/vsoc_x86/go_phone/device.mk \
+	aosp_cf_x86_go_512_phone:$(LOCAL_DIR)/vsoc_x86/go_512_phone/device.mk \
+	aosp_cf_x86_tv:$(LOCAL_DIR)/vsoc_x86/tv/device.mk
+
+COMMON_LUNCH_CHOICES := \
+	aosp_cf_arm64_phone-userdebug \
+	aosp_cf_x86_64_phone-userdebug \
+	aosp_cf_x86_auto-userdebug \
+	aosp_cf_x86_phone-userdebug \
+	aosp_cf_x86_tv-userdebug
diff --git a/temp/CleanSpec.mk b/temp/CleanSpec.mk
new file mode 100644
index 0000000..b72c9d0
--- /dev/null
+++ b/temp/CleanSpec.mk
@@ -0,0 +1,59 @@
+# Copyright (C) 2007 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list.  These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list.  E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+# For example:
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
+#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
+#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
+
+# Deletes product partition directories and symlink when adding a real product partition.
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/product)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/product)
+
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/[email protected])
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/[email protected])
+
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/[email protected])
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/[email protected])
diff --git a/temp/OWNERS b/temp/OWNERS
new file mode 100644
index 0000000..9594320
--- /dev/null
+++ b/temp/OWNERS
@@ -0,0 +1,8 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
diff --git a/temp/README.md b/temp/README.md
new file mode 100644
index 0000000..531f840
--- /dev/null
+++ b/temp/README.md
@@ -0,0 +1,53 @@
+# So you want to try cuttlefish?
+
+1. Download, build, and install the host debian package:
+
+```bash
+git clone https://github.com/google/android-cuttlefish
+cd android-cuttlefish
+debuild -i -us -uc -b
+sudo dpkg -i ../cuttlefish-common_*_amd64.deb
+sudo apt-get install -f
+```
+
+2. Go to http://ci.android.com/
+3. Enter a branch name. Start with `aosp-master` if you don't know what you're
+   looking for
+4. Navigate to `aosp_cf_x86_phone` and click on `userdebug` for the latest build
+5. Click on `Artifacts`
+6. Scroll down to the OTA images. These packages look like
+   `aosp_cf_x86_phone-img-xxxxxx.zip` -- it will always have `img` in the name.
+   Download this file
+7. Scroll down to `cvd-host_package.tar.gz`. You should always download a host
+   package from the same build as your images.
+8. On your local system, combine the packages:
+
+```bash
+mkdir cf
+cd cf
+tar xvf /path/to/cvd-host_package.tar.gz
+unzip /path/to/aosp_cf_x86_phone-img-xxxxxx.zip
+```
+
+8. Launch cuttlefish with:
+
+   `$ HOME=$PWD ./bin/launch_cvd`
+
+9. Stop cuttlefish with:
+
+   `$ HOME=$PWD ./bin/stop_cvd`
+
+# So you want to debug cuttlefish?
+
+You can use `adb` to debug it, just like a physical device:
+
+   `$ ./bin/adb -e shell`
+
+# So you want to see cuttlefish?
+
+You can use the [TightVNC JViewer](https://www.tightvnc.com/download.php). Once
+you have downloaded the *TightVNC Java Viewer JAR in a ZIP archive*, run it with
+
+   `$ java -jar tightvnc-jviewer.jar -ScalingFactor=50 -Tunneling=no -host=localhost -port=6444`
+
+Click "Connect" and you should see a lock screen!
diff --git a/temp/TEST_MAPPING b/temp/TEST_MAPPING
new file mode 100644
index 0000000..0e18f48
--- /dev/null
+++ b/temp/TEST_MAPPING
@@ -0,0 +1,14 @@
+{
+  "presubmit": [
+    {
+      "name": "vts_treble_vintf_framework_test"
+    },
+    {
+      "name": "vts_treble_vintf_vendor_test"
+    },
+    {
+      "name": "hidl_implementation_test"
+    }
+  ]
+}
+
diff --git a/temp/default-permissions.xml b/temp/default-permissions.xml
new file mode 100644
index 0000000..2c1de87
--- /dev/null
+++ b/temp/default-permissions.xml
@@ -0,0 +1,127 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+
+<!-- Copyright (C) 2019 Google Inc.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!--
+    This file contains permissions to be granted by default. Default
+    permissions are granted to special platform components and to apps
+    that are approved to get default grants. The special components
+    are apps that are expected tto work out-of-the-box as they provide
+    core use cases such as default dialer, default email, etc. These
+    grants are managed by the platform. The apps that are additionally
+    approved for default grants are ones that provide carrier specific
+    functionality, ones legally required at some location, ones providing
+    alternative disclosure and opt-out UI, ones providing highlight features
+    of a dedicated device, etc. This file contains only the latter exceptions.
+    Fixed permissions cannot be controlled by the user and need a special
+    approval. Typically these are to ensure either legally mandated functions
+    or the app is considered a part of the OS.
+-->
+
+<exceptions>
+
+    <!-- This is an example of an exception:
+    <exception
+        package="foo.bar.permission"
+      <permission name="android.permission.READ_CONTACTS" fixed="true"/>
+      <permission name="android.permission.READ_CALENDAR" fixed="false"/>
+    </exception>
+    -->
+
+    <exception
+            package="com.google.android.apps.pixelmigrate">
+        <!-- External storage -->
+        <permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="false"/>
+        <permission name="android.permission.WRITE_EXTERNAL_STORAGE" fixed="false"/>
+        <!-- Contacts -->
+        <permission name="android.permission.READ_CONTACTS" fixed="false"/>
+        <permission name="android.permission.WRITE_CONTACTS" fixed="false"/>
+        <!-- Call logs -->
+        <permission name="android.permission.READ_CALL_LOG" fixed="false"/>
+        <permission name="android.permission.WRITE_CALL_LOG" fixed="false"/>
+        <!-- SMS -->
+        <permission name="android.permission.RECEIVE_SMS" fixed="false"/>
+        <permission name="android.permission.READ_PHONE_NUMBERS" fixed="false"/>
+    </exception>
+
+    <exception
+            package="com.verizon.mips.services">
+        <!-- Call -->
+        <permission name="android.permission.PROCESS_OUTGOING_CALLS" fixed="false"/>
+        <!-- Phone -->
+        <permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
+        <!-- SMS -->
+        <permission name="android.permission.RECEIVE_SMS" fixed="false"/>
+    </exception>
+
+    <exception
+            package="com.google.android.projection.gearhead"
+            sha256-cert-digest="FD:B0:0C:43:DB:DE:8B:51:CB:31:2A:A8:1D:3B:5F:A1:77:13:AD:B9:4B:28:F5:98:D7:7F:8E:B8:9D:AC:EE:DF">
+        <!-- Gearhead legacy -->
+        <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false"/>
+        <permission name="android.permission.CALL_PHONE" fixed="false"/>
+        <permission name="android.permission.READ_CALL_LOG" fixed="false"/>
+        <permission name="android.permission.READ_CONTACTS" fixed="false"/>
+        <permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
+        <permission name="android.permission.RECEIVE_SMS" fixed="false"/>
+        <permission name="android.permission.RECORD_AUDIO" fixed="false"/>
+        <permission name="android.permission.SEND_SMS" fixed="false"/>
+        <!-- For Top Gear -->
+        <permission name="android.permission.PROCESS_OUTGOING_CALLS" fixed="false"/>
+        <permission name="android.permission.READ_SMS" fixed="false"/>
+        <permission name="android.permission.RECEIVE_MMS" fixed="false"/>
+        <permission name="android.permission.WRITE_CALL_LOG" fixed="false"/>
+        <permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false"/>
+    </exception>
+
+    <exception package="com.google.android.settings.intelligence">
+        <!-- Calendar -->
+        <permission name="android.permission.READ_CALENDAR" fixed="true"/>
+        <!-- Location -->
+        <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="true"/>
+        <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="true"/>
+    </exception>
+
+    <exception package="com.google.android.cbrsnetworkmonitor">
+        <!-- Location access to create CBRS geofences-->
+        <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="true"/>
+        <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="true"/>
+    </exception>
+
+    <exception package="com.google.android.apps.scone">
+        <!-- NLP Location access to determine proximity to country border -->
+        <permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false"/>
+        <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false"/>
+        <!-- Used to call ActivityTransition API for Smart OOS & Smart PNO -->
+        <permission name="android.permission.ACTIVITY_RECOGNITION" fixed="false"/>
+    </exception>
+
+    <exception package="com.google.android.wfcactivation">
+        <!-- SMS -->
+        <permission name="android.permission.RECEIVE_WAP_PUSH" fixed="false"/>
+    </exception>
+    <exception
+        package="com.google.vr.apps.ornament"
+        sha256-cert-digest="4A:9E:3F:3B:C8:D6:0C:E4:D3:CB:E5:A9:C6:6E:EC:11:EF:D0:1C:5F:E9:C7:8D:8C:92:3B:9D:42:48:23:00:13">
+        <!-- Camera -->
+        <permission name="android.permission.CAMERA" fixed="false"/>
+        <!-- Microphone -->
+        <permission name="android.permission.RECORD_AUDIO" fixed="false"/>
+        <!-- Storage -->
+        <permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="false"/>
+        <permission name="android.permission.WRITE_EXTERNAL_STORAGE" fixed="false"/>
+    </exception>
+</exceptions>
diff --git a/temp/dtb.img b/temp/dtb.img
new file mode 100644
index 0000000..9d6cec7
--- /dev/null
+++ b/temp/dtb.img
@@ -0,0 +1 @@
+workaround
diff --git a/temp/fetcher.mk b/temp/fetcher.mk
new file mode 100644
index 0000000..e00b1df
--- /dev/null
+++ b/temp/fetcher.mk
@@ -0,0 +1,12 @@
+bin_path := $(notdir $(HOST_OUT_EXECUTABLES))
+
+fetcher_bin := $(HOST_OUT)/$(bin_path)/fetch_cvd
+
+.PHONY: host_fetcher
+host_fetcher: $(fetcher_bin)
+
+# Build this by default when a developer types make
+droidcore: $(fetcher_bin)
+
+# Build and store them on the build server.
+$(call dist-for-goals, dist_files, $(fetcher_bin))
diff --git a/temp/host_package.mk b/temp/host_package.mk
new file mode 100644
index 0000000..1eac968
--- /dev/null
+++ b/temp/host_package.mk
@@ -0,0 +1,89 @@
+LOCAL_PATH := $(call my-dir)
+
+cvd_host_package_tar := $(HOST_OUT)/cvd-host_package.tar.gz
+
+.PHONY: hosttar
+hosttar: $(cvd_host_package_tar)
+
+# Build this by default when a developer types make
+droidcore: $(cvd_host_package_tar)
+
+# Build and store them on the build server.
+$(call dist-for-goals, dist_files, $(cvd_host_package_tar))
+
+bin_path := $(notdir $(HOST_OUT_EXECUTABLES))
+lib_path := $(notdir $(HOST_OUT_SHARED_LIBRARIES))
+tests_path := $(notdir $(HOST_OUT_NATIVE_TESTS))
+
+cvd_host_executables := \
+    adb \
+    adbshell \
+    launch_cvd \
+    lpmake \
+    lpunpack \
+    socket_vsock_proxy \
+    adb_connector \
+    stop_cvd \
+    vnc_server \
+    cf_qemu.sh \
+    cf_bpttool \
+    virtual_usb_manager \
+    kernel_log_monitor \
+    extract-vmlinux \
+    crosvm \
+    aarch64-linux-gnu/crosvm \
+    aarch64-linux-gnu/libepoxy.so.0 \
+    aarch64-linux-gnu/libgbm.so.1 \
+    aarch64-linux-gnu/libminijail.so \
+    aarch64-linux-gnu/libvirglrenderer.so.0 \
+    x86_64-linux-gnu/crosvm \
+    x86_64-linux-gnu/libepoxy.so.0 \
+    x86_64-linux-gnu/libgbm.so.1 \
+    x86_64-linux-gnu/libminijail.so \
+    x86_64-linux-gnu/libvirglrenderer.so.0 \
+    logcat_receiver \
+    config_server \
+    tombstone_receiver \
+    console_forwarder \
+    assemble_cvd \
+    run_cvd \
+    cvd_status \
+
+cvd_host_tests := \
+    cuttlefish_thread_test \
+    monotonic_time_test \
+    cuttlefish_net_tests \
+
+cvd_host_shared_libraries := \
+    libbase.so \
+    libcuttlefish_fs.so \
+    libcuttlefish_utils.so \
+    cuttlefish_tcp_socket.so \
+    cuttlefish_net.so \
+    liblog.so \
+    libnl.so \
+    libc++.so \
+    liblp.so \
+    libsparse-host.so \
+    libcrypto-host.so \
+    libcrypto_utils.so \
+    libext4_utils.so \
+    libz-host.so \
+    libicuuc-host.so \
+    libicui18n-host.so \
+    libandroidicu-host.so \
+    libcuttlefish_device_config.so \
+    cdisk_spec.so \
+    libprotobuf-cpp-full.so \
+    libziparchive.so \
+
+
+cvd_host_package_files := \
+     $(addprefix $(bin_path)/,$(cvd_host_executables)) \
+     $(addprefix $(lib_path)/,$(cvd_host_shared_libraries)) \
+     $(foreach test,$(cvd_host_tests), ${tests_path}/$(test)/$(test)) \
+
+$(cvd_host_package_tar): PRIVATE_FILES := $(cvd_host_package_files)
+$(cvd_host_package_tar): $(addprefix $(HOST_OUT)/,$(cvd_host_package_files))
+	$(hide) rm -rf $@ && tar Scfz [email protected] -C $(HOST_OUT) $(PRIVATE_FILES)
+	$(hide) mv [email protected] $@
diff --git a/temp/shared/Android.mk b/temp/shared/Android.mk
new file mode 100644
index 0000000..c605e76
--- /dev/null
+++ b/temp/shared/Android.mk
@@ -0,0 +1,18 @@
+#
+# Copyright 2017 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/temp/shared/BoardConfig.mk b/temp/shared/BoardConfig.mk
new file mode 100644
index 0000000..45633e9
--- /dev/null
+++ b/temp/shared/BoardConfig.mk
@@ -0,0 +1,169 @@
+#
+# Copyright 2017 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# Common BoardConfig for all supported architectures.
+#
+
+include build/make/target/board/BoardConfigMainlineCommon.mk
+
+# Reset CF unsupported settings
+TARGET_NO_RECOVERY := false
+BOARD_USES_SYSTEM_OTHER_ODEX :=
+WITH_DEXPREOPT := true
+BOARD_AVB_ENABLE := false
+
+
+TARGET_BOOTLOADER_BOARD_NAME := cutf
+
+# Boot partition size: 32M
+# This is only used for OTA update packages. The image size on disk
+# will not change (as is it not a filesystem.)
+BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
+BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
+
+# Build a separate vendor.img partition
+BOARD_USES_VENDORIMAGE := true
+BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
+
+BOARD_USES_METADATA_PARTITION := true
+
+# Build a separate product.img partition
+BOARD_USES_PRODUCTIMAGE := true
+BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
+
+# Build a separate system_ext.img partition
+BOARD_USES_SYSTEM_EXTIMAGE := true
+BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_SYSTEM_EXT := system_ext
+
+BOARD_USES_GENERIC_AUDIO := false
+USE_CAMERA_STUB := true
+TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
+
+# Hardware composer configuration
+TARGET_USES_HWC2 := true
+
+# The compiler will occasionally generate movaps, etc.
+BOARD_MALLOC_ALIGNMENT := 16
+
+# Make the userdata partition 4.25G to accomodate ASAN and CTS
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 4563402752
+
+# Cache partition size: 64M
+BOARD_CACHEIMAGE_PARTITION_SIZE := 67108864
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
+
+BOARD_GPU_DRIVERS := virgl
+
+# Enable goldfish's encoder.
+# TODO(b/113617962) Remove this if we decide to use
+# device/generic/opengl-transport to generate the encoder
+BUILD_EMULATOR_OPENGL_DRIVER := true
+BUILD_EMULATOR_OPENGL := true
+
+# Minimum size of the final bootable disk image: 10G
+# GCE will pad disk images out to 10G. Our disk images should be at least as
+# big to avoid warnings about partition table oddities.
+BOARD_DISK_IMAGE_MINIMUM_SIZE := 10737418240
+
+BOARD_BOOTIMAGE_MAX_SIZE := 8388608
+BOARD_SYSLOADER_MAX_SIZE := 7340032
+# TODO(san): See if we can get rid of this.
+BOARD_FLASH_BLOCK_SIZE := 512
+
+USE_OPENGL_RENDERER := true
+
+# Wifi.
+BOARD_WLAN_DEVICE           := wlan0
+BOARD_HOSTAPD_DRIVER        := NL80211
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+WPA_SUPPLICANT_VERSION      := VER_0_8_X
+WIFI_DRIVER_FW_PATH_PARAM   := "/dev/null"
+WIFI_DRIVER_FW_PATH_STA     := "/dev/null"
+WIFI_DRIVER_FW_PATH_AP      := "/dev/null"
+
+BOARD_SEPOLICY_DIRS += device/google/cuttlefish/shared/sepolicy/vendor
+BOARD_SEPOLICY_DIRS += device/google/cuttlefish/shared/sepolicy/vendor/google
+PRODUCT_PRIVATE_SEPOLICY_DIRS := device/google/cuttlefish/shared/sepolicy/private
+
+VSOC_STLPORT_INCLUDES :=
+VSOC_STLPORT_LIBS :=
+VSOC_STLPORT_STATIC_LIBS :=
+VSOC_TEST_INCLUDES := external/googletest/googlemock/include external/googletest/googletest/include
+VSOC_TEST_LIBRARIES := libgmock_main_host libgtest_host libgmock_host
+VSOC_LIBCXX_STATIC := libc++_static
+VSOC_PROTOBUF_SHARED_LIB := libprotobuf-cpp-full
+
+CUTTLEFISH_LIBRIL_NAME := libril-cuttlefish-fork
+ENABLE_CUTTLEFISH_RILD := true
+
+# TODO(ender): Remove all these once we stop depending on GCE code.
+GCE_VERSION_CFLAGS := -DGCE_PLATFORM_SDK_VERSION=${PLATFORM_SDK_VERSION}
+GCE_STLPORT_INCLUDES := $(VSOC_STLPORT_INCLUDES)
+GCE_STLPORT_LIBS := $(VSOC_STLPORT_LIBS)
+GCE_STLPORT_STATIC_LIBS := $(VSOC_STLPORT_STATIC_LIBS)
+GCE_TEST_INCLUDES := $(VSOC_TEST_INCLUDES)
+GCE_TEST_LIBRARIES := $(VSOC_TEST_LIBRARIES)
+GCE_LIBCXX_STATIC := $(VSOC_LIBCXX_STATIC)
+GCE_PROTOBUF_SHARED_LIB := $(VSOC_PROTOBUF_SHARED_LIB)
+# TODO(ender): up till here.
+
+STAGEFRIGHT_AVCENC_CFLAGS := -DANDROID_GCE
+
+INIT_BOOTCHART := true
+
+# Need this so that the application's loop on reading input can be synchronized
+# with HW VSYNC
+TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := true
+
+# Settings for dhcpcd-6.8.2.
+DHCPCD_USE_IPV6 := no
+DHCPCD_USE_DBUS := no
+DHCPCD_USE_SCRIPT := yes
+
+
+TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
+
+TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab
+
+BOARD_SUPER_PARTITION_SIZE := 6442450944
+BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
+BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor product system_ext
+BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 6442450944
+BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
+BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
+TARGET_RELEASETOOLS_EXTENSIONS := device/google/cuttlefish/shared
+
+# To see full logs from init, disable ratelimiting.
+# The default is 5 messages per second amortized, with a burst of up to 10.
+BOARD_KERNEL_CMDLINE += printk.devkmsg=on
+BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/etc/
+
+BOARD_KERNEL_CMDLINE += init=/init
+BOARD_KERNEL_CMDLINE += androidboot.hardware=cutf_cvm
+BOARD_KERNEL_CMDLINE += security=selinux
+BOARD_KERNEL_CMDLINE += androidboot.console=ttyS1
+# Boot as recovery is set so normal boot needs to be forced every boot
+BOARD_KERNEL_CMDLINE += androidboot.force_normal_boot=1
+
+BOARD_INCLUDE_DTB_IN_BOOTIMG := true
+BOARD_BOOT_HEADER_VERSION := 3
+BOARD_USES_RECOVERY_AS_BOOT := true
+BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
+PRODUCT_COPY_FILES += device/google/cuttlefish/dtb.img:dtb.img
+BOARD_BUILD_SYSTEM_ROOT_IMAGE := false
+
diff --git a/temp/shared/auto/device.mk b/temp/shared/auto/device.mk
new file mode 100644
index 0000000..f16cd72
--- /dev/null
+++ b/temp/shared/auto/device.mk
@@ -0,0 +1,89 @@
+#
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+################################################
+# Begin GCE specific configurations
+
+DEVICE_MANIFEST_FILE += device/google/cuttlefish/shared/config/manifest.xml
+DEVICE_MANIFEST_FILE += device/google/cuttlefish/shared/auto/manifest.xml
+
+$(call inherit-product, device/google/cuttlefish/shared/device.mk)
+
+################################################
+# Begin general Android Auto Embedded configurations
+
+PRODUCT_COPY_FILES += \
+    packages/services/Car/car_product/init/init.bootstat.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw//init.bootstat.rc \
+    packages/services/Car/car_product/init/init.car.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw//init.car.rc
+
+# Auto core hardware permissions
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/car_core_hardware.xml:system/etc/permissions/car_core_hardware.xml \
+    frameworks/native/data/etc/android.hardware.type.automotive.xml:system/etc/permissions/android.hardware.type.automotive.xml \
+
+# Enable landscape
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.hardware.screen.landscape.xml:system/etc/permissions/android.hardware.screen.landscape.xml
+
+# Used to embed a map in an activity view
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.software.activities_on_secondary_displays.xml:system/etc/permissions/android.software.activities_on_secondary_displays.xml
+
+# Location permissions
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml
+
+# Broadcast Radio permissions
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.hardware.broadcastradio.xml:system/etc/permissions/android.hardware.broadcastradio.xml
+
+PRODUCT_PROPERTY_OVERRIDES += \
+    keyguard.no_require_sim=true \
+    ro.cdma.home.operator.alpha=Android \
+    ro.cdma.home.operator.numeric=302780 \
+    vendor.rild.libpath=libcuttlefish-ril.so \
+
+# vehicle HAL
+PRODUCT_PACKAGES += [email protected]
+
+# Broadcast Radio
+PRODUCT_PACKAGES += [email protected]
+
+# DRM HAL
+PRODUCT_PACKAGES += [email protected]
+
+# CAN bus HAL
+PRODUCT_PACKAGES += [email protected]
+PRODUCT_PACKAGES_DEBUG += canhalctrl \
+    canhaldump \
+    canhalsend
+
+# DRM Properities
+PRODUCT_PROPERTY_OVERRIDES += \
+    drm.service.enabled=true
+
+BOARD_IS_AUTOMOTIVE := true
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
+$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
+$(call inherit-product, packages/services/Car/car_product/build/car.mk)
+
+# Placed here due to b/110784510
+PRODUCT_BRAND := generic
+
+PRODUCT_ENFORCE_RRO_TARGETS := framework-res
+
+TARGET_NO_TELEPHONY := true
diff --git a/temp/shared/auto/manifest.xml b/temp/shared/auto/manifest.xml
new file mode 100644
index 0000000..a82a844
--- /dev/null
+++ b/temp/shared/auto/manifest.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** limitations under the License.
+*/
+-->
+<!-- Android Auto Embedded specific HALs-->
+<manifest version="1.0" type="device" target-level="4">
+    <hal format="hidl">
+        <name>android.hardware.automotive.audiocontrol</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IAudioControl</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- FIXME: Implement automotive.evs HAL
+    <hal format="hidl">
+        <name>android.hardware.automotive.evs</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IEvsEnumerator</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <hal format="hidl">
+        <name>android.hardware.automotive.vehicle</name>
+        <transport>hwbinder</transport>
+        <version>2.0</version>
+        <interface>
+            <name>IVehicle</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.automotive.can</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>ICanController</name>
+            <instance>socketcan</instance>
+        </interface>
+        <interface>
+            <name>ICanBus</name>
+            <instance>test</instance>
+        </interface>
+    </hal>
+    <!-- FIXME: Move this to shared manifest.xml -->
+    <hal format="hidl">
+        <name>android.hardware.broadcastradio</name>
+        <transport>hwbinder</transport>
+        <version>2.0</version>
+        <interface>
+            <name>IBroadcastRadio</name>
+            <instance>amfm</instance>
+            <instance>dab</instance>
+        </interface>
+    </hal>
+</manifest>
diff --git a/temp/shared/config/Android.mk b/temp/shared/config/Android.mk
new file mode 100644
index 0000000..1397bcc
--- /dev/null
+++ b/temp/shared/config/Android.mk
@@ -0,0 +1,37 @@
+#
+# Copyright 2017 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+# This section generates wpa_supplicant.conf using the target product name and
+# model as that file requires such build target specific fields.
+
+LOCAL_MODULE := wpa_supplicant.vsoc.conf
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/wifi
+LOCAL_MODULE_STEM := wpa_supplicant.conf
+LOCAL_MULTILIB := first
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/gen_wpa_supplicant_conf.sh
+	$(hide) echo "Generating $@"
+	$(hide) mkdir -p $(dir $@)
+	$(hide) $< "${TARGET_PRODUCT}" "${PRODUCT_MODEL}" \
+	    "${PLATFORM_SDK_VERSION}" > $@
diff --git a/temp/shared/config/CleanSpec.mk b/temp/shared/config/CleanSpec.mk
new file mode 100644
index 0000000..aa0d77d
--- /dev/null
+++ b/temp/shared/config/CleanSpec.mk
@@ -0,0 +1,49 @@
+# Copyright 2018 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list.  These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list.  E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+# For example:
+
+# Remove gps.vsoc.so and [email protected]
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib/hw/gps.vsoc.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib/hw/[email protected])
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/[email protected])
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/[email protected])
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/[email protected])
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/[email protected])
diff --git a/temp/shared/config/audio_policy.conf b/temp/shared/config/audio_policy.conf
new file mode 100644
index 0000000..2cbf118
--- /dev/null
+++ b/temp/shared/config/audio_policy.conf
@@ -0,0 +1,64 @@
+#
+# Audio policy configuration for generic device builds (cuttlefish audio HAL)
+#
+
+# Global configuration section: lists input and output devices always present on the device
+# as well as the output device selected by default.
+# Devices are designated by a string that corresponds to the enum in audio.h
+
+global_configuration {
+  attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
+  default_output_device AUDIO_DEVICE_OUT_SPEAKER
+  attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
+}
+
+# audio hardware module section: contains descriptors for all audio hw modules present on the
+# device. Each hw module node is named after the corresponding hw module library base name.
+# For instance, "primary" corresponds to audio.primary.<device>.so.
+# The "primary" module is mandatory and must include at least one output with
+# AUDIO_OUTPUT_FLAG_PRIMARY flag.
+# Each module descriptor contains one or more output profile descriptors and zero or more
+# input profile descriptors. Each profile lists all the parameters supported by a given output
+# or input stream category.
+# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
+# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
+
+audio_hw_modules {
+  primary {
+    outputs {
+      primary {
+        sampling_rates 8000|11025|16000|22050|24000|44100|48000
+        channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO
+        formats AUDIO_FORMAT_PCM_16_BIT
+        devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_WIRED_HEADSET
+        flags AUDIO_OUTPUT_FLAG_PRIMARY
+      }
+    }
+    inputs {
+      primary {
+        sampling_rates 8000|11025|16000|22050|44100|48000
+        channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
+        formats AUDIO_FORMAT_PCM_16_BIT
+        devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET
+      }
+    }
+  }
+  r_submix {
+    outputs {
+      submix {
+        sampling_rates 48000
+        channel_masks AUDIO_CHANNEL_OUT_STEREO
+        formats AUDIO_FORMAT_PCM_16_BIT
+        devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
+      }
+    }
+    inputs {
+      submix {
+        sampling_rates 48000
+        channel_masks AUDIO_CHANNEL_IN_STEREO
+        formats AUDIO_FORMAT_PCM_16_BIT
+        devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
+      }
+    }
+  }
+}
diff --git a/temp/shared/config/camera_v1.json b/temp/shared/config/camera_v1.json
new file mode 100644
index 0000000..8a2ae5b
--- /dev/null
+++ b/temp/shared/config/camera_v1.json
@@ -0,0 +1,52 @@
+{
+  "__readme": [
+    "Basic Camera HAL v1 configuration."
+  ],
+
+  "camera_definitions": [
+    {
+      "orientation": "back",
+      "hal_version": "1",
+      "resolutions": [
+        {
+          "width": "1600",
+          "height": "1200"
+        },
+        {
+          "width": "1280",
+          "height": "720"
+        },
+        {
+          "width": "640",
+          "height": "480"
+        },
+        {
+          "width": "320",
+          "height": "240"
+        }
+      ]
+    },
+    {
+      "orientation": "front",
+      "hal_version": "1",
+      "resolutions": [
+        {
+          "width": "1024",
+          "height": "768"
+        },
+        {
+          "width": "800",
+          "height": "600"
+        },
+        {
+          "width": "640",
+          "height": "480"
+        },
+        {
+          "width": "320",
+          "height": "240"
+        }
+      ]
+    }
+  ]
+}
diff --git a/temp/shared/config/camera_v3.json b/temp/shared/config/camera_v3.json
new file mode 100644
index 0000000..3479004
--- /dev/null
+++ b/temp/shared/config/camera_v3.json
@@ -0,0 +1,52 @@
+{
+  "__readme": [
+    "Basic Camera HAL v3 configuration."
+  ],
+
+  "camera_definitions": [
+    {
+      "orientation": "back",
+      "hal_version": "3",
+      "resolutions": [
+        {
+          "width": "1600",
+          "height": "1200"
+        },
+        {
+          "width": "1280",
+          "height": "720"
+        },
+        {
+          "width": "640",
+          "height": "480"
+        },
+        {
+          "width": "320",
+          "height": "240"
+        }
+      ]
+    },
+    {
+      "orientation": "front",
+      "hal_version": "3",
+      "resolutions": [
+        {
+          "width": "1024",
+          "height": "768"
+        },
+        {
+          "width": "800",
+          "height": "600"
+        },
+        {
+          "width": "640",
+          "height": "480"
+        },
+        {
+          "width": "320",
+          "height": "240"
+        }
+      ]
+    }
+  ]
+}
diff --git a/temp/shared/config/fstab b/temp/shared/config/fstab
new file mode 100644
index 0000000..1016b62
--- /dev/null
+++ b/temp/shared/config/fstab
@@ -0,0 +1,13 @@
+boot /boot emmc defaults recoveryonly
+system /system ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+# Add all non-dynamic partitions except system, after this comment
+/dev/block/by-name/userdata /data ext4 nodev,noatime,nosuid,errors=panic wait,fileencryption=aes-256-xts:aes-256-cts,fsverity
+/dev/block/by-name/metadata /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable,first_stage_mount
+/dev/block/by-name/cache /cache ext4 nodev,noatime,nosuid,errors=panic wait
+/dev/block/by-name/misc /misc emmc defaults defaults
+# Add all dynamic partitions except system, after this comment
+vendor /vendor ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+product /product ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+system_ext /system_ext ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+/dev/block/zram0 none swap defaults zramsize=75%
+/tmp /sdcard none defaults,bind recoveryonly
diff --git a/temp/shared/config/fstab.composite b/temp/shared/config/fstab.composite
new file mode 100644
index 0000000..afacfe4
--- /dev/null
+++ b/temp/shared/config/fstab.composite
@@ -0,0 +1,13 @@
+boot /boot emmc defaults recoveryonly
+system /system ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+# Add all non-dynamic partitions except system, after this comment
+/dev/block/by-name/userdata /data ext4 nodev,noatime,nosuid,errors=panic wait,fileencryption=aes-256-xts:aes-256-cts,fsverity
+/dev/block/by-name/cache /cache ext4 nodev,noatime,nosuid,errors=panic wait
+/dev/block/by-name/metadata /metadata ext4 nodev,noatime,nosuid,errors=panic wait,formattable,first_stage_mount
+/dev/block/by-name/misc /misc emmc defaults defaults
+# Add all dynamic partitions except system, after this comment
+vendor /vendor ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+product /product ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+system_ext /system_ext ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+/dev/block/zram0 none swap defaults zramsize=75%
+/tmp /sdcard none defaults,bind recoveryonly
diff --git a/temp/shared/config/gen_wpa_supplicant_conf.sh b/temp/shared/config/gen_wpa_supplicant_conf.sh
new file mode 100755
index 0000000..72ecb21
--- /dev/null
+++ b/temp/shared/config/gen_wpa_supplicant_conf.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# Generates wpa_supplicant.conf file for wifi
+# Usage: generate_wpa_supplicant_conf.sh <device name> <model name> <SDK API level>
+
+if [ -n "$3" -a "$3" -lt "21" ]
+then
+  # before mnc.
+  cat <<eof
+ctrl_interface=wlan0
+eof
+fi
+
+cat <<eof
+update_config=1
+device_name=$1
+model_name=$2
+serial_number=
+device_type=10-0050F204-5
+eof
diff --git a/temp/shared/config/init.common.rc b/temp/shared/config/init.common.rc
new file mode 100644
index 0000000..0df1f38
--- /dev/null
+++ b/temp/shared/config/init.common.rc
@@ -0,0 +1,150 @@
+on early-init
+#    loglevel 8
+    symlink /sdcard /storage/sdcard0
+    mkdir /var/run 0755 root root
+    mkdir /var/run/media 0755 media root
+    mkdir /var/run/system 0755 system root
+    mkdir /dev/gce 0750
+    chown system system /dev/gce
+
+    mount debugfs debugfs /sys/kernel/debug
+    chmod 0755 /sys/kernel/debug
+    setprop ro.sf.lcd_density ${ro.boot.lcd_density}
+    setprop ro.hardware.egl ${ro.boot.hardware.egl}
+    setprop ro.hardware.gralloc ${ro.boot.hardware.gralloc}
+    setprop ro.hardware.hwcomposer ${ro.boot.hardware.hwcomposer}
+    setprop ro.hardware.vulkan ${ro.boot.hardware.vulkan}
+
+    # start module load in the background
+    start vendor.insmod_sh
+
+on init
+    # ZRAM setup
+    write /sys/block/zram0/comp_algorithm lz4
+
+
+on fs
+    mount_all /vendor/etc/fstab.${ro.hardware}
+    restorecon_recursive /vendor
+
+    start setup_wifi
+    # works around framework netiface enumeration issue
+    start rename_eth1
+
+
+    # TODO(ender): Find better way to talk to serial port.
+    chmod 622 /dev/kmsg
+
+    # for GCE camera HAL
+    mkdir /var/media 0770 audio media
+
+    chmod 0664 /sys/kernel/debug/ieee80211/phy1/hwsim/group
+    chmod 0664 /sys/kernel/debug/ieee80211/phy1/hwsim/ps
+    chmod 0664 /sys/kernel/debug/ieee80211/phy0/rc/fixed_rate_idx
+    chmod 0664 /sys/kernel/debug/ieee80211/phy0/hwsim/group
+    chmod 0664 /sys/kernel/debug/ieee80211/phy0/hwsim/ps
+    chmod 0664 /sys/kernel/debug/ieee80211/phy1/rc/fixed_rate_idx
+
+
+on post-fs
+    # set RLIMIT_MEMLOCK to 64MB
+    setrlimit 8 67108864 67108864
+
+
+on post-fs-data
+    start vport_trigger
+
+
+on late-fs
+    write /dev/kmsg "GUEST_BUILD_FINGERPRINT: ${ro.build.fingerprint}"
+
+
+on boot
+    chmod 0660 /dev/cpuctl
+    mkdir /data/vendor/wifi 0770 wifi wifi
+    mkdir /data/vendor/wifi/wpa 0770 wifi wifi
+    mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
+    start socket_vsock_proxy
+
+
+service setup_wifi /vendor/bin/setup_wifi
+    oneshot
+
+
+service rename_eth1 /vendor/bin/rename_netiface eth1 rmnet0
+    oneshot
+
+
+on property:sys.boot_completed=1
+    trigger sys-boot-completed-set
+
+
+# We want one opportunity per boot to enable zram, so we
+# use a trigger we fire from the above stanza. If
+# persist.sys.zram_enabled becomes true after boot,
+# we don't want to run swapon_all at that time.
+on sys-boot-completed-set && property:persist.sys.zram_enabled=1
+    swapon_all /vendor/etc/${ro.boot.fstab_name}.${ro.hardware}
+
+service vendor.insmod_sh /vendor/bin/init.insmod.sh
+    class main
+    user root
+    group root system
+    disabled
+    oneshot
+
+service socket_vsock_proxy /vendor/bin/socket_vsock_proxy -tcp_port=5555 -vsock_port=6520
+
+
+service vport_trigger /vendor/bin/vport_trigger
+    oneshot
+
+
+on property:vendor.ser.cf-logcat=*
+    symlink ${vendor.ser.cf-logcat} /dev/cf-logcat
+    enable seriallogging
+
+
+service seriallogging /system/bin/logcat -b all -v threadtime -f /dev/cf-logcat *:V
+    class main
+    user root
+    disabled
+
+
+on property:ro.boot.vsock_logcat_port=*
+   enable vsock_logcat
+
+
+service vsock_logcat /vendor/bin/vsock_logcat
+    class main
+    user root
+    disabled
+
+service vsoc_input_service /vendor/bin/vsoc_input_service -touch_port=${ro.boot.vsock_touch_port} -keyboard_port=${ro.boot.vsock_keyboard_port}
+    group root uhid
+    disabled
+
+on early-boot && property:ro.boot.vsock_touch_port=*
+   enable vsoc_input_service
+   start vsoc_input_service
+
+on early-boot && property:ro.boot.vsock_keyboard_port=*
+   enable vsoc_input_service
+   start vsoc_input_service
+
+service wpa_supplicant /vendor/bin/hw/wpa_supplicant -g@android:wpa_wlan0
+    interface [email protected]::ISupplicant default
+    interface [email protected]::ISupplicant default
+    interface [email protected]::ISupplicant default
+    interface [email protected]::ISupplicant default
+    socket wpa_wlan0 dgram 660 wifi wifi
+    group system wifi inet
+    disabled
+    oneshot
+
+
+service bugreport /system/bin/dumpstate -d -p -z
+    class main
+    disabled
+    oneshot
+    keycodes 30 48
diff --git a/temp/shared/config/init.cutf_cvm.rc b/temp/shared/config/init.cutf_cvm.rc
new file mode 100644
index 0000000..3596d0a
--- /dev/null
+++ b/temp/shared/config/init.cutf_cvm.rc
@@ -0,0 +1,7 @@
+# This file should contain entries specific to crosvm only, for common entries
+# use common file instead.
+import /vendor/etc/init/hw/init.common.rc
+
+# TODO add crosvm specific stuff here
+# logcat and kernel logs on vsockets instead of serial port would be good
+# examples
\ No newline at end of file
diff --git a/temp/shared/config/init.hardware.usb.rc b/temp/shared/config/init.hardware.usb.rc
new file mode 100644
index 0000000..df180dc
--- /dev/null
+++ b/temp/shared/config/init.hardware.usb.rc
@@ -0,0 +1,103 @@
+#
+# Copyright (C) 2017 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+on boot
+    mkdir /config/usb_gadget/g1 0770 shell shell
+    mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell
+    write /config/usb_gadget/g1/bcdUSB 0x0200
+    write /config/usb_gadget/g1/idVendor 0x18d1
+    write /config/usb_gadget/g1/bcdDevice 0x0440
+    write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+    write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+    write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+    mkdir /config/usb_gadget/g1/functions/mass_storage.0
+    mkdir /config/usb_gadget/g1/functions/accessory.gs2
+    mkdir /config/usb_gadget/g1/functions/audio_source.gs3
+    mkdir /config/usb_gadget/g1/functions/midi.gs5
+    mkdir /config/usb_gadget/g1/functions/ffs.adb
+    mkdir /config/usb_gadget/g1/functions/ffs.mtp
+    mkdir /config/usb_gadget/g1/functions/ffs.ptp
+    mkdir /config/usb_gadget/g1/functions/diag.diag
+    mkdir /config/usb_gadget/g1/functions/cser.dun.0
+    mkdir /config/usb_gadget/g1/functions/cser.nmea.1
+    mkdir /config/usb_gadget/g1/functions/gsi.rmnet
+    mkdir /config/usb_gadget/g1/functions/gsi.rndis
+    mkdir /config/usb_gadget/g1/functions/qdss.qdss
+    mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell
+    mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
+    write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+    mkdir /dev/usb-ffs 0775 shell shell
+    mkdir /dev/usb-ffs/adb 0770 shell shell
+    mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+    mkdir /dev/usb-ffs/mtp 0770 mtp mtp
+    mkdir /dev/usb-ffs/ptp 0770 mtp mtp
+    mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
+    mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
+    setprop sys.usb.mtp.device_type 3
+    setprop sys.usb.configfs 1
+    setprop sys.usb.controller "dummy_udc.0"
+    write /sys/module/libcomposite/parameters/disable_l1_for_hs "y"
+
+on property:sys.usb.config=mtp && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee1
+    symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee2
+    symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
+
+on property:sys.usb.config=rndis && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee3
+    symlink /config/usb_gadget/g1/functions/gsi.rndis /config/usb_gadget/g1/configs/b.1/f1
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee4
+    symlink /config/usb_gadget/g1/functions/gsi.rndis /config/usb_gadget/g1/configs/b.1/f1
+
+on property:sys.usb.config=ptp && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee5
+    symlink /config/usb_gadget/g1/functions/ffs.ptp /config/usb_gadget/g1/configs/b.1/f1
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee6
+    symlink /config/usb_gadget/g1/functions/ffs.ptp /config/usb_gadget/g1/configs/b.1/f1
+
+on property:sys.usb.config=adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee7
+
+on property:sys.usb.config=midi && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee8
+
+on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee9
+
+on property:sys.usb.config=accessory && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x2d00
+
+on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x2d01
+
+on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x2d02
+
+on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x2d03
+
+on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x2d04
+
+on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x2d05
diff --git a/temp/shared/config/init.insmod.sh b/temp/shared/config/init.insmod.sh
new file mode 100755
index 0000000..ccbf716
--- /dev/null
+++ b/temp/shared/config/init.insmod.sh
@@ -0,0 +1,49 @@
+#!/vendor/bin/sh
+
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+KERNEL_VERSION_NUMBER=`uname -r`
+MAINLINE_STR='mainline'
+if [[ $KERNEL_VERSION_NUMBER == *$MAINLINE_STR* ]]; then
+    IS_MAINLINE=1
+else
+    IS_MAINLINE=0
+fi
+
+KERNEL_VERSION_NUMBER=`echo $KERNEL_VERSION_NUMBER | grep -o -E '^[0-9]+\.[0-9]+'`
+# This folder on cuttlefish contains modules for multiple kernel versions.
+# Hence the need to filter them instead of relying on module.order
+VENDOR_MODULES='/vendor/lib/modules/*.ko'
+
+for f in $VENDOR_MODULES
+do
+    MOD_VERSION=`modinfo $f`
+    MOD_VERSION=`echo $MOD_VERSION | grep -o -E 'vermagic: [0-9a-zA-Z\.-]+'`
+    MOD_VERSION_NUMBER=`echo $MOD_VERSION | grep -o -E '[0-9]+\.[0-9]+'`
+    if [[ $MOD_VERSION == *$MAINLINE_STR* ]]; then
+        IS_MOD_MAINLINE=1
+    else
+        IS_MOD_MAINLINE=0
+    fi
+
+    # TODO (137683279) When we have a few more kernel modules, we'll have to do the module
+    # insertion of least dependencies.
+    if [ $IS_MOD_MAINLINE -eq $IS_MAINLINE ] && [ $MOD_VERSION_NUMBER == $KERNEL_VERSION_NUMBER ]
+    then
+        `insmod $f`
+        echo "Insmod " $f
+    fi
+done
diff --git a/temp/shared/config/init.product.rc b/temp/shared/config/init.product.rc
new file mode 100644
index 0000000..fe7130c
--- /dev/null
+++ b/temp/shared/config/init.product.rc
@@ -0,0 +1,19 @@
+on early-init
+    setprop ro.setupwizard.mode ${ro.boot.setupwizard_mode}
+
+on property:ro.boot.tombstone_transmit=1
+    enable tombstone_transmit
+
+
+service tombstone_transmit /product/bin/tombstone_transmit
+    # Start tombstone_transmit after /data is mounted.
+    class late_start
+    group system
+    user root
+    disabled
+
+# TODO: disable this service once cuttlefish implements system suspend
+service suspend_blocker /product/bin/suspend_blocker
+    class main
+    group system
+    user root
diff --git a/temp/shared/config/init.recovery.common.rc b/temp/shared/config/init.recovery.common.rc
new file mode 100644
index 0000000..6f9ca141
--- /dev/null
+++ b/temp/shared/config/init.recovery.common.rc
@@ -0,0 +1,11 @@
+service console /system/bin/sh
+    class core
+    console
+    disabled
+    user root
+    group shell log readproc
+    seclabel u:r:shell:s0
+    setenv HOSTNAME console
+
+on property:ro.debuggable=1
+    start console
diff --git a/temp/shared/config/init.recovery.cutf_cvm.rc b/temp/shared/config/init.recovery.cutf_cvm.rc
new file mode 100644
index 0000000..0da79f0
--- /dev/null
+++ b/temp/shared/config/init.recovery.cutf_cvm.rc
@@ -0,0 +1,3 @@
+# This file should contain entries specific to crosvm only, for common entries
+# use common file instead.
+import /init.recovery.common.rc
diff --git a/temp/shared/config/init.recovery.cutf_ivsh.rc b/temp/shared/config/init.recovery.cutf_ivsh.rc
new file mode 100644
index 0000000..de48973
--- /dev/null
+++ b/temp/shared/config/init.recovery.cutf_ivsh.rc
@@ -0,0 +1,3 @@
+# This file should contain entries specific to the vsoc hardware only, for
+# common entries use common file instead.
+import /init.recovery.common.rc
diff --git a/temp/shared/config/manifest.xml b/temp/shared/config/manifest.xml
new file mode 100644
index 0000000..a0ea2d4
--- /dev/null
+++ b/temp/shared/config/manifest.xml
@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<manifest version="1.0" type="device" target-level="4">
+    <hal format="hidl">
+        <name>android.hardware.audio</name>
+        <transport>hwbinder</transport>
+        <version>5.0</version>
+        <interface>
+            <name>IDevicesFactory</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.audio.effect</name>
+        <transport>hwbinder</transport>
+        <version>5.0</version>
+        <interface>
+            <name>IEffectsFactory</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.authsecret</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IAuthSecret</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130076570):
+    <hal format="hidl">
+        <name>android.hardware.biometrics.face</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IBiometricsFace</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130079316):
+    <hal format="hidl">
+        <name>android.hardware.biometrics.fingerprint</name>
+        <transport>hwbinder</transport>
+        <version>2.1</version>
+        <interface>
+            <name>IBiometricsFingerprint</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <hal format="hidl">
+        <name>android.hardware.bluetooth</name>
+        <transport>hwbinder</transport>
+        <version>1.1</version>
+        <interface>
+            <name>IBluetoothHci</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.bluetooth.audio</name>
+        <transport>hwbinder</transport>
+        <version>2.0</version>
+        <interface>
+            <name>IBluetoothAudioProvidersFactory</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130078384): -->
+    <hal format="hidl">
+        <name>android.hardware.camera.provider</name>
+        <transport>hwbinder</transport>
+        <impl level="generic"></impl>
+        <version>2.4</version>
+        <interface>
+            <name>ICameraProvider</name>
+            <instance>internal/0</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.configstore</name>
+        <transport>hwbinder</transport>
+        <version>1.1</version>
+        <interface>
+            <name>ISurfaceFlingerConfigs</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130078386):
+    <hal format="hidl">
+        <name>android.hardware.confirmationui</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IConfirmationUI</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130077250):
+    <hal format="hidl">
+        <name>android.hardware.contexthub</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IContexthub</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <hal format="hidl">
+        <name>android.hardware.drm</name>
+        <transport>hwbinder</transport>
+        <fqname>@1.0::ICryptoFactory/default</fqname>
+        <fqname>@1.0::IDrmFactory/default</fqname>
+        <fqname>@1.2::ICryptoFactory/clearkey</fqname>
+        <fqname>@1.2::IDrmFactory/clearkey</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.dumpstate</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IDumpstateDevice</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130074193): -->
+    <hal format="hidl">
+        <name>android.hardware.graphics.allocator</name>
+        <transport>hwbinder</transport>
+        <version>2.0</version>
+        <interface>
+            <name>IAllocator</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130079341): -->
+    <hal format="hidl">
+        <name>android.hardware.graphics.composer</name>
+        <transport>hwbinder</transport>
+        <version>2.2</version>
+        <interface>
+            <name>IComposer</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130076969): -->
+    <hal format="hidl">
+        <name>android.hardware.graphics.mapper</name>
+        <transport arch="32+64">passthrough</transport>
+        <version>2.1</version>
+        <interface>
+            <name>IMapper</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130075874):
+    <hal format="hidl">
+        <name>android.hardware.ir</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IConsumerIr</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <hal format="hidl">
+        <name>android.hardware.keymaster</name>
+        <transport>hwbinder</transport>
+        <version>4.1</version>
+        <interface>
+            <name>IKeymasterDevice</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.light</name>
+        <transport>hwbinder</transport>
+        <version>2.0</version>
+        <interface>
+            <name>ILight</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.media.omx</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IOmx</name>
+            <instance>default</instance>
+        </interface>
+        <interface>
+            <name>IOmxStore</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130079342):
+    <hal format="hidl">
+        <name>android.hardware.memtrack</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IMemtrack</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130080415):
+    <hal format="hidl">
+        <name>android.hardware.nfc</name>
+        <transport>hwbinder</transport>
+        <version>1.1</version>
+        <interface>
+            <name>INfc</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130079343):
+    <hal format="hidl">
+        <name>android.hardware.oemlock</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IOemLock</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130079218): -->
+    <hal format="hidl">
+        <name>android.hardware.power</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IPower</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.radio</name>
+        <transport>hwbinder</transport>
+        <version>1.5</version>
+        <interface>
+            <name>IRadio</name>
+            <instance>slot1</instance>
+            <!-- cuttlefish doesn't support SIM slot 2/3 -->
+        </interface>
+        <!-- TODO (b/130079344):
+        <interface>
+            <name>ISap</name>
+            <instance>slot1</instance>
+        </interface>
+        -->
+    </hal>
+    <!-- TODO (b/130079239):
+    <hal format="hidl">
+        <name>android.hardware.secure_element</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>ISecureElement</name>
+            <instance>eSE1</instance>
+        </interface>
+    </hal>
+    -->
+    <hal format="hidl">
+        <name>android.hardware.soundtrigger</name>
+        <transport>hwbinder</transport>
+        <version>2.0</version>
+        <interface>
+            <name>ISoundTriggerHw</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130079321):
+    <hal format="hidl">
+        <name>android.hardware.tetheroffload.config</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IOffloadConfig</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130080416):
+    <hal format="hidl">
+        <name>android.hardware.tetheroffload.control</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IOffloadControl</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <hal format="hidl">
+        <name>android.hardware.usb</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IUsb</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <!-- TODO (b/130076572):
+    <hal format="hidl">
+        <name>android.hardware.usb.gadget</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IUsbGadget</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130079219):
+    <hal format="hidl">
+        <name>android.hardware.vr</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IVr</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130079240):
+    <hal format="hidl">
+        <name>android.hardware.weaver</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IWeaver</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130079638):
+    <hal format="hidl">
+        <name>android.hardware.wifi</name>
+        <transport>hwbinder</transport>
+        <version>1.3</version>
+        <interface>
+            <name>IWifi</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130079936):
+    <hal format="hidl">
+        <name>android.hardware.wifi.hostapd</name>
+        <transport>hwbinder</transport>
+        <version>1.1</version>
+        <interface>
+            <name>IHostapd</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- TODO (b/130080335):
+    <hal format="hidl">
+        <name>android.hardware.wifi.offload</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IOffload</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+</manifest>
diff --git a/temp/shared/config/media_codecs.xml b/temp/shared/config/media_codecs.xml
new file mode 100644
index 0000000..b6088e8
--- /dev/null
+++ b/temp/shared/config/media_codecs.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+    <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+    <MediaCodec name="OMX.foo.bar" >
+        <Type name="something/interesting" />
+        <Type name="something/else" />
+        ...
+        <Quirk name="requires-allocate-on-input-ports" />
+        <Quirk name="requires-allocate-on-output-ports" />
+        <Quirk name="output-buffers-are-unreadable" />
+    </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+    must be advertised if the component does not properly support specification
+    of input buffers using the OMX_UseBuffer(...) API but instead requires
+    OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+    must be advertised if the component does not properly support specification
+    of output buffers using the OMX_UseBuffer(...) API but instead requires
+    OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+    must be advertised if the emitted output buffers of a decoder component
+    are not readable, i.e. use a custom format even though abusing one of
+    the official OMX colorspace constants.
+    Clients of such decoders will not be able to access the decoded data,
+    naturally making the component much less useful. The only use for
+    a component with this quirk is to render the output to the screen.
+    Audio decoders MUST NOT advertise this quirk.
+    Video decoders that advertise this quirk must be accompanied by a
+    corresponding color space converter for thumbnail extraction,
+    matching surfaceflinger support that can render the custom format to
+    a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+-->
+
+<MediaCodecs>
+    <Settings>
+        <Setting name="max-video-encoder-input-buffers" value="12" />
+    </Settings>
+
+    <Include href="media_codecs_google_audio.xml" />
+    <Include href="media_codecs_google_telephony.xml" />
+    <Include href="media_codecs_google_video.xml" />
+</MediaCodecs>
diff --git a/temp/shared/config/media_codecs_google_video.xml b/temp/shared/config/media_codecs_google_video.xml
new file mode 100644
index 0000000..1dbd13d
--- /dev/null
+++ b/temp/shared/config/media_codecs_google_video.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<Included>
+    <Decoders>
+        <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es">
+            <!-- profiles and levels:  ProfileSimple : Level3 -->
+            <Limit name="size" min="2x2" max="352x288" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" range="12-11880" />
+            <Limit name="bitrate" range="1-384000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp">
+            <!-- profiles and levels:  ProfileBaseline : Level30, ProfileBaseline : Level45
+                    ProfileISWV2 : Level30, ProfileISWV2 : Level45 -->
+            <Limit name="size" min="2x2" max="352x288" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="bitrate" range="1-384000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.h264.decoder" type="video/avc">
+            <!-- profiles and levels:  ProfileHigh : Level41 -->
+            <Limit name="size" min="16x16" max="1920x1088" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" range="1-244800" />
+            <Limit name="bitrate" range="1-12000000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc">
+            <!-- profiles and levels:  ProfileMain : MainTierLevel51 -->
+            <Limit name="size" min="2x2" max="2048x2048" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="8x8" />
+            <Limit name="block-count" range="1-139264" />
+            <Limit name="blocks-per-second" range="1-2000000" />
+            <Limit name="bitrate" range="1-10000000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8">
+            <Limit name="size" min="2x2" max="2048x2048" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" range="1-1000000" />
+            <Limit name="bitrate" range="1-40000000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9">
+            <Limit name="size" min="2x2" max="2048x2048" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" range="1-500000" />
+            <Limit name="bitrate" range="1-40000000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+    </Decoders>
+
+    <Encoders>
+        <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp">
+            <!-- profiles and levels:  ProfileBaseline : Level45 -->
+            <Limit name="size" min="176x144" max="176x144" />
+            <Limit name="alignment" value="16x16" />
+            <Limit name="bitrate" range="1-128000" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.h264.encoder" type="video/avc">
+            <!-- profiles and levels:  ProfileBaseline : Level41 -->
+            <Limit name="size" min="16x16" max="1920x1088" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" range="1-244800" />
+            <!-- Changed range from 12000000 to 20000000 for b/31648354 -->
+            <Limit name="bitrate" range="1-20000000" />
+            <Feature name="intra-refresh" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es">
+            <!-- profiles and levels:  ProfileCore : Level2 -->
+            <Limit name="size" min="16x16" max="176x144" />
+            <Limit name="alignment" value="16x16" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" range="12-1485" />
+            <Limit name="bitrate" range="1-64000" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8">
+            <!-- profiles and levels:  ProfileMain : Level_Version0-3 -->
+            <Limit name="size" min="2x2" max="2048x2048" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="bitrate" range="1-40000000" />
+            <Feature name="bitrate-modes" value="VBR,CBR" />
+        </MediaCodec>
+    </Encoders>
+</Included>
diff --git a/temp/shared/config/media_codecs_performance.xml b/temp/shared/config/media_codecs_performance.xml
new file mode 100644
index 0000000..0880224
--- /dev/null
+++ b/temp/shared/config/media_codecs_performance.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- The 'range' values below are based on tests run 2016-04-13 on Ubuntu 14.04
+     x86-64, Xeon 2.8 GHz x 10
+
+     The range values are set to (meas / sqrt(tolerance)) and
+     (meas * sqrt(tolerance)).
+     These values maximize the 'success' window for the tests performed in
+     cts/libs/deviceutil/src/android/cts/util/MediaUtils.java.
+     That file defines 'tolerance' as sqrt(12.1).
+
+     Where multiple results were obtained, the geometric mean was used.
+
+        OMX.google.h264.encoder  video/avc            320x 240 measured 1294.2
+        OMX.google.h264.decoder  video/avc            320x 240 measured 7204.1, 9151.4
+
+        OMX.google.h263.encoder  video/3gpp           176x 144 measured 2127.0
+        OMX.google.h263.decoder  video/3gpp           176x 144 measured 7574.0
+
+        OMX.google.mpeg4.encoder video/mp4v-es        176x 144 measured 2783.8
+        OMX.google.mpeg4.decoder video/mp4v-es        176x 144 measured 6954.2
+
+        OMX.google.vp8.encoder   video/x-vnd.on2.vp8 1280x 720 measured  195.0
+        OMX.google.vp8.encoder   video/x-vnd.on2.vp8 1920x1080 measured   93.3,   91.1
+        OMX.google.vp8.decoder   video/x-vnd.on2.vp8 1280x 720 measured 1196.1, 1211.3
+        OMX.google.vp8.decoder   video/x-vnd.on2.vp8 1920x1080 measured  483.7,  497.6
+-->
+
+<MediaCodecs>
+    <Encoders>
+        <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
+            <!-- 3 runs, min 849 max 1008 gmean 943 -->
+            <Limit name="measured-frame-rate-176x144" range="849-1008" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
+            <!-- 3 runs, min 496 max 629 gmean 565 -->
+            <Limit name="measured-frame-rate-320x240" range="496-629" />
+            <!-- 2 runs, min 197 max 203 gmean 201 -->
+            <Limit name="measured-frame-rate-720x480" range="197-203" />
+            <!-- 2 runs, min 93 max 97 gmean 95 -->
+            <Limit name="measured-frame-rate-1280x720" range="93-97" />
+            <!-- 2 runs, min 45 max 47 gmean 46 -->
+            <Limit name="measured-frame-rate-1920x1080" range="45-47" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
+            <!-- 3 runs, min 881 max 1142 gmean 994 -->
+            <Limit name="measured-frame-rate-176x144" range="881-1142" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+            <!-- 3 runs, min 249 max 285 gmean 264 -->
+            <Limit name="measured-frame-rate-320x180" range="249-285" />
+            <!-- 3 runs, min 104 max 115 gmean 109 -->
+            <Limit name="measured-frame-rate-640x360" range="104-115" />
+            <!-- 3 runs, min 34 max 35 gmean 34 -->
+            <Limit name="measured-frame-rate-1280x720" range="34-35" />
+            <!-- 3 runs, min 26 max 29 gmean 27 -->
+            <Limit name="measured-frame-rate-1920x1080" range="26-29" />
+        </MediaCodec>
+    </Encoders>
+    <Decoders>
+        <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
+            <!-- 3 runs, min 1246 max 1390 gmean 1342 -->
+            <Limit name="measured-frame-rate-176x144" range="1246-1390" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
+            <!-- 5 runs, min 299 max 629 gmean 567 -->
+            <Limit name="measured-frame-rate-320x240" range="299-629" />
+            <!-- 4 runs, min 215 max 250 gmean 232 -->
+            <Limit name="measured-frame-rate-720x480" range="215-250" />
+            <!-- 4 runs, min 75 max 85 gmean 78 -->
+            <Limit name="measured-frame-rate-1280x720" range="75-85" />
+            <!-- 4 runs, min 31 max 34 gmean 33 -->
+            <Limit name="measured-frame-rate-1920x1080" range="31-34" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
+            <!-- 4 runs, min 754 max 817 gmean 775 -->
+            <Limit name="measured-frame-rate-352x288" range="754-817" />
+            <!-- 4 runs, min 323 max 394 gmean 373 -->
+            <Limit name="measured-frame-rate-640x360" range="323-394" />
+            <!-- 4 runs, min 349 max 372 gmean 358 -->
+            <Limit name="measured-frame-rate-720x480" range="349-372" />
+            <!-- 4 runs, min 144 max 157 gmean 151 -->
+            <Limit name="measured-frame-rate-1280x720" range="144-157" />
+            <!-- 4 runs, min 74 max 85 gmean 80 -->
+            <Limit name="measured-frame-rate-1920x1080" range="74-85" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" update="true">
+            <!-- 4 runs, min 1439 max 1625 gmean 1523 -->
+            <Limit name="measured-frame-rate-176x144" range="1439-1625" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+            <!-- 3 runs, min 1129 max 1261 gmean 1190 -->
+            <Limit name="measured-frame-rate-320x180" range="1129-1261" />
+            <!-- 3 runs, min 471 max 525 gmean 504 -->
+            <Limit name="measured-frame-rate-640x360" range="471-525" />
+            <!-- 3 runs, min 126 max 145 gmean 132 -->
+            <Limit name="measured-frame-rate-1280x720" range="126-145" />
+            <!-- 3 runs, min 48 max 51 gmean 49 -->
+            <Limit name="measured-frame-rate-1920x1080" range="48-51" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+            <!-- 2 runs, min 968 max 1101 gmean 1044 -->
+            <Limit name="measured-frame-rate-320x180" range="968-1101" />
+            <!-- 3 runs, min 291 max 338 gmean 319 -->
+            <Limit name="measured-frame-rate-640x360" range="291-338" />
+            <!-- Those values are from buildbots -->
+            <Limit name="measured-frame-rate-1280x720" range="280-400" />
+            <!-- Buildbot gets ~180 if it is in the first run, ~230 if it is the second run -->
+            <Limit name="measured-frame-rate-1920x1080" range="178-240" />
+        </MediaCodec>
+    </Decoders>
+</MediaCodecs>
diff --git a/temp/shared/config/media_profiles.xml b/temp/shared/config/media_profiles.xml
new file mode 100644
index 0000000..3b23818
--- /dev/null
+++ b/temp/shared/config/media_profiles.xml
@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<!DOCTYPE MediaSettings [
+<!ELEMENT MediaSettings (CamcorderProfiles,
+                         EncoderOutputFileFormat+,
+                         VideoEncoderCap+,
+                         AudioEncoderCap+,
+                         VideoDecoderCap,
+                         AudioDecoderCap)>
+<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
+<!ELEMENT EncoderProfile (Video, Audio)>
+<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
+<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
+<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
+<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
+<!ELEMENT Video EMPTY>
+<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
+<!ATTLIST Video bitRate CDATA #REQUIRED>
+<!ATTLIST Video width CDATA #REQUIRED>
+<!ATTLIST Video height CDATA #REQUIRED>
+<!ATTLIST Video frameRate CDATA #REQUIRED>
+<!ELEMENT Audio EMPTY>
+<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
+<!ATTLIST Audio bitRate CDATA #REQUIRED>
+<!ATTLIST Audio sampleRate CDATA #REQUIRED>
+<!ATTLIST Audio channels (1|2) #REQUIRED>
+<!ELEMENT ImageEncoding EMPTY>
+<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
+<!ELEMENT ImageDecoding EMPTY>
+<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
+<!ELEMENT Camera EMPTY>
+<!ELEMENT EncoderOutputFileFormat EMPTY>
+<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
+<!ELEMENT VideoEncoderCap EMPTY>
+<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
+<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
+<!ELEMENT AudioEncoderCap EMPTY>
+<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
+<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
+<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
+<!ELEMENT VideoDecoderCap EMPTY>
+<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
+<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
+<!ELEMENT AudioDecoderCap EMPTY>
+<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
+<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
+]>
+<!--
+     This file is used to declare the multimedia profiles and capabilities
+     on an android-powered device.
+-->
+<MediaSettings>
+    <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+    <CamcorderProfiles cameraId="0">
+        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+            <Video codec="h264"
+                   bitRate="128000"
+                   width="320"
+                   height="240"
+                   frameRate="30" />
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="720p " fileFormat="mp4" duration="60">
+            <Video codec="h264"
+                   bitRate="12000000"
+                   width="1280"
+                   height="720"
+                   frameRate="30" />
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+            <Video codec="h264"
+                   bitRate="192000"
+                   width="176"
+                   height="144"
+                   frameRate="30" />
+            <!-- audio setting is ignored -->
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="95" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="70" />
+        <ImageDecoding memCap="20000000" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="1">
+
+        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+            <Video codec="h264"
+                   bitRate="128000"
+                   width="320"
+                   height="240"
+                   frameRate="30" />
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="720p" fileFormat="mp4" duration="60">
+            <Video codec="h264"
+                   bitRate="12000000"
+                   width="1280"
+                   height="720"
+                   frameRate="30" />
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+            <Video codec="h264"
+                   bitRate="192000"
+                   width="176"
+                   height="144"
+                   frameRate="30" />
+            <!-- audio setting is ignored -->
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="95" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="70" />
+        <ImageDecoding memCap="20000000" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="2">
+
+        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+            <Video codec="m4v"
+                   bitRate="128000"
+                   width="320"
+                   height="240"
+                   frameRate="15" />
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+            <Video codec="h264"
+                   bitRate="192000"
+                   width="176"
+                   height="144"
+                   frameRate="30" />
+            <!-- audio setting is ignored -->
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="95" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="70" />
+        <ImageDecoding memCap="20000000" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="3">
+
+        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+            <Video codec="m4v"
+                   bitRate="128000"
+                   width="320"
+                   height="240"
+                   frameRate="15" />
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+            <Video codec="h264"
+                   bitRate="192000"
+                   width="176"
+                   height="144"
+                   frameRate="30" />
+            <!-- audio setting is ignored -->
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="95" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="70" />
+        <ImageDecoding memCap="20000000" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="4">
+
+        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+            <Video codec="m4v"
+                   bitRate="128000"
+                   width="320"
+                   height="240"
+                   frameRate="15" />
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+            <Video codec="h264"
+                   bitRate="192000"
+                   width="176"
+                   height="144"
+                   frameRate="30" />
+            <!-- audio setting is ignored -->
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="95" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="70" />
+        <ImageDecoding memCap="20000000" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="5">
+
+        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+            <Video codec="m4v"
+                   bitRate="128000"
+                   width="320"
+                   height="240"
+                   frameRate="15" />
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+            <Video codec="h264"
+                   bitRate="192000"
+                   width="176"
+                   height="144"
+                   frameRate="30" />
+            <!-- audio setting is ignored -->
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="95" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="70" />
+        <ImageDecoding memCap="20000000" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="6">
+
+        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+            <Video codec="m4v"
+                   bitRate="128000"
+                   width="320"
+                   height="240"
+                   frameRate="15" />
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+            <Video codec="h264"
+                   bitRate="192000"
+                   width="176"
+                   height="144"
+                   frameRate="30" />
+            <!-- audio setting is ignored -->
+            <Audio codec="amrnb"
+                   bitRate="12200"
+                   sampleRate="8000"
+                   channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="95" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="70" />
+        <ImageDecoding memCap="20000000" />
+
+    </CamcorderProfiles>
+
+    <EncoderOutputFileFormat name="3gp" />
+    <EncoderOutputFileFormat name="mp4" />
+
+    <!--
+         If a codec is not enabled, it is invisible to the applications
+         In other words, the applications won't be able to use the codec
+         or query the capabilities of the codec at all if it is disabled
+    -->
+    <VideoEncoderCap name="h264" enabled="true"
+        minBitRate="64000" maxBitRate="12000000"
+        minFrameWidth="176" maxFrameWidth="1280"
+        minFrameHeight="144" maxFrameHeight="720"
+        minFrameRate="15" maxFrameRate="30" />
+
+    <VideoEncoderCap name="h263" enabled="true"
+        minBitRate="64000" maxBitRate="12000000"
+        minFrameWidth="176" maxFrameWidth="1280"
+        minFrameHeight="144" maxFrameHeight="720"
+        minFrameRate="15" maxFrameRate="30" />
+
+    <VideoEncoderCap name="m4v" enabled="true"
+        minBitRate="64000" maxBitRate="12000000"
+        minFrameWidth="176" maxFrameWidth="1280"
+        minFrameHeight="144" maxFrameHeight="720"
+        minFrameRate="15" maxFrameRate="30" />
+
+    <AudioEncoderCap name="aac" enabled="true"
+        minBitRate="8000" maxBitRate="96000"
+        minSampleRate="8000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrwb" enabled="true"
+        minBitRate="6600" maxBitRate="23050"
+        minSampleRate="16000" maxSampleRate="16000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrnb" enabled="true"
+        minBitRate="5525" maxBitRate="12200"
+        minSampleRate="8000" maxSampleRate="8000"
+        minChannels="1" maxChannels="1" />
+
+    <!--
+        FIXME:
+        We do not check decoder capabilities at present
+        At present, we only check whether windows media is visible
+        for TEST applications. For other applications, we do
+        not perform any checks at all.
+    -->
+    <VideoDecoderCap name="wmv" enabled="false"/>
+    <AudioDecoderCap name="wma" enabled="false"/>
+</MediaSettings>
diff --git a/temp/shared/config/spn-conf.xml b/temp/shared/config/spn-conf.xml
new file mode 100644
index 0000000..f1639df
--- /dev/null
+++ b/temp/shared/config/spn-conf.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<spnOverrides>
+    <spnOverride numeric="311740" spn="Android"/>
+</spnOverrides>
diff --git a/temp/shared/config/ueventd.rc b/temp/shared/config/ueventd.rc
new file mode 100644
index 0000000..d18735c
--- /dev/null
+++ b/temp/shared/config/ueventd.rc
@@ -0,0 +1,10 @@
+# android.permission.cts.FileSystemPermissionTest#testDevHwRandomLockedDown
+/dev/hw_random 0600 root root
+
+# virtio-gpu
+/dev/dri/card0 0660 system graphics
+/dev/dri/controlD64 0660 system graphics
+/dev/dri/renderD128 0666 system graphics
+
+# media.codec2
+/dev/ion 0664 system system
diff --git a/temp/shared/device.mk b/temp/shared/device.mk
new file mode 100644
index 0000000..0b16805
--- /dev/null
+++ b/temp/shared/device.mk
@@ -0,0 +1,371 @@
+#
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Enable updating of APEXes
+$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+
+PRODUCT_SHIPPING_API_LEVEL := 29
+PRODUCT_BUILD_BOOT_IMAGE := true
+PRODUCT_USE_DYNAMIC_PARTITIONS := true
+DISABLE_RILD_OEM_HOOK := true
+
+AB_OTA_UPDATER := true
+AB_OTA_PARTITIONS += \
+    product \
+    system \
+    system_ext \
+    vendor
+
+# Enable Virtual A/B
+$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
+
+# Properties that are not vendor-specific. These will go in the product
+# partition, instead of the vendor partition, and do not need vendor
+# sepolicy
+PRODUCT_PRODUCT_PROPERTIES := \
+    persist.adb.tcp.port=5555 \
+    persist.traced.enable=1 \
+    ro.com.google.locationfeatures=1 \
+
+# Explanation of specific properties:
+#   debug.hwui.swap_with_damage avoids boot failure on M http://b/25152138
+#   ro.opengles.version OpenGLES 3.0
+PRODUCT_PROPERTY_OVERRIDES += \
+    tombstoned.max_tombstone_count=500 \
+    bt.rootcanal_test_console=off \
+    debug.hwui.swap_with_damage=0 \
+    ro.carrier=unknown \
+    ro.com.android.dataroaming=false \
+    ro.hardware.virtual_device=1 \
+    ro.logd.size=1M \
+    ro.opengles.version=196608 \
+    wifi.interface=wlan0 \
+    persist.sys.zram_enabled=1 \
+    ro.apk_verity.mode=2 \
+
+# Below is a list of properties we probably should get rid of.
+PRODUCT_PROPERTY_OVERRIDES += \
+    wlan.driver.status=ok
+
+PRODUCT_SOONG_NAMESPACES += hardware/google/camera
+PRODUCT_SOONG_NAMESPACES += hardware/google/camera/devices/EmulatedCamera
+
+#
+# Packages for various GCE-specific utilities
+#
+PRODUCT_PACKAGES += \
+    socket_vsock_proxy \
+    usbforward \
+    CuttlefishService \
+    wpa_supplicant.vsoc.conf \
+    vsoc_input_service \
+    vport_trigger \
+    rename_netiface \
+    ip_link_add \
+    setup_wifi \
+    tombstone_transmit \
+    vsock_logcat \
+    tombstone_producer \
+    suspend_blocker \
+
+#
+# Packages for AOSP-available stuff we use from the framework
+#
+PRODUCT_PACKAGES += \
+    e2fsck \
+    ip \
+    sleep \
+    tcpdump \
+    wpa_supplicant \
+    wificond \
+
+#
+# Packages for the OpenGL implementation
+#
+
+# SwiftShader provides a software-only implementation that is not thread-safe
+PRODUCT_PACKAGES += \
+    libEGL_swiftshader \
+    libGLESv1_CM_swiftshader \
+    libGLESv2_swiftshader
+
+# GL implementation for virgl
+PRODUCT_PACKAGES += \
+    libGLES_mesa
+
+#
+# Packages for the Vulkan implementation
+#
+PRODUCT_PACKAGES += \
+    vulkan.pastel
+
+DEVICE_PACKAGE_OVERLAYS := device/google/cuttlefish/shared/overlay
+# PRODUCT_AAPT_CONFIG and PRODUCT_AAPT_PREF_CONFIG are intentionally not set to
+# pick up every density resources.
+
+#
+# General files
+#
+PRODUCT_COPY_FILES += \
+    device/google/cuttlefish/shared/config/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf \
+    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_back.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_back.json \
+    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_front.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_front.json \
+    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_depth.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_depth.json \
+    device/google/cuttlefish/shared/config/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.common.rc \
+    device/google/cuttlefish/shared/config/init.cutf_cvm.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.cutf_cvm.rc \
+    device/google/cuttlefish/shared/config/init.product.rc:$(TARGET_COPY_OUT_PRODUCT)/etc/init/init.rc \
+    device/google/cuttlefish/shared/config/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
+    device/google/cuttlefish/shared/config/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
+    device/google/cuttlefish/shared/config/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
+    device/google/cuttlefish/shared/config/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
+    device/google/cuttlefish/shared/config/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
+    frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
+    frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
+    frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
+    frameworks/av/services/audiopolicy/config/audio_policy_configuration_generic.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+    frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \
+    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
+    frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
+    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
+    frameworks/av/services/audiopolicy/config/surround_sound_configuration_5_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/surround_sound_configuration_5_0.xml \
+    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
+    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
+    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
+    frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml \
+    frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
+    frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
+    frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml \
+    frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
+    frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml \
+    frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
+    frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
+    frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
+    frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
+    frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \
+    frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
+    frameworks/native/data/etc/android.hardware.touchscreen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.xml \
+    frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
+    frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
+    frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
+    frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
+    frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
+    system/bt/vendor_libs/test_vendor_lib/data/controller_properties.json:vendor/etc/bluetooth/controller_properties.json \
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_RAMDISK)/fstab.cutf_ivsh \
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_ivsh \
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_RAMDISK)/fstab.cutf_cvm \
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_cvm \
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.cutf_ivsh \
+    device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.cutf_cvm \
+
+#
+# USB Specific
+#
+PRODUCT_COPY_FILES += \
+    device/google/cuttlefish/shared/config/init.hardware.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.cutf_ivsh.usb.rc
+
+# Packages for HAL implementations
+
+#
+# Atrace HAL
+#
+PRODUCT_PACKAGES += \
+    [email protected]
+
+#
+# Authsecret HAL
+#
+PRODUCT_PACKAGES += \
+    [email protected]
+
+#
+# Hardware Composer HAL
+#
+PRODUCT_PACKAGES += \
+    hwcomposer.drm_minigbm \
+    hwcomposer.cutf_cvm_ashmem \
+    hwcomposer.cutf_ivsh_ashmem \
+    hwcomposer-stats \
+    [email protected] \
+    [email protected]
+
+#
+# Gralloc HAL
+#
+PRODUCT_PACKAGES += \
+    gralloc.minigbm \
+    gralloc.cutf_ashmem \
+    [email protected] \
+    [email protected] \
+    [email protected]
+
+#
+# Bluetooth HAL and Compatibility Bluetooth library (for older revs).
+#
+PRODUCT_PACKAGES += \
+    [email protected] \
+    [email protected]
+
+#
+# Audio HAL
+#
+PRODUCT_PACKAGES += \
+    audio.primary.cutf \
+    audio.r_submix.default \
+    [email protected]:32 \
+    [email protected]:32 \
+    [email protected] \
+    [email protected] \
+
+#
+# Drm HAL
+#
+PRODUCT_PACKAGES += \
+    [email protected] \
+    [email protected] \
+    [email protected] \
+    [email protected]
+
+#
+# Dumpstate HAL
+#
+PRODUCT_PACKAGES += \
+    [email protected]
+
+#
+# Camera
+#
+PRODUCT_PACKAGES += \
+    [email protected] \
+    libgooglecamerahwl_impl \
+    [email protected] \
+
+#
+# Gatekeeper
+#
+PRODUCT_PACKAGES += \
+    [email protected]
+
+#
+# GPS
+#
+PRODUCT_PACKAGES += \
+    [email protected]
+
+# Health
+PRODUCT_PACKAGES += \
+    [email protected] \
+    [email protected]
+
+# Health Storage
+PRODUCT_PACKAGES += \
+    [email protected]
+
+# Input Classifier HAL
+PRODUCT_PACKAGES += \
+    [email protected]
+
+# Radio Config HAL
+PRODUCT_PACKAGES += \
+    [email protected]
+
+#
+# Sensors
+#
+PRODUCT_PACKAGES += \
+    [email protected]
+#
+# Thermal (mock)
+#
+PRODUCT_PACKAGES += \
+    [email protected]
+
+#
+# Lights
+#
+PRODUCT_PACKAGES += \
+    lights.cutf \
+    [email protected] \
+    [email protected]
+
+#
+# Keymaster HAL
+#
+PRODUCT_PACKAGES += \
+     [email protected]
+
+#
+# Power HAL
+#
+PRODUCT_PACKAGES += \
+    power.cutf \
+    [email protected] \
+    [email protected]
+
+
+#
+# PowerStats HAL
+#
+PRODUCT_PACKAGES += \
+    [email protected]
+
+#
+# NeuralNetworks HAL
+#
+PRODUCT_PACKAGES += \
+    [email protected] \
+    [email protected] \
+    [email protected] \
+    [email protected] \
+    [email protected]
+
+#
+# USB
+PRODUCT_PACKAGES += \
+    [email protected]
+
+# Vibrator HAL
+PRODUCT_PACKAGES += \
+    android.hardware.vibrator-service.example
+
+# BootControl HAL
+PRODUCT_PACKAGES += \
+    [email protected] \
+    [email protected] \
+    [email protected]
+
+# WLAN driver configuration files
+PRODUCT_COPY_FILES += \
+    $(LOCAL_PATH)/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf
+
+# Recovery mode
+ifneq ($(TARGET_NO_RECOVERY),true)
+
+PRODUCT_COPY_FILES += \
+    device/google/cuttlefish/shared/config/init.recovery.common.rc:recovery/root/init.recovery.common.rc \
+    device/google/cuttlefish/shared/config/init.recovery.cutf_cvm.rc:recovery/root/init.recovery.cutf_cvm.rc \
+
+endif
+
+#
+# Shell script Vendor Module Loading
+#
+PRODUCT_COPY_FILES += \
+   $(LOCAL_PATH)/config/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \
+
+# Host packages to install
+PRODUCT_HOST_PACKAGES += socket_vsock_proxy
+
+PRODUCT_EXTRA_VNDK_VERSIONS := 28 29
diff --git a/temp/shared/go/device.mk b/temp/shared/go/device.mk
new file mode 100644
index 0000000..7c7f719
--- /dev/null
+++ b/temp/shared/go/device.mk
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2018 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, build/target/product/go_defaults.mk)
+
+# By default, enable zram; experiment can toggle the flag,
+# which takes effect on boot
+PRODUCT_PROPERTY_OVERRIDES += \
+    ro.statsd.enable=true \
+    pm.dexopt.downgrade_after_inactive_days=10 \
+    pm.dexopt.shared=quicken \
+    dalvik.vm.heapgrowthlimit=128m \
+    dalvik.vm.heapsize=256m \
diff --git a/temp/shared/go_512/device.mk b/temp/shared/go_512/device.mk
new file mode 100644
index 0000000..4a95a73
--- /dev/null
+++ b/temp/shared/go_512/device.mk
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2018 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, build/target/product/go_defaults_512.mk)
+
+# By default, enable zram; experiment can toggle the flag,
+# which takes effect on boot
+PRODUCT_PROPERTY_OVERRIDES += \
+    ro.statsd.enable=true \
+    pm.dexopt.downgrade_after_inactive_days=10 \
+    pm.dexopt.shared=quicken \
+    dalvik.vm.heapgrowthlimit=128m \
+    dalvik.vm.heapsize=256m \
diff --git a/temp/shared/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/temp/shared/overlay/frameworks/base/core/res/res/xml/power_profile.xml
new file mode 100644
index 0000000..bdcb48d
--- /dev/null
+++ b/temp/shared/overlay/frameworks/base/core/res/res/xml/power_profile.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<device name="Android">
+  <!-- Most values are the incremental current used by a feature,
+       in mA (measured at nominal voltage).
+       The default values are deliberately incorrect dummy values.
+       OEM's must measure and provide actual values before
+       shipping a device.
+       Example real-world values are given in comments, but they
+       are totally dependent on the platform and can vary
+       significantly, so should be measured on the shipping platform
+       with a power meter. -->
+  <item name="none">0</item>
+  <item name="screen.on">0.1</item>  <!-- ~200mA -->
+  <item name="screen.full">0.1</item>  <!-- ~300mA -->
+  <item name="bluetooth.active">0.1</item> <!-- Bluetooth data transfer, ~10mA -->
+  <item name="bluetooth.on">0.1</item>  <!-- Bluetooth on & connectable, but not connected, ~0.1mA -->
+  <item name="wifi.on">0.1</item>  <!-- ~3mA -->
+  <item name="wifi.active">0.1</item>  <!-- WIFI data transfer, ~200mA -->
+  <item name="wifi.scan">0.1</item>  <!-- WIFI network scanning, ~100mA -->
+  <item name="dsp.audio">0.1</item> <!-- ~10mA -->
+  <item name="dsp.video">0.1</item> <!-- ~50mA -->
+  <item name="camera.flashlight">0.1</item> <!-- Avg. power for camera flash, ~160mA -->
+  <item name="camera.avg">0.1</item> <!-- Avg. power use of camera in standard usecases, ~550mA -->
+  <item name="radio.active">0.1</item> <!-- ~200mA -->
+  <item name="radio.scanning">0.1</item> <!-- cellular radio scanning for signal, ~10mA -->
+  <item name="gps.on">0.1</item> <!-- ~50mA -->
+  <!-- Current consumed by the radio at different signal strengths, when paging -->
+  <array name="radio.on"> <!-- Strength 0 to BINS-1 -->
+      <value>0.2</value> <!-- ~2mA -->
+      <value>0.1</value> <!-- ~1mA -->
+  </array>
+  <!-- Different CPU speeds as reported in
+       /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state -->
+  <array name="cpu.speeds">
+      <value>400000</value> <!-- 400 MHz CPU speed -->
+  </array>
+  <!-- Current when CPU is idle -->
+  <item name="cpu.idle">0.1</item>
+  <!-- Current at each CPU speed, as per 'cpu.speeds' -->
+  <array name="cpu.active">
+      <value>0.1</value>  <!-- ~100mA -->
+  </array>
+  <!-- This is the battery capacity in mAh (measured at nominal voltage) -->
+  <item name="battery.capacity">1000</item>
+
+  <array name="wifi.batchedscan"> <!-- mA -->
+      <value>.0002</value> <!-- 1-8/hr -->
+      <value>.002</value>  <!-- 9-64/hr -->
+      <value>.02</value>   <!-- 65-512/hr -->
+      <value>.2</value>    <!-- 513-4,096/hr -->
+      <value>2</value>    <!-- 4097-/hr -->
+  </array>
+</device>
diff --git a/temp/shared/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/temp/shared/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..3213eab
--- /dev/null
+++ b/temp/shared/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+    <bool name="def_stay_on_while_plugged_in">true</bool>
+    <bool name="def_install_non_market_apps">true</bool>
+    <bool name="def_package_verifier_enable">false</bool>
+</resources>
diff --git a/temp/shared/phone/device.mk b/temp/shared/phone/device.mk
new file mode 100644
index 0000000..09b61da
--- /dev/null
+++ b/temp/shared/phone/device.mk
@@ -0,0 +1,45 @@
+#
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+DEVICE_MANIFEST_FILE += device/google/cuttlefish/shared/config/manifest.xml
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
+$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
+$(call inherit-product, device/google/cuttlefish/shared/device.mk)
+
+PRODUCT_CHARACTERISTICS := nosdcard
+
+PRODUCT_PROPERTY_OVERRIDES += \
+    keyguard.no_require_sim=true \
+    ro.cdma.home.operator.alpha=Android \
+    ro.cdma.home.operator.numeric=302780 \
+    vendor.rild.libpath=libcuttlefish-ril.so \
+
+PRODUCT_PACKAGES += \
+    MmsService \
+    Phone \
+    PhoneService \
+    Telecom \
+    TeleService \
+    libcuttlefish-ril \
+    libcuttlefish-rild
+
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml
+
+# These flags are important for the GSI, but break auto
+# These are used by aosp_cf_x86_go_phone targets
+PRODUCT_ENFORCE_RRO_TARGETS := framework-res
diff --git a/temp/shared/phone/device_vendor.mk b/temp/shared/phone/device_vendor.mk
new file mode 100644
index 0000000..e873ff2
--- /dev/null
+++ b/temp/shared/phone/device_vendor.mk
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+DEVICE_MANIFEST_FILE += device/google/cuttlefish/shared/config/manifest.xml
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk)
+
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
+
+$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
+$(call inherit-product, device/google/cuttlefish/shared/device.mk)
+
+PRODUCT_CHARACTERISTICS := nosdcard
+
+PRODUCT_PROPERTY_OVERRIDES += \
+    keyguard.no_require_sim=true \
+    ro.cdma.home.operator.alpha=Android \
+    ro.cdma.home.operator.numeric=302780 \
+    ro.com.android.dataroaming=true \
+    vendor.rild.libpath=libcuttlefish-ril.so \
+
+# TODO: not existing anymore?
+PRODUCT_PACKAGES += \
+    Phone \
+    PhoneService \
+
+PRODUCT_PACKAGES += \
+    libcuttlefish-ril \
+    libcuttlefish-rild
+
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml
diff --git a/temp/shared/releasetools.py b/temp/shared/releasetools.py
new file mode 100644
index 0000000..198fcc2
--- /dev/null
+++ b/temp/shared/releasetools.py
@@ -0,0 +1,55 @@
+#
+# Copyright 2019 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import os
+
+from common import BlockDifference, EmptyImage, GetUserImage
+
+# The joint list of user image partitions of source and target builds.
+# - Items should be added to the list if new dynamic partitions are added.
+# - Items should not be removed from the list even if dynamic partitions are
+#   deleted. When generating an incremental OTA package, this script needs to
+#   know that an image is present in source build but not in target build.
+USERIMAGE_PARTITIONS = [
+    "product",
+    "system_ext",
+]
+
+
+def GetUserImages(input_tmp, input_zip):
+  return {partition: GetUserImage(partition, input_tmp, input_zip)
+          for partition in USERIMAGE_PARTITIONS
+          if os.path.exists(os.path.join(input_tmp,
+                                         "IMAGES", partition + ".img"))}
+
+
+def FullOTA_GetBlockDifferences(info):
+  images = GetUserImages(info.input_tmp, info.input_zip)
+  return [BlockDifference(partition, image)
+          for partition, image in images.items()]
+
+
+def IncrementalOTA_GetBlockDifferences(info):
+  source_images = GetUserImages(info.source_tmp, info.source_zip)
+  target_images = GetUserImages(info.target_tmp, info.target_zip)
+
+  # Use EmptyImage() as a placeholder for partitions that will be deleted.
+  for partition in source_images:
+    target_images.setdefault(partition, EmptyImage())
+
+  # Use source_images.get() because new partitions are not in source_images.
+  return [BlockDifference(partition, target_image, source_images.get(partition))
+          for partition, target_image in target_images.items()]
diff --git a/temp/shared/sepolicy/OWNERS b/temp/shared/sepolicy/OWNERS
new file mode 100644
index 0000000..854d2e9
--- /dev/null
+++ b/temp/shared/sepolicy/OWNERS
@@ -0,0 +1,13 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
diff --git a/temp/shared/sepolicy/private/file_contexts b/temp/shared/sepolicy/private/file_contexts
new file mode 100644
index 0000000..f0255a0
--- /dev/null
+++ b/temp/shared/sepolicy/private/file_contexts
@@ -0,0 +1,5 @@
+#############################
+# Product files
+#
+/product/bin/suspend_blocker     u:object_r:suspend_blocker_exec:s0
+/product/bin/tombstone_transmit  u:object_r:tombstone_transmit_exec:s0
diff --git a/temp/shared/sepolicy/private/property_contexts b/temp/shared/sepolicy/private/property_contexts
new file mode 100644
index 0000000..72cef1b
--- /dev/null
+++ b/temp/shared/sepolicy/private/property_contexts
@@ -0,0 +1 @@
+ro.boot.vsock_tombstone_port  u:object_r:vsock_tombstone_port_prop:s0
diff --git a/temp/shared/sepolicy/private/suspend_blocker.te b/temp/shared/sepolicy/private/suspend_blocker.te
new file mode 100644
index 0000000..41c72b9
--- /dev/null
+++ b/temp/shared/sepolicy/private/suspend_blocker.te
@@ -0,0 +1,6 @@
+type suspend_blocker, domain, coredomain;
+type suspend_blocker_exec, exec_type, file_type;
+
+init_daemon_domain(suspend_blocker);
+
+wakelock_use(suspend_blocker);
diff --git a/temp/shared/sepolicy/private/tombstone_transmit.te b/temp/shared/sepolicy/private/tombstone_transmit.te
new file mode 100644
index 0000000..a17ed10
--- /dev/null
+++ b/temp/shared/sepolicy/private/tombstone_transmit.te
@@ -0,0 +1,12 @@
+type tombstone_transmit, domain, coredomain;
+type tombstone_transmit_exec, exec_type, file_type;
+
+init_daemon_domain(tombstone_transmit);
+
+type vsock_tombstone_port_prop, property_type;
+get_prop(tombstone_transmit, vsock_tombstone_port_prop)
+
+allow tombstone_transmit self:capability net_admin;
+r_dir_file(tombstone_transmit, tombstone_data_file)
+
+allow tombstone_transmit self:{ vsock_socket } create_socket_perms_no_ioctl;
diff --git a/temp/shared/sepolicy/vendor/adbd.te b/temp/shared/sepolicy/vendor/adbd.te
new file mode 100644
index 0000000..48c3e0c
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/adbd.te
@@ -0,0 +1,11 @@
+allow adbd self:{ socket vsock_socket } {create listen accept rw_socket_perms_no_ioctl};
+# TODO(b/130668487): Label the vsock sockets.
+allow adbd unlabeled:{socket vsock_socket} rw_socket_perms_no_ioctl;
+allow adbd kernel:system module_request;
+
+recovery_only(`
+allow adbd tmpfs:dir w_dir_perms;
+allow adbd tmpfs:file create_file_perms;
+# TODO(b/130668487): Label the vsock sockets.
+allow su unlabeled:{ socket vsock_socket } rw_socket_perms_no_ioctl;
+')
diff --git a/temp/shared/sepolicy/vendor/bootanim.te b/temp/shared/sepolicy/vendor/bootanim.te
new file mode 100644
index 0000000..9ac7954
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/bootanim.te
@@ -0,0 +1,6 @@
+# TODO(b/65049764): Update this once the FD owner process is relabelled. This is probably one of the
+# processes whch is started before Android init.
+allow bootanim kernel:fd use;
+
+allow bootanim self:process execmem;
+gpu_access(bootanim)
diff --git a/temp/shared/sepolicy/vendor/bug_map b/temp/shared/sepolicy/vendor/bug_map
new file mode 100644
index 0000000..372547e
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/bug_map
@@ -0,0 +1,11 @@
+init system_lib_file dir b/133444385
+init system_lib_file file b/133444385
+kernel kernel system b/130424539
+logpersist logpersist capability b/132911257
+logpersist device file b/143108875
+platform_app radio_prop property_service b/140284352
+priv_app proc_net file b/124422390
+shell adbd vsock_socket b/131904985
+system_server system_server process b/65201432
+vendor_init kernel system b/130424539
+zygote ramdump_app process b/139558100
diff --git a/temp/shared/sepolicy/vendor/cameraserver.te b/temp/shared/sepolicy/vendor/cameraserver.te
new file mode 100644
index 0000000..240026b
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/cameraserver.te
@@ -0,0 +1,2 @@
+# Read GCE initial metadata file
+allow cameraserver initial_metadata_file:file r_file_perms;
diff --git a/temp/shared/sepolicy/vendor/device.te b/temp/shared/sepolicy/vendor/device.te
new file mode 100644
index 0000000..38f0a2f
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/device.te
@@ -0,0 +1,7 @@
+# Device types
+type input_events_device, dev_type;
+type libcuttlefish_rild_device, dev_type;
+type region_e2e_test_device, dev_type;
+type region_screen_device, dev_type;
+type socket_forward_device, dev_type;
+type virtual_serial_device, dev_type;
diff --git a/temp/shared/sepolicy/vendor/file.te b/temp/shared/sepolicy/vendor/file.te
new file mode 100644
index 0000000..a4d5d83
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/file.te
@@ -0,0 +1,7 @@
+# File types
+type initial_metadata_file, file_type;
+type sensors_hal_socket, file_type;
+type tombstone_snapshot_file, file_type;
+type var_run_system_file, file_type;
+type sysfs_gpu, fs_type, sysfs_type;
+type mediadrm_vendor_data_file, file_type, data_file_type;
diff --git a/temp/shared/sepolicy/vendor/file_contexts b/temp/shared/sepolicy/vendor/file_contexts
new file mode 100644
index 0000000..59611a0
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/file_contexts
@@ -0,0 +1,90 @@
+##########################
+# Devices
+#
+
+# crosvm block devices
+/dev/block/pci/pci0000:00/0000:00:01\.0/by-name/boot u:object_r:boot_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:01\.0/by-name/metadata u:object_r:metadata_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:01\.0/by-name/misc u:object_r:misc_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:01\.0/by-name/super u:object_r:super_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:01\.0/by-name/userdata u:object_r:userdata_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:01\.0/by-name/cache u:object_r:cache_block_device:s0
+# qemu block devices
+/dev/block/pci/pci0000:00/0000:00:03\.0/by-name/boot u:object_r:boot_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:03\.0/by-name/metadata u:object_r:metadata_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:03\.0/by-name/misc u:object_r:misc_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:03\.0/by-name/super u:object_r:super_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:03\.0/by-name/userdata u:object_r:userdata_block_device:s0
+/dev/block/pci/pci0000:00/0000:00:03\.0/by-name/cache u:object_r:cache_block_device:s0
+
+/dev/block/zram0  u:object_r:swap_block_device:s0
+/dev/dri u:object_r:gpu_device:s0
+/dev/dri/card0  u:object_r:graphics_device:s0
+/dev/dri/renderD128  u:object_r:gpu_device:s0
+/dev/e2e_managed  u:object_r:region_e2e_test_device:s0
+/dev/e2e_manager  u:object_r:region_e2e_test_device:s0
+/dev/e2e_primary  u:object_r:region_e2e_test_device:s0
+/dev/e2e_secondary  u:object_r:region_e2e_test_device:s0
+/dev/input_events  u:object_r:input_events_device:s0
+/dev/ril  u:object_r:libcuttlefish_rild_device:s0
+/dev/screen  u:object_r:region_screen_device:s0
+/dev/socket_forward  u:object_r:socket_forward_device:s0
+/dev/vport[0-9]p[0-9]*  u:object_r:virtual_serial_device:s0
+
+#############################
+# Root files
+/initial\.metadata  u:object_r:initial_metadata_file:s0
+/ts_snap\.txt  u:object_r:tombstone_snapshot_file:s0
+
+#############################
+# data files
+/data/vendor/mediadrm(/.*)?  u:object_r:mediadrm_vendor_data_file:s0
+
+#############################
+# var files
+/var/run/system(/.*)?  u:object_r:var_run_system_file:s0
+
+#############################
+# Vendor files
+#
+/vendor/bin/usbforward  u:object_r:usbforward_exec:s0
+/vendor/bin/socket_vsock_proxy  u:object_r:socket_vsock_proxy_exec:s0
+/vendor/bin/vsock_logcat  u:object_r:vsock_logcat_exec:s0
+/vendor/bin/vsoc_input_service  u:object_r:vsoc_input_service_exec:s0
+/vendor/bin/vport_trigger  u:object_r:vport_trigger_exec:s0
+/vendor/bin/rename_netiface  u:object_r:rename_netiface_exec:s0
+/vendor/bin/hw/libcuttlefish-rild  u:object_r:libcuttlefish_rild_exec:s0
+/vendor/bin/hw/android\.hardware\.camera\.provider@2\.4-service-google u:object_r:hal_camera_default_exec:s0
+/vendor/bin/hw/android\.hardware\.power\.stats@1\.0-service\.mock  u:object_r:hal_power_stats_default_exec:s0
+/vendor/bin/hw/android\.hardware\.bluetooth@1\.1-service\.sim  u:object_r:hal_bluetooth_sim_exec:s0
+/vendor/bin/hw/android\.hardware\.drm@1\.2-service\.clearkey  u:object_r:hal_drm_clearkey_exec:s0
+/vendor/bin/hw/android\.hardware\.drm@1\.2-service-lazy\.clearkey  u:object_r:hal_drm_clearkey_exec:s0
+/vendor/bin/hw/android\.hardware\.drm@1\.2-service\.widevine  u:object_r:hal_drm_widevine_exec:s0
+/vendor/bin/hw/android\.hardware\.drm@1\.2-service-lazy\.widevine  u:object_r:hal_drm_widevine_exec:s0
+/vendor/bin/hw/android\.hardware\.dumpstate@1\.0-service\.cuttlefish  u:object_r:hal_dumpstate_impl_exec:s0
+/vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service\.software  u:object_r:hal_gatekeeper_default_exec:s0
+/vendor/bin/hw/android\.hardware\.health\.storage@1\.0-service\.cuttlefish u:object_r:hal_health_storage_default_exec:s0
+/vendor/bin/hw/android\.hardware\.neuralnetworks@1\.3-service-sample-.*   u:object_r:hal_neuralnetworks_sample_exec:s0
+/vendor/bin/hw/android\.hardware\.vibrator@1\.x-service\.example u:object_r:hal_vibrator_default_exec:s0
+/vendor/bin/hw/android\.hardware\.tv\.cec@1\.0-service\.mock u:object_r:hal_tv_cec_mock_exec:s0
+/vendor/bin/hw/android\.hardware\.tv\.tuner@1\.0-service u:object_r:hal_tv_tuner_default_exec:s0
+/vendor/bin/ip_link_add  u:object_r:ip_link_add_exec:s0
+/vendor/bin/setup_wifi  u:object_r:setup_wifi_exec:s0
+/vendor/bin/hw/android\.hardware\.sensors@2\.0-service\.mock  u:object_r:hal_sensors_default_exec:s0
+/vendor/bin/hw/android\.hardware\.input\.classifier@1\.0-service.default  u:object_r:hal_input_classifier_default_exec:s0
+/vendor/bin/hw/android\.hardware\.thermal@2\.0-service\.mock  u:object_r:hal_thermal_default_exec:s0
+/vendor/bin/hw/android\.hardware\.authsecret@1\.0-service  u:object_r:hal_authsecret_default_exec:s0
+/vendor/bin/hw/android\.hardware\.radio\.config@1\.3-service  u:object_r:hal_radio_config_default_exec:s0
+/vendor/bin/init\.insmod\.sh  u:object_r:init_insmod_sh_exec:s0
+
+/vendor/lib(64)?/cuttlefish_auto_resources.so  u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libdrm.so  u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libglapi.so  u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/dri/.* u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/android\.hardware\.graphics\.mapper@2\.0-impl-2\.1\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/android\.hardware\.health@2\.1-impl-cuttlefish  u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/gralloc.cutf_ashmem.so  u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/gralloc.minigbm.so  u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/vulkan.pastel.so  u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libcuttlefish_fs.so  u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/vsoc_lib.so  u:object_r:same_process_hal_file:s0
diff --git a/temp/shared/sepolicy/vendor/gceservice.te b/temp/shared/sepolicy/vendor/gceservice.te
new file mode 100644
index 0000000..b6f84be
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/gceservice.te
@@ -0,0 +1,29 @@
+# GceService app
+type gceservice, domain;
+app_domain(gceservice)
+
+# Use system services exposed as part of Android framework public API
+allow gceservice app_api_service:service_manager find;
+
+# Read and write /data/data subdirectory (for its app-private persistent data).
+allow gceservice app_data_file:dir create_dir_perms;
+allow gceservice app_data_file:{ file lnk_file } create_file_perms;
+
+# Write to kernel log (/dev/kmsg)
+allow gceservice kmsg_device:chr_file w_file_perms;
+allow gceservice kmsg_device:chr_file getattr;
+
+# Read tombstone snapshot file
+allow gceservice tombstone_snapshot_file:file r_file_perms;
+# List tombstone files
+allow gceservice tombstone_data_file:dir r_dir_perms;
+allow gceservice tombstone_data_file:file getattr;
+
+# Communicate with GCE Metadata Proxy over Unix domain sockets
+# The proxy process uses the default label ("kernel") because it is
+# started before Android init and thus before SELinux rule are applied.
+# TODO(b/65049764): Update once GCE metadata proxy is moved outside of the emulator or gets labelled
+allow gceservice kernel:unix_stream_socket connectto;
+
+# gceservice writes to /dev/stune/foreground/tasks
+allow gceservice cgroup:file w_file_perms;
diff --git a/temp/shared/sepolicy/vendor/genfs_contexts b/temp/shared/sepolicy/vendor/genfs_contexts
new file mode 100644
index 0000000..28f55bf
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/genfs_contexts
@@ -0,0 +1,21 @@
+genfscon sysfs /devices/pnp0/00:00/rtc  u:object_r:sysfs_rtc:s0 # qemu virtual rtc
+genfscon sysfs /devices/platform/rtc-test.0/rtc  u:object_r:sysfs_rtc:s0 # crosvm has no rtc, use kernel test driver
+genfscon sysfs /devices/platform/rtc-test.1/rtc  u:object_r:sysfs_rtc:s0 # crosvm has no rtc, use kernel test driver
+genfscon sysfs /devices/platform/rtc-test.2/rtc  u:object_r:sysfs_rtc:s0 # crosvm has no rtc, use kernel test driver
+genfscon sysfs /devices/pci0000:00/0000:00:04.0/virtio2/net u:object_r:sysfs_net:s0 # (new) qemu composite buried_eth0 & wlan0
+genfscon sysfs /devices/pci0000:00/0000:00:05.0/virtio3/net u:object_r:sysfs_net:s0 # (new) qemu composite rmnet0
+genfscon sysfs /devices/pci0000:00/0000:00:06.0/virtio5/net u:object_r:sysfs_net:s0 # (new) crosvm composite buried_eth0 & wlan0
+genfscon sysfs /devices/pci0000:00/0000:00:07.0/virtio6/net u:object_r:sysfs_net:s0 # (new) crosvm composite rmnet0
+genfscon sysfs /devices/pci0000:00/0000:00:07.0/virtio5/net u:object_r:sysfs_net:s0 # (new) qemu buried_eth0 & wlan0
+genfscon sysfs /devices/pci0000:00/0000:00:08.0/virtio6/net u:object_r:sysfs_net:s0 # (new) qemu rmnet0
+genfscon sysfs /devices/pci0000:00/0000:00:09.0/virtio8/net u:object_r:sysfs_net:s0 # (new) crosvm buried_eth0 & wlan0
+genfscon sysfs /devices/pci0000:00/0000:00:0a.0/virtio9/net u:object_r:sysfs_net:s0 # (new) crosvm rmnet0
+genfscon sysfs /devices/pci0000:00/0000:00:09.0/virtio7/net u:object_r:sysfs_net:s0 # (old) qemu buried_eth0 & wlan0
+genfscon sysfs /devices/pci0000:00/0000:00:0a.0/virtio8/net u:object_r:sysfs_net:s0 # (old) qemu rmnet0
+genfscon sysfs /devices/pci0000:00/0000:00:0b.0/virtio10/net u:object_r:sysfs_net:s0 # (old) crosvm buried_eth0 & wlan0
+genfscon sysfs /devices/pci0000:00/0000:00:0c.0/virtio11/net u:object_r:sysfs_net:s0 # (old) crosvm rmnet0
+genfscon sysfs /devices/pci0000:00/0000:00:0b.0/device u:object_r:sysfs_gpu:s0
+genfscon sysfs /devices/pci0000:00/0000:00:0b.0/subsystem_device u:object_r:sysfs_gpu:s0
+genfscon sysfs /devices/pci0000:00/0000:00:0b.0/subsystem_vendor u:object_r:sysfs_gpu:s0
+genfscon sysfs /devices/pci0000:00/0000:00:0b.0/uevent u:object_r:sysfs_gpu:s0
+genfscon sysfs /devices/pci0000:00/0000:00:0b.0/vendor u:object_r:sysfs_gpu:s0
diff --git a/temp/shared/sepolicy/vendor/gmscore_app.te b/temp/shared/sepolicy/vendor/gmscore_app.te
new file mode 100644
index 0000000..7745106
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/gmscore_app.te
@@ -0,0 +1 @@
+get_prop(gmscore_app, hal_camera_prop)
diff --git a/temp/shared/sepolicy/vendor/google/platform_app.te b/temp/shared/sepolicy/vendor/google/platform_app.te
new file mode 100644
index 0000000..def6ca2
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/google/platform_app.te
@@ -0,0 +1 @@
+get_prop(platform_app, vendor_aware_available_prop)
diff --git a/temp/shared/sepolicy/vendor/google/priv_app.te b/temp/shared/sepolicy/vendor/google/priv_app.te
new file mode 100644
index 0000000..caa61b7
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/google/priv_app.te
@@ -0,0 +1 @@
+get_prop(priv_app, vendor_aware_available_prop)
\ No newline at end of file
diff --git a/temp/shared/sepolicy/vendor/google/property.te b/temp/shared/sepolicy/vendor/google/property.te
new file mode 100644
index 0000000..1d026f7
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/google/property.te
@@ -0,0 +1,2 @@
+# Vendor aware available type
+type vendor_aware_available_prop, property_type;
diff --git a/temp/shared/sepolicy/vendor/google/property_contexts b/temp/shared/sepolicy/vendor/google/property_contexts
new file mode 100644
index 0000000..126cf1c
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/google/property_contexts
@@ -0,0 +1 @@
+ro.vendor.aware_available  u:object_r:vendor_aware_available_prop:s0
diff --git a/temp/shared/sepolicy/vendor/google/ramdump_app.te b/temp/shared/sepolicy/vendor/google/ramdump_app.te
new file mode 100644
index 0000000..c054f6d
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/google/ramdump_app.te
@@ -0,0 +1,2 @@
+type ramdump_app, domain;
+
diff --git a/temp/shared/sepolicy/vendor/google/seapp_contexts b/temp/shared/sepolicy/vendor/google/seapp_contexts
new file mode 100644
index 0000000..0be8810
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/google/seapp_contexts
@@ -0,0 +1,2 @@
+# Ramdump app
+user=_app seinfo=platform name=com.android.ramdump domain=ramdump_app type=app_data_file levelFrom=all
diff --git a/temp/shared/sepolicy/vendor/google/system_app.te b/temp/shared/sepolicy/vendor/google/system_app.te
new file mode 100644
index 0000000..326d9fd
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/google/system_app.te
@@ -0,0 +1 @@
+get_prop(system_app, vendor_aware_available_prop)
diff --git a/temp/shared/sepolicy/vendor/hal_bluetooth_sim.te b/temp/shared/sepolicy/vendor/hal_bluetooth_sim.te
new file mode 100644
index 0000000..82bab59
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_bluetooth_sim.te
@@ -0,0 +1,9 @@
+type hal_bluetooth_sim, domain;
+type hal_bluetooth_sim_exec, exec_type, vendor_file_type, file_type;
+type hal_bluetooth_sim_prop, property_type;
+
+hal_server_domain(hal_bluetooth_sim, hal_bluetooth)
+
+init_daemon_domain(hal_bluetooth_sim)
+
+get_prop(hal_bluetooth_sim, hal_bluetooth_sim_prop)
diff --git a/temp/shared/sepolicy/vendor/hal_camera_default.te b/temp/shared/sepolicy/vendor/hal_camera_default.te
new file mode 100644
index 0000000..79bed26
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_camera_default.te
@@ -0,0 +1,7 @@
+type hal_camera_prop, property_type;
+
+vndbinder_use(hal_camera_default)
+
+hal_client_domain(hal_camera_default, hal_graphics_allocator)
+
+get_prop(hal_camera_default, hal_camera_prop)
diff --git a/temp/shared/sepolicy/vendor/hal_drm_clearkey.te b/temp/shared/sepolicy/vendor/hal_drm_clearkey.te
new file mode 100644
index 0000000..2da9420
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_drm_clearkey.te
@@ -0,0 +1,10 @@
+# policy for /vendor/bin/hw/android.hardware.drm clearkey service
+type hal_drm_clearkey, domain;
+type hal_drm_clearkey_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(hal_drm_clearkey)
+
+hal_server_domain(hal_drm_clearkey, hal_drm)
+
+vndbinder_use(hal_drm_clearkey);
+
diff --git a/temp/shared/sepolicy/vendor/hal_drm_default.te b/temp/shared/sepolicy/vendor/hal_drm_default.te
new file mode 100644
index 0000000..0acbc0d
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_drm_default.te
@@ -0,0 +1 @@
+vndbinder_use(hal_drm_default)
diff --git a/temp/shared/sepolicy/vendor/hal_drm_widevine.te b/temp/shared/sepolicy/vendor/hal_drm_widevine.te
new file mode 100644
index 0000000..268388b
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_drm_widevine.te
@@ -0,0 +1,14 @@
+type hal_drm_widevine, domain;
+type hal_drm_widevine_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(hal_drm_widevine)
+
+hal_server_domain(hal_drm_widevine, hal_drm)
+
+vndbinder_use(hal_drm_widevine);
+
+allow hal_drm_widevine mediacodec:fd use;
+allow hal_drm_widevine hal_allocator_server:fd use;
+
+allow hal_drm_widevine mediadrm_vendor_data_file:dir create_dir_perms;
+allow hal_drm_widevine mediadrm_vendor_data_file:file create_file_perms;
diff --git a/temp/shared/sepolicy/vendor/hal_dumpstate_impl.te b/temp/shared/sepolicy/vendor/hal_dumpstate_impl.te
new file mode 100644
index 0000000..33e2e9d
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_dumpstate_impl.te
@@ -0,0 +1,6 @@
+type hal_dumpstate_impl, domain;
+type hal_dumpstate_impl_exec, exec_type, vendor_file_type, file_type;
+
+hal_server_domain(hal_dumpstate_impl, hal_dumpstate)
+
+init_daemon_domain(hal_dumpstate_impl)
diff --git a/temp/shared/sepolicy/vendor/hal_gnss_default.te b/temp/shared/sepolicy/vendor/hal_gnss_default.te
new file mode 100644
index 0000000..ad4b3da
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_gnss_default.te
@@ -0,0 +1,2 @@
+#============= hal_gnss_default ==============
+vndbinder_use(hal_gnss_default)
diff --git a/temp/shared/sepolicy/vendor/hal_graphics_allocator.te b/temp/shared/sepolicy/vendor/hal_graphics_allocator.te
new file mode 100644
index 0000000..3136386
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_graphics_allocator.te
@@ -0,0 +1,6 @@
+# TODO(b/64158954): Remove/update these	rules once gralloc impl	changes
+allow hal_graphics_allocator_client hal_graphics_allocator_default_tmpfs:file read;
+
+# Read GCE initial metadata file
+allow hal_graphics_allocator_server initial_metadata_file:file r_file_perms;
+allow hal_graphics_allocator_server region_screen_device:chr_file rw_file_perms;
diff --git a/temp/shared/sepolicy/vendor/hal_graphics_allocator_default.te b/temp/shared/sepolicy/vendor/hal_graphics_allocator_default.te
new file mode 100644
index 0000000..00f38cc
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_graphics_allocator_default.te
@@ -0,0 +1 @@
+gpu_access(hal_graphics_allocator_default)
diff --git a/temp/shared/sepolicy/vendor/hal_graphics_composer.te b/temp/shared/sepolicy/vendor/hal_graphics_composer.te
new file mode 100644
index 0000000..5b4f974
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_graphics_composer.te
@@ -0,0 +1,9 @@
+type vsock_frames_port_prop, property_type;
+
+allow hal_graphics_composer_server hal_graphics_allocator_default_tmpfs:file read;
+allow hal_graphics_composer_server region_screen_device:chr_file rw_file_perms;
+allow hal_graphics_composer_server self:{ socket vsock_socket } create_socket_perms_no_ioctl;
+gpu_access(hal_graphics_composer_server)
+
+get_prop(hal_graphics_composer_server, vsock_frames_port_prop)
+get_prop(hal_graphics_composer_server, cuttlefish_config_server_port_prop)
diff --git a/temp/shared/sepolicy/vendor/hal_graphics_composer_default.te b/temp/shared/sepolicy/vendor/hal_graphics_composer_default.te
new file mode 100644
index 0000000..6b89710
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_graphics_composer_default.te
@@ -0,0 +1,4 @@
+vndbinder_use(hal_graphics_composer_default)
+
+allow hal_graphics_composer_default self:netlink_kobject_uevent_socket { bind create read };
+get_prop(hal_graphics_composer_default, cf_graphics_config_prop)
diff --git a/temp/shared/sepolicy/vendor/hal_neuralnetworks_sample.te b/temp/shared/sepolicy/vendor/hal_neuralnetworks_sample.te
new file mode 100644
index 0000000..44b5c84
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_neuralnetworks_sample.te
@@ -0,0 +1,5 @@
+type hal_neuralnetworks_sample, domain;
+hal_server_domain(hal_neuralnetworks_sample, hal_neuralnetworks)
+
+type hal_neuralnetworks_sample_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(hal_neuralnetworks_sample)
diff --git a/temp/shared/sepolicy/vendor/hal_sensors.te b/temp/shared/sepolicy/vendor/hal_sensors.te
new file mode 100644
index 0000000..27fc9c8
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_sensors.te
@@ -0,0 +1 @@
+allow hal_sensors_server sensors_hal_socket:sock_file { create setattr };
\ No newline at end of file
diff --git a/temp/shared/sepolicy/vendor/hal_tv_cec_mock.te b/temp/shared/sepolicy/vendor/hal_tv_cec_mock.te
new file mode 100644
index 0000000..6d96f96
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_tv_cec_mock.te
@@ -0,0 +1,11 @@
+# hal_tv_cec_mock service
+type hal_tv_cec_mock, domain;
+hal_server_domain(hal_tv_cec_mock, hal_tv_cec);
+# Allow tv cec HAL's mock implementation to use vendor-binder service
+vndbinder_use(hal_tv_cec_mock);
+
+allow hal_tv_cec_mock hal_allocator:fd use;
+
+type hal_tv_cec_mock_exec, exec_type, file_type, vendor_file_type;
+
+init_daemon_domain(hal_tv_cec_mock)
diff --git a/temp/shared/sepolicy/vendor/hal_vehicle_default.te b/temp/shared/sepolicy/vendor/hal_vehicle_default.te
new file mode 100644
index 0000000..d49d1d4
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/hal_vehicle_default.te
@@ -0,0 +1,4 @@
+# The sepolicy defines rules for default Vehicle HAL on Automotive devices
+typeattribute hal_vehicle_default hal_automotive_socket_exemption;
+
+net_domain(hal_vehicle_default)
diff --git a/temp/shared/sepolicy/vendor/init.te b/temp/shared/sepolicy/vendor/init.te
new file mode 100644
index 0000000..26f7110
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/init.te
@@ -0,0 +1,17 @@
+# /dev/tty* I/O. Needed for /dev/ttyS0
+allow init serial_device:chr_file rw_file_perms;
+
+# Write to /configfs files. Needed only for /config/usb_gadget subtree.
+allow init configfs:file w_file_perms;
+allow init configfs:lnk_file create;
+
+# Add loadable modules. Needed for usbfunc:diag, usbfunc:diag, usbfunc:gsi, usbfunc:qdss modules.
+allow init kernel:system module_request;
+
+# binfmt_misc arm for ndk translator
+allow init binfmt_miscfs:file w_file_perms;
+allow init proc:dir mounton;
+
+# /mnt/sdcard -> /storage/self/primary symlink is deprecated. Ignore attempts to
+# create it. This denial is fixed in core policy in Android R aosp/943799.
+dontaudit init tmpfs:lnk_file create;
diff --git a/temp/shared/sepolicy/vendor/init_insmod_sh.te b/temp/shared/sepolicy/vendor/init_insmod_sh.te
new file mode 100644
index 0000000..5400a37
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/init_insmod_sh.te
@@ -0,0 +1,11 @@
+type init_insmod_sh, domain;
+type init_insmod_sh_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(init_insmod_sh)
+
+allow init_insmod_sh vendor_shell_exec:file rx_file_perms;
+allow init_insmod_sh vendor_toolbox_exec:file rx_file_perms;
+
+# Allow insmod
+allow init_insmod_sh self:capability sys_module;
+allow init_insmod_sh vendor_file:system module_load;
diff --git a/temp/shared/sepolicy/vendor/ip_link_add.te b/temp/shared/sepolicy/vendor/ip_link_add.te
new file mode 100644
index 0000000..a1c13e2
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/ip_link_add.te
@@ -0,0 +1,10 @@
+type ip_link_add, domain;
+type ip_link_add_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(ip_link_add)
+
+allow ip_link_add self:capability { net_admin net_raw sys_module };
+allow ip_link_add self:udp_socket { create ioctl };
+allow ip_link_add self:netlink_route_socket { bind create nlmsg_write read write };
+
+allow ip_link_add kernel:system module_request;
diff --git a/temp/shared/sepolicy/vendor/kernel.te b/temp/shared/sepolicy/vendor/kernel.te
new file mode 100644
index 0000000..b4eec4b
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/kernel.te
@@ -0,0 +1,19 @@
+# kernel domain is used for all processes started before Android init installs SELinux policy.
+# Normally, no processes should be in this domain because clumping multiple processes into a single
+# SELinux domain overprivileges each of those processes.
+
+# TODO(b/65049764): Get rid of the hostapd instance started before Android init
+net_domain(kernel)
+allow kernel self:capability net_admin;
+allow kernel self:netlink_socket create_socket_perms_no_ioctl;
+allow kernel tmpfs:dir search;
+
+# TODO(b/65049764): Get rid of GCE proxy and similar daemons started before Android init
+# gce.meta.proxy and gce.ex.outer write to /dev/console which for some reason does not appear
+# labelled as console_device although it is labeled as such on the filesystem.
+allow kernel rootfs:chr_file write;
+
+# kdevtmpfs accesses devices before ueventd runs restorecon and relabels devices
+allow kernel device:chr_file { create setattr getattr unlink };
+allow kernel device:dir create_dir_perms;
+allow kernel self:capability mknod;
diff --git a/temp/shared/sepolicy/vendor/libcuttlefish_rild.te b/temp/shared/sepolicy/vendor/libcuttlefish_rild.te
new file mode 100644
index 0000000..8894919
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/libcuttlefish_rild.te
@@ -0,0 +1,15 @@
+type libcuttlefish_rild, domain;
+type libcuttlefish_rild_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(libcuttlefish_rild)
+
+hal_server_domain(libcuttlefish_rild, hal_telephony)
+
+allow libcuttlefish_rild libcuttlefish_rild_device:chr_file rw_file_perms;
+
+# Failing to create these sockets appears to be non-fatal
+net_domain(libcuttlefish_rild)
+
+get_prop(libcuttlefish_rild, cuttlefish_config_server_port_prop)
+
+allow libcuttlefish_rild self:{ socket vsock_socket } create_socket_perms_no_ioctl;
diff --git a/temp/shared/sepolicy/vendor/logpersist.te b/temp/shared/sepolicy/vendor/logpersist.te
new file mode 100644
index 0000000..7152409
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/logpersist.te
@@ -0,0 +1,8 @@
+# Output to virtual serial console. Needed because seriallogging daemon
+# runs logcat and directs its output to vportXpY or cf_logcat_pipe under
+# the /dev filesystem.
+allow logpersist device:dir r_dir_perms;
+allow logpersist device:fifo_file ra_file_perms;
+allow logpersist virtual_serial_device:chr_file ra_file_perms;
+
+allowxperm logpersist device:fifo_file ioctl F2FS_IOC_SET_PIN_FILE;
diff --git a/temp/shared/sepolicy/vendor/mediacodec.te b/temp/shared/sepolicy/vendor/mediacodec.te
new file mode 100644
index 0000000..e26f128
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/mediacodec.te
@@ -0,0 +1 @@
+allow mediacodec system_file:dir r_dir_perms;
diff --git a/temp/shared/sepolicy/vendor/netd.te b/temp/shared/sepolicy/vendor/netd.te
new file mode 100644
index 0000000..238668c
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/netd.te
@@ -0,0 +1,5 @@
+# Don't log denials to do with loading kernel modules.
+# These are currently for modules such as
+# netdev-dummy0, dummy0, net-pf-16-proto-5.
+dontaudit netd self:capability sys_module;
+dontaudit netd kernel:system module_request;
diff --git a/temp/shared/sepolicy/vendor/platform_app.te b/temp/shared/sepolicy/vendor/platform_app.te
new file mode 100644
index 0000000..775e964
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/platform_app.te
@@ -0,0 +1 @@
+gpu_access(platform_app)
diff --git a/temp/shared/sepolicy/vendor/priv_app.te b/temp/shared/sepolicy/vendor/priv_app.te
new file mode 100644
index 0000000..7de36ab
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/priv_app.te
@@ -0,0 +1,6 @@
+gpu_access(priv_app)
+get_prop(priv_app, hal_camera_prop)
+# b/142672293: No other priv-app should need this allow rule now and GMS core runs in its own domain.
+userdebug_or_eng(`
+  auditallow priv_app hal_camera_prop:file { getattr open read map };
+')
diff --git a/temp/shared/sepolicy/vendor/property.te b/temp/shared/sepolicy/vendor/property.te
new file mode 100644
index 0000000..19e3896
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/property.te
@@ -0,0 +1 @@
+type cuttlefish_config_server_port_prop, property_type;
diff --git a/temp/shared/sepolicy/vendor/property_contexts b/temp/shared/sepolicy/vendor/property_contexts
new file mode 100644
index 0000000..ac64ad9
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/property_contexts
@@ -0,0 +1,24 @@
+bt.rootcanal_mac_address  u:object_r:hal_bluetooth_sim_prop:s0
+bt.rootcanal_test_console  u:object_r:hal_bluetooth_sim_prop:s0
+qemu.sf.back_camera_caps  u:object_r:hal_camera_prop:s0
+qemu.sf.front_camera_caps  u:object_r:hal_camera_prop:s0
+qemu.sf.fake_camera  u:object_r:hal_camera_prop:s0
+ro.boot.cuttlefish_config_server_port  u:object_r:cuttlefish_config_server_port_prop:s0
+ro.boot.fstab_name u:object_r:cf_fstab_name_prop:s0 exact string
+ro.boot.hardware.egl u:object_r:cf_graphics_config_prop:s0 exact string
+ro.boot.hardware.gralloc u:object_r:cf_graphics_config_prop:s0 exact string
+ro.boot.hardware.hwcomposer u:object_r:cf_graphics_config_prop:s0 exact string
+ro.boot.hardware.vulkan u:object_r:cf_graphics_config_prop:s0 exact string
+ro.boot.lcd_density u:object_r:cf_graphics_config_prop:s0 exact int
+ro.boot.vsock_frames_port  u:object_r:vsock_frames_port_prop:s0
+ro.boot.vsock_keyboard_port  u:object_r:cuttlefish_vsock_keyboard_port:s0
+ro.boot.vsock_logcat_port  u:object_r:vsock_logcat_port_prop:s0
+ro.boot.vsock_touch_port  u:object_r:cuttlefish_vsock_touch_port:s0
+ro.cdma.home.operator.alpha  u:object_r:vendor_init_radio_prop:s0
+ro.cdma.home.operator.numeric  u:object_r:vendor_init_radio_prop:s0
+sys.cf.ser.  u:object_r:sys_cf_ser_prop:s0
+vendor.ser.  u:object_r:vendor_ser_prop:s0
+vendor.vsock_logcat_status  u:object_r:vsock_logcat_status_prop:s0
+hwc.drm.device u:object_r:cf_graphics_config_prop:s0 exact string
+hwc.drm.exclude_non_hwfb_imports u:object_r:cf_graphics_config_prop:s0 exact int
+hwc.drm.use_overlay_planes u:object_r:cf_graphics_config_prop:s0 exact int
diff --git a/temp/shared/sepolicy/vendor/recovery.te b/temp/shared/sepolicy/vendor/recovery.te
new file mode 100644
index 0000000..d72dc64
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/recovery.te
@@ -0,0 +1,3 @@
+allow recovery gpu_device:chr_file rw_file_perms;
+
+allow recovery appdomain_tmpfs:file r_file_perms;
diff --git a/temp/shared/sepolicy/vendor/rename_netiface.te b/temp/shared/sepolicy/vendor/rename_netiface.te
new file mode 100644
index 0000000..1ec0f06
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/rename_netiface.te
@@ -0,0 +1,10 @@
+type rename_netiface, domain;
+type rename_netiface_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(rename_netiface)
+
+allow rename_netiface self:capability { net_admin net_raw sys_module };
+allow rename_netiface self:udp_socket { create ioctl };
+allow rename_netiface self:netlink_route_socket { bind create nlmsg_write read write };
+
+allow rename_netiface kernel:system module_request;
diff --git a/temp/shared/sepolicy/vendor/seapp_contexts b/temp/shared/sepolicy/vendor/seapp_contexts
new file mode 100644
index 0000000..e325c99
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/seapp_contexts
@@ -0,0 +1,2 @@
+# GceService app
+user=system seinfo=platform name=com.android.google.gce.gceservice domain=gceservice type=app_data_file
diff --git a/temp/shared/sepolicy/vendor/service.te b/temp/shared/sepolicy/vendor/service.te
new file mode 100644
index 0000000..67d7939
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/service.te
@@ -0,0 +1,2 @@
+# Binder service types
+type gce_service,               service_manager_type;
diff --git a/temp/shared/sepolicy/vendor/service_contexts b/temp/shared/sepolicy/vendor/service_contexts
new file mode 100644
index 0000000..5a5ed00
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/service_contexts
@@ -0,0 +1,2 @@
+# Binder service mappings
+gce                                       u:object_r:gce_service:s0
diff --git a/temp/shared/sepolicy/vendor/setup_wifi.te b/temp/shared/sepolicy/vendor/setup_wifi.te
new file mode 100644
index 0000000..e6ec279
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/setup_wifi.te
@@ -0,0 +1,10 @@
+type setup_wifi, domain;
+type setup_wifi_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(setup_wifi)
+
+allow setup_wifi self:capability { net_admin net_raw sys_module };
+allow setup_wifi self:udp_socket { create ioctl };
+allow setup_wifi self:netlink_route_socket { bind create nlmsg_write read write };
+
+allow setup_wifi kernel:system module_request;
diff --git a/temp/shared/sepolicy/vendor/shell.te b/temp/shared/sepolicy/vendor/shell.te
new file mode 100644
index 0000000..ea0ee61
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/shell.te
@@ -0,0 +1 @@
+allow shell serial_device:chr_file { getattr ioctl read write };
diff --git a/temp/shared/sepolicy/vendor/socket_vsock_proxy.te b/temp/shared/sepolicy/vendor/socket_vsock_proxy.te
new file mode 100644
index 0000000..eaca909
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/socket_vsock_proxy.te
@@ -0,0 +1,11 @@
+type socket_vsock_proxy, domain, netdomain;
+type socket_vsock_proxy_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(socket_vsock_proxy)
+
+allow socket_vsock_proxy self:global_capability_class_set { net_admin net_raw };
+allow socket_vsock_proxy self:{ socket vsock_socket } { create read write listen accept bind };
+
+# TODO: socket returned by accept() has unlabeled context on it. Give it a
+# specific label.
+allow socket_vsock_proxy unlabeled:{ socket vsock_socket } { getopt read write shutdown };
diff --git a/temp/shared/sepolicy/vendor/surfaceflinger.te b/temp/shared/sepolicy/vendor/surfaceflinger.te
new file mode 100644
index 0000000..05774e7
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/surfaceflinger.te
@@ -0,0 +1,5 @@
+allow surfaceflinger self:process execmem;
+
+# Read GCE initial metadata file
+allow surfaceflinger initial_metadata_file:file r_file_perms;
+gpu_access(surfaceflinger)
diff --git a/temp/shared/sepolicy/vendor/system_app.te b/temp/shared/sepolicy/vendor/system_app.te
new file mode 100644
index 0000000..4a85066
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/system_app.te
@@ -0,0 +1 @@
+gpu_access(system_app)
diff --git a/temp/shared/sepolicy/vendor/system_server.te b/temp/shared/sepolicy/vendor/system_server.te
new file mode 100644
index 0000000..23497fc
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/system_server.te
@@ -0,0 +1,8 @@
+# TODO(b/65201432): Switch into enforcing mode once execmem issue due to OpenGL is resolved. Also
+# remove the corresponding dontaudit.
+# The current (at the time of writing) implementation of OpenGL needs to create executable memory.
+# Unfortunately, we cannot grant execmem power using an allow rule because global policy
+# (system/sepolicy) contains a corresponding neverallow which would cause build-time errors if the
+# allow execmem rule were added here.
+permissive system_server;
+gpu_access(system_server)
diff --git a/temp/shared/sepolicy/vendor/te_macros b/temp/shared/sepolicy/vendor/te_macros
new file mode 100644
index 0000000..d49e378
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/te_macros
@@ -0,0 +1,9 @@
+#####################################
+# gpu_access(client_domain)
+# Allow client_domain to communicate with the virgl GPU
+define(`gpu_access', `
+allow $1 gpu_device:dir { open read search };
+allow $1 gpu_device:chr_file { getattr read write };
+allow $1 graphics_device:chr_file { getattr };
+allow $1 sysfs_gpu:file { getattr open read };
+')
diff --git a/temp/shared/sepolicy/vendor/ueventd.te b/temp/shared/sepolicy/vendor/ueventd.te
new file mode 100644
index 0000000..985c8ec
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/ueventd.te
@@ -0,0 +1 @@
+allow ueventd metadata_file:dir search;
diff --git a/temp/shared/sepolicy/vendor/untrusted_app_all.te b/temp/shared/sepolicy/vendor/untrusted_app_all.te
new file mode 100644
index 0000000..c429fc2
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/untrusted_app_all.te
@@ -0,0 +1 @@
+gpu_access(untrusted_app_all)
diff --git a/temp/shared/sepolicy/vendor/usbforward.te b/temp/shared/sepolicy/vendor/usbforward.te
new file mode 100644
index 0000000..6d0833e
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/usbforward.te
@@ -0,0 +1,22 @@
+type usbforward, domain;
+type usbforward_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(usbforward)
+
+# Virtual serial device I/O
+allow usbforward virtual_serial_device:chr_file rw_file_perms;
+
+# USB I/O
+allow usbforward usb_device:dir r_dir_perms;
+allow usbforward usb_device:chr_file rw_file_perms;
+
+# Read /sys/devices/platform/dummy_hcd.0/usb1/1-1/speed. Although this file is labelled
+# It is acceptable to give usbforward this wide access because usbforward is not a stock Android
+# domain and it does not run Android apps. Thus, the laxer access restrictions of this domain
+# do not impact how compatible the resulting Android emulator appears to system services and apps.
+allow usbforward sysfs:file r_file_perms;
+
+# Do not audit attempts to read /dev directory. This access does not appear to be necessary.
+dontaudit usbforward device:dir r_dir_perms;
+
+allow usbforward self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
diff --git a/temp/shared/sepolicy/vendor/vendor_init.te b/temp/shared/sepolicy/vendor/vendor_init.te
new file mode 100644
index 0000000..e57bec0
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/vendor_init.te
@@ -0,0 +1,20 @@
+type vendor_init_radio_prop, property_type;
+type cf_graphics_config_prop, property_type;
+type cf_fstab_name_prop, property_type;
+
+allow vendor_init {
+  audio_device
+  input_events_device
+  libcuttlefish_rild_device
+  region_screen_device
+}:chr_file { getattr };
+
+set_prop(vendor_init, hal_bluetooth_sim_prop)
+
+set_prop(vendor_init, vendor_init_radio_prop)
+
+get_prop(vendor_init, vendor_ser_prop)
+
+get_prop(vendor_init, cf_graphics_config_prop)
+
+get_prop(vendor_init, cf_fstab_name_prop)
diff --git a/temp/shared/sepolicy/vendor/vport_trigger.te b/temp/shared/sepolicy/vendor/vport_trigger.te
new file mode 100644
index 0000000..a21e295
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/vport_trigger.te
@@ -0,0 +1,12 @@
+type vport_trigger, domain;
+type vport_trigger_exec, exec_type, vendor_file_type, file_type;
+
+type sys_cf_ser_prop, property_type;
+type vendor_ser_prop, property_type;
+
+init_daemon_domain(vport_trigger)
+
+r_dir_file(vport_trigger, sysfs_type)
+
+set_prop(vport_trigger, sys_cf_ser_prop)
+set_prop(vport_trigger, vendor_ser_prop)
diff --git a/temp/shared/sepolicy/vendor/vsoc_input_service.te b/temp/shared/sepolicy/vendor/vsoc_input_service.te
new file mode 100644
index 0000000..341e503
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/vsoc_input_service.te
@@ -0,0 +1,22 @@
+type vsoc_input_service, domain;
+type vsoc_input_service_exec, exec_type, vendor_file_type, file_type;
+type cuttlefish_vsock_keyboard_port, property_type;
+type cuttlefish_vsock_touch_port, property_type;
+
+init_daemon_domain(vsoc_input_service)
+
+# I/O with /dev/uinput
+allow vsoc_input_service uhid_device:chr_file rw_file_perms;
+
+# Framebuffer I/O (needed to obtain the screen size)
+allow vsoc_input_service region_screen_device:chr_file rw_file_perms;
+
+allow vsoc_input_service input_events_device:chr_file rw_file_perms;
+
+net_domain(vsoc_input_service)
+
+get_prop(vsoc_input_service, cuttlefish_config_server_port_prop)
+
+allow vsoc_input_service self:{ socket vsock_socket } create_socket_perms_no_ioctl;
+
+allow vsoc_input_service self:capability net_admin;
diff --git a/temp/shared/sepolicy/vendor/vsock_logcat.te b/temp/shared/sepolicy/vendor/vsock_logcat.te
new file mode 100644
index 0000000..405a362
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/vsock_logcat.te
@@ -0,0 +1,17 @@
+type vsock_logcat, domain;
+type vsock_logcat_exec, exec_type, vendor_file_type, file_type;
+type vsock_logcat_port_prop, property_type;
+type vsock_logcat_status_prop, property_type;
+
+init_daemon_domain(vsock_logcat)
+
+get_prop(vsock_logcat, vsock_logcat_port_prop)
+
+set_prop(vsock_logcat, vendor_ser_prop)
+set_prop(vsock_logcat, vsock_logcat_status_prop)
+
+allow vsock_logcat device:dir w_dir_perms;
+allow vsock_logcat device:fifo_file create_file_perms;
+allow vsock_logcat kmsg_device:chr_file write;
+allow vsock_logcat self:capability net_admin;
+allow vsock_logcat self:{ socket vsock_socket } create_socket_perms_no_ioctl;
diff --git a/temp/shared/sepolicy/vendor/zygote.te b/temp/shared/sepolicy/vendor/zygote.te
new file mode 100644
index 0000000..38b67e0
--- /dev/null
+++ b/temp/shared/sepolicy/vendor/zygote.te
@@ -0,0 +1,3 @@
+# TODO(b/65201432): Remove once execmem issue due to OpenGL is resolved.
+# external/swiftshader commit 10e1f74a65e44daafb6c8f3b10ee69d39a6ca024 triggers execmem in zygote
+allow zygote self:process execmem;
diff --git a/temp/shared/tv/device.mk b/temp/shared/tv/device.mk
new file mode 100644
index 0000000..7e64f45
--- /dev/null
+++ b/temp/shared/tv/device.mk
@@ -0,0 +1,31 @@
+#
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+DEVICE_MANIFEST_FILE += device/google/cuttlefish/shared/config/manifest.xml
+DEVICE_MANIFEST_FILE += device/google/cuttlefish/shared/tv/manifest.xml
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_minimal.mk)
+$(call inherit-product, device/google/cuttlefish/shared/device.mk)
+
+# HDMI CEC HAL
+PRODUCT_PACKAGES += [email protected]
+
+# Tuner HAL
+PRODUCT_PACKAGES += [email protected]
+
+# Enabling managed profiles
+PRODUCT_COPY_FILES += frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml
+DEVICE_PACKAGE_OVERLAYS += device/google/cuttlefish/shared/tv/overlay
diff --git a/temp/shared/tv/manifest.xml b/temp/shared/tv/manifest.xml
new file mode 100644
index 0000000..ba78430
--- /dev/null
+++ b/temp/shared/tv/manifest.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<manifest version="1.0" type="device" target-level="4">
+     <!-- FIXME: Implement tv.cec HAL
+     <hal format="hidl">
+        <name>android.hardware.tv.cec</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IHdmiCec</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+    <!-- FIXME: Implement tv.input HAL
+    <hal format="hidl">
+        <name>android.hardware.tv.input</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>ITvInput</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    -->
+</manifest>
diff --git a/temp/shared/tv/overlay/frameworks/base/core/res/res/values/config.xml b/temp/shared/tv/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..195a8a7
--- /dev/null
+++ b/temp/shared/tv/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2019 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License
+  -->
+<resources>
+    <!--  Maximum number of supported users -->
+    <integer name="config_multiuserMaximumUsers">4</integer>
+</resources>
diff --git a/temp/shared/wpa_supplicant_overlay.conf b/temp/shared/wpa_supplicant_overlay.conf
new file mode 100644
index 0000000..e1f530d
--- /dev/null
+++ b/temp/shared/wpa_supplicant_overlay.conf
@@ -0,0 +1,3 @@
+disable_scan_offload=1
+p2p_disabled=1
+tdls_external_control=1
diff --git a/temp/tests/src/com/android/tests/tombstoneTransmit/TombstoneTransmitTest.java b/temp/tests/src/com/android/tests/tombstoneTransmit/TombstoneTransmitTest.java
new file mode 100644
index 0000000..6be6cf4
--- /dev/null
+++ b/temp/tests/src/com/android/tests/tombstoneTransmit/TombstoneTransmitTest.java
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.tests.tombstoneTransmit;
+
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.device.TestDeviceOptions;
+import com.android.tradefed.device.TestDeviceOptions.InstanceType;
+import com.android.tradefed.util.CommandResult;
+import com.android.tradefed.util.CommandStatus;
+import com.android.tradefed.util.FileUtil;
+import com.android.tradefed.util.StreamUtil;
+import com.android.tradefed.log.LogUtil.CLog;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import java.io.IOException;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Tests the tombstone transfer feature available on cuttlefish devices. This
+ * feature is used to transfer tombstones off the guest as they are created.
+ */
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class TombstoneTransmitTest extends BaseHostJUnit4Test {
+    /** Path on the device containing the tombstones */
+    private static final String TOMBSTONE_PATH = "/data/tombstones/";
+    private static final String TOMBSTONE_PRODUCER = "tombstone_producer";
+    private static final int NUM_TOMBSTONES_IN_TEST = 1000;
+
+    /**
+     * Creates 15 tombstones on the virtual device of varying lenghts.
+     * Each tombstone is expected to be sync'd to the host and checked for integrity.
+     */
+    @Test
+    public void testTombstonesOfVaryingLengths() throws Exception {
+        InstanceType type = getDevice().getOptions().getInstanceType();
+        // It can't be guaranteed that this test is run on a virtual device.
+        if(!InstanceType.CUTTLEFISH.equals(type) && !InstanceType.REMOTE_NESTED_AVD.equals(type)) {
+            CLog.i("This test must be run on a Cuttlefish device. Aborting.");
+            return;
+        } else {
+            CLog.i("This test IS being run on a Cuttlefish device.");
+        }
+
+        clearTombstonesFromCuttlefish();
+        List<String> hostTombstoneListPreTest = convertFileListToStringList(getDevice().getTombstones());
+        List<String> guestTombstoneListPreTest = convertFileListToStringList(getTombstonesViaAdb());
+
+        // Generate tombstones in doubling sizes from 1k to 16M
+        for(int i = 0; i < 15; i++) {
+            generateTombstoneOfLengthInKb((int) Math.pow(2,i));
+        }
+
+        List<String> hostTombstoneListPostTest =
+            convertFileListToStringList(getDevice().getTombstones());
+        List<String> guestTombstoneListPostTest =
+            convertFileListToStringList(getTombstonesViaAdb());
+
+        // Clear out all tombstones pretest.
+        hostTombstoneListPostTest.removeAll(hostTombstoneListPreTest);
+        guestTombstoneListPostTest.removeAll(guestTombstoneListPreTest);
+
+        CLog.i("===========Host Tombstone Statistics===========");
+        printTombstoneListStats(hostTombstoneListPostTest);
+        CLog.i("===========Guest Tombstone Statistics===========");
+        printTombstoneListStats(guestTombstoneListPostTest);
+
+        Assert.assertTrue("Tombstones on guest and host do not match",
+            hostTombstoneListPostTest.containsAll(guestTombstoneListPostTest));
+        Assert.assertEquals("Host does not have expected tombstone count in this iteration",
+            hostTombstoneListPostTest.size(), 15);
+        Assert.assertEquals("Guest does not have expected tombstone count in this iteration",
+            guestTombstoneListPostTest.size(), 15);
+    }
+
+    /**
+     * Triggers 1000 tombstones on the virtual device and verifies the integrity of each one.
+     * Note that the tombstone generation is chunk'd since the virtual device overwrites the oldest
+     * tombstone once the 500th is created (or 50th in the case of most physical devices).
+     */
+    private static final int NUM_TOMBSTONES_PER_LOOP = 500;
+    @Test
+    public void testTombstoneTransmitIntegrity() throws Exception {
+        InstanceType type = getDevice().getOptions().getInstanceType();
+        // It can't be guaranteed that this test is run on a virtual device.
+        if(!InstanceType.CUTTLEFISH.equals(type) && !InstanceType.REMOTE_NESTED_AVD.equals(type)) {
+            CLog.i("This test must be run on a Cuttlefish device. Aborting.");
+            return;
+        } else {
+            CLog.i("This test IS being run on a Cuttlefish device.");
+        }
+
+        for(int i = 0; i < 2; i++) {
+            clearTombstonesFromCuttlefish();
+            List<String> hostTombstoneListPreCrash = convertFileListToStringList(
+                getDevice().getTombstones());
+            List<String> guestTombstoneListPreCrash = convertFileListToStringList(
+                getTombstonesViaAdb());
+
+            for(int j = 0; j < NUM_TOMBSTONES_PER_LOOP; j++) {
+                CommandResult commandResult = getDevice().executeShellV2Command(TOMBSTONE_PRODUCER);
+                Assert.assertEquals(CommandStatus.FAILED, commandResult.getStatus());
+            }
+
+            List<String> hostTombstoneListPostCrash = 
+                convertFileListToStringList(getDevice().getTombstones());
+            List<String> guestTombstoneListPostCrash = 
+                convertFileListToStringList(getTombstonesViaAdb());
+
+            // Clear out all tombstones pretest.
+            hostTombstoneListPostCrash.removeAll(hostTombstoneListPreCrash);
+            guestTombstoneListPostCrash.removeAll(guestTombstoneListPreCrash);
+
+            CLog.i("===========Host Tombstone Statistics===========");
+            printTombstoneListStats(hostTombstoneListPostCrash);
+            CLog.i("===========Guest Tombstone Statistics===========");
+            printTombstoneListStats(guestTombstoneListPostCrash);
+
+            Assert.assertTrue("Tombstones on guest and host do not match",
+                hostTombstoneListPostCrash.containsAll(guestTombstoneListPostCrash));
+            Assert.assertEquals("Host does not have expected tombstone count in this iteration",
+                hostTombstoneListPostCrash.size(), NUM_TOMBSTONES_PER_LOOP);
+            Assert.assertEquals("Guest does not have expected tombstone count in this iteration",
+                guestTombstoneListPostCrash.size(), NUM_TOMBSTONES_PER_LOOP);
+        }
+    }
+
+    public static void printTombstoneListStats(List<String> tList) {
+        CLog.i("List contains %d tombstones.", tList.size());
+
+        int averageTombstoneLength = 0;
+        for(String tombstone: tList) {
+            averageTombstoneLength += tombstone.length();
+        }
+
+        if(tList.size() != 0) {
+            CLog.i("Average tombstone size is %d.", averageTombstoneLength / tList.size());
+        }
+    }
+
+    public void clearTombstonesFromCuttlefish() throws DeviceNotAvailableException {
+        if (!getDevice().isAdbRoot()) {
+            throw new DeviceNotAvailableException("Device was not root, cannot collect tombstones."
+                , getDevice().getSerialNumber());
+        }
+
+        // Clear all tombstones on AVD
+        CommandResult commandResult = getDevice().
+            executeShellV2Command("rm -rf " + TOMBSTONE_PATH + "*");
+        Assert.assertEquals(CommandStatus.SUCCESS, commandResult.getStatus());
+    }
+
+    // This is blatantly copied from tradefed class NativeDevice's version of getTombstones
+    private List<File> getTombstonesViaAdb() throws DeviceNotAvailableException {
+        List<File> tombstones = new ArrayList<>();
+        if (!getDevice().isAdbRoot()) {
+            throw new DeviceNotAvailableException("Device was not root, cannot collect tombstones."
+                , getDevice().getSerialNumber());
+        }
+
+        for (String tombName : getDevice().getChildren(TOMBSTONE_PATH)) {
+            File tombFile = getDevice().pullFile(TOMBSTONE_PATH + tombName);
+            if (tombFile != null) {
+                tombstones.add(tombFile);
+            }
+        }
+        return tombstones;
+    }
+
+    private List<String> convertFileListToStringList(List<File> inputList) throws IOException {
+        List<String> output = new ArrayList<String>();
+        for(File f: inputList) {
+            output.add(convertFileContentsToString(f));
+        }
+
+        return output;
+    }
+
+    private String convertFileContentsToString(File f) throws IOException {
+        StringBuilder stringBuilder = new StringBuilder();
+        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f)));
+        String line;
+        while ((line = br.readLine()) != null) {
+            stringBuilder.append(line).append('\n');
+        }
+
+        return stringBuilder.toString();
+    }
+
+    private void generateTombstoneOfLengthInKb(int requestedLengthInKb) throws DeviceNotAvailableException {
+        if (!getDevice().isAdbRoot()) {
+            throw new DeviceNotAvailableException("Device was not root, cannot generate tombstone."
+                , getDevice().getSerialNumber());
+        }
+
+        // Generate file in directory not monitored by tombstone daemon and then link it into the
+        // tombstone dir.
+        // Context - tombstones are created in a tmp dir and then linked into the tombstones
+        // dir. The tombstone daemon waits for the link inotify event and then copies
+        // the full contents of the linked file to the host.
+        // If the file is instead being written into the tombstones dir on the guest, the integrity
+        // of the file written out on the host side cannot be guaranteed.
+        CommandResult commandResult = getDevice().
+            executeShellV2Command("dd if=/dev/urandom of=/data/tmp-file bs=1K count=" +
+                requestedLengthInKb);
+        Assert.assertEquals(CommandStatus.SUCCESS, commandResult.getStatus());
+
+        commandResult = getDevice().
+            executeShellV2Command("mv /data/tmp-file /data/tombstones/" +
+                System.currentTimeMillis());
+        Assert.assertEquals(CommandStatus.SUCCESS, commandResult.getStatus());
+    }
+}
diff --git a/temp/tests/tombstone-transmit-tests.xml b/temp/tests/tombstone-transmit-tests.xml
new file mode 100644
index 0000000..08e8a25
--- /dev/null
+++ b/temp/tests/tombstone-transmit-tests.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<configuration description="Config for tombstone transfer to host test cases">
+    <option name="test-suite-tag" value="tombstone_transmit_tests" />
+    <option name="test-suite-tag" value="apct" />
+
+    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
+    <test class="com.android.tradefed.testtype.HostTest" >
+         <option name="jar" value="tombstone_transmit_tests.jar" />
+    </test>
+
+</configuration>
+
diff --git a/temp/vsoc_arm64/BoardConfig.mk b/temp/vsoc_arm64/BoardConfig.mk
new file mode 100644
index 0000000..0668328
--- /dev/null
+++ b/temp/vsoc_arm64/BoardConfig.mk
@@ -0,0 +1,35 @@
+#
+# Copyright 2017 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# x86 target for Cuttlefish
+#
+
+-include device/google/cuttlefish/shared/BoardConfig.mk
+
+TARGET_BOARD_PLATFORM := vsoc_arm64
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_VARIANT := cortex-a53
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-a
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+TARGET_2ND_CPU_VARIANT := cortex-a53
+TARGET_TRANSLATE_2ND_ARCH := false
+
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-arm64/*.ko)
diff --git a/temp/vsoc_arm64/device.mk b/temp/vsoc_arm64/device.mk
new file mode 100644
index 0000000..6e0f910
--- /dev/null
+++ b/temp/vsoc_arm64/device.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+PRODUCT_COPY_FILES += device/google/cuttlefish_kernel/4.19-arm64/kernel:kernel
diff --git a/temp/vsoc_arm64/phone/aosp_cf.mk b/temp/vsoc_arm64/phone/aosp_cf.mk
new file mode 100644
index 0000000..ce1947f
--- /dev/null
+++ b/temp/vsoc_arm64/phone/aosp_cf.mk
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# All components inherited here go to system image (same as GSI system)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
+
+PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
+
+#
+# All components inherited here go to system_ext image (same as GSI system_ext)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
+# All components inherited here go to product image (same as GSI product)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# All components inherited here go to vendor image
+#
+$(call inherit-product, device/google/cuttlefish/shared/phone/device_vendor.mk)
+
+#
+# Special settings for the target
+#
+DEVICE_PACKAGE_OVERLAYS += device/google/cuttlefish/vsoc_arm64/phone/overlay
+
+$(call inherit-product, device/google/cuttlefish/vsoc_arm64/device.mk)
+
+
+PRODUCT_NAME := aosp_cf_arm64_phone
+PRODUCT_DEVICE := vsoc_arm64
+PRODUCT_MODEL := Cuttlefish arm64 phone
diff --git a/temp/vsoc_arm64/phone/overlay/frameworks/base/core/res/res/values/config.xml b/temp/vsoc_arm64/phone/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..5455fd4
--- /dev/null
+++ b/temp/vsoc_arm64/phone/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="networkAttributes" translatable="false">
+    <item>"mobile,0,0,0,-1,true"</item>
+    <item>"wifi,1,1,1,-1,true"</item>
+    <item>"mobile_mms,2,0,2,60000,true"</item>
+    <item>"mobile_hipri,5,0,3,60000,true"</item>
+    <item>"bluetooth,7,7,2,-1,true"</item>
+  </string-array>
+  <string-array name="radioAttributes" translatable="false">
+    <item>"0,1"</item>
+    <item>"1,1"</item>
+    <item>"4,1"</item>
+    <item>"7,1"</item>
+    <item>"11,1"</item>
+  </string-array>
+  <string-array name="config_tether_wifi_regexs" translatable="false">
+    <item>"wlan0"</item>
+  </string-array>
+  <string-array name="config_tether_apndata" translatable="false">
+    <item>Android,android,,,,,,,,311,740,,default,dun,ims</item>
+  </string-array>
+  <bool name="config_bluetooth_address_validation" translatable="false">true</bool>
+  <bool name="config_sms_capable" translatable="false">true</bool>
+  <string name="default_sms_application" translatable="false">com.android.mms</string>
+  <bool name="config_showNavigationBar" translatable="false">true</bool>
+  <dimen name="config_viewConfigurationTouchSlop" translatable="false">12dp</dimen>
+  <integer name="config_mobile_mtu" translatable="false">1460</integer>
+  <!--  Maximum number of supported users -->
+  <integer name="config_multiuserMaximumUsers" translatable="false">4</integer>
+</resources>
diff --git a/temp/vsoc_x86/BoardConfig.mk b/temp/vsoc_x86/BoardConfig.mk
new file mode 100644
index 0000000..d4b1772
--- /dev/null
+++ b/temp/vsoc_x86/BoardConfig.mk
@@ -0,0 +1,34 @@
+#
+# Copyright 2017 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# x86 target for Cuttlefish
+#
+
+-include device/google/cuttlefish/shared/BoardConfig.mk
+
+TARGET_BOARD_PLATFORM := vsoc_x86
+TARGET_ARCH := x86
+TARGET_ARCH_VARIANT := x86
+TARGET_CPU_ABI := x86
+
+TARGET_NATIVE_BRIDGE_ARCH := arm
+TARGET_NATIVE_BRIDGE_ARCH_VARIANT := armv7-a-neon
+TARGET_NATIVE_BRIDGE_CPU_VARIANT := generic
+TARGET_NATIVE_BRIDGE_ABI := armeabi-v7a armeabi
+
+BUILD_BROKEN_DUP_RULES := true
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-x86_64/*.ko)
diff --git a/temp/vsoc_x86/auto/device.mk b/temp/vsoc_x86/auto/device.mk
new file mode 100644
index 0000000..72adfdd
--- /dev/null
+++ b/temp/vsoc_x86/auto/device.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, device/google/cuttlefish/shared/auto/device.mk)
+$(call inherit-product, device/google/cuttlefish/vsoc_x86/device.mk)
+
+PRODUCT_NAME := aosp_cf_x86_auto
+PRODUCT_DEVICE := vsoc_x86
+PRODUCT_MODEL := Cuttlefish x86 auto
+PRODUCT_PACKAGE_OVERLAYS += device/google/cuttlefish/vsoc_x86/auto/overlay
diff --git a/temp/vsoc_x86/auto/overlay/frameworks/base/core/res/res/values/config.xml b/temp/vsoc_x86/auto/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..b3a4b68
--- /dev/null
+++ b/temp/vsoc_x86/auto/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <!-- Enable multi-user. -->
+  <bool name="config_enableMultiUserUI" translatable="false">true</bool>
+  <!-- If true, all guest users created on the device will be ephemeral. -->
+  <bool name="config_guestUserEphemeral" translatable="false">true</bool>
+  <!--  Maximum number of users allowed on the device. -->
+  <integer name="config_multiuserMaximumUsers" translatable="false">4</integer>
+</resources>
diff --git a/temp/vsoc_x86/device.mk b/temp/vsoc_x86/device.mk
new file mode 100644
index 0000000..ead090e
--- /dev/null
+++ b/temp/vsoc_x86/device.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+PRODUCT_COPY_FILES += device/google/cuttlefish_kernel/4.19-x86_64/kernel:kernel
diff --git a/temp/vsoc_x86/go_512_phone/device.mk b/temp/vsoc_x86/go_512_phone/device.mk
new file mode 100644
index 0000000..b33d06e
--- /dev/null
+++ b/temp/vsoc_x86/go_512_phone/device.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2018 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, device/google/cuttlefish/shared/go_512/device.mk)
+$(call inherit-product, device/google/cuttlefish/vsoc_x86/phone/device.mk)
+
+PRODUCT_NAME := aosp_cf_x86_go_512_phone
+PRODUCT_DEVICE := vsoc_x86
+PRODUCT_MODEL := Cuttlefish x86 Go 512 phone
+PRODUCT_PACKAGE_OVERLAYS := device/google/cuttlefish/vsoc_x86/phone/overlay
diff --git a/temp/vsoc_x86/go_phone/device.mk b/temp/vsoc_x86/go_phone/device.mk
new file mode 100644
index 0000000..b61edc5
--- /dev/null
+++ b/temp/vsoc_x86/go_phone/device.mk
@@ -0,0 +1,24 @@
+#
+# Copyright (C) 2018 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, device/google/cuttlefish/shared/go/device.mk)
+$(call inherit-product, device/google/cuttlefish/vsoc_x86/phone/device.mk)
+$(call inherit-product, device/google/cuttlefish/vsoc_x86/device.mk)
+
+PRODUCT_NAME := aosp_cf_x86_go_phone
+PRODUCT_DEVICE := vsoc_x86
+PRODUCT_MODEL := Cuttlefish x86 Go phone
+PRODUCT_PACKAGE_OVERLAYS := device/google/cuttlefish/vsoc_x86/phone/overlay
diff --git a/temp/vsoc_x86/pasan/aosp_cf.mk b/temp/vsoc_x86/pasan/aosp_cf.mk
new file mode 100644
index 0000000..e6b2adc
--- /dev/null
+++ b/temp/vsoc_x86/pasan/aosp_cf.mk
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# All components inherited here go to system image (same as GSI system)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
+
+PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
+
+#
+# All components inherited here go to system_ext image (same as GSI system_ext)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
+# All components inherited here go to product image (same as GSI product)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# All components inherited here go to vendor image
+#
+$(call inherit-product, device/google/cuttlefish/shared/phone/device_vendor.mk)
+
+#
+# Special settings for the target
+#
+DEVICE_PACKAGE_OVERLAYS += device/google/cuttlefish/vsoc_x86/phone/overlay
+
+$(call inherit-product, device/google/cuttlefish/vsoc_x86/device.mk)
+
+
+PRODUCT_NAME := aosp_cf_x86_pasan
+PRODUCT_DEVICE := vsoc_x86
+PRODUCT_MODEL := Cuttlefish x86 phone
diff --git a/temp/vsoc_x86/phone/aosp_cf.mk b/temp/vsoc_x86/phone/aosp_cf.mk
new file mode 100644
index 0000000..2d75b08
--- /dev/null
+++ b/temp/vsoc_x86/phone/aosp_cf.mk
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# All components inherited here go to system image (same as GSI system)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
+
+PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
+
+#
+# All components inherited here go to system_ext image (same as GSI system_ext)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
+# All components inherited here go to product image (same as GSI product)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# All components inherited here go to vendor image
+#
+$(call inherit-product, device/google/cuttlefish/shared/phone/device_vendor.mk)
+
+#
+# Special settings for the target
+#
+DEVICE_PACKAGE_OVERLAYS += device/google/cuttlefish/vsoc_x86/phone/overlay
+
+$(call inherit-product, device/google/cuttlefish/vsoc_x86/device.mk)
+
+# Exclude features that are not available on AOSP devices.
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/aosp_excluded_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/aosp_excluded_hardware.xml
+
+PRODUCT_NAME := aosp_cf_x86_phone
+PRODUCT_DEVICE := vsoc_x86
+PRODUCT_MODEL := Cuttlefish x86 phone
diff --git a/temp/vsoc_x86/phone/device.mk b/temp/vsoc_x86/phone/device.mk
new file mode 100644
index 0000000..a3caa19
--- /dev/null
+++ b/temp/vsoc_x86/phone/device.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, device/google/cuttlefish/shared/phone/device.mk)
+$(call inherit-product, device/google/cuttlefish/vsoc_x86/device.mk)
+
+PRODUCT_NAME := aosp_cf_x86_phone
+PRODUCT_DEVICE := vsoc_x86
+PRODUCT_MODEL := Cuttlefish x86 phone
+PRODUCT_PACKAGE_OVERLAYS := device/google/cuttlefish/vsoc_x86/phone/overlay
diff --git a/temp/vsoc_x86/phone/overlay/frameworks/base/core/res/res/values/config.xml b/temp/vsoc_x86/phone/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..5455fd4
--- /dev/null
+++ b/temp/vsoc_x86/phone/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="networkAttributes" translatable="false">
+    <item>"mobile,0,0,0,-1,true"</item>
+    <item>"wifi,1,1,1,-1,true"</item>
+    <item>"mobile_mms,2,0,2,60000,true"</item>
+    <item>"mobile_hipri,5,0,3,60000,true"</item>
+    <item>"bluetooth,7,7,2,-1,true"</item>
+  </string-array>
+  <string-array name="radioAttributes" translatable="false">
+    <item>"0,1"</item>
+    <item>"1,1"</item>
+    <item>"4,1"</item>
+    <item>"7,1"</item>
+    <item>"11,1"</item>
+  </string-array>
+  <string-array name="config_tether_wifi_regexs" translatable="false">
+    <item>"wlan0"</item>
+  </string-array>
+  <string-array name="config_tether_apndata" translatable="false">
+    <item>Android,android,,,,,,,,311,740,,default,dun,ims</item>
+  </string-array>
+  <bool name="config_bluetooth_address_validation" translatable="false">true</bool>
+  <bool name="config_sms_capable" translatable="false">true</bool>
+  <string name="default_sms_application" translatable="false">com.android.mms</string>
+  <bool name="config_showNavigationBar" translatable="false">true</bool>
+  <dimen name="config_viewConfigurationTouchSlop" translatable="false">12dp</dimen>
+  <integer name="config_mobile_mtu" translatable="false">1460</integer>
+  <!--  Maximum number of supported users -->
+  <integer name="config_multiuserMaximumUsers" translatable="false">4</integer>
+</resources>
diff --git a/temp/vsoc_x86/tv/device.mk b/temp/vsoc_x86/tv/device.mk
new file mode 100644
index 0000000..7689ee3
--- /dev/null
+++ b/temp/vsoc_x86/tv/device.mk
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, device/google/cuttlefish/shared/tv/device.mk)
+$(call inherit-product, device/google/cuttlefish/vsoc_x86/device.mk)
+
+PRODUCT_NAME := aosp_cf_x86_tv
+PRODUCT_DEVICE := vsoc_x86
+PRODUCT_MODEL := Cuttlefish x86 tv
+# PRODUCT_PACKAGE_OVERLAYS := device/google/cuttlefish/vsoc_x86/tv/overlay
diff --git a/temp/vsoc_x86_64/BoardConfig.mk b/temp/vsoc_x86_64/BoardConfig.mk
new file mode 100644
index 0000000..90ab500
--- /dev/null
+++ b/temp/vsoc_x86_64/BoardConfig.mk
@@ -0,0 +1,44 @@
+#
+# Copyright 2017 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# x86_64  target for Cuttlefish
+#
+
+-include device/google/cuttlefish/shared/BoardConfig.mk
+
+TARGET_BOARD_PLATFORM := vsoc_x86_64
+TARGET_ARCH := x86_64
+TARGET_ARCH_VARIANT := silvermont
+TARGET_CPU_ABI := x86_64
+
+TARGET_2ND_ARCH := x86
+TARGET_2ND_CPU_ABI := x86
+TARGET_2ND_ARCH_VARIANT := silvermont
+TARGET_2ND_CPU_VARIANT := silvermont
+
+TARGET_NATIVE_BRIDGE_ARCH := arm64
+TARGET_NATIVE_BRIDGE_ARCH_VARIANT := armv8-a
+TARGET_NATIVE_BRIDGE_CPU_VARIANT := generic
+TARGET_NATIVE_BRIDGE_ABI := arm64-v8a
+
+TARGET_NATIVE_BRIDGE_2ND_ARCH := arm
+TARGET_NATIVE_BRIDGE_2ND_ARCH_VARIANT := armv7-a-neon
+TARGET_NATIVE_BRIDGE_2ND_CPU_VARIANT := generic
+TARGET_NATIVE_BRIDGE_2ND_ABI := armeabi-v7a armeabi
+
+BUILD_BROKEN_DUP_RULES := true
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-x86_64/*.ko)
diff --git a/temp/vsoc_x86_64/device.mk b/temp/vsoc_x86_64/device.mk
new file mode 100644
index 0000000..ead090e
--- /dev/null
+++ b/temp/vsoc_x86_64/device.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+PRODUCT_COPY_FILES += device/google/cuttlefish_kernel/4.19-x86_64/kernel:kernel
diff --git a/temp/vsoc_x86_64/phone/aosp_cf.mk b/temp/vsoc_x86_64/phone/aosp_cf.mk
new file mode 100644
index 0000000..791a720
--- /dev/null
+++ b/temp/vsoc_x86_64/phone/aosp_cf.mk
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# All components inherited here go to system image (same as GSI system)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
+
+PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
+
+#
+# All components inherited here go to system_ext image (same as GSI system_ext)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
+# All components inherited here go to product image (same as GSI product)
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# All components inherited here go to vendor image
+#
+$(call inherit-product, device/google/cuttlefish/shared/phone/device_vendor.mk)
+
+#
+# Special settings for the target
+#
+DEVICE_PACKAGE_OVERLAYS += device/google/cuttlefish/vsoc_x86_64/phone/overlay
+
+$(call inherit-product, device/google/cuttlefish/vsoc_x86_64/device.mk)
+
+
+PRODUCT_NAME := aosp_cf_x86_64_phone
+PRODUCT_DEVICE := vsoc_x86_64
+PRODUCT_MODEL := Cuttlefish x86_64 phone
diff --git a/temp/vsoc_x86_64/phone/overlay/frameworks/base/core/res/res/values/config.xml b/temp/vsoc_x86_64/phone/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..36184c8
--- /dev/null
+++ b/temp/vsoc_x86_64/phone/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License")
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string-array name="networkAttributes" translatable="false">
+    <item>"mobile,0,0,0,-1,true"</item>
+    <item>"wifi,1,1,1,-1,true"</item>
+    <item>"mobile_mms,2,0,2,60000,true"</item>
+    <item>"mobile_hipri,5,0,3,60000,true"</item>
+    <item>"bluetooth,7,7,2,-1,true"</item>
+  </string-array>
+  <string-array name="radioAttributes" translatable="false">
+    <item>"0,1"</item>
+    <item>"1,1"</item>
+    <item>"4,1"</item>
+    <item>"7,1"</item>
+    <item>"11,1"</item>
+  </string-array>
+  <string-array name="config_tether_wifi_regexs" translatable="false">
+    <item>"wlan0"</item>
+  </string-array>
+  <string-array name="config_tether_apndata" translatable="false">
+    <item>Android,android,,,,,,,,302,780,,default,dun,ims</item>
+  </string-array>
+  <bool name="config_bluetooth_address_validation" translatable="false">true</bool>
+  <bool name="config_sms_capable" translatable="false">true</bool>
+  <string name="default_sms_application" translatable="false">com.android.mms</string>
+  <bool name="config_showNavigationBar" translatable="false">true</bool>
+  <dimen name="config_viewConfigurationTouchSlop" translatable="false">12dp</dimen>
+  <integer name="config_mobile_mtu" translatable="false">1460</integer>
+  <!--  Maximum number of supported users -->
+  <integer name="config_multiuserMaximumUsers" translatable="false">4</integer>
+</resources>
diff --git a/temp/vsoc_x86_noapex/BoardConfig.mk b/temp/vsoc_x86_noapex/BoardConfig.mk
new file mode 100644
index 0000000..906129e
--- /dev/null
+++ b/temp/vsoc_x86_noapex/BoardConfig.mk
@@ -0,0 +1,24 @@
+#
+# Copyright 2019 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# x86 target for Cuttlefish that doesn't support APEX.
+#
+
+include device/google/cuttlefish/vsoc_x86/BoardConfig.mk
+
+TARGET_FLATTEN_APEX := true
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-x86_64/*.ko)
diff --git a/temp/vsoc_x86_noapex/aosp_cf_noapex.mk b/temp/vsoc_x86_noapex/aosp_cf_noapex.mk
new file mode 100644
index 0000000..fcf7607
--- /dev/null
+++ b/temp/vsoc_x86_noapex/aosp_cf_noapex.mk
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Order of this and the following statements is important.
+# Putting this first in the list takes precedence over the one inherited from
+# aosp_cf.
+PRODUCT_PROPERTY_OVERRIDES += ro.apex.updatable=false
+
+$(call inherit-product, device/google/cuttlefish/vsoc_x86/phone/aosp_cf.mk)
+
+PRODUCT_NAME := aosp_cf_x86_phone_noapex
+PRODUCT_DEVICE := vsoc_x86_noapex
+PRODUCT_MODEL := Cuttlefish x86 phone without APEX support