Add init.pantah.rc for Cheetah/Panther

Bug: 211568122
Change-Id: I0819b3a7fdda22acfbd2df3cbf752713a8b6fd23
This commit is contained in:
Cyan_Hsieh 2021-12-22 15:16:03 +08:00
parent 225d7e4aa7
commit 186d6a9157
5 changed files with 82 additions and 169 deletions

View file

@ -1,84 +1,6 @@
# Cloudripper specific init.rc # Cheetah specific init.rc
import /vendor/etc/init/hw/init.gs201.rc import /vendor/etc/init/hw/init.gs201.rc
import /vendor/etc/init/hw/init.pantah.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
on property:ro.boot.cdt_hwid=0x00030303000100010001000000000000 on property:ro.boot.cdt_hwid=0x00030303000100010001000000000000
setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf 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 on property:ro.boot.cdt_hwid=0x00030303000100000200000000000000
setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf 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 # Display
on property:graphics.display.kernel_idle_timer.enabled=true on property:graphics.display.kernel_idle_timer.enabled=true
# Enable aggressive idle mode switching # Enable aggressive idle mode switching

76
conf/init.pantah.rc Normal file
View file

@ -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

View file

@ -1,86 +1,3 @@
# Cloudripper specific init.rc # Panther specific init.rc
import /vendor/etc/init/hw/init.gs201.rc import /vendor/etc/init/hw/init.gs201.rc
import /vendor/etc/init/hw/init.pantah.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

View file

@ -37,6 +37,7 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.support_kernel_idle_tim
# Init files # Init files
PRODUCT_COPY_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 device/google/pantah/conf/init.cheetah.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.cheetah.rc
# Recovery files # Recovery files

View file

@ -34,6 +34,7 @@ $(call soong_config_set,google3a_config,target_device,panther)
# Init files # Init files
PRODUCT_COPY_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 device/google/pantah/conf/init.panther.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.panther.rc
# Recovery files # Recovery files