Merge "Set ro.hardware.vulkan in crosvm and qemu"
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 2d5fb85..ef710ca 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -6,18 +6,6 @@
   ],
   "presubmit": [
     {
-      "name": "circqueue_test",
-      "host": true
-    },
-    {
-      "name": "lock_test",
-      "host": true
-    },
-    {
-      "name": "vsoc_graphics_test",
-      "host": true
-    },
-    {
       "name": "vts_treble_vintf_framework_test"
     },
     {
diff --git a/common/frontend/socket_vsock_proxy/Android.bp b/common/frontend/socket_vsock_proxy/Android.bp
index d079e20..310244a 100644
--- a/common/frontend/socket_vsock_proxy/Android.bp
+++ b/common/frontend/socket_vsock_proxy/Android.bp
@@ -19,7 +19,6 @@
         "main.cpp",
     ],
     shared_libs: [
-        "cuttlefish_auto_resources",
         "libbase",
         "libcuttlefish_fs",
         "libcuttlefish_utils",
diff --git a/common/libs/Android.bp b/common/libs/Android.bp
index e70e6ab..40b7f0c 100644
--- a/common/libs/Android.bp
+++ b/common/libs/Android.bp
@@ -14,7 +14,6 @@
 // limitations under the License.
 
 subdirs = [
-    "auto_resources",
     "device_config",
     "fs",
     "net",
diff --git a/common/libs/auto_resources/Android.bp b/common/libs/auto_resources/Android.bp
deleted file mode 100644
index f943211..0000000
--- a/common/libs/auto_resources/Android.bp
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// 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.
-
-cc_library {
-    name: "cuttlefish_auto_resources",
-    srcs: [
-        "auto_resources.cpp",
-    ],
-    defaults: ["cuttlefish_host_and_guest"],
-}
-
-cc_library_static {
-    name: "cuttlefish_auto_resources_product",
-    srcs: [
-        "auto_resources.cpp",
-    ],
-    defaults: ["cuttlefish_guest_product_only"],
-}
-
-cc_test_host {
-    name: "auto_free_buffer_test",
-    srcs: [
-        "auto_free_buffer_test.cpp",
-    ],
-    shared_libs: [
-        "cuttlefish_auto_resources",
-    ],
-    static_libs: [
-        "libgmock",
-    ],
-    defaults: ["cuttlefish_host_only"],
-    test_suites: ["general-tests"],
-}
diff --git a/common/libs/auto_resources/TEST_MAPPING b/common/libs/auto_resources/TEST_MAPPING
deleted file mode 100644
index 1e34e75..0000000
--- a/common/libs/auto_resources/TEST_MAPPING
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "presubmit": [
-    {
-      "name": "auto_free_buffer_test",
-      "host": true
-    }
-  ]
-}
diff --git a/common/libs/auto_resources/auto_free_buffer_test.cpp b/common/libs/auto_resources/auto_free_buffer_test.cpp
deleted file mode 100644
index b1bbf34..0000000
--- a/common/libs/auto_resources/auto_free_buffer_test.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-#include "common/libs/auto_resources/auto_resources.h"
-
-#include <stdio.h>
-
-#include <gtest/gtest.h>
-#include <gmock/gmock.h>
-
-using ::testing::StrEq;
-
-namespace test {
-static constexpr size_t kImmutableReserveSize =
-    AutoFreeBuffer::kAutoBufferShrinkReserveThreshold;
-
-class AutoFreeBufferTest : public ::testing::Test {
- public:
-  AutoFreeBufferTest() = default;
-  ~AutoFreeBufferTest() override = default;
-
-  void SetUp() override {}
-  void TearDown() override {}
-
- protected:
-  AutoFreeBuffer buffer_;
-};
-
-TEST_F(AutoFreeBufferTest, ShrinkingSmallReservationsDoesNotRealloc) {
-
-  buffer_.Reserve(kImmutableReserveSize);
-  const void* const data = buffer_.data();
-
-  EXPECT_EQ(0u, buffer_.size());
-  EXPECT_EQ(kImmutableReserveSize, buffer_.reserve_size());
-  EXPECT_NE(nullptr, data);
-
-  buffer_.Resize(kImmutableReserveSize);
-  EXPECT_EQ(kImmutableReserveSize, buffer_.size());
-  EXPECT_EQ(data, buffer_.data());
-
-  // Reduce size of buffer.
-  buffer_.Reserve(kImmutableReserveSize / 2);
-  EXPECT_EQ(kImmutableReserveSize, buffer_.reserve_size());
-  EXPECT_EQ(kImmutableReserveSize / 2, buffer_.size());
-  EXPECT_EQ(data, buffer_.data());
-
-  buffer_.Clear();
-
-  EXPECT_EQ(0u, buffer_.size());
-  EXPECT_EQ(kImmutableReserveSize, buffer_.reserve_size());
-  EXPECT_EQ(data, buffer_.data());
-}
-
-TEST_F(AutoFreeBufferTest, ShrinkingLargeReservationDoesRealloc) {
-  buffer_.Reserve(kImmutableReserveSize + 1);
-
-  EXPECT_EQ(0u, buffer_.size());
-  EXPECT_EQ(kImmutableReserveSize + 1, buffer_.reserve_size());
-
-  buffer_.Reserve(kImmutableReserveSize);
-
-  EXPECT_EQ(0u, buffer_.size());
-  EXPECT_EQ(kImmutableReserveSize, buffer_.reserve_size());
-  // Note: realloc may re-use current memory pointer, so testing data pointer
-  // makes no sense.
-}
-
-TEST_F(AutoFreeBufferTest, ResizeClearsMemory) {
-  constexpr char kTruncWords[] = "This string";
-  constexpr char kLastWords[] = "will be truncated to first two words.";
-  constexpr char kFullText[] =
-      "This string will be truncated to first two words.";
-  // Ignore padding \0.
-  constexpr size_t kTruncLength = sizeof(kTruncWords) - 1;
-
-  buffer_.SetToString(kFullText);
-
-  // Note: this call treats buffer as raw data, so no padding happens yet.
-  buffer_.Resize(kTruncLength);
-  EXPECT_THAT(buffer_.data(), StrEq(kFullText));
-
-  buffer_.Resize(kTruncLength + 1);
-  EXPECT_THAT(buffer_.data(), StrEq(kTruncWords));
-
-  // Note: we're accessing buffer out of size() bounds, but still within
-  // reserve_size() bounds.
-  // This confirms that only 1 byte of data has been appended.
-  EXPECT_THAT(&buffer_.data()[sizeof(kTruncWords)], StrEq(kLastWords));
-}
-
-TEST_F(AutoFreeBufferTest, PrintFTest) {
-  constexpr char kFormatString[] = "Printf %s %d %03d %02x Test.";
-  constexpr char kParam1[] = "string";
-  constexpr int kParam2 = 1234;
-  constexpr int kParam3 = 7;
-  constexpr int kParam4 = 0x42;
-
-  char temp_buffer[1024];
-  size_t vsize = snprintf(&temp_buffer[0], sizeof(temp_buffer),
-                          kFormatString, kParam1, kParam2, kParam3, kParam4);
-
-  // Test 1: no reservation => allocate buffer.
-  EXPECT_EQ(vsize,
-            buffer_.PrintF(kFormatString, kParam1, kParam2, kParam3, kParam4));
-  // Check for size + null termination.
-  EXPECT_EQ(vsize + 1, buffer_.size());
-  EXPECT_THAT(buffer_.data(), StrEq(temp_buffer));
-
-  size_t reservation = buffer_.reserve_size();
-
-  buffer_.Clear();
-
-  // Test 2: buffer reserved: just print and return.
-  EXPECT_EQ(vsize,
-            buffer_.PrintF(kFormatString, kParam1, kParam2, kParam3, kParam4));
-  // Check for size + null termination.
-  EXPECT_EQ(vsize + 1, buffer_.size());
-  EXPECT_THAT(buffer_.data(), StrEq(temp_buffer));
-  EXPECT_EQ(reservation, buffer_.reserve_size());
-}
-
-}  // namespace test
diff --git a/common/libs/auto_resources/auto_resources.cpp b/common/libs/auto_resources/auto_resources.cpp
deleted file mode 100644
index a57c968..0000000
--- a/common/libs/auto_resources/auto_resources.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-#include "common/libs/auto_resources/auto_resources.h"
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-AutoFreeBuffer::~AutoFreeBuffer() {
-  if (data_) free(data_);
-}
-
-void AutoFreeBuffer::Clear() {
-  size_ = 0;
-}
-
-bool AutoFreeBuffer::Reserve(size_t newsize) {
-  if (newsize > reserve_size_ ||
-      reserve_size_ > kAutoBufferShrinkReserveThreshold) {
-    char* newdata = static_cast<char*>(realloc(data_, newsize));
-    // If realloc fails, everything remains unchanged.
-    if (!newdata && newsize) return false;
-
-    reserve_size_ = newsize;
-    data_ = newdata;
-  }
-  if (size_ > newsize) size_ = newsize;
-  return true;
-}
-
-bool AutoFreeBuffer::Resize(size_t newsize) {
-  // If reservation is small, and we get a shrink request, simply reduce size_.
-  if (reserve_size_ < kAutoBufferShrinkReserveThreshold && newsize < size_) {
-    size_ = newsize;
-    return true;
-  }
-
-  if (!Reserve(newsize)) return false;
-
-  // Should we keep this? Sounds like it should be called Grow().
-  if (newsize > size_) memset(&data_[size_], 0, newsize - size_);
-  size_ = newsize;
-  return true;
-}
-
-bool AutoFreeBuffer::SetToString(const char* in) {
-  size_t newsz = strlen(in) + 1;
-  if (!Resize(newsz)) return false;
-  memcpy(data_, in, newsz);
-  return true;
-}
-
-bool AutoFreeBuffer::Append(const void* new_data, size_t new_data_size) {
-  size_t offset = size_;
-  if (!Resize(offset + new_data_size)) return false;
-  memcpy(&data_[offset], new_data, new_data_size);
-  return true;
-}
-
-size_t AutoFreeBuffer::PrintF(const char* format, ... ) {
-  va_list args;
-
-  // Optimize: Use whatever reservation left we have for initial printf.
-  // If reservation is not long enough, resize and try again.
-
-  va_start(args, format);
-  size_t printf_size = vsnprintf(data_, reserve_size_, format, args);
-  va_end(args);
-
-  // vsnprintf write no more than |reserve_size_| bytes including trailing \0.
-  // Result value equal or greater than |reserve_size_| signals truncated
-  // output.
-  if (printf_size < reserve_size_) {
-    size_ = printf_size + 1;
-    return printf_size;
-  }
-
-  // Grow buffer and re-try printf.
-  if (!Resize(printf_size + 1)) return 0;
-  va_start(args, format);
-  vsprintf(data_, format, args);
-  va_end(args);
-  return printf_size;
-}
-
diff --git a/common/libs/auto_resources/auto_resources.h b/common/libs/auto_resources/auto_resources.h
deleted file mode 100644
index 6dca6a8..0000000
--- a/common/libs/auto_resources/auto_resources.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-#ifndef CUTTLEFISH_COMMON_COMMON_LIBS_AUTO_RESOURCES_AUTO_RESOURCES_H_
-#define CUTTLEFISH_COMMON_COMMON_LIBS_AUTO_RESOURCES_AUTO_RESOURCES_H_
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-template <typename T, size_t N>
-char (&ArraySizeHelper(T (&array)[N]))[N];
-
-template <typename T, size_t N>
-char (&ArraySizeHelper(const T (&array)[N]))[N];
-
-#define arraysize(array) (sizeof(ArraySizeHelper(array)))
-
-// In C++11 this is just std::vector<char>, but Android isn't
-// there yet.
-class AutoFreeBuffer {
- public:
-  enum {
-    // Minimum reserve size of AutoFreeBuffer to consider shrinking reservation.
-    // Any buffer shorter than this will not be shrunk.
-    kAutoBufferShrinkReserveThreshold = 8192
-  };
-
-  AutoFreeBuffer()
-      : data_(NULL), size_(0), reserve_size_(0) {}
-
-  AutoFreeBuffer(size_t reserve_size)
-      : data_(NULL), size_(0), reserve_size_(0) {
-    Reserve(reserve_size);
-  }
-
-  ~AutoFreeBuffer();
-  void Clear();
-  bool Resize(size_t newsize);
-  bool Reserve(size_t newsize);
-  bool SetToString(const char* in);
-  bool Append(const void* new_data, size_t new_data_size);
-  size_t PrintF(const char* format, ... );
-
-  char* data() {
-    return data_;
-  }
-
-  const char* data() const {
-    return data_;
-  }
-
-  char* begin() {
-    return data_;
-  }
-
-  const char* begin() const {
-    return data_;
-  }
-
-  char* end() {
-    return data_ + size_;
-  }
-
-  const char* end() const {
-    return data_ + size_;
-  }
-
-  size_t size() const {
-    return size_;
-  }
-
-  size_t reserve_size() const {
-    return reserve_size_;
-  }
-
-  void Swap(AutoFreeBuffer& other) {
-    char* temp_ptr = data_;
-    data_ = other.data_;
-    other.data_ = temp_ptr;
-
-    size_t temp_size = size_;
-    size_ = other.size_;
-    other.size_ = temp_size;
-
-    temp_size = reserve_size_;
-    reserve_size_ = other.reserve_size_;
-    other.reserve_size_ = temp_size;
-  }
-
-  bool operator==(const AutoFreeBuffer& other) const {
-    return (size_ == other.size_) && !memcmp(data_, other.data_, size_);
-  }
-
-  bool operator!=(const AutoFreeBuffer& other) const {
-    return !(*this == other);
-  }
-
- protected:
-  char *data_;
-  size_t size_;
-  size_t reserve_size_;
-
- private:
-  AutoFreeBuffer& operator=(const AutoFreeBuffer&);
-  explicit AutoFreeBuffer(const AutoFreeBuffer&);
-};
-#endif  // CUTTLEFISH_COMMON_COMMON_LIBS_AUTO_RESOURCES_AUTO_RESOURCES_H_
diff --git a/common/libs/device_config/Android.bp b/common/libs/device_config/Android.bp
index 36c8ddb..4900d35 100644
--- a/common/libs/device_config/Android.bp
+++ b/common/libs/device_config/Android.bp
@@ -25,7 +25,6 @@
         "libbase",
         "liblog",
         "libcuttlefish_fs",
-        "cuttlefish_auto_resources",
         "libcuttlefish_utils",
     ],
     target: {
diff --git a/common/libs/fs/Android.bp b/common/libs/fs/Android.bp
index 1824caf..9f5d55e 100644
--- a/common/libs/fs/Android.bp
+++ b/common/libs/fs/Android.bp
@@ -21,14 +21,12 @@
     ],
     shared: {
         shared_libs: [
-            "cuttlefish_auto_resources",
             "libbase",
             "liblog",
         ],
     },
     static: {
         static_libs: [
-            "cuttlefish_auto_resources",
             "libbase",
             "liblog",
         ],
@@ -45,9 +43,6 @@
 
 cc_library_static {
     name: "libcuttlefish_fs_product",
-    static_libs: [
-        "cuttlefish_auto_resources_product",
-    ],
     srcs: [
         "shared_buf.cc",
         "shared_fd.cpp",
@@ -67,7 +62,6 @@
     ],
     header_libs: ["cuttlefish_glog"],
     shared_libs: [
-        "cuttlefish_auto_resources",
         "libcuttlefish_fs",
         "libbase",
     ],
diff --git a/common/libs/fs/shared_fd.cpp b/common/libs/fs/shared_fd.cpp
index 061432a..82baad3 100644
--- a/common/libs/fs/shared_fd.cpp
+++ b/common/libs/fs/shared_fd.cpp
@@ -25,7 +25,6 @@
 #include <algorithm>
 #include <vector>
 
-#include "common/libs/auto_resources/auto_resources.h"
 #include "common/libs/glog/logging.h"
 #include "common/libs/fs/shared_select.h"
 
diff --git a/common/libs/fs/shared_fd.h b/common/libs/fs/shared_fd.h
index b64ad09..99deef1 100644
--- a/common/libs/fs/shared_fd.h
+++ b/common/libs/fs/shared_fd.h
@@ -40,7 +40,6 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "common/libs/auto_resources/auto_resources.h"
 #include "vm_sockets.h"
 
 /**
diff --git a/common/libs/net/Android.bp b/common/libs/net/Android.bp
index ea53f71..ba7bbd3 100644
--- a/common/libs/net/Android.bp
+++ b/common/libs/net/Android.bp
@@ -21,7 +21,6 @@
     ],
     shared_libs: [
         "libcuttlefish_fs",
-        "cuttlefish_auto_resources",
         "libbase",
     ],
     defaults: ["cuttlefish_host_and_guest"],
@@ -36,7 +35,6 @@
     shared_libs: [
         "libcuttlefish_fs",
         "cuttlefish_net",
-        "cuttlefish_auto_resources",
         "libbase",
     ],
     static_libs: [
diff --git a/common/libs/strings/Android.bp b/common/libs/strings/Android.bp
deleted file mode 100644
index fcc6784..0000000
--- a/common/libs/strings/Android.bp
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// 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_library {
-    name: "libcuttlefish_strings",
-    srcs: [
-        "str_split.cpp",
-    ],
-    shared: {
-        shared_libs: [
-            "libbase",
-        ],
-    },
-    static: {
-        static_libs: [
-            "libbase",
-        ],
-    },
-    defaults: ["cuttlefish_host_and_guest"],
-}
diff --git a/common/libs/strings/str_split.cpp b/common/libs/strings/str_split.cpp
deleted file mode 100644
index d76acad..0000000
--- a/common/libs/strings/str_split.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.
- */
-
-#include "common/libs/strings/str_split.h"
-
-#include <vector>
-#include <string>
-#include <sstream>
-
-std::vector<std::string> cvd::StrSplit(const std::string& src, char delimiter) {
-  std::istringstream stream{src};
-  std::vector<std::string> result;
-  for (std::string s; std::getline(stream, s, delimiter); s.clear()) {
-    result.push_back(std::move(s));
-  }
-  return result;
-}
diff --git a/common/libs/strings/str_split.h b/common/libs/strings/str_split.h
deleted file mode 100644
index cd18d15..0000000
--- a/common/libs/strings/str_split.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef CUTTLEFISH_COMMON_COMMON_LIBS_STRINGS_STR_SPLIT_H_
-#define CUTTLEFISH_COMMON_COMMON_LIBS_STRINGS_STR_SPLIT_H_
-
-#include <vector>
-#include <string>
-
-namespace cvd {
-std::vector<std::string> StrSplit(const std::string& src, char delimiter);
-}  // namespace cvd
-
-#endif
diff --git a/common/libs/tcp_socket/Android.bp b/common/libs/tcp_socket/Android.bp
index d60ccb2..c5f9550 100644
--- a/common/libs/tcp_socket/Android.bp
+++ b/common/libs/tcp_socket/Android.bp
@@ -19,7 +19,6 @@
         "tcp_socket.cpp",
     ],
     shared_libs: [
-        "cuttlefish_auto_resources",
         "libbase",
         "libcuttlefish_fs",
         "liblog",
diff --git a/common/libs/utils/Android.bp b/common/libs/utils/Android.bp
index f2a5aff..7330315 100644
--- a/common/libs/utils/Android.bp
+++ b/common/libs/utils/Android.bp
@@ -31,14 +31,12 @@
         shared_libs: [
             "libbase",
             "libcuttlefish_fs",
-            "cuttlefish_auto_resources",
         ],
     },
     static: {
         static_libs: [
             "libbase",
             "libcuttlefish_fs",
-            "cuttlefish_auto_resources",
         ],
     },
     defaults: ["cuttlefish_host_and_guest"],
diff --git a/guest/commands/ip_link_add/Android.bp b/guest/commands/ip_link_add/Android.bp
index d84a5d1..6c155f0 100644
--- a/guest/commands/ip_link_add/Android.bp
+++ b/guest/commands/ip_link_add/Android.bp
@@ -21,7 +21,6 @@
     ],
     shared_libs: [
         "cuttlefish_net",
-        "cuttlefish_auto_resources",
     ],
     defaults: ["cuttlefish_guest_only"]
 }
