From edf7eeaaeadba3e1c8c98aa9d83e54150edf6705 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Fri, 15 May 2020 12:29:42 +0200 Subject: [PATCH] exynos9610: copy init.recovery.exynos9610.rc Change-Id: I087ee7c3c6b7116bc9fce5e0ab6b20e6390c7a64 --- common.mk | 4 +++ configs/init/init.recovery.exynos9610.rc | 41 ++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 configs/init/init.recovery.exynos9610.rc diff --git a/common.mk b/common.mk index 02ec885..3d25afa 100644 --- a/common.mk +++ b/common.mk @@ -69,6 +69,10 @@ PRODUCT_AAPT_PREBUILT_DPI := xxxhdpi xxhdpi xhdpi hdpi PRODUCT_COPY_FILES += \ $(COMMON_PATH)/configs/privapp-permissions-hotword.xml:system/etc/permissions/privapp-permissions-hotword.xml +# init +PRODUCT_COPY_FILES += \ + $(COMMON_PATH)/configs/init/init.recovery.exynos9610.rc:$(TARGET_COPY_OUT_ROOT)/init.recovery.exynos9610.rc + # NFC PRODUCT_PACKAGES += \ NfcNci \ diff --git a/configs/init/init.recovery.exynos9610.rc b/configs/init/init.recovery.exynos9610.rc new file mode 100644 index 0000000..5884268 --- /dev/null +++ b/configs/init/init.recovery.exynos9610.rc @@ -0,0 +1,41 @@ +on init + write /proc/sys/kernel/hung_task_timeout_secs 0 + mount configfs none /config nodev noexec nosuid + mkdir /config/usb_gadget/g1 + mkdir /config/usb_gadget/g1/strings/0x409 + mkdir /config/usb_gadget/g1/configs/c.1 + mkdir /config/usb_gadget/g1/configs/c.1/strings/0x409 + mkdir /config/usb_gadget/g1/functions/mtp.mtp 0770 shell shell + mkdir /config/usb_gadget/g1/functions/ffs.adb 0770 shell shell + mkdir /dev/usb-ffs 0770 shell shell + mkdir /dev/usb-ffs/adb 0770 shell shell + mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 + setprop sys.usb.configfs 0 + restorecon_recursive /dev/usb-ffs/adb + +on fs + wait /dev/block/platform/${ro.boot.bootdevice} + symlink /dev/block/platform/${ro.boot.bootdevice} /dev/block/bootdevice + +on boot + + write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} + write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer} + write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model} + write /config/usb_gadget/g1/configs/c.1/strings/0x409/configuration "default" + write /config/usb_gadget/g1/configs/c.1/MaxPower 0x3f + write /config/usb_gadget/g1/bcdDevice "0x0409" + symlink /config/usb_gadget/g1/functions/mtp.mtp /config/usb_gadget/g1/configs/c.1/mtp.mtp + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/c.1/ffs.adb + write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1 + write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100" + write /config/usb_gadget/g1/os_desc/use 1 + symlink /config/usb_gadget/g1/configs/c.1 /config/usb_gadget/g1/os_desc/c.1 + +on property:sys.usb.ffs.ready=1 + write /sys/class/android_usb/android0/enable 0 + write /config/usb_gadget/g1/idProduct 0x2e81 + write /config/usb_gadget/g1/idVendor 0x22b8 + write /sys/class/android_usb/android0/functions adb + write /config/usb_gadget/g1/UDC "13200000.dwc3" + write /sys/class/android_usb/android0/enable 1 -- 2.20.1