diff --git a/conf/init.cheetah.rc b/conf/init.cheetah.rc index 8f47325..cac3384 100644 --- a/conf/init.cheetah.rc +++ b/conf/init.cheetah.rc @@ -1,84 +1,6 @@ -# Cloudripper specific init.rc +# Cheetah specific init.rc import /vendor/etc/init/hw/init.gs201.rc - -on init - # NFC streset tool name - setprop persist.vendor.nfc.streset libstreset21 - setprop persist.vendor.se.streset libstreset21 - -# When ro.build.flavor=factory_cheetah-userdebug, add vendor/bin/factory to default path -on init && property:ro.build.flavor=factory_cheetah-userdebug - export PATH /product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin:/vendor/bin/factory - -on early-boot - # Wait for insmod_sh to finish all common modules - wait_for_prop vendor.common.modules.ready 1 - start insmod_sh_cheetah - -service insmod_sh_cheetah /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.cheetah.cfg - class main - user root - group root system - disabled - oneshot - -on boot && property:ro.build.flavor=factory_cheetah-userdebug - # FTM log folder - mkdir /data/ftmlog 0775 system system - - # Audio test folder - mkdir /data/AudioTest 0775 system system - -on property:vendor.mfgapi.touchpanel.permission=1 - chmod 0600 /sys/devices/virtual/sec/tsp/cmd - chown system system /sys/devices/virtual/sec/tsp/cmd - -# Fingerprint -on post-fs-data - chown system system /dev/goodix_fp - exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g7.app - -# Overrides fingerprint antispoof if following persist sysprops are set -on boot && property:ro.build.type=userdebug && \ - property:persist.vendor.fingerprint.disable.fake.override=0 - setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override} - -on boot && property:ro.build.type=userdebug && \ - property:persist.vendor.fingerprint.disable.fake.override=1 - setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override} - -on boot && property:ro.build.type=userdebug && \ - property:persist.vendor.fingerprint.disable.fake.override=100 - setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override} - -# WiFi -on post-fs-data - setprop wifi.direct.interface p2p-dev-wlan0 - setprop wifi.aware.interface aware_nmi0 - - # Speaker amp permission - chmod 644 /mnt/vendor/persist/audio/speaker.cal - -service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ - -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1p2p_device=1 \ - -m/vendor/etc/wifi/p2p_supplicant.conf \ - -g@android:wpa_wlan0 -dd - interface android.hardware.wifi.supplicant@1.0::ISupplicant default - interface android.hardware.wifi.supplicant@1.1::ISupplicant default - interface android.hardware.wifi.supplicant@1.2::ISupplicant default - interface android.hardware.wifi.supplicant@1.3::ISupplicant default - interface android.hardware.wifi.supplicant@1.4::ISupplicant default - socket wpa_wlan0 dgram 660 wifi wifi - class main - disabled - oneshot - -# NFC -on property:ro.boot.hardware.revision=PROTO1.0 - setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf - -on property:ro.boot.hardware.revision=PROTO1.1 - setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf +import /vendor/etc/init/hw/init.pantah.rc on property:ro.boot.cdt_hwid=0x00030303000100010001000000000000 setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf @@ -92,10 +14,6 @@ on property:ro.boot.cdt_hwid=0x00030303000100000100000000000000 on property:ro.boot.cdt_hwid=0x00030303000100000200000000000000 setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf -# SecureElement eSE2 cts mode -on property:persist.vendor.se.ese2.mode=ctsmode - write /sys/class/st33spi/st33spi/st33spi_state 33 - # Display on property:graphics.display.kernel_idle_timer.enabled=true # Enable aggressive idle mode switching diff --git a/conf/init.pantah.rc b/conf/init.pantah.rc new file mode 100644 index 0000000..0977f65 --- /dev/null +++ b/conf/init.pantah.rc @@ -0,0 +1,76 @@ +# Cheetah/Panther specific init.rc + +on init + # NFC streset tool name + setprop persist.vendor.nfc.streset libstreset21 + setprop persist.vendor.se.streset libstreset21 + +on init && property:ro.vendor.factory=1 + import /vendor/etc/init/hw/init.factory.rc + +on early-boot + # Wait for insmod_sh to finish all common modules + wait_for_prop vendor.common.modules.ready 1 + start insmod_sh_pantah + +service insmod_sh_pantah /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.${ro.hardware}.cfg + class main + user root + group root system + disabled + oneshot + +on property:vendor.mfgapi.touchpanel.permission=1 + chmod 0600 /sys/devices/virtual/sec/tsp/cmd + chown system system /sys/devices/virtual/sec/tsp/cmd + +# Fingerprint +on post-fs-data + chown system system /dev/goodix_fp + exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g7.app + +# Overrides fingerprint antispoof if following persist sysprops are set +on boot && property:ro.build.type=userdebug && \ + property:persist.vendor.fingerprint.disable.fake.override=0 + setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override} + +on boot && property:ro.build.type=userdebug && \ + property:persist.vendor.fingerprint.disable.fake.override=1 + setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override} + +on boot && property:ro.build.type=userdebug && \ + property:persist.vendor.fingerprint.disable.fake.override=100 + setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override} + +# WiFi +on post-fs-data + setprop wifi.direct.interface p2p-dev-wlan0 + setprop wifi.aware.interface aware_nmi0 + + # Speaker amp permission + chmod 644 /mnt/vendor/persist/audio/speaker.cal + +service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ + -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1p2p_device=1 \ + -m/vendor/etc/wifi/p2p_supplicant.conf \ + -g@android:wpa_wlan0 -dd + interface android.hardware.wifi.supplicant@1.0::ISupplicant default + interface android.hardware.wifi.supplicant@1.1::ISupplicant default + interface android.hardware.wifi.supplicant@1.2::ISupplicant default + interface android.hardware.wifi.supplicant@1.3::ISupplicant default + interface android.hardware.wifi.supplicant@1.4::ISupplicant default + socket wpa_wlan0 dgram 660 wifi wifi + class main + disabled + oneshot + +# NFC +on property:ro.boot.hardware.revision=PROTO1.0 + setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf + +on property:ro.boot.hardware.revision=PROTO1.1 + setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf + +# SecureElement eSE2 cts mode +on property:persist.vendor.se.ese2.mode=ctsmode + write /sys/class/st33spi/st33spi/st33spi_state 33 diff --git a/conf/init.panther.rc b/conf/init.panther.rc index 51632dc..1a387b6 100644 --- a/conf/init.panther.rc +++ b/conf/init.panther.rc @@ -1,86 +1,3 @@ -# Cloudripper specific init.rc +# Panther specific init.rc import /vendor/etc/init/hw/init.gs201.rc - -on init - # NFC streset tool name - setprop persist.vendor.nfc.streset libstreset21 - setprop persist.vendor.se.streset libstreset21 - -# When ro.build.flavor=factory_panther-userdebug, add vendor/bin/factory to default path -on init && property:ro.build.flavor=factory_panther-userdebug - export PATH /product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin:/vendor/bin/factory - -on early-boot - # Wait for insmod_sh to finish all common modules - wait_for_prop vendor.common.modules.ready 1 - start insmod_sh_panther - -service insmod_sh_panther /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.panther.cfg - class main - user root - group root system - disabled - oneshot - -on boot && property:ro.build.flavor=factory_panther-userdebug - # FTM log folder - mkdir /data/ftmlog 0775 system system - - # Audio test folder - mkdir /data/AudioTest 0775 system system - -on property:vendor.mfgapi.touchpanel.permission=1 - chmod 0600 /sys/devices/virtual/sec/tsp/cmd - chown system system /sys/devices/virtual/sec/tsp/cmd - -# Fingerprint -on post-fs-data - chown system system /dev/goodix_fp - exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g7.app - -# Overrides fingerprint antispoof if following persist sysprops are set -on boot && property:ro.build.type=userdebug && \ - property:persist.vendor.fingerprint.disable.fake.override=0 - setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override} - -on boot && property:ro.build.type=userdebug && \ - property:persist.vendor.fingerprint.disable.fake.override=1 - setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override} - -on boot && property:ro.build.type=userdebug && \ - property:persist.vendor.fingerprint.disable.fake.override=100 - setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override} - -# WiFi -on post-fs-data - setprop wifi.direct.interface p2p-dev-wlan0 - setprop wifi.aware.interface aware_nmi0 - - # Speaker amp permission - chmod 644 /mnt/vendor/persist/audio/speaker.cal - -service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ - -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1p2p_device=1 \ - -m/vendor/etc/wifi/p2p_supplicant.conf \ - -g@android:wpa_wlan0 -dd - interface android.hardware.wifi.supplicant@1.0::ISupplicant default - interface android.hardware.wifi.supplicant@1.1::ISupplicant default - interface android.hardware.wifi.supplicant@1.2::ISupplicant default - interface android.hardware.wifi.supplicant@1.3::ISupplicant default - interface android.hardware.wifi.supplicant@1.4::ISupplicant default - socket wpa_wlan0 dgram 660 wifi wifi - class main - disabled - oneshot - -# NFC -on property:ro.boot.hardware.revision=PROTO1.0 - setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf - -on property:ro.boot.hardware.revision=PROTO1.1 - setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf - -# SecureElement eSE2 cts mode -on property:persist.vendor.se.ese2.mode=ctsmode - write /sys/class/st33spi/st33spi/st33spi_state 33 - +import /vendor/etc/init/hw/init.pantah.rc diff --git a/device-cheetah.mk b/device-cheetah.mk index ea08031..9c19cc0 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -37,6 +37,7 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.support_kernel_idle_tim # Init files PRODUCT_COPY_FILES += \ + device/google/pantah/conf/init.pantah.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.pantah.rc \ device/google/pantah/conf/init.cheetah.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.cheetah.rc # Recovery files diff --git a/device-panther.mk b/device-panther.mk index 36c1c09..329f613 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -34,6 +34,7 @@ $(call soong_config_set,google3a_config,target_device,panther) # Init files PRODUCT_COPY_FILES += \ + device/google/pantah/conf/init.pantah.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.pantah.rc \ device/google/pantah/conf/init.panther.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.panther.rc # Recovery files