diff --git a/guest/commands/setup_wifi/Android.bp b/guest/commands/setup_wifi/Android.bp
index ec89852..182d885 100644
--- a/guest/commands/setup_wifi/Android.bp
+++ b/guest/commands/setup_wifi/Android.bp
@@ -21,7 +21,6 @@
     ],
     shared_libs: [
         "cuttlefish_net",
-        "cuttlefish_auto_resources",
         "libbase",
         "liblog",
     ],
diff --git a/guest/commands/usbforward/Android.bp b/guest/commands/usbforward/Android.bp
index a639567..fe390e6 100644
--- a/guest/commands/usbforward/Android.bp
+++ b/guest/commands/usbforward/Android.bp
@@ -22,7 +22,6 @@
         "transport_request.cpp",
     ],
     shared_libs: [
-        "cuttlefish_auto_resources",
         "libcuttlefish_fs",
         "libusb",
         "libbase",
diff --git a/guest/commands/vsoc_input_service/Android.bp b/guest/commands/vsoc_input_service/Android.bp
index f2e197f..6c99127 100644
--- a/guest/commands/vsoc_input_service/Android.bp
+++ b/guest/commands/vsoc_input_service/Android.bp
@@ -28,7 +28,6 @@
         "libgflags",
     ],
     shared_libs: [
-        "cuttlefish_auto_resources",
         "libcuttlefish_device_config",
         "libcuttlefish_fs",
         "libbase",
diff --git a/guest/hals/camera/EmulatedFakeCamera2.cpp b/guest/hals/camera/EmulatedFakeCamera2.cpp
index e292361..393adf1 100644
--- a/guest/hals/camera/EmulatedFakeCamera2.cpp
+++ b/guest/hals/camera/EmulatedFakeCamera2.cpp
@@ -32,12 +32,19 @@
 #include "EmulatedCameraFactory.h"
 #include "EmulatedFakeCamera2.h"
 #include "GrallocModule.h"
-#include "common/libs/auto_resources/auto_resources.h"
 
 #define ERROR_CAMERA_NOT_PRESENT -EPIPE
 
 #define CAMERA2_EXT_TRIGGER_TESTING_DISCONNECT 0xFFFFFFFF
 
+template <typename T, size_t N>
+char (&ArraySizeHelper(T (&array)[N]))[N];
+
+template <typename T, size_t N>
+char (&ArraySizeHelper(const T (&array)[N]))[N];
+
+#define arraysize(array) (sizeof(ArraySizeHelper(array)))
+
 namespace android {
 
 const int64_t USEC = 1000LL;
diff --git a/guest/hals/gralloc/legacy/gralloc.cpp b/guest/hals/gralloc/legacy/gralloc.cpp
index dbe2838..28e71eb 100644
--- a/guest/hals/gralloc/legacy/gralloc.cpp
+++ b/guest/hals/gralloc/legacy/gralloc.cpp
@@ -35,7 +35,6 @@
 #include <hardware/hardware.h>
 #include <hardware/gralloc.h>
 
-#include "common/libs/auto_resources/auto_resources.h"
 #include "gralloc_vsoc_priv.h"
 #include "region_registry.h"
 
diff --git a/guest/hals/hwcomposer/common/Android.bp b/guest/hals/hwcomposer/common/Android.bp
index 1b5125a..25d02f8 100644
--- a/guest/hals/hwcomposer/common/Android.bp
+++ b/guest/hals/hwcomposer/common/Android.bp
@@ -29,7 +29,6 @@
         "libyuv_static",
     ],
     shared_libs: [
-        "cuttlefish_auto_resources",
         "liblog",
         "libhardware",
         "libbase",
diff --git a/guest/hals/hwcomposer/cutf_cvm/Android.bp b/guest/hals/hwcomposer/cutf_cvm/Android.bp
index 3835765..5041b70 100644
--- a/guest/hals/hwcomposer/cutf_cvm/Android.bp
+++ b/guest/hals/hwcomposer/cutf_cvm/Android.bp
@@ -31,7 +31,6 @@
         "hwcomposer_common"
     ],
     shared_libs: [
-        "cuttlefish_auto_resources",
         "liblog",
         "libhardware",
         "libbase",
diff --git a/guest/hals/ril/Android.mk b/guest/hals/ril/Android.mk
index 77db038..b37e257 100644
--- a/guest/hals/ril/Android.mk
+++ b/guest/hals/ril/Android.mk
@@ -26,7 +26,6 @@
   ${CUTTLEFISH_LIBRIL_NAME} \
   libcuttlefish_fs \
   cuttlefish_net \
-  cuttlefish_auto_resources \
   libbase \
   libcuttlefish_device_config \
 
diff --git a/guest/monitoring/tombstone_transmit/Android.bp b/guest/monitoring/tombstone_transmit/Android.bp
index 1e89183..500a5f4 100644
--- a/guest/monitoring/tombstone_transmit/Android.bp
+++ b/guest/monitoring/tombstone_transmit/Android.bp
@@ -21,7 +21,6 @@
     static_libs: [
         "libcuttlefish_fs_product",
         "libgflags",
-        "cuttlefish_auto_resources_product",
         "liblog",
         "libbase",
         "libcutils",
diff --git a/host/commands/assemble_cvd/Android.bp b/host/commands/assemble_cvd/Android.bp
index 75d85d0..18b846f 100644
--- a/host/commands/assemble_cvd/Android.bp
+++ b/host/commands/assemble_cvd/Android.bp
@@ -46,7 +46,6 @@
         "cdisk_spec",
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
         "libbase",
         "libnl",
         "libprotobuf-cpp-full",
diff --git a/host/commands/assemble_cvd/flags.cc b/host/commands/assemble_cvd/flags.cc
index 09e76e6..b9ee55b 100644
--- a/host/commands/assemble_cvd/flags.cc
+++ b/host/commands/assemble_cvd/flags.cc
@@ -75,8 +75,6 @@
               "be vendor_boot.img in the directory specified by -system_image_dir.");
 DEFINE_int32(memory_mb, 2048,
              "Total amount of memory available for guest, MB.");
-DEFINE_string(mempath, vsoc::GetDefaultMempath(),
-              "Target location for the shmem file.");
 DEFINE_string(mobile_interface, GetPerInstanceDefault("cvd-mbr-"),
               "Network interface to use for mobile networking");
 DEFINE_string(mobile_tap_name, GetPerInstanceDefault("cvd-mtap-"),
@@ -118,9 +116,6 @@
 DEFINE_string(kernel_log_monitor_binary,
               vsoc::DefaultHostArtifactsPath("bin/kernel_log_monitor"),
               "Location of the log monitor binary.");
-DEFINE_string(ivserver_binary,
-              vsoc::DefaultHostArtifactsPath("bin/ivserver"),
-              "Location of the ivshmem server binary.");
 DEFINE_int32(vnc_server_port, GetPerInstanceDefault(6444),
              "The port on which the vnc server should listen");
 DEFINE_string(socket_forward_proxy_binary,
@@ -172,9 +167,6 @@
               vsoc::DefaultHostArtifactsPath("bin/console_forwarder"),
               "The Console Forwarder binary to use");
 DEFINE_bool(restart_subprocesses, true, "Restart any crashed host process");
-DEFINE_string(e2e_test_binary,
-              vsoc::DefaultHostArtifactsPath("bin/host_region_e2e_test"),
-              "Location of the region end to end test binary");
 DEFINE_string(logcat_receiver_binary,
               vsoc::DefaultHostArtifactsPath("bin/logcat_receiver"),
               "Binary for the logcat server");
@@ -430,13 +422,6 @@
     }
   }
 
-  tmp_config_obj.set_mempath(FLAGS_mempath);
-  tmp_config_obj.set_ivshmem_qemu_socket_path(
-      tmp_config_obj.PerInstanceInternalPath("ivshmem_socket_qemu"));
-  tmp_config_obj.set_ivshmem_client_socket_path(
-      tmp_config_obj.PerInstanceInternalPath("ivshmem_socket_client"));
-  tmp_config_obj.set_ivshmem_vector_count(0);
-
   if (tmp_config_obj.adb_mode().count(vsoc::AdbMode::Usb) > 0) {
     tmp_config_obj.set_usb_v1_socket_name(
         tmp_config_obj.PerInstanceInternalPath("usb-v1"));
@@ -471,7 +456,6 @@
   tmp_config_obj.set_qemu_binary(FLAGS_qemu_binary);
   tmp_config_obj.set_crosvm_binary(FLAGS_crosvm_binary);
   tmp_config_obj.set_console_forwarder_binary(FLAGS_console_forwarder_binary);
-  tmp_config_obj.set_ivserver_binary(FLAGS_ivserver_binary);
   tmp_config_obj.set_kernel_log_monitor_binary(FLAGS_kernel_log_monitor_binary);
 
   tmp_config_obj.set_enable_vnc_server(FLAGS_start_vnc_server);
@@ -487,8 +471,6 @@
       FLAGS_socket_forward_proxy_binary);
   tmp_config_obj.set_socket_vsock_proxy_binary(FLAGS_socket_vsock_proxy_binary);
   tmp_config_obj.set_run_as_daemon(FLAGS_daemon);
-  tmp_config_obj.set_run_e2e_test(false);
-  tmp_config_obj.set_e2e_test_binary(FLAGS_e2e_test_binary);
 
   tmp_config_obj.set_data_policy(FLAGS_data_policy);
   tmp_config_obj.set_blank_data_image_mb(FLAGS_blank_data_image_mb);
@@ -502,7 +484,7 @@
   tmp_config_obj.set_logcat_vsock_port(FLAGS_logcat_vsock_port);
   tmp_config_obj.set_config_server_port(FLAGS_config_server_port);
   tmp_config_obj.set_frames_vsock_port(FLAGS_frames_vsock_port);
-  if (!tmp_config_obj.enable_ivserver() && tmp_config_obj.enable_vnc_server()) {
+  if (tmp_config_obj.enable_vnc_server()) {
     tmp_config_obj.add_kernel_cmdline(concat("androidboot.vsock_frames_port=",
                                              FLAGS_frames_vsock_port));
   }
@@ -623,8 +605,6 @@
 bool CleanPriorFiles() {
   // Everything on the instance directory
   std::string prior_files = FLAGS_instance_dir + "/*";
-  // The shared memory file
-  prior_files += " " + FLAGS_mempath;
   // The environment file
   prior_files += " " + GetCuttlefishEnvPath();
   // The global link to the config file
diff --git a/host/commands/assemble_cvd/super_image_mixer.cc b/host/commands/assemble_cvd/super_image_mixer.cc
index b2ec8c2..1960d41 100644
--- a/host/commands/assemble_cvd/super_image_mixer.cc
+++ b/host/commands/assemble_cvd/super_image_mixer.cc
@@ -39,17 +39,16 @@
 std::string TargetFilesZip(const cvd::FetcherConfig& fetcher_config,
                            cvd::FileSource source) {
   for (const auto& file_iter : fetcher_config.get_cvd_files()) {
-    if (file_iter.second.source != source) {
+    const auto& file_path = file_iter.first;
+    const auto& file_info = file_iter.second;
+    if (file_info.source != source) {
       continue;
     }
-    std::string expected_substr = "target_files-" + file_iter.second.build_id + ".zip";
-    if (expected_substr.size() > file_iter.first.size()) {
+    std::string expected_filename = "target_files-" + file_iter.second.build_id + ".zip";
+    if (!android::base::EndsWith(file_path, expected_filename)) {
       continue;
     }
-    auto expected_pos = file_iter.first.size() - expected_substr.size();
-    if (file_iter.first.rfind(expected_substr) == expected_pos) {
-      return file_iter.first;
-    }
+    return file_path;;
   }
   return "";
 }
diff --git a/host/commands/config_server/Android.bp b/host/commands/config_server/Android.bp
index 07d832a..fcf6d39 100644
--- a/host/commands/config_server/Android.bp
+++ b/host/commands/config_server/Android.bp
@@ -26,7 +26,6 @@
         "libcuttlefish_fs",
         "liblog",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
         "libcuttlefish_device_config",
     ],
     static_libs: [
diff --git a/host/commands/console_forwarder/Android.bp b/host/commands/console_forwarder/Android.bp
index 57dacfe..a090e98 100644
--- a/host/commands/console_forwarder/Android.bp
+++ b/host/commands/console_forwarder/Android.bp
@@ -25,7 +25,6 @@
         "libbase",
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
     ],
     static_libs: [
         "libcuttlefish_host_config",
diff --git a/host/commands/cvd_status/Android.bp b/host/commands/cvd_status/Android.bp
index 7196e07..3b1cbbc 100644
--- a/host/commands/cvd_status/Android.bp
+++ b/host/commands/cvd_status/Android.bp
@@ -25,7 +25,6 @@
         "libbase",
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
     ],
     static_libs: [
         "libcuttlefish_host_config",
diff --git a/host/commands/fetcher/Android.bp b/host/commands/fetcher/Android.bp
index 6af562c..0677d76 100644
--- a/host/commands/fetcher/Android.bp
+++ b/host/commands/fetcher/Android.bp
@@ -27,7 +27,6 @@
     ],
     stl: "libc++_static",
     static_libs: [
-        "cuttlefish_auto_resources",
         "libbase",
         "libcuttlefish_host_config",
         "libcuttlefish_fs",
diff --git a/host/commands/kernel_log_monitor/Android.bp b/host/commands/kernel_log_monitor/Android.bp
index a7197e5..54dda47 100644
--- a/host/commands/kernel_log_monitor/Android.bp
+++ b/host/commands/kernel_log_monitor/Android.bp
@@ -25,7 +25,6 @@
     shared_libs: [
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
         "libbase",
     ],
     static_libs: [
diff --git a/host/commands/launch/Android.bp b/host/commands/launch/Android.bp
index 6dd6426..dafe990 100644
--- a/host/commands/launch/Android.bp
+++ b/host/commands/launch/Android.bp
@@ -26,7 +26,6 @@
     shared_libs: [
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
         "libbase",
         "libnl",
     ],
diff --git a/host/commands/logcat_receiver/Android.bp b/host/commands/logcat_receiver/Android.bp
index 16f3bf9..72438c7 100644
--- a/host/commands/logcat_receiver/Android.bp
+++ b/host/commands/logcat_receiver/Android.bp
@@ -26,7 +26,6 @@
         "libcuttlefish_fs",
         "liblog",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
     ],
     static_libs: [
         "libcuttlefish_host_config",
diff --git a/host/commands/run_cvd/Android.bp b/host/commands/run_cvd/Android.bp
index a8621e9..a7893fe 100644
--- a/host/commands/run_cvd/Android.bp
+++ b/host/commands/run_cvd/Android.bp
@@ -26,7 +26,6 @@
     shared_libs: [
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
         "libbase",
         "libnl"
     ],
diff --git a/host/commands/run_cvd/main.cc b/host/commands/run_cvd/main.cc
index a4ed8cc..fdd909d 100644
--- a/host/commands/run_cvd/main.cc
+++ b/host/commands/run_cvd/main.cc
@@ -96,33 +96,12 @@
     return MaybeWriteToForegroundLauncher();
   }
 
-  bool  OnE2eTestCompleted(int exit_code) {
-    if (exit_code != 0) {
-      LOG(ERROR) << "VSoC e2e test failed";
-      state_ |= kE2eTestFailed;
-    } else {
-      LOG(INFO) << "VSoC e2e test passed";
-      state_ |= kE2eTestPassed;
-    }
-    return MaybeWriteToForegroundLauncher();
-  }
-
   bool BootCompleted() const {
-    bool boot_completed = state_ & kGuestBootCompleted;
-    bool test_passed_or_disabled =
-        (state_ & kE2eTestPassed) || (state_ & kE2eTestDisabled);
-    bool something_failed =
-        state_ & ~(kGuestBootCompleted | kE2eTestPassed | kE2eTestDisabled);
-    return boot_completed && test_passed_or_disabled && !something_failed;
-  }
-
-  bool DisableE2eTests() {
-    state_ |= kE2eTestDisabled;
-    return MaybeWriteToForegroundLauncher();
+    return state_ & kGuestBootCompleted;
   }
 
   bool BootFailed() const {
-    return state_ & (kGuestBootFailed | kE2eTestFailed);
+    return state_ & kGuestBootFailed;
   }
 
  private:
@@ -138,8 +117,6 @@
         SendExitCode(cvd::RunnerExitCodes::kSuccess);
       } else if (state_ & kGuestBootFailed) {
         SendExitCode(cvd::RunnerExitCodes::kVirtualDeviceBootFailed);
-      } else if (state_ & kE2eTestFailed) {
-        SendExitCode(cvd::RunnerExitCodes::kE2eTestFailed);
       } else {
         // No final state was reached
         return false;
@@ -155,9 +132,6 @@
   static const int kBootStarted = 0;
   static const int kGuestBootCompleted = 1 << 0;
   static const int kGuestBootFailed = 1 << 1;
-  static const int kE2eTestPassed = 1 << 2;
-  static const int kE2eTestFailed = 1 << 3;
-  static const int kE2eTestDisabled = 1 << 4;
 };
 
 // Abuse the process monitor to make it call us back when boot events are ready
@@ -175,22 +149,6 @@
       });
 }
 
-void LaunchE2eTestIfEnabled(cvd::ProcessMonitor* process_monitor,
-                            std::shared_ptr<CvdBootStateMachine> state_machine,
-                            const vsoc::CuttlefishConfig& config) {
-  if (config.run_e2e_test()) {
-    process_monitor->StartSubprocess(
-        cvd::Command(config.e2e_test_binary()),
-        [state_machine](cvd::MonitorEntry* entry) {
-          auto test_result = entry->proc->Wait();
-          state_machine->OnE2eTestCompleted(test_result);
-          return false;
-        });
-  } else {
-    state_machine->DisableE2eTests();
-  }
-}
-
 bool WriteCuttlefishEnvironment(const vsoc::CuttlefishConfig& config) {
   auto env = cvd::SharedFD::Open(config.cuttlefish_env_path().c_str(),
                                  O_CREAT | O_RDWR, 0755);
@@ -234,8 +192,6 @@
       LOG(INFO) << "Virtual device booted successfully";
     } else if (exit_code == RunnerExitCodes::kVirtualDeviceBootFailed) {
       LOG(ERROR) << "Virtual device failed to boot";
-    } else if (exit_code == RunnerExitCodes::kE2eTestFailed) {
-      LOG(ERROR) << "Host VSoC region end to end test failed";
     } else {
       LOG(ERROR) << "Unexpected exit code: " << exit_code;
     }
@@ -452,8 +408,6 @@
   LaunchTombstoneReceiverIfEnabled(*config, &process_monitor);
 
   LaunchUsbServerIfEnabled(*config, &process_monitor);
-  // Launch the e2e tests after the ivserver is ready
-  LaunchE2eTestIfEnabled(&process_monitor, boot_state_machine, *config);
 
   // The vnc server needs to be launched after the ivserver because it connects
   // to it when using qemu. It needs to launch before the VMM because it serves
diff --git a/host/commands/stop_cvd/Android.bp b/host/commands/stop_cvd/Android.bp
index b8322b5..ad279bb 100644
--- a/host/commands/stop_cvd/Android.bp
+++ b/host/commands/stop_cvd/Android.bp
@@ -25,7 +25,6 @@
         "libbase",
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
     ],
     static_libs: [
         "libcuttlefish_host_config",
diff --git a/host/commands/tombstone_receiver/Android.bp b/host/commands/tombstone_receiver/Android.bp
index 5f5a5a5..bd32cae 100644
--- a/host/commands/tombstone_receiver/Android.bp
+++ b/host/commands/tombstone_receiver/Android.bp
@@ -26,7 +26,6 @@
         "libcuttlefish_fs",
         "liblog",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
     ],
     static_libs: [
         "libcuttlefish_host_config",
diff --git a/host/commands/virtual_usb_manager/Android.bp b/host/commands/virtual_usb_manager/Android.bp
index 40c8c74..6669b8c 100644
--- a/host/commands/virtual_usb_manager/Android.bp
+++ b/host/commands/virtual_usb_manager/Android.bp
@@ -36,7 +36,6 @@
     shared_libs: [
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
         "libbase",
     ],
     static_libs: [
diff --git a/host/commands/virtual_usb_manager/usbip/Android.bp b/host/commands/virtual_usb_manager/usbip/Android.bp
index b01acb1..8a52b90 100644
--- a/host/commands/virtual_usb_manager/usbip/Android.bp
+++ b/host/commands/virtual_usb_manager/usbip/Android.bp
@@ -27,7 +27,6 @@
     ],
     shared_libs: [
         "libcuttlefish_fs",
-        "cuttlefish_auto_resources",
         "libbase",
     ],
     static_libs: [
diff --git a/host/frontend/adb_connector/main.cpp b/host/frontend/adb_connector/main.cpp
index 93a929d..3d3d824 100644
--- a/host/frontend/adb_connector/main.cpp
+++ b/host/frontend/adb_connector/main.cpp
@@ -28,7 +28,6 @@
 #include <host/commands/kernel_log_monitor/kernel_log_server.h>
 
 #include "common/libs/fs/shared_fd.h"
-#include "common/libs/strings/str_split.h"
 #include "host/libs/config/cuttlefish_config.h"
 #include "host/libs/adb_connection_maintainer/adb_connection_maintainer.h"
 
diff --git a/host/frontend/vnc_server/Android.bp b/host/frontend/vnc_server/Android.bp
index 210f21d..0e82b2f 100644
--- a/host/frontend/vnc_server/Android.bp
+++ b/host/frontend/vnc_server/Android.bp
@@ -33,7 +33,6 @@
         "libcuttlefish_fs",
         "libcuttlefish_utils",
         "cuttlefish_tcp_socket",
-        "cuttlefish_auto_resources",
         "libbase",
     ],
     static_libs: [
diff --git a/host/libs/config/Android.bp b/host/libs/config/Android.bp
index 283053e..d88b206 100644
--- a/host/libs/config/Android.bp
+++ b/host/libs/config/Android.bp
@@ -25,7 +25,6 @@
     shared_libs: [
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
         "libbase",
         "libgflags",
     ],
diff --git a/host/libs/config/cuttlefish_config.cpp b/host/libs/config/cuttlefish_config.cpp
index 6f66fb3..7a65525 100644
--- a/host/libs/config/cuttlefish_config.cpp
+++ b/host/libs/config/cuttlefish_config.cpp
@@ -106,11 +106,6 @@
 const char* kLauncherLogPath = "launcher_log_path";
 const char* kLauncherMonitorPath = "launcher_monitor_socket";
 
-const char* kMempath = "mempath";
-const char* kIvshmemQemuSocketPath = "ivshmem_qemu_socket_path";
-const char* kIvshmemClientSocketPath = "ivshmem_client_socket_path";
-const char* kIvshmemVectorCount = "ivshmem_vector_count";
-
 const char* kMobileBridgeName = "mobile_bridge_name";
 const char* kMobileTapName = "mobile_tap_name";
 const char* kWifiTapName = "wifi_tap_name";
@@ -127,7 +122,6 @@
 const char* kQemuBinary = "qemu_binary";
 const char* kCrosvmBinary = "crosvm_binary";
 const char* kConsoleForwarderBinary = "console_forwarder_binary";
-const char* kIvServerBinary = "ivserver_binary";
 const char* kKernelLogMonitorBinary = "kernel_log_monitor_binary";
 
 const char* kEnableVncServer = "enable_vnc_server";
@@ -142,8 +136,6 @@
 const char* kSocketVsockProxyBinary = "socket_vsock_proxy_binary";
 
 const char* kRunAsDaemon = "run_as_daemon";
-const char* kRunE2eTest = "run_e2e_test";
-const char* kE2eTestBinary = "e2e_test_binary";
 
 const char* kDataPolicy = "data_policy";
 const char* kBlankDataImageMb = "blank_data_image_mb";
@@ -406,36 +398,6 @@
   (*dictionary_)[kVirtualDiskPaths] = virtual_disks_json_obj;
 }
 
-std::string CuttlefishConfig::mempath() const {
-  return (*dictionary_)[kMempath].asString();
-}
-void CuttlefishConfig::set_mempath(const std::string& mempath) {
-  SetPath(kMempath, mempath);
-}
-
-std::string CuttlefishConfig::ivshmem_qemu_socket_path() const {
-  return (*dictionary_)[kIvshmemQemuSocketPath].asString();
-}
-void CuttlefishConfig::set_ivshmem_qemu_socket_path(
-    const std::string& ivshmem_qemu_socket_path) {
-  SetPath(kIvshmemQemuSocketPath, ivshmem_qemu_socket_path);
-}
-
-std::string CuttlefishConfig::ivshmem_client_socket_path() const {
-  return (*dictionary_)[kIvshmemClientSocketPath].asString();
-}
-void CuttlefishConfig::set_ivshmem_client_socket_path(
-    const std::string& ivshmem_client_socket_path) {
-  SetPath(kIvshmemClientSocketPath, ivshmem_client_socket_path);
-}
-
-int CuttlefishConfig::ivshmem_vector_count() const {
-  return (*dictionary_)[kIvshmemVectorCount].asInt();
-}
-void CuttlefishConfig::set_ivshmem_vector_count(int ivshmem_vector_count) {
-  (*dictionary_)[kIvshmemVectorCount] = ivshmem_vector_count;
-}
-
 std::string CuttlefishConfig::usb_v1_socket_name() const {
   return (*dictionary_)[kUsbV1SocketName].asString();
 }
@@ -659,14 +621,6 @@
   (*dictionary_)[kConsoleForwarderBinary] = binary;
 }
 
