Snap for 5991463 from 42a3965b557c9e3366c5dcb1cf8914a3b28db36f to simpleperf-release

Change-Id: I4a9d62b4c5a62df4980bc862e442042e5992b133
diff --git a/TEST_MAPPING b/TEST_MAPPING
index b838ee9..2d5fb85 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -16,6 +16,15 @@
     {
       "name": "vsoc_graphics_test",
       "host": true
+    },
+    {
+      "name": "vts_treble_vintf_framework_test"
+    },
+    {
+      "name": "vts_treble_vintf_vendor_test"
+    },
+    {
+      "name": "hidl_implementation_test"
     }
   ]
 }
diff --git a/common/libs/device_config/device_config.cpp b/common/libs/device_config/device_config.cpp
index faed36e..69c489f 100644
--- a/common/libs/device_config/device_config.cpp
+++ b/common/libs/device_config/device_config.cpp
@@ -16,8 +16,6 @@
 
 #include "device_config.h"
 
-#include <stdio.h>
-
 #include <sstream>
 #include <type_traits>
 
diff --git a/common/libs/device_config/guest_device_config.cpp b/common/libs/device_config/guest_device_config.cpp
index 90d2528..d5558b9 100644
--- a/common/libs/device_config/guest_device_config.cpp
+++ b/common/libs/device_config/guest_device_config.cpp
@@ -14,16 +14,21 @@
  * limitations under the License.
  */
 
+#include "device_config.h"
+
+#include <chrono>
+#include <thread>
+
 #include <cutils/properties.h>
 #include <glog/logging.h>
 
