Merge "Update cuttlefish to use 1.3 NNAPI sample drivers"
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..232cc77
--- /dev/null
+++ b/README.md
@@ -0,0 +1,41 @@
+# So you want to try cuttlefish?
+
+1. Go to http://ci.android.com/
+2. Enter a branch name. Start with `aosp-master` if you don't know what you're
+   looking for
+3. Navigate to `aosp_cf_x86_phone` and click on `userdebug` for the latest build
+4. Click on `Artifacts`
+5. 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
+6. Scroll down to `cvd-host_package.tar.gz`. You should always download a host
+   package from the same build as your images.
+7. On your local system, combine the packages:
+
+   `$ 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/host_package.mk b/host_package.mk
index 815af3b..cd47c1e 100644
--- a/host_package.mk
+++ b/host_package.mk
@@ -86,6 +86,7 @@
     libcuttlefish_device_config.so \
     cdisk_spec.so \
     libprotobuf-cpp-full.so \
+    libziparchive.so \
 
 
 cvd_host_package_files := \
diff --git a/shared/BoardConfig.mk b/shared/BoardConfig.mk
index d41ef0e..97a073f 100644
--- a/shared/BoardConfig.mk
+++ b/shared/BoardConfig.mk
@@ -60,8 +60,8 @@
 # The compiler will occasionally generate movaps, etc.
 BOARD_MALLOC_ALIGNMENT := 16
 
-# Make the userdata partition 4G to accomodate ASAN and CTS
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 4294967296
+# 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
@@ -140,10 +140,10 @@
 
 TARGET_RECOVERY_FSTAB ?= device/google/cuttlefish/shared/config/fstab
 
-BOARD_SUPER_PARTITION_SIZE := 6442450944
+BOARD_SUPER_PARTITION_SIZE := 6174015488
 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_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 6174015488
 BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
 BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
 TARGET_RELEASETOOLS_EXTENSIONS := device/google/cuttlefish/shared
diff --git a/shared/sepolicy/vendor/genfs_contexts b/shared/sepolicy/vendor/genfs_contexts
index 20fc2d6..28f55bf 100644
--- a/shared/sepolicy/vendor/genfs_contexts
+++ b/shared/sepolicy/vendor/genfs_contexts
@@ -1,5 +1,7 @@
 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
diff --git a/vsoc_arm64/BoardConfig.mk b/vsoc_arm64/BoardConfig.mk
index 101eb5f..0668328 100644
--- a/vsoc_arm64/BoardConfig.mk
+++ b/vsoc_arm64/BoardConfig.mk
@@ -32,5 +32,4 @@
 TARGET_2ND_CPU_VARIANT := cortex-a53
 TARGET_TRANSLATE_2ND_ARCH := false
 
-BOARD_VENDOR_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-arm64/*.ko)
-BOARD_VENDOR_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/mainline-arm64/*.ko)
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-arm64/*.ko)
diff --git a/vsoc_arm64/device.mk b/vsoc_arm64/device.mk
index 2433569..6e0f910 100644
--- a/vsoc_arm64/device.mk
+++ b/vsoc_arm64/device.mk
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-PRODUCT_COPY_FILES += device/google/cuttlefish_kernel/4.14-arm64/kernel:kernel
+PRODUCT_COPY_FILES += device/google/cuttlefish_kernel/4.19-arm64/kernel:kernel
diff --git a/vsoc_x86/BoardConfig.mk b/vsoc_x86/BoardConfig.mk
index 7e6a7da..d4b1772 100644
--- a/vsoc_x86/BoardConfig.mk
+++ b/vsoc_x86/BoardConfig.mk
@@ -31,5 +31,4 @@
 TARGET_NATIVE_BRIDGE_ABI := armeabi-v7a armeabi
 
 BUILD_BROKEN_DUP_RULES := true
-BOARD_VENDOR_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-x86_64/*.ko)
-BOARD_VENDOR_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/mainline-x86_64/*.ko)
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-x86_64/*.ko)
diff --git a/vsoc_x86/device.mk b/vsoc_x86/device.mk
index ed4433a..ead090e 100644
--- a/vsoc_x86/device.mk
+++ b/vsoc_x86/device.mk
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-PRODUCT_COPY_FILES += device/google/cuttlefish_kernel/4.14-x86_64/kernel:kernel
+PRODUCT_COPY_FILES += device/google/cuttlefish_kernel/4.19-x86_64/kernel:kernel
diff --git a/vsoc_x86_64/BoardConfig.mk b/vsoc_x86_64/BoardConfig.mk
index c1c26f3..90ab500 100644
--- a/vsoc_x86_64/BoardConfig.mk
+++ b/vsoc_x86_64/BoardConfig.mk
@@ -41,5 +41,4 @@
 TARGET_NATIVE_BRIDGE_2ND_ABI := armeabi-v7a armeabi
 
 BUILD_BROKEN_DUP_RULES := true
-BOARD_VENDOR_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-x86_64/*.ko)
-BOARD_VENDOR_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/mainline-x86_64/*.ko)
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-x86_64/*.ko)
diff --git a/vsoc_x86_64/device.mk b/vsoc_x86_64/device.mk
index ed4433a..ead090e 100644
--- a/vsoc_x86_64/device.mk
+++ b/vsoc_x86_64/device.mk
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-PRODUCT_COPY_FILES += device/google/cuttlefish_kernel/4.14-x86_64/kernel:kernel
+PRODUCT_COPY_FILES += device/google/cuttlefish_kernel/4.19-x86_64/kernel:kernel
diff --git a/vsoc_x86_noapex/BoardConfig.mk b/vsoc_x86_noapex/BoardConfig.mk
index c29877c..906129e 100644
--- a/vsoc_x86_noapex/BoardConfig.mk
+++ b/vsoc_x86_noapex/BoardConfig.mk
@@ -21,5 +21,4 @@
 include device/google/cuttlefish/vsoc_x86/BoardConfig.mk
 
 TARGET_FLATTEN_APEX := true
-BOARD_VENDOR_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-x86_64/*.ko)
-BOARD_VENDOR_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/mainline-x86_64/*.ko)
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(wildcard device/google/cuttlefish_kernel/4.19-x86_64/*.ko)