-std::string CuttlefishConfig::ivserver_binary() const {
-  return (*dictionary_)[kIvServerBinary].asString();
-}
-
-void CuttlefishConfig::set_ivserver_binary(const std::string& ivserver_binary) {
-  (*dictionary_)[kIvServerBinary] = ivserver_binary;
-}
-
 std::string CuttlefishConfig::kernel_log_monitor_binary() const {
   return (*dictionary_)[kKernelLogMonitorBinary].asString();
 }
@@ -760,23 +714,6 @@
 void CuttlefishConfig::set_run_as_daemon(bool run_as_daemon) {
   (*dictionary_)[kRunAsDaemon] = run_as_daemon;
 }
-
-bool CuttlefishConfig::run_e2e_test() const {
-  return (*dictionary_)[kRunE2eTest].asBool();
-}
-
-void CuttlefishConfig::set_run_e2e_test(bool run_e2e_test) {
-  (*dictionary_)[kRunE2eTest] = run_e2e_test;
-}
-
-std::string CuttlefishConfig::e2e_test_binary() const {
-  return (*dictionary_)[kE2eTestBinary].asString();
-}
-
-void CuttlefishConfig::set_e2e_test_binary(const std::string& e2e_test_binary) {
-  (*dictionary_)[kE2eTestBinary] = e2e_test_binary;
-}
-
 std::string CuttlefishConfig::data_policy() const {
   return (*dictionary_)[kDataPolicy].asString();
 }
