Compare commits
No commits in common. "5a965d05ace8ad15c3219ac4be8834503f34c2d1" and "92f41b38c4414e7396c1d231ca82fd910b651fdb" have entirely different histories.
5a965d05ac
...
92f41b38c4
5
build.sh
5
build.sh
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
rm *.zip 2>/dev/null
|
|
||||||
eval $(grep -v ' ' module.prop)
|
|
||||||
printf '%s\n' * | grep -v 'zip$' | xargs zip -r "magisk-$name-$version-$versionCode.zip"
|
|
||||||
adb push "magisk-$name-$version-$versionCode.zip" /sdcard/
|
|
@ -10,7 +10,6 @@ fi
|
|||||||
chmod 755 "$MODPATH/system/bin/ghid.sh"
|
chmod 755 "$MODPATH/system/bin/ghid.sh"
|
||||||
sed "s@\[MODDIR\]@$MODPATH@g" "$MODPATH/system/bin/ghid.sh" | sed 's/modules_update/modules/g' >"$TMPDIR/ghid.sh"
|
sed "s@\[MODDIR\]@$MODPATH@g" "$MODPATH/system/bin/ghid.sh" | sed 's/modules_update/modules/g' >"$TMPDIR/ghid.sh"
|
||||||
cp "$TMPDIR/ghid.sh" "$MODPATH/system/bin/ghid.sh"
|
cp "$TMPDIR/ghid.sh" "$MODPATH/system/bin/ghid.sh"
|
||||||
FILE_CONTEXTS=$(find /system -name plat_file_contexts 2>/dev/null | head -n 1)
|
|
||||||
|
|
||||||
. "$MODPATH/utils.sh"
|
. "$MODPATH/utils.sh"
|
||||||
. "$MODPATH/flash_script.sh"
|
. "$MODPATH/flash_script.sh"
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/dev/hidg[0-9]+ u:object_r:null_device:s0
|
|
@ -1,6 +1,6 @@
|
|||||||
id=ghid
|
id=ghid
|
||||||
name=ghid
|
name=ghid
|
||||||
version=0.12.44
|
version=0.11
|
||||||
versionCode=44
|
versionCode=38
|
||||||
author=lordwelch
|
author=lordwelch
|
||||||
description=creates ghid device files in /dev
|
description=creates ghid device files in /dev
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
|
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=* && property:sys.usb.configfs=1
|
||||||
exec u:r:magisk:s0 root root -- /system/bin/ghid.sh setup ${sys.usb.config}
|
exec u:r:magisk:s0 root root -- /system/bin/ghid.sh setup ${sys.usb.config}
|
||||||
|
start ghid
|
||||||
|
|
||||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.state=adb && property:sys.usb.configfs=1
|
service ghid /system/bin/ghid.sh setup ${sys.usb.config}
|
||||||
exec u:r:magisk:s0 root root -- /system/bin/ghid.sh fix ${sys.usb.config}
|
user root
|
||||||
|
disabled
|
||||||
|
oneshot
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
grep -v /dev/hidg $FILE_CONTEXTS
|
|
||||||
cat "$MODPATH/hidg_contexts"
|
|
||||||
} >"$MODPATH/system/etc/selinux/plat_file_contexts"
|
|
@ -11,8 +11,8 @@ set -o nohup
|
|||||||
set +o errexit
|
set +o errexit
|
||||||
set +o sh
|
set +o sh
|
||||||
set +o posix
|
set +o posix
|
||||||
exec >>$moddir/oghid.log
|
exec >>$moddir/ghid.log
|
||||||
exec 2>>$moddir/oghid.log
|
exec 2>>$moddir/ghid.log
|
||||||
|
|
||||||
remove_ghid() {
|
remove_ghid() {
|
||||||
echo "disabling ghid"
|
echo "disabling ghid"
|
||||||
@ -55,44 +55,24 @@ enable_ghid() {
|
|||||||
cd /config/usb_gadget/g1/configs/b.1/
|
cd /config/usb_gadget/g1/configs/b.1/
|
||||||
/data/adb/magisk/busybox ln -nsf ../../../../usb_gadget/g1/functions/hid.usb0 ./fhid
|
/data/adb/magisk/busybox ln -nsf ../../../../usb_gadget/g1/functions/hid.usb0 ./fhid
|
||||||
done
|
done
|
||||||
echo none >/config/usb_gadget/g1/UDC
|
# echo none >/config/usb_gadget/g1/UDC
|
||||||
echo "$controller" >/config/usb_gadget/g1/UDC
|
# echo "$controller" >/config/usb_gadget/g1/UDC
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo success ghid was run with: "$@"
|
echo success ghid was run with: "$@"
|
||||||
|
|
||||||
# if ! [[ "$1" == "setup" ]]; then
|
if ! [[ "$1" == "setup" ]]; then
|
||||||
# exit 1
|
exit 1
|
||||||
# fi
|
fi
|
||||||
# shift
|
shift
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"setup" )
|
|
||||||
shift
|
|
||||||
case "$1" in
|
|
||||||
""|"none" )
|
""|"none" )
|
||||||
remove_ghid
|
remove_ghid
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
enable_ghid
|
enable_ghid
|
||||||
;;
|
;;
|
||||||
esac
|
|
||||||
;;
|
|
||||||
"fix" )
|
|
||||||
shift
|
|
||||||
chcon u:object_r:null_device:s0 /dev/hidg*
|
|
||||||
chmod 666 /dev/hidg*
|
|
||||||
|
|
||||||
# sleep 5
|
|
||||||
chcon u:object_r:null_device:s0 /dev/hidg*
|
|
||||||
chmod 666 /dev/hidg*
|
|
||||||
ls -alZ /dev/hidg*
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
shift
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
exit 0
|
sh <<<'chcon u:object_r:null_device:s0 /dev/hidg*;chmod 666 /dev/hidg*;sleep 5;chcon u:object_r:null_device:s0 /dev/hidg*;chmod 666 /dev/hidg*;ls -alZ /dev/hidg*;' &
|
||||||
|
Loading…
x
Reference in New Issue
Block a user