Skip to content

Commit 588ed5c

Browse files
committed
Upload file
1 parent 128147e commit 588ed5c

9 files changed

Lines changed: 60 additions & 60 deletions

File tree

pio/src/main/assets/home/bin/progress

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# Kakathic
22

3-
if [ -z "$shell_progres" ];then
4-
VALUE="$1"; CURRENT=${VALUE%/*}; TOTAL=${VALUE#*/}
5-
printf "\rprogress: %s" "$VALUE"
6-
if [ "$CURRENT" -ge "$TOTAL" ];then
7-
printf "\n"
8-
fi
9-
else
3+
if [ -n "$shell_progres" ];then
104
if [ "$2" ];then
115
bodem=0
126
while true; do
@@ -23,4 +17,10 @@ else
2317
else
2418
echo "For: progress 1/100"
2519
fi
26-
fi
20+
fi
21+
22+
#VALUE="$1"; CURRENT=${VALUE%/*}; TOTAL=${VALUE#*/}
23+
#printf "\rprogress: %s" "$VALUE"
24+
#if [ "$CURRENT" -ge "$TOTAL" ];then
25+
#printf "\n"
26+
#fi

pio/src/main/assets/home/bin/repack_img

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,12 @@ elif [ "$partition" == "f2fs" ];then
236236
if [ -f "$info_size" ] && [ "$(cat $info)" == "f2fs" ] && [ "$TTBUILDI" == 0 ];then
237237
size_real=$(cat $info_size 2>/dev/null);
238238
size_real="$(echo "$SAINEN * 1024 * 1024 + $size_real" | bc)"
239-
truncate -s $size_real "$saved"
240239
else
241240
size_orig="$(du -bs "$INPUT" | awk '{ print $1 }')"
242241
size_real="$(echo "($SAINEN + 6) * 1024 * 1024 + $size_orig" | bc)"
243-
truncate -s $size_real "$saved"
244242
fi
245-
if [ -f "$INPUT/${INPUT##*/}/build.prop" ];then
243+
truncate -s $size_real "$saved"
244+
if [ -f "$INPUT/system/build.prop" ];then
246245
mount_dir="/"
247246
cp -rf "$fs_config" "${fs_config}_s"
248247
cp -rf "$file_contexts" "${file_contexts}_s"
@@ -253,26 +252,22 @@ elif [ "$partition" == "f2fs" ];then
253252
else
254253
mount_dir="/${INPUT##*/}"
255254
fi
256-
echo "Partition size: ${size_real}b, $(coverbyte $size_real)"
257255
if [ "$TTBUILDI" == 0 ];then
258256
[ -f "$checkro" ] && f2fsrw=0 || f2fsrw=1
259257
fi
260258
[ -f "$TMP/make_f2fs.log" ] && rm -fr "$TMP/make_f2fs.log"
261259
if [ "$f2fsrw" == 1 ];then
262-
make_f2fs -g android -O compression -r -w 4096 -l "${INPUT##*/}" -f "$saved" $size_real || killtree "Error build make_f2fs, Suggestion: Increase free MB" "$saved"
263-
echo " "
264-
sload_f2fs -t "$mount_dir" -C "$fs_config" -s "$file_contexts" -T $time_build -f "$INPUT" -c "$saved" 2>$TMP/sload_f2fs.log | tee -a $TMP/sload_f2fs.log | sed -e "/Free segments:/d" -e "/Not enough space/d"
260+
make_f2fs -g android -O compression -r -w 4096 -l "${INPUT##*/}" -f "$saved" $size_real &>$TMP/make_f2fs.log || killtree "Error build make_f2fs, Suggestion: Increase free MB" "$saved"
261+
sload_f2fs -t "$mount_dir" -C "$fs_config" -s "$file_contexts" -T $time_build -f "$INPUT" -c "$saved" 2>&1 | tee $TMP/sload_f2fs.log | sed -e "/Free segments:/d" -e "/Not enough space/d"
265262
else
266-
make_f2fs -g android -O ro -r -w 4096 -l "${INPUT##*/}" -f "$saved" $size_real || killtree "Error build make_f2fs, Suggestion: Increase free MB" "$saved"
267-
echo " "
268-
sload_f2fs -t "$mount_dir" -C "$fs_config" -s "$file_contexts" -T $time_build -f "$INPUT" "$saved" 2>$TMP/sload_f2fs.log | tee -a $TMP/sload_f2fs.log | sed -e "/Free segments:/d" -e "/Not enough space/d"
263+
make_f2fs -g android -O ro -r -w 4096 -l "${INPUT##*/}" -f "$saved" $size_real &>$TMP/make_f2fs.log || killtree "Error build make_f2fs, Suggestion: Increase free MB" "$saved"
264+
sload_f2fs -t "$mount_dir" -C "$fs_config" -s "$file_contexts" -T $time_build -f "$INPUT" "$saved" 2>&1 | tee $TMP/sload_f2fs.log | sed -e "/Free segments:/d" -e "/Not enough space/d"
269265
fi
270266
[ "$(grep -cm1 'Done:' $TMP/sload_f2fs.log)" == 0 ] && killtree "Error build sload_f2fs, Suggestion: Increase free MB, log: $TMP/sload_f2fs.log" "$saved";
271-
[ -f "$INPUT/${INPUT##*/}/build.prop" ] && rm -fr "$file_contexts" "$fs_config"
267+
[ -f "$INPUT/system/build.prop" ] && rm -f "$file_contexts" "$fs_config"
272268
echo
273269
elif [ "$partition" == "ext" ];then
274270
[ "$DISATFS" == 1 ] || patch "$INPUT" "$fs_config" "$file_contexts" >/dev/null
275-
[ -f "$INPUT/${INPUT##*/}/build.prop" ] && mount_dir="/" || mount_dir="/${INPUT##*/}"
276271
size_real=$(cat $info_size 2>/dev/null);
277272
size_orig="$(du -sb "$INPUT" | awk '{ print $1 }')"
278273
if test "$size_orig" -le "52428800"; then
@@ -283,7 +278,7 @@ elif [ "$partition" == "ext" ];then
283278
if [ "$SAINEN" == 0 ] && [ "$(cat $info)" == "ext" ] && [ "$TTBUILDI" == 0 ];then
284279
if [ "$e2fsdroid" == 1 ];then
285280
size="$(echo "$size_real / 4096" | bc)";
286-
mke2fs -O ^has_journal,^quota,^project,^resize_inode -t ext4 -m 0 -b 4096 -I 256 -L "${INPUT##*/}" -M "$mount_dir" "$saved" $size 2>&1
281+
mke2fs -O ^has_journal -t ext4 -m 0 -b 4096 -I 256 -L "${INPUT##*/}" -M "/${INPUT##*/}" "$saved" $size 2>&1
287282
e2fsdroid -e -T $time_build -C "$fs_config" -S "$file_contexts" -f "$INPUT" -a "/${INPUT##*/}" "$saved" 2>$TMP/e2fsdroid_ext.log || killtree "Error build process e2fsdroid, log: $TMP/e2fsdroid_ext.log" "$saved"
288283
else
289284
make_ext4fs -J -T $time_build -L "${INPUT##*/}" -S "$file_contexts" -C "$fs_config" -l $size_real -a "/${INPUT##*/}" "$saved" "$INPUT" || killtree "Error build process make_ext4fs" "$saved" & process_count $size_real "$saved"
@@ -292,7 +287,7 @@ elif [ "$partition" == "ext" ];then
292287
else
293288
if [ "$e2fsdroid" == 1 ];then
294289
size="$(echo "$size_orig / 4096" | bc)";
295-
mke2fs -O ^has_journal,^quota,^project,^resize_inode -t ext4 -m 0 -b 4096 -I 256 -L "${INPUT##*/}" -M "$mount_dir" "$saved" $size 2>&1
290+
mke2fs -O ^has_journal -t ext4 -m 0 -b 4096 -I 256 -L "${INPUT##*/}" -M "/${INPUT##*/}" "$saved" $size 2>&1
296291
e2fsdroid -e -T $time_build -C "$fs_config" -S "$file_contexts" -f "$INPUT" -a "/${INPUT##*/}" "$saved" 2>$TMP/e2fsdroid_exts.log || killtree "Error build process e2fsdroid, log: $TMP/e2fsdroid_exts.log" "$saved"
297292
else
298293
make_ext4fs -J -T $time_build -L "${INPUT##*/}" -S "$file_contexts" -C "$fs_config" -l $size_orig -a "/${INPUT##*/}" "$saved" "$INPUT" || killtree "Error build process make_ext4fs" "$saved" & process_count $size_orig "$saved"