@@ -898,10 +835,6 @@
   return (*dictionary_)[kTombstoneReceiverPort].asInt();
 }
 
-bool CuttlefishConfig::enable_ivserver() const {
-  return hardware_name() == "cutf_ivsh";
-}
-
 std::string CuttlefishConfig::touch_socket_path() const {
   return PerInstanceInternalPath("touch.sock");
 }
@@ -1005,10 +938,6 @@
   return cvd::StringFromEnv("HOME", ".") + "/.cuttlefish_config.json";
 }
 
-std::string GetDomain() {
-  return CuttlefishConfig::Get()->ivshmem_client_socket_path();
-}
-
 std::string GetPerInstanceDefault(const char* prefix) {
   std::ostringstream stream;
   stream << prefix << std::setfill('0') << std::setw(2) << GetInstance();
@@ -1022,10 +951,6 @@
   return stream.str();
 }
 
-std::string GetDefaultMempath() {
-  return GetPerInstanceDefault("/var/run/shm/cvd-");
-}
-
 int GetDefaultPerInstanceVsockCid() {
   constexpr int kFirstGuestCid = 3;
   return vsoc::HostSupportsVsock() ? GetPerInstanceDefault(kFirstGuestCid) : 0;
diff --git a/host/libs/config/cuttlefish_config.h b/host/libs/config/cuttlefish_config.h
index 4ec49e7..a920e76 100644
--- a/host/libs/config/cuttlefish_config.h
+++ b/host/libs/config/cuttlefish_config.h
@@ -162,20 +162,6 @@
   std::vector<std::string> virtual_disk_paths() const;
   void set_virtual_disk_paths(const std::vector<std::string>& disk_paths);
 
-  std::string mempath() const;
-  void set_mempath(const std::string& mempath);
-
-  std::string ivshmem_qemu_socket_path() const;
-  void set_ivshmem_qemu_socket_path(
-      const std::string& ivshmem_qemu_socket_path);
-
-  std::string ivshmem_client_socket_path() const;
-  void set_ivshmem_client_socket_path(
-      const std::string& ivshmem_client_socket_path);
-
-  int ivshmem_vector_count() const;
-  void set_ivshmem_vector_count(int ivshmem_vector_count);
-
   // The name of the socket that will be used to forward access to USB gadget.
   // This is for V1 of the USB bus.
   std::string usb_v1_socket_name() const;
@@ -259,9 +245,6 @@
   void set_console_forwarder_binary(const std::string& crosvm_binary);
   std::string console_forwarder_binary() const;
 
-  void set_ivserver_binary(const std::string& ivserver_binary);
-  std::string ivserver_binary() const;
-
   void set_kernel_log_monitor_binary(
       const std::string& kernel_log_monitor_binary);
   std::string kernel_log_monitor_binary() const;
@@ -296,12 +279,6 @@
   void set_run_as_daemon(bool run_as_daemon);
   bool run_as_daemon() const;
 
-  void set_run_e2e_test(bool run_e2e_test);
-  bool run_e2e_test() const;
-
-  void set_e2e_test_binary(const std::string& e2e_test_binary);
-  std::string e2e_test_binary() const;
-
   void set_data_policy(const std::string& data_policy);
   std::string data_policy() const;
 
@@ -341,8 +318,6 @@
   void set_boot_slot(const std::string& boot_slot);
   std::string boot_slot() const;
 
-  bool enable_ivserver() const;
-
   std::string touch_socket_path() const;
   std::string keyboard_socket_path() const;
 
@@ -370,9 +345,6 @@
 // it easily discoverable regardless of what vm manager is in use
 std::string GetGlobalConfigFileLink();
 
-// Returns the path to the ivserver's client socket.
-std::string GetDomain();
-
 // These functions modify a given base value to make it different accross
 // different instances by appending the instance id in case of strings or adding
 // it in case of integers.
diff --git a/host/libs/vm_manager/Android.bp b/host/libs/vm_manager/Android.bp
index eadcb12..61cda54 100644
--- a/host/libs/vm_manager/Android.bp
+++ b/host/libs/vm_manager/Android.bp
@@ -26,7 +26,6 @@
     shared_libs: [
         "libcuttlefish_fs",
         "libcuttlefish_utils",
-        "cuttlefish_auto_resources",
         "libbase",
         "libicuuc",
     ],
diff --git a/host/libs/vm_manager/qemu_manager.cpp b/host/libs/vm_manager/qemu_manager.cpp
index 17b076b..b40be87 100644
--- a/host/libs/vm_manager/qemu_manager.cpp
+++ b/host/libs/vm_manager/qemu_manager.cpp
@@ -146,10 +146,6 @@
                config_->kernel_log_pipe_name());
   LogAndSetEnv("console_path", config_->console_path());
   LogAndSetEnv("logcat_path", config_->logcat_path());