-#include "device_config.h"
-
 namespace cvd {
 
 namespace {
 
 static constexpr auto kDataSize = sizeof(DeviceConfig::RawData);
+static constexpr int kRetries = 5;
+static constexpr int kRetryDelaySeconds = 5;
 
 bool GetRawFromServer(DeviceConfig::RawData* data) {
   auto port_property = "ro.boot.cuttlefish_config_server_port";
@@ -63,9 +68,18 @@
 
 std::unique_ptr<DeviceConfig> DeviceConfig::Get() {
   DeviceConfig::RawData data;
-  if (!GetRawFromServer(&data)) return nullptr;
 
-  return std::unique_ptr<DeviceConfig>(new DeviceConfig(data));
+  int attempts_remaining = 1 + kRetries;
+  while (attempts_remaining > 0) {
+    if (GetRawFromServer(&data)) {
+      return std::unique_ptr<DeviceConfig>(new DeviceConfig(data));
+    }
+
+    std::this_thread::sleep_for(std::chrono::seconds(kRetryDelaySeconds));
+
+    --attempts_remaining;
+  }
+  return nullptr;
 }
 
 DeviceConfig::DeviceConfig(const DeviceConfig::RawData& data) : data_(data) {
diff --git a/guest/hals/health/Android.bp b/guest/hals/health/Android.bp
index ba7f614..3f21425 100644
--- a/guest/hals/health/Android.bp
+++ b/guest/hals/health/Android.bp
@@ -13,13 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-cc_binary {
-    name: "android.hardware.health@2.0-service.cuttlefish",
-    init_rc: ["android.hardware.health@2.0-service.cuttlefish.rc"],
+cc_library_shared {
+    name: "android.hardware.health@2.1-impl-cuttlefish",
+    stem: "android.hardware.health@2.0-impl-2.1-cuttlefish",
     proprietary: true,
+    recovery_available: true,
+
     relative_install_path: "hw",
+
     srcs: [
-        "health_service.cpp",
+        "health.cpp",
     ],
 
     cflags: [
@@ -28,10 +31,10 @@
     ],
 
     static_libs: [
-        "android.hardware.health@2.0-impl",
         "android.hardware.health@1.0-convert",
-        "libhealthservice",
         "libbatterymonitor",
+        "libhealthloop",
+        "libhealth2impl",
     ],
 
     shared_libs: [
@@ -40,13 +43,8 @@
         "libhidlbase",
         "libutils",
         "android.hardware.health@2.0",
+        "android.hardware.health@2.1",
     ],
 
-    header_libs: ["libhealthd_headers"],
-
     defaults: ["enabled_on_p_and_later"],
-
-    overrides: [
-        "healthd",
-    ],
 }
diff --git a/guest/hals/health/health.cpp b/guest/hals/health/health.cpp
new file mode 100644
index 0000000..adec085
--- /dev/null
+++ b/guest/hals/health/health.cpp
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+#define LOG_TAG "android.hardware.health@2.0-service.cuttlefish"
+
+#include <memory>
+#include <string_view>
+
+#include <android-base/logging.h>
+#include <health/utils.h>
+#include <health2impl/Health.h>
+
+using ::android::sp;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::health::InitHealthdConfig;
+using ::android::hardware::health::V2_1::IHealth;
+using namespace std::literals;
+
+namespace android {
+namespace hardware {
+namespace health {
+namespace V2_1 {
+namespace implementation {
+class HealthImpl : public Health {
+ public:
+  HealthImpl(std::unique_ptr<healthd_config>&& config)
+    : Health(std::move(config)) {}
+ protected:
+  void UpdateHealthInfo(HealthInfo* health_info) override;
+};
+
+void HealthImpl::UpdateHealthInfo(HealthInfo* health_info) {
+  auto* battery_props = &health_info->legacy.legacy;
+  battery_props->chargerAcOnline = true;
+  battery_props->chargerUsbOnline = true;
+  battery_props->chargerWirelessOnline = false;
+  battery_props->maxChargingCurrent = 500000;
+  battery_props->maxChargingVoltage = 5000000;
+  battery_props->batteryStatus = V1_0::BatteryStatus::CHARGING;
+  battery_props->batteryHealth = V1_0::BatteryHealth::GOOD;
+  battery_props->batteryPresent = true;
+  battery_props->batteryLevel = 85;
+  battery_props->batteryVoltage = 3600;
+  battery_props->batteryTemperature = 350;
+  battery_props->batteryCurrent = 400000;
+  battery_props->batteryCycleCount = 32;
+  battery_props->batteryFullCharge = 4000000;
+  battery_props->batteryChargeCounter = 1900000;
+  battery_props->batteryTechnology = "Li-ion";
+}
+
+}  // namespace implementation
+}  // namespace V2_1
+}  // namespace health
+}  // namespace hardware
+}  // namespace android
+
+
+extern "C" IHealth* HIDL_FETCH_IHealth(const char* instance) {
+  using ::android::hardware::health::V2_1::implementation::HealthImpl;
+  if (instance != "default"sv) {
+      return nullptr;
+  }
+  auto config = std::make_unique<healthd_config>();
+  InitHealthdConfig(config.get());
+
+  return new HealthImpl(std::move(config));
+}
diff --git a/guest/hals/health/health_service.cpp b/guest/hals/health/health_service.cpp
deleted file mode 100644
index 48c2571..0000000
--- a/guest/hals/health/health_service.cpp
+++ /dev/null
@@ -1,54 +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.
- */
-#define LOG_TAG "android.hardware.health@2.0-service.cuttlefish"
-
-#include <health2/Health.h>
-#include <health2/service.h>
-#include <healthd/healthd.h>
-
-#include <android-base/logging.h>
-
-using android::hardware::health::V2_0::DiskStats;
-using android::hardware::health::V2_0::StorageInfo;
-
-void healthd_board_init(struct healthd_config*) {}
-
-int healthd_board_battery_update(
-    struct android::BatteryProperties* battery_props) {
-  battery_props->chargerAcOnline = true;
-  battery_props->chargerUsbOnline = true;
-  battery_props->chargerWirelessOnline = false;
-  battery_props->maxChargingCurrent = 500000;
-  battery_props->maxChargingVoltage = 5000000;
-  battery_props->batteryStatus = android::BATTERY_STATUS_CHARGING;
-  battery_props->batteryHealth = android::BATTERY_HEALTH_GOOD;
-  battery_props->batteryPresent = true;
-  battery_props->batteryLevel = 85;
-  battery_props->batteryVoltage = 3600;
-  battery_props->batteryTemperature = 350;
-  battery_props->batteryCurrent = 400000;
-  battery_props->batteryCycleCount = 32;
-  battery_props->batteryFullCharge = 4000000;
-  battery_props->batteryChargeCounter = 1900000;
-  battery_props->batteryTechnology = "Li-ion";
-  return 0;
-}
-
-void get_storage_info(std::vector<struct StorageInfo>&) {}
-
-void get_disk_stats(std::vector<struct DiskStats>&) {}
-
-int main(void) { return health_service_main(); }
diff --git a/guest/hals/ril/libril/Android.mk b/guest/hals/ril/libril/Android.mk
index 290c8e1..f0fe2c7 100644
--- a/guest/hals/ril/libril/Android.mk
+++ b/guest/hals/ril/libril/Android.mk
@@ -43,6 +43,7 @@
     android.hardware.radio@1.2 \
     android.hardware.radio@1.3 \
     android.hardware.radio@1.4 \
+    android.hardware.radio@1.5 \
 
 LOCAL_STATIC_LIBRARIES := \
     libprotobuf-c-nano-enable_malloc \
diff --git a/guest/hals/ril/libril/ril.cpp b/guest/hals/ril/libril/ril.cpp
index fc20976..3637ac4 100644
--- a/guest/hals/ril/libril/ril.cpp
+++ b/guest/hals/ril/libril/ril.cpp
@@ -285,12 +285,12 @@
                            : RESPONSE_UNSOLICITED;
         // acquire read lock for the service before calling nitzTimeReceivedInd() since it reads
         // nitzTimeReceived in ril_service
-        pthread_rwlock_t *radioServiceRwlockPtr = radio_1_4::getRadioServiceRwlock(
+        pthread_rwlock_t *radioServiceRwlockPtr = radio_1_5::getRadioServiceRwlock(
                 (int) socket_id);
         int rwlockRet = pthread_rwlock_rdlock(radioServiceRwlockPtr);
         assert(rwlockRet == 0);
 
-        int ret = radio_1_4::nitzTimeReceivedInd(
+        int ret = radio_1_5::nitzTimeReceivedInd(
             (int)socket_id, responseType, 0,
             RIL_E_SUCCESS, s_lastNITZTimeData, s_lastNITZTimeDataSize);
         if (ret == 0) {
@@ -456,7 +456,7 @@
                 == s_unsolResponses[i].requestNumber);
     }
 
-    radio_1_4::registerService(&s_callbacks, s_commands);
+    radio_1_5::registerService(&s_callbacks, s_commands);
     RLOGI("RILHIDL called registerService");
 
 }
@@ -574,12 +574,12 @@
     appendPrintBuf("Ack [%04d]< %s", pRI->token, requestToString(pRI->pCI->requestNumber));
 
     if (pRI->cancelled == 0) {
-        pthread_rwlock_t *radioServiceRwlockPtr = radio_1_4::getRadioServiceRwlock(
+        pthread_rwlock_t *radioServiceRwlockPtr = radio_1_5::getRadioServiceRwlock(
                 (int) socket_id);
         int rwlockRet = pthread_rwlock_rdlock(radioServiceRwlockPtr);
         assert(rwlockRet == 0);
 
-        radio_1_4::acknowledgeRequest((int) socket_id, pRI->token);
+        radio_1_5::acknowledgeRequest((int) socket_id, pRI->token);
 
         rwlockRet = pthread_rwlock_unlock(radioServiceRwlockPtr);
         assert(rwlockRet == 0);
@@ -632,7 +632,7 @@
         RLOGE ("Calling responseFunction() for token %d", pRI->token);
 #endif
 
-        pthread_rwlock_t *radioServiceRwlockPtr = radio_1_4::getRadioServiceRwlock((int) socket_id);
+        pthread_rwlock_t *radioServiceRwlockPtr = radio_1_5::getRadioServiceRwlock((int) socket_id);
         int rwlockRet = pthread_rwlock_rdlock(radioServiceRwlockPtr);
         assert(rwlockRet == 0);
 
@@ -778,14 +778,14 @@
         responseType = RESPONSE_UNSOLICITED;
     }
 
-    pthread_rwlock_t *radioServiceRwlockPtr = radio_1_4::getRadioServiceRwlock((int) soc_id);
+    pthread_rwlock_t *radioServiceRwlockPtr = radio_1_5::getRadioServiceRwlock((int) soc_id);
     int rwlockRet;
 
     if (unsolResponse == RIL_UNSOL_NITZ_TIME_RECEIVED) {
         // get a write lock in caes of NITZ since setNitzTimeReceived() is called
         rwlockRet = pthread_rwlock_wrlock(radioServiceRwlockPtr);
         assert(rwlockRet == 0);
-        radio_1_4::setNitzTimeReceived((int) soc_id, android::elapsedRealtime());
+        radio_1_5::setNitzTimeReceived((int) soc_id, android::elapsedRealtime());
     } else {
         rwlockRet = pthread_rwlock_rdlock(radioServiceRwlockPtr);
         assert(rwlockRet == 0);
diff --git a/guest/hals/ril/libril/ril_commands.h b/guest/hals/ril/libril/ril_commands.h
index d9a0db7..9355990 100644
--- a/guest/hals/ril/libril/ril_commands.h
+++ b/guest/hals/ril/libril/ril_commands.h
@@ -15,157 +15,157 @@
 ** limitations under the License.
 */
     {0, NULL},                   //none
-    {RIL_REQUEST_GET_SIM_STATUS, radio_1_4::getIccCardStatusResponse},
-    {RIL_REQUEST_ENTER_SIM_PIN, radio_1_4::supplyIccPinForAppResponse},
-    {RIL_REQUEST_ENTER_SIM_PUK, radio_1_4::supplyIccPukForAppResponse},
-    {RIL_REQUEST_ENTER_SIM_PIN2, radio_1_4::supplyIccPin2ForAppResponse},
-    {RIL_REQUEST_ENTER_SIM_PUK2, radio_1_4::supplyIccPuk2ForAppResponse},
-    {RIL_REQUEST_CHANGE_SIM_PIN, radio_1_4::changeIccPinForAppResponse},
-    {RIL_REQUEST_CHANGE_SIM_PIN2, radio_1_4::changeIccPin2ForAppResponse},
-    {RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION, radio_1_4::supplyNetworkDepersonalizationResponse},
-    {RIL_REQUEST_GET_CURRENT_CALLS, radio_1_4::getCurrentCallsResponse},
-    {RIL_REQUEST_DIAL, radio_1_4::dialResponse},
-    {RIL_REQUEST_GET_IMSI, radio_1_4::getIMSIForAppResponse},
-    {RIL_REQUEST_HANGUP, radio_1_4::hangupConnectionResponse},
-    {RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND, radio_1_4::hangupWaitingOrBackgroundResponse},
-    {RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND, radio_1_4::hangupForegroundResumeBackgroundResponse},
-    {RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE, radio_1_4::switchWaitingOrHoldingAndActiveResponse},
-    {RIL_REQUEST_CONFERENCE, radio_1_4::conferenceResponse},
-    {RIL_REQUEST_UDUB, radio_1_4::rejectCallResponse},
-    {RIL_REQUEST_LAST_CALL_FAIL_CAUSE, radio_1_4::getLastCallFailCauseResponse},
-    {RIL_REQUEST_SIGNAL_STRENGTH, radio_1_4::getSignalStrengthResponse},
-    {RIL_REQUEST_VOICE_REGISTRATION_STATE, radio_1_4::getVoiceRegistrationStateResponse},
-    {RIL_REQUEST_DATA_REGISTRATION_STATE, radio_1_4::getDataRegistrationStateResponse},
-    {RIL_REQUEST_OPERATOR, radio_1_4::getOperatorResponse},
-    {RIL_REQUEST_RADIO_POWER, radio_1_4::setRadioPowerResponse},
-    {RIL_REQUEST_DTMF, radio_1_4::sendDtmfResponse},
-    {RIL_REQUEST_SEND_SMS, radio_1_4::sendSmsResponse},
-    {RIL_REQUEST_SEND_SMS_EXPECT_MORE, radio_1_4::sendSMSExpectMoreResponse},
-    {RIL_REQUEST_SETUP_DATA_CALL, radio_1_4::setupDataCallResponse},
-    {RIL_REQUEST_SIM_IO, radio_1_4::iccIOForAppResponse},
-    {RIL_REQUEST_SEND_USSD, radio_1_4::sendUssdResponse},
-    {RIL_REQUEST_CANCEL_USSD, radio_1_4::cancelPendingUssdResponse},
-    {RIL_REQUEST_GET_CLIR, radio_1_4::getClirResponse},
-    {RIL_REQUEST_SET_CLIR, radio_1_4::setClirResponse},
-    {RIL_REQUEST_QUERY_CALL_FORWARD_STATUS, radio_1_4::getCallForwardStatusResponse},
-    {RIL_REQUEST_SET_CALL_FORWARD, radio_1_4::setCallForwardResponse},
-    {RIL_REQUEST_QUERY_CALL_WAITING, radio_1_4::getCallWaitingResponse},
-    {RIL_REQUEST_SET_CALL_WAITING, radio_1_4::setCallWaitingResponse},
-    {RIL_REQUEST_SMS_ACKNOWLEDGE, radio_1_4::acknowledgeLastIncomingGsmSmsResponse},
+    {RIL_REQUEST_GET_SIM_STATUS, radio_1_5::getIccCardStatusResponse},
+    {RIL_REQUEST_ENTER_SIM_PIN, radio_1_5::supplyIccPinForAppResponse},
+    {RIL_REQUEST_ENTER_SIM_PUK, radio_1_5::supplyIccPukForAppResponse},
+    {RIL_REQUEST_ENTER_SIM_PIN2, radio_1_5::supplyIccPin2ForAppResponse},
+    {RIL_REQUEST_ENTER_SIM_PUK2, radio_1_5::supplyIccPuk2ForAppResponse},
+    {RIL_REQUEST_CHANGE_SIM_PIN, radio_1_5::changeIccPinForAppResponse},
+    {RIL_REQUEST_CHANGE_SIM_PIN2, radio_1_5::changeIccPin2ForAppResponse},
+    {RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION, radio_1_5::supplyNetworkDepersonalizationResponse},
+    {RIL_REQUEST_GET_CURRENT_CALLS, radio_1_5::getCurrentCallsResponse},
+    {RIL_REQUEST_DIAL, radio_1_5::dialResponse},
+    {RIL_REQUEST_GET_IMSI, radio_1_5::getIMSIForAppResponse},
+    {RIL_REQUEST_HANGUP, radio_1_5::hangupConnectionResponse},
+    {RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND, radio_1_5::hangupWaitingOrBackgroundResponse},
+    {RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND, radio_1_5::hangupForegroundResumeBackgroundResponse},
+    {RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE, radio_1_5::switchWaitingOrHoldingAndActiveResponse},
+    {RIL_REQUEST_CONFERENCE, radio_1_5::conferenceResponse},
+    {RIL_REQUEST_UDUB, radio_1_5::rejectCallResponse},
+    {RIL_REQUEST_LAST_CALL_FAIL_CAUSE, radio_1_5::getLastCallFailCauseResponse},
+    {RIL_REQUEST_SIGNAL_STRENGTH, radio_1_5::getSignalStrengthResponse},
+    {RIL_REQUEST_VOICE_REGISTRATION_STATE, radio_1_5::getVoiceRegistrationStateResponse},
+    {RIL_REQUEST_DATA_REGISTRATION_STATE, radio_1_5::getDataRegistrationStateResponse},
+    {RIL_REQUEST_OPERATOR, radio_1_5::getOperatorResponse},
+    {RIL_REQUEST_RADIO_POWER, radio_1_5::setRadioPowerResponse},
+    {RIL_REQUEST_DTMF, radio_1_5::sendDtmfResponse},
+    {RIL_REQUEST_SEND_SMS, radio_1_5::sendSmsResponse},
+    {RIL_REQUEST_SEND_SMS_EXPECT_MORE, radio_1_5::sendSMSExpectMoreResponse},
+    {RIL_REQUEST_SETUP_DATA_CALL, radio_1_5::setupDataCallResponse},
+    {RIL_REQUEST_SIM_IO, radio_1_5::iccIOForAppResponse},
+    {RIL_REQUEST_SEND_USSD, radio_1_5::sendUssdResponse},
+    {RIL_REQUEST_CANCEL_USSD, radio_1_5::cancelPendingUssdResponse},
+    {RIL_REQUEST_GET_CLIR, radio_1_5::getClirResponse},
+    {RIL_REQUEST_SET_CLIR, radio_1_5::setClirResponse},
+    {RIL_REQUEST_QUERY_CALL_FORWARD_STATUS, radio_1_5::getCallForwardStatusResponse},
+    {RIL_REQUEST_SET_CALL_FORWARD, radio_1_5::setCallForwardResponse},
+    {RIL_REQUEST_QUERY_CALL_WAITING, radio_1_5::getCallWaitingResponse},
+    {RIL_REQUEST_SET_CALL_WAITING, radio_1_5::setCallWaitingResponse},
+    {RIL_REQUEST_SMS_ACKNOWLEDGE, radio_1_5::acknowledgeLastIncomingGsmSmsResponse},
     {RIL_REQUEST_GET_IMEI, NULL},
     {RIL_REQUEST_GET_IMEISV, NULL},
-    {RIL_REQUEST_ANSWER, radio_1_4::acceptCallResponse},
-    {RIL_REQUEST_DEACTIVATE_DATA_CALL, radio_1_4::deactivateDataCallResponse},
-    {RIL_REQUEST_QUERY_FACILITY_LOCK, radio_1_4::getFacilityLockForAppResponse},
-    {RIL_REQUEST_SET_FACILITY_LOCK, radio_1_4::setFacilityLockForAppResponse},
-    {RIL_REQUEST_CHANGE_BARRING_PASSWORD, radio_1_4::setBarringPasswordResponse},
-    {RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE, radio_1_4::getNetworkSelectionModeResponse},
-    {RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC, radio_1_4::setNetworkSelectionModeAutomaticResponse},
-    {RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL, radio_1_4::setNetworkSelectionModeManualResponse},
-    {RIL_REQUEST_QUERY_AVAILABLE_NETWORKS , radio_1_4::getAvailableNetworksResponse},
-    {RIL_REQUEST_DTMF_START, radio_1_4::startDtmfResponse},
-    {RIL_REQUEST_DTMF_STOP, radio_1_4::stopDtmfResponse},
-    {RIL_REQUEST_BASEBAND_VERSION, radio_1_4::getBasebandVersionResponse},
-    {RIL_REQUEST_SEPARATE_CONNECTION, radio_1_4::separateConnectionResponse},
-    {RIL_REQUEST_SET_MUTE, radio_1_4::setMuteResponse},
-    {RIL_REQUEST_GET_MUTE, radio_1_4::getMuteResponse},
-    {RIL_REQUEST_QUERY_CLIP, radio_1_4::getClipResponse},
+    {RIL_REQUEST_ANSWER, radio_1_5::acceptCallResponse},
+    {RIL_REQUEST_DEACTIVATE_DATA_CALL, radio_1_5::deactivateDataCallResponse},
+    {RIL_REQUEST_QUERY_FACILITY_LOCK, radio_1_5::getFacilityLockForAppResponse},
+    {RIL_REQUEST_SET_FACILITY_LOCK, radio_1_5::setFacilityLockForAppResponse},
+    {RIL_REQUEST_CHANGE_BARRING_PASSWORD, radio_1_5::setBarringPasswordResponse},
+    {RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE, radio_1_5::getNetworkSelectionModeResponse},
+    {RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC, radio_1_5::setNetworkSelectionModeAutomaticResponse},
+    {RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL, radio_1_5::setNetworkSelectionModeManualResponse},
+    {RIL_REQUEST_QUERY_AVAILABLE_NETWORKS , radio_1_5::getAvailableNetworksResponse},
+    {RIL_REQUEST_DTMF_START, radio_1_5::startDtmfResponse},
+    {RIL_REQUEST_DTMF_STOP, radio_1_5::stopDtmfResponse},
+    {RIL_REQUEST_BASEBAND_VERSION, radio_1_5::getBasebandVersionResponse},
+    {RIL_REQUEST_SEPARATE_CONNECTION, radio_1_5::separateConnectionResponse},
+    {RIL_REQUEST_SET_MUTE, radio_1_5::setMuteResponse},
+    {RIL_REQUEST_GET_MUTE, radio_1_5::getMuteResponse},
+    {RIL_REQUEST_QUERY_CLIP, radio_1_5::getClipResponse},
     {RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE, NULL},
-    {RIL_REQUEST_DATA_CALL_LIST, radio_1_4::getDataCallListResponse},
+    {RIL_REQUEST_DATA_CALL_LIST, radio_1_5::getDataCallListResponse},
     {RIL_REQUEST_RESET_RADIO, NULL},
-    {RIL_REQUEST_OEM_HOOK_RAW, radio_1_4::sendRequestRawResponse},
-    {RIL_REQUEST_OEM_HOOK_STRINGS, radio_1_4::sendRequestStringsResponse},
-    {RIL_REQUEST_SCREEN_STATE, radio_1_4::sendDeviceStateResponse},   // Note the response function is different.
-    {RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION, radio_1_4::setSuppServiceNotificationsResponse},
-    {RIL_REQUEST_WRITE_SMS_TO_SIM, radio_1_4::writeSmsToSimResponse},
-    {RIL_REQUEST_DELETE_SMS_ON_SIM, radio_1_4::deleteSmsOnSimResponse},
-    {RIL_REQUEST_SET_BAND_MODE, radio_1_4::setBandModeResponse},
-    {RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE, radio_1_4::getAvailableBandModesResponse},
+    {RIL_REQUEST_OEM_HOOK_RAW, radio_1_5::sendRequestRawResponse},
+    {RIL_REQUEST_OEM_HOOK_STRINGS, radio_1_5::sendRequestStringsResponse},
+    {RIL_REQUEST_SCREEN_STATE, radio_1_5::sendDeviceStateResponse},   // Note the response function is different.
+    {RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION, radio_1_5::setSuppServiceNotificationsResponse},
+    {RIL_REQUEST_WRITE_SMS_TO_SIM, radio_1_5::writeSmsToSimResponse},
+    {RIL_REQUEST_DELETE_SMS_ON_SIM, radio_1_5::deleteSmsOnSimResponse},
+    {RIL_REQUEST_SET_BAND_MODE, radio_1_5::setBandModeResponse},
+    {RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE, radio_1_5::getAvailableBandModesResponse},
     {RIL_REQUEST_STK_GET_PROFILE, NULL},
     {RIL_REQUEST_STK_SET_PROFILE, NULL},
-    {RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND, radio_1_4::sendEnvelopeResponse},
-    {RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE, radio_1_4::sendTerminalResponseToSimResponse},
-    {RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM, radio_1_4::handleStkCallSetupRequestFromSimResponse},
-    {RIL_REQUEST_EXPLICIT_CALL_TRANSFER, radio_1_4::explicitCallTransferResponse},
-    {RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE, radio_1_4::setPreferredNetworkTypeResponse},
-    {RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE, radio_1_4::getPreferredNetworkTypeResponse},
-    {RIL_REQUEST_GET_NEIGHBORING_CELL_IDS, radio_1_4::getNeighboringCidsResponse},
-    {RIL_REQUEST_SET_LOCATION_UPDATES, radio_1_4::setLocationUpdatesResponse},
-    {RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE, radio_1_4::setCdmaSubscriptionSourceResponse},
-    {RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE, radio_1_4::setCdmaRoamingPreferenceResponse},
-    {RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE, radio_1_4::getCdmaRoamingPreferenceResponse},
-    {RIL_REQUEST_SET_TTY_MODE, radio_1_4::setTTYModeResponse},
-    {RIL_REQUEST_QUERY_TTY_MODE, radio_1_4::getTTYModeResponse},
-    {RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE, radio_1_4::setPreferredVoicePrivacyResponse},
-    {RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE, radio_1_4::getPreferredVoicePrivacyResponse},
-    {RIL_REQUEST_CDMA_FLASH, radio_1_4::sendCDMAFeatureCodeResponse},
-    {RIL_REQUEST_CDMA_BURST_DTMF, radio_1_4::sendBurstDtmfResponse},
+    {RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND, radio_1_5::sendEnvelopeResponse},
+    {RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE, radio_1_5::sendTerminalResponseToSimResponse},
+    {RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM, radio_1_5::handleStkCallSetupRequestFromSimResponse},
+    {RIL_REQUEST_EXPLICIT_CALL_TRANSFER, radio_1_5::explicitCallTransferResponse},
+    {RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE, radio_1_5::setPreferredNetworkTypeResponse},
+    {RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE, radio_1_5::getPreferredNetworkTypeResponse},
+    {RIL_REQUEST_GET_NEIGHBORING_CELL_IDS, radio_1_5::getNeighboringCidsResponse},
+    {RIL_REQUEST_SET_LOCATION_UPDATES, radio_1_5::setLocationUpdatesResponse},
+    {RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE, radio_1_5::setCdmaSubscriptionSourceResponse},
+    {RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE, radio_1_5::setCdmaRoamingPreferenceResponse},
+    {RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE, radio_1_5::getCdmaRoamingPreferenceResponse},
+    {RIL_REQUEST_SET_TTY_MODE, radio_1_5::setTTYModeResponse},
+    {RIL_REQUEST_QUERY_TTY_MODE, radio_1_5::getTTYModeResponse},
+    {RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE, radio_1_5::setPreferredVoicePrivacyResponse},
+    {RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE, radio_1_5::getPreferredVoicePrivacyResponse},
+    {RIL_REQUEST_CDMA_FLASH, radio_1_5::sendCDMAFeatureCodeResponse},
+    {RIL_REQUEST_CDMA_BURST_DTMF, radio_1_5::sendBurstDtmfResponse},
     {RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY, NULL},
-    {RIL_REQUEST_CDMA_SEND_SMS, radio_1_4::sendCdmaSmsResponse},
-    {RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE, radio_1_4::acknowledgeLastIncomingCdmaSmsResponse},
-    {RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG, radio_1_4::getGsmBroadcastConfigResponse},
-    {RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG, radio_1_4::setGsmBroadcastConfigResponse},
-    {RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION, radio_1_4::setGsmBroadcastActivationResponse},
-    {RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG, radio_1_4::getCdmaBroadcastConfigResponse},
-    {RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG, radio_1_4::setCdmaBroadcastConfigResponse},
-    {RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION, radio_1_4::setCdmaBroadcastActivationResponse},
-    {RIL_REQUEST_CDMA_SUBSCRIPTION, radio_1_4::getCDMASubscriptionResponse},
-    {RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM, radio_1_4::writeSmsToRuimResponse},
-    {RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM, radio_1_4::deleteSmsOnRuimResponse},
-    {RIL_REQUEST_DEVICE_IDENTITY, radio_1_4::getDeviceIdentityResponse},
-    {RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE, radio_1_4::exitEmergencyCallbackModeResponse},
-    {RIL_REQUEST_GET_SMSC_ADDRESS, radio_1_4::getSmscAddressResponse},
-    {RIL_REQUEST_SET_SMSC_ADDRESS, radio_1_4::setSmscAddressResponse},
-    {RIL_REQUEST_REPORT_SMS_MEMORY_STATUS, radio_1_4::reportSmsMemoryStatusResponse},
-    {RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING, radio_1_4::reportStkServiceIsRunningResponse},
-    {RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE, radio_1_4::getCdmaSubscriptionSourceResponse},
-    {RIL_REQUEST_ISIM_AUTHENTICATION, radio_1_4::requestIsimAuthenticationResponse},
-    {RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU, radio_1_4::acknowledgeIncomingGsmSmsWithPduResponse},
-    {RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS, radio_1_4::sendEnvelopeWithStatusResponse},
-    {RIL_REQUEST_VOICE_RADIO_TECH, radio_1_4::getVoiceRadioTechnologyResponse},
-    {RIL_REQUEST_GET_CELL_INFO_LIST, radio_1_4::getCellInfoListResponse},
-    {RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE, radio_1_4::setCellInfoListRateResponse},
-    {RIL_REQUEST_SET_INITIAL_ATTACH_APN, radio_1_4::setInitialAttachApnResponse},
-    {RIL_REQUEST_IMS_REGISTRATION_STATE, radio_1_4::getImsRegistrationStateResponse},
-    {RIL_REQUEST_IMS_SEND_SMS, radio_1_4::sendImsSmsResponse},
-    {RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC, radio_1_4::iccTransmitApduBasicChannelResponse},
-    {RIL_REQUEST_SIM_OPEN_CHANNEL, radio_1_4::iccOpenLogicalChannelResponse},
-    {RIL_REQUEST_SIM_CLOSE_CHANNEL, radio_1_4::iccCloseLogicalChannelResponse},
-    {RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL, radio_1_4::iccTransmitApduLogicalChannelResponse},
-    {RIL_REQUEST_NV_READ_ITEM, radio_1_4::nvReadItemResponse},
-    {RIL_REQUEST_NV_WRITE_ITEM, radio_1_4::nvWriteItemResponse},
-    {RIL_REQUEST_NV_WRITE_CDMA_PRL, radio_1_4::nvWriteCdmaPrlResponse},
-    {RIL_REQUEST_NV_RESET_CONFIG, radio_1_4::nvResetConfigResponse},
-    {RIL_REQUEST_SET_UICC_SUBSCRIPTION, radio_1_4::setUiccSubscriptionResponse},
-    {RIL_REQUEST_ALLOW_DATA, radio_1_4::setDataAllowedResponse},
-    {RIL_REQUEST_GET_HARDWARE_CONFIG, radio_1_4::getHardwareConfigResponse},
-    {RIL_REQUEST_SIM_AUTHENTICATION, radio_1_4::requestIccSimAuthenticationResponse},
+    {RIL_REQUEST_CDMA_SEND_SMS, radio_1_5::sendCdmaSmsResponse},
+    {RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE, radio_1_5::acknowledgeLastIncomingCdmaSmsResponse},
+    {RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG, radio_1_5::getGsmBroadcastConfigResponse},
+    {RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG, radio_1_5::setGsmBroadcastConfigResponse},
+    {RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION, radio_1_5::setGsmBroadcastActivationResponse},
+    {RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG, radio_1_5::getCdmaBroadcastConfigResponse},
+    {RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG, radio_1_5::setCdmaBroadcastConfigResponse},
+    {RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION, radio_1_5::setCdmaBroadcastActivationResponse},
+    {RIL_REQUEST_CDMA_SUBSCRIPTION, radio_1_5::getCDMASubscriptionResponse},
+    {RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM, radio_1_5::writeSmsToRuimResponse},
+    {RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM, radio_1_5::deleteSmsOnRuimResponse},
+    {RIL_REQUEST_DEVICE_IDENTITY, radio_1_5::getDeviceIdentityResponse},
+    {RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE, radio_1_5::exitEmergencyCallbackModeResponse},
+    {RIL_REQUEST_GET_SMSC_ADDRESS, radio_1_5::getSmscAddressResponse},
+    {RIL_REQUEST_SET_SMSC_ADDRESS, radio_1_5::setSmscAddressResponse},
+    {RIL_REQUEST_REPORT_SMS_MEMORY_STATUS, radio_1_5::reportSmsMemoryStatusResponse},
+    {RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING, radio_1_5::reportStkServiceIsRunningResponse},
+    {RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE, radio_1_5::getCdmaSubscriptionSourceResponse},
+    {RIL_REQUEST_ISIM_AUTHENTICATION, radio_1_5::requestIsimAuthenticationResponse},
+    {RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU, radio_1_5::acknowledgeIncomingGsmSmsWithPduResponse},
+    {RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS, radio_1_5::sendEnvelopeWithStatusResponse},
+    {RIL_REQUEST_VOICE_RADIO_TECH, radio_1_5::getVoiceRadioTechnologyResponse},
+    {RIL_REQUEST_GET_CELL_INFO_LIST, radio_1_5::getCellInfoListResponse},
+    {RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE, radio_1_5::setCellInfoListRateResponse},
+    {RIL_REQUEST_SET_INITIAL_ATTACH_APN, radio_1_5::setInitialAttachApnResponse},
+    {RIL_REQUEST_IMS_REGISTRATION_STATE, radio_1_5::getImsRegistrationStateResponse},
+    {RIL_REQUEST_IMS_SEND_SMS, radio_1_5::sendImsSmsResponse},
+    {RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC, radio_1_5::iccTransmitApduBasicChannelResponse},
+    {RIL_REQUEST_SIM_OPEN_CHANNEL, radio_1_5::iccOpenLogicalChannelResponse},
+    {RIL_REQUEST_SIM_CLOSE_CHANNEL, radio_1_5::iccCloseLogicalChannelResponse},
+    {RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL, radio_1_5::iccTransmitApduLogicalChannelResponse},
+    {RIL_REQUEST_NV_READ_ITEM, radio_1_5::nvReadItemResponse},
+    {RIL_REQUEST_NV_WRITE_ITEM, radio_1_5::nvWriteItemResponse},
+    {RIL_REQUEST_NV_WRITE_CDMA_PRL, radio_1_5::nvWriteCdmaPrlResponse},
+    {RIL_REQUEST_NV_RESET_CONFIG, radio_1_5::nvResetConfigResponse},
+    {RIL_REQUEST_SET_UICC_SUBSCRIPTION, radio_1_5::setUiccSubscriptionResponse},
+    {RIL_REQUEST_ALLOW_DATA, radio_1_5::setDataAllowedResponse},
+    {RIL_REQUEST_GET_HARDWARE_CONFIG, radio_1_5::getHardwareConfigResponse},
+    {RIL_REQUEST_SIM_AUTHENTICATION, radio_1_5::requestIccSimAuthenticationResponse},
     {RIL_REQUEST_GET_DC_RT_INFO, NULL},
     {RIL_REQUEST_SET_DC_RT_INFO_RATE, NULL},
-    {RIL_REQUEST_SET_DATA_PROFILE, radio_1_4::setDataProfileResponse},
-    {RIL_REQUEST_SHUTDOWN, radio_1_4::requestShutdownResponse},
-    {RIL_REQUEST_GET_RADIO_CAPABILITY, radio_1_4::getRadioCapabilityResponse},
-    {RIL_REQUEST_SET_RADIO_CAPABILITY, radio_1_4::setRadioCapabilityResponse},
-    {RIL_REQUEST_START_LCE, radio_1_4::startLceServiceResponse},
-    {RIL_REQUEST_STOP_LCE, radio_1_4::stopLceServiceResponse},
-    {RIL_REQUEST_PULL_LCEDATA, radio_1_4::pullLceDataResponse},
-    {RIL_REQUEST_GET_ACTIVITY_INFO, radio_1_4::getModemActivityInfoResponse},
-    {RIL_REQUEST_SET_CARRIER_RESTRICTIONS, radio_1_4::setAllowedCarriersResponse},
-    {RIL_REQUEST_GET_CARRIER_RESTRICTIONS, radio_1_4::getAllowedCarriersResponse},
-    {RIL_REQUEST_SEND_DEVICE_STATE, radio_1_4::sendDeviceStateResponse},
-    {RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER, radio_1_4::setIndicationFilterResponse},
-    {RIL_REQUEST_SET_SIM_CARD_POWER, radio_1_4::setSimCardPowerResponse},
-    {RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION, radio_1_4::setCarrierInfoForImsiEncryptionResponse},
-    {RIL_REQUEST_START_NETWORK_SCAN, radio_1_4::startNetworkScanResponse},
-    {RIL_REQUEST_STOP_NETWORK_SCAN, radio_1_4::stopNetworkScanResponse},
-    {RIL_REQUEST_START_KEEPALIVE, radio_1_4::startKeepaliveResponse},
-    {RIL_REQUEST_STOP_KEEPALIVE, radio_1_4::stopKeepaliveResponse},
-    {RIL_REQUEST_START_NETWORK_SCAN4, radio_1_4::startNetworkScanResponse4},
-    {RIL_REQUEST_GET_MODEM_STACK_STATUS, radio_1_4::getModemStackStatusResponse},
-    {RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE_BITMAP, radio_1_4::getPreferredNetworkTypeBitmapResponse},
-    {RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE_BITMAP, radio_1_4::setPreferredNetworkTypeBitmapResponse},
-    {RIL_REQUEST_EMERGENCY_DIAL, radio_1_4::emergencyDialResponse},
-    {RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS, radio_1_4::setSystemSelectionChannelsResponse},
-    {RIL_REQUEST_ENABLE_MODEM, radio_1_4::enableModemResponse},
-    {RIL_REQUEST_SET_CARRIER_RESTRICTIONS_1_4, radio_1_4::setAllowedCarriersResponse4},
-    {RIL_REQUEST_GET_CARRIER_RESTRICTIONS_1_4, radio_1_4::getAllowedCarriersResponse4},
+    {RIL_REQUEST_SET_DATA_PROFILE, radio_1_5::setDataProfileResponse},
+    {RIL_REQUEST_SHUTDOWN, radio_1_5::requestShutdownResponse},
+    {RIL_REQUEST_GET_RADIO_CAPABILITY, radio_1_5::getRadioCapabilityResponse},
+    {RIL_REQUEST_SET_RADIO_CAPABILITY, radio_1_5::setRadioCapabilityResponse},
+    {RIL_REQUEST_START_LCE, radio_1_5::startLceServiceResponse},
+    {RIL_REQUEST_STOP_LCE, radio_1_5::stopLceServiceResponse},
+    {RIL_REQUEST_PULL_LCEDATA, radio_1_5::pullLceDataResponse},
+    {RIL_REQUEST_GET_ACTIVITY_INFO, radio_1_5::getModemActivityInfoResponse},
+    {RIL_REQUEST_SET_CARRIER_RESTRICTIONS, radio_1_5::setAllowedCarriersResponse},
+    {RIL_REQUEST_GET_CARRIER_RESTRICTIONS, radio_1_5::getAllowedCarriersResponse},
+    {RIL_REQUEST_SEND_DEVICE_STATE, radio_1_5::sendDeviceStateResponse},
+    {RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER, radio_1_5::setIndicationFilterResponse},
+    {RIL_REQUEST_SET_SIM_CARD_POWER, radio_1_5::setSimCardPowerResponse},
+    {RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION, radio_1_5::setCarrierInfoForImsiEncryptionResponse},
+    {RIL_REQUEST_START_NETWORK_SCAN, radio_1_5::startNetworkScanResponse},
+    {RIL_REQUEST_STOP_NETWORK_SCAN, radio_1_5::stopNetworkScanResponse},
+    {RIL_REQUEST_START_KEEPALIVE, radio_1_5::startKeepaliveResponse},
+    {RIL_REQUEST_STOP_KEEPALIVE, radio_1_5::stopKeepaliveResponse},
+    {RIL_REQUEST_START_NETWORK_SCAN4, radio_1_5::startNetworkScanResponse4},
+    {RIL_REQUEST_GET_MODEM_STACK_STATUS, radio_1_5::getModemStackStatusResponse},
+    {RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE_BITMAP, radio_1_5::getPreferredNetworkTypeBitmapResponse},
+    {RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE_BITMAP, radio_1_5::setPreferredNetworkTypeBitmapResponse},
+    {RIL_REQUEST_EMERGENCY_DIAL, radio_1_5::emergencyDialResponse},
+    {RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS, radio_1_5::setSystemSelectionChannelsResponse},
+    {RIL_REQUEST_ENABLE_MODEM, radio_1_5::enableModemResponse},
+    {RIL_REQUEST_SET_CARRIER_RESTRICTIONS_1_4, radio_1_5::setAllowedCarriersResponse4},
+    {RIL_REQUEST_GET_CARRIER_RESTRICTIONS_1_4, radio_1_5::getAllowedCarriersResponse4},
diff --git a/guest/hals/ril/libril/ril_service.cpp b/guest/hals/ril/libril/ril_service.cpp
index 23a61ee..6101a2e 100755
--- a/guest/hals/ril/libril/ril_service.cpp
+++ b/guest/hals/ril/libril/ril_service.cpp
@@ -16,10 +16,10 @@
 
 #define LOG_TAG "RILC"
 
-#include <android/hardware/radio/1.4/IRadio.h>
-#include <android/hardware/radio/1.4/IRadioResponse.h>
-#include <android/hardware/radio/1.4/IRadioIndication.h>
-#include <android/hardware/radio/1.4/types.h>
+#include <android/hardware/radio/1.5/IRadio.h>
+#include <android/hardware/radio/1.5/IRadioResponse.h>
+#include <android/hardware/radio/1.5/IRadioIndication.h>
+#include <android/hardware/radio/1.5/types.h>
 
 #include <android/hardware/radio/deprecated/1.0/IOemHook.h>
 
@@ -72,18 +72,18 @@
 RIL_RadioFunctions *s_vendorFunctions = NULL;
 static CommandInfo *s_commands;
 
-struct RadioImpl_1_4;
+struct RadioImpl_1_5;
 struct OemHookImpl;
 
 #if (SIM_COUNT >= 2)
-sp<RadioImpl_1_4> radioService[SIM_COUNT];
+sp<RadioImpl_1_5> radioService[SIM_COUNT];
 sp<OemHookImpl> oemHookService[SIM_COUNT];
 int64_t nitzTimeReceived[SIM_COUNT];
 // counter used for synchronization. It is incremented every time response callbacks are updated.
 volatile int32_t mCounterRadio[SIM_COUNT];
 volatile int32_t mCounterOemHook[SIM_COUNT];
 #else
-sp<RadioImpl_1_4> radioService[1];
+sp<RadioImpl_1_5> radioService[1];
 sp<OemHookImpl> oemHookService[1];
 int64_t nitzTimeReceived[1];
 // counter used for synchronization. It is incremented every time response callbacks are updated.
@@ -127,7 +127,7 @@
 void populateResponseInfo(RadioResponseInfo& responseInfo, int serial, int responseType,
                          RIL_Errno e);
 
-struct RadioImpl_1_4 : public V1_4::IRadio {
+struct RadioImpl_1_5 : public V1_5::IRadio {
     int32_t mSlotId;
     sp<IRadioResponse> mRadioResponse;
     sp<IRadioIndication> mRadioIndication;
@@ -137,6 +137,8 @@
     sp<V1_3::IRadioIndication> mRadioIndicationV1_3;
     sp<V1_4::IRadioResponse> mRadioResponseV1_4;
     sp<V1_4::IRadioIndication> mRadioIndicationV1_4;
+    sp<V1_5::IRadioResponse> mRadioResponseV1_5;
+    sp<V1_5::IRadioIndication> mRadioIndicationV1_5;
 
     Return<void> setResponseFunctions(
             const ::android::sp<IRadioResponse>& radioResponse,
@@ -829,7 +831,7 @@
         // note the current counter to avoid overwriting updates made by another thread before
         // write lock is acquired.
         int counter = isRadioService ? mCounterRadio[slotId] : mCounterOemHook[slotId];
-        pthread_rwlock_t *radioServiceRwlockPtr = radio_1_4::getRadioServiceRwlock(slotId);
+        pthread_rwlock_t *radioServiceRwlockPtr = radio_1_5::getRadioServiceRwlock(slotId);
         int ret = pthread_rwlock_unlock(radioServiceRwlockPtr);
         assert(ret == 0);
 
@@ -848,6 +850,8 @@
                 radioService[slotId]->mRadioIndicationV1_3 = NULL;
                 radioService[slotId]->mRadioResponseV1_4 = NULL;
                 radioService[slotId]->mRadioIndicationV1_4 = NULL;
+                radioService[slotId]->mRadioResponseV1_5 = NULL;
+                radioService[slotId]->mRadioIndicationV1_5 = NULL;
             } else {
                 oemHookService[slotId]->mOemHookResponse = NULL;
                 oemHookService[slotId]->mOemHookIndication = NULL;
@@ -868,21 +872,29 @@
     }
 }
 
-void RadioImpl_1_4::checkReturnStatus(Return<void>& ret) {
+void RadioImpl_1_5::checkReturnStatus(Return<void>& ret) {
     ::checkReturnStatus(mSlotId, ret, true);
 }
 
-Return<void> RadioImpl_1_4::setResponseFunctions(
+Return<void> RadioImpl_1_5::setResponseFunctions(
         const ::android::sp<IRadioResponse>& radioResponseParam,
         const ::android::sp<IRadioIndication>& radioIndicationParam) {
     RLOGD("setResponseFunctions");
 
-    pthread_rwlock_t *radioServiceRwlockPtr = radio_1_4::getRadioServiceRwlock(mSlotId);
+    pthread_rwlock_t *radioServiceRwlockPtr = radio_1_5::getRadioServiceRwlock(mSlotId);
     int ret = pthread_rwlock_wrlock(radioServiceRwlockPtr);
     assert(ret == 0);
 
     mRadioResponse = radioResponseParam;
     mRadioIndication = radioIndicationParam;
+
+   mRadioResponseV1_5 = V1_5::IRadioResponse::castFrom(mRadioResponse).withDefault(nullptr);
+   mRadioIndicationV1_5 = V1_5::IRadioIndication::castFrom(mRadioIndication).withDefault(nullptr);
+   if (mRadioResponseV1_5 == nullptr || mRadioIndicationV1_5 == nullptr) {
+       mRadioResponseV1_5 = nullptr;
+       mRadioIndicationV1_5 = nullptr;
+   }
+
     mRadioResponseV1_4 = V1_4::IRadioResponse::castFrom(mRadioResponse).withDefault(nullptr);
     mRadioIndicationV1_4 = V1_4::IRadioIndication::castFrom(mRadioIndication).withDefault(nullptr);
     if (mRadioResponseV1_4 == nullptr || mRadioIndicationV1_4 == nullptr) {
@@ -915,7 +927,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getIccCardStatus(int32_t serial) {
+Return<void> RadioImpl_1_5::getIccCardStatus(int32_t serial) {
 #if VDBG
     RLOGD("getIccCardStatus: serial %d", serial);
 #endif
@@ -923,7 +935,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::supplyIccPinForApp(int32_t serial, const hidl_string& pin,
+Return<void> RadioImpl_1_5::supplyIccPinForApp(int32_t serial, const hidl_string& pin,
         const hidl_string& aid) {
 #if VDBG
     RLOGD("supplyIccPinForApp: serial %d", serial);
@@ -933,7 +945,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::supplyIccPukForApp(int32_t serial, const hidl_string& puk,
+Return<void> RadioImpl_1_5::supplyIccPukForApp(int32_t serial, const hidl_string& puk,
                                            const hidl_string& pin, const hidl_string& aid) {
 #if VDBG
     RLOGD("supplyIccPukForApp: serial %d", serial);
@@ -943,7 +955,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::supplyIccPin2ForApp(int32_t serial, const hidl_string& pin2,
+Return<void> RadioImpl_1_5::supplyIccPin2ForApp(int32_t serial, const hidl_string& pin2,
                                             const hidl_string& aid) {
 #if VDBG
     RLOGD("supplyIccPin2ForApp: serial %d", serial);
@@ -953,7 +965,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::supplyIccPuk2ForApp(int32_t serial, const hidl_string& puk2,
+Return<void> RadioImpl_1_5::supplyIccPuk2ForApp(int32_t serial, const hidl_string& puk2,
                                             const hidl_string& pin2, const hidl_string& aid) {
 #if VDBG
     RLOGD("supplyIccPuk2ForApp: serial %d", serial);
@@ -963,7 +975,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::changeIccPinForApp(int32_t serial, const hidl_string& oldPin,
+Return<void> RadioImpl_1_5::changeIccPinForApp(int32_t serial, const hidl_string& oldPin,
                                            const hidl_string& newPin, const hidl_string& aid) {
 #if VDBG
     RLOGD("changeIccPinForApp: serial %d", serial);
@@ -973,7 +985,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::changeIccPin2ForApp(int32_t serial, const hidl_string& oldPin2,
+Return<void> RadioImpl_1_5::changeIccPin2ForApp(int32_t serial, const hidl_string& oldPin2,
                                             const hidl_string& newPin2, const hidl_string& aid) {
 #if VDBG
     RLOGD("changeIccPin2ForApp: serial %d", serial);
@@ -983,7 +995,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::supplyNetworkDepersonalization(int32_t serial,
+Return<void> RadioImpl_1_5::supplyNetworkDepersonalization(int32_t serial,
                                                        const hidl_string& netPin) {
 #if VDBG
     RLOGD("supplyNetworkDepersonalization: serial %d", serial);
@@ -993,7 +1005,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getCurrentCalls(int32_t serial) {
+Return<void> RadioImpl_1_5::getCurrentCalls(int32_t serial) {
 #if VDBG
     RLOGD("getCurrentCalls: serial %d", serial);
 #endif
@@ -1001,7 +1013,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::dial(int32_t serial, const Dial& dialInfo) {
+Return<void> RadioImpl_1_5::dial(int32_t serial, const Dial& dialInfo) {
 #if VDBG
     RLOGD("dial: serial %d", serial);
 #endif
@@ -1043,7 +1055,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getImsiForApp(int32_t serial, const hidl_string& aid) {
+Return<void> RadioImpl_1_5::getImsiForApp(int32_t serial, const hidl_string& aid) {
 #if VDBG
     RLOGD("getImsiForApp: serial %d", serial);
 #endif
@@ -1052,7 +1064,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::hangup(int32_t serial, int32_t gsmIndex) {
+Return<void> RadioImpl_1_5::hangup(int32_t serial, int32_t gsmIndex) {
 #if VDBG
     RLOGD("hangup: serial %d", serial);
 #endif
@@ -1060,7 +1072,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::hangupWaitingOrBackground(int32_t serial) {
+Return<void> RadioImpl_1_5::hangupWaitingOrBackground(int32_t serial) {
 #if VDBG
     RLOGD("hangupWaitingOrBackground: serial %d", serial);
 #endif
@@ -1068,7 +1080,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::hangupForegroundResumeBackground(int32_t serial) {
+Return<void> RadioImpl_1_5::hangupForegroundResumeBackground(int32_t serial) {
 #if VDBG
     RLOGD("hangupForegroundResumeBackground: serial %d", serial);
 #endif
@@ -1076,7 +1088,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::switchWaitingOrHoldingAndActive(int32_t serial) {
+Return<void> RadioImpl_1_5::switchWaitingOrHoldingAndActive(int32_t serial) {
 #if VDBG
     RLOGD("switchWaitingOrHoldingAndActive: serial %d", serial);
 #endif
@@ -1084,7 +1096,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::conference(int32_t serial) {
+Return<void> RadioImpl_1_5::conference(int32_t serial) {
 #if VDBG
     RLOGD("conference: serial %d", serial);
 #endif
@@ -1092,7 +1104,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::rejectCall(int32_t serial) {
+Return<void> RadioImpl_1_5::rejectCall(int32_t serial) {
 #if VDBG
     RLOGD("rejectCall: serial %d", serial);
 #endif
@@ -1100,7 +1112,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getLastCallFailCause(int32_t serial) {
+Return<void> RadioImpl_1_5::getLastCallFailCause(int32_t serial) {
 #if VDBG
     RLOGD("getLastCallFailCause: serial %d", serial);
 #endif
@@ -1108,7 +1120,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getSignalStrength(int32_t serial) {
+Return<void> RadioImpl_1_5::getSignalStrength(int32_t serial) {
 #if VDBG
     RLOGD("getSignalStrength: serial %d", serial);
 #endif
@@ -1116,7 +1128,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getVoiceRegistrationState(int32_t serial) {
+Return<void> RadioImpl_1_5::getVoiceRegistrationState(int32_t serial) {
 #if VDBG
     RLOGD("getVoiceRegistrationState: serial %d", serial);
 #endif
@@ -1124,7 +1136,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getDataRegistrationState(int32_t serial) {
+Return<void> RadioImpl_1_5::getDataRegistrationState(int32_t serial) {
 #if VDBG
     RLOGD("getDataRegistrationState: serial %d", serial);
 #endif
@@ -1132,7 +1144,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getOperator(int32_t serial) {
+Return<void> RadioImpl_1_5::getOperator(int32_t serial) {
 #if VDBG
     RLOGD("getOperator: serial %d", serial);
 #endif
@@ -1140,13 +1152,13 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setRadioPower(int32_t serial, bool on) {
+Return<void> RadioImpl_1_5::setRadioPower(int32_t serial, bool on) {
     RLOGD("setRadioPower: serial %d on %d", serial, on);
     dispatchInts(serial, mSlotId, RIL_REQUEST_RADIO_POWER, 1, BOOL_TO_INT(on));
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendDtmf(int32_t serial, const hidl_string& s) {
+Return<void> RadioImpl_1_5::sendDtmf(int32_t serial, const hidl_string& s) {
 #if VDBG
     RLOGD("sendDtmf: serial %d", serial);
 #endif
@@ -1154,7 +1166,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendSms(int32_t serial, const GsmSmsMessage& message) {
+Return<void> RadioImpl_1_5::sendSms(int32_t serial, const GsmSmsMessage& message) {
 #if VDBG
     RLOGD("sendSms: serial %d", serial);
 #endif
@@ -1163,7 +1175,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendSMSExpectMore(int32_t serial, const GsmSmsMessage& message) {
+Return<void> RadioImpl_1_5::sendSMSExpectMore(int32_t serial, const GsmSmsMessage& message) {
 #if VDBG
     RLOGD("sendSMSExpectMore: serial %d", serial);
 #endif
@@ -1190,7 +1202,7 @@
     return false;
 }
 
-Return<void> RadioImpl_1_4::setupDataCall(int32_t serial, RadioTechnology radioTechnology,
+Return<void> RadioImpl_1_5::setupDataCall(int32_t serial, RadioTechnology radioTechnology,
                                       const DataProfileInfo& dataProfileInfo, bool modemCognitive,
                                       bool roamingAllowed, bool isRoaming) {
 
@@ -1246,7 +1258,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::iccIOForApp(int32_t serial, const IccIo& iccIo) {
+Return<void> RadioImpl_1_5::iccIOForApp(int32_t serial, const IccIo& iccIo) {
 #if VDBG
     RLOGD("iccIOForApp: serial %d", serial);
 #endif
@@ -1288,7 +1300,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendUssd(int32_t serial, const hidl_string& ussd) {
+Return<void> RadioImpl_1_5::sendUssd(int32_t serial, const hidl_string& ussd) {
 #if VDBG
     RLOGD("sendUssd: serial %d", serial);
 #endif
@@ -1296,7 +1308,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::cancelPendingUssd(int32_t serial) {
+Return<void> RadioImpl_1_5::cancelPendingUssd(int32_t serial) {
 #if VDBG
     RLOGD("cancelPendingUssd: serial %d", serial);
 #endif
@@ -1304,7 +1316,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getClir(int32_t serial) {
+Return<void> RadioImpl_1_5::getClir(int32_t serial) {
 #if VDBG
     RLOGD("getClir: serial %d", serial);
 #endif
@@ -1312,7 +1324,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setClir(int32_t serial, int32_t status) {
+Return<void> RadioImpl_1_5::setClir(int32_t serial, int32_t status) {
 #if VDBG
     RLOGD("setClir: serial %d", serial);
 #endif
@@ -1320,7 +1332,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getCallForwardStatus(int32_t serial, const CallForwardInfo& callInfo) {
+Return<void> RadioImpl_1_5::getCallForwardStatus(int32_t serial, const CallForwardInfo& callInfo) {
 #if VDBG
     RLOGD("getCallForwardStatus: serial %d", serial);
 #endif
@@ -1329,7 +1341,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setCallForward(int32_t serial, const CallForwardInfo& callInfo) {
+Return<void> RadioImpl_1_5::setCallForward(int32_t serial, const CallForwardInfo& callInfo) {
 #if VDBG
     RLOGD("setCallForward: serial %d", serial);
 #endif
@@ -1338,7 +1350,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getCallWaiting(int32_t serial, int32_t serviceClass) {
+Return<void> RadioImpl_1_5::getCallWaiting(int32_t serial, int32_t serviceClass) {
 #if VDBG
     RLOGD("getCallWaiting: serial %d", serial);
 #endif
@@ -1346,7 +1358,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setCallWaiting(int32_t serial, bool enable, int32_t serviceClass) {
+Return<void> RadioImpl_1_5::setCallWaiting(int32_t serial, bool enable, int32_t serviceClass) {
 #if VDBG
     RLOGD("setCallWaiting: serial %d", serial);
 #endif
@@ -1355,7 +1367,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::acknowledgeLastIncomingGsmSms(int32_t serial,
+Return<void> RadioImpl_1_5::acknowledgeLastIncomingGsmSms(int32_t serial,
                                                       bool success, SmsAcknowledgeFailCause cause) {
 #if VDBG
     RLOGD("acknowledgeLastIncomingGsmSms: serial %d", serial);
@@ -1365,7 +1377,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::acceptCall(int32_t serial) {
+Return<void> RadioImpl_1_5::acceptCall(int32_t serial) {
 #if VDBG
     RLOGD("acceptCall: serial %d", serial);
 #endif
@@ -1373,7 +1385,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::deactivateDataCall(int32_t serial,
+Return<void> RadioImpl_1_5::deactivateDataCall(int32_t serial,
                                            int32_t cid, bool reasonRadioShutDown) {
 #if VDBG
     RLOGD("deactivateDataCall: serial %d", serial);
@@ -1383,7 +1395,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getFacilityLockForApp(int32_t serial, const hidl_string& facility,
+Return<void> RadioImpl_1_5::getFacilityLockForApp(int32_t serial, const hidl_string& facility,
                                               const hidl_string& password, int32_t serviceClass,
                                               const hidl_string& appId) {
 #if VDBG
@@ -1395,7 +1407,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setFacilityLockForApp(int32_t serial, const hidl_string& facility,
+Return<void> RadioImpl_1_5::setFacilityLockForApp(int32_t serial, const hidl_string& facility,
                                               bool lockState, const hidl_string& password,
                                               int32_t serviceClass, const hidl_string& appId) {
 #if VDBG
@@ -1407,7 +1419,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setBarringPassword(int32_t serial, const hidl_string& facility,
+Return<void> RadioImpl_1_5::setBarringPassword(int32_t serial, const hidl_string& facility,
                                            const hidl_string& oldPassword,
                                            const hidl_string& newPassword) {
 #if VDBG
@@ -1418,7 +1430,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getNetworkSelectionMode(int32_t serial) {
+Return<void> RadioImpl_1_5::getNetworkSelectionMode(int32_t serial) {
 #if VDBG
     RLOGD("getNetworkSelectionMode: serial %d", serial);
 #endif
@@ -1426,7 +1438,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setNetworkSelectionModeAutomatic(int32_t serial) {
+Return<void> RadioImpl_1_5::setNetworkSelectionModeAutomatic(int32_t serial) {
 #if VDBG
     RLOGD("setNetworkSelectionModeAutomatic: serial %d", serial);
 #endif
@@ -1434,7 +1446,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setNetworkSelectionModeManual(int32_t serial,
+Return<void> RadioImpl_1_5::setNetworkSelectionModeManual(int32_t serial,
                                                       const hidl_string& operatorNumeric) {
 #if VDBG
     RLOGD("setNetworkSelectionModeManual: serial %d", serial);
@@ -1444,7 +1456,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getAvailableNetworks(int32_t serial) {
+Return<void> RadioImpl_1_5::getAvailableNetworks(int32_t serial) {
 #if VDBG
     RLOGD("getAvailableNetworks: serial %d", serial);
 #endif
@@ -1452,7 +1464,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::startNetworkScan(int32_t serial, const V1_1::NetworkScanRequest& request) {
+Return<void> RadioImpl_1_5::startNetworkScan(int32_t serial, const V1_1::NetworkScanRequest& request) {
 #if VDBG
     RLOGD("startNetworkScan: serial %d", serial);
 #endif
@@ -1518,7 +1530,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::stopNetworkScan(int32_t serial) {
+Return<void> RadioImpl_1_5::stopNetworkScan(int32_t serial) {
 #if VDBG
     RLOGD("stopNetworkScan: serial %d", serial);
 #endif
@@ -1526,7 +1538,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::startDtmf(int32_t serial, const hidl_string& s) {
+Return<void> RadioImpl_1_5::startDtmf(int32_t serial, const hidl_string& s) {
 #if VDBG
     RLOGD("startDtmf: serial %d", serial);
 #endif
@@ -1535,7 +1547,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::stopDtmf(int32_t serial) {
+Return<void> RadioImpl_1_5::stopDtmf(int32_t serial) {
 #if VDBG
     RLOGD("stopDtmf: serial %d", serial);
 #endif
@@ -1543,7 +1555,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getBasebandVersion(int32_t serial) {
+Return<void> RadioImpl_1_5::getBasebandVersion(int32_t serial) {
 #if VDBG
     RLOGD("getBasebandVersion: serial %d", serial);
 #endif
@@ -1551,7 +1563,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::separateConnection(int32_t serial, int32_t gsmIndex) {
+Return<void> RadioImpl_1_5::separateConnection(int32_t serial, int32_t gsmIndex) {
 #if VDBG
     RLOGD("separateConnection: serial %d", serial);
 #endif
@@ -1559,7 +1571,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setMute(int32_t serial, bool enable) {
+Return<void> RadioImpl_1_5::setMute(int32_t serial, bool enable) {
 #if VDBG
     RLOGD("setMute: serial %d", serial);
 #endif
@@ -1567,7 +1579,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getMute(int32_t serial) {
+Return<void> RadioImpl_1_5::getMute(int32_t serial) {
 #if VDBG
     RLOGD("getMute: serial %d", serial);
 #endif
@@ -1575,7 +1587,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getClip(int32_t serial) {
+Return<void> RadioImpl_1_5::getClip(int32_t serial) {
 #if VDBG
     RLOGD("getClip: serial %d", serial);
 #endif
@@ -1583,7 +1595,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getDataCallList(int32_t serial) {
+Return<void> RadioImpl_1_5::getDataCallList(int32_t serial) {
 #if VDBG
     RLOGD("getDataCallList: serial %d", serial);
 #endif
@@ -1591,7 +1603,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setSuppServiceNotifications(int32_t serial, bool enable) {
+Return<void> RadioImpl_1_5::setSuppServiceNotifications(int32_t serial, bool enable) {
 #if VDBG
     RLOGD("setSuppServiceNotifications: serial %d", serial);
 #endif
@@ -1600,7 +1612,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::writeSmsToSim(int32_t serial, const SmsWriteArgs& smsWriteArgs) {
+Return<void> RadioImpl_1_5::writeSmsToSim(int32_t serial, const SmsWriteArgs& smsWriteArgs) {
 #if VDBG
     RLOGD("writeSmsToSim: serial %d", serial);
 #endif
@@ -1628,7 +1640,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::deleteSmsOnSim(int32_t serial, int32_t index) {
+Return<void> RadioImpl_1_5::deleteSmsOnSim(int32_t serial, int32_t index) {
 #if VDBG
     RLOGD("deleteSmsOnSim: serial %d", serial);
 #endif
@@ -1636,7 +1648,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setBandMode(int32_t serial, RadioBandMode mode) {
+Return<void> RadioImpl_1_5::setBandMode(int32_t serial, RadioBandMode mode) {
 #if VDBG
     RLOGD("setBandMode: serial %d", serial);
 #endif
@@ -1644,7 +1656,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getAvailableBandModes(int32_t serial) {
+Return<void> RadioImpl_1_5::getAvailableBandModes(int32_t serial) {
 #if VDBG
     RLOGD("getAvailableBandModes: serial %d", serial);
 #endif
@@ -1652,7 +1664,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendEnvelope(int32_t serial, const hidl_string& command) {
+Return<void> RadioImpl_1_5::sendEnvelope(int32_t serial, const hidl_string& command) {
 #if VDBG
     RLOGD("sendEnvelope: serial %d", serial);
 #endif
@@ -1661,7 +1673,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendTerminalResponseToSim(int32_t serial,
+Return<void> RadioImpl_1_5::sendTerminalResponseToSim(int32_t serial,
                                                   const hidl_string& commandResponse) {
 #if VDBG
     RLOGD("sendTerminalResponseToSim: serial %d", serial);
@@ -1671,7 +1683,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::handleStkCallSetupRequestFromSim(int32_t serial, bool accept) {
+Return<void> RadioImpl_1_5::handleStkCallSetupRequestFromSim(int32_t serial, bool accept) {
 #if VDBG
     RLOGD("handleStkCallSetupRequestFromSim: serial %d", serial);
 #endif
@@ -1680,7 +1692,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::explicitCallTransfer(int32_t serial) {
+Return<void> RadioImpl_1_5::explicitCallTransfer(int32_t serial) {
 #if VDBG
     RLOGD("explicitCallTransfer: serial %d", serial);
 #endif
@@ -1688,7 +1700,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setPreferredNetworkType(int32_t serial, PreferredNetworkType nwType) {
+Return<void> RadioImpl_1_5::setPreferredNetworkType(int32_t serial, PreferredNetworkType nwType) {
 #if VDBG
     RLOGD("setPreferredNetworkType: serial %d", serial);
 #endif
@@ -1696,7 +1708,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getPreferredNetworkType(int32_t serial) {
+Return<void> RadioImpl_1_5::getPreferredNetworkType(int32_t serial) {
 #if VDBG
     RLOGD("getPreferredNetworkType: serial %d", serial);
 #endif
@@ -1704,7 +1716,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getNeighboringCids(int32_t serial) {
+Return<void> RadioImpl_1_5::getNeighboringCids(int32_t serial) {
 #if VDBG
     RLOGD("getNeighboringCids: serial %d", serial);
 #endif
@@ -1712,7 +1724,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setLocationUpdates(int32_t serial, bool enable) {
+Return<void> RadioImpl_1_5::setLocationUpdates(int32_t serial, bool enable) {
 #if VDBG
     RLOGD("setLocationUpdates: serial %d", serial);
 #endif
@@ -1720,7 +1732,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setCdmaSubscriptionSource(int32_t serial, CdmaSubscriptionSource cdmaSub) {
+Return<void> RadioImpl_1_5::setCdmaSubscriptionSource(int32_t serial, CdmaSubscriptionSource cdmaSub) {
 #if VDBG
     RLOGD("setCdmaSubscriptionSource: serial %d", serial);
 #endif
@@ -1728,7 +1740,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setCdmaRoamingPreference(int32_t serial, CdmaRoamingType type) {
+Return<void> RadioImpl_1_5::setCdmaRoamingPreference(int32_t serial, CdmaRoamingType type) {
 #if VDBG
     RLOGD("setCdmaRoamingPreference: serial %d", serial);
 #endif
@@ -1736,7 +1748,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getCdmaRoamingPreference(int32_t serial) {
+Return<void> RadioImpl_1_5::getCdmaRoamingPreference(int32_t serial) {
 #if VDBG
     RLOGD("getCdmaRoamingPreference: serial %d", serial);
 #endif
@@ -1744,7 +1756,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setTTYMode(int32_t serial, TtyMode mode) {
+Return<void> RadioImpl_1_5::setTTYMode(int32_t serial, TtyMode mode) {
 #if VDBG
     RLOGD("setTTYMode: serial %d", serial);
 #endif
@@ -1752,7 +1764,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getTTYMode(int32_t serial) {
+Return<void> RadioImpl_1_5::getTTYMode(int32_t serial) {
 #if VDBG
     RLOGD("getTTYMode: serial %d", serial);
 #endif
@@ -1760,7 +1772,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setPreferredVoicePrivacy(int32_t serial, bool enable) {
+Return<void> RadioImpl_1_5::setPreferredVoicePrivacy(int32_t serial, bool enable) {
 #if VDBG
     RLOGD("setPreferredVoicePrivacy: serial %d", serial);
 #endif
@@ -1769,7 +1781,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getPreferredVoicePrivacy(int32_t serial) {
+Return<void> RadioImpl_1_5::getPreferredVoicePrivacy(int32_t serial) {
 #if VDBG
     RLOGD("getPreferredVoicePrivacy: serial %d", serial);
 #endif
@@ -1777,7 +1789,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendCDMAFeatureCode(int32_t serial, const hidl_string& featureCode) {
+Return<void> RadioImpl_1_5::sendCDMAFeatureCode(int32_t serial, const hidl_string& featureCode) {
 #if VDBG
     RLOGD("sendCDMAFeatureCode: serial %d", serial);
 #endif
@@ -1786,7 +1798,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendBurstDtmf(int32_t serial, const hidl_string& dtmf, int32_t on,
+Return<void> RadioImpl_1_5::sendBurstDtmf(int32_t serial, const hidl_string& dtmf, int32_t on,
                                       int32_t off) {
 #if VDBG
     RLOGD("sendBurstDtmf: serial %d", serial);
@@ -1828,7 +1840,7 @@
     }
 }
 
-Return<void> RadioImpl_1_4::sendCdmaSms(int32_t serial, const CdmaSmsMessage& sms) {
+Return<void> RadioImpl_1_5::sendCdmaSms(int32_t serial, const CdmaSmsMessage& sms) {
 #if VDBG
     RLOGD("sendCdmaSms: serial %d", serial);
 #endif
@@ -1844,7 +1856,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::acknowledgeLastIncomingCdmaSms(int32_t serial, const CdmaSmsAck& smsAck) {
+Return<void> RadioImpl_1_5::acknowledgeLastIncomingCdmaSms(int32_t serial, const CdmaSmsAck& smsAck) {
 #if VDBG
     RLOGD("acknowledgeLastIncomingCdmaSms: serial %d", serial);
 #endif
@@ -1862,7 +1874,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getGsmBroadcastConfig(int32_t serial) {
+Return<void> RadioImpl_1_5::getGsmBroadcastConfig(int32_t serial) {
 #if VDBG
     RLOGD("getGsmBroadcastConfig: serial %d", serial);
 #endif
@@ -1870,7 +1882,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setGsmBroadcastConfig(int32_t serial,
+Return<void> RadioImpl_1_5::setGsmBroadcastConfig(int32_t serial,
                                               const hidl_vec<GsmBroadcastSmsConfigInfo>&
                                               configInfo) {
 #if VDBG
@@ -1900,7 +1912,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setGsmBroadcastActivation(int32_t serial, bool activate) {
+Return<void> RadioImpl_1_5::setGsmBroadcastActivation(int32_t serial, bool activate) {
 #if VDBG
     RLOGD("setGsmBroadcastActivation: serial %d", serial);
 #endif
@@ -1909,7 +1921,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getCdmaBroadcastConfig(int32_t serial) {
+Return<void> RadioImpl_1_5::getCdmaBroadcastConfig(int32_t serial) {
 #if VDBG
     RLOGD("getCdmaBroadcastConfig: serial %d", serial);
 #endif
@@ -1917,7 +1929,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setCdmaBroadcastConfig(int32_t serial,
+Return<void> RadioImpl_1_5::setCdmaBroadcastConfig(int32_t serial,
                                                const hidl_vec<CdmaBroadcastSmsConfigInfo>&
                                                configInfo) {
 #if VDBG
@@ -1945,7 +1957,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setCdmaBroadcastActivation(int32_t serial, bool activate) {
+Return<void> RadioImpl_1_5::setCdmaBroadcastActivation(int32_t serial, bool activate) {
 #if VDBG
     RLOGD("setCdmaBroadcastActivation: serial %d", serial);
 #endif
@@ -1954,7 +1966,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getCDMASubscription(int32_t serial) {
+Return<void> RadioImpl_1_5::getCDMASubscription(int32_t serial) {
 #if VDBG
     RLOGD("getCDMASubscription: serial %d", serial);
 #endif
@@ -1962,7 +1974,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::writeSmsToRuim(int32_t serial, const CdmaSmsWriteArgs& cdmaSms) {
+Return<void> RadioImpl_1_5::writeSmsToRuim(int32_t serial, const CdmaSmsWriteArgs& cdmaSms) {
 #if VDBG
     RLOGD("writeSmsToRuim: serial %d", serial);
 #endif
@@ -1980,7 +1992,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::deleteSmsOnRuim(int32_t serial, int32_t index) {
+Return<void> RadioImpl_1_5::deleteSmsOnRuim(int32_t serial, int32_t index) {
 #if VDBG
     RLOGD("deleteSmsOnRuim: serial %d", serial);
 #endif
@@ -1988,7 +2000,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getDeviceIdentity(int32_t serial) {
+Return<void> RadioImpl_1_5::getDeviceIdentity(int32_t serial) {
 #if VDBG
     RLOGD("getDeviceIdentity: serial %d", serial);
 #endif
@@ -1996,7 +2008,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::exitEmergencyCallbackMode(int32_t serial) {
+Return<void> RadioImpl_1_5::exitEmergencyCallbackMode(int32_t serial) {
 #if VDBG
     RLOGD("exitEmergencyCallbackMode: serial %d", serial);
 #endif
@@ -2004,7 +2016,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getSmscAddress(int32_t serial) {
+Return<void> RadioImpl_1_5::getSmscAddress(int32_t serial) {
 #if VDBG
     RLOGD("getSmscAddress: serial %d", serial);
 #endif
@@ -2012,7 +2024,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setSmscAddress(int32_t serial, const hidl_string& smsc) {
+Return<void> RadioImpl_1_5::setSmscAddress(int32_t serial, const hidl_string& smsc) {
 #if VDBG
     RLOGD("setSmscAddress: serial %d", serial);
 #endif
@@ -2021,7 +2033,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::reportSmsMemoryStatus(int32_t serial, bool available) {
+Return<void> RadioImpl_1_5::reportSmsMemoryStatus(int32_t serial, bool available) {
 #if VDBG
     RLOGD("reportSmsMemoryStatus: serial %d", serial);
 #endif
@@ -2030,7 +2042,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::reportStkServiceIsRunning(int32_t serial) {
+Return<void> RadioImpl_1_5::reportStkServiceIsRunning(int32_t serial) {
 #if VDBG
     RLOGD("reportStkServiceIsRunning: serial %d", serial);
 #endif
@@ -2038,7 +2050,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getCdmaSubscriptionSource(int32_t serial) {
+Return<void> RadioImpl_1_5::getCdmaSubscriptionSource(int32_t serial) {
 #if VDBG
     RLOGD("getCdmaSubscriptionSource: serial %d", serial);
 #endif
@@ -2046,7 +2058,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::requestIsimAuthentication(int32_t serial, const hidl_string& challenge) {
+Return<void> RadioImpl_1_5::requestIsimAuthentication(int32_t serial, const hidl_string& challenge) {
 #if VDBG
     RLOGD("requestIsimAuthentication: serial %d", serial);
 #endif
@@ -2055,7 +2067,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::acknowledgeIncomingGsmSmsWithPdu(int32_t serial, bool success,
+Return<void> RadioImpl_1_5::acknowledgeIncomingGsmSmsWithPdu(int32_t serial, bool success,
                                                          const hidl_string& ackPdu) {
 #if VDBG
     RLOGD("acknowledgeIncomingGsmSmsWithPdu: serial %d", serial);
@@ -2065,7 +2077,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendEnvelopeWithStatus(int32_t serial, const hidl_string& contents) {
+Return<void> RadioImpl_1_5::sendEnvelopeWithStatus(int32_t serial, const hidl_string& contents) {
 #if VDBG
     RLOGD("sendEnvelopeWithStatus: serial %d", serial);
 #endif
@@ -2074,7 +2086,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getVoiceRadioTechnology(int32_t serial) {
+Return<void> RadioImpl_1_5::getVoiceRadioTechnology(int32_t serial) {
 #if VDBG
     RLOGD("getVoiceRadioTechnology: serial %d", serial);
 #endif
@@ -2082,7 +2094,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getCellInfoList(int32_t serial) {
+Return<void> RadioImpl_1_5::getCellInfoList(int32_t serial) {
 #if VDBG
     RLOGD("getCellInfoList: serial %d", serial);
 #endif
@@ -2090,7 +2102,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setCellInfoListRate(int32_t serial, int32_t rate) {
+Return<void> RadioImpl_1_5::setCellInfoListRate(int32_t serial, int32_t rate) {
 #if VDBG
     RLOGD("setCellInfoListRate: serial %d", serial);
 #endif
@@ -2098,7 +2110,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setInitialAttachApn(int32_t serial, const DataProfileInfo& dataProfileInfo,
+Return<void> RadioImpl_1_5::setInitialAttachApn(int32_t serial, const DataProfileInfo& dataProfileInfo,
                                             bool modemCognitive, bool isRoaming) {
 #if VDBG
     RLOGD("setInitialAttachApn: serial %d", serial);
@@ -2187,7 +2199,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getImsRegistrationState(int32_t serial) {
+Return<void> RadioImpl_1_5::getImsRegistrationState(int32_t serial) {
 #if VDBG
     RLOGD("getImsRegistrationState: serial %d", serial);
 #endif
@@ -2284,7 +2296,7 @@
     return true;
 }
 
-Return<void> RadioImpl_1_4::sendImsSms(int32_t serial, const ImsSmsMessage& message) {
+Return<void> RadioImpl_1_5::sendImsSms(int32_t serial, const ImsSmsMessage& message) {
 #if VDBG
     RLOGD("sendImsSms: serial %d", serial);
 #endif
@@ -2307,7 +2319,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::iccTransmitApduBasicChannel(int32_t serial, const SimApdu& message) {
+Return<void> RadioImpl_1_5::iccTransmitApduBasicChannel(int32_t serial, const SimApdu& message) {
 #if VDBG
     RLOGD("iccTransmitApduBasicChannel: serial %d", serial);
 #endif
@@ -2315,7 +2327,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::iccOpenLogicalChannel(int32_t serial, const hidl_string& aid, int32_t p2) {
+Return<void> RadioImpl_1_5::iccOpenLogicalChannel(int32_t serial, const hidl_string& aid, int32_t p2) {
 #if VDBG
     RLOGD("iccOpenLogicalChannel: serial %d", serial);
 #endif
@@ -2342,7 +2354,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::iccCloseLogicalChannel(int32_t serial, int32_t channelId) {
+Return<void> RadioImpl_1_5::iccCloseLogicalChannel(int32_t serial, int32_t channelId) {
 #if VDBG
     RLOGD("iccCloseLogicalChannel: serial %d", serial);
 #endif
@@ -2350,7 +2362,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::iccTransmitApduLogicalChannel(int32_t serial, const SimApdu& message) {
+Return<void> RadioImpl_1_5::iccTransmitApduLogicalChannel(int32_t serial, const SimApdu& message) {
 #if VDBG
     RLOGD("iccTransmitApduLogicalChannel: serial %d", serial);
 #endif
@@ -2358,7 +2370,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::nvReadItem(int32_t serial, NvItem itemId) {
+Return<void> RadioImpl_1_5::nvReadItem(int32_t serial, NvItem itemId) {
 #if VDBG
     RLOGD("nvReadItem: serial %d", serial);
 #endif
@@ -2374,7 +2386,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::nvWriteItem(int32_t serial, const NvWriteItem& item) {
+Return<void> RadioImpl_1_5::nvWriteItem(int32_t serial, const NvWriteItem& item) {
 #if VDBG
     RLOGD("nvWriteItem: serial %d", serial);
 #endif
@@ -2397,7 +2409,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::nvWriteCdmaPrl(int32_t serial, const hidl_vec<uint8_t>& prl) {
+Return<void> RadioImpl_1_5::nvWriteCdmaPrl(int32_t serial, const hidl_vec<uint8_t>& prl) {
 #if VDBG
     RLOGD("nvWriteCdmaPrl: serial %d", serial);
 #endif
@@ -2405,7 +2417,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::nvResetConfig(int32_t serial, ResetNvType resetType) {
+Return<void> RadioImpl_1_5::nvResetConfig(int32_t serial, ResetNvType resetType) {
     int rilResetType = -1;
 #if VDBG
     RLOGD("nvResetConfig: serial %d", serial);
@@ -2431,7 +2443,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setUiccSubscription(int32_t serial, const SelectUiccSub& uiccSub) {
+Return<void> RadioImpl_1_5::setUiccSubscription(int32_t serial, const SelectUiccSub& uiccSub) {
 #if VDBG
     RLOGD("setUiccSubscription: serial %d", serial);
 #endif
@@ -2452,7 +2464,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setDataAllowed(int32_t serial, bool allow) {
+Return<void> RadioImpl_1_5::setDataAllowed(int32_t serial, bool allow) {
 #if VDBG
     RLOGD("setDataAllowed: serial %d", serial);
 #endif
@@ -2460,7 +2472,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getHardwareConfig(int32_t serial) {
+Return<void> RadioImpl_1_5::getHardwareConfig(int32_t serial) {
 #if VDBG
     RLOGD("getHardwareConfig: serial %d", serial);
 #endif
@@ -2469,7 +2481,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::requestIccSimAuthentication(int32_t serial, int32_t authContext,
+Return<void> RadioImpl_1_5::requestIccSimAuthentication(int32_t serial, int32_t authContext,
         const hidl_string& authData, const hidl_string& aid) {
 #if VDBG
     RLOGD("requestIccSimAuthentication: serial %d", serial);
@@ -2532,7 +2544,7 @@
     free(dataProfilePtrs);
 }
 
-Return<void> RadioImpl_1_4::setDataProfile(int32_t serial, const hidl_vec<DataProfileInfo>& profiles,
+Return<void> RadioImpl_1_5::setDataProfile(int32_t serial, const hidl_vec<DataProfileInfo>& profiles,
                                        bool isRoaming) {
 #if VDBG
     RLOGD("setDataProfile: serial %d", serial);
@@ -2694,7 +2706,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::requestShutdown(int32_t serial) {
+Return<void> RadioImpl_1_5::requestShutdown(int32_t serial) {
 #if VDBG
     RLOGD("requestShutdown: serial %d", serial);
 #endif
@@ -2702,7 +2714,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getRadioCapability(int32_t serial) {
+Return<void> RadioImpl_1_5::getRadioCapability(int32_t serial) {
 #if VDBG
     RLOGD("getRadioCapability: serial %d", serial);
 #endif
@@ -2710,7 +2722,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setRadioCapability(int32_t serial, const RadioCapability& rc) {
+Return<void> RadioImpl_1_5::setRadioCapability(int32_t serial, const RadioCapability& rc) {
 #if VDBG
     RLOGD("setRadioCapability: serial %d", serial);
 #endif
@@ -2733,7 +2745,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::startLceService(int32_t serial, int32_t reportInterval, bool pullMode) {
+Return<void> RadioImpl_1_5::startLceService(int32_t serial, int32_t reportInterval, bool pullMode) {
 #if VDBG
     RLOGD("startLceService: serial %d", serial);
 #endif
@@ -2742,7 +2754,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::stopLceService(int32_t serial) {
+Return<void> RadioImpl_1_5::stopLceService(int32_t serial) {
 #if VDBG
     RLOGD("stopLceService: serial %d", serial);
 #endif
@@ -2750,7 +2762,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::pullLceData(int32_t serial) {
+Return<void> RadioImpl_1_5::pullLceData(int32_t serial) {
 #if VDBG
     RLOGD("pullLceData: serial %d", serial);
 #endif
@@ -2758,7 +2770,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getModemActivityInfo(int32_t serial) {
+Return<void> RadioImpl_1_5::getModemActivityInfo(int32_t serial) {
 #if VDBG
     RLOGD("getModemActivityInfo: serial %d", serial);
 #endif
@@ -2831,7 +2843,7 @@
 }
 
 
-Return<void> RadioImpl_1_4::setAllowedCarriers(int32_t serial, bool allAllowed,
+Return<void> RadioImpl_1_5::setAllowedCarriers(int32_t serial, bool allAllowed,
                                            const CarrierRestrictions& carriers) {
 #if VDBG
     RLOGD("setAllowedCarriers: serial %d", serial);
@@ -2855,7 +2867,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setAllowedCarriers_1_4(int32_t  serial,
+Return<void> RadioImpl_1_5::setAllowedCarriers_1_4(int32_t  serial,
         const ::android::hardware::radio::V1_4::CarrierRestrictionsWithPriority& carriers,
         ::android::hardware::radio::V1_4::SimLockMultiSimPolicy multiSimPolicy) {
 #if VDBG
@@ -2891,7 +2903,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getAllowedCarriers(int32_t serial) {
+Return<void> RadioImpl_1_5::getAllowedCarriers(int32_t serial) {
 #if VDBG
     RLOGD("getAllowedCarriers: serial %d", serial);
 #endif
@@ -2899,7 +2911,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getAllowedCarriers_1_4(int32_t serial) {
+Return<void> RadioImpl_1_5::getAllowedCarriers_1_4(int32_t serial) {
 #if VDBG
     RLOGD("getAllowedCarriers_1_4: serial %d", serial);
 #endif
@@ -2907,7 +2919,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::sendDeviceState(int32_t serial, DeviceStateType deviceStateType,
+Return<void> RadioImpl_1_5::sendDeviceState(int32_t serial, DeviceStateType deviceStateType,
                                         bool state) {
 #if VDBG
     RLOGD("sendDeviceState: serial %d", serial);
@@ -2928,7 +2940,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setIndicationFilter(int32_t serial, int32_t indicationFilter) {
+Return<void> RadioImpl_1_5::setIndicationFilter(int32_t serial, int32_t indicationFilter) {
 #if VDBG
     RLOGD("setIndicationFilter: serial %d", serial);
 #endif
@@ -2942,7 +2954,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setSimCardPower(int32_t serial, bool powerUp) {
+Return<void> RadioImpl_1_5::setSimCardPower(int32_t serial, bool powerUp) {
 #if VDBG
     RLOGD("setSimCardPower: serial %d", serial);
 #endif
@@ -2950,7 +2962,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setSimCardPower_1_1(int32_t serial, const V1_1::CardPowerState state) {
+Return<void> RadioImpl_1_5::setSimCardPower_1_1(int32_t serial, const V1_1::CardPowerState state) {
 #if VDBG
     RLOGD("setSimCardPower_1_1: serial %d state %d", serial, state);
 #endif
@@ -2958,7 +2970,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setCarrierInfoForImsiEncryption(int32_t serial,
+Return<void> RadioImpl_1_5::setCarrierInfoForImsiEncryption(int32_t serial,
         const V1_1::ImsiEncryptionInfo& data) {
 #if VDBG
     RLOGD("setCarrierInfoForImsiEncryption: serial %d", serial);
@@ -2992,7 +3004,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::startKeepalive(int32_t serial, const V1_1::KeepaliveRequest& keepalive) {
+Return<void> RadioImpl_1_5::startKeepalive(int32_t serial, const V1_1::KeepaliveRequest& keepalive) {
 #if VDBG
     RLOGD("%s(): %d", __FUNCTION__, serial);
 #endif
@@ -3041,7 +3053,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::stopKeepalive(int32_t serial, int32_t sessionHandle) {
+Return<void> RadioImpl_1_5::stopKeepalive(int32_t serial, int32_t sessionHandle) {
 #if VDBG
     RLOGD("%s(): %d", __FUNCTION__, serial);
 #endif
@@ -3054,7 +3066,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::responseAcknowledgement() {
+Return<void> RadioImpl_1_5::responseAcknowledgement() {
     android::releaseWakeLock();
     return Void();
 }
@@ -3148,7 +3160,7 @@
 }
 
 // Methods from ::android::hardware::radio::V1_2::IRadio follow.
-Return<void> RadioImpl_1_4::startNetworkScan_1_2(int32_t serial,
+Return<void> RadioImpl_1_5::startNetworkScan_1_2(int32_t serial,
         const ::android::hardware::radio::V1_2::NetworkScanRequest& request) {
 #if VDBG
     RLOGD("startNetworkScan_1_2: serial %d", serial);
@@ -3175,7 +3187,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setIndicationFilter_1_2(int32_t /* serial */,
+Return<void> RadioImpl_1_5::setIndicationFilter_1_2(int32_t /* serial */,
         hidl_bitfield<::android::hardware::radio::V1_2::IndicationFilter> /* indicationFilter */) {
     // TODO implement
 #if VDBG
@@ -3184,7 +3196,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setSignalStrengthReportingCriteria(int32_t /* serial */,
+Return<void> RadioImpl_1_5::setSignalStrengthReportingCriteria(int32_t /* serial */,
         int32_t /* hysteresisMs */, int32_t /* hysteresisDb */,
         const hidl_vec<int32_t>& /* thresholdsDbm */,
         ::android::hardware::radio::V1_2::AccessNetwork /* accessNetwork */) {
@@ -3195,7 +3207,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setLinkCapacityReportingCriteria(int32_t /* serial */,
+Return<void> RadioImpl_1_5::setLinkCapacityReportingCriteria(int32_t /* serial */,
         int32_t /* hysteresisMs */, int32_t /* hysteresisDlKbps */, int32_t /* hysteresisUlKbps */,
         const hidl_vec<int32_t>& /* thresholdsDownlinkKbps */,
         const hidl_vec<int32_t>& /* thresholdsUplinkKbps */,
@@ -3207,7 +3219,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setupDataCall_1_2(int32_t /* serial */,
+Return<void> RadioImpl_1_5::setupDataCall_1_2(int32_t /* serial */,
         ::android::hardware::radio::V1_2::AccessNetwork /* accessNetwork */,
         const ::android::hardware::radio::V1_0::DataProfileInfo& /* dataProfileInfo */,
         bool /* modemCognitive */, bool /* roamingAllowed */, bool /* isRoaming */,
@@ -3220,7 +3232,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::deactivateDataCall_1_2(int32_t /* serial */, int32_t /* cid */,
+Return<void> RadioImpl_1_5::deactivateDataCall_1_2(int32_t /* serial */, int32_t /* cid */,
         ::android::hardware::radio::V1_2::DataRequestReason /* reason */) {
     // TODO implement
 #if VDBG
@@ -3230,7 +3242,7 @@
 }
 
 // Methods from ::android::hardware::radio::V1_3::IRadio follow.
-Return<void> RadioImpl_1_4::setSystemSelectionChannels(int32_t serial, bool /* specifyChannels */,
+Return<void> RadioImpl_1_5::setSystemSelectionChannels(int32_t serial, bool /* specifyChannels */,
         const hidl_vec<::android::hardware::radio::V1_1::RadioAccessSpecifier>& /* specifiers */) {
 #if VDBG
     RLOGD("setSystemSelectionChannels: serial %d", serial);
@@ -3239,7 +3251,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::enableModem(int32_t serial, bool /* on */) {
+Return<void> RadioImpl_1_5::enableModem(int32_t serial, bool /* on */) {
 #if VDBG
     RLOGE("enableModem: serial = %d, enable = %s", serial, on);
 #endif
@@ -3247,7 +3259,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getModemStackStatus(int32_t serial) {
+Return<void> RadioImpl_1_5::getModemStackStatus(int32_t serial) {
 #if VDBG
     RLOGD("getModemStackStatus: serial %d", serial);
 #endif
@@ -3275,7 +3287,7 @@
 }
 
 // Methods from ::android::hardware::radio::V1_4::IRadio follow.
-Return<void> RadioImpl_1_4::setupDataCall_1_4(int32_t serial ,
+Return<void> RadioImpl_1_5::setupDataCall_1_4(int32_t serial ,
         ::android::hardware::radio::V1_4::AccessNetwork /* accessNetwork */,
         const ::android::hardware::radio::V1_4::DataProfileInfo& dataProfileInfo,
         bool roamingAllowed, ::android::hardware::radio::V1_2::DataRequestReason /* reason */,
@@ -3313,7 +3325,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setInitialAttachApn_1_4(int32_t  serial ,
+Return<void> RadioImpl_1_5::setInitialAttachApn_1_4(int32_t  serial ,
         const ::android::hardware::radio::V1_4::DataProfileInfo& dataProfileInfo) {
     RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
             RIL_REQUEST_SET_INITIAL_ATTACH_APN);
@@ -3339,7 +3351,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setDataProfile_1_4(int32_t  serial ,
+Return<void> RadioImpl_1_5::setDataProfile_1_4(int32_t  serial ,
         const hidl_vec<::android::hardware::radio::V1_4::DataProfileInfo>& /* profiles */) {
     RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
             RIL_REQUEST_SET_DATA_PROFILE);
@@ -3365,7 +3377,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::emergencyDial(int32_t serial,
+Return<void> RadioImpl_1_5::emergencyDial(int32_t serial,
         const ::android::hardware::radio::V1_0::Dial& dialInfo,
         hidl_bitfield<android::hardware::radio::V1_4::EmergencyServiceCategory> /* categories */,
         const hidl_vec<hidl_string>& /* urns */,
@@ -3413,7 +3425,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::startNetworkScan_1_4(int32_t serial,
+Return<void> RadioImpl_1_5::startNetworkScan_1_4(int32_t serial,
         const ::android::hardware::radio::V1_2::NetworkScanRequest& request) {
 #if VDBG
     RLOGD("startNetworkScan_1_4: serial %d", serial);
@@ -3440,7 +3452,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getPreferredNetworkTypeBitmap(int32_t serial ) {
+Return<void> RadioImpl_1_5::getPreferredNetworkTypeBitmap(int32_t serial ) {
 #if VDBG
     RLOGD("getPreferredNetworkTypeBitmap: serial %d", serial);
 #endif
@@ -3448,7 +3460,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::setPreferredNetworkTypeBitmap(
+Return<void> RadioImpl_1_5::setPreferredNetworkTypeBitmap(
         int32_t serial, hidl_bitfield<RadioAccessFamily> networkTypeBitmap) {
 #if VDBG
     RLOGD("setPreferredNetworkTypeBitmap: serial %d", serial);
@@ -3457,7 +3469,7 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_4::getSignalStrength_1_4(int32_t serial) {
+Return<void> RadioImpl_1_5::getSignalStrength_1_4(int32_t serial) {
 #if VDBG
     RLOGD("getSignalStrength_1_4: serial %d", serial);
 #endif
@@ -3472,7 +3484,7 @@
     RLOGD("OemHookImpl::setResponseFunctions");
 #endif
 
-    pthread_rwlock_t *radioServiceRwlockPtr = radio_1_4::getRadioServiceRwlock(mSlotId);
+    pthread_rwlock_t *radioServiceRwlockPtr = radio_1_5::getRadioServiceRwlock(mSlotId);
     int ret = pthread_rwlock_wrlock(radioServiceRwlockPtr);
     assert(ret == 0);
 
@@ -3509,7 +3521,7 @@
  * responses for those requests coming back from the vendor code.
  **************************************************************************************************/
 
-void radio_1_4::acknowledgeRequest(int slotId, int serial) {
+void radio_1_5::acknowledgeRequest(int slotId, int serial) {
     if (radioService[slotId]->mRadioResponse != NULL) {
         Return<void> retStatus = radioService[slotId]->mRadioResponse->acknowledgeRequest(serial);
         radioService[slotId]->checkReturnStatus(retStatus);
@@ -3566,7 +3578,7 @@
     return ret;
 }
 
-int radio_1_4::getIccCardStatusResponse(int slotId,
+int radio_1_5::getIccCardStatusResponse(int slotId,
                                    int responseType, int serial, RIL_Errno e,
                                    void *response, size_t responseLen) {
     if (radioService[slotId]->mRadioResponseV1_4 != NULL
@@ -3644,7 +3656,7 @@
     return 0;
 }
 
-int radio_1_4::supplyIccPinForAppResponse(int slotId,
+int radio_1_5::supplyIccPinForAppResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -3666,7 +3678,7 @@
     return 0;
 }
 
-int radio_1_4::supplyIccPukForAppResponse(int slotId,
+int radio_1_5::supplyIccPukForAppResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -3687,7 +3699,7 @@
     return 0;
 }
 
-int radio_1_4::supplyIccPin2ForAppResponse(int slotId,
+int radio_1_5::supplyIccPin2ForAppResponse(int slotId,
                                       int responseType, int serial, RIL_Errno e,
                                       void *response, size_t responseLen) {
 #if VDBG
@@ -3708,7 +3720,7 @@
     return 0;
 }
 
-int radio_1_4::supplyIccPuk2ForAppResponse(int slotId,
+int radio_1_5::supplyIccPuk2ForAppResponse(int slotId,
                                       int responseType, int serial, RIL_Errno e,
                                       void *response, size_t responseLen) {
 #if VDBG
@@ -3729,7 +3741,7 @@
     return 0;
 }
 
-int radio_1_4::changeIccPinForAppResponse(int slotId,
+int radio_1_5::changeIccPinForAppResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -3750,7 +3762,7 @@
     return 0;
 }
 
-int radio_1_4::changeIccPin2ForAppResponse(int slotId,
+int radio_1_5::changeIccPin2ForAppResponse(int slotId,
                                       int responseType, int serial, RIL_Errno e,
                                       void *response, size_t responseLen) {
 #if VDBG
@@ -3771,7 +3783,7 @@
     return 0;
 }
 
-int radio_1_4::supplyNetworkDepersonalizationResponse(int slotId,
+int radio_1_5::supplyNetworkDepersonalizationResponse(int slotId,
                                                  int responseType, int serial, RIL_Errno e,
                                                  void *response, size_t responseLen) {
 #if VDBG
@@ -3792,7 +3804,7 @@
     return 0;
 }
 
-int radio_1_4::getCurrentCallsResponse(int slotId,
+int radio_1_5::getCurrentCallsResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
 #if VDBG
@@ -3850,7 +3862,7 @@
     return 0;
 }
 
-int radio_1_4::dialResponse(int slotId,
+int radio_1_5::dialResponse(int slotId,
                        int responseType, int serial, RIL_Errno e, void *response,
                        size_t responseLen) {
 #if VDBG
@@ -3869,7 +3881,7 @@
     return 0;
 }
 
-int radio_1_4::getIMSIForAppResponse(int slotId,
+int radio_1_5::getIMSIForAppResponse(int slotId,
                                 int responseType, int serial, RIL_Errno e, void *response,
                                 size_t responseLen) {
 #if VDBG
@@ -3890,7 +3902,7 @@
     return 0;
 }
 
-int radio_1_4::hangupConnectionResponse(int slotId,
+int radio_1_5::hangupConnectionResponse(int slotId,
                                    int responseType, int serial, RIL_Errno e,
                                    void *response, size_t responseLen) {
 #if VDBG
@@ -3911,7 +3923,7 @@
     return 0;
 }
 
-int radio_1_4::hangupWaitingOrBackgroundResponse(int slotId,
+int radio_1_5::hangupWaitingOrBackgroundResponse(int slotId,
                                             int responseType, int serial, RIL_Errno e,
                                             void *response, size_t responseLen) {
 #if VDBG
@@ -3933,7 +3945,7 @@
     return 0;
 }
 
-int radio_1_4::hangupForegroundResumeBackgroundResponse(int slotId, int responseType, int serial,
+int radio_1_5::hangupForegroundResumeBackgroundResponse(int slotId, int responseType, int serial,
                                                     RIL_Errno e, void *response,
                                                     size_t responseLen) {
 #if VDBG
@@ -3955,7 +3967,7 @@
     return 0;
 }
 
-int radio_1_4::switchWaitingOrHoldingAndActiveResponse(int slotId, int responseType, int serial,
+int radio_1_5::switchWaitingOrHoldingAndActiveResponse(int slotId, int responseType, int serial,
                                                    RIL_Errno e, void *response,
                                                    size_t responseLen) {
 #if VDBG
@@ -3977,7 +3989,7 @@
     return 0;
 }
 
-int radio_1_4::conferenceResponse(int slotId, int responseType,
+int radio_1_5::conferenceResponse(int slotId, int responseType,
                              int serial, RIL_Errno e, void *response, size_t responseLen) {
 #if VDBG
     RLOGD("conferenceResponse: serial %d", serial);
@@ -3997,7 +4009,7 @@
     return 0;
 }
 
-int radio_1_4::rejectCallResponse(int slotId, int responseType,
+int radio_1_5::rejectCallResponse(int slotId, int responseType,
                              int serial, RIL_Errno e, void *response, size_t responseLen) {
 #if VDBG
     RLOGD("rejectCallResponse: serial %d", serial);
@@ -4017,7 +4029,7 @@
     return 0;
 }
 
-int radio_1_4::getLastCallFailCauseResponse(int slotId,
+int radio_1_5::getLastCallFailCauseResponse(int slotId,
                                        int responseType, int serial, RIL_Errno e, void *response,
                                        size_t responseLen) {
 #if VDBG
@@ -4056,7 +4068,7 @@
     return 0;
 }
 
-int radio_1_4::getSignalStrengthResponse(int slotId,
+int radio_1_5::getSignalStrengthResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -4395,7 +4407,7 @@
     fillCellIdentityResponse(cellIdentity, rilCellIdentity);
 }
 
-int radio_1_4::getVoiceRegistrationStateResponse(int slotId,
+int radio_1_5::getVoiceRegistrationStateResponse(int slotId,
                                             int responseType, int serial, RIL_Errno e,
                                             void *response, size_t responseLen) {
 #if VDBG
@@ -4459,7 +4471,7 @@
     return 0;
 }
 
-int radio_1_4::getDataRegistrationStateResponse(int slotId,
+int radio_1_5::getDataRegistrationStateResponse(int slotId,
                                            int responseType, int serial, RIL_Errno e,
                                            void *response, size_t responseLen) {
 #if VDBG
@@ -4515,7 +4527,7 @@
     return 0;
 }
 
-int radio_1_4::getOperatorResponse(int slotId,
+int radio_1_5::getOperatorResponse(int slotId,
                               int responseType, int serial, RIL_Errno e, void *response,
                               size_t responseLen) {
 #if VDBG
@@ -4550,7 +4562,7 @@
     return 0;
 }
 
-int radio_1_4::setRadioPowerResponse(int slotId,
+int radio_1_5::setRadioPowerResponse(int slotId,
                                 int responseType, int serial, RIL_Errno e, void *response,
                                 size_t responseLen) {
     RLOGD("setRadioPowerResponse: serial %d", serial);
@@ -4569,7 +4581,7 @@
     return 0;
 }
 
-int radio_1_4::sendDtmfResponse(int slotId,
+int radio_1_5::sendDtmfResponse(int slotId,
                            int responseType, int serial, RIL_Errno e, void *response,
                            size_t responseLen) {
 #if VDBG
@@ -4608,7 +4620,7 @@
     return result;
 }
 
-int radio_1_4::sendSmsResponse(int slotId,
+int radio_1_5::sendSmsResponse(int slotId,
                           int responseType, int serial, RIL_Errno e, void *response,
                           size_t responseLen) {
 #if VDBG
@@ -4630,7 +4642,7 @@
     return 0;
 }
 
-int radio_1_4::sendSMSExpectMoreResponse(int slotId,
+int radio_1_5::sendSMSExpectMoreResponse(int slotId,
                                     int responseType, int serial, RIL_Errno e, void *response,
                                     size_t responseLen) {
 #if VDBG
@@ -4652,7 +4664,7 @@
     return 0;
 }
 
-int radio_1_4::setupDataCallResponse(int slotId,
+int radio_1_5::setupDataCallResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e, void *response,
                                  size_t responseLen) {
 #if VDBG
@@ -4731,7 +4743,7 @@
     return result;
 }
 
-int radio_1_4::iccIOForAppResponse(int slotId,
+int radio_1_5::iccIOForAppResponse(int slotId,
                       int responseType, int serial, RIL_Errno e, void *response,
                       size_t responseLen) {
 #if VDBG
@@ -4753,7 +4765,7 @@
     return 0;
 }
 
-int radio_1_4::sendUssdResponse(int slotId,
+int radio_1_5::sendUssdResponse(int slotId,
                            int responseType, int serial, RIL_Errno e, void *response,
                            size_t responseLen) {
 #if VDBG
@@ -4774,7 +4786,7 @@
     return 0;
 }
 
-int radio_1_4::cancelPendingUssdResponse(int slotId,
+int radio_1_5::cancelPendingUssdResponse(int slotId,
                                     int responseType, int serial, RIL_Errno e, void *response,
                                     size_t responseLen) {
 #if VDBG
@@ -4795,7 +4807,7 @@
     return 0;
 }
 
-int radio_1_4::getClirResponse(int slotId,
+int radio_1_5::getClirResponse(int slotId,
                               int responseType, int serial, RIL_Errno e, void *response,
                               size_t responseLen) {
 #if VDBG
@@ -4825,7 +4837,7 @@
     return 0;
 }
 
-int radio_1_4::setClirResponse(int slotId,
+int radio_1_5::setClirResponse(int slotId,
                           int responseType, int serial, RIL_Errno e, void *response,
                           size_t responseLen) {
 #if VDBG
@@ -4845,7 +4857,7 @@
     return 0;
 }
 
-int radio_1_4::getCallForwardStatusResponse(int slotId,
+int radio_1_5::getCallForwardStatusResponse(int slotId,
                                        int responseType, int serial, RIL_Errno e,
                                        void *response, size_t responseLen) {
 #if VDBG
@@ -4886,7 +4898,7 @@
     return 0;
 }
 
-int radio_1_4::setCallForwardResponse(int slotId,
+int radio_1_5::setCallForwardResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e, void *response,
                                  size_t responseLen) {
 #if VDBG
@@ -4906,7 +4918,7 @@
     return 0;
 }
 
-int radio_1_4::getCallWaitingResponse(int slotId,
+int radio_1_5::getCallWaitingResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e, void *response,
                                  size_t responseLen) {
 #if VDBG
@@ -4937,7 +4949,7 @@
     return 0;
 }
 
-int radio_1_4::setCallWaitingResponse(int slotId,
+int radio_1_5::setCallWaitingResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e, void *response,
                                  size_t responseLen) {
 #if VDBG
@@ -4957,7 +4969,7 @@
     return 0;
 }
 
-int radio_1_4::acknowledgeLastIncomingGsmSmsResponse(int slotId,
+int radio_1_5::acknowledgeLastIncomingGsmSmsResponse(int slotId,
                                                 int responseType, int serial, RIL_Errno e,
                                                 void *response, size_t responseLen) {
 #if VDBG
@@ -4979,7 +4991,7 @@
     return 0;
 }
 
-int radio_1_4::acceptCallResponse(int slotId,
+int radio_1_5::acceptCallResponse(int slotId,
                              int responseType, int serial, RIL_Errno e,
                              void *response, size_t responseLen) {
 #if VDBG
@@ -5000,7 +5012,7 @@
     return 0;
 }
 
-int radio_1_4::deactivateDataCallResponse(int slotId,
+int radio_1_5::deactivateDataCallResponse(int slotId,
                                                 int responseType, int serial, RIL_Errno e,
                                                 void *response, size_t responseLen) {
 #if VDBG
@@ -5021,7 +5033,7 @@
     return 0;
 }
 
-int radio_1_4::getFacilityLockForAppResponse(int slotId,
+int radio_1_5::getFacilityLockForAppResponse(int slotId,
                                         int responseType, int serial, RIL_Errno e,
                                         void *response, size_t responseLen) {
 #if VDBG
@@ -5042,7 +5054,7 @@
     return 0;
 }
 
-int radio_1_4::setFacilityLockForAppResponse(int slotId,
+int radio_1_5::setFacilityLockForAppResponse(int slotId,
                                       int responseType, int serial, RIL_Errno e,
                                       void *response, size_t responseLen) {
 #if VDBG
@@ -5064,7 +5076,7 @@
     return 0;
 }
 
-int radio_1_4::setBarringPasswordResponse(int slotId,
+int radio_1_5::setBarringPasswordResponse(int slotId,
                              int responseType, int serial, RIL_Errno e,
                              void *response, size_t responseLen) {
 #if VDBG
@@ -5085,7 +5097,7 @@
     return 0;
 }
 
-int radio_1_4::getNetworkSelectionModeResponse(int slotId,
+int radio_1_5::getNetworkSelectionModeResponse(int slotId,
                                           int responseType, int serial, RIL_Errno e, void *response,
                                           size_t responseLen) {
 #if VDBG
@@ -5116,7 +5128,7 @@
     return 0;
 }
 
-int radio_1_4::setNetworkSelectionModeAutomaticResponse(int slotId, int responseType, int serial,
+int radio_1_5::setNetworkSelectionModeAutomaticResponse(int slotId, int responseType, int serial,
                                                     RIL_Errno e, void *response,
                                                     size_t responseLen) {
 #if VDBG
@@ -5138,7 +5150,7 @@
     return 0;
 }
 
-int radio_1_4::setNetworkSelectionModeManualResponse(int slotId,
+int radio_1_5::setNetworkSelectionModeManualResponse(int slotId,
                              int responseType, int serial, RIL_Errno e,
                              void *response, size_t responseLen) {
 #if VDBG
@@ -5174,7 +5186,7 @@
     }
 }
 
-int radio_1_4::getAvailableNetworksResponse(int slotId,
+int radio_1_5::getAvailableNetworksResponse(int slotId,
                               int responseType, int serial, RIL_Errno e, void *response,
                               size_t responseLen) {
 #if VDBG
@@ -5217,7 +5229,7 @@
     return 0;
 }
 
-int radio_1_4::startDtmfResponse(int slotId,
+int radio_1_5::startDtmfResponse(int slotId,
                             int responseType, int serial, RIL_Errno e,
                             void *response, size_t responseLen) {
 #if VDBG
@@ -5237,7 +5249,7 @@
     return 0;
 }
 
-int radio_1_4::stopDtmfResponse(int slotId,
+int radio_1_5::stopDtmfResponse(int slotId,
                            int responseType, int serial, RIL_Errno e,
                            void *response, size_t responseLen) {
 #if VDBG
@@ -5257,7 +5269,7 @@
     return 0;
 }
 
-int radio_1_4::getBasebandVersionResponse(int slotId,
+int radio_1_5::getBasebandVersionResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -5278,7 +5290,7 @@
     return 0;
 }
 
-int radio_1_4::separateConnectionResponse(int slotId,
+int radio_1_5::separateConnectionResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -5299,7 +5311,7 @@
     return 0;
 }
 
-int radio_1_4::setMuteResponse(int slotId,
+int radio_1_5::setMuteResponse(int slotId,
                           int responseType, int serial, RIL_Errno e,
                           void *response, size_t responseLen) {
 #if VDBG
@@ -5319,7 +5331,7 @@
     return 0;
 }
 
-int radio_1_4::getMuteResponse(int slotId,
+int radio_1_5::getMuteResponse(int slotId,
                           int responseType, int serial, RIL_Errno e, void *response,
                           size_t responseLen) {
 #if VDBG
@@ -5347,7 +5359,7 @@
     return 0;
 }
 
-int radio_1_4::getClipResponse(int slotId,
+int radio_1_5::getClipResponse(int slotId,
                           int responseType, int serial, RIL_Errno e,
                           void *response, size_t responseLen) {
 #if VDBG
@@ -5367,7 +5379,7 @@
     return 0;
 }
 
-int radio_1_4::getDataCallListResponse(int slotId,
+int radio_1_5::getDataCallListResponse(int slotId,
                                    int responseType, int serial, RIL_Errno e,
                                    void *response, size_t responseLen) {
 #if VDBG
@@ -5397,7 +5409,7 @@
     return 0;
 }
 
-int radio_1_4::setSuppServiceNotificationsResponse(int slotId,
+int radio_1_5::setSuppServiceNotificationsResponse(int slotId,
                                               int responseType, int serial, RIL_Errno e,
                                               void *response, size_t responseLen) {
 #if VDBG
@@ -5419,7 +5431,7 @@
     return 0;
 }
 
-int radio_1_4::deleteSmsOnSimResponse(int slotId,
+int radio_1_5::deleteSmsOnSimResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -5439,7 +5451,7 @@
     return 0;
 }
 
-int radio_1_4::setBandModeResponse(int slotId,
+int radio_1_5::setBandModeResponse(int slotId,
                               int responseType, int serial, RIL_Errno e,
                               void *response, size_t responseLen) {
 #if VDBG
@@ -5459,7 +5471,7 @@
     return 0;
 }
 
-int radio_1_4::writeSmsToSimResponse(int slotId,
+int radio_1_5::writeSmsToSimResponse(int slotId,
                                 int responseType, int serial, RIL_Errno e,
                                 void *response, size_t responseLen) {
 #if VDBG
@@ -5479,7 +5491,7 @@
     return 0;
 }
 
-int radio_1_4::getAvailableBandModesResponse(int slotId,
+int radio_1_5::getAvailableBandModesResponse(int slotId,
                                         int responseType, int serial, RIL_Errno e, void *response,
                                         size_t responseLen) {
 #if VDBG
@@ -5513,7 +5525,7 @@
     return 0;
 }
 
-int radio_1_4::sendEnvelopeResponse(int slotId,
+int radio_1_5::sendEnvelopeResponse(int slotId,
                                int responseType, int serial, RIL_Errno e,
                                void *response, size_t responseLen) {
 #if VDBG
@@ -5534,7 +5546,7 @@
     return 0;
 }
 
-int radio_1_4::sendTerminalResponseToSimResponse(int slotId,
+int radio_1_5::sendTerminalResponseToSimResponse(int slotId,
                                             int responseType, int serial, RIL_Errno e,
                                             void *response, size_t responseLen) {
 #if VDBG
@@ -5556,7 +5568,7 @@
     return 0;
 }
 
-int radio_1_4::handleStkCallSetupRequestFromSimResponse(int slotId,
+int radio_1_5::handleStkCallSetupRequestFromSimResponse(int slotId,
                                                    int responseType, int serial,
                                                    RIL_Errno e, void *response,
                                                    size_t responseLen) {
@@ -5579,7 +5591,7 @@
     return 0;
 }
 
-int radio_1_4::explicitCallTransferResponse(int slotId,
+int radio_1_5::explicitCallTransferResponse(int slotId,
                                        int responseType, int serial, RIL_Errno e,
                                        void *response, size_t responseLen) {
 #if VDBG
@@ -5600,7 +5612,7 @@
     return 0;
 }
 
-int radio_1_4::setPreferredNetworkTypeResponse(int slotId,
+int radio_1_5::setPreferredNetworkTypeResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -5623,7 +5635,7 @@
 }
 
 
-int radio_1_4::getPreferredNetworkTypeResponse(int slotId,
+int radio_1_5::getPreferredNetworkTypeResponse(int slotId,
                                           int responseType, int serial, RIL_Errno e,
                                           void *response, size_t responseLen) {
 #if VDBG
@@ -5645,7 +5657,7 @@
     return 0;
 }
 
-int radio_1_4::setPreferredNetworkTypeBitmapResponse(int slotId,
+int radio_1_5::setPreferredNetworkTypeBitmapResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -5668,7 +5680,7 @@
 }
 
 
-int radio_1_4::getPreferredNetworkTypeBitmapResponse(int slotId,
+int radio_1_5::getPreferredNetworkTypeBitmapResponse(int slotId,
                                           int responseType, int serial, RIL_Errno e,
                                           void *response, size_t responseLen) {
 #if VDBG
@@ -5692,7 +5704,7 @@
     return 0;
 }
 
-int radio_1_4::getNeighboringCidsResponse(int slotId,
+int radio_1_5::getNeighboringCidsResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -5730,7 +5742,7 @@
     return 0;
 }
 
-int radio_1_4::setLocationUpdatesResponse(int slotId,
+int radio_1_5::setLocationUpdatesResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -5751,7 +5763,7 @@
     return 0;
 }
 
-int radio_1_4::setCdmaSubscriptionSourceResponse(int slotId,
+int radio_1_5::setCdmaSubscriptionSourceResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -5773,7 +5785,7 @@
     return 0;
 }
 
-int radio_1_4::setCdmaRoamingPreferenceResponse(int slotId,
+int radio_1_5::setCdmaRoamingPreferenceResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -5795,7 +5807,7 @@
     return 0;
 }
 
-int radio_1_4::getCdmaRoamingPreferenceResponse(int slotId,
+int radio_1_5::getCdmaRoamingPreferenceResponse(int slotId,
                                            int responseType, int serial, RIL_Errno e,
                                            void *response, size_t responseLen) {
 #if VDBG
@@ -5817,7 +5829,7 @@
     return 0;
 }
 
-int radio_1_4::setTTYModeResponse(int slotId,
+int radio_1_5::setTTYModeResponse(int slotId,
                              int responseType, int serial, RIL_Errno e,
                              void *response, size_t responseLen) {
 #if VDBG
@@ -5837,7 +5849,7 @@
     return 0;
 }
 
-int radio_1_4::getTTYModeResponse(int slotId,
+int radio_1_5::getTTYModeResponse(int slotId,
                              int responseType, int serial, RIL_Errno e,
                              void *response, size_t responseLen) {
 #if VDBG
@@ -5858,7 +5870,7 @@
     return 0;
 }
 
-int radio_1_4::setPreferredVoicePrivacyResponse(int slotId,
+int radio_1_5::setPreferredVoicePrivacyResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -5880,7 +5892,7 @@
     return 0;
 }
 
-int radio_1_4::getPreferredVoicePrivacyResponse(int slotId,
+int radio_1_5::getPreferredVoicePrivacyResponse(int slotId,
                                            int responseType, int serial, RIL_Errno e,
                                            void *response, size_t responseLen) {
 #if VDBG
@@ -5911,7 +5923,7 @@
     return 0;
 }
 
-int radio_1_4::sendCDMAFeatureCodeResponse(int slotId,
+int radio_1_5::sendCDMAFeatureCodeResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -5932,7 +5944,7 @@
     return 0;
 }
 
-int radio_1_4::sendBurstDtmfResponse(int slotId,
+int radio_1_5::sendBurstDtmfResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -5952,7 +5964,7 @@
     return 0;
 }
 
-int radio_1_4::sendCdmaSmsResponse(int slotId,
+int radio_1_5::sendCdmaSmsResponse(int slotId,
                               int responseType, int serial, RIL_Errno e, void *response,
                               size_t responseLen) {
 #if VDBG
@@ -5974,7 +5986,7 @@
     return 0;
 }
 
-int radio_1_4::acknowledgeLastIncomingCdmaSmsResponse(int slotId,
+int radio_1_5::acknowledgeLastIncomingCdmaSmsResponse(int slotId,
                                                  int responseType, int serial, RIL_Errno e,
                                                  void *response, size_t responseLen) {
 #if VDBG
@@ -5996,7 +6008,7 @@
     return 0;
 }
 
-int radio_1_4::getGsmBroadcastConfigResponse(int slotId,
+int radio_1_5::getGsmBroadcastConfigResponse(int slotId,
                                         int responseType, int serial, RIL_Errno e,
                                         void *response, size_t responseLen) {
 #if VDBG
@@ -6038,7 +6050,7 @@
     return 0;
 }
 
-int radio_1_4::setGsmBroadcastConfigResponse(int slotId,
+int radio_1_5::setGsmBroadcastConfigResponse(int slotId,
                                         int responseType, int serial, RIL_Errno e,
                                         void *response, size_t responseLen) {
 #if VDBG
@@ -6059,7 +6071,7 @@
     return 0;
 }
 
-int radio_1_4::setGsmBroadcastActivationResponse(int slotId,
+int radio_1_5::setGsmBroadcastActivationResponse(int slotId,
                                             int responseType, int serial, RIL_Errno e,
                                             void *response, size_t responseLen) {
 #if VDBG
@@ -6081,7 +6093,7 @@
     return 0;
 }
 
-int radio_1_4::getCdmaBroadcastConfigResponse(int slotId,
+int radio_1_5::getCdmaBroadcastConfigResponse(int slotId,
                                          int responseType, int serial, RIL_Errno e,
                                          void *response, size_t responseLen) {
 #if VDBG
@@ -6121,7 +6133,7 @@
     return 0;
 }
 
-int radio_1_4::setCdmaBroadcastConfigResponse(int slotId,
+int radio_1_5::setCdmaBroadcastConfigResponse(int slotId,
                                          int responseType, int serial, RIL_Errno e,
                                          void *response, size_t responseLen) {
 #if VDBG
@@ -6143,7 +6155,7 @@
     return 0;
 }
 
-int radio_1_4::setCdmaBroadcastActivationResponse(int slotId,
+int radio_1_5::setCdmaBroadcastActivationResponse(int slotId,
                                              int responseType, int serial, RIL_Errno e,
                                              void *response, size_t responseLen) {
 #if VDBG
@@ -6165,7 +6177,7 @@
     return 0;
 }
 
-int radio_1_4::getCDMASubscriptionResponse(int slotId,
+int radio_1_5::getCDMASubscriptionResponse(int slotId,
                                       int responseType, int serial, RIL_Errno e, void *response,
                                       size_t responseLen) {
 #if VDBG
@@ -6205,7 +6217,7 @@
     return 0;
 }
 
-int radio_1_4::writeSmsToRuimResponse(int slotId,
+int radio_1_5::writeSmsToRuimResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -6225,7 +6237,7 @@
     return 0;
 }
 
-int radio_1_4::deleteSmsOnRuimResponse(int slotId,
+int radio_1_5::deleteSmsOnRuimResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
 #if VDBG
@@ -6245,7 +6257,7 @@
     return 0;
 }
 
-int radio_1_4::getDeviceIdentityResponse(int slotId,
+int radio_1_5::getDeviceIdentityResponse(int slotId,
                                     int responseType, int serial, RIL_Errno e, void *response,
                                     size_t responseLen) {
 #if VDBG
@@ -6283,7 +6295,7 @@
     return 0;
 }
 
-int radio_1_4::exitEmergencyCallbackModeResponse(int slotId,
+int radio_1_5::exitEmergencyCallbackModeResponse(int slotId,
                                             int responseType, int serial, RIL_Errno e,
                                             void *response, size_t responseLen) {
 #if VDBG
@@ -6305,7 +6317,7 @@
     return 0;
 }
 
-int radio_1_4::getSmscAddressResponse(int slotId,
+int radio_1_5::getSmscAddressResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
 #if VDBG
@@ -6326,7 +6338,7 @@
     return 0;
 }
 
-int radio_1_4::setSmscAddressResponse(int slotId,
+int radio_1_5::setSmscAddressResponse(int slotId,
                                              int responseType, int serial, RIL_Errno e,
                                              void *response, size_t responseLen) {
 #if VDBG
@@ -6346,7 +6358,7 @@
     return 0;
 }
 
-int radio_1_4::reportSmsMemoryStatusResponse(int slotId,
+int radio_1_5::reportSmsMemoryStatusResponse(int slotId,
                                         int responseType, int serial, RIL_Errno e,
                                         void *response, size_t responseLen) {
 #if VDBG
@@ -6367,7 +6379,7 @@
     return 0;
 }
 
-int radio_1_4::reportStkServiceIsRunningResponse(int slotId,
+int radio_1_5::reportStkServiceIsRunningResponse(int slotId,
                                              int responseType, int serial, RIL_Errno e,
                                              void *response, size_t responseLen) {
 #if VDBG
@@ -6388,7 +6400,7 @@
     return 0;
 }
 
-int radio_1_4::getCdmaSubscriptionSourceResponse(int slotId,
+int radio_1_5::getCdmaSubscriptionSourceResponse(int slotId,
                                             int responseType, int serial, RIL_Errno e,
                                             void *response, size_t responseLen) {
 #if VDBG
@@ -6410,7 +6422,7 @@
     return 0;
 }
 
-int radio_1_4::requestIsimAuthenticationResponse(int slotId,
+int radio_1_5::requestIsimAuthenticationResponse(int slotId,
                                             int responseType, int serial, RIL_Errno e,
                                             void *response, size_t responseLen) {
 #if VDBG
@@ -6433,7 +6445,7 @@
     return 0;
 }
 
-int radio_1_4::acknowledgeIncomingGsmSmsWithPduResponse(int slotId,
+int radio_1_5::acknowledgeIncomingGsmSmsWithPduResponse(int slotId,
                                                    int responseType,
                                                    int serial, RIL_Errno e, void *response,
                                                    size_t responseLen) {
@@ -6456,7 +6468,7 @@
     return 0;
 }
 
-int radio_1_4::sendEnvelopeWithStatusResponse(int slotId,
+int radio_1_5::sendEnvelopeWithStatusResponse(int slotId,
                                          int responseType, int serial, RIL_Errno e, void *response,
                                          size_t responseLen) {
 #if VDBG
@@ -6480,7 +6492,7 @@
     return 0;
 }
 
-int radio_1_4::getVoiceRadioTechnologyResponse(int slotId,
+int radio_1_5::getVoiceRadioTechnologyResponse(int slotId,
                                           int responseType, int serial, RIL_Errno e,
                                           void *response, size_t responseLen) {
 #if VDBG
@@ -6502,7 +6514,7 @@
     return 0;
 }
 
-int radio_1_4::getCellInfoListResponse(int slotId,
+int radio_1_5::getCellInfoListResponse(int slotId,
                                    int responseType,
                                    int serial, RIL_Errno e, void *response,
                                    size_t responseLen) {
@@ -6533,7 +6545,7 @@
     return 0;
 }
 
-int radio_1_4::setCellInfoListRateResponse(int slotId,
+int radio_1_5::setCellInfoListRateResponse(int slotId,
                                        int responseType,
                                        int serial, RIL_Errno e, void *response,
                                        size_t responseLen) {
@@ -6555,7 +6567,7 @@
     return 0;
 }
 
-int radio_1_4::setInitialAttachApnResponse(int slotId,
+int radio_1_5::setInitialAttachApnResponse(int slotId,
                                        int responseType, int serial, RIL_Errno e,
                                        void *response, size_t responseLen) {
 #if VDBG
@@ -6576,7 +6588,7 @@
     return 0;
 }
 
-int radio_1_4::getImsRegistrationStateResponse(int slotId,
+int radio_1_5::getImsRegistrationStateResponse(int slotId,
                                            int responseType, int serial, RIL_Errno e,
                                            void *response, size_t responseLen) {
 #if VDBG
@@ -6609,7 +6621,7 @@
     return 0;
 }
 
-int radio_1_4::sendImsSmsResponse(int slotId,
+int radio_1_5::sendImsSmsResponse(int slotId,
                               int responseType, int serial, RIL_Errno e, void *response,
                               size_t responseLen) {
 #if VDBG
@@ -6631,7 +6643,7 @@
     return 0;
 }
 
-int radio_1_4::iccTransmitApduBasicChannelResponse(int slotId,
+int radio_1_5::iccTransmitApduBasicChannelResponse(int slotId,
                                                int responseType, int serial, RIL_Errno e,
                                                void *response, size_t responseLen) {
 #if VDBG
@@ -6655,7 +6667,7 @@
     return 0;
 }
 
-int radio_1_4::iccOpenLogicalChannelResponse(int slotId,
+int radio_1_5::iccOpenLogicalChannelResponse(int slotId,
                                          int responseType, int serial, RIL_Errno e, void *response,
                                          size_t responseLen) {
 #if VDBG
@@ -6693,7 +6705,7 @@
     return 0;
 }
 
-int radio_1_4::iccCloseLogicalChannelResponse(int slotId,
+int radio_1_5::iccCloseLogicalChannelResponse(int slotId,
                                           int responseType, int serial, RIL_Errno e,
                                           void *response, size_t responseLen) {
 #if VDBG
@@ -6715,7 +6727,7 @@
     return 0;
 }
 
-int radio_1_4::iccTransmitApduLogicalChannelResponse(int slotId,
+int radio_1_5::iccTransmitApduLogicalChannelResponse(int slotId,
                                                  int responseType, int serial, RIL_Errno e,
                                                  void *response, size_t responseLen) {
 #if VDBG
@@ -6739,7 +6751,7 @@
     return 0;
 }
 
-int radio_1_4::nvReadItemResponse(int slotId,
+int radio_1_5::nvReadItemResponse(int slotId,
                               int responseType, int serial, RIL_Errno e,
                               void *response, size_t responseLen) {
 #if VDBG
@@ -6760,7 +6772,7 @@
     return 0;
 }
 
-int radio_1_4::nvWriteItemResponse(int slotId,
+int radio_1_5::nvWriteItemResponse(int slotId,
                                int responseType, int serial, RIL_Errno e,
                                void *response, size_t responseLen) {
 #if VDBG
@@ -6780,7 +6792,7 @@
     return 0;
 }
 
-int radio_1_4::nvWriteCdmaPrlResponse(int slotId,
+int radio_1_5::nvWriteCdmaPrlResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
 #if VDBG
@@ -6800,7 +6812,7 @@
     return 0;
 }
 
-int radio_1_4::nvResetConfigResponse(int slotId,
+int radio_1_5::nvResetConfigResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
                                  void *response, size_t responseLen) {
 #if VDBG
@@ -6820,7 +6832,7 @@
     return 0;
 }
 
-int radio_1_4::setUiccSubscriptionResponse(int slotId,
+int radio_1_5::setUiccSubscriptionResponse(int slotId,
                                        int responseType, int serial, RIL_Errno e,
                                        void *response, size_t responseLen) {
 #if VDBG
@@ -6841,7 +6853,7 @@
     return 0;
 }
 
-int radio_1_4::setDataAllowedResponse(int slotId,
+int radio_1_5::setDataAllowedResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
 #if VDBG
@@ -6861,7 +6873,7 @@
     return 0;
 }
 
-int radio_1_4::getHardwareConfigResponse(int slotId,
+int radio_1_5::getHardwareConfigResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -6891,7 +6903,7 @@
     return 0;
 }
 
-int radio_1_4::requestIccSimAuthenticationResponse(int slotId,
+int radio_1_5::requestIccSimAuthenticationResponse(int slotId,
                                                int responseType, int serial, RIL_Errno e,
                                                void *response, size_t responseLen) {
 #if VDBG
@@ -6915,7 +6927,7 @@
     return 0;
 }
 
-int radio_1_4::setDataProfileResponse(int slotId,
+int radio_1_5::setDataProfileResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
 #if VDBG
@@ -6935,7 +6947,7 @@
     return 0;
 }
 
-int radio_1_4::requestShutdownResponse(int slotId,
+int radio_1_5::requestShutdownResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
 #if VDBG
@@ -6968,7 +6980,7 @@
     }
 }
 
-int radio_1_4::getRadioCapabilityResponse(int slotId,
+int radio_1_5::getRadioCapabilityResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -6990,7 +7002,7 @@
     return 0;
 }
 
-int radio_1_4::setRadioCapabilityResponse(int slotId,
+int radio_1_5::setRadioCapabilityResponse(int slotId,
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responseLen) {
 #if VDBG
@@ -7028,7 +7040,7 @@
     return result;
 }
 
-int radio_1_4::startLceServiceResponse(int slotId,
+int radio_1_5::startLceServiceResponse(int slotId,
                                    int responseType, int serial, RIL_Errno e,
                                    void *response, size_t responseLen) {
 #if VDBG
@@ -7051,7 +7063,7 @@
     return 0;
 }
 
-int radio_1_4::stopLceServiceResponse(int slotId,
+int radio_1_5::stopLceServiceResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
 #if VDBG
@@ -7074,7 +7086,7 @@
     return 0;
 }
 
-int radio_1_4::pullLceDataResponse(int slotId,
+int radio_1_5::pullLceDataResponse(int slotId,
                                int responseType, int serial, RIL_Errno e,
                                void *response, size_t responseLen) {
 #if VDBG
@@ -7103,7 +7115,7 @@
     return 0;
 }
 
-int radio_1_4::getModemActivityInfoResponse(int slotId,
+int radio_1_5::getModemActivityInfoResponse(int slotId,
                                         int responseType, int serial, RIL_Errno e,
                                         void *response, size_t responseLen) {
 #if VDBG
@@ -7139,7 +7151,7 @@
     return 0;
 }
 
-int radio_1_4::setAllowedCarriersResponse(int slotId,
+int radio_1_5::setAllowedCarriersResponse(int slotId,
                                       int responseType, int serial, RIL_Errno e,
                                       void *response, size_t responseLen) {
 #if VDBG
@@ -7161,7 +7173,7 @@
     return 0;
 }
 
-int radio_1_4::setAllowedCarriersResponse4(int slotId, int responseType, int serial, RIL_Errno e,
+int radio_1_5::setAllowedCarriersResponse4(int slotId, int responseType, int serial, RIL_Errno e,
                                     void *response, size_t responseLen) {
 #if VDBG
     RLOGD("setAllowedCarriersResponse4: serial %d", serial);
@@ -7208,7 +7220,7 @@
     }
 }
 
-int radio_1_4::getAllowedCarriersResponse(int slotId,
+int radio_1_5::getAllowedCarriersResponse(int slotId,
                                       int responseType, int serial, RIL_Errno e,
                                       void *response, size_t responseLen) {
 #if VDBG
@@ -7248,7 +7260,7 @@
     return 0;
 }
 
-int radio_1_4::getAllowedCarriersResponse4(int slotId,
+int radio_1_5::getAllowedCarriersResponse4(int slotId,
                                       int responseType, int serial, RIL_Errno e,
                                       void *response, size_t responseLen) {
 #if VDBG
@@ -7302,7 +7314,7 @@
     return 0;
 }
 
-int radio_1_4::sendDeviceStateResponse(int slotId,
+int radio_1_5::sendDeviceStateResponse(int slotId,
                               int responseType, int serial, RIL_Errno e,
                               void *response, size_t responselen) {
 #if VDBG
@@ -7322,7 +7334,7 @@
     return 0;
 }
 
-int radio_1_4::setCarrierInfoForImsiEncryptionResponse(int slotId,
+int radio_1_5::setCarrierInfoForImsiEncryptionResponse(int slotId,
                                int responseType, int serial, RIL_Errno e,
                                void *response, size_t responseLen) {
     RLOGD("setCarrierInfoForImsiEncryptionResponse: serial %d", serial);
@@ -7339,7 +7351,7 @@
     return 0;
 }
 
-int radio_1_4::setIndicationFilterResponse(int slotId,
+int radio_1_5::setIndicationFilterResponse(int slotId,
                               int responseType, int serial, RIL_Errno e,
                               void *response, size_t responselen) {
 #if VDBG
@@ -7360,7 +7372,7 @@
     return 0;
 }
 
-int radio_1_4::setSimCardPowerResponse(int slotId,
+int radio_1_5::setSimCardPowerResponse(int slotId,
                                    int responseType, int serial, RIL_Errno e,
                                    void *response, size_t responseLen) {
 #if VDBG
@@ -7389,7 +7401,7 @@
     return 0;
 }
 
-int radio_1_4::startNetworkScanResponse(int slotId, int responseType, int serial, RIL_Errno e,
+int radio_1_5::startNetworkScanResponse(int slotId, int responseType, int serial, RIL_Errno e,
                                     void *response, size_t responseLen) {
 #if VDBG
     RLOGD("startNetworkScanResponse: serial %d", serial);
@@ -7408,7 +7420,7 @@
     return 0;
 }
 
-int radio_1_4::startNetworkScanResponse4(int slotId, int responseType, int serial, RIL_Errno e,
+int radio_1_5::startNetworkScanResponse4(int slotId, int responseType, int serial, RIL_Errno e,
                                     void *response, size_t responseLen) {
 #if VDBG
     RLOGD("startNetworkScanResponse4: serial %d", serial);
@@ -7426,7 +7438,7 @@
     return 0;
 }
 
-int radio_1_4::stopNetworkScanResponse(int slotId, int responseType, int serial, RIL_Errno e,
+int radio_1_5::stopNetworkScanResponse(int slotId, int responseType, int serial, RIL_Errno e,
                                    void *response, size_t responseLen) {
 #if VDBG
     RLOGD("stopNetworkScanResponse: serial %d", serial);
@@ -7445,7 +7457,7 @@
     return 0;
 }
 
-int radio_1_4::emergencyDialResponse(int slotId, int responseType, int serial, RIL_Errno e,
+int radio_1_5::emergencyDialResponse(int slotId, int responseType, int serial, RIL_Errno e,
                                     void *response, size_t responseLen) {
 #if VDBG
     RLOGD("emergencyDialResponse: serial %d", serial);
@@ -7469,7 +7481,7 @@
     halStatus.code = static_cast<V1_1::KeepaliveStatusCode>(rilStatus->code);
 }
 
-int radio_1_4::startKeepaliveResponse(int slotId, int responseType, int serial, RIL_Errno e,
+int radio_1_5::startKeepaliveResponse(int slotId, int responseType, int serial, RIL_Errno e,
                                     void *response, size_t responseLen) {
 #if VDBG
     RLOGD("%s(): %d", __FUNCTION__, serial);
@@ -7497,7 +7509,7 @@
     return 0;
 }
 
-int radio_1_4::stopKeepaliveResponse(int slotId, int responseType, int serial, RIL_Errno e,
+int radio_1_5::stopKeepaliveResponse(int slotId, int responseType, int serial, RIL_Errno e,
                                     void *response, size_t responseLen) {
 #if VDBG
     RLOGD("%s(): %d", __FUNCTION__, serial);
@@ -7517,7 +7529,7 @@
     return 0;
 }
 
-int radio_1_4::getModemStackStatusResponse(int slotId, int responseType, int serial, RIL_Errno e,
+int radio_1_5::getModemStackStatusResponse(int slotId, int responseType, int serial, RIL_Errno e,
                                     void *response, size_t responseLen) {
 #if VDBG
     RLOGD("%s(): %d", __FUNCTION__, serial);
@@ -7538,7 +7550,7 @@
     return 0;
 }
 
-int radio_1_4::enableModemResponse(int slotId, int responseType, int serial, RIL_Errno e,
+int radio_1_5::enableModemResponse(int slotId, int responseType, int serial, RIL_Errno e,
                                     void *response, size_t responseLen) {
 #if VDBG
     RLOGD("%s(): %d", __FUNCTION__, serial);
@@ -7558,7 +7570,7 @@
     return 0;
 }
 
-int radio_1_4::sendRequestRawResponse(int slotId,
+int radio_1_5::sendRequestRawResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
 #if VDBG
@@ -7589,7 +7601,7 @@
     return 0;
 }
 
-int radio_1_4::sendRequestStringsResponse(int slotId,
+int radio_1_5::sendRequestStringsResponse(int slotId,
                                       int responseType, int serial, RIL_Errno e,
                                       void *response, size_t responseLen) {
 #if VDBG
@@ -7626,7 +7638,7 @@
     return 0;
 }
 
-int radio_1_4::setSystemSelectionChannelsResponse(int slotId, int responseType, int serial,
+int radio_1_5::setSystemSelectionChannelsResponse(int slotId, int responseType, int serial,
                                         RIL_Errno e, void* /* response */, size_t responseLen) {
 #if VDBG
     RLOGD("%s(): %d", __FUNCTION__, serial);
@@ -7658,7 +7670,7 @@
             (RadioIndicationType::UNSOLICITED_ACK_EXP);
 }
 
-int radio_1_4::radioStateChangedInd(int slotId,
+int radio_1_5::radioStateChangedInd(int slotId,
                                  int indicationType, int token, RIL_Errno e, void *response,
                                  size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -7675,7 +7687,7 @@
     return 0;
 }
 
-int radio_1_4::callStateChangedInd(int slotId,
+int radio_1_5::callStateChangedInd(int slotId,
                                int indicationType, int token, RIL_Errno e, void *response,
                                size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -7692,7 +7704,7 @@
     return 0;
 }
 
-int radio_1_4::networkStateChangedInd(int slotId,
+int radio_1_5::networkStateChangedInd(int slotId,
                                   int indicationType, int token, RIL_Errno e, void *response,
                                   size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -7746,7 +7758,7 @@
     return bytes;
 }
 
-int radio_1_4::newSmsInd(int slotId, int indicationType,
+int radio_1_5::newSmsInd(int slotId, int indicationType,
                      int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
         if (response == NULL || responseLen == 0) {
@@ -7776,7 +7788,7 @@
     return 0;
 }
 
-int radio_1_4::newSmsStatusReportInd(int slotId,
+int radio_1_5::newSmsStatusReportInd(int slotId,
                                  int indicationType, int token, RIL_Errno e, void *response,
                                  size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -7807,7 +7819,7 @@
     return 0;
 }
 
-int radio_1_4::newSmsOnSimInd(int slotId, int indicationType,
+int radio_1_5::newSmsOnSimInd(int slotId, int indicationType,
                           int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
         if (response == NULL || responseLen != sizeof(int)) {
@@ -7828,7 +7840,7 @@
     return 0;
 }
 
-int radio_1_4::onUssdInd(int slotId, int indicationType,
+int radio_1_5::onUssdInd(int slotId, int indicationType,
                      int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
         if (response == NULL || responseLen != 2 * sizeof(char *)) {
@@ -7852,7 +7864,7 @@
     return 0;
 }
 
-int radio_1_4::nitzTimeReceivedInd(int slotId,
+int radio_1_5::nitzTimeReceivedInd(int slotId,
                                int indicationType, int token, RIL_Errno e, void *response,
                                size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -7924,7 +7936,7 @@
     signalStrength.tdScdma.rscp = rilSignalStrength->TD_SCDMA_SignalStrength.rscp;
 }
 
-int radio_1_4::currentSignalStrengthInd(int slotId,
+int radio_1_5::currentSignalStrengthInd(int slotId,
                                     int indicationType, int token, RIL_Errno e,
                                     void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8023,7 +8035,7 @@
     }
 }
 
-int radio_1_4::dataCallListChangedInd(int slotId,
+int radio_1_5::dataCallListChangedInd(int slotId,
                                   int indicationType, int token, RIL_Errno e, void *response,
                                   size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8047,7 +8059,7 @@
     return 0;
 }
 
-int radio_1_4::suppSvcNotifyInd(int slotId, int indicationType,
+int radio_1_5::suppSvcNotifyInd(int slotId, int indicationType,
                             int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
         if (response == NULL || responseLen != sizeof(RIL_SuppSvcNotification)) {
@@ -8077,7 +8089,7 @@
     return 0;
 }
 
-int radio_1_4::stkSessionEndInd(int slotId, int indicationType,
+int radio_1_5::stkSessionEndInd(int slotId, int indicationType,
                             int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
 #if VDBG
@@ -8093,7 +8105,7 @@
     return 0;
 }
 
-int radio_1_4::stkProactiveCommandInd(int slotId,
+int radio_1_5::stkProactiveCommandInd(int slotId,
                                   int indicationType, int token, RIL_Errno e, void *response,
                                   size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8115,7 +8127,7 @@
     return 0;
 }
 
-int radio_1_4::stkEventNotifyInd(int slotId, int indicationType,
+int radio_1_5::stkEventNotifyInd(int slotId, int indicationType,
                              int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
         if (response == NULL || responseLen == 0) {
@@ -8136,7 +8148,7 @@
     return 0;
 }
 
-int radio_1_4::stkCallSetupInd(int slotId, int indicationType,
+int radio_1_5::stkCallSetupInd(int slotId, int indicationType,
                            int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
         if (response == NULL || responseLen != sizeof(int)) {
@@ -8157,7 +8169,7 @@
     return 0;
 }
 
-int radio_1_4::simSmsStorageFullInd(int slotId,
+int radio_1_5::simSmsStorageFullInd(int slotId,
                                 int indicationType, int token, RIL_Errno e, void *response,
                                 size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8174,7 +8186,7 @@
     return 0;
 }
 
-int radio_1_4::simRefreshInd(int slotId, int indicationType,
+int radio_1_5::simRefreshInd(int slotId, int indicationType,
                          int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
         if (response == NULL || responseLen != sizeof(RIL_SimRefreshResponse_v7)) {
@@ -8210,7 +8222,7 @@
     record.signal = signalInfoRecord->signal;
 }
 
-int radio_1_4::callRingInd(int slotId, int indicationType,
+int radio_1_5::callRingInd(int slotId, int indicationType,
                        int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
         bool isGsm;
@@ -8239,7 +8251,7 @@
     return 0;
 }
 
-int radio_1_4::simStatusChangedInd(int slotId,
+int radio_1_5::simStatusChangedInd(int slotId,
                                int indicationType, int token, RIL_Errno e, void *response,
                                size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8256,7 +8268,7 @@
     return 0;
 }
 
-int radio_1_4::cdmaNewSmsInd(int slotId, int indicationType,
+int radio_1_5::cdmaNewSmsInd(int slotId, int indicationType,
                          int token, RIL_Errno e, void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
         if (response == NULL || responseLen != sizeof(RIL_CDMA_SMS_Message)) {
@@ -8304,7 +8316,7 @@
     return 0;
 }
 
-int radio_1_4::newBroadcastSmsInd(int slotId,
+int radio_1_5::newBroadcastSmsInd(int slotId,
                               int indicationType, int token, RIL_Errno e, void *response,
                               size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8328,7 +8340,7 @@
     return 0;
 }
 
-int radio_1_4::cdmaRuimSmsStorageFullInd(int slotId,
+int radio_1_5::cdmaRuimSmsStorageFullInd(int slotId,
                                      int indicationType, int token, RIL_Errno e, void *response,
                                      size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8346,7 +8358,7 @@
     return 0;
 }
 
-int radio_1_4::restrictedStateChangedInd(int slotId,
+int radio_1_5::restrictedStateChangedInd(int slotId,
                                      int indicationType, int token, RIL_Errno e, void *response,
                                      size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8369,7 +8381,7 @@
     return 0;
 }
 
-int radio_1_4::enterEmergencyCallbackModeInd(int slotId,
+int radio_1_5::enterEmergencyCallbackModeInd(int slotId,
                                          int indicationType, int token, RIL_Errno e, void *response,
                                          size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8387,7 +8399,7 @@
     return 0;
 }
 
-int radio_1_4::cdmaCallWaitingInd(int slotId,
+int radio_1_5::cdmaCallWaitingInd(int slotId,
                               int indicationType, int token, RIL_Errno e, void *response,
                               size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8420,7 +8432,7 @@
     return 0;
 }
 
-int radio_1_4::cdmaOtaProvisionStatusInd(int slotId,
+int radio_1_5::cdmaOtaProvisionStatusInd(int slotId,
                                      int indicationType, int token, RIL_Errno e, void *response,
                                      size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8443,7 +8455,7 @@
     return 0;
 }
 
-int radio_1_4::cdmaInfoRecInd(int slotId,
+int radio_1_5::cdmaInfoRecInd(int slotId,
                           int indicationType, int token, RIL_Errno e, void *response,
                           size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8621,7 +8633,7 @@
     return 0;
 }
 
-int radio_1_4::indicateRingbackToneInd(int slotId,
+int radio_1_5::indicateRingbackToneInd(int slotId,
                                    int indicationType, int token, RIL_Errno e, void *response,
                                    size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8643,7 +8655,7 @@
     return 0;
 }
 
-int radio_1_4::resendIncallMuteInd(int slotId,
+int radio_1_5::resendIncallMuteInd(int slotId,
                                int indicationType, int token, RIL_Errno e, void *response,
                                size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8660,7 +8672,7 @@
     return 0;
 }
 
-int radio_1_4::cdmaSubscriptionSourceChangedInd(int slotId,
+int radio_1_5::cdmaSubscriptionSourceChangedInd(int slotId,
                                             int indicationType, int token, RIL_Errno e,
                                             void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8684,7 +8696,7 @@
     return 0;
 }
 
-int radio_1_4::cdmaPrlChangedInd(int slotId,
+int radio_1_5::cdmaPrlChangedInd(int slotId,
                              int indicationType, int token, RIL_Errno e, void *response,
                              size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8706,7 +8718,7 @@
     return 0;
 }
 
-int radio_1_4::exitEmergencyCallbackModeInd(int slotId,
+int radio_1_5::exitEmergencyCallbackModeInd(int slotId,
                                         int indicationType, int token, RIL_Errno e, void *response,
                                         size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8724,7 +8736,7 @@
     return 0;
 }
 
-int radio_1_4::rilConnectedInd(int slotId,
+int radio_1_5::rilConnectedInd(int slotId,
                            int indicationType, int token, RIL_Errno e, void *response,
                            size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8739,7 +8751,7 @@
     return 0;
 }
 
-int radio_1_4::voiceRadioTechChangedInd(int slotId,
+int radio_1_5::voiceRadioTechChangedInd(int slotId,
                                     int indicationType, int token, RIL_Errno e, void *response,
                                     size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8908,7 +8920,7 @@
     }
 }
 
-int radio_1_4::cellInfoListInd(int slotId,
+int radio_1_5::cellInfoListInd(int slotId,
                            int indicationType, int token, RIL_Errno e, void *response,
                            size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8933,7 +8945,7 @@
     return 0;
 }
 
-int radio_1_4::imsNetworkStateChangedInd(int slotId,
+int radio_1_5::imsNetworkStateChangedInd(int slotId,
                                      int indicationType, int token, RIL_Errno e, void *response,
                                      size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8951,7 +8963,7 @@
     return 0;
 }
 
-int radio_1_4::subscriptionStatusChangedInd(int slotId,
+int radio_1_5::subscriptionStatusChangedInd(int slotId,
                                         int indicationType, int token, RIL_Errno e, void *response,
                                         size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -8974,7 +8986,7 @@
     return 0;
 }
 
-int radio_1_4::srvccStateNotifyInd(int slotId,
+int radio_1_5::srvccStateNotifyInd(int slotId,
                                int indicationType, int token, RIL_Errno e, void *response,
                                size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -9029,7 +9041,7 @@
     }
 }
 
-int radio_1_4::hardwareConfigChangedInd(int slotId,
+int radio_1_5::hardwareConfigChangedInd(int slotId,
                                     int indicationType, int token, RIL_Errno e, void *response,
                                     size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -9065,7 +9077,7 @@
     rc.status = (V1_0::RadioCapabilityStatus) rilRadioCapability->status;
 }
 
-int radio_1_4::radioCapabilityIndicationInd(int slotId,
+int radio_1_5::radioCapabilityIndicationInd(int slotId,
                                         int indicationType, int token, RIL_Errno e, void *response,
                                         size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -9104,7 +9116,7 @@
     return false;
 }
 
-int radio_1_4::onSupplementaryServiceIndicationInd(int slotId,
+int radio_1_5::onSupplementaryServiceIndicationInd(int slotId,
                                                int indicationType, int token, RIL_Errno e,
                                                void *response, size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -9184,7 +9196,7 @@
     return 0;
 }
 
-int radio_1_4::stkCallControlAlphaNotifyInd(int slotId,
+int radio_1_5::stkCallControlAlphaNotifyInd(int slotId,
                                         int indicationType, int token, RIL_Errno e, void *response,
                                         size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -9214,7 +9226,7 @@
     lce.lceSuspended = rilLceDataInfo->lce_suspended;
 }
 
-int radio_1_4::lceDataInd(int slotId,
+int radio_1_5::lceDataInd(int slotId,
                       int indicationType, int token, RIL_Errno e, void *response,
                       size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -9238,7 +9250,7 @@
     return 0;
 }
 
-int radio_1_4::pcoDataInd(int slotId,
+int radio_1_5::pcoDataInd(int slotId,
                       int indicationType, int token, RIL_Errno e, void *response,
                       size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -9267,7 +9279,7 @@
     return 0;
 }
 
-int radio_1_4::modemResetInd(int slotId,
+int radio_1_5::modemResetInd(int slotId,
                          int indicationType, int token, RIL_Errno e, void *response,
                          size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndication != NULL) {
@@ -9289,7 +9301,7 @@
     return 0;
 }
 
-int radio_1_4::networkScanResultInd(int slotId,
+int radio_1_5::networkScanResultInd(int slotId,
                                 int indicationType, int token, RIL_Errno e, void *response,
                                 size_t responseLen) {
 #if VDBG
@@ -9325,7 +9337,7 @@
     return 0;
 }
 
-int radio_1_4::carrierInfoForImsiEncryption(int slotId,
+int radio_1_5::carrierInfoForImsiEncryption(int slotId,
                                   int indicationType, int token, RIL_Errno e, void *response,
                                   size_t responseLen) {
     if (radioService[slotId] != NULL && radioService[slotId]->mRadioIndicationV1_4 != NULL) {
@@ -9345,7 +9357,7 @@
     return 0;
 }
 
-int radio_1_4::keepaliveStatusInd(int slotId,
+int radio_1_5::keepaliveStatusInd(int slotId,
                          int indicationType, int token, RIL_Errno e, void *response,
                          size_t responseLen) {
 #if VDBG
@@ -9378,7 +9390,7 @@
     return 0;
 }
 
-int radio_1_4::oemHookRawInd(int slotId,
+int radio_1_5::oemHookRawInd(int slotId,
                          int indicationType, int token, RIL_Errno e, void *response,
                          size_t responseLen) {
     if (!kOemHookEnabled) return 0;
@@ -9404,7 +9416,7 @@
     return 0;
 }
 
-void radio_1_4::registerService(RIL_RadioFunctions *callbacks, CommandInfo *commands) {
+void radio_1_5::registerService(RIL_RadioFunctions *callbacks, CommandInfo *commands) {
     using namespace android::hardware;
     int simCount = 1;
     const char *serviceNames[] = {
@@ -9435,11 +9447,12 @@
 
         RLOGD("sim i = %d registering ...", i);
 
-        radioService[i] = new RadioImpl_1_4;
+        radioService[i] = new RadioImpl_1_5;
         radioService[i]->mSlotId = i;
         RLOGD("registerService: starting android::hardware::radio::V1_4::IRadio %s for slot %d",
                 serviceNames[i], i);
         android::status_t status = radioService[i]->registerAsService(serviceNames[i]);
+        assert(status == android::OK);
 
         RLOGD("registerService: OemHook is enabled = %s", kOemHookEnabled ? "true" : "false");
         if (kOemHookEnabled) {
@@ -9457,7 +9470,7 @@
     joinRpcThreadpool();
 }
 
-pthread_rwlock_t * radio_1_4::getRadioServiceRwlock(int slotId) {
+pthread_rwlock_t * radio_1_5::getRadioServiceRwlock(int slotId) {
     pthread_rwlock_t *radioServiceRwlockPtr = &radioServiceRwlock;
 
     #if (SIM_COUNT >= 2)
@@ -9474,6 +9487,6 @@
 }
 
 // should acquire write lock for the corresponding service before calling this
-void radio_1_4::setNitzTimeReceived(int slotId, long timeReceived) {
+void radio_1_5::setNitzTimeReceived(int slotId, long timeReceived) {
     nitzTimeReceived[slotId] = timeReceived;
 }
diff --git a/guest/hals/ril/libril/ril_service.h b/guest/hals/ril/libril/ril_service.h
index fc19bcd..be01d6d 100644
--- a/guest/hals/ril/libril/ril_service.h
+++ b/guest/hals/ril/libril/ril_service.h
@@ -20,7 +20,7 @@
 #include <guest/hals/ril/libril/ril.h>
 #include <ril_internal.h>
 
-namespace radio_1_4 {
+namespace radio_1_5 {
 void registerService(RIL_RadioFunctions *callbacks, android::CommandInfo *commands);
 
 int getIccCardStatusResponse(int slotId, int responseType,
diff --git a/guest/hals/ril/libril/ril_unsol_commands.h b/guest/hals/ril/libril/ril_unsol_commands.h
index 072a0fa..89c1f55 100644
--- a/guest/hals/ril/libril/ril_unsol_commands.h
+++ b/guest/hals/ril/libril/ril_unsol_commands.h
@@ -14,53 +14,53 @@
 ** See the License for the specific language governing permissions and
 ** limitations under the License.
 */
-    {RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, radio_1_4::radioStateChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED, radio_1_4::callStateChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED, radio_1_4::networkStateChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESPONSE_NEW_SMS, radio_1_4::newSmsInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT, radio_1_4::newSmsStatusReportInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM, radio_1_4::newSmsOnSimInd, WAKE_PARTIAL},
-    {RIL_UNSOL_ON_USSD, radio_1_4::onUssdInd, WAKE_PARTIAL},
-    {RIL_UNSOL_ON_USSD_REQUEST, radio_1_4::onUssdInd, DONT_WAKE},
-    {RIL_UNSOL_NITZ_TIME_RECEIVED, radio_1_4::nitzTimeReceivedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_SIGNAL_STRENGTH, radio_1_4::currentSignalStrengthInd, DONT_WAKE},
-    {RIL_UNSOL_DATA_CALL_LIST_CHANGED, radio_1_4::dataCallListChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_SUPP_SVC_NOTIFICATION, radio_1_4::suppSvcNotifyInd, WAKE_PARTIAL},
-    {RIL_UNSOL_STK_SESSION_END, radio_1_4::stkSessionEndInd, WAKE_PARTIAL},
-    {RIL_UNSOL_STK_PROACTIVE_COMMAND, radio_1_4::stkProactiveCommandInd, WAKE_PARTIAL},
-    {RIL_UNSOL_STK_EVENT_NOTIFY, radio_1_4::stkEventNotifyInd, WAKE_PARTIAL},
-    {RIL_UNSOL_STK_CALL_SETUP, radio_1_4::stkCallSetupInd, WAKE_PARTIAL},
-    {RIL_UNSOL_SIM_SMS_STORAGE_FULL, radio_1_4::simSmsStorageFullInd, WAKE_PARTIAL},
-    {RIL_UNSOL_SIM_REFRESH, radio_1_4::simRefreshInd, WAKE_PARTIAL},
-    {RIL_UNSOL_CALL_RING, radio_1_4::callRingInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, radio_1_4::simStatusChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESPONSE_CDMA_NEW_SMS, radio_1_4::cdmaNewSmsInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS, radio_1_4::newBroadcastSmsInd, WAKE_PARTIAL},
-    {RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL, radio_1_4::cdmaRuimSmsStorageFullInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESTRICTED_STATE_CHANGED, radio_1_4::restrictedStateChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE, radio_1_4::enterEmergencyCallbackModeInd, WAKE_PARTIAL},
-    {RIL_UNSOL_CDMA_CALL_WAITING, radio_1_4::cdmaCallWaitingInd, WAKE_PARTIAL},
-    {RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, radio_1_4::cdmaOtaProvisionStatusInd, WAKE_PARTIAL},
-    {RIL_UNSOL_CDMA_INFO_REC, radio_1_4::cdmaInfoRecInd, WAKE_PARTIAL},
-    {RIL_UNSOL_OEM_HOOK_RAW, radio_1_4::oemHookRawInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RINGBACK_TONE, radio_1_4::indicateRingbackToneInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESEND_INCALL_MUTE, radio_1_4::resendIncallMuteInd, WAKE_PARTIAL},
-    {RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, radio_1_4::cdmaSubscriptionSourceChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_CDMA_PRL_CHANGED, radio_1_4::cdmaPrlChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, radio_1_4::exitEmergencyCallbackModeInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RIL_CONNECTED, radio_1_4::rilConnectedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, radio_1_4::voiceRadioTechChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_CELL_INFO_LIST, radio_1_4::cellInfoListInd, WAKE_PARTIAL},
-    {RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED, radio_1_4::imsNetworkStateChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED, radio_1_4::subscriptionStatusChangedInd, WAKE_PARTIAL},
-    {RIL_UNSOL_SRVCC_STATE_NOTIFY, radio_1_4::srvccStateNotifyInd, WAKE_PARTIAL},
-    {RIL_UNSOL_HARDWARE_CONFIG_CHANGED, radio_1_4::hardwareConfigChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, radio_1_5::radioStateChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED, radio_1_5::callStateChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED, radio_1_5::networkStateChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_NEW_SMS, radio_1_5::newSmsInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT, radio_1_5::newSmsStatusReportInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM, radio_1_5::newSmsOnSimInd, WAKE_PARTIAL},
+    {RIL_UNSOL_ON_USSD, radio_1_5::onUssdInd, WAKE_PARTIAL},
+    {RIL_UNSOL_ON_USSD_REQUEST, radio_1_5::onUssdInd, DONT_WAKE},
+    {RIL_UNSOL_NITZ_TIME_RECEIVED, radio_1_5::nitzTimeReceivedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_SIGNAL_STRENGTH, radio_1_5::currentSignalStrengthInd, DONT_WAKE},
+    {RIL_UNSOL_DATA_CALL_LIST_CHANGED, radio_1_5::dataCallListChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_SUPP_SVC_NOTIFICATION, radio_1_5::suppSvcNotifyInd, WAKE_PARTIAL},
+    {RIL_UNSOL_STK_SESSION_END, radio_1_5::stkSessionEndInd, WAKE_PARTIAL},
+    {RIL_UNSOL_STK_PROACTIVE_COMMAND, radio_1_5::stkProactiveCommandInd, WAKE_PARTIAL},
+    {RIL_UNSOL_STK_EVENT_NOTIFY, radio_1_5::stkEventNotifyInd, WAKE_PARTIAL},
+    {RIL_UNSOL_STK_CALL_SETUP, radio_1_5::stkCallSetupInd, WAKE_PARTIAL},
+    {RIL_UNSOL_SIM_SMS_STORAGE_FULL, radio_1_5::simSmsStorageFullInd, WAKE_PARTIAL},
+    {RIL_UNSOL_SIM_REFRESH, radio_1_5::simRefreshInd, WAKE_PARTIAL},
+    {RIL_UNSOL_CALL_RING, radio_1_5::callRingInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, radio_1_5::simStatusChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_CDMA_NEW_SMS, radio_1_5::cdmaNewSmsInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS, radio_1_5::newBroadcastSmsInd, WAKE_PARTIAL},
+    {RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL, radio_1_5::cdmaRuimSmsStorageFullInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESTRICTED_STATE_CHANGED, radio_1_5::restrictedStateChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE, radio_1_5::enterEmergencyCallbackModeInd, WAKE_PARTIAL},
+    {RIL_UNSOL_CDMA_CALL_WAITING, radio_1_5::cdmaCallWaitingInd, WAKE_PARTIAL},
+    {RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, radio_1_5::cdmaOtaProvisionStatusInd, WAKE_PARTIAL},
+    {RIL_UNSOL_CDMA_INFO_REC, radio_1_5::cdmaInfoRecInd, WAKE_PARTIAL},
+    {RIL_UNSOL_OEM_HOOK_RAW, radio_1_5::oemHookRawInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RINGBACK_TONE, radio_1_5::indicateRingbackToneInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESEND_INCALL_MUTE, radio_1_5::resendIncallMuteInd, WAKE_PARTIAL},
+    {RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, radio_1_5::cdmaSubscriptionSourceChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_CDMA_PRL_CHANGED, radio_1_5::cdmaPrlChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, radio_1_5::exitEmergencyCallbackModeInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RIL_CONNECTED, radio_1_5::rilConnectedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, radio_1_5::voiceRadioTechChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_CELL_INFO_LIST, radio_1_5::cellInfoListInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED, radio_1_5::imsNetworkStateChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED, radio_1_5::subscriptionStatusChangedInd, WAKE_PARTIAL},
+    {RIL_UNSOL_SRVCC_STATE_NOTIFY, radio_1_5::srvccStateNotifyInd, WAKE_PARTIAL},
+    {RIL_UNSOL_HARDWARE_CONFIG_CHANGED, radio_1_5::hardwareConfigChangedInd, WAKE_PARTIAL},
     {RIL_UNSOL_DC_RT_INFO_CHANGED, NULL, WAKE_PARTIAL},
-    {RIL_UNSOL_RADIO_CAPABILITY, radio_1_4::radioCapabilityIndicationInd, WAKE_PARTIAL},
-    {RIL_UNSOL_ON_SS, radio_1_4::onSupplementaryServiceIndicationInd, WAKE_PARTIAL},
-    {RIL_UNSOL_STK_CC_ALPHA_NOTIFY, radio_1_4::stkCallControlAlphaNotifyInd, WAKE_PARTIAL},
-    {RIL_UNSOL_LCEDATA_RECV, radio_1_4::lceDataInd, WAKE_PARTIAL},
-    {RIL_UNSOL_PCO_DATA, radio_1_4::pcoDataInd, WAKE_PARTIAL},
-    {RIL_UNSOL_MODEM_RESTART, radio_1_4::modemResetInd, WAKE_PARTIAL},
-    {RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION, radio_1_4::carrierInfoForImsiEncryption, WAKE_PARTIAL},
-    {RIL_UNSOL_NETWORK_SCAN_RESULT, radio_1_4::networkScanResultInd, WAKE_PARTIAL},
+    {RIL_UNSOL_RADIO_CAPABILITY, radio_1_5::radioCapabilityIndicationInd, WAKE_PARTIAL},
+    {RIL_UNSOL_ON_SS, radio_1_5::onSupplementaryServiceIndicationInd, WAKE_PARTIAL},
+    {RIL_UNSOL_STK_CC_ALPHA_NOTIFY, radio_1_5::stkCallControlAlphaNotifyInd, WAKE_PARTIAL},
+    {RIL_UNSOL_LCEDATA_RECV, radio_1_5::lceDataInd, WAKE_PARTIAL},
+    {RIL_UNSOL_PCO_DATA, radio_1_5::pcoDataInd, WAKE_PARTIAL},
+    {RIL_UNSOL_MODEM_RESTART, radio_1_5::modemResetInd, WAKE_PARTIAL},
+    {RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION, radio_1_5::carrierInfoForImsiEncryption, WAKE_PARTIAL},
+    {RIL_UNSOL_NETWORK_SCAN_RESULT, radio_1_5::networkScanResultInd, WAKE_PARTIAL},
diff --git a/guest/hals/rild/rild_cuttlefish.c b/guest/hals/rild/rild_cuttlefish.c
index c2efe44..cfd74fa 100644
--- a/guest/hals/rild/rild_cuttlefish.c
+++ b/guest/hals/rild/rild_cuttlefish.c
@@ -207,6 +207,11 @@
     rilArgv[0] = argv[0];
 
     funcs = rilInit(&s_rilEnv, argc, rilArgv);
+    if (funcs == NULL) {
+        RLOGE("RIL_Init rilInit failed.\n");
+        exit(EXIT_FAILURE);
+    }
+
     RLOGD("RIL_Init rilInit completed");
 
     RLOGD("RIL_Init callback versions = %d", funcs->version);
diff --git a/host/commands/assemble_cvd/Android.bp b/host/commands/assemble_cvd/Android.bp
index 6c88f0c..b03d8bf 100644
--- a/host/commands/assemble_cvd/Android.bp
+++ b/host/commands/assemble_cvd/Android.bp
@@ -35,9 +35,11 @@
         "boot_image_unpacker.cc",
         "data_image.cc",
         "flags.cc",
-        "image_aggregator.cc"
+        "image_aggregator.cc",
+        "super_image_mixer.cc",
     ],
     header_libs: [
+        "bootimg_headers",
         "cuttlefish_glog",
     ],
     shared_libs: [
@@ -50,6 +52,8 @@
         "libbase",
         "libnl",
         "libprotobuf-cpp-full",
+        "libziparchive",
+        "libz",
     ],
     static_libs: [
         "libcuttlefish_host_config",
diff --git a/host/commands/assemble_cvd/assemble_cvd.cc b/host/commands/assemble_cvd/assemble_cvd.cc
index 9efc0dd..6eab814 100644
--- a/host/commands/assemble_cvd/assemble_cvd.cc
+++ b/host/commands/assemble_cvd/assemble_cvd.cc
@@ -17,8 +17,32 @@
 
 #include <glog/logging.h>
 
+#include "common/libs/fs/shared_buf.h"
+#include "common/libs/fs/shared_fd.h"
+#include "common/libs/strings/str_split.h"
 #include "host/commands/assemble_cvd/assembler_defs.h"
 #include "host/commands/assemble_cvd/flags.h"
+#include "host/libs/config/fetcher_config.h"
+
+namespace {
+
+std::string kFetcherConfigFile = "fetcher_config.json";
+
+cvd::FetcherConfig FindFetcherConfig(const std::vector<std::string>& files) {
+  cvd::FetcherConfig fetcher_config;
+  for (const auto& file : files) {
+    auto expected_pos = file.size() - kFetcherConfigFile.size();
+    if (file.rfind(kFetcherConfigFile) == expected_pos) {
+      if (fetcher_config.LoadFromFile(file)) {
+        return fetcher_config;
+      }
+      LOG(ERROR) << "Could not load fetcher config file.";
+    }
+  }
+  return fetcher_config;
+}
+
+} // namespace
 
 int main(int argc, char** argv) {
   ::android::base::InitLogging(argv, android::base::StderrLogger);
@@ -36,7 +60,17 @@
     }
   }
 
-  auto config = InitFilesystemAndCreateConfig(&argc, &argv);
+  std::string input_files_str;
+  {
+    auto input_fd = cvd::SharedFD::Dup(0);
+    auto bytes_read = cvd::ReadAll(input_fd, &input_files_str);
+    if (bytes_read < 0) {
+      LOG(FATAL) << "Failed to read input files. Error was \"" << input_fd->StrError() << "\"";
+    }
+  }
+  std::vector<std::string> input_files = cvd::StrSplit(input_files_str, '\n');
+
+  auto config = InitFilesystemAndCreateConfig(&argc, &argv, FindFetcherConfig(input_files));
 
   std::cout << GetConfigFilePath(*config) << "\n";
   std::cout << std::flush;
diff --git a/host/commands/assemble_cvd/boot_image_unpacker.cc b/host/commands/assemble_cvd/boot_image_unpacker.cc
index 460cc1e..f1ead30 100644
--- a/host/commands/assemble_cvd/boot_image_unpacker.cc
+++ b/host/commands/assemble_cvd/boot_image_unpacker.cc
@@ -21,10 +21,10 @@
 
 #include <sstream>
 
+#include <bootimg.h>
 #include <glog/logging.h>
 
 #include "common/libs/utils/subprocess.h"
-#include "host/commands/assemble_cvd/bootimg.h"
 
 namespace cvd {
 
@@ -48,39 +48,58 @@
 }
 }  // namespace
 
-std::unique_ptr<BootImageUnpacker> BootImageUnpacker::FromImage(
-    const std::string& path) {
-  auto boot_img = SharedFD::Open(path.c_str(), O_RDONLY);
+std::unique_ptr<BootImageUnpacker> BootImageUnpacker::FromImages(
+    const std::string& boot_image_path,
+    const std::string& vendor_boot_image_path) {
+  auto boot_img = SharedFD::Open(boot_image_path.c_str(), O_RDONLY);
   if (!boot_img->IsOpen()) {
-    LOG(ERROR) << "Unable to open boot image (" << path
+    LOG(ERROR) << "Unable to open boot image (" << boot_image_path
                << "): " << boot_img->StrError();
     return nullptr;
   }
-  boot_img_hdr header;
+  boot_img_hdr_v3 header;
   auto bytes_read = boot_img->Read(&header, sizeof(header));
   if (bytes_read != sizeof(header)) {
     LOG(ERROR) << "Error reading boot image header";
     return nullptr;
   }
 
-  std::ostringstream cmdline;
-  cmdline << reinterpret_cast<char*>(&header.cmdline[0]);
-  if (header.extra_cmdline[0] != '\0') {
-    cmdline << " ";
-    cmdline << reinterpret_cast<char*>(&header.extra_cmdline[0]);
+  auto vendor_boot_img = SharedFD::Open(vendor_boot_image_path.c_str(),
+                                        O_RDONLY);
+  if (!vendor_boot_img->IsOpen()) {
+    LOG(ERROR) << "Unable to open vendor boot image (" << vendor_boot_image_path
+               << "): " << vendor_boot_img->StrError();
+    return nullptr;
+  }
+  vendor_boot_img_hdr_v3 vboot_header;
+  bytes_read = vendor_boot_img->Read(&vboot_header, sizeof(vboot_header));
+  if (bytes_read != sizeof(vboot_header)) {
+    LOG(ERROR) << "Error reading vendor boot image header";
+    return nullptr;
   }
 
-  uint32_t page_size = header.page_size;
-  // See system/core/mkbootimg/include/mkbootimg/bootimg.h for the origin of
+  std::ostringstream cmdline;
+  cmdline << reinterpret_cast<char*>(&header.cmdline[0]);
+  if (vboot_header.cmdline[0] != '\0') {
+    cmdline << " ";
+    cmdline << reinterpret_cast<char*>(&vboot_header.cmdline[0]);
+  }
+
+  uint32_t page_size = 4096;
+  // See system/tools/mkbootimg/include/bootimg/bootimg.h for the origin of
   // these offset calculations
   uint32_t kernel_offset = page_size;
   uint32_t ramdisk_offset =
       kernel_offset +
       ((header.kernel_size + page_size - 1) / page_size) * page_size;
+  uint32_t vendor_ramdisk_offset =
+      ((vboot_header.header_size + vboot_header.page_size - 1) / vboot_header.page_size) *
+      vboot_header.page_size;
 
   std::unique_ptr<BootImageUnpacker> ret(new BootImageUnpacker(
       boot_img, cmdline.str(), header.kernel_size, kernel_offset,
-      header.ramdisk_size, ramdisk_offset));
+      header.ramdisk_size, ramdisk_offset, vendor_boot_img,
+      vboot_header.vendor_ramdisk_size, vendor_ramdisk_offset));
 
   return ret;
 }
@@ -99,8 +118,14 @@
   return ExtractFile(boot_image_, ramdisk_image_offset_, ramdisk_image_size_,
                      path);
 }
+bool BootImageUnpacker::ExtractVendorRamdiskImage(const std::string& path) const {
+  if (vendor_ramdisk_image_size_ == 0) return false;
+  return ExtractFile(vendor_boot_image_, vendor_ramdisk_image_offset_,
+                     vendor_ramdisk_image_size_, path);
+}
 
 bool BootImageUnpacker::Unpack(const std::string& ramdisk_image_path,
+                               const std::string& vendor_ramdisk_image_path,
                                const std::string& kernel_image_path) {
   if (HasRamdiskImage()) {
     if (!ExtractRamdiskImage(ramdisk_image_path)) {
@@ -108,6 +133,12 @@
       return false;
     }
   }
+  if (HasVendorRamdiskImage()) {
+    if (!ExtractVendorRamdiskImage(vendor_ramdisk_image_path)) {
+      LOG(ERROR) << "Error extracting vendor ramdisk from venodr boot image";
+      return false;
+    }
+  }
   if (!kernel_image_path.empty()) {
     if (HasKernelImage()) {
       if (!ExtractKernelImage(kernel_image_path)) {
diff --git a/host/commands/assemble_cvd/boot_image_unpacker.h b/host/commands/assemble_cvd/boot_image_unpacker.h
index 05fe671..a331f0c 100644
--- a/host/commands/assemble_cvd/boot_image_unpacker.h
+++ b/host/commands/assemble_cvd/boot_image_unpacker.h
@@ -29,7 +29,9 @@
  public:
   // Reads header section of boot image at path and returns a BootImageUnpacker
   // preloaded with all the metadata.
-  static std::unique_ptr<BootImageUnpacker> FromImage(const std::string& path);
+  static std::unique_ptr<BootImageUnpacker> FromImages(
+    const std::string& boot_image_path,
+    const std::string& vendor_boot_image_path);
 
   ~BootImageUnpacker() = default;
 
@@ -37,30 +39,32 @@
 
   bool HasKernelImage() const { return kernel_image_size_ > 0; }
   bool HasRamdiskImage() const { return ramdisk_image_size_ > 0; }
-
-  // Extracts the kernel image to the given path
-  bool ExtractKernelImage(const std::string& path) const;
-  // Extracts the ramdisk image to the given path. It may return false if the
-  // boot image does not contain a ramdisk, which is the case when having system
-  // as root.
-  bool ExtractRamdiskImage(const std::string& path) const;
+  bool HasVendorRamdiskImage() const { return vendor_ramdisk_image_size_ > 0; }
 
   bool Unpack(const std::string& ramdisk_image_path,
+              const std::string& vendor_ramdisk_image_path,
               const std::string& kernel_image_path);
 
  private:
   BootImageUnpacker(SharedFD boot_image, const std::string& cmdline,
                     uint32_t kernel_image_size, uint32_t kernel_image_offset,
-                    uint32_t ramdisk_image_size, uint32_t ramdisk_image_offset)
+                    uint32_t ramdisk_image_size, uint32_t ramdisk_image_offset,
+                    SharedFD vendor_boot_image,
+                    uint32_t vendor_ramdisk_image_size,
+                    uint32_t vendor_ramdisk_image_offset)
       : boot_image_(boot_image),
+        vendor_boot_image_(vendor_boot_image),
         kernel_cmdline_(cmdline),
         kernel_image_size_(kernel_image_size),
         kernel_image_offset_(kernel_image_offset),
         ramdisk_image_size_(ramdisk_image_size),
-        ramdisk_image_offset_(ramdisk_image_offset) {}
+        ramdisk_image_offset_(ramdisk_image_offset),
+        vendor_ramdisk_image_size_(vendor_ramdisk_image_size),
+        vendor_ramdisk_image_offset_(vendor_ramdisk_image_offset) {}
 
   // Mutable because we only read from the fd, but do not modify its contents
   mutable SharedFD boot_image_;
+  mutable SharedFD vendor_boot_image_;
   std::string kernel_cmdline_;
   // When buidling the boot image a particular page size is assumed, which may
   // not match the actual page size of the system.
@@ -68,6 +72,17 @@
   uint32_t kernel_image_offset_;
   uint32_t ramdisk_image_size_;
   uint32_t ramdisk_image_offset_;
+  uint32_t vendor_ramdisk_image_size_;
+  uint32_t vendor_ramdisk_image_offset_;
+
+  // Extracts the kernel image to the given path
+  bool ExtractKernelImage(const std::string& path) const;
+  // Extracts the ramdisk image to the given path. It may return false if the
+  // boot image does not contain a ramdisk, which is the case when having system
+  // as root.
+  bool ExtractRamdiskImage(const std::string& path) const;
+  // Extracts the vendor ramdisk image to the given path
+  bool ExtractVendorRamdiskImage(const std::string& path) const;
 };
 
 }  // namespace cvd
diff --git a/host/commands/assemble_cvd/bootimg.h b/host/commands/assemble_cvd/bootimg.h
deleted file mode 100644
index 7b8fb28..0000000
--- a/host/commands/assemble_cvd/bootimg.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/* tools/mkbootimg/bootimg.h
-**
-** Copyright 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.
-*/
-
-// This file is a clone of the one found on system/core/mkbootimg. We've made a
-// clone because the location of the original header has changed over time.
-
-#include <stdint.h>
-
-#ifndef CUTTLEFISH_LAUNCH_BOOT_IMAGE_H_
-#define CUTTLEFISH_LAUNCH_BOOT_IMAGE_H_
-
-#define BOOT_MAGIC "ANDROID!"
-#define BOOT_MAGIC_SIZE 8
-#define BOOT_NAME_SIZE 16
-#define BOOT_ARGS_SIZE 512
-#define BOOT_EXTRA_ARGS_SIZE 1024
-
-#define BOOT_HEADER_VERSION_ZERO 0
-/*
- *  Bootloader expects the structure of boot_img_hdr with header version
- *  BOOT_HEADER_VERSION_ZERO to be as follows:
- */
-struct boot_img_hdr_v0 {
-    uint8_t magic[BOOT_MAGIC_SIZE];
-
-    uint32_t kernel_size; /* size in bytes */
-    uint32_t kernel_addr; /* physical load addr */
-
-    uint32_t ramdisk_size; /* size in bytes */
-    uint32_t ramdisk_addr; /* physical load addr */
-
-    uint32_t second_size; /* size in bytes */
-    uint32_t second_addr; /* physical load addr */
-
-    uint32_t tags_addr; /* physical addr for kernel tags */
-    uint32_t page_size; /* flash page size we assume */
-    /*
-     * version for the boot image header.
-     */
-    uint32_t header_version;
-
-    /* operating system version and security patch level; for
-     * version "A.B.C" and patch level "Y-M-D":
-     * ver = A << 14 | B << 7 | C         (7 bits for each of A, B, C)
-     * lvl = ((Y - 2000) & 127) << 4 | M  (7 bits for Y, 4 bits for M)
-     * os_version = ver << 11 | lvl */
-    uint32_t os_version;
-
-    uint8_t name[BOOT_NAME_SIZE]; /* asciiz product name */
-
-    uint8_t cmdline[BOOT_ARGS_SIZE];
-
-    uint32_t id[8]; /* timestamp / checksum / sha1 / etc */
-
-    /* Supplemental command line data; kept here to maintain
-     * binary compatibility with older versions of mkbootimg */
-    uint8_t extra_cmdline[BOOT_EXTRA_ARGS_SIZE];
-} __attribute__((packed));
-
-/*
- * It is expected that callers would explicitly specify which version of the
- * boot image header they need to use.
- */
-typedef struct boot_img_hdr_v0 boot_img_hdr;
-
-/* When a boot header is of version BOOT_HEADER_VERSION_ZERO, the structure of boot image is as
- * follows:
- *
- * +-----------------+
- * | boot header     | 1 page
- * +-----------------+
- * | kernel          | n pages
- * +-----------------+
- * | ramdisk         | m pages
- * +-----------------+
- * | second stage    | o pages
- * +-----------------+
- *
- * n = (kernel_size + page_size - 1) / page_size
- * m = (ramdisk_size + page_size - 1) / page_size
- * o = (second_size + page_size - 1) / page_size
- *
- * 0. all entities are page_size aligned in flash
- * 1. kernel and ramdisk are required (size != 0)
- * 2. second is optional (second_size == 0 -> no second)
- * 3. load each element (kernel, ramdisk, second) at
- *    the specified physical address (kernel_addr, etc)
- * 4. prepare tags at tag_addr.  kernel_args[] is
- *    appended to the kernel commandline in the tags.
- * 5. r0 = 0, r1 = MACHINE_TYPE, r2 = tags_addr
- * 6. if second_size != 0: jump to second_addr
- *    else: jump to kernel_addr
- */
-
-#define BOOT_HEADER_VERSION_ONE 1
-
-struct boot_img_hdr_v1 : public boot_img_hdr_v0 {
-    uint32_t recovery_dtbo_size;   /* size in bytes for recovery DTBO image */
-    uint64_t recovery_dtbo_offset; /* physical load addr */
-    uint32_t header_size;
-} __attribute__((packed));
-
-/* When the boot image header has a version of BOOT_HEADER_VERSION_ONE, the structure of the boot
- * image is as follows:
- *
- * +-----------------+
- * | boot header     | 1 page
- * +-----------------+
- * | kernel          | n pages
- * +-----------------+
- * | ramdisk         | m pages
- * +-----------------+
- * | second stage    | o pages
- * +-----------------+
- * | recovery dtbo   | p pages
- * +-----------------+
- * n = (kernel_size + page_size - 1) / page_size
- * m = (ramdisk_size + page_size - 1) / page_size
- * o = (second_size + page_size - 1) / page_size
- * p = (recovery_dtbo_size + page_size - 1) / page_size
- *
- * 0. all entities are page_size aligned in flash
- * 1. kernel and ramdisk are required (size != 0)
- * 2. recovery_dtbo is required for recovery.img in non-A/B devices(recovery_dtbo_size != 0)
- * 3. second is optional (second_size == 0 -> no second)
- * 4. load each element (kernel, ramdisk, second, recovery_dtbo) at
- *    the specified physical address (kernel_addr, etc)
- * 5. prepare tags at tag_addr.  kernel_args[] is
- *    appended to the kernel commandline in the tags.
- * 6. r0 = 0, r1 = MACHINE_TYPE, r2 = tags_addr
- * 7. if second_size != 0: jump to second_addr
- *    else: jump to kernel_addr
- */
-
-#if 0
-typedef struct ptentry ptentry;
-
-struct ptentry {
-    char name[16];      /* asciiz partition name    */
-    unsigned start;     /* starting block number    */
-    unsigned length;    /* length in blocks         */
-    unsigned flags;     /* set to zero              */
-};
-
-/* MSM Partition Table ATAG
-**
-** length: 2 + 7 * n
-** atag:   0x4d534d70
-**         <ptentry> x n
-*/
-#endif
-
-#endif
diff --git a/host/commands/assemble_cvd/flags.cc b/host/commands/assemble_cvd/flags.cc
index 5374358..54eefcc 100644
--- a/host/commands/assemble_cvd/flags.cc
+++ b/host/commands/assemble_cvd/flags.cc
@@ -14,6 +14,8 @@
 #include "host/commands/assemble_cvd/data_image.h"
 #include "host/commands/assemble_cvd/image_aggregator.h"
 #include "host/commands/assemble_cvd/assembler_defs.h"
+#include "host/commands/assemble_cvd/super_image_mixer.h"
+#include "host/libs/config/fetcher_config.h"
 #include "host/libs/vm_manager/crosvm_manager.h"
 #include "host/libs/vm_manager/qemu_manager.h"
 #include "host/libs/vm_manager/vm_manager.h"
@@ -69,17 +71,18 @@
 DEFINE_string(boot_image, "",
               "Location of cuttlefish boot image. If empty it is assumed to be "
               "boot.img in the directory specified by -system_image_dir.");
+DEFINE_string(vendor_boot_image, "",
+              "Location of cuttlefish vendor boot image. If empty it is assumed to "
+              "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.");
-std::string g_default_mempath{vsoc::GetDefaultMempath()};
-DEFINE_string(mempath, g_default_mempath.c_str(),
+DEFINE_string(mempath, vsoc::GetDefaultMempath(),
               "Target location for the shmem file.");
-DEFINE_string(mobile_interface, "", // default handled on ParseCommandLine
+DEFINE_string(mobile_interface, GetPerInstanceDefault("cvd-mbr-"),
               "Network interface to use for mobile networking");
-DEFINE_string(mobile_tap_name, "", // default handled on ParseCommandLine
+DEFINE_string(mobile_tap_name, GetPerInstanceDefault("cvd-mtap-"),
               "The name of the tap interface to use for mobile");
-std::string g_default_serial_number{GetPerInstanceDefault("CUTTLEFISHCVD")};
-DEFINE_string(serial_number, g_default_serial_number.c_str(),
+DEFINE_string(serial_number, GetPerInstanceDefault("CUTTLEFISHCVD"),
               "Serial number to use for the device");
 DEFINE_string(instance_dir, "", // default handled on ParseCommandLine
               "A directory to put all instance specific files");
@@ -150,7 +153,7 @@
               "Location of the adb_connector binary. Only relevant if "
               "-run_adb_connector is true");
 DEFINE_int32(vhci_port, GetPerInstanceDefault(0), "VHCI port to use for usb");
-DEFINE_string(wifi_tap_name, "", // default handled on ParseCommandLine
+DEFINE_string(wifi_tap_name, GetPerInstanceDefault("cvd-wtap-"),
               "The name of the tap interface to use for wifi");
 DEFINE_int32(vsock_guest_cid,
              vsoc::GetDefaultPerInstanceVsockCid(),
@@ -204,6 +207,10 @@
              "The vsock port for tombstones");
 DEFINE_bool(use_bootloader, false, "Boots the device using a bootloader");
 DEFINE_string(bootloader, "", "Bootloader binary path");
+DEFINE_string(boot_slot, "", "Force booting into the given slot. If empty, "
+             "the slot will be chosen based on the misc partition if using a "
+             "bootloader. It will default to 'a' if empty and not using a "
+             "bootloader.");
 
 namespace {
 
@@ -245,6 +252,11 @@
   std::string default_composite_disk = FLAGS_system_image_dir + "/composite.img";
   SetCommandLineOptionWithMode("composite_disk", default_composite_disk.c_str(),
                                google::FlagSettingMode::SET_FLAGS_DEFAULT);
+  std::string default_vendor_boot_image = FLAGS_system_image_dir
+                                        + "/vendor_boot.img";
+  SetCommandLineOptionWithMode("vendor_boot_image",
+                               default_vendor_boot_image.c_str(),
+                               google::FlagSettingMode::SET_FLAGS_DEFAULT);
 
   return true;
 }
@@ -319,10 +331,12 @@
   }
 
   auto ramdisk_path = tmp_config_obj.PerInstancePath("ramdisk.img");
+  auto vendor_ramdisk_path = tmp_config_obj.PerInstancePath("vendor_ramdisk.img");
   bool use_ramdisk = boot_image_unpacker.HasRamdiskImage();
   if (!use_ramdisk) {
     LOG(INFO) << "No ramdisk present; assuming system-as-root build";
     ramdisk_path = "";
+    vendor_ramdisk_path = "";
   }
 
   tmp_config_obj.add_kernel_cmdline(boot_image_unpacker.kernel_cmdline());
@@ -399,11 +413,23 @@
   }
 
   tmp_config_obj.set_ramdisk_image_path(ramdisk_path);
-  if(FLAGS_initramfs_path.size() > 0) {
-    tmp_config_obj.set_initramfs_path(FLAGS_initramfs_path);
-    tmp_config_obj.set_final_ramdisk_path(ramdisk_path + kRamdiskConcatExt);
-  } else {
+  tmp_config_obj.set_vendor_ramdisk_image_path(vendor_ramdisk_path);
+
+  // Boot as recovery is set so normal boot needs to be forced every boot
+  tmp_config_obj.add_kernel_cmdline("androidboot.force_normal_boot=1");
+
+  if (FLAGS_kernel_path.size() && !FLAGS_initramfs_path.size()) {
+    // If there's a kernel that's passed in without an initramfs, that implies
+    // user error or a kernel built with no modules. In either case, let's
+    // choose to avoid loading the modules from the vendor ramdisk which are
+    // built for the default cf kernel. Once boot occurs, user error will
+    // become obvious.
     tmp_config_obj.set_final_ramdisk_path(ramdisk_path);
+  } else {
+    tmp_config_obj.set_final_ramdisk_path(ramdisk_path + kRamdiskConcatExt);
+    if(FLAGS_initramfs_path.size()) {
+      tmp_config_obj.set_initramfs_path(FLAGS_initramfs_path);
+    }
   }
 
   tmp_config_obj.set_mempath(FLAGS_mempath);
@@ -503,6 +529,20 @@
   tmp_config_obj.set_use_bootloader(FLAGS_use_bootloader);
   tmp_config_obj.set_bootloader(FLAGS_bootloader);
 
+  if (!FLAGS_boot_slot.empty()) {
+      tmp_config_obj.set_boot_slot(FLAGS_boot_slot);
+  }
+
+  if (!FLAGS_use_bootloader) {
+    std::string slot_suffix;
+    if (FLAGS_boot_slot.empty()) {
+      slot_suffix = "_a";
+    } else {
+      slot_suffix = "_" + FLAGS_boot_slot;
+    }
+    tmp_config_obj.add_kernel_cmdline("androidboot.slot_suffix=" + slot_suffix);
+  }
+
   tmp_config_obj.set_cuttlefish_env_path(GetCuttlefishEnvPath());
 
   auto config_file = GetConfigFilePath(tmp_config_obj);
@@ -523,18 +563,6 @@
 }
 
 void SetDefaultFlagsForQemu() {
-  auto default_mobile_interface = GetPerInstanceDefault("cvd-mbr-");
-  SetCommandLineOptionWithMode("mobile_interface",
-                               default_mobile_interface.c_str(),
-                               google::FlagSettingMode::SET_FLAGS_DEFAULT);
-  auto default_mobile_tap_name = GetPerInstanceDefault("cvd-mtap-");
-  SetCommandLineOptionWithMode("mobile_tap_name",
-                               default_mobile_tap_name.c_str(),
-                               google::FlagSettingMode::SET_FLAGS_DEFAULT);
-  auto default_wifi_tap_name = GetPerInstanceDefault("cvd-wtap-");
-  SetCommandLineOptionWithMode("wifi_tap_name",
-                               default_wifi_tap_name.c_str(),
-                               google::FlagSettingMode::SET_FLAGS_DEFAULT);
   auto default_instance_dir =
       cvd::StringFromEnv("HOME", ".") + "/cuttlefish_runtime";
   SetCommandLineOptionWithMode("instance_dir",
@@ -547,18 +575,6 @@
 }
 
 void SetDefaultFlagsForCrosvm() {
-  auto default_mobile_interface = GetPerInstanceDefault("cvd-mbr-");
-  SetCommandLineOptionWithMode("mobile_interface",
-                               default_mobile_interface.c_str(),
-                               google::FlagSettingMode::SET_FLAGS_DEFAULT);
-  auto default_mobile_tap_name = GetPerInstanceDefault("cvd-mtap-");
-  SetCommandLineOptionWithMode("mobile_tap_name",
-                               default_mobile_tap_name.c_str(),
-                               google::FlagSettingMode::SET_FLAGS_DEFAULT);
-  auto default_wifi_tap_name = GetPerInstanceDefault("cvd-wtap-");
-  SetCommandLineOptionWithMode("wifi_tap_name",
-                               default_wifi_tap_name.c_str(),
-                               google::FlagSettingMode::SET_FLAGS_DEFAULT);
   auto default_instance_dir =
       cvd::StringFromEnv("HOME", ".") + "/cuttlefish_runtime";
   SetCommandLineOptionWithMode("instance_dir",
@@ -733,7 +749,8 @@
 
 } // namespace
 
-const vsoc::CuttlefishConfig* InitFilesystemAndCreateConfig(int* argc, char*** argv) {
+const vsoc::CuttlefishConfig* InitFilesystemAndCreateConfig(
+    int* argc, char*** argv, cvd::FetcherConfig fetcher_config) {
   if (!ParseCommandLineFlags(argc, argv)) {
     LOG(ERROR) << "Failed to parse command arguments";
     exit(AssemblerExitCodes::kArgumentParsingError);
@@ -770,7 +787,14 @@
     exit(cvd::kCuttlefishConfigurationInitError);
   }
 
-  auto boot_img_unpacker = cvd::BootImageUnpacker::FromImage(FLAGS_boot_image);
+  if (!cvd::FileHasContent(FLAGS_vendor_boot_image)) {
+    LOG(ERROR) << "File not found: " << FLAGS_vendor_boot_image;
+    exit(cvd::kCuttlefishConfigurationInitError);
+  }
+
+  auto boot_img_unpacker =
+    cvd::BootImageUnpacker::FromImages(FLAGS_boot_image,
+                                       FLAGS_vendor_boot_image);
 
   if (!InitializeCuttlefishConfiguration(*boot_img_unpacker)) {
     LOG(ERROR) << "Failed to initialize configuration";
@@ -784,6 +808,7 @@
   }
 
   if (!boot_img_unpacker->Unpack(config->ramdisk_image_path(),
+                                 config->vendor_ramdisk_image_path(),
                                  config->use_unpacked_kernel()
                                      ? config->kernel_image_path()
                                      : "")) {
@@ -791,10 +816,26 @@
     exit(AssemblerExitCodes::kBootImageUnpackError);
   }
 
-  if(config->initramfs_path().size() != 0) {
-    if(!ConcatRamdisks(config->final_ramdisk_path(), config->ramdisk_image_path(),
-        config->initramfs_path())) {
-      LOG(ERROR) << "Failed to concatenate ramdisk and initramfs";
+  // TODO(134522463) as part of the bootloader refactor, repack the vendor boot
+  // image and use the bootloader to load both the boot and vendor ramdisk.
+  // Until then, this hack to get gki modules into cuttlefish will suffice.
+
+  // If a vendor ramdisk comes in via this mechanism, let it supercede the one
+  // in the vendor boot image. This flag is what kernel presubmit testing uses
+  // to pass in the kernel ramdisk.
+
+  // If no kernel is passed in or an initramfs is made available, the default
+  // vendor boot ramdisk or the initramfs provided should be appended to the
+  // boot ramdisk. If a kernel IS provided with no initramfs, it is safe to
+  // safe to assume that the kernel was built with no modules and expects no
+  // modules for cf to run properly.
+  if(!FLAGS_kernel_path.size() || FLAGS_initramfs_path.size()) {
+    const std::string& vendor_ramdisk_path =
+      config->initramfs_path().size() ? config->initramfs_path()
+                                      : config->vendor_ramdisk_image_path();
+    if(!ConcatRamdisks(config->final_ramdisk_path(),
+                       config->ramdisk_image_path(), vendor_ramdisk_path)) {
+      LOG(ERROR) << "Failed to concatenate ramdisk and vendor ramdisk";
       exit(AssemblerExitCodes::kInitRamFsConcatError);
     }
   }
@@ -823,6 +864,13 @@
     CreateBlankImage(FLAGS_metadata_image, FLAGS_blank_metadata_image_mb, "none");
   }
 
+  if (SuperImageNeedsRebuilding(fetcher_config, *config)) {
+    if (!RebuildSuperImage(fetcher_config, *config, FLAGS_super_image)) {
+      LOG(ERROR) << "Super image rebuilding requested but could not be completed.";
+      exit(cvd::kCuttlefishConfigurationInitError);
+    }
+  }
+
   if (ShouldCreateCompositeDisk()) {
     CreateCompositeDisk(*config);
   }
diff --git a/host/commands/assemble_cvd/flags.h b/host/commands/assemble_cvd/flags.h
index e8c542f..0373388 100644
--- a/host/commands/assemble_cvd/flags.h
+++ b/host/commands/assemble_cvd/flags.h
@@ -1,6 +1,8 @@
 #pragma once
 
 #include "host/libs/config/cuttlefish_config.h"
+#include "host/libs/config/fetcher_config.h"
 
-const vsoc::CuttlefishConfig* InitFilesystemAndCreateConfig(int* argc, char*** argv);
+const vsoc::CuttlefishConfig* InitFilesystemAndCreateConfig(
+    int* argc, char*** argv, cvd::FetcherConfig config);
 std::string GetConfigFilePath(const vsoc::CuttlefishConfig& config);
diff --git a/host/commands/assemble_cvd/super_image_mixer.cc b/host/commands/assemble_cvd/super_image_mixer.cc
new file mode 100644
index 0000000..6cfa269
--- /dev/null
+++ b/host/commands/assemble_cvd/super_image_mixer.cc
@@ -0,0 +1,250 @@
+//
+// 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.
+
+#include "super_image_mixer.h"
+
+#include <cstdio>
+#include <functional>
+#include <memory>
+
+#include <glog/logging.h>
+
+#include "ziparchive/zip_archive.h"
+#include "ziparchive/zip_writer.h"
+
+#include "common/libs/utils/files.h"
+#include "common/libs/utils/subprocess.h"
+#include "host/libs/config/cuttlefish_config.h"
+#include "host/libs/config/fetcher_config.h"
+
+namespace {
+
+using cvd::FileExists;
+using vsoc::DefaultHostArtifactsPath;
+
+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) {
+      continue;
+    }
+    std::string expected_substr = "target_files-" + file_iter.second.build_id + ".zip";
+    auto expected_pos = file_iter.first.size() - expected_substr.size();
+    if (file_iter.first.rfind(expected_substr) == expected_pos) {
+      return file_iter.first;
+    }
+  }
+  return "";
+}
+
+class ZipArchiveDeleter {
+public:
+  void operator()(ZipArchive* archive) {
+    CloseArchive(archive);
+  }
+};
+
+using ManagedZipArchive = std::unique_ptr<ZipArchive, ZipArchiveDeleter>;
+
+class CFileCloser {
+public:
+  void operator()(FILE* file) {
+    fclose(file);
+  }
+};
+
+using ManagedCFile = std::unique_ptr<FILE, CFileCloser>;
+
+ManagedZipArchive OpenZipArchive(const std::string& path) {
+  ZipArchive* ptr;
+  int status = OpenArchive(path.c_str(), &ptr);
+  if (status != 0) {
+    LOG(ERROR) << "Could not open archive \"" << path << "\": " << status;
+    return {};
+  }
+  return ManagedZipArchive(ptr);
+}
+
+ManagedCFile OpenFile(const std::string& path, const std::string& mode) {
+  FILE* ptr = fopen(path.c_str(), mode.c_str());
+  if (ptr == nullptr) {
+    int error_num = errno;
+    LOG(ERROR) << "Could not open \"" << path << "\". Error was "
+               << strerror(error_num);
+    return {};
+  }
+  return ManagedCFile(ptr);
+}
+
+const std::string kMiscInfoPath = "META/misc_info.txt";
+const std::set<std::string> kDefaultTargetImages = {
+  "IMAGES/boot.img",
+  "IMAGES/cache.img",
+  "IMAGES/recovery.img",
+  "IMAGES/userdata.img",
+  "IMAGES/vendor.img",
+};
+
+bool CopyZipFileContents(const uint8_t* buf, size_t buf_size, void* cookie) {
+  ZipWriter* out_writer = (ZipWriter*) cookie;
+  int32_t status = out_writer->WriteBytes(buf, buf_size);
+  if (status != 0) {
+    LOG(ERROR) << "Could not write zip file contents, error code " << status;
+    return false;
+  }
+  return true;
+}
+
+bool CombineTargetZipFiles(const std::string& default_target_zip,
+                           const std::string& system_target_zip,
+                           const std::string& output_path) {
+  auto default_target = OpenZipArchive(default_target_zip);
+  if (!default_target) {
+    LOG(ERROR) << "Could not open " << default_target_zip;
+    return false;
+  }
+  auto system_target = OpenZipArchive(system_target_zip);
+  if (!system_target) {
+    LOG(ERROR) << "Could not open " << system_target_zip;
+    return false;
+  }
+  auto out_file = OpenFile(output_path, "wb");
+  if (!out_file) {
+    LOG(ERROR) << "Could not open " << output_path;
+    return false;
+  }
+  ZipWriter out_writer{out_file.get()};
+
+  ZipEntry entry;
+
+  if (FindEntry(default_target.get(), kMiscInfoPath, &entry) != 0) {
+    LOG(ERROR) << "Default target files zip does not have " << kMiscInfoPath;
+    return false;
+  }
+  out_writer.StartEntry(kMiscInfoPath, 0);
+  ProcessZipEntryContents(
+      default_target.get(), &entry, CopyZipFileContents, (void*) &out_writer);
+  out_writer.FinishEntry();
+
+  void* iteration_cookie;
+  std::string name;
+
+  StartIteration(default_target.get(), &iteration_cookie, "IMAGES/", ".img");
+  for (int status = 0; status != -1; status = Next(iteration_cookie, &entry, &name)) {
+    if (name == "") {
+      continue;
+    }
+    LOG(INFO) << "Name is \"" << name << "\"";
+    if (kDefaultTargetImages.count(name) == 0) {
+      continue;
+    }
+    LOG(INFO) << "Writing " << name;
+    out_writer.StartEntry(name, 0);
+    ProcessZipEntryContents(
+        default_target.get(), &entry, CopyZipFileContents, (void*) &out_writer);
+    out_writer.FinishEntry();
+  }
+  EndIteration(iteration_cookie);
+
+  StartIteration(system_target.get(), &iteration_cookie, "IMAGES/", ".img");
+  for (int status = 0; status != -1; status = Next(iteration_cookie, &entry, &name)) {
+    if (kDefaultTargetImages.count(name) > 0) {
+      continue;
+    }
+    LOG(INFO) << "Writing " << name;
+    out_writer.StartEntry(name, 0);
+    ProcessZipEntryContents(
+        system_target.get(), &entry, CopyZipFileContents, (void*) &out_writer);
+    out_writer.FinishEntry();
+  }
+  EndIteration(iteration_cookie);
+
+  int success = out_writer.Finish();
+  if (success != 0) {
+    LOG(ERROR) << "Unable to write combined image zip archive: " << success;
+    return false;
+  }
+
+  return true;
+}
+
+bool BuildSuperImage(const std::string& combined_target_zip,
+                     const std::string& output_path) {
+  std::string build_super_image_binary;
+  std::string otatools_path;
+  if (FileExists(DefaultHostArtifactsPath("otatools/bin/build_super_image"))) {
+    build_super_image_binary =
+        DefaultHostArtifactsPath("otatools/bin/build_super_image");
+    otatools_path = DefaultHostArtifactsPath("otatools");
+  } else if (FileExists(DefaultHostArtifactsPath("bin/build_super_image"))) {
+    build_super_image_binary =
+        DefaultHostArtifactsPath("bin/build_super_image");
+    otatools_path = DefaultHostArtifactsPath("");
+  } else {
+    LOG(ERROR) << "Could not find otatools";
+    return false;
+  }
+  return cvd::execute({
+    build_super_image_binary,
+    "--path=" + otatools_path,
+    combined_target_zip,
+    output_path,
+  }) == 0;
+}
+
+} // namespace
+
+bool SuperImageNeedsRebuilding(const cvd::FetcherConfig& fetcher_config,
+                               const vsoc::CuttlefishConfig&) {
+  bool has_default_build = false;
+  bool has_system_build = false;
+  for (const auto& file_iter : fetcher_config.get_cvd_files()) {
+    if (file_iter.second.source == cvd::FileSource::DEFAULT_BUILD) {
+      has_default_build = true;
+    } else if (file_iter.second.source == cvd::FileSource::SYSTEM_BUILD) {
+      has_system_build = true;
+    }
+  }
+  return has_default_build && has_system_build;
+}
+
+bool RebuildSuperImage(const cvd::FetcherConfig& fetcher_config,
+                       const vsoc::CuttlefishConfig& config,
+                       const std::string& output_path) {
+  std::string default_target_zip =
+      TargetFilesZip(fetcher_config, cvd::FileSource::DEFAULT_BUILD);
+  if (default_target_zip == "") {
+    LOG(ERROR) << "Unable to find default target zip file.";
+    return false;
+  }
+  std::string system_target_zip =
+      TargetFilesZip(fetcher_config, cvd::FileSource::SYSTEM_BUILD);
+  if (system_target_zip == "") {
+    LOG(ERROR) << "Unable to find system target zip file.";
+    return false;
+  }
+  std::string combined_target_zip = config.PerInstancePath("target_combined.zip");
+  // TODO(schuffelen): Use otatools/bin/merge_target_files
+  if (!CombineTargetZipFiles(default_target_zip, system_target_zip,
+                             combined_target_zip)) {
+    LOG(ERROR) << "Could not combine target zip files.";
+    return false;
+  }
+  bool success = BuildSuperImage(combined_target_zip, output_path);
+  if (!success) {
+    LOG(ERROR) << "Could not write the final output super image.";
+  }
+  return success;
+}
diff --git a/host/commands/assemble_cvd/super_image_mixer.h b/host/commands/assemble_cvd/super_image_mixer.h
new file mode 100644
index 0000000..1b8c420
--- /dev/null
+++ b/host/commands/assemble_cvd/super_image_mixer.h
@@ -0,0 +1,23 @@
+//
+// 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.
+
+#include "host/libs/config/cuttlefish_config.h"
+#include "host/libs/config/fetcher_config.h"
+
+bool SuperImageNeedsRebuilding(const cvd::FetcherConfig& fetcher_config,
+                               const vsoc::CuttlefishConfig& config);
+bool RebuildSuperImage(const cvd::FetcherConfig& fetcher_config,
+                       const vsoc::CuttlefishConfig& config,
+                       const std::string& output_path);
diff --git a/host/commands/cvd_status/Android.bp b/host/commands/cvd_status/Android.bp
new file mode 100644
index 0000000..7196e07
--- /dev/null
+++ b/host/commands/cvd_status/Android.bp
@@ -0,0 +1,38 @@
+//
+// 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_binary_host {
+    name: "cvd_status",
+    srcs: [
+        "cvd_status.cc",
+    ],
+    header_libs: [
+        "cuttlefish_glog",
+    ],
+    shared_libs: [
+        "libbase",
+        "libcuttlefish_fs",
+        "libcuttlefish_utils",
+        "cuttlefish_auto_resources",
+    ],
+    static_libs: [
+        "libcuttlefish_host_config",
+        "libcuttlefish_vm_manager",
+        "libjsoncpp",
+        "libgflags",
+        "libxml2",
+    ],
+    defaults: ["cuttlefish_host_only", "cuttlefish_libicuuc"],
+}
diff --git a/host/commands/cvd_status/cvd_status.cc b/host/commands/cvd_status/cvd_status.cc
new file mode 100644
index 0000000..fb9911f
--- /dev/null
+++ b/host/commands/cvd_status/cvd_status.cc
@@ -0,0 +1,110 @@
+/*
+ * 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 <inttypes.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include <algorithm>
+#include <cstdlib>
+#include <fstream>
+#include <iomanip>
+#include <memory>
+#include <sstream>
+#include <string>
+#include <vector>
+
+#include <gflags/gflags.h>
+#include <glog/logging.h>
+
+#include "common/libs/fs/shared_fd.h"
+#include "common/libs/fs/shared_select.h"
+#include "common/libs/utils/environment.h"
+#include "host/commands/run_cvd/runner_defs.h"
+#include "host/libs/config/cuttlefish_config.h"
+#include "host/libs/vm_manager/vm_manager.h"
+
+DEFINE_int32(wait_for_launcher, 5,
+             "How many seconds to wait for the launcher to respond to the status "
+             "command. A value of zero means wait indefinetly");
+
+int main(int argc, char** argv) {
+  ::android::base::InitLogging(argv, android::base::StderrLogger);
+  google::ParseCommandLineFlags(&argc, &argv, true);
+
+  auto config = vsoc::CuttlefishConfig::Get();
+  if (!config) {
+    LOG(ERROR) << "Failed to obtain config object";
+    return 1;
+  }
+
+  auto monitor_path = config->launcher_monitor_socket_path();
+  if (monitor_path.empty()) {
+    LOG(ERROR) << "No path to launcher monitor found";
+    return 2;
+  }
+  auto monitor_socket = cvd::SharedFD::SocketLocalClient(monitor_path.c_str(),
+                                                         false, SOCK_STREAM);
+  if (!monitor_socket->IsOpen()) {
+    LOG(ERROR) << "Unable to connect to launcher monitor at " << monitor_path
+               << ": " << monitor_socket->StrError();
+    return 3;
+  }
+  auto request = cvd::LauncherAction::kStatus;
+  auto bytes_sent = monitor_socket->Send(&request, sizeof(request), 0);
+  if (bytes_sent < 0) {
+    LOG(ERROR) << "Error sending launcher monitor the status command: "
+               << monitor_socket->StrError();
+    return 4;
+  }
+  // Perform a select with a timeout to guard against launcher hanging
+  cvd::SharedFDSet read_set;
+  read_set.Set(monitor_socket);
+  struct timeval timeout = {FLAGS_wait_for_launcher, 0};
+  int selected = cvd::Select(&read_set, nullptr, nullptr,
+                             FLAGS_wait_for_launcher <= 0 ? nullptr : &timeout);
+  if (selected < 0){
+    LOG(ERROR) << "Failed communication with the launcher monitor: "
+               << strerror(errno);
+    return 5;
+  }
+  if (selected == 0) {
+    LOG(ERROR) << "Timeout expired waiting for launcher monitor to respond";
+    return 6;
+  }
+  cvd::LauncherResponse response;
+  auto bytes_recv = monitor_socket->Recv(&response, sizeof(response), 0);
+  if (bytes_recv < 0) {
+    LOG(ERROR) << "Error receiving response from launcher monitor: "
+               << monitor_socket->StrError();
+    return 7;
+  }
+  if (response != cvd::LauncherResponse::kSuccess) {
+    LOG(ERROR) << "Received '" << static_cast<char>(response)
+               << "' response from launcher monitor";
+    return 8;
+  }
+  LOG(INFO) << "run_cvd is active.";
+  return 0;
+}
diff --git a/host/commands/launch/filesystem_explorer.cc b/host/commands/launch/filesystem_explorer.cc
index dd24324..5be4ef0 100644
--- a/host/commands/launch/filesystem_explorer.cc
+++ b/host/commands/launch/filesystem_explorer.cc
@@ -104,8 +104,11 @@
     files.merge(HeuristicFileReport(home));
   }
 
+  std::string psuedo_fetcher_dir =
+      cvd::StringFromEnv("ANDROID_HOST_OUT",
+                         cvd::StringFromEnv("HOME", current_directory));
   std::string psuedo_fetcher_config =
-      current_directory + "/launcher_psuedo_fetcher_config.json";
+      psuedo_fetcher_dir + "/launcher_psuedo_fetcher_config.json";
   files.insert(psuedo_fetcher_config);
 
   cvd::FetcherConfig config;
diff --git a/host/commands/launch/launch_cvd.cc b/host/commands/launch/launch_cvd.cc
index 01d6799..9d3b108 100644
--- a/host/commands/launch/launch_cvd.cc
+++ b/host/commands/launch/launch_cvd.cc
@@ -37,7 +37,7 @@
  * Controllable with a flag for extraordinary scenarios such as running from a
  * daemon which closes its own stdin.
  */
-DEFINE_bool(run_file_discovery, (bool) isatty(0),
+DEFINE_bool(run_file_discovery, true,
             "Whether to run file discovery or get input files from stdin.");
 
 namespace {
diff --git a/host/commands/run_cvd/main.cc b/host/commands/run_cvd/main.cc
index 5ea68a3..663b7f0 100644
--- a/host/commands/run_cvd/main.cc
+++ b/host/commands/run_cvd/main.cc
@@ -304,6 +304,12 @@
             client->Write(&response, sizeof(response));
           }
           break;
+        case cvd::LauncherAction::kStatus: {
+          // TODO(schuffelen): Return more information on a side channel
+          auto response = cvd::LauncherResponse::kSuccess;
+          client->Write(&response, sizeof(response));
+          break;
+        }
         default:
           LOG(ERROR) << "Unrecognized launcher action: "
                      << static_cast<char>(action);
diff --git a/host/commands/run_cvd/runner_defs.h b/host/commands/run_cvd/runner_defs.h
index 255f5b0..1486b11 100644
--- a/host/commands/run_cvd/runner_defs.h
+++ b/host/commands/run_cvd/runner_defs.h
@@ -48,6 +48,7 @@
 
 // Actions supported by the launcher server
 enum class LauncherAction : char {
+  kStatus = 'I',
   kStop = 'X',
 };
 
diff --git a/host/frontend/vnc_server/screen_connector.cpp b/host/frontend/vnc_server/screen_connector.cpp
index 03e945a..53cb389 100644
--- a/host/frontend/vnc_server/screen_connector.cpp
+++ b/host/frontend/vnc_server/screen_connector.cpp
@@ -97,14 +97,19 @@
       }
       while (conn->IsOpen()) {
         int32_t size = 0;
-        conn->Read(&size, sizeof(size));
+        if (conn->Read(&size, sizeof(size)) < 0) {
+          LOG(ERROR) << "Failed to read from hwcomposer: "
+                      << conn->StrError();
+          break;
+        }
         auto buff = reinterpret_cast<uint8_t*>(GetBuffer(current_buffer));
         while (size > 0) {
           auto read = conn->Read(buff, size);
           if (read < 0) {
             LOG(ERROR) << "Failed to read from hwcomposer: "
                        << conn->StrError();
-            return;
+            conn->Close();
+            break;
           }
           size -= read;
           buff += read;
diff --git a/host/libs/config/cuttlefish_config.cpp b/host/libs/config/cuttlefish_config.cpp
index 650190f..882a951 100644
--- a/host/libs/config/cuttlefish_config.cpp
+++ b/host/libs/config/cuttlefish_config.cpp
@@ -92,6 +92,7 @@
 const char* kRamdiskImagePath = "ramdisk_image_path";
 const char* kInitramfsPath = "initramfs_path";
 const char* kFinalRamdiskPath = "final_ramdisk_path";
+const char* kVendorRamdiskImagePath = "vendor_ramdisk_image_path";
 
 const char* kVirtualDiskPaths = "virtual_disk_paths";
 const char* kUsbV1SocketName = "usb_v1_socket_name";
@@ -165,6 +166,8 @@
 
 const char* kBootloader = "bootloader";
 const char* kUseBootloader = "use_bootloader";
+
+const char* kBootSlot = "boot_slot";
 }  // namespace
 
 namespace vsoc {
@@ -378,6 +381,14 @@
   SetPath(kFinalRamdiskPath, final_ramdisk_path);
 }
 
+std::string CuttlefishConfig::vendor_ramdisk_image_path() const {
+  return (*dictionary_)[kVendorRamdiskImagePath].asString();
+}
+void CuttlefishConfig::set_vendor_ramdisk_image_path(
+    const std::string& vendor_ramdisk_image_path) {
+  SetPath(kVendorRamdiskImagePath, vendor_ramdisk_image_path);
+}
+
 std::vector<std::string> CuttlefishConfig::virtual_disk_paths() const {
   std::vector<std::string> virtual_disks;
   auto virtual_disks_json_obj = (*dictionary_)[kVirtualDiskPaths];
@@ -903,6 +914,14 @@
   SetPath(kBootloader, bootloader);
 }
 
+void CuttlefishConfig::set_boot_slot(const std::string& boot_slot) {
+  (*dictionary_)[kBootSlot] = boot_slot;
+}
+
+std::string CuttlefishConfig::boot_slot() const {
+  return (*dictionary_)[kBootSlot].asString();
+}
+
 int CuttlefishConfig::tombstone_receiver_port() const {
   return (*dictionary_)[kTombstoneReceiverPort].asInt();
 }
diff --git a/host/libs/config/cuttlefish_config.h b/host/libs/config/cuttlefish_config.h
index 0dd9ce9..0fca9f0 100644
--- a/host/libs/config/cuttlefish_config.h
+++ b/host/libs/config/cuttlefish_config.h
@@ -156,6 +156,10 @@
   std::string final_ramdisk_path() const;
   void set_final_ramdisk_path(const std::string& final_ramdisk_path);
 
+  std::string vendor_ramdisk_image_path() const;
+  void set_vendor_ramdisk_image_path(const std::string&
+    vendor_ramdisk_image_path);
+
   std::vector<std::string> virtual_disk_paths() const;
   void set_virtual_disk_paths(const std::vector<std::string>& disk_paths);
 
@@ -344,6 +348,9 @@
   void set_bootloader(const std::string& bootloader_path);
   std::string bootloader() const;
 
+  void set_boot_slot(const std::string& boot_slot);
+  std::string boot_slot() const;
+
   bool enable_ivserver() const;
 
   std::string touch_socket_path() const;
diff --git a/tests/hidl/Android.bp b/tests/hidl/Android.bp
new file mode 100644
index 0000000..a1827e3
--- /dev/null
+++ b/tests/hidl/Android.bp
@@ -0,0 +1,13 @@
+cc_test {
+    name: "hidl_implementation_test",
+    srcs: ["hidl_implementation_test.cpp"],
+    static_libs: [
+        "libhidlmetadata",
+        "libhidl-gen-utils",
+    ],
+    shared_libs: [
+        "libbase",
+        "libvintf",
+    ],
+    test_suites: ["device-tests"],
+}
diff --git a/tests/hidl/OWNERS b/tests/hidl/OWNERS
new file mode 100644
index 0000000..40164aa
--- /dev/null
+++ b/tests/hidl/OWNERS
@@ -0,0 +1 @@
+smoreland@google.com
diff --git a/tests/hidl/hidl_implementation_test.cpp b/tests/hidl/hidl_implementation_test.cpp
new file mode 100644
index 0000000..a4782f2
--- /dev/null
+++ b/tests/hidl/hidl_implementation_test.cpp
@@ -0,0 +1,192 @@
+/*
+ * 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.
+ */
+#include <android-base/logging.h>
+#include <gtest/gtest.h>
+#include <hidl/metadata.h>
+#include <hidl-util/FQName.h>
+#include <vintf/VintfObject.h>
+
+using namespace android;
+
+static std::set<std::string> kKnownMissing = {
+    "android.frameworks.bufferhub@1.0",
+    "android.frameworks.cameraservice.device@2.0",
+    "android.frameworks.vr.composer@1.0",
+    "android.frameworks.vr.composer@2.0",
+    "android.hardware.audio@2.0",
+    "android.hardware.audio@4.0",
+    "android.hardware.audio@6.0",
+    "android.hardware.audio.effect@2.0",
+    "android.hardware.audio.effect@4.0",
+    "android.hardware.audio.effect@6.0",
+    "android.hardware.automotive.audiocontrol@1.0",
+    "android.hardware.automotive.can@1.0",
+    "android.hardware.automotive.evs@1.0",
+    "android.hardware.automotive.evs@1.1",
+    "android.hardware.automotive.vehicle@2.0",
+    "android.hardware.biometrics.face@1.0",
+    "android.hardware.biometrics.fingerprint@2.1",
+    "android.hardware.bluetooth.a2dp@1.0",
+    "android.hardware.broadcastradio@1.1",
+    "android.hardware.broadcastradio@2.0",
+    "android.hardware.camera.device@1.0",
+    "android.hardware.camera.device@3.5",
+    "android.hardware.camera.provider@2.5",
+    "android.hardware.cas.native@1.0",
+    "android.hardware.confirmationui@1.0",
+    "android.hardware.contexthub@1.0",
+    "android.hardware.fastboot@1.0",
+    "android.hardware.gnss.measurement_corrections@1.0",
+    "android.hardware.gnss.visibility_control@1.0",
+    "android.hardware.graphics.allocator@3.0",
+    "android.hardware.graphics.allocator@4.0",
+    "android.hardware.graphics.bufferqueue@1.0",
+    "android.hardware.graphics.bufferqueue@2.0",
+    "android.hardware.graphics.composer@2.3",
+    "android.hardware.graphics.composer@2.4",
+    "android.hardware.graphics.mapper@3.0",
+    "android.hardware.graphics.mapper@4.0",
+    "android.hardware.health@1.0",
+    "android.hardware.ir@1.0",
+    "android.hardware.keymaster@3.0",
+    "android.hardware.media.bufferpool@1.0",
+    "android.hardware.media.bufferpool@2.0",
+    "android.hardware.memtrack@1.0",
+    "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",
+    "android.hardware.sensors@1.0",
+    "android.hardware.soundtrigger@2.2",
+    "android.hardware.tetheroffload.config@1.0",
+    "android.hardware.tetheroffload.control@1.0",
+    "android.hardware.thermal@1.1",
+    "android.hardware.tv.cec@1.0",
+    "android.hardware.tv.cec@2.0",
+    "android.hardware.tv.input@1.0",
+    "android.hardware.tv.tuner@1.0",
+    "android.hardware.usb@1.2",
+    "android.hardware.usb.gadget@1.0",
+    "android.hardware.vibrator@1.4",
+    "android.hardware.vr@1.0",
+    "android.hardware.weaver@1.0",
+    "android.hardware.wifi@1.3",
+    "android.hardware.wifi@1.4",
+    "android.hardware.wifi.hostapd@1.1",
+    "android.hardware.wifi.offload@1.0",
+    "android.hidl.base@1.0",
+    "android.hidl.memory.token@1.0",
+};
+
+// AOSP packages which are never considered
+static bool isPackageWhitelist(const FQName& name) {
+    static std::vector<std::string> gAospExclude = {
+        // packages not implemented now that we never expect to be implemented
+        "android.hardware.tests",
+    };
+    for (const std::string& package : gAospExclude) {
+        if (name.inPackage(package)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+static bool isAospInterface(const FQName& name) {
+    static std::vector<std::string> gAospPackages = {
+        "android.hidl",
+        "android.hardware",
+        "android.frameworks",
+        "android.system",
+    };
+    for (const std::string& package : gAospPackages) {
+        if (name.inPackage(package) && !isPackageWhitelist(name)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+static std::set<FQName> allTreeInterfaces() {
+    std::set<FQName> ret;
+    for (const auto& iface : HidlInterfaceMetadata::all()) {
+        FQName f;
+        CHECK(f.setTo(iface.name)) << iface.name;
+        ret.insert(f);
+    }
+    return ret;
+}
+
+static std::set<FQName> allManifestInstances() {
+    std::set<FQName> ret;
+    auto setInserter = [&] (const vintf::ManifestInstance& i) -> bool {
+        if (i.format() != vintf::HalFormat::HIDL) {
+            std::cout << "[ WARNING ] Not checking non-HIDL instance: " << i.description() << std::endl;
+            return true;  // continue
+        }
+        ret.insert(i.getFqInstance().getFqName());
+        return true;  // continue
+    };
+    vintf::VintfObject::GetDeviceHalManifest()->forEachInstance(setInserter);
+    vintf::VintfObject::GetFrameworkHalManifest()->forEachInstance(setInserter);
+    return ret;
+}
+
+TEST(Hidl, IsAospDevice) {
+    for (const FQName& name : allManifestInstances()) {
+        EXPECT_TRUE(isAospInterface(name)) << name.string();
+    }
+}
+
+TEST(Hidl, InterfacesImplemented) {
+    // instances -> major version -> minor versions version
+    std::map<std::string, std::map<size_t, std::set<size_t>>> unimplemented;
+
+    for (const FQName& f : allTreeInterfaces()) {
+        if (!isAospInterface(f)) continue;
+
+        unimplemented[f.package()][f.getPackageMajorVersion()].insert(f.getPackageMinorVersion());
+    }
+
+    for (const FQName& f : allManifestInstances()) {
+        std::set<size_t>& minors = unimplemented[f.package()][f.getPackageMajorVersion()];
+        size_t minor = f.getPackageMinorVersion();
+
+        auto it = minors.find(minor);
+        if (it == minors.end()) continue;
+
+        // if 1.2 is implemented, also considere 1.0, 1.1 implemented
+        minors.erase(minors.begin(), std::next(it));
+    }
+
+    for (const auto& [package, minorsPerMajor] : unimplemented) {
+        for (const auto& [major, minors] : minorsPerMajor) {
+            if (minors.empty()) continue;
+
+            size_t maxMinor = *minors.rbegin();
+
+            FQName missing;
+            ASSERT_TRUE(missing.setTo(package, major, maxMinor));
+
+            if (kKnownMissing.find(missing.string()) != kKnownMissing.end()) continue;
+
+            ADD_FAILURE() << "Missing implementation from " << missing.string();
+        }
+    }
+}
diff --git a/tools/create_base_image_arm.sh b/tools/create_base_image_arm.sh
new file mode 100755
index 0000000..4cd673b
--- /dev/null
+++ b/tools/create_base_image_arm.sh
@@ -0,0 +1,602 @@
+#!/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_boolean p1 \
+	false "Only generate/write the 1st partition (loader1)" "1"
+DEFINE_boolean p2 \
+	false "Only generate/write the 2nd partition (env)" "2"
+DEFINE_boolean p3 \
+	false "Only generate/write the 3rd partition (loader2)" "3"
+DEFINE_boolean p4 \
+	false "Only generate/write the 4th partition (trust)" "4"
+DEFINE_boolean p5 \
+	false "Only generate/write the 5th partition (rootfs)" "5"
+
+FLAGS_HELP="USAGE: $0 <KERNEL_DIR> [IMAGE] [flags]"
+
+FLAGS "$@" || exit $?
+eval set -- "${FLAGS_ARGV}"
+
+if [ ${FLAGS_p1} -eq ${FLAGS_FALSE} ] &&
+   [ ${FLAGS_p2} -eq ${FLAGS_FALSE} ] &&
+   [ ${FLAGS_p3} -eq ${FLAGS_FALSE} ] &&
+   [ ${FLAGS_p4} -eq ${FLAGS_FALSE} ] &&
+   [ ${FLAGS_p5} -eq ${FLAGS_FALSE} ]; then
+	FLAGS_p1=${FLAGS_TRUE}
+	FLAGS_p2=${FLAGS_TRUE}
+	FLAGS_p3=${FLAGS_TRUE}
+	FLAGS_p4=${FLAGS_TRUE}
+	FLAGS_p5=${FLAGS_TRUE}
+fi
+
+for arg in "$@" ; do
+	if [ -z $KERNEL_DIR ]; then
+		KERNEL_DIR=$arg
+	elif [ -z $IMAGE ]; then
+		IMAGE=$arg
+	else
+		flags_help
+		exit 1
+	fi
+done
+
+USE_IMAGE=`[ -z "${IMAGE}" ] && echo "0" || echo "1"`
+OVERWRITE=`[ -e "${IMAGE}" ] && echo "1" || echo "0"`
+if [ -z $KERNEL_DIR ]; then
+	flags_help
+	exit 1
+fi
+if [ ! -e "${KERNEL_DIR}" ]; then
+	echo "error: can't find '${KERNEL_DIR}'. aborting..."
+	exit 1
+fi
+
+# escalate to superuser
+if [ $UID -ne 0 ]; then
+	cd ${ANDROID_BUILD_TOP}
+	. ./build/envsetup.sh
+	lunch ${TARGET_PRODUCT}-${TARGET_BUILD_VARIANT}
+	mmma external/u-boot
+	cd -
+	exec sudo -E "${0}" ${@}
+fi
+
+if [ $OVERWRITE -eq 1 ]; then
+	OVERWRITE_IMAGE=${IMAGE}
+	IMAGE=`mktemp`
+fi
+
+if [ $USE_IMAGE -eq 0 ]; then
+	init_devs=`lsblk --nodeps -oNAME -n`
+	echo "Reinsert device (to write to) into PC"
+	while true; do
+		devs=`lsblk --nodeps -oNAME -n`
+		new_devs="$(echo -e "${init_devs}\n${devs}" | sort | uniq -u | awk 'NF')"
+		num_devs=`echo "${new_devs}" | wc -l`
+		if [[ "${new_devs}" == "" ]]; then
+			num_devs=0
+		fi
+		if [[ ${num_devs} -gt 1 ]]; then
+			echo "error: too many new devices detected! aborting..."
+			exit 1
+		fi
+		if [[ ${num_devs} -eq 1 ]]; then
+			if [[ "${new_devs}" != "${mmc_dev}" ]]; then
+				if [[ "${mmc_dev}" != "" ]]; then
+					echo "error: block device name mismatch ${new_devs} != ${mmc_dev}"
+					echo "Reinsert device (to write to) into PC"
+				fi
+				mmc_dev=${new_devs}
+				continue
+			fi
+			echo "${init_devs}" | grep "${mmc_dev}" >/dev/null
+			if [[ $? -eq 0 ]]; then
+				init_devs="${devs}"
+				continue
+			fi
+			break
+		fi
+	done
+	# now inform the user
+	echo "Detected device at /dev/${mmc_dev}"
+fi
+
+if [ ${FLAGS_p1} -eq ${FLAGS_TRUE} ]; then
+	cd ${ANDROID_BUILD_TOP}/external/arm-trusted-firmware
+	CROSS_COMPILE=aarch64-linux-gnu- make PLAT=rk3399 DEBUG=0 ERROR_DEPRECATED=1 bl31
+	export BL31="${ANDROID_BUILD_TOP}/external/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf"
+	cd -
+fi
+
+cd ${ANDROID_BUILD_TOP}/external/u-boot
+
+if [ ${FLAGS_p2} -eq ${FLAGS_TRUE} ]; then
+	tmpfile=`mktemp`
+	bootenv=`mktemp`
+	cat > ${tmpfile} << "EOF"
+bootdelay=2
+baudrate=1500000
+scriptaddr=0x00500000
+boot_targets=mmc1 mmc0
+bootcmd=run distro_bootcmd
+distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
+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}
+EOF
+	${ANDROID_HOST_OUT}/bin/mkenvimage -s 32768 -o ${bootenv} - < ${tmpfile}
+fi
+
+if [ ${FLAGS_p1} -eq ${FLAGS_TRUE} ] || [ ${FLAGS_p3} -eq ${FLAGS_TRUE} ]; then
+	make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- rock-pi-4-rk3399_defconfig
+	if [ ${FLAGS_p1} -eq ${FLAGS_TRUE} ]; then
+		make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- -j`nproc`
+	fi
+	if [ ${FLAGS_p3} -eq ${FLAGS_TRUE} ]; then
+		make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb
+	fi
+	if [ ${FLAGS_p1} -eq ${FLAGS_TRUE} ]; then
+		idbloader=`mktemp`
+		${ANDROID_HOST_OUT}/bin/mkimage -n rk3399 -T rksd -d tpl/u-boot-tpl.bin ${idbloader}
+		cat spl/u-boot-spl.bin >> ${idbloader}
+	fi
+fi
+cd -
+
+if [ ${FLAGS_p5} -eq ${FLAGS_TRUE} ]; then
+	${ANDROID_BUILD_TOP}/kernel/tests/net/test/build_rootfs.sh -a arm64 -s buster -n ${IMAGE}
+	if [ $? -ne 0 ]; then
+		echo "error: failed to build rootfs. exiting..."
+		exit 1
+	fi
+	truncate -s +3G ${IMAGE}
+	e2fsck -f ${IMAGE}
+	resize2fs ${IMAGE}
+
+	mntdir=`mktemp -d`
+	mount ${IMAGE} ${mntdir}
+	if [ $? != 0 ]; then
+		echo "error: unable to mount ${IMAGE} ${mntdir}"
+		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
+mmc dev 0 0
+mmc read ${scriptaddr} 0x1fc0 0x40
+env import -b ${scriptaddr} 0x8000
+mw.b ${scriptaddr} 0 0x8000
+if dhcp ${scriptaddr} manifest.txt; then
+	setenv OldSha ${Sha}
+	setenv Sha
+	env import -t ${scriptaddr} 0x8000 ManifestVersion
+	if test "$ManifestVersion" = "1"; then
+		run manifest1
+	else
+		run manifestX
+	fi
+fi'
+setenv manifestX 'echo "***** ERROR: Unknown manifest version! *****";'
+setenv manifest1 '
+echo "Manifest version 1";
+env import -t ${scriptaddr} 0x8000
+if test "$Sha" != "$OldSha"; then
+	setenv serverip ${TftpServer}
+	setenv loadaddr 0x00200000
+	mmc dev 0 0;
+	file=$TplSplImg; offset=0x40; size=0x1f80; run tftpget1; setenv TplSplImg
+	file=$UbootItb;  offset=0x4000; size=0x2000; run tftpget1; setenv UbootItb
+	file=$TrustImg; offset=0x6000; size=0x2000; run tftpget1; setenv TrustImg
+	file=$RootfsImg; offset=0x8000; size=0; run tftpget1; setenv RootfsImg
+	file=$UbootEnv; offset=0x1fc0; size=0x40; run tftpget1; setenv UbootEnv
+	mw.b ${scriptaddr} 0 0x8000
+	env export -b ${scriptaddr} 0x8000
+	mmc write ${scriptaddr} 0x1fc0 0x40
+else
+	echo "Already have ${Sha}. Booting..."
+fi'
+setenv tftpget1 "
+mw.b ${loadaddr} 0 0x400000
+&& tftp ${file}
+&& isGz=0 && setexpr isGz sub .*\\.gz\$ 1 ${file}
+&& if test $isGz = 1; then
+	setexpr boffset ${offset} * 0x200
+	&& gzwrite mmc 0 ${loadaddr} 0x${filesize} 100000 ${boffset}
+	&& echo Updated: ${bootfile}
+elif test ${file} = boot.env; then
+	env import -b ${loadaddr}
+	&& echo Updated: boot.env
+else
+	&& if test $size = 0; then
+		setexpr x $filesize - 1
+		&& setexpr x $x / 0x1000
+		&& setexpr x $x + 1
+		&& setexpr x $x * 0x1000
+		&& setexpr x $x / 0x200
+		&& size=0x${x}
+	fi
+	&& mmc write ${loadaddr} ${offset} ${size}
+	&& echo Updated: ${bootfile}
+fi
+|| echo ** UPDATE FAILED: ${bootfile} **"
+if mmc dev 1 0; then; else
+	run bootcmd_dhcp;
+fi
+load mmc ${devnum}:${distro_bootpart} 0x02080000 /boot/Image
+load mmc ${devnum}:${distro_bootpart} 0x04000000 /boot/uInitrd
+load mmc ${devnum}:${distro_bootpart} 0x01f00000 /boot/dtb/rockchip/rk3399-rock-pi-4.dtb
+setenv finduuid "part uuid mmc ${devnum}:${distro_bootpart} uuid"
+run finduuid
+setenv bootargs "earlycon=uart8250,mmio32,0xff1a0000 console=ttyS2,1500000n8 loglevel=7 root=PARTUUID=${uuid} rootwait rootfstype=ext4 sdhci.debug_quirks=0x20000000"
+booti 0x02080000 0x04000000 0x01f00000
+EOF
+	${ANDROID_HOST_OUT}/bin/mkimage \
+		-C none -A arm -T script -d ${mntdir}/boot/boot.cmd ${mntdir}/boot/boot.scr
+
+	cd ${KERNEL_DIR}
+	export PATH=${ANDROID_BUILD_TOP}/prebuilts/clang/host/linux-x86/clang-r353983c/bin:$PATH
+	export PATH=${ANDROID_BUILD_TOP}/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:$PATH
+	make ARCH=arm64 CC=clang CROSS_COMPILE=aarch64-linux-androidkernel- \
+	      CLANG_TRIPLE=aarch64-linux-gnu- rockpi4_defconfig
+	make ARCH=arm64 CC=clang CROSS_COMPILE=aarch64-linux-androidkernel- \
+	      CLANG_TRIPLE=aarch64-linux-gnu- -j`nproc`
+
+	cp ${KERNEL_DIR}/arch/arm64/boot/Image ${mntdir}/boot/
+	mkdir -p ${mntdir}/boot/dtb/rockchip/
+	cp ${KERNEL_DIR}/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtb ${mntdir}/boot/dtb/rockchip/
+	cd -
+
+	mount -o bind /proc ${mntdir}/proc
+	mount -o bind /sys ${mntdir}/sys
+	mount -o bind /dev ${mntdir}/dev
+
+	echo "Installing required packages..."
+	chroot ${mntdir} /bin/bash <<EOF
+apt-get update
+apt-get install -y -f initramfs-tools u-boot-tools network-manager openssh-server sudo man-db vim git dpkg-dev cdbs debhelper config-package-dev gdisk eject lzop binfmt-support ntpdate
+EOF
+
+	echo "Turning on DHCP client..."
+	cat >${mntdir}/etc/systemd/network/dhcp.network <<EOF
+[Match]
+Name=en*
+
+[Network]
+DHCP=yes
+EOF
+
+	chroot ${mntdir} /bin/bash << "EOT"
+echo "Adding user vsoc-01 and groups..."
+useradd -m -G kvm,sudo -d /home/vsoc-01 --shell /bin/bash vsoc-01
+echo -e "cuttlefish\ncuttlefish" | passwd
+echo -e "cuttlefish\ncuttlefish" | passwd vsoc-01
+EOT
+
+	echo "Cloning android-cuttlefish..."
+	cd ${mntdir}/home/vsoc-01
+	git clone https://github.com/google/android-cuttlefish.git
+	cd -
+
+	echo "Creating led script..."
+	cat > ${mntdir}/usr/local/bin/led << "EOF"
+#!/bin/bash
+
+if [ "$1" == "--start" ]; then
+	echo 125 > /sys/class/gpio/export
+	echo out > /sys/class/gpio/gpio125/direction
+	chmod 666 /sys/class/gpio/gpio125/value
+	echo 0 > /sys/class/gpio/gpio125/value
+	exit 0
+fi
+
+if [ "$1" == "--stop" ]; then
+	echo 0 > /sys/class/gpio/gpio125/value
+	echo 125 > /sys/class/gpio/unexport
+	exit 0
+fi
+
+if [ ! -e /sys/class/gpio/gpio125/value ]; then
+	echo "error: led service not initialized"
+	exit 1
+fi
+
+if [ "$1" == "0" ] || [ "$1" == "off" ] || [ "$1" == "OFF" ]; then
+	echo 0 > /sys/class/gpio/gpio125/value
+	exit 0
+fi
+
+if [ "$1" == "1" ] || [ "$1" == "on" ] || [ "$1" == "ON" ]; then
+	echo 1 > /sys/class/gpio/gpio125/value
+	exit 0
+fi
+
+echo "usage: led <0|1>"
+exit 1
+EOF
+	chown root:root ${mntdir}/usr/local/bin/led
+	chmod 755 ${mntdir}/usr/local/bin/led
+
+	echo "Creating led service..."
+	cat > ${mntdir}/etc/systemd/system/led.service << EOF
+[Unit]
+ Description=led service
+ ConditionPathExists=/usr/local/bin/led
+
+[Service]
+ Type=oneshot
+ ExecStart=/usr/local/bin/led --start
+ ExecStop=/usr/local/bin/led --stop
+ RemainAfterExit=true
+ StandardOutput=journal
+
+[Install]
+ WantedBy=multi-user.target
+EOF
+
+	echo "Creating SD duplicator script..."
+	cat > ${mntdir}/usr/local/bin/sd-dupe << "EOF"
+#!/bin/bash
+led 0
+
+src_dev=mmcblk0
+dest_dev=mmcblk1
+part_num=p5
+
+if [ -e /dev/mmcblk0p5 ]; then
+	led 1
+
+	sgdisk -Z -a1 /dev/${dest_dev}
+	sgdisk -a1 -n:1:64:8127 -t:1:8301 -c:1:loader1 /dev/${dest_dev}
+	sgdisk -a1 -n:2:8128:8191 -t:2:8301 -c:2:env /dev/${dest_dev}
+	sgdisk -a1 -n:3:16384:24575 -t:3:8301 -c:3:loader2 /dev/${dest_dev}
+	sgdisk -a1 -n:4:24576:32767 -t:4:8301 -c:4:trust /dev/${dest_dev}
+	sgdisk -a1 -n:5:32768:- -A:5:set:2 -t:5:8305 -c:5:rootfs /dev/${dest_dev}
+
+	src_block_count=`tune2fs -l /dev/${src_dev}${part_num} | grep "Block count:" | sed 's/.*: *//'`
+	src_block_size=`tune2fs -l /dev/${src_dev}${part_num} | grep "Block size:" | sed 's/.*: *//'`
+	src_fs_size=$(( src_block_count*src_block_size ))
+	src_fs_size_m=$(( src_fs_size / 1024 / 1024 + 1 ))
+
+	dd if=/dev/${src_dev}p1 of=/dev/${dest_dev}p1 conv=sync,noerror status=progress
+	dd if=/dev/${src_dev}p2 of=/dev/${dest_dev}p2 conv=sync,noerror status=progress
+	dd if=/dev/${src_dev}p3 of=/dev/${dest_dev}p3 conv=sync,noerror status=progress
+	dd if=/dev/${src_dev}p4 of=/dev/${dest_dev}p4 conv=sync,noerror status=progress
+
+	echo "Writing ${src_fs_size_m} MB: /dev/${src_dev} -> /dev/${dest_dev}..."
+	dd if=/dev/${src_dev}${part_num} of=/dev/${dest_dev}${part_num} bs=1M conv=sync,noerror status=progress
+
+	echo "Expanding /dev/${dest_dev}${part_num} filesystem..."
+	e2fsck -fy /dev/${dest_dev}${part_num}
+	resize2fs /dev/${dest_dev}${part_num}
+	tune2fs -O has_journal /dev/${dest_dev}${part_num}
+	e2fsck -fy /dev/${dest_dev}${part_num}
+	sync /dev/${dest_dev}
+
+	echo "Cleaning up..."
+	mount /dev/${dest_dev}${part_num} /media
+	chroot /media /usr/local/bin/install-cleanup
+
+	if [ $? == 0 ]; then
+		echo "Successfully copied Rock Pi image!"
+		while true; do
+			led 1; sleep 0.5
+			led 0; sleep 0.5
+		done
+	else
+		echo "Error while copying Rock Pi image"
+		while true; do
+			led 1; sleep 0.1
+			led 0; sleep 0.1
+		done
+	fi
+else
+	echo "Expanding /dev/${dest_dev}${part_num} filesystem..."
+	e2fsck -fy /dev/${dest_dev}${part_num}
+	resize2fs /dev/${dest_dev}${part_num}
+	tune2fs -O has_journal /dev/${dest_dev}${part_num}
+	e2fsck -fy /dev/${dest_dev}${part_num}
+	sync /dev/${dest_dev}
+
+	echo "Cleaning up..."
+	/usr/local/bin/install-cleanup
+fi
+EOF
+	chmod +x ${mntdir}/usr/local/bin/sd-dupe
+
+	echo "Creating SD duplicator service..."
+	cat > ${mntdir}/etc/systemd/system/sd-dupe.service << EOF
+[Unit]
+ Description=Duplicate SD card rootfs to eMMC on Rock Pi
+ ConditionPathExists=/usr/local/bin/sd-dupe
+ After=led.service
+
+[Service]
+ Type=simple
+ ExecStart=/usr/local/bin/sd-dupe
+ TimeoutSec=0
+ StandardOutput=tty
+
+[Install]
+ WantedBy=multi-user.target
+EOF
+
+	echo "Creating cleanup script..."
+	cat > ${mntdir}/usr/local/bin/install-cleanup << "EOF"
+#!/bin/bash
+echo "Installing cuttlefish-common package..."
+echo "nameserver 8.8.8.8" > /etc/resolv.conf
+MAC=`ip link | grep eth0 -A1 | grep ether | sed 's/.*\(..:..:..:..:..:..\) .*/\1/'`
+sed -i " 1 s/.*/& rockpi-${MAC}/" /etc/hosts
+sudo hostnamectl set-hostname "rockpi-${MAC}"
+
+dpkg --add-architecture amd64
+until ping -c1 ftp.debian.org; do sleep 1; done
+ntpdate time.google.com
+while true; do
+	apt-get -o Acquire::Check-Valid-Until=false update
+	if [ $? != 0 ]; then sleep 1; continue; fi
+	apt-get install -y -f libc6:amd64 qemu-user-static
+	if [ $? != 0 ]; then sleep 1; continue; fi
+	break
+done
+cd /home/vsoc-01/android-cuttlefish
+dpkg-buildpackage -d -uc -us
+apt-get install -y -f ../cuttlefish-common_*_arm64.deb
+apt-get clean
+usermod -aG cvdnetwork vsoc-01
+chmod 660 /dev/vhost-vsock
+chown root:cvdnetwork /dev/vhost-vsock
+
+rm /etc/machine-id
+rm /var/lib/dbus/machine-id
+dbus-uuidgen --ensure
+systemd-machine-id-setup
+
+systemctl disable sd-dupe
+rm /etc/systemd/system/sd-dupe.service
+rm /usr/local/bin/sd-dupe
+rm /usr/local/bin/install-cleanup
+EOF
+	chmod +x ${mntdir}/usr/local/bin/install-cleanup
+
+	chroot ${mntdir} /bin/bash << "EOT"
+echo "Enabling services..."
+systemctl enable led
+systemctl enable sd-dupe
+
+echo "Creating Initial Ramdisk..."
+update-initramfs -c -t -k "5.2.0"
+mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/initrd.img-5.2.0 /boot/uInitrd-5.2.0
+ln -s /boot/uInitrd-5.2.0 /boot/uInitrd
+EOT
+
+	umount ${mntdir}/sys
+	umount ${mntdir}/dev
+	umount ${mntdir}/proc
+	umount ${mntdir}
+
+	# Turn on journaling
+	tune2fs -O ^has_journal ${IMAGE}
+	e2fsck -fy ${IMAGE} >/dev/null 2>&1
+fi
+
+if [ ${USE_IMAGE} -eq 0 ]; then
+	# 32GB eMMC size
+	end_sector=61071326
+	device=/dev/${mmc_dev}
+	devicep=${device}
+
+	sgdisk -Z -a1 ${device}
+	sgdisk -a1 -n:1:64:8127 -t:1:8301 -c:1:loader1 ${device}
+	sgdisk -a1 -n:2:8128:8191 -t:2:8301 -c:2:env ${device}
+	sgdisk -a1 -n:3:16384:24575 -t:3:8301 -c:3:loader2 ${device}
+	sgdisk -a1 -n:4:24576:32767 -t:4:8301 -c:4:trust ${device}
+	sgdisk -a1 -n:5:32768:${end_sector} -A:5:set:2 -t:5:8305 -c:5:rootfs ${device}
+	if [ ${FLAGS_p5} -eq ${FLAGS_TRUE} ]; then
+		dd if=${IMAGE} of=${devicep}5 bs=1M
+		resize2fs ${devicep}5 >/dev/null 2>&1
+	fi
+else
+	device=$(losetup -f)
+	devicep=${device}p
+	if [ ${FLAGS_p5} -eq ${FLAGS_FALSE} ]; then
+		fs_end=3G
+		end_sector=-
+	fi
+	if [ ${FLAGS_p5} -eq ${FLAGS_TRUE} ]; then
+		# Minimize rootfs filesystem
+		while true; do
+			out=`sudo resize2fs -M ${IMAGE} 2>&1`
+			if [[ $out =~ "Nothing to do" ]]; then
+				break
+			fi
+		done
+		# Minimize rootfs file size
+		block_count=`sudo tune2fs -l ${IMAGE} | grep "Block count:" | sed 's/.*: *//'`
+		block_size=`sudo tune2fs -l ${IMAGE} | grep "Block size:" | sed 's/.*: *//'`
+		sector_size=512
+		start_sector=32768
+		fs_size=$(( block_count*block_size ))
+		fs_sectors=$(( fs_size/sector_size ))
+		part_sectors=$(( ((fs_sectors-1)/2048+1)*2048 ))  # 1MB-aligned
+		end_sector=$(( start_sector+part_sectors-1 ))
+		secondary_gpt_sectors=33
+		fs_end=$(( (end_sector+secondary_gpt_sectors+1)*sector_size ))
+		image_size=$(( part_sectors*sector_size ))
+		truncate -s ${image_size} ${IMAGE}
+		e2fsck -fy ${IMAGE} >/dev/null 2>&1
+	fi
+
+	# Create final image
+	if [ $OVERWRITE -eq 1 ]; then
+		tmpimg=${OVERWRITE_IMAGE}
+	else
+		tmpimg=`mktemp`
+	fi
+	truncate -s ${fs_end} ${tmpimg}
+
+	# Create GPT
+	sgdisk -Z -a1 ${tmpimg}
+	sgdisk -a1 -n:1:64:8127 -t:1:8301 -c:1:loader1 ${tmpimg}
+	sgdisk -a1 -n:2:8128:8191 -t:2:8301 -c:2:env ${tmpimg}
+	sgdisk -a1 -n:3:16384:24575 -t:3:8301 -c:3:loader2 ${tmpimg}
+	sgdisk -a1 -n:4:24576:32767 -t:4:8301 -c:4:trust ${tmpimg}
+	sgdisk -a1 -n:5:32768:${end_sector} -A:5:set:2 -t:5:8305 -c:5:rootfs ${tmpimg}
+
+	losetup ${device} ${tmpimg}
+	partx -v --add ${device}
+
+	if [ ${FLAGS_p5} -eq ${FLAGS_TRUE} ]; then
+		dd if=${IMAGE} of=${devicep}5 bs=1M
+	fi
+fi
+if [ ${FLAGS_p1} -eq ${FLAGS_TRUE} ]; then
+	dd if=${idbloader} of=${devicep}1
+fi
+if [ ${FLAGS_p2} -eq ${FLAGS_TRUE} ]; then
+	dd if=${bootenv} of=${devicep}2
+fi
+if [ ${FLAGS_p3} -eq ${FLAGS_TRUE} ]; then
+	dd if=${ANDROID_BUILD_TOP}/external/u-boot/u-boot.itb of=${devicep}3
+fi
+if [ ${USE_IMAGE} -eq 1 ]; then
+	chown $SUDO_USER:`id -ng $SUDO_USER` ${tmpimg}
+	if [ $OVERWRITE -eq 0 ]; then
+		mv ${tmpimg} ${IMAGE}
+	fi
+	partx -v --delete ${device}
+	losetup -d ${device}
+fi
diff --git a/tools/flash-blk-dev.sh b/tools/flash-blk-dev.sh
index 5f017b2..e5381e0 100755
--- a/tools/flash-blk-dev.sh
+++ b/tools/flash-blk-dev.sh
@@ -14,20 +14,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-source "${ANDROID_BUILD_TOP}/external/shflags/src/shflags"
+usage() {
+	echo "USAGE: $0 [flags] image"
+	echo "flags:"
+	echo "  -e,--expand:  expand filesystem to fill device (default: false)"
+	echo "  -h,--help:    show this help (default: false)"
+}
 
-DEFINE_boolean expand \
-  false "expand filesystem to fill device" "e"
-
-FLAGS_HELP="USAGE: $0 [flags] image"
-
-main ()
+main()
 {
-	image=$1
-	if [ "${image}" == "" ]; then
-		flags_help
-		exit 1
-	fi
 	if [ ! -e "${image}" ]; then
 		echo "error: can't find image. aborting..."
 		exit 1
@@ -96,7 +91,7 @@
 		exit 1
 	fi
 
-	if [ ${FLAGS_expand} -eq ${FLAGS_TRUE} ]; then
+	if [ ${expand} -eq 1 ]; then
 		echo "Expanding partition and filesystem..."
 		part_type=`sudo gdisk -l /dev/${blk_dev}  2>/dev/null | grep ": present" | sed 's/ *\([^:]*\):.*/\1/'`
 		if [ "$part_type" == "MBR" ]; then
@@ -116,6 +111,21 @@
 	sudo eject /dev/${blk_dev}
 }
 
-FLAGS "$@" || exit $?
-eval set -- "${FLAGS_ARGV}"
+expand=0
+if [ "$1" == "-e" ] || [ "$1" == "--expand" ]; then
+	expand=1
+	shift
+fi
+
+if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
+	usage
+	exit 0
+fi
+
+image=$1
+if [ "${image}" == "" ]; then
+	usage
+	exit 1
+fi
+
 main "$@"
diff --git a/tools/make_manifest.sh b/tools/make_manifest.sh
new file mode 100755
index 0000000..f3a1838
--- /dev/null
+++ b/tools/make_manifest.sh
@@ -0,0 +1,117 @@
+#!/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 loader1 \
+  "" "Path to loader1 image (partition 1)" "l"
+DEFINE_string env \
+  "" "Path to env image (partition 2)" "e"
+DEFINE_string loader2 \
+  "" "Path to loader2 image (partition 3)" "u"
+DEFINE_string trust \
+  "" "Path to trust image (partition 4)" "t"
+DEFINE_string rootfs \
+  "" "Path to rootfs image (partition 5)" "r"
+DEFINE_string tftp \
+  "192.168.0.1" "TFTP server address" "f"
+DEFINE_string tftpdir \
+  "/tftpboot" "TFTP server directory" "d"
+
+FLAGS_HELP="USAGE: $0 [flags]"
+
+FLAGS "$@" || exit $?
+eval set -- "${FLAGS_ARGV}"
+
+for arg in "$@" ; do
+	flags_help
+	exit 1
+done
+
+confirm() {
+    read -r -p "${1:-Are you sure you want to continue? [y/N]} " response
+    case "$response" in
+        [yY][eE][sS]|[yY])
+            true
+            ;;
+        *)
+            false
+            ;;
+    esac
+}
+
+createManifest() {
+if [ ! -e manifest.txt ]; then
+	cat > manifest.txt << EOF
+ManifestVersion=1
+EOF
+fi
+}
+
+addKVToManifest() {
+	key=$1
+	value=$2
+	grep -q "^${key}=" manifest.txt && \
+		sed -i "s/^${key}=.*/${key}=${value}/" manifest.txt || \
+		echo "${key}=${value}" >> manifest.txt
+}
+
+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}"
+}
+
+addPathToManifest() {
+	key=$1
+	path=$2
+
+	if [ "${path}" != "" ]; then
+		filename=$(basename $path)
+		filetype=`file -b --mime-type "${path}"`
+		if [ "$key" == "UbootEnv" ] && [ "${filetype}" == "application/gzip" ]; then
+			echo "error: gzip not supported for env images"
+		fi
+		if [ "$key" != "UbootEnv" ] && [ "${filetype}" != "application/gzip" ]; then
+			echo "warning: gzip recommended for all non-env images"
+			confirm || exit 1
+		fi
+		if [ ! "${path}" -ef "${FLAGS_tftpdir}/${filename}" ]; then
+			cp "${path}" "${FLAGS_tftpdir}/"
+		fi
+	else
+		unset filename
+	fi
+
+	addKVToManifest "${key}" "${filename}"
+}
+
+createManifest
+addKVToManifest TftpServer ${FLAGS_tftp}
+addPathToManifest RootfsImg ${FLAGS_rootfs}
+addPathToManifest UbootEnv ${FLAGS_env}
+addPathToManifest TplSplImg ${FLAGS_loader1}
+addPathToManifest UbootItb ${FLAGS_loader2}
+addSHAToManifest
diff --git a/tools/network-setup.sh b/tools/network-setup.sh
index 2913c0d..019c193 100755
--- a/tools/network-setup.sh
+++ b/tools/network-setup.sh
@@ -19,104 +19,141 @@
 	exit 1
 fi
 
+# escalate to superuser
+if [ "$UID" -ne 0 ]; then
+	exec sudo bash "$0"
+fi
+
+cleanup() {
+	echo "Starting up network-manager..."
+	service network-manager start
+	if [ $? != 0 ]; then
+		echo "error: failed to start network-manager"
+		exit 1
+	fi
+
+	echo "Starting up networking..."
+	service networking start
+	if [ $? != 0 ]; then
+		echo "error: failed to start networking"
+		exit 1
+	fi
+	if [ ! -z "$1" ]; then
+		exit $1
+	fi
+}
+
 sleep_time=0.1
+max_attempts=100
 DEFAULTNET=$1
 if [ "$DEFAULTNET" == "" ]; then
 	warn_no_default_network=0
-	warn_multiple_networks=0
 	warn_disconnect_rockpi=0
+	attempts=0
 	while true; do
-		DEFAULTNET=`ip link | grep "state UP" | sed 's/[0-9]*: \([^:]*\):.*/\1/'`
-		if [[ "${DEFAULTNET}" == "" ]]; then
+		NETLIST=`ip link | grep "state UP" | sed 's/[0-9]*: \([^:]*\):.*/\1/'`
+		if [[ "${NETLIST}" == "" ]]; then
 			if [[ $warn_no_default_network -eq 0 ]]; then
 				echo "error: couldn't detect any connected default network"
 				warn_no_default_network=1
-				warn_multiple_networks=0
 			fi
 			continue
-		elif [ `echo "$DEFAULTNET" | wc -l` -eq 1 ]; then
+		elif [ `echo "${NETLIST}" | wc -l` -eq 1 ]; then
+			DEFAULTNET=${NETLIST}
 			break
-		elif [ `echo "$DEFAULTNET" | wc -l` -ne 1 ]; then
+		elif [ `echo "${NETLIST}" | wc -l` -ne 1 ]; then
 			if [[ $warn_disconnect_rockpi -eq 0 ]]; then
 				echo "Please disconnect the network cable from the Rock Pi"
 				warn_disconnect_rockpi=1
 			fi
-			if [[ $warn_multiple_networks -eq 0 ]]; then
-				echo "error: detected multiple connected networks, not sure which to use as default:"
-				for net in $DEFAULTNET; do echo "    $net"; done
+			if [[ ${attempts} -gt ${max_attempts} ]]; then
+				echo -e "\nerror: detected multiple connected networks, please tell me what to do:"
+				count=1
+				for net in ${NETLIST}; do
+					echo "${count}) $net"
+					let count+=1
+				done
+				read -p "Enter the number of your default network connection: " num_default
+				count=1
+				for net in ${NETLIST}; do
+					if [ ${count} -eq ${num_default} ]; then
+						echo "Setting default to: ${net}"
+						DEFAULTNET=${net}
+					fi
+					let count+=1
+				done
 				warn_no_default_network=0
-				warn_multiple_networks=1
+				break
 			fi
+			echo -ne "\r"
+			printf "Manual configuration in %.1f seconds..." "$(( max_attempts-attempts ))e-1"
 			sleep $sleep_time
 		fi
+		let attempts+=1
 	done
 fi
-
-# escalate to superuser
-if [ "$UID" -ne 0 ]; then
-	exec sudo bash "$0" "${DEFAULTNET}"
-fi
-
 echo "Found default network at ${DEFAULTNET}"
-echo "Please reconnect network cable from Rock Pi to PC's spare network port"
 
-ROCKNETinit=`ip link | grep "state UP" | grep -v $DEFAULTNET | sed 's/[0-9]*: \([^:]*\):.*/\1/' | awk 'NF'`
-while true; do
-	ROCKNET=`ip link | grep "state UP" | grep -v $DEFAULTNET | sed 's/[0-9]*: \([^:]*\):.*/\1/' | awk 'NF'`
-	networks=`echo "$ROCKNET" | wc -l`
-	if [[ "${ROCKNET}" == "" ]]; then
-		continue
-	elif [ $networks -eq 1 ]; then
-		break
-	elif [ $networks -gt 1 ]; then
-		ROCKNET=`comm -3 <(echo "$ROCKNETinit" | sort) <(echo "$ROCKNET" | sort) | awk '{$1=$1};1'`
-		if [ "${ROCKNET}" != "" ]; then
+if [ "${ROCKNET}" == "" ]; then
+	echo "Please reconnect network cable from Rock Pi to PC's spare network port"
+	attempts=0
+	while true; do
+		NETLIST=`ip link | grep "state UP" | grep -v $DEFAULTNET | sed 's/[0-9]*: \([^:]*\):.*/\1/' | awk 'NF'`
+		networks=`echo "$NETLIST" | wc -l`
+		if [[ "${NETLIST}" == "" ]]; then
+			networks=0
+		fi
+		if [ $networks -eq 1 ]; then
+			ROCKNET=${NETLIST}
 			break
+		elif [ $networks -gt 1 ]; then
+			if [[ ${attempts} -gt ${max_attempts} ]]; then
+				echo -e "\nerror: detected multiple connected networks, please tell me what to do:"
+				count=1
+				for net in ${NETLIST}; do
+					echo "${count}) $net"
+					let count+=1
+				done
+				read -p "Enter the number of your rock pi network connection: " num_rockpi
+				count=1
+				for net in ${NETLIST}; do
+					if [ ${count} -eq ${num_rockpi} ]; then
+						echo "Setting rock pi to: ${net}"
+						ROCKNET=${net}
+					fi
+					let count+=1
+				done
+				break
+			fi
+			echo -ne "\r"
+			printf "Manual configuration in %.1f seconds..." "$(( max_attempts-attempts ))e-1"
+			let attempts+=1
 		fi
 		sleep $sleep_time
-	fi
-done
+	done
+fi
 echo "Found Rock Pi network at ${ROCKNET}"
 sudo ifconfig ${ROCKNET} down
 
-echo "Configuring udev rules..."
-cat >/etc/udev/rules.d/82-${ROCKNET}.rules <<EOF
-ACTION=="add", SUBSYSTEM=="net", KERNEL=="${ROCKNET}", ENV{NM_UNMANAGED}="1"
-EOF
+echo "Downloading dnsmasq..."
+apt-get install -d -y dnsmasq >/dev/null
 
-echo "Configuring network interface..."
-cat >/etc/network/interfaces.d/${ROCKNET}.conf <<EOF
-auto ${ROCKNET}
-iface ${ROCKNET} inet static
-	address 192.168.0.1
-	netmask 255.255.255.0
-EOF
-
-echo "Restarting network interface..."
-service network-manager restart
+echo "Shutting down network-manager to prevent interference..."
+service network-manager stop
 if [ $? != 0 ]; then
-	echo "error: failed to restart network-manager"
-	exit 1
-fi
-service networking restart
-if [ $? != 0 ]; then
-	echo "error: failed to restart networking"
-	exit 1
+	echo "error: failed to stop network-manager"
+	cleanup 1
 fi
 
-# Verify the Rock Pi was configured correctly
-ip link show ${ROCKNET} >/dev/null
+echo "Shutting down networking to prevent interference..."
+service networking stop
 if [ $? != 0 ]; then
-	echo "error: wasn't able to successfully configure connection to Rock Pi"
-	exit 1
+	echo "error: failed to stop networking"
+	cleanup 1
 fi
 
-# Check if dnsmasq is already installed
-dpkg -l | grep " dnsmasq " >/dev/null
-if [ $? != 0 ]; then
-	echo "Installing dnsmasq..."
-	apt-get install dnsmasq >/dev/null
-fi
+echo "Installing dnsmasq..."
+apt-get install dnsmasq >/dev/null
 
 echo "Enabling dnsmasq daemon..."
 cat /etc/default/dnsmasq | grep "ENABLED" >/dev/null
@@ -137,12 +174,18 @@
 dhcp-range=192.168.0.100,192.168.0.199
 EOF
 
-echo "Restarting dnsmasq service..."
-service dnsmasq restart
-if [ $? != 0 ]; then
-	echo "error: failed to restart dnsmasq"
-	exit 1
-fi
+echo "Configuring udev rules..."
+cat >/etc/udev/rules.d/82-${ROCKNET}.rules <<EOF
+ACTION=="add", SUBSYSTEM=="net", KERNEL=="${ROCKNET}", ENV{NM_UNMANAGED}="1"
+EOF
+
+echo "Configuring network interface..."
+cat >/etc/network/interfaces.d/${ROCKNET}.conf <<EOF
+auto ${ROCKNET}
+iface ${ROCKNET} inet static
+	address 192.168.0.1
+	netmask 255.255.255.0
+EOF
 
 echo "Enabling IP forwarding..."
 echo 1 >/proc/sys/net/ipv4/ip_forward
@@ -180,6 +223,22 @@
 sudo systemctl enable iptables-rockpi
 sudo systemctl start iptables-rockpi
 
+cleanup
+
+echo "Restarting dnsmasq service..."
+service dnsmasq restart
+if [ $? != 0 ]; then
+	echo "error: failed to restart dnsmasq"
+	exit 1
+fi
+
+# Verify the Rock Pi was configured correctly
+ip link show ${ROCKNET} >/dev/null
+if [ $? != 0 ]; then
+	echo "error: wasn't able to successfully configure connection to Rock Pi"
+	exit 1
+fi
+
 echo "Searching for Rock Pi's IP address..."
 while true; do
 	rockip=`cat /proc/net/arp | grep ${ROCKNET} | grep -v 00:00:00:00:00:00 | cut -d" " -f1`