pio/src/main/assets/home/bin/unpack_img

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,14 @@ mkdir -p "$OUTPUT/${namepv##*/}" $OUTPUT/config
140140
fi
141141
#dump.f2fs -r -P -L -f -o "$OUTPUT/${namepv##*/}" "$file_img"
142142
mkdir -p "$TMP/${namepv##*/}"
143-
mount -v -r "$file_img" "$TMP/${namepv##*/}" &>$TMP/unpack_f2fs.log
144-
cp -af --preserve=all "$TMP/${namepv##*/}" "$OUTPUT" &>>$TMP/unpack_f2fs.log
143+
mount -r "$file_img" "$TMP/${namepv##*/}" &>$TMP/unpack_f2fs.log || {
144+
umount -f -l "$TMP/${namepv##*/}" &>>$TMP/unpack_f2fs.log
145+
rm -fr "$TMP/${namepv##*/}"
146+
killtree "Extracting f2fs failed, check log: $TMP/unpack_f2fs.log"
147+
}
145148
getfscontex.py "$TMP/${namepv##*/}" "$OUTPUT/config" >>$TMP/unpack_f2fs.log
146-
umount -v -f -l "$TMP/${namepv##*/}" &>>$TMP/unpack_f2fs.log
149+
busybox cp -af "$TMP/${namepv##*/}" "$OUTPUT"
150+
umount -f -l "$TMP/${namepv##*/}" &>>$TMP/unpack_f2fs.log
147151
rm -fr "$TMP/${namepv##*/}"
148152
echo "$(stat -c%s "$file_img")" > "$OUTPUT/config/${namepv##*/}_size.txt"
149153
echo "$dang_file" > "$OUTPUT/config/${namepv##*/}_info"
-648 Bytes
Binary file not shown.

