From 1f9686745706c9592670f2836e2cec059f1bfe60 Mon Sep 17 00:00:00 2001 From: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com> Date: Sun, 15 Oct 2023 21:06:43 +0700 Subject: [PATCH] X6833B: Kang init usb recovery from yunluo Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com> --- device.mk | 3 ++- recovery/root/init.recovery.mt6789.rc | 8 -------- rootdir/Android.bp | 7 +++++++ rootdir/etc/init.recovery.usb.rc | 6 ++++++ 4 files changed, 15 insertions(+), 9 deletions(-) delete mode 100644 recovery/root/init.recovery.mt6789.rc create mode 100755 rootdir/etc/init.recovery.usb.rc diff --git a/device.mk b/device.mk index 964bd5b..1ba9ccb 100644 --- a/device.mk +++ b/device.mk @@ -71,7 +71,8 @@ PRODUCT_PACKAGES += \ # Init files PRODUCT_PACKAGES += \ - fstab.mt6789.vendor_ramdisk + fstab.mt6789.vendor_ramdisk \ + init.recovery.usb.rc # Include GSI keys $(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk) diff --git a/recovery/root/init.recovery.mt6789.rc b/recovery/root/init.recovery.mt6789.rc deleted file mode 100644 index 31c7ea4..0000000 --- a/recovery/root/init.recovery.mt6789.rc +++ /dev/null @@ -1,8 +0,0 @@ -on init - setprop sys.usb.configfs 1 - setprop sys.usb.controller "musb-hdrc" - setprop sys.usb.ffs.aio_compat 0 - -on fs - wait /dev/block/platform/bootdevice/ - symlink /dev/block/platform/bootdevice /dev/block/bootdevice diff --git a/rootdir/Android.bp b/rootdir/Android.bp index bbb638c..6df22bd 100644 --- a/rootdir/Android.bp +++ b/rootdir/Android.bp @@ -9,3 +9,10 @@ prebuilt_etc { src: "etc/fstab.mt6789", vendor_ramdisk_available: true } + +prebuilt_etc { + name: "init.recovery.usb.rc", + src: "etc/init.recovery.usb.rc", + recovery: true, + sub_dir: "init" +} diff --git a/rootdir/etc/init.recovery.usb.rc b/rootdir/etc/init.recovery.usb.rc new file mode 100755 index 0000000..9a91953 --- /dev/null +++ b/rootdir/etc/init.recovery.usb.rc @@ -0,0 +1,6 @@ +on init + setprop sys.usb.configfs 1 + setprop sys.usb.ffs.aio_compat 1 + setprop sys.usb.ffs.ready 1 + setprop sys.usb.controller "musb-hdrc" + setprop vendor.usb.controller "musb-hdrc"