Skip to content

Commit 8515bd1

Browse files
committed
Update
1 parent 2ceaa3c commit 8515bd1

6 files changed

Lines changed: 36 additions & 35 deletions

File tree

.github/workflows/android.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ jobs:
5959
echo -e "- ![Downloads](https://img.shields.io/github/downloads/Zenlua/Tool-Tree/V$VER/total?label=Downloads&color=%230072F4)\n- See version notes: [Changelog](https://zenlua.github.io/Tool-Tree/Version.html)" > change.txt
6060
if [ "$UPTG" == "true" ];then
6161
echo "Telegram"
62-
chat_tg="https://github.com/Zenlua/Tool-Tree/releases/tag/V$VER
62+
chat_tg="🎉 Release new version Tool-Tree
6363
64-
🎉 Release new version Tool-Tree
64+
https://github.com/Zenlua/Tool-Tree/releases/tag/V$VER
6565
6666
• Notes: <a href=\"https://zenlua.github.io/Tool-Tree/Version.html\">Changelog</a>
67-
• Version: $VER"
68-
# tooltree
67+
• Version: $VER
68+
69+
#release @tooltree"
70+
6971
curl -s -X POST "https://api.telegram.org/bot$TG_TOKEN/sendMessage" \
7072
-d chat_id="$CHAT_ID" -d parse_mode="HTML" \
7173
--data-urlencode text="$chat_tg"

Version.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# [Tool-Tree](https://zenlua.github.io/Tool-Tree)
22

3+
**Version: 1.4.4 (6-5-2026)**
4+
5+
+ Fix DTBO decoding errors, boot errors.
6+
37
**Version: 1.4.3 (3-5-2026)**
48

