BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
-BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
+BOARD_FLASH_BLOCK_SIZE := 266240 # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_VENDOR := vendor
TW_INCLUDE_NTFS_3G := true
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_EXCLUDE_SUPERSU := true
+TW_EXCLUDE_DEFAULT_USB_INIT := true
+TW_NO_USB_STORAGE := true
TW_SCREEN_BLANK_ON_BOOT := true
TW_INCLUDE_CRYPTO := true
\ No newline at end of file
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-on boot
+on fs
+ mount pstore pstore /sys/fs/pstore
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount configfs none /config
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}
- mkdir /config/usb_gadget/g1/functions/mass_storage.0
- mkdir /config/usb_gadget/g1/functions/mtp.gs0
- mkdir /config/usb_gadget/g1/functions/ptp.gs1
- mkdir /config/usb_gadget/g1/functions/accessory.gs2
- mkdir /config/usb_gadget/g1/functions/audio_source.gs2
- mkdir /config/usb_gadget/g1/functions/audio_source.gs3
- mkdir /config/usb_gadget/g1/functions/midi.gs5
mkdir /config/usb_gadget/g1/functions/ffs.adb
- mkdir /config/usb_gadget/g1/functions/diag.diag
- mkdir /config/usb_gadget/g1/functions/cser.dun.0
- mkdir /config/usb_gadget/g1/functions/cser.nmea.1
- mkdir /config/usb_gadget/g1/functions/gsi.rmnet
- mkdir /config/usb_gadget/g1/functions/gsi.rndis
- mkdir /config/usb_gadget/g1/functions/gsi.dpl
- mkdir /config/usb_gadget/g1/functions/qdss.qdss
- mkdir /config/usb_gadget/g1/functions/rndis_bam.rndis
- mkdir /config/usb_gadget/g1/functions/rmnet_bam.rmnet
- mkdir /config/usb_gadget/g1/functions/rmnet_bam.dpl
- mkdir /config/usb_gadget/g1/functions/ncm.0
- mkdir /config/usb_gadget/g1/functions/ccid.ccid
mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
- write /sys/class/android_usb/android0/f_ffs/aliases adb
on property:sys.usb.config=none
write /config/usb_gadget/g1/UDC "none"
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Recovery mode"
rm /config/usb_gadget/g1/configs/b.1/f1
rm /config/usb_gadget/g1/configs/b.1/f2
rm /config/usb_gadget/g1/configs/b.1/f3
rm /config/usb_gadget/g1/configs/b.1/f4
rm /config/usb_gadget/g1/configs/b.1/f5
- write /config/usb_gadget/g1/idVendor 0x18d1
- write /config/usb_gadget/g1/idProduct 0x4ee7
+ write /config/usb_gadget/g1/idVendor 0x18D1
+ write /config/usb_gadget/g1/idProduct 0xD001
+ write /config/usb_gadget/g1/strings/0x409/product "OnePlus"
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
+ write /config/usb_gadget/g1/UDC "a800000.dwc3"
on property:sys.usb.config=mtp
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp"
rm /config/usb_gadget/g1/configs/b.1/f3
rm /config/usb_gadget/g1/configs/b.1/f4
rm /config/usb_gadget/g1/configs/b.1/f5
- write /config/usb_gadget/g1/idVendor 0x2717
- write /config/usb_gadget/g1/idProduct 0xff40
+ write /config/usb_gadget/g1/idVendor 0x18D1
+ write /config/usb_gadget/g1/idProduct 0xD001
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
rm /config/usb_gadget/g1/configs/b.1/f3
rm /config/usb_gadget/g1/configs/b.1/f4
rm /config/usb_gadget/g1/configs/b.1/f5
- write /config/usb_gadget/g1/idVendor 0x2717
- write /config/usb_gadget/g1/idProduct 0xff48
+ write /config/usb_gadget/g1/idVendor 0x18D1
+ write /config/usb_gadget/g1/idProduct 0xD001
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
write /config/usb_gadget/g1/UDC ${sys.usb.controller}