more progress
This commit is contained in:
parent
fd101eb980
commit
0fb9132f71
32
bin/ghid.sh
Normal file
32
bin/ghid.sh
Normal file
@ -0,0 +1,32 @@
|
||||
#!/system/bin/sh
|
||||
# $1 setup
|
||||
controller=$(getprop sys.usb.controller)
|
||||
|
||||
remove_ghid() {
|
||||
rm /config/usb_gadget/g1/configs/b.1/fhid
|
||||
rmdir /config/usb_gadget/g1/functions/hid.usb0
|
||||
echo "$controller" >/config/usb_gadget/g1/UDC
|
||||
}
|
||||
|
||||
enable_ghid() {
|
||||
if [ ! -d /config/usb_gadget/g1/functions/hid.usb0 ]; then
|
||||
mkdir /config/usb_gadget/g1/functions/hid.usb0
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if [ "$1" != "setup"]; then
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
|
||||
case "$1" in
|
||||
""|"none" )
|
||||
remove_ghid
|
||||
;;
|
||||
* )
|
||||
enable_ghid
|
||||
;;
|
||||
esac
|
4
definitions/standard-keyboard
Normal file
4
definitions/standard-keyboard
Normal file
@ -0,0 +1,4 @@
|
||||
protocols="1"
|
||||
subclasses="1"
|
||||
report_lengths="1"
|
||||
report_names="keyboard-standard"
|
@ -3,4 +3,4 @@ name=ghid
|
||||
version=0
|
||||
versionCode=0
|
||||
author=lordwelch
|
||||
description=creates ghid device files in dev
|
||||
description=creates ghid device files in /dev
|
||||
|
Loading…
x
Reference in New Issue
Block a user