-  LogAndSetEnv("ivshmem_qemu_socket_path",
-               config_->ivshmem_qemu_socket_path());
-  LogAndSetEnv("ivshmem_vector_count",
-               std::to_string(config_->ivshmem_vector_count()));
   LogAndSetEnv("usb_v1_socket_name", config_->usb_v1_socket_name());
   LogAndSetEnv("vsock_guest_cid", std::to_string(config_->vsock_guest_cid()));
   LogAndSetEnv("logcat_mode", config_->logcat_mode());
diff --git a/tests/hidl/hidl_implementation_test.cpp b/tests/hidl/hidl_implementation_test.cpp
index 6e84d23..3eedc96 100644
--- a/tests/hidl/hidl_implementation_test.cpp
+++ b/tests/hidl/hidl_implementation_test.cpp
@@ -67,7 +67,6 @@
     "android.hardware.nfc@1.2",
     "android.hardware.oemlock@1.0",
     "android.hardware.power@1.3",
-    "android.hardware.radio.config@1.2",
     "android.hardware.radio.deprecated@1.0",
     "android.hardware.renderscript@1.0",
     "android.hardware.secure_element@1.1",
diff --git a/tools/create_base_image_arm.sh b/tools/create_base_image_arm.sh
index 87756df..b65600c 100755
--- a/tools/create_base_image_arm.sh
+++ b/tools/create_base_image_arm.sh
@@ -138,10 +138,12 @@
 bootcmd_mmc0=devnum=0; run mmc_boot
 bootcmd_mmc1=devnum=1; run mmc_boot
 mmc_boot=if mmc dev ${devnum}; then ; run scan_for_boot_part; fi
