From 7f6ab4af057aa6d61597a73f4f0df96c3809839d Mon Sep 17 00:00:00 2001 From: fukiame Date: Thu, 9 Jul 2026 15:34:59 +0700 Subject: [PATCH] [TMP] Revert "Aerodactyl: Switch to hardware/mediatek chipinfo script" This reverts commit f683030ca503843c0298a1aca16e231936589112. --- Aerodactyl-vendor.mk | 2 ++ Android.bp | 8 +++++ proprietary/vendor/bin/chipinfo | 31 ++++++++++++++++++++ proprietary/vendor/etc/init/chipinfo_init.rc | 7 +++++ 4 files changed, 48 insertions(+) create mode 100755 proprietary/vendor/bin/chipinfo create mode 100644 proprietary/vendor/etc/init/chipinfo_init.rc diff --git a/Aerodactyl-vendor.mk b/Aerodactyl-vendor.mk index 2db4478..d3f3848 100644 --- a/Aerodactyl-vendor.mk +++ b/Aerodactyl-vendor.mk @@ -238,6 +238,7 @@ PRODUCT_COPY_FILES += \ vendor/nothing/Aerodactyl/proprietary/vendor/etc/init/android.hardware.neuralnetworks-shim-service-mtk.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/android.hardware.neuralnetworks-shim-service-mtk.rc \ vendor/nothing/Aerodactyl/proprietary/vendor/etc/init/android.hardware.security.keymint@2.0-service.trustonic.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/android.hardware.security.keymint@2.0-service.trustonic.rc \ vendor/nothing/Aerodactyl/proprietary/vendor/etc/init/camerahalserver.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/camerahalserver.rc \ + vendor/nothing/Aerodactyl/proprietary/vendor/etc/init/chipinfo_init.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/chipinfo_init.rc \ vendor/nothing/Aerodactyl/proprietary/vendor/etc/init/fuelgauged_init.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/fuelgauged_init.rc \ vendor/nothing/Aerodactyl/proprietary/vendor/etc/init/fuelgauged_nvram_init.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/fuelgauged_nvram_init.rc \ vendor/nothing/Aerodactyl/proprietary/vendor/etc/init/init.bip_ap.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.bip_ap.rc \ @@ -1152,6 +1153,7 @@ PRODUCT_PACKAGES += \ bip_ap \ ccci_mdinit \ ccci_rpcd \ + chipinfo \ conninfra_loader \ fuelgauged \ fuelgauged_nvram \ diff --git a/Android.bp b/Android.bp index fe2a271..7be9543 100644 --- a/Android.bp +++ b/Android.bp @@ -23912,6 +23912,14 @@ cc_prebuilt_binary { soc_specific: true, } +sh_binary { + name: "chipinfo", + owner: "nothing", + src: "proprietary/vendor/bin/chipinfo", + filename: "chipinfo", + soc_specific: true, +} + cc_prebuilt_binary { name: "conninfra_loader", owner: "nothing", diff --git a/proprietary/vendor/bin/chipinfo b/proprietary/vendor/bin/chipinfo new file mode 100755 index 0000000..914e7e3 --- /dev/null +++ b/proprietary/vendor/bin/chipinfo @@ -0,0 +1,31 @@ +#!/vendor/bin/sh + +default_fact_prop=$(getprop ro.soc.manufacturer) + +if [ "$default_fact_prop" == "" ]; then + fact_val=$(cat /sys/devices/soc0/family) + /vendor/bin/setprop ro.vendor.soc.manufacturer ${fact_val} +fi + +default_soc_prop=$(getprop ro.soc.model) + +if [ "$default_soc_prop" == "" ]; then + soc_val=$(cat /sys/devices/soc0/soc_id) + /vendor/bin/setprop ro.vendor.soc.model ${soc_val} +else + soc_val="$default_soc_prop" +fi + +soc_ext_val=$(cat /proc/device-tree/model-external-name 2>/dev/null) +if [ -z "$soc_ext_val" ]; then + soc_ext_val=${soc_val} +fi +/vendor/bin/setprop ro.vendor.soc.model.external_name ${soc_ext_val} + +soc_part_val=$(cat /proc/device-tree/model-part-name 2>/dev/null) +if [ -z "$soc_part_val" ]; then + soc_part_val=${soc_val} +fi +/vendor/bin/setprop ro.vendor.soc.model.part_name ${soc_part_val} + +/vendor/bin/setprop ro.vendor.soc.model_ready 1 diff --git a/proprietary/vendor/etc/init/chipinfo_init.rc b/proprietary/vendor/etc/init/chipinfo_init.rc new file mode 100644 index 0000000..708c1ef --- /dev/null +++ b/proprietary/vendor/etc/init/chipinfo_init.rc @@ -0,0 +1,7 @@ +on early-init + exec_background - system system -- /vendor/bin/chipinfo + +on post-fs-data + wait_for_prop ro.vendor.soc.model_ready 1 + setprop ro.soc.model ${ro.vendor.soc.model} + setprop ro.soc.manufacturer ${ro.vendor.soc.manufacturer} \ No newline at end of file