Revert^2 "Refactor sdk_car_md_x86_64.mk""

Reland the CL with the fix, the original CL breaks the build, because
it refers to the board in vendor/auto/embedded_board/ which are not
visible in AOSP.
Changes them to the boards under device/generic/car

This reverts commit 169e413aa66430a8a129da9dccdba227109abb7c.

Bug: 278320718
Test: it builds
Change-Id: Ifb4e1871e004a36d0e40d1237a4de0b8cc98c7fa
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 7274fea..e84ad9f 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -25,6 +25,7 @@
     $(LOCAL_DIR)/gsi_car_x86_64.mk \
     $(LOCAL_DIR)/sdk_car_arm64.mk \
     $(LOCAL_DIR)/sdk_car_arm.mk \
+    $(LOCAL_DIR)/sdk_car_md_arm64.mk \
     $(LOCAL_DIR)/sdk_car_md_x86_64.mk \
     $(LOCAL_DIR)/sdk_car_portrait_x86_64.mk \
     $(LOCAL_DIR)/sdk_car_x86.mk \
diff --git a/common/car_md.mk b/common/car_md.mk
new file mode 100644
index 0000000..d0791f0
--- /dev/null
+++ b/common/car_md.mk
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2023 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 overwrites Android Emulator's default input devices for virtual displays in device/generic/goldfish/input/
+PRODUCT_COPY_FILES += \
+    device/generic/car/emulator/multi-display/input/virtio_input_multi_touch_7.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_7.idc \
+    device/generic/car/emulator/multi-display/input/virtio_input_multi_touch_8.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_8.idc \
+    device/generic/car/emulator/multi-display/input/virtio_input_multi_touch_9.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_9.idc
+
+PRODUCT_COPY_FILES += device/generic/car/common/config.ini.car_md:config.ini
+
+# Overrides Goldfish's default display settings
+PRODUCT_COPY_FILES += \
+    device/generic/car/emulator/multi-display/display_layout_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/displayconfig/display_layout_configuration.xml \
+    device/generic/car/emulator/multi-display/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml
+
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml
+
+PRODUCT_PACKAGE_OVERLAYS += \
+    device/generic/car/emulator/multi-display/overlay
+
+PRODUCT_COPY_FILES += \
+    device/generic/car/emulator/multi-display/car_audio_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/car_audio_configuration.xml
+
+# Use to disable cluster display definitions in aosp_car_emulator
+BUILD_EMULATOR_CLUSTER_DISPLAY := false
+
+PRODUCT_PRODUCT_PROPERTIES += \
+    hwservicemanager.external.displays=1,968,792,160,0,2,1408,792,160,0,3,1408,792,160,0 \
+    persist.service.bootanim.displays=4619827551948147201,4619827124781842690,4619827540095559171
+
+PRODUCT_PACKAGES += ClusterHomeSample ClusterOsDouble ClusterHomeSampleOverlay
+PRODUCT_PACKAGES += CarServiceOverlayEmulatorOsDouble CarServiceOverlayMdEmulatorOsDouble ClusterOsDoubleEmulatorPhysicalDisplayOverlay
+
+# Enable MZ audio by default
+PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+    ro.aae.simulateMultiZoneAudio=true \
+    persist.sys.max_profiles=5 \
+    com.android.car.internal.debug.num_auto_populated_users=1
+
+PRODUCT_PACKAGES += \
+    MultiDisplaySecondaryHomeTestLauncher \
+    MultiDisplayTest
+
+# enables the rro package for passenger(secondary) user.
+ENABLE_PASSENGER_SYSTEMUI_RRO := true
diff --git a/common/config.ini b/common/config.ini
index 4d7a3f5..8576698 100644
--- a/common/config.ini
+++ b/common/config.ini
@@ -1,14 +1,15 @@
 hw.audioInput=yes
-hw.lcd.density=120
+hw.lcd.density=160
 hw.cpu.ncore=6
 hw.gpu.enabled=yes
 hw.camera.back=none
 hw.camera.front=none
 hw.mainKeys=no
+hw.ramSize=4096
 hw.keyboard=yes
 skin.dynamic=yes
-skin.name=1080x600
-skin.path=1080x600
+skin.name=1408x792
+skin.path=1408x792
 disk.dataPartition.size=6G
 hw.accelerometer=yes
 hw.accelerometer_uncalibrated=yes
