File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,9 +45,16 @@ magiskboot unpack "$BOOTIMAGE" >/dev/null 2>&1
4545 fi
4646fi
4747
48- if [ ! $( kptools -i kernel -f | grep CONFIG_KALLSYMS=y ) ] ; then
48+ if kptools -i kernel -f | grep -q " CONFIG_KPM=y " ; then
4949 echo " ! Patcher has Aborted."
50- echo " ! APatch requires CONFIG_KALLSYMS to be Enabled."
50+ echo " ! Detected built-in KPM (CONFIG_KPM=y)."
51+ echo " ! KPatch-Next is not compatible alongside built-in KPM."
52+ exit 1
53+ fi
54+
55+ if [ ! $( kptools -i kernel -f | grep CONFIG_KALLSYMS_ALL=y) ]; then
56+ echo " ! Patcher has Aborted."
57+ echo " ! KPatch-Next requires CONFIG_KALLSYMS_ALL to be Enabled."
5158 echo " ! But your kernel seems NOT enabled it."
5259 exit 1
5360fi
7481echo " - Repacking boot image"
7582magiskboot repack " $BOOTIMAGE " > /dev/null 2>&1
7683
77- if [ ! $( kptools -i kernel.ori -f | grep CONFIG_KALLSYMS_ALL=y) ]; then
78- echo " ! Detected CONFIG_KALLSYMS_ALL is not set!"
79- echo " ! APatch has patched but maybe your device won't boot."
80- echo " ! Make sure you have original boot image backup."
81- fi
82-
8384if [ $? -ne 0 ]; then
8485 >&2 echo " ! Repack error: $? "
8586 exit 1
You can’t perform that action at this time.
0 commit comments