summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ak3-core.sh25
1 files changed, 8 insertions, 17 deletions
diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh
index 0d58013..af32439 100755
--- a/tools/ak3-core.sh
+++ b/tools/ak3-core.sh
@@ -15,8 +15,7 @@ split_img=$home/split_img;
# ui_print "<text>" [...]
ui_print() {
until [ ! "$1" ]; do
- echo -e "ui_print $1
- ui_print" >> /proc/self/fd/$OUTFD;
+ echo -e "ui_print $1\nui_print" > /proc/self/fd/$OUTFD;
shift;
done;
}
@@ -244,7 +243,7 @@ flash_boot() {
varlist="name arch os type comp addr ep";
elif [ -f "$bin/mkbootimg" -a -f "$bin/unpackelf" -a -f boot.img-base ]; then
mv -f cmdline.txt boot.img-cmdline 2>/dev/null;
- varlist="cmdline base pagesize kernel_offset ramdisk_offset tags_offset";
+ varlist="cmdline base pagesize kerneloff ramdiskoff tagsoff";
fi;
for i in $varlist; do
if [ -f boot.img-$i ]; then
@@ -304,7 +303,7 @@ flash_boot() {
$bin/rkcrc -k $ramdisk $home/boot-new.img;
elif [ -f "$bin/mkbootimg" -a -f "$bin/unpackelf" -a -f boot.img-base ]; then
test "$dt" && dt="--dt $dt";
- $bin/mkbootimg --kernel $kernel --ramdisk $ramdisk --cmdline "$cmdline" --base $home --pagesize $pagesize --kernel_offset $kernel_offset --ramdisk_offset $ramdisk_offset --tags_offset "$tags_offset" $dt --output $home/boot-new.img;
+ $bin/mkbootimg --kernel $kernel --ramdisk $ramdisk --cmdline "$cmdline" --base $home --pagesize $pagesize --kernel_offset $kerneloff --ramdisk_offset $ramdiskoff --tags_offset "$tagsoff" $dt --output $home/boot-new.img;
else
test "$kernel" && cp -f $kernel kernel;
test "$ramdisk" && cp -f $ramdisk ramdisk.cpio;
@@ -319,7 +318,8 @@ flash_boot() {
magisk_patched=$?;
fi;
if [ $((magisk_patched & 3)) -eq 1 ]; then
- ui_print " " "Magisk detected! Patching kernel so reflashing Magisk is not necessary...";
+ ui_print " - Magisk detected! Patching kernel";
+ ui_print " so reflashing Magisk is not necessary...";
comp=$($bin/magiskboot decompress kernel 2>&1 | grep -v 'raw' | sed -n 's;.*\[\(.*\)\];\1;p');
($bin/magiskboot split $kernel || $bin/magiskboot decompress $kernel kernel) 2>/dev/null;
if [ $? != 0 -a "$comp" ]; then
@@ -327,9 +327,6 @@ flash_boot() {
$comp -dc $kernel > kernel;
fi;
$bin/magiskboot hexpatch kernel 736B69705F696E697472616D667300 77616E745F696E697472616D667300;
- if [ "$(file_getprop $home/anykernel.sh do.systemless)" == 1 ]; then
- strings kernel | grep -E 'Linux version.*#' > $home/vertmp;
- fi;
if [ "$comp" ]; then
$bin/magiskboot compress=$comp kernel kernel.$comp;
if [ $? != 0 ]; then
@@ -369,16 +366,16 @@ flash_boot() {
fi;
test $? != 0 && signfail=1;
fi;
- if [ -f "$bin/boot_signer-dexed.jar" -a -d "$bin/avb" ]; then
+ if [ -f "$bin/BootSignature_Android.jar" -a -d "$bin/avb" ]; then
pk8=$(ls $bin/avb/*.pk8);
cert=$(ls $bin/avb/*.x509.*);
case $block in
*recovery*|*SOS*) avbtype=recovery;;
*) avbtype=boot;;
esac;
- if [ "$(/system/bin/dalvikvm -Xnoimage-dex2oat -cp $bin/boot_signer-dexed.jar com.android.verity.BootSignature -verify boot.img 2>&1 | grep VALID)" ]; then
+ if [ "$(/system/bin/dalvikvm -Xnoimage-dex2oat -cp $bin/BootSignature_Android.jar com.android.verity.BootSignature -verify boot.img 2>&1 | grep VALID)" ]; then
echo "Signing with AVBv1..." >&2;
- /system/bin/dalvikvm -Xnoimage-dex2oat -cp $bin/boot_signer-dexed.jar com.android.verity.BootSignature /$avbtype boot-new.img $pk8 $cert boot-new-signed.img;
+ /system/bin/dalvikvm -Xnoimage-dex2oat -cp $bin/BootSignature_Android.jar com.android.verity.BootSignature /$avbtype boot-new.img $pk8 $cert boot-new-signed.img;
fi;
fi;
if [ $? != 0 -o "$signfail" ]; then
@@ -686,9 +683,6 @@ setup_ak() {
test "$slot" && slot=_$slot;
fi;
if [ "$slot" ]; then
- if [ -d /postinstall/tmp -a ! "$slot_select" ]; then
- slot_select=inactive;
- fi;
case $slot_select in
inactive)
case $slot in
@@ -753,9 +747,6 @@ setup_ak() {
fi;
;;
esac;
- if [ ! "$no_block_display" ]; then
- ui_print "$block";
- fi;
}
###