-
Notifications
You must be signed in to change notification settings - Fork 14
/
enable-adb.sh.client
executable file
·25 lines (25 loc) · 2.07 KB
/
enable-adb.sh.client
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Note, you must run disable-avb2.sh first!
mount -o remount,rw /
echo "mkdir -p /dev/usb-ffs">/etc/init.d/S49usbgadget
echo "mkdir -p /dev/usb-ffs/adb">>/etc/init.d/S49usbgadget
echo "mount -t configfs none /sys/kernel/config/">>/etc/init.d/S49usbgadget
echo "mkdir -p /sys/kernel/config/usb_gadget/g1">>/etc/init.d/S49usbgadget
echo "echo 0x18d1 > /sys/kernel/config/usb_gadget/g1/idVendor">>/etc/init.d/S49usbgadget
echo "echo 0x4e40 > /sys/kernel/config/usb_gadget/g1/idProduct">>/etc/init.d/S49usbgadget
echo "echo 0x0223 > /sys/kernel/config/usb_gadget/g1/bcdDevice">>/etc/init.d/S49usbgadget
echo "echo 0x0200 > /sys/kernel/config/usb_gadget/g1/bcdUSB">>/etc/init.d/S49usbgadget
echo "mkdir -p /sys/kernel/config/usb_gadget/g1/strings/0x409">>/etc/init.d/S49usbgadget
echo "echo 123456 > /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber">>/etc/init.d/S49usbgadget
echo "echo Spotify > /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer">>/etc/init.d/S49usbgadget
echo "echo Superbird > /sys/kernel/config/usb_gadget/g1/strings/0x409/product">>/etc/init.d/S49usbgadget
echo "mkdir -p /sys/kernel/config/usb_gadget/g1/functions/ffs.adb">>/etc/init.d/S49usbgadget
echo "mkdir -p /sys/kernel/config/usb_gadget/g1/configs/b.1">>/etc/init.d/S49usbgadget
echo "mkdir -p /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409">>/etc/init.d/S49usbgadget
echo "echo 500 > /sys/kernel/config/usb_gadget/g1/configs/b.1/MaxPower">>/etc/init.d/S49usbgadget
echo "mount -t functionfs adb /dev/usb-ffs/adb">>/etc/init.d/S49usbgadget
echo "ln -s /sys/kernel/config/usb_gadget/g1/configs/b.1 /sys/kernel/config/usb_gadget/g1/os_desc/b.1">>/etc/init.d/S49usbgadget
echo "echo adb > /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409/configuration">>/etc/init.d/S49usbgadget
echo "ln -s /sys/kernel/config/usb_gadget/g1/functions/ffs.adb /sys/kernel/config/usb_gadget/g1/configs/b.1/f1">>/etc/init.d/S49usbgadget
echo "/usr/bin/adbd &">>/etc/init.d/S49usbgadget
echo "sleep 5s">>/etc/init.d/S49usbgadget
echo "echo ff400000.dwc2_a > /sys/kernel/config/usb_gadget/g1/UDC">>/etc/init.d/S49usbgadget