59
+ Fix some non-working features

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ android {
2121
targetSdkVersion 28
2222
versionCode Integer.parseInt(new java.text.SimpleDateFormat("yyMMddHH").format(new Date()))
2323
// versionCode 26021101
24-
versionName "1.4.3"
24+
versionName "1.4.4"
2525
}
2626
signingConfigs {
2727
release {

app/src/main/assets/home/bin/repack_img

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -212,25 +212,23 @@ elif [ "$partition" = "boot" ] || [ "$partition" = "vendor_boot" ]; then
212212
done
213213
# xây dựng dtb
214214
cd "$INPUT"
215-
for redts in $(ls -1d dts_*.+([0-9]) 2>/dev/null | sort -n -t . -k 2); do
215+
if [ "$(cat dts_* | checksum)" != "$(cat cache/md5_dts)" ]; then
216+
for redts in $(ls -1d dts_*.+([0-9]) 2>/dev/null | grep -v "\.bak$" | sort -n -t . -k 2); do
216217
nrep="${redts/dts_/}"
217-
if [ "$(checksum $redts)" == "$(cat cache/md5_$nrep)" ];then
218-
cp -f cache/${nrep} ${nrep}
219-
else
220218
echo "Build DTB: $redts"
221219
dtc -q -I dts -O dtb -@ -o ${nrep} $redts
222220
[ "$?" != 0 ] && killtree "Error: Build DTB"
223-
fi
224-
done
225-
for bdts in $(ls -1d cache/type_* 2>/dev/null); do
226-
nedts="${bdts/cache\/type_/}"
227-
tydbs="$(cat $bdts)"
228-
if [ "$tydbs" == 'dtb' ] || [ "$tydbs" == 'dtbo' ];then
229-
[ "$tydbs" == 'dtb' ] && merge_dtb.py $nedts $(ls -1d $nedts.* | sort -n -t . -k 2) >/dev/null
230-
[ "$tydbs" == 'dtbo' ] && dtbo create $nedts $(ls -1d $nedts.* | sort -n -t . -k 2) >/dev/null
231-
fi
232-
rm -f $nedts.*
233-
done
221+
done
222+
for bdts in $(ls -1d cache/type_* 2>/dev/null); do
223+
nedts="${bdts/cache\/type_/}"
224+
tydbs="$(cat $bdts)"
225+
if [ "$tydbs" == 'dtb' ] || [ "$tydbs" == 'dtbo' ];then
226+
[ "$tydbs" == 'dtb' ] && merge_dtb.py $nedts $(ls -1d $nedts.* | sort -n -t . -k 2) >/dev/null
227+
[ "$tydbs" == 'dtbo' ] && dtbo create $nedts $(ls -1d $nedts.* | sort -n -t . -k 2) >/dev/null
228+
fi
229+
rm -f $nedts.*
230+
done
231+
fi
234232
# xây dựng boot
235233
magiskboot repack "${INPUT##*/}.img" "$saved" 2>&1
236234
echo
@@ -243,20 +241,17 @@ elif [ "$partition" = "logo" ];then
243241
echo
244242
elif [ "$partition" = "dtbo" ];then
245243
cd "$INPUT"
246-
for dtbo in $(ls -1d dts.* | sort -n -t . -k 2); do
247-
if [ "$(checksum $dtbo)" == "$(cat cache/md5_$dtbo 2>/dev/null)" ];then
248-
echo "Copy raw: dtb.${dtbo##*.}"
249-
cp -f cache/dtb.${dtbo##*.} dtb.${dtbo##*.}
250-
else
244+
if [ "$(cat dts.* | checksum)" != "$(cat cache/md5_dts)" ]; then
245+
for dtbo in $(ls -1d dts.* | grep -v "\.bak$" | sort -n -t . -k 2); do
251246
echo "Build dtb: $dtbo"
252247
dtc -q -I dts -O dtb -@ -o dtb.${dtbo##*.} $dtbo
253248
[ "$?" != 0 ] && killtree "Error: Build dtb"
254-
fi
255-
done
256-
dtbo create dtbo.img $(ls -1d dtb.* | sort -n -t . -k 2) >/dev/null
249+
done
250+
dtbo create dtbo.img $(ls -1d dtb.* | sort -n -t . -k 2) >$TMP/dtbo_create.log
257251
rm -fr dtb.*
258-
cp -f dtbo.img "$saved"
259252
echo
253+
fi
254+
cp -f dtbo.img "$saved"
260255
elif [ "$partition" == "squashfs" ];then
261256
[ "$ROT" == 0 ] && killtree "Error build: squashfs, $root_warning_text"
262257
loai_nen="$(grep '^Compression' "$fs_options" | awk '{print $2}')"

app/src/main/assets/home/bin/unpack_img

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,17 +322,16 @@ mkdir -p "$in_name" $OUTPUT/config
322322
echo "$type_unp" > cache/type_$unp
323323
[ "$type_unp" == 'dtb' ] && split_dtb.py $unp >$TMP/split_dtb.log
324324
[ "$type_unp" == 'dtbo' ] && dtbo dump $unp -b $unp >$TMP/dtbo_boot.log
325-
rm $unp
326325
fi
327326
fi
328327
done
329328
for unsl in $(ls -1 *.[0-9]* 2>/dev/null | sort -n -t . -k 2); do
330329
echo "Decode: $unsl > dts_$unsl"
331330
dtc -q -@ -I dtb -O dts -o dts_$unsl $unsl
332331
[ "$?" != 0 ] && killtree "$unpack_text_5 $unsl"
333-
mv $unsl cache/$unsl
334-
checksum dts_$unsl > cache/md5_$unsl
332+
rm $unsl
335333
done
334+
cat dts_* | checksum > cache/md5_dts
336335
# unpack cpio
337336
for vch in $(ls -1d *.cpio vendor_ramdisk/*.cpio 2>/dev/null); do
338337
mkdir -p "${vch%.*}" "cache"
@@ -352,15 +351,16 @@ mkdir -p "$in_name" $OUTPUT/config
352351
elif [ "$dang_file" == 'dtbo' ];then
353352
echo "$dang_file" > $info
354353
cd "$in_name"
355-
dtbo dump "$file_img" -b dtb &>$TMP/dtbo.log
354+
cp -f "$file_img" "$in_name/dtbo.img"
355+
dtbo dump "$file_img" -b dtb >$TMP/dtbo_decode.log
356356
mkdir -p cache
357357
for dtbo in $(ls -t dtb.* | sort -n -t . -k 2);do
358358
echo "Decode: $dtbo"
359359
dtc -q -@ -I dtb -O dts -o dts.${dtbo##*.} $dtbo
360360
[ "$?" != 0 ] && killtree "$unpack_text_5 $dtbo"
361-
mv $dtbo cache/$dtbo
362-
checksum dts.${dtbo##*.} > cache/md5_dts.${dtbo##*.}
361+
rm $dtbo
363362
done
363+
cat dts.* | checksum > cache/md5_dts
364364
echo
365365
elif [ "$dang_file" == 'squashfs' ];then
366366
[ "$ROT" == 0 ] && killtree "Error Unpack: squashfs, $root_warning_text"
20.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)