diff --git a/common/config.ini.car_md b/common/config.ini.car_md
new file mode 100644
index 0000000..74e6abe
--- /dev/null
+++ b/common/config.ini.car_md
@@ -0,0 +1,24 @@
+hw.audioInput=yes
+hw.lcd.density=160
+hw.cpu.ncore=6
+hw.gpu.enabled=yes
+hw.camera.back=none
+hw.camera.front=none
+hw.mainKeys=no
+hw.ramSize=6144
+hw.keyboard=yes
+skin.dynamic=yes
+skin.name=1848x792
+skin.path=1848x792
+disk.dataPartition.size=6G
+hw.accelerometer=yes
+hw.accelerometer_uncalibrated=yes
+hw.gyroscope=yes
+hw.sensors.light=no
+hw.sensors.pressure=no
+hw.sensors.humidity=no
+hw.sensors.proximity=no
+hw.sensors.magnetic_field=no
+hw.sensors.orientation=no
+hw.sensors.temperature=no
+hw.sensor.hinge=no
diff --git a/sdk_car_md_arm64.mk b/sdk_car_md_arm64.mk
new file mode 100644
index 0000000..a2131bd
--- /dev/null
+++ b/sdk_car_md_arm64.mk
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2023 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+$(call inherit-product, device/generic/car/common/car_md.mk)
+$(call inherit-product, device/generic/car/sdk_car_arm64.mk)
+
+# TODO(b/266978709): Set it to true after cleaning up the system partition
+# changes from this makefile
+PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := false
+
+PRODUCT_NAME := sdk_car_md_arm64
+PRODUCT_DEVICE := emulator_car64_arm64
+PRODUCT_BRAND := Android
+PRODUCT_MODEL := Car multi-display on arm64 emulator
diff --git a/sdk_car_md_x86_64.mk b/sdk_car_md_x86_64.mk
index 4b0c8de..7db6934 100644
--- a/sdk_car_md_x86_64.mk
+++ b/sdk_car_md_x86_64.mk
@@ -13,56 +13,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# this overwrites Android Emulator's default input devices for virtual displays in device/generic/goldfish/input/
-PRODUCT_COPY_FILES += \
-    device/generic/car/emulator/multi-display/input/virtio_input_multi_touch_7.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_7.idc \
-    device/generic/car/emulator/multi-display/input/virtio_input_multi_touch_8.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_8.idc \
-    device/generic/car/emulator/multi-display/input/virtio_input_multi_touch_9.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_9.idc
-
-# Overrides Goldfish's default display settings
-PRODUCT_COPY_FILES += \
-    device/generic/car/emulator/multi-display/display_layout_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/displayconfig/display_layout_configuration.xml \
-    device/generic/car/emulator/multi-display/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml
-
-PRODUCT_COPY_FILES += \
-    frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml
-
-PRODUCT_PACKAGE_OVERLAYS += \
-    device/generic/car/emulator/multi-display/overlay
-
-PRODUCT_COPY_FILES += \
-    device/generic/car/emulator/multi-display/car_audio_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/car_audio_configuration.xml
-
-# Use to disable cluster display definitions in aosp_car_emulator
-BUILD_EMULATOR_CLUSTER_DISPLAY := false
-
-PRODUCT_PRODUCT_PROPERTIES += \
-    hwservicemanager.external.displays=1,400,600,120,0,2,800,600,120,0,3,800,600,120,0 \
-    persist.service.bootanim.displays=4619827551948147201,4619827124781842690,4619827540095559171
-
-PRODUCT_PACKAGES += ClusterHomeSample ClusterOsDouble ClusterHomeSampleOverlay
-PRODUCT_PACKAGES += CarServiceOverlayEmulatorOsDouble CarServiceOverlayMdEmulatorOsDouble ClusterOsDoubleEmulatorPhysicalDisplayOverlay
-
-# Enable MZ audio by default
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
-    ro.aae.simulateMultiZoneAudio=true \
-    persist.sys.max_profiles=5 \
-    com.android.car.internal.debug.num_auto_populated_users=1
-
-PRODUCT_PACKAGES += \
-    MultiDisplaySecondaryHomeTestLauncher \
-    MultiDisplayTest
-
+$(call inherit-product, device/generic/car/common/car_md.mk)
 $(call inherit-product, device/generic/car/sdk_car_x86_64.mk)
 
 # TODO(b/266978709): Set it to true after cleaning up the system partition
 # changes from this makefile
 PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := false
 
-# enables the rro package for passenger(secondary) user.
-ENABLE_PASSENGER_SYSTEMUI_RRO := true
-
 PRODUCT_NAME := sdk_car_md_x86_64
-PRODUCT_DEVICE := emulator_car_x86_64
+PRODUCT_DEVICE := emulator_car64_x86_64
 PRODUCT_BRAND := Android
 PRODUCT_MODEL := Car multi-display on x86_64 emulator