pio/src/main/assets/home/etc/lang/default.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ dexopt_app_text_3="If this option is enabled, the application list above will ha
272272
framework_auto_text="Auto framework import"
273273

274274
# Tính năng
275-
feature_hide_text="Features On/Off"
275+
feature_hide_text="Hidden features on/off"
276276
use_apktool_text="Apktool editor"
277277
use_network_text="Data network usage required, to continue updating"
278278
root_warning_text="Please root the device to use this feature"

pio/src/main/assets/home/etc/lang/vi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ dexopt_app_text_3="Nếu bật lựa chọn này, mục danh sách ứng dụng
272272
framework_auto_text="Nhập framework tự động"
273273

274274
# Tính năng
275-
feature_hide_text="Bật/Tắt tính năng"
275+
feature_hide_text="Bật/Tắt tính năng ẩn"
276276
use_apktool_text="Trình chỉnh sửa Apktool"
277277
use_network_text="Yêu cầu sử dụng mạng dữ liệu, để tiếp tục cập nhật"
278278
root_warning_text="Vui lòng root để sử dụng tính năng"

pio/src/main/assets/home/etc/start-early.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/data/data/com.tool.tree/files/home/bin/bash
22

3+
source language 2>/dev/null
34
# Dọn dẹp tmp
45
rm -fr $TMPDIR/* $HOME/cache/* $START_DIR/cache/* $TEMP/documents $TEMP/WebView &
56

pio/src/main/assets/module/ZADD/add_features/index.sh

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,7 @@
44
# home
55
home(){ xml_print '
66
<group title="'$trans_text'">
7-
<action>
8-
<title>Unpack splitapp</title>
9-
<desc>'$splitapp_desc_text'</desc>
10-
<param name="FILE" label="'$select_text'" desc="'$input_text' .APP, '$folder_text' '$PTSD'" options-sh="cd $PTSD; ls *.app *.APP" required="true"/>
11-
<set>
12-
if [ -f "$FILE" ];then
13-
splitapp.py -f "$FILE" -o $PTSD/out
14-
echo
15-
echo "'$save_text': $PTSD/out"
16-
else
17-
echo "'$error_text' $FILE" >&2
18-
fi
19-
</set>
20-
</action>
21-
22-
<action>
23-
<title>Unpack pac</title>
24-
<desc>'$pac_desc_text'</desc>
25-
<param name="FILE" label="'$select_text'" desc="'$input_text' .pac, '$folder_text' '$PTSD'" options-sh="cd $PTSD; ls *.pac" required="true"/>
26-
<set>
27-
if [ -f "$FILE" ];then
28-
unpac.py extract -d $PTSD/out "$FILE"
29-
echo
30-
echo "'$save_text': $PTSD/out"
31-
else
32-
echo "'$error_text' $FILE" >&2
33-
fi
34-
</set>
35-
</action>
36-
</group>
37-
38-
<group><action warn="'$oat_text_1'§§'$oat_text_2' '$PTSH'">
7+
<action warn="'$oat_text_1'§§'$oat_text_2' '$PTSH'">
398
<title>'$oat_text_3'</title>
409
<desc>'$oat_text_4'</desc>
4110
<param name="framework_switch" value-sh="glog framework_switch 1" label="'$oat_text_5'" type="switch" />
@@ -115,7 +84,38 @@ done
11584
fi
11685
done
11786
</set>
118-
</action></group>'
87+
</action></group>
88+
89+
<group><action>
90+
<title>Unpack splitapp</title>
91+
<desc>'$splitapp_desc_text'</desc>
92+
<param name="FILE" label="'$select_text'" desc="'$input_text' .APP, '$folder_text' '$PTSD'" options-sh="cd $PTSD; ls *.app *.APP" required="true"/>
93+
<set>
94+
if [ -f "$FILE" ];then
95+
splitapp.py -f "$FILE" -o $PTSD/out
96+
echo
97+
echo "'$save_text': $PTSD/out"
98+
else
99+
echo "'$error_text' $FILE" >&2
100+
fi
101+
</set>
102+
</action>
103+
104+
<action>
105+
<title>Unpack pac</title>
106+
<desc>'$pac_desc_text'</desc>
107+
<param name="FILE" label="'$select_text'" desc="'$input_text' .pac, '$folder_text' '$PTSD'" options-sh="cd $PTSD; ls *.pac" required="true"/>
108+
<set>
109+
if [ -f "$FILE" ];then
110+
unpac.py extract -d $PTSD/out "$FILE"
111+
echo
112+
echo "'$save_text': $PTSD/out"
113+
else
114+
echo "'$error_text' $FILE" >&2
115+
fi
116+
</set>
117+
</action>
118+
</group>'
119119
}
120120

121121
# Thư mục hiện tại
1.9 MB
Binary file not shown.

0 commit comments

Comments
 (0)