-scan_for_boot_part=part list mmc ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; if test $devnum = 1; then script_type=init; else script_type=boot; fi; for distro_bootpart in ${devplist}; do if fstype mmc ${devnum}:${distro_bootpart} bootfstype; then run find_script; fi; done; setenv devplist; setenv script_type;
-find_script=if test -e mmc ${devnum}:${distro_bootpart} /boot/$script_type.scr; then echo Found U-Boot script /boot/$script_type.scr; run run_scr; fi
-run_scr=load mmc ${devnum}:${distro_bootpart} ${scriptaddr} /boot/$script_type.scr; source ${scriptaddr}
+scan_for_boot_part=part list mmc ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype mmc ${devnum}:${distro_bootpart} bootfstype; then run find_script; fi; done; setenv devplist;
+find_script=if test -e mmc ${devnum}:${distro_bootpart} /boot/boot.scr; then echo Found U-Boot script /boot/boot.scr; run run_scr; fi
+run_scr=load mmc ${devnum}:${distro_bootpart} ${scriptaddr} /boot/boot.scr; source ${scriptaddr}
 EOF
+	script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+	echo "Sha=`${script_dir}/gen_sha.sh --kernel ${KERNEL_DIR}`" >> ${tmpfile}
 	${ANDROID_HOST_OUT}/bin/mkenvimage -s 32768 -o ${bootenv} - < ${tmpfile}
 fi
 
