diff --git a/vehicle/2.0/default/tests/AccessControlConfigParser_test.cpp b/vehicle/2.0/default/tests/AccessControlConfigParser_test.cpp
index 92d7e39..5b09135 100644
--- a/vehicle/2.0/default/tests/AccessControlConfigParser_test.cpp
+++ b/vehicle/2.0/default/tests/AccessControlConfigParser_test.cpp
@@ -20,6 +20,7 @@
 #include <unordered_set>
 
 #include "vehicle_hal_manager/AccessControlConfigParser.h"
+#include <vehicle_hal_manager/VehicleUtils.h>
 
 namespace android {
 namespace hardware {
@@ -31,9 +32,9 @@
 class AccessControlConfigParserTest : public ::testing::Test {
 protected:
     void SetUp() override {
-        std::vector<VehicleProperty> supportedProperties {
-            VehicleProperty::HVAC_FAN_SPEED,
-            VehicleProperty::HVAC_FAN_DIRECTION,
+        std::vector<int32_t> supportedProperties {
+            toInt(VehicleProperty::HVAC_FAN_SPEED),
+            toInt(VehicleProperty::HVAC_FAN_DIRECTION),
         };
         parser.reset(new AccessControlConfigParser(supportedProperties));
     }
@@ -49,10 +50,10 @@
     ASSERT_TRUE(parser->parseFromStream(&file, &aclMap));
 
     ASSERT_EQ(1, aclMap.size());
-    auto it = aclMap.find(VehicleProperty::HVAC_FAN_SPEED);
+    auto it = aclMap.find(toInt(VehicleProperty::HVAC_FAN_SPEED));
     ASSERT_NE(aclMap.end(), it);
     ASSERT_EQ(VehiclePropertyAccess::READ_WRITE, it->second.access);
-    ASSERT_EQ(VehicleProperty::HVAC_FAN_SPEED, it->second.propId);
+    ASSERT_EQ(toInt(VehicleProperty::HVAC_FAN_SPEED), it->second.propId);
     ASSERT_EQ(1000u, it->second.uid);
 }
 
@@ -68,7 +69,7 @@
 
     ASSERT_TRUE(parser->parseFromStream(&file, &aclMap));
 
-    auto range = aclMap.equal_range(VehicleProperty::HVAC_FAN_SPEED);
+    auto range = aclMap.equal_range(toInt(VehicleProperty::HVAC_FAN_SPEED));
     for (auto it = range.first; it != range.second; ++it) {
         auto& acl = it->second;
 
@@ -92,10 +93,10 @@
     ASSERT_FALSE(parser->parseFromStream(&file, &aclMap));
 
     ASSERT_EQ(1, aclMap.size());
-    auto it = aclMap.find(VehicleProperty::HVAC_FAN_SPEED);
+    auto it = aclMap.find(toInt(VehicleProperty::HVAC_FAN_SPEED));
     ASSERT_NE(aclMap.end(), it);
     ASSERT_EQ(VehiclePropertyAccess::READ, it->second.access);
-    ASSERT_EQ(VehicleProperty::HVAC_FAN_SPEED, it->second.propId);
+    ASSERT_EQ(toInt(VehicleProperty::HVAC_FAN_SPEED), it->second.propId);
     ASSERT_EQ(0xbeef, it->second.uid);
 }
 
@@ -127,16 +128,16 @@
     ASSERT_TRUE(parser->parseFromStream(&configFile2, &aclMap));
     ASSERT_EQ(2, aclMap.size());
 
-    auto it = aclMap.find(VehicleProperty::HVAC_FAN_SPEED);
+    auto it = aclMap.find(toInt(VehicleProperty::HVAC_FAN_SPEED));
     ASSERT_NE(aclMap.end(), it);
     ASSERT_EQ(VehiclePropertyAccess::READ_WRITE, it->second.access);
-    ASSERT_EQ(VehicleProperty::HVAC_FAN_SPEED, it->second.propId);
+    ASSERT_EQ(toInt(VehicleProperty::HVAC_FAN_SPEED), it->second.propId);
     ASSERT_EQ(1000u, it->second.uid);
 
-    it = aclMap.find(VehicleProperty::HVAC_FAN_DIRECTION);
+    it = aclMap.find(toInt(VehicleProperty::HVAC_FAN_DIRECTION));
     ASSERT_NE(aclMap.end(), it);
     ASSERT_EQ(VehiclePropertyAccess::READ_WRITE, it->second.access);
-    ASSERT_EQ(VehicleProperty::HVAC_FAN_DIRECTION, it->second.propId);
+    ASSERT_EQ(toInt(VehicleProperty::HVAC_FAN_DIRECTION), it->second.propId);
     ASSERT_EQ(1004u, it->second.uid);
 }
 
diff --git a/vehicle/2.0/default/tests/SubscriptionManager_test.cpp b/vehicle/2.0/default/tests/SubscriptionManager_test.cpp
index 863142e..1b12bfd 100644
--- a/vehicle/2.0/default/tests/SubscriptionManager_test.cpp
+++ b/vehicle/2.0/default/tests/SubscriptionManager_test.cpp
@@ -36,8 +36,8 @@
 public:
     SubscriptionManager manager;
 
-    const VehicleProperty PROP1 = VehicleProperty::HVAC_FAN_SPEED;
-    const VehicleProperty PROP2 = VehicleProperty::DISPLAY_BRIGHTNESS;
+    static constexpr int32_t PROP1 = toInt(VehicleProperty::HVAC_FAN_SPEED);
+    static constexpr int32_t PROP2 = toInt(VehicleProperty::DISPLAY_BRIGHTNESS);
 
     sp<IVehicleCallback> cb1 = new MockedVehicleCallback();
     sp<IVehicleCallback> cb2 = new MockedVehicleCallback();
@@ -116,7 +116,7 @@
 
     // Wrong prop
     clients = manager.getSubscribedClients(
-            VehicleProperty::AP_POWER_BOOTUP_REASON,
+            toInt(VehicleProperty::AP_POWER_BOOTUP_REASON),
             toInt(VehicleAreaZone::ROW_1_LEFT),
             SubscribeFlags::HAL_EVENT);
     ASSERT_TRUE(clients.empty());
diff --git a/vehicle/2.0/default/tests/VehicleHalManager_test.cpp b/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
index dc32252..c20ab7f 100644
--- a/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
+++ b/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
@@ -52,7 +52,7 @@
              StatusCode* outStatus) override {
         *outStatus = StatusCode::OK;
         VehiclePropValuePtr pValue;
-        VehicleProperty property = requestedPropValue.prop;
+        auto property = static_cast<VehicleProperty>(requestedPropValue.prop);
         int32_t areaId = requestedPropValue.areaId;
 
         switch (property) {
@@ -76,7 +76,7 @@
                 pValue->value.stringValue = kCarMake;
                 break;
             default:
-                auto key = makeKey(property, areaId);
+                auto key = makeKey(toInt(property), areaId);
                 if (mValues.count(key) == 0) {
                     ALOGW("");
                 }
@@ -84,7 +84,7 @@
         }
 
         if (*outStatus == StatusCode::OK && pValue.get() != nullptr) {
-            pValue->prop = property;
+            pValue->prop = toInt(property);
             pValue->areaId = areaId;
             pValue->timestamp = elapsedRealtimeNano();
         }
@@ -93,7 +93,7 @@
     }
 
     StatusCode set(const VehiclePropValue& propValue) override {
-        if (VehicleProperty::MIRROR_FOLD == propValue.prop
+        if (toInt(VehicleProperty::MIRROR_FOLD) == propValue.prop
                 && mirrorFoldAttemptsLeft-- > 0) {
             return StatusCode::TRY_AGAIN;
         }
@@ -102,13 +102,13 @@
         return StatusCode::OK;
     }
 
-    StatusCode subscribe(VehicleProperty property,
-                       int32_t areas,
-                       float sampleRate) override {
+    StatusCode subscribe(int32_t property,
+                         int32_t areas,
+                         float sampleRate) override {
         return StatusCode::OK;
     }
 
-    StatusCode unsubscribe(VehicleProperty property) override {
+    StatusCode unsubscribe(int32_t property) override {
         return StatusCode::OK;
     }
 
@@ -116,8 +116,7 @@
         doHalEvent(std::move(value));
     }
 
-    void sendHalError(StatusCode error, VehicleProperty property,
-                      int32_t areaId) {
+    void sendHalError(StatusCode error, int32_t property, int32_t areaId) {
         doHalPropertySetError(error, property, areaId);
     }
 
@@ -130,7 +129,7 @@
         return makeKey(v.prop, v.areaId);
     }
 
-    int64_t makeKey(VehicleProperty prop, int32_t area) const {
+    int64_t makeKey(int32_t prop, int32_t area) const {
         return (static_cast<int64_t>(prop) << 32) | area;
     }
 
@@ -153,7 +152,7 @@
         hal.reset(nullptr);
     }
 public:
-    void invokeGet(VehicleProperty property, int32_t areaId) {
+    void invokeGet(int32_t property, int32_t areaId) {
         VehiclePropValue requestedValue {};
         requestedValue.prop = property;
         requestedValue.areaId = areaId;
@@ -174,7 +173,7 @@
             called = true;
         });
         ASSERT_TRUE(called) << "callback wasn't called for prop: "
-                            << enumToHexString(requestedPropValue.prop);
+                            << hexString(requestedPropValue.prop);
 
         actualValue = refValue;
         actualStatusCode = refStatus;
@@ -190,8 +189,9 @@
 };
 
 TEST_F(VehicleHalManagerTest, getPropConfigs) {
-    hidl_vec<VehicleProperty> properties =
-        { VehicleProperty::HVAC_FAN_SPEED, VehicleProperty::INFO_MAKE };
+    hidl_vec<int32_t> properties =
+        { toInt(VehicleProperty::HVAC_FAN_SPEED),
+          toInt(VehicleProperty::INFO_MAKE) };
     bool called = false;
 
     manager->getPropConfigs(properties,
@@ -205,7 +205,7 @@
     ASSERT_TRUE(called);  // Verify callback received.
 
     called = false;
-    manager->getPropConfigs({ VehicleProperty::HVAC_FAN_SPEED },
+    manager->getPropConfigs({ toInt(VehicleProperty::HVAC_FAN_SPEED) },
             [&called] (StatusCode status,
                        const hidl_vec<VehiclePropConfig>& c) {
         ASSERT_EQ(StatusCode::OK, status);
@@ -234,7 +234,7 @@
 }
 
 TEST_F(VehicleHalManagerTest, halErrorEvent) {
-    const VehicleProperty PROP = VehicleProperty::DISPLAY_BRIGHTNESS;
+    const auto PROP = toInt(VehicleProperty::DISPLAY_BRIGHTNESS);
 
     sp<MockedVehicleCallback> cb = new MockedVehicleCallback();
 
@@ -252,7 +252,7 @@
 }
 
 TEST_F(VehicleHalManagerTest, subscribe) {
-    const VehicleProperty PROP = VehicleProperty::DISPLAY_BRIGHTNESS;
+    const auto PROP = toInt(VehicleProperty::DISPLAY_BRIGHTNESS);
 
     sp<MockedVehicleCallback> cb = new MockedVehicleCallback();
 
@@ -267,7 +267,7 @@
     ASSERT_EQ(StatusCode::OK, res);
 
     auto unsubscribedValue = objectPool->obtain(VehiclePropertyType::INT32);
-    unsubscribedValue->prop = VehicleProperty::HVAC_FAN_SPEED;
+    unsubscribedValue->prop = toInt(VehicleProperty::HVAC_FAN_SPEED);
 
     hal->sendPropEvent(std::move(unsubscribedValue));
     auto& receivedEnvents = cb->getReceivedEvents();
@@ -293,7 +293,7 @@
 }
 
 TEST_F(VehicleHalManagerTest, subscribe_WriteOnly) {
-    const VehicleProperty PROP = VehicleProperty::HVAC_SEAT_TEMPERATURE;
+    const auto PROP = toInt(VehicleProperty::HVAC_SEAT_TEMPERATURE);
 
     sp<MockedVehicleCallback> cb = new MockedVehicleCallback();
 
@@ -317,10 +317,10 @@
 }
 
 TEST_F(VehicleHalManagerTest, get_Complex) {
-    invokeGet(VehicleProperty::VEHICLE_MAP_SERVICE, 0);
+    invokeGet(toInt(VehicleProperty::VEHICLE_MAP_SERVICE), 0);
 
     ASSERT_EQ(StatusCode::OK, actualStatusCode);
-    ASSERT_EQ(VehicleProperty::VEHICLE_MAP_SERVICE, actualValue.prop);
+    ASSERT_EQ(toInt(VehicleProperty::VEHICLE_MAP_SERVICE), actualValue.prop);
 
     ASSERT_EQ(3, actualValue.value.bytes.size());
     ASSERT_EQ(1, actualValue.value.bytes[0]);
@@ -343,20 +343,20 @@
 }
 
 TEST_F(VehicleHalManagerTest, get_StaticString) {
-    invokeGet(VehicleProperty::INFO_MAKE, 0);
+    invokeGet(toInt(VehicleProperty::INFO_MAKE), 0);
 
     ASSERT_EQ(StatusCode::OK, actualStatusCode);
-    ASSERT_EQ(VehicleProperty::INFO_MAKE, actualValue.prop);
+    ASSERT_EQ(toInt(VehicleProperty::INFO_MAKE), actualValue.prop);
     ASSERT_STREQ(kCarMake, actualValue.value.stringValue.c_str());
 }
 
 TEST_F(VehicleHalManagerTest, get_NegativeCases) {
     // Write-only property must fail.
-    invokeGet(VehicleProperty::HVAC_SEAT_TEMPERATURE, 0);
+    invokeGet(toInt(VehicleProperty::HVAC_SEAT_TEMPERATURE), 0);
     ASSERT_EQ(StatusCode::ACCESS_DENIED, actualStatusCode);
 
     // Unknown property must fail.
-    invokeGet(VehicleProperty::MIRROR_Z_MOVE, 0);
+    invokeGet(toInt(VehicleProperty::MIRROR_Z_MOVE), 0);
     ASSERT_EQ(StatusCode::INVALID_ARG, actualStatusCode);
 }
 
@@ -364,7 +364,7 @@
     actualStatusCode = StatusCode::TRY_AGAIN;
     int attempts = 0;
     while (StatusCode::TRY_AGAIN == actualStatusCode && ++attempts < 10) {
-        invokeGet(VehicleProperty::INFO_FUEL_CAPACITY, 0);
+        invokeGet(toInt(VehicleProperty::INFO_FUEL_CAPACITY), 0);
 
     }
     ASSERT_EQ(StatusCode::OK, actualStatusCode);
@@ -373,7 +373,7 @@
 }
 
 TEST_F(VehicleHalManagerTest, set_Basic) {
-    const auto PROP = VehicleProperty::DISPLAY_BRIGHTNESS;
+    const auto PROP = toInt(VehicleProperty::DISPLAY_BRIGHTNESS);
     const auto VAL = 7;
 
     auto expectedValue = hal->getValuePool()->obtainInt32(VAL);
@@ -390,7 +390,7 @@
 }
 
 TEST_F(VehicleHalManagerTest, set_DifferentAreas) {
-    const auto PROP = VehicleProperty::HVAC_FAN_SPEED;
+    const auto PROP = toInt(VehicleProperty::HVAC_FAN_SPEED);
     const auto VAL1 = 1;
     const auto VAL2 = 2;
     const auto AREA1 = toInt(VehicleAreaZone::ROW_1_LEFT);
@@ -426,7 +426,7 @@
 }
 
 TEST_F(VehicleHalManagerTest, set_Retriable) {
-    const auto PROP = VehicleProperty::MIRROR_FOLD;
+    const auto PROP = toInt(VehicleProperty::MIRROR_FOLD);
 
     auto v = hal->getValuePool()->obtainBoolean(true);
     v->prop = PROP;
diff --git a/vehicle/2.0/default/tests/VehicleHalTestUtils.h b/vehicle/2.0/default/tests/VehicleHalTestUtils.h
index 538c022..fab420a 100644
--- a/vehicle/2.0/default/tests/VehicleHalTestUtils.h
+++ b/vehicle/2.0/default/tests/VehicleHalTestUtils.h
@@ -29,14 +29,14 @@
 
 const VehiclePropConfig kVehicleProperties[] = {
     {
-        .prop = VehicleProperty::INFO_MAKE,
+        .prop = toInt(VehicleProperty::INFO_MAKE),
         .access = VehiclePropertyAccess::READ,
         .changeMode = VehiclePropertyChangeMode::STATIC,
         .configString = "Some=config,options=if,you=have_any",
     },
 
     {
-        .prop = VehicleProperty::HVAC_FAN_SPEED,
+        .prop = toInt(VehicleProperty::HVAC_FAN_SPEED),
         .access = VehiclePropertyAccess::READ_WRITE,
         .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
         .supportedAreas = static_cast<int32_t>(
@@ -56,7 +56,7 @@
 
     // Write-only property
     {
-        .prop = VehicleProperty::HVAC_SEAT_TEMPERATURE,
+        .prop = toInt(VehicleProperty::HVAC_SEAT_TEMPERATURE),
         .access = VehiclePropertyAccess::WRITE,
         .changeMode = VehiclePropertyChangeMode::ON_SET,
         .supportedAreas = static_cast<int32_t>(
@@ -75,7 +75,7 @@
     },
 
     {
-        .prop = VehicleProperty::INFO_FUEL_CAPACITY,
+        .prop = toInt(VehicleProperty::INFO_FUEL_CAPACITY),
         .access = VehiclePropertyAccess::READ,
         .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
         .areaConfigs = {
@@ -87,7 +87,7 @@
     },
 
     {
-        .prop = VehicleProperty::DISPLAY_BRIGHTNESS,
+        .prop = toInt(VehicleProperty::DISPLAY_BRIGHTNESS),
         .access = VehiclePropertyAccess::READ_WRITE,
         .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
         .areaConfigs = {
@@ -99,7 +99,7 @@
     },
 
     {
-        .prop = VehicleProperty::MIRROR_FOLD,
+        .prop = toInt(VehicleProperty::MIRROR_FOLD),
         .access = VehiclePropertyAccess::READ_WRITE,
         .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
 
@@ -107,7 +107,7 @@
 
     // Complex data type.
     {
-        .prop = VehicleProperty::VEHICLE_MAP_SERVICE,
+        .prop = toInt(VehicleProperty::VEHICLE_MAP_SERVICE),
         .access = VehiclePropertyAccess::READ_WRITE,
         .changeMode = VehiclePropertyChangeMode::ON_CHANGE
     }
@@ -134,7 +134,7 @@
         return Return<void>();
     }
     Return<void> onPropertySetError(StatusCode errorCode,
-                                    VehicleProperty propId,
+                                    int32_t propId,
                                     int32_t areaId) override {
         return Return<void>();
     }
@@ -218,7 +218,7 @@
 inline std::string toString(const VehiclePropValue &v) {
     std::stringstream ss;
     ss << "VehiclePropValue {n"
-       << "  prop: " << enumToHexString(v.prop) << ",\n"
+       << "  prop: " << hexString(v.prop) << ",\n"
        << "  areaId: " << hexString(v.areaId) << ",\n"
        << "  timestamp: " << v.timestamp << ",\n"
        << "  value {\n"
@@ -236,7 +236,7 @@
 inline std::string toString(const VehiclePropConfig &config) {
     std::stringstream ss;
     ss << "VehiclePropConfig {\n"
-       << "  prop: " << enumToHexString(config.prop) << ",\n"
+       << "  prop: " << hexString(config.prop) << ",\n"
        << "  supportedAreas: " << hexString(config.supportedAreas) << ",\n"
        << "  access: " << enumToHexString(config.access) << ",\n"
        << "  changeMode: " << enumToHexString(config.changeMode) << ",\n"
diff --git a/vehicle/2.0/default/tests/VehiclePropConfigIndex_test.cpp b/vehicle/2.0/default/tests/VehiclePropConfigIndex_test.cpp
index 28cdcbb..4e1daf8 100644
--- a/vehicle/2.0/default/tests/VehiclePropConfigIndex_test.cpp
+++ b/vehicle/2.0/default/tests/VehiclePropConfigIndex_test.cpp
@@ -43,11 +43,11 @@
 TEST_F(PropConfigTest, hasConfig) {
     VehiclePropConfigIndex index(configs);
 
-    ASSERT_TRUE(index.hasConfig(VehicleProperty::HVAC_FAN_SPEED));
-    ASSERT_TRUE(index.hasConfig(VehicleProperty::INFO_MAKE));
-    ASSERT_TRUE(index.hasConfig(VehicleProperty::INFO_FUEL_CAPACITY));
+    ASSERT_TRUE(index.hasConfig(toInt(VehicleProperty::HVAC_FAN_SPEED)));
+    ASSERT_TRUE(index.hasConfig(toInt(VehicleProperty::INFO_MAKE)));
+    ASSERT_TRUE(index.hasConfig(toInt(VehicleProperty::INFO_FUEL_CAPACITY)));
 
-    ASSERT_FALSE(index.hasConfig(VehicleProperty::INVALID));
+    ASSERT_FALSE(index.hasConfig(toInt(VehicleProperty::INVALID)));
 }
 
 TEST_F(PropConfigTest, getAllConfig) {
@@ -63,7 +63,7 @@
 
 TEST_F(PropConfigTest, getConfigs) {
     VehiclePropConfigIndex index(configs);
-    auto actualConfig = index.getConfig(VehicleProperty::HVAC_FAN_SPEED);
+    auto actualConfig = index.getConfig(toInt(VehicleProperty::HVAC_FAN_SPEED));
     ASSERT_EQ(toString(configs[1]), toString(actualConfig));
 }
 
