Skip to content

Commit 583eef9

Browse files
committed
Update
1 parent 0eef7e8 commit 583eef9

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

app/src/main/assets/home/bin/repack_super

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ echo "Lack of value" >&2
4242
show_help
4343
fi
4444

45-
[[ -z "$SUPGRUP" ]] && LVLNEN='qti_dynamic_partitions'
45+
[[ -z "$SUPGRUP" ]] && SUPGRUP='qti_dynamic_partitions'
4646
[[ -z "$SAIZESUP" ]] && SAIZESUP='8.5'
4747
[[ -z "$DANGIMG" ]] && DANGIMG='raw'
4848
[[ -z "$TYPEIMG" ]] && TYPEIMG='A'
@@ -52,27 +52,28 @@ super_sizek="$(echo "$SAIZESUP * 1024 * 1024 * 1024" | bc -l | cut -d. -f1)"
5252
echo "${sizes_text}: ${SAIZESUP} GB ➠ ${super_sizek} bytes"
5353
echo
5454

55-
argvs="-super-name super --metadata-size 65536 "
55+
argvs="--super-name super --metadata-size 65536 "
5656
cd "$INPUT"
5757

5858
if [ $TYPEIMG = "A" ];then
59-
argvs+="-metadata-slots 2 -device super:${super_sizek} --group ${SUPGRUP}:${super_sizek} "
59+
argvs+="--metadata-slots 2 --device super:${super_sizek} --group ${SUPGRUP}:${super_sizek} "
6060
fi
6161

6262
for i in $MIMGPA; do
6363
i1=$(echo "$i" | sed 's/.img//g')
6464
i2=$(echo "$i" | sed -e 's/_a.img//g' -e 's/_b.img//g' -e 's/.img//g')
6565
info=$(checktype "$INPUT/$i1.img")
66+
p_size=$(( ($(stat -c %s "$INPUT/$i1.img") + 4095) / 4096 * 4096 ))
6667
[ $info == "sparse" ] && simg2img "$INPUT/$i1.img"
67-
[ $TYPEIMG = "A" ] && argvs+="--partition ${i2}:readonly:$(stat -c %s "$INPUT/$i1.img"):${SUPGRUP} --image ${i2}=$i1.img "
68+
[ $TYPEIMG = "A" ] && argvs+="--partition ${i2}:readonly:$p_size:${SUPGRUP} --image ${i2}=$i1.img "
6869
if [ $TYPEIMG == "AB" ] || [ $TYPEIMG == "VAB" ];then
69-
ml1+="--partition ${i2}_a:readonly:$(stat -c %s "$INPUT/$i1.img"):${SUPGRUP}_a --image ${i2}_a=$i1.img "
70-
ml2+="--partition ${i2}_b:readonly:0:${SUPGRUP}_b "
70+
ml1+="--partition ${i2}_a:none:$p_size:${SUPGRUP}_a --image ${i2}_a=$i1.img "
71+
ml2+="--partition ${i2}_b:none:0:${SUPGRUP}_b "
7172
fi
7273
done
7374

7475
if [ $TYPEIMG = "AB" ] || [ $TYPEIMG = "VAB" ];then
75-
argvs+="-metadata-slots 3 -device super:${super_sizek} --group ${SUPGRUP}_a:${super_sizek} ${ml1} --group ${SUPGRUP}_b:${super_sizek} ${ml2} "
76+
argvs+="--metadata-slots 3 --device super:${super_sizek} --group ${SUPGRUP}_a:${super_sizek} ${ml1} --group ${SUPGRUP}_b:${super_sizek} ${ml2} "
7677
fi
7778
[ $TYPEIMG = "VAB" ] && argvs+="--virtual-ab "
7879
[ $DANGIMG = "sparse" ] && argvs+="--sparse "

0 commit comments

Comments
 (0)