Skip to content

Commit d71cbc5

Browse files
author
oneui
committed
new
1 parent c81f518 commit d71cbc5

File tree

3 files changed

+35
-34
lines changed

3 files changed

+35
-34
lines changed

resources/module_codes/cn/make_super.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function create_super_img {
2525
fi
2626

2727
# 定义额外的空间大小
28-
local extra_space=$((100 * 1024 * 1024 * 1024 / 100))
28+
local extra_space=$((2 * 1024 * 1024 * 1024 / 10))
2929

3030
# 根据分区类型调整 total_size 的值
3131
case "$partition_type" in

resources/module_codes/en/make_super.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function create_super_img {
2222
total_size=$((total_size + 4096 - remainder))
2323
fi
2424
# Define the size of the extra space
25-
local extra_space=$((100 * 1024 * 1024 * 1024 / 100))
25+
local extra_space=$((2 * 1024 * 1024 * 1024 / 10))
2626
# Adjust the total_size based on the partition type
2727
case "$partition_type" in
2828
"VAB")

resources/my_tools/flash_tool/FlashROM.bat

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
setlocal enabledelayedexpansion
33
:HOME
44

5-
REM 设置机型
5+
REM 设置机型
66
set "right_device=Model_code"
77

88
set "PATH=%PATH%;%cd%\bin\windows"
@@ -13,28 +13,28 @@ for /f "tokens=2 delims=:" %%a in ('chcp') do set "locale=%%a"
1313
cls
1414

1515
if "!locale!"==" 936" (
16-
set "confirm_switch={08}{\n}你确定要执行这个操作吗?{\n}{\n}如果确定,请输入 'sure',否则,输入任意以退出:{\n}{\n}"
17-
set "device_mismatch_msg=此 ROM 仅适配 !right_device! ,但你的设备是 !DeviceCode!"
18-
set "disabled_avb_verification=已禁用 Avb2.0 校验"
19-
set "exit_program={04}{\n}[4] {01}退出程序{#}{#}{\n}"
20-
set "execution_completed=执行完成,等待自动重启"
21-
set "failure_status=因为某些原因,未能刷入"
22-
set "fastboot_mode={06}当前所处状态:Fastboot 模式{\n}"
23-
set "fastbootd_mode={06}当前所处状态:Fastbootd 模式{\n}"
24-
set "format_data_flash={04}{\n}[2] {01}格式化用户数据并刷入{#}{#}{\n}"
25-
set "formatting_data=正在格式化 DATA"
26-
set "keep_data_flash={04}{\n}[1] {01}保留全部数据并刷入{#}{#}{\n}"
27-
set "kept_data_reboot=已保留全部数据,准备重启!"
16+
set "confirm_switch={08}{\n}你确定要执行这个操作吗?{\n}{\n}如果确定,请输入 'sure',否则,输入任意以退出:{\n}{\n}"
17+
set "device_mismatch_msg=此 ROM 仅适配 !right_device! ,但你的设备是 !DeviceCode!"
18+
set "disabled_avb_verification=已禁用 Avb2.0 校验"
19+
set "exit_program={04}{\n}[4] {01}退出程序{#}{#}{\n}"
20+
set "execution_completed=执行完成,等待自动重启"
21+
set "failure_status=因为某些原因,未能刷入"
22+
set "fastboot_mode={06}当前所处状态:Fastboot 模式{\n}"
23+
set "fastbootd_mode={06}当前所处状态:Fastbootd 模式{\n}"
24+
set "format_data_flash={04}{\n}[2] {01}格式化用户数据并刷入{#}{#}{\n}"
25+
set "formatting_data=正在格式化 DATA"
26+
set "keep_data_flash={04}{\n}[1] {01}保留全部数据并刷入{#}{#}{\n}"
27+
set "kept_data_reboot=已保留全部数据,准备重启!"
2828
set "one_title={F9} Powered By {F0}Garden Of Joy {#}{#}{\n}"
29-
set "retry_message=重试..."
30-
set "select_project={02}请选择你要操作的项目:{\n}{\n}"
31-
set "success_status=刷入成功"
32-
set "switch_to_fastboot={04}{\n}[3] {01}切换到 Fastboot 模式{#}{#}{\n}"
33-
set "switch_to_fastbootd={04}{\n}[3] {01}切换到 Fastbootd 模式{#}{#}{\n}"
34-
set "title=盾牌座 UY 线刷工具"
35-
set "waiting_device={0D}———— 正在等待设备 ————{#}{\n}{\n}"
29+
set "retry_message=重试..."
30+
set "select_project={02}请选择你要操作的项目:{\n}{\n}"
31+
set "success_status=刷入成功"
32+
set "switch_to_fastboot={04}{\n}[3] {01}切换到 Fastboot 模式{#}{#}{\n}"
33+
set "switch_to_fastbootd={04}{\n}[3] {01}切换到 Fastbootd 模式{#}{#}{\n}"
34+
set "title=盾牌座 UY 线刷工具"
35+
set "waiting_device={0D}———— 正在等待设备 ————{#}{\n}{\n}"
3636
) else (
37-
set "confirm_switch={08}{\n}Are you sure you want to perform this operation?{\n}{\n}If sure, please enter 'sure', otherwise, enter anything to exit:{\n}{\n}"
37+
set "confirm_switch={08}{\n}Are you sure you want to perform this operation?{\n}{\n}If sure, please enter 'sure', otherwise, enter anything to exit:{\n}{\n}"
3838
set "device_mismatch_msg=This ROM is only compatible with !right_device! , but your device is !DeviceCode!"
3939
set "disabled_avb_verification=Avb2.0 verification has been disabled"
4040
set "exit_program={04}{\n}[4] {01}Exit program{#}{#}{\n}"
@@ -48,39 +48,39 @@ if "!locale!"==" 936" (
4848
set "kept_data_reboot=All data has been kept, ready to reboot!"
4949
set "one_title={F9} Powered By {F0}Garden Of Joy {#}{#}{\n}"
5050
set "retry_message=Retry..."
51-
set "select_project={02}Please select the project you want to operate:{\n}{\n}"
51+
set "select_project={02}Please select the project you want to operate:{\n}{\n}"
5252
set "success_status=Flash successful"
5353
set "switch_to_fastboot={04}{\n}[3] {01}Switch to Fastboot mode{#}{#}{\n}"
5454
set "switch_to_fastbootd={04}{\n}[3] {01}Switch to Fastbootd mode{#}{#}{\n}"
5555
set "title=UY Scuti Flash Tool"
56-
set "waiting_device={0D}———— Waiting for device ————{#}{\n}{\n}"
56+
set "waiting_device={0D}———— Waiting for device ————{#}{\n}{\n}"
5757
)
5858

5959
title !title!
6060

61-
REM 显示等待设备的消息
61+
REM 显示等待设备的消息
6262
echo.
6363
cho !waiting_device!
6464

65-
REM 获取设备型号
65+
REM 获取设备型号
6666
for /f "tokens=2" %%a in ('fastboot getvar product 2^>^&1^|find "product"') do (
6767
set DeviceCode=%%a
6868
)
69-
REM 获取设备的分区类型
69+
REM 获取设备的分区类型
7070
for /f "tokens=2" %%a in ('fastboot getvar slot-count 2^>^&1^|find "slot-count" ') do (
7171
set DynamicPartitionType=%%a
7272
)
73-
REM 根据设备的分区类型设置变量 DynamicPartitionType 的值
73+
REM 根据设备的分区类型设置变量 DynamicPartitionType 的值
7474
if "!DynamicPartitionType!" == "2" (
7575
set DynamicPartitionType=NonOnlyA
7676
) else (
7777
set DynamicPartitionType=OnlyA
7878
)
79-
REM 获取设备的 Fastboot 状态
79+
REM 获取设备的 Fastboot 状态
8080
for /f "tokens=2" %%a in ('fastboot getvar is-userspace 2^>^&1^|find "is-userspace"') do (
8181
set FastbootState=%%a
8282
)
83-
REM 根据设备的 Fastboot 状态设置变量 FastbootState 的值
83+
REM 根据设备的 Fastboot 状态设置变量 FastbootState 的值
8484
if "!FastbootState!" == "yes" (
8585
set FastbootState=!fastbootd_mode!
8686
) else (
@@ -144,7 +144,7 @@ goto HOME&pause
144144
cls
145145
echo.
146146

147-
REM 对 vbmeta 分区文件专门刷入
147+
REM 对 vbmeta 分区文件专门刷入
148148
set "count=0"
149149
for /R "images\" %%i in (*.img) do (
150150
echo %%~ni | findstr /B "vbmeta" >nul && (
@@ -162,7 +162,7 @@ if !count! gtr 0 (
162162
echo.
163163
)
164164

165-
REM 遍历分区文件并刷入
165+
REM 遍历分区文件并刷入
166166
for /f "delims=" %%b in ('dir /b images\*.img ^| findstr /v /i "super.img" ^| findstr /v /i "preloader_raw.img" ^| findstr /v /i "cust.img" ^| findstr /v /i "recovery.img" ^| findstr /v /i /b "vbmeta"') do (
167167
set "filename=%%~nb"
168168
if "!DynamicPartitionType!"=="OnlyA" (
@@ -192,7 +192,7 @@ for /f "delims=" %%b in ('dir /b images\*.img ^| findstr /v /i "super.img" ^| fi
192192
)
193193
)
194194

195-
REM MTK 机型专属
195+
REM MTK 机型专属
196196
if exist "images\preloader_raw.img" (
197197
fastboot flash preloader_a "images\preloader_raw.img"
198198
fastboot flash preloader_b "images\preloader_raw.img"
@@ -207,6 +207,7 @@ if exist images\cust.img (
207207
)
208208

209209
if exist images\super.img (
210+
fastboot erase super
210211
fastboot flash super "images\super.img"
211212
echo.
212213
)

0 commit comments

Comments
 (0)