diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 26 |
1 files changed, 22 insertions, 4 deletions
@@ -1,6 +1,6 @@ CC=arm-linux-gnueabi-gcc -all: bin bin/kblightd +all: bin bin/kblightd bin/kblightd_magisk.zip clean: rm -rf bin @@ -11,16 +11,16 @@ bin: bin/kblightd: src/main.c src/keypress_thread.c src/light_thread.c src/backlight.c ${CC} -static $^ -o $@ -run_prep: +adb_prep: adb root -run: all run_prep +run: all adb_prep make kill adb push bin/kblightd /sbin/ adb shell "nohup /sbin/kblightd > /dev/null &" & -debug: all run_prep +debug: all adb_prep make kill adb push bin/kblightd /sbin/ @@ -28,3 +28,21 @@ debug: all run_prep kill: all adb shell -x pkill kblightd + +bin/kblightd_magisk.zip: bin bin/kblightd src/service.sh res/module.prop + mkdir -p bin/magisk + + cp -p bin/kblightd bin/magisk/ + cp -p src/service.sh bin/magisk + cp -p res/module.prop bin/magisk + + cd bin/magisk; zip -r ../../$@ . + +module: bin/kblightd_magisk.zip + +install: module adb_prep + adb push bin/kblightd_magisk.zip /sdcard/ + adb shell magisk --install-module /sdcard/kblightd_magisk.zip + adb shell rm /sdcard/kblightd_magisk.zip + + echo 'done!' |