@@ -178,20 +180,6 @@
 		exit 1
 	fi
 
-	cat > ${mntdir}/boot/init.cmd << "EOF"
-mmc dev 1 0; mmc read 0x02080000 0x1fc0 0x40;
-ethaddr=$ethaddr
-env default -a
-setenv ethaddr $ethaddr
-setenv boot_targets 'mmc1 mmc0 usb0 pxe'
-saveenv
-mmc dev 1 0; mmc read 0x04000000 0x1fc0 0x40;
-mmc dev 0 0; mmc write 0x04000000 0x1fc0 0x40;
-mmc dev 1 0; mmc write 0x02080000 0x1fc0 0x40;
-EOF
-	${ANDROID_BUILD_TOP}/external/u-boot/tools/mkimage \
-		-C none -A arm -T script -d ${mntdir}/boot/init.cmd ${mntdir}/boot/init.scr
-
 	cat > ${mntdir}/boot/boot.cmd << "EOF"
 setenv bootcmd_dhcp '
 mw.b ${scriptaddr} 0 0x8000
diff --git a/tools/gen_sha.sh b/tools/gen_sha.sh
new file mode 100755
index 0000000..dec71f7
--- /dev/null
+++ b/tools/gen_sha.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Copyright 2019 Google Inc. All rights reserved.
+
+# 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.
+
+source "${ANDROID_BUILD_TOP}/external/shflags/src/shflags"
+
+DEFINE_string kernel \
+  "" "Path to kernel build dir" "k"
+
+FLAGS_HELP="USAGE: $0 [flags]"
+
+FLAGS "$@" || exit $?
+eval set -- "${FLAGS_ARGV}"
+
+if [ -z ${FLAGS_kernel} ]; then
+	flags_help
+	exit 1
+fi
+
+cd "${ANDROID_BUILD_TOP}/device/google/cuttlefish_common"
+Sha=`git rev-parse HEAD`
+cd - >/dev/null
+cd "${ANDROID_BUILD_TOP}/external/u-boot"
+Sha="$Sha,`git rev-parse HEAD`"
+cd - >/dev/null
+cd "${ANDROID_BUILD_TOP}/external/arm-trusted-firmware"
+Sha="$Sha,`git rev-parse HEAD`"
+cd - >/dev/null
+cd "${FLAGS_kernel}"
+Sha="$Sha,`git rev-parse HEAD`"
+cd - >/dev/null
+echo $Sha
diff --git a/tools/make_manifest.sh b/tools/make_manifest.sh
index 5b07d5d..c8b5296 100755
--- a/tools/make_manifest.sh
+++ b/tools/make_manifest.sh
@@ -34,8 +34,10 @@
   "2" "Specify which manifest version to use (default: latest)" "v"
 DEFINE_string ethaddr \
   "" "MAC address of device to DFU (default: all)" "m"
+DEFINE_string kernel \
+  "" "Path to kernel build dir" "k"
 
-FLAGS_HELP="USAGE: $0 [flags]"
+FLAGS_HELP="USAGE: $0 --kernel <dir> [flags]"
 
 FLAGS "$@" || exit $?
 eval set -- "${FLAGS_ARGV}"
@@ -45,6 +47,11 @@
 	exit 1
 done
 
+if [ -z ${FLAGS_kernel} ]; then
+	flags_help
+	exit 1
+fi
+
 confirm() {
     read -r -p "${1:-Are you sure you want to continue? [y/N]} " response
     case "$response" in
@@ -70,18 +77,8 @@
 }
 
 addShaToManifest() {
-	key="Sha"
-	cd "${ANDROID_BUILD_TOP}/device/google/cuttlefish_common"
-	Sha=`git rev-parse HEAD`
-	cd -
-	cd "${ANDROID_BUILD_TOP}/external/u-boot"
-	Sha="$Sha,`git rev-parse HEAD`"
-	cd -
-	cd "${ANDROID_BUILD_TOP}/external/arm-trusted-firmware"
-	Sha="$Sha,`git rev-parse HEAD`"
-	cd -
-
-	addKVToManifest "${key}" "${Sha}"
+	DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+	addKVToManifest "Sha" `${DIR}/gen_sha.sh --kernel ${FLAGS_kernel}`
 }
 
 addPathToManifest() {