[TOOL][RECOVERY][picasso] OFRP One-click Installation Tool

DumbHokage

Member
Jan 9, 2021
14
12
13
banner.png


OrangeFox Recovery Project One-click Installation Tool for Redmi K30 5G (picasso)

For easier OFRP recovery installation, this tool is created for those who want to have a much quicker recovery installing. If you can't install the OrangeFox recovery zip, you can use this 1-click installation tool, based on the wzsx150's tool
Pay respect to him for ripping-off TWRPs

Rich (BB code):
Features:
+ Support English, Vietnamese & Chinese
+ Support flashing in both Normal & Fastboot mode
+ Make sure to have installed adb & fastboot driver onto your device. If not, go here
+ Quick and easy CMD tool, based on wzsx150's script (actually deprecated)

I will not responsible for bricking devices, failed flashing on NOT following the installation instruction given on the tool.
Do not messing up by pointing your middle finger at us or we will laugh at you. Hard & a lot

Downloads (Updated 2021-Feb-24, GDrive):
For Android 10/Q v1.4
For Android 11/R v1.4
Older versions


Changelogs:​
Rich (BB code):
2021-Feb-24:
+ MTP & fastbootd fixing with full NTFS support for OTGs
+ Tool minor revamped

2021-Feb-14:
+ New build based on TWRP 3.5.0
+ Some improvements
+ According to the author, the recovery can now survived from flashing MIUI China ROM, but there's still
decryption problem with China ROM

2021-Jan-26:
+ Added Chinese support, but known display issue for some cases
+ Engish & Vietnamese are now combined into single file.
+ Much thanks to @SummonHIM for Chinese and languages combining

2021-Jan-22:
+ Fixing Vietnamese displaying by adding chcp 65001 for UTF-8 characters support
+ Translation improvement
+ Some general bug fixes

2021-Jan-21:
+ First tool release with OFRP 2021-01-21


Screenshots:

Screenshot 2021-01-22 191839.png

English

Screenshot 2021-01-22 191907.png

Vietnamese

chn-utf8.png

Chinese (by SummonHIM)


Credits:
OFRP for picasso author belongs to @masemoel
Tool authors belongs to @DumbHokage & @SummonHIM
Translators:
English & Vietnamese: @DumbHokage
Chinese: @SummonHIM

Original recovery author's post
For more, check out picasso updates on our Telegram here: https://t.me/K30_5J
Our discussion group: https://t.me/XiaomiRedmiK30
 
Last edited:

SummonHIM

Member
Apr 20, 2019
5
1
13
China
8bits.group
and i pack 3 language in 1 file
Code:
chcp 65001
@ECHO OFF
cls
color 1f


ECHO.***********************************************
ECHO.           Please select a language:
ECHO,
ECHO.               1.English
ECHO.               2.Vietnamese
ECHO.               3.Simplified Chinese
ECHO,
ECHO.***********************************************
choice /c 123

:** Language Config Start, DON'T DELETE EMPTY LINE **
if errorlevel 1 (
    set language=english
    set LangTitle=One click flash
    set LangRecInfo=RECOVERY INFORMATION
    set LangRecName=REC name
    set LangRecver=REC version
    set LangDevName=Device name
    set LangRecAuth=Author
    set LangRecDate=Release date
    set LangSuppMode=Support flash in normal mode and fastboot mode
    set LangPause=Press any key to continue
    set LangMenuMode=Your phone current mode
    Set LangMenuNormalMode=Normal mode
    Set LangMenuFastMode=Fastboot mode
    Set LangMenuOtherMode=Other mode
    Set LangMenuNumChoice=Please enter correct mode number
    Set LangOtherReboot=Please reboot phone to
    Set LangOtherPause=Press anykey to return back to main menu. It will automatically return if no key pressed in 6 secs.
    Set LangOr=or
    Set LangDevTypeTitle=Please connect your phone to your computer
    Set LangDevTypeMakeSure=Make sure
    Set LangDevTypeMakeSure1=Phone is unlocked bootloader
    Set LangDevTypeMakeSure2=Phone is screen on
    Set LangDevTypeMakeSure3=USB debugging is enable
    Set LangDevTypeMakeSure4=Driver installed on PC
    Set LangDevTypeMakeSure5=When the phone prompts USB debugging
    Set LangDevTypeMakeSure5a=authorization, check Always and click Authorize
    Set LangDevTypeMakeSure6=Phone in fastboot mode
    Set LangDevTypeCheckTitle=Checking device connected
    Set LangDevTypeCheckDesc1=If staying on this step too long, please check above information
    Set LangDevTypeCheckDesc2=And restart the phone
    Set LangDevTypeRestarting=The phone is restarting
    Set LangFlashingDesc=If staying on this step too long, please check
    Set LangFlashingDesc1=USB cable is connected
    Set LangFlashingDesc2=Driver install correctly
    Set LangFlashingDesc3=Phone is on fastboot mode
    Set LangFlashingRec=Flashing recovery
    Set LangFlashingRecDesc1=If OKAY is flash successfully, otherwise it fails
    Set LangFlashingRecDesc2=If staying on this step too long, please restart tool
    Set LangFlashFailed=SOMETHING WENT WRONG!
    Set LangFlashFailedTitle=Flash failed
    Set LangFlashFailedDesc1=Please check model is correct
    Set LangFlashFailedDesc2=Make sure fastboot is correct
    Set LangFlashFailedDesc3=Run the program again
    Set LangFlashFailedDesc4=If still not successful, please contact author
    Set LangFlashFailedDesc5=thank you for use this tool
    Set LangFlashOverTitle=Flash recovery complete
    Set LangFlashOverDesc1=The phone will restart to
    Set LangFlashOverDesc2=Phone may restart 1-2 times
    Set LangFlashOverDesc3=Thank you for using our tool
    Set LangFlashOverDesc4=A tool by
    Set LangFlashOverDesc5=Based on wzsx150's script
    Set LangExit=Press any key to exit
)
if errorlevel 2 (
    set language=vietnamese

    set LangTitle=One click flash

    set LangRecInfo=THÔNG TIN RECOVERY

    set LangRecName=Tên Recovery

    set LangRecver=Phiên bản Recovery

    set LangDevName=Tên thiết bị

    set LangRecAuth=Tác giả

    set LangRecDate=Ngày xuất bản

    set LangSuppMode=Hỗ trợ flash ở chế độ thường và fastboot

    set LangPause=Nhấn phím bất kỳ để tiếp tục

    set LangMenuMode=Chế độ hiện tại trên điện thoại của bạn là

    Set LangMenuNormalMode=Chế độ thường

    Set LangMenuFastMode=Chế độ fastboot

    Set LangMenuOtherMode=Chế độ khác

    Set LangMenuNumChoice=Nhập đúng số bạn chọn rồi nhấn ENTER

    Set LangOtherReboot=Hãy khởi động điện thoại của bạn về 1 trong 2 chế độ dưới

    Set LangOtherPause=Nhấn phím bất kỳ để quay trở về menu chính. Tool sẽ tự động quay về trong vòng 6 giây nếu không nhấn bất kỳ phím nào.

    Set LangOr=hoặc

    Set LangDevTypeTitle=Hãy kết nối điện thoại của bạn với máy tính

    Set LangDevTypeMakeSure=Đảm bảo rằng

    Set LangDevTypeMakeSure1=Điện thoại của bạn đã mở khoá bootloader

    Set LangDevTypeMakeSure2=Điện thoại đang mở sáng

    Set LangDevTypeMakeSure3=Đã bật USB Debugging

    Set LangDevTypeMakeSure4=Đã cài đặt đủ driver

    Set LangDevTypeMakeSure5=When the phone prompts USB debugging

    Set LangDevTypeMakeSure5a=authorization, check Always and click Authorize

    Set LangDevTypeMakeSure6=Điện thoại dang ở chế độ fastboot

    Set LangDevTypeCheckTitle=Đang kiểm tra thiết bị được kết nối

    Set LangDevTypeCheckDesc1=Nếu bạn đang ở bước này quá lâu, hãy kiểm tra các thông tin trên
    
    Set LangDevTypeCheckDesc2=và khởi động lại thiết bị của bạn

    Set LangDevTypeRestarting=Điện thoại đang khởi động lại

    Set LangFlashingDesc=Nếu bạn đang ở bước này quá lâu, hãy kiểm tra lại rằng

    Set LangFlashingDesc1=Đã kết nói cáp USB

    Set LangFlashingDesc2=Cài đặt đúng driver cần thiết

    Set LangFlashingDesc3=Điện thoại ĐANG ở chế độ fastboot

    Set LangFlashingRec=Đang flash recovery

    Set LangFlashingRecDesc1=Nếu hiện OKAY là flash thành công, ngược lại là thất bại

    Set LangFlashingRecDesc2=Nếu bạn đang ở bước này quá lâu, hãy khởi động lại tool

    Set LangFlashFailed=SOMETHING WENT WRONG!

    Set LangFlashFailedTitle=Flash thất bại

    Set LangFlashFailedDesc1=Hãy kiểm tra model khớp đúng với thiết bị

    Set LangFlashFailedDesc2=Đảm bảo fastboot thực hiện đúng với thiết bị

    Set LangFlashFailedDesc3=Chạy lại tool

    Set LangFlashFailedDesc4=Nếu bạn vẫn không thành công, hãy liên hệ với tác giả

    Set LangFlashFailedDesc5=Cảm ơn bạn đả sử dụng tool của chúng tôi

    Set LangFlashOverTitle=Flash recovery thành công

    Set LangFlashOverDesc1=Điện thoại sẽ khởi động về

    Set LangFlashOverDesc2=Điện thoại của bạn sẽ có thể khởi động 1-2 lần

    Set LangFlashOverDesc3=Cảm ơn bạn đả sử dụng tool của chúng tôi

    Set LangFlashOverDesc4=Tool được viết bởi

    Set LangFlashOverDesc5=Dựa trên script của wzsx150

    Set LangExit=Nhấn phím bất kỳ để thoát
)
if errorlevel 3 (
    set language=chinese

    set LangTitle=一键刷入

    set LangRecInfo=Recovery 信息

    set LangRecName=REC 名称

    set LangRecver=REC 版本

    set LangDevName=设备名称

    set LangRecAuth=作者
    
    set LangRecDate=发布日期

    set LangSuppMode=支持设备处于开机或 Fastboot 状态

    set LangPause=按任意键继续

    set LangMenuMode=您的设备当前状态是

    Set LangMenuNormalMode=正常开机模式

    Set LangMenuFastMode=Fastboot 模式

    Set LangMenuOtherMode=其他模式

    Set LangMenuNumChoice=请选择当前手机运行状态

    Set LangOtherReboot=请重启您的设备至

    Set LangOtherPause=按任意键返回主菜单。若 6 秒内无操作将自动返回。

    Set LangOr=或

    Set LangDevTypeTitle=请连接您的设备至您的计算机

    Set LangDevTypeMakeSure=并确保

    Set LangDevTypeMakeSure1=设备已经解锁 Bootloader 锁

    Set LangDevTypeMakeSure2=设备已经解锁屏幕

    Set LangDevTypeMakeSure3=USB 调试已启用

    Set LangDevTypeMakeSure4=设备驱动已经安装至计算机内

    Set LangDevTypeMakeSure5=当设备提示申请 USB 调试授权时,

    Set LangDevTypeMakeSure5a=勾选“一律允许使用该计算机”并点击允许

    Set LangDevTypeMakeSure6=设备当前状态为 Fastboot 模式

    Set LangDevTypeCheckTitle=正在检查设备连接状态

    Set LangDevTypeCheckDesc1=如果在此步骤上停留时间过长,请检查上述信息。
    
    Set LangDevTypeCheckDesc2=并重启您的设备

    Set LangDevTypeRestarting=设备正在重启中

    Set LangFlashingDesc=如果在此步骤上停留时间过长,请检查

    Set LangFlashingDesc1=USB 线已经连接

    Set LangFlashingDesc2=设备驱动已经正确安装

    Set LangFlashingRec=正在刷入 Recovery

    Set LangFlashingRecDesc1=若提示 [OKAY] 则刷入成功,否则为失败。

    Set LangFlashingRecDesc2=如果在此步骤上停留时间过长,请重启本工具

    Set LangFlashFailed=出了点问题!

    Set LangFlashFailedTitle=刷入失败

    Set LangFlashFailedDesc1=请检查设备型号是否正确

    Set LangFlashFailedDesc2=确保设备状态在 Fastboot 模式,并且 Bootloader 已解锁

    Set LangFlashFailedDesc3=重新启动本脚本

    Set LangFlashFailedDesc4=若仍失败,请联系作者

    Set LangFlashFailedDesc5=感谢您使用本工具

    Set LangFlashOverTitle=刷入 Recovery 成功

    Set LangFlashOverDesc1=设备将会重启至

    Set LangFlashOverDesc2=设备可能会重启 1-2 次

    Set LangFlashOverDesc3=感谢您使用本工具

    Set LangFlashOverDesc4=本工具作者为

    Set LangFlashOverDesc5=基于 wzsx150 的脚本制作

    Set LangExit=按任意键退出
)
:** Language Config End, DON'T DELETE EMPTY LINE **

set device_name=Redmi K30 5G
set rec_name=OFRP_TWRP
set rec_ver=1.2
set rec_auth=masemoel
set rec_tooleditor=DumbHokage
set rec_date=2021.01.21
set rec_img=recovery_a11.img

TITLE %device_name% %LangTitle% %rec_name%
color 1f

cd /d "%~dp0"

:LOGO
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.              %LangRecInfo%
ECHO.
ECHO.              %LangRecName%:%rec_name%
ECHO.              %LangRecver%:%rec_ver%
ECHO.              %LangDevName%:%device_name%
ECHO.              %LangRecAuth%:%rec_auth%
ECHO.              %LangRecDate%:%rec_date%
ECHO.           
ECHO.     %LangSuppMode%
ECHO.***********************************************
ECHO.
ECHO.%LangPause%...
pause>nul

:MENU
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.             %LangMenuMode%:
ECHO.
ECHO.              1.%LangMenuNormalMode%
ECHO.
ECHO.              2.%LangMenuFastMode%
ECHO.
ECHO.              3.%LangMenuOtherMode%
ECHO.
ECHO.
ECHO.***********************************************
ECHO.
choice /c 123 /m "%LangMenuNumChoice%:"
set MenuNumChoice=%errorlevel%
if "%MenuNumChoice%"=="1" (
    goto IN_SYSTEM
)
if "%MenuNumChoice%"=="2" (
    goto FASTBOOT_MODE
)
if "%MenuNumChoice%"=="3" (
    goto OTHERS
)

:OTHERS
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.             %LangOtherReboot%
ECHO.
ECHO.              %LangMenuNormalMode%
ECHO.                   %LangOr%
ECHO.              %LangMenuFastMode%
ECHO.
ECHO.%LangOtherPause%
ECHO.***********************************************
ECHO.
timeout /t 6 >nul
echo.
goto MENU


:IN_SYSTEM
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.        %LangDevTypeTitle%
ECHO.
ECHO.            %LangDevTypeMakeSure%:
ECHO.      1. %LangDevTypeMakeSure1%
ECHO.      2. %LangDevTypeMakeSure2%
ECHO.      3. %LangDevTypeMakeSure3%
ECHO.      4. %LangDevTypeMakeSure4%
ECHO.      5. %LangDevTypeMakeSure5%
ECHO.         %LangDevTypeMakeSure5a%
ECHO.
ECHO.            %LangPause%...
ECHO.***********************************************
ECHO.
pause>nul
ECHO.        %LangDevTypeCheckTitle%...
ECHO.
ECHO.   %LangDevTypeCheckDesc1%
ECHO.           %LangDevTypeCheckDesc2%
ECHO.***********************************************
ECHO.
timeout /t 2 /nobreak >NUL
adb.exe wait-for-device >NUL 2>NUL

CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.
ECHO.             %LangDevTypeRestarting%
ECHO.
ECHO.
ECHO.***********************************************
ECHO.
ECHO.   %LangDevTypeCheckDesc1%
ECHO.
adb.exe reboot bootloader >NUL 2>NUL
timeout /t 3 /nobreak >NUL
goto FLASHING


:FASTBOOT_MODE
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.          %LangDevTypeTitle%
ECHO.
ECHO.           %LangDevTypeMakeSure%:
ECHO.      1. %LangDevTypeMakeSure1%
ECHO.      2. %LangDevTypeMakeSure6%
ECHO.      3. %LangDevTypeMakeSure4%
ECHO.
ECHO.            %LangPause%...
ECHO.***********************************************
ECHO.
pause>nul
goto FLASHING


:FLASHING
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.          %LangDevTypeCheckTitle%...
ECHO.
ECHO.
ECHO.      %LangFlashingDesc%
ECHO.
ECHO.      1. %LangFlashingDesc1%
ECHO.      2. %LangFlashingDesc2%
ECHO.      3. %LangDevTypeMakeSure6%
ECHO.
ECHO.             %LangDevTypeCheckDesc2%
ECHO.***********************************************
timeout /t 2 /nobreak >NUL
fastboot.exe wait-for-device >NUL 2>NUL

CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.
ECHO.             %LangFlashingRec%...
ECHO.
ECHO.
ECHO.***********************************************
ECHO.
ECHO.      %LangFlashingRecDesc1%
ECHO.
ECHO.    %LangFlashingRecDesc2%
ECHO.
fastboot.exe flash recovery "%rec_img%" || goto FLASH_FAILED
REM fastboot.exe flash misc misc.bin >NUL 2>NUL
timeout /t 6 /nobreak >NUL
goto FLASH_OVER


:FLASH_FAILED
ECHO.
ECHO. %LangFlashFailed%
timeout /t 6 /nobreak >NUL
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.                   %LangFlashFailedTitle%
ECHO.
ECHO.           1. %LangFlashFailedDesc1%
ECHO.           2. %LangFlashFailedDesc2%
ECHO.           3. %LangFlashFailedDesc3%
ECHO.              %LangFlashFailedDesc4%
ECHO.
ECHO.           %rec_auth% %LangFlashFailedDesc5%
ECHO.
ECHO.            %LangExit%...
ECHO.***********************************************
ECHO.
timeout /t 1 /nobreak >NUL
pause >NUL
EXIT


:FLASH_OVER
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.             %LangFlashOverTitle%
ECHO.
ECHO.
ECHO.        %LangFlashOverDesc1% %rec_name%
ECHO.            %LangFlashOverDesc2%
ECHO.
ECHO.
ECHO.           %LangFlashOverDesc3%
ECHO.           %LangFlashOverDesc4% %rec_tooleditor%
ECHO.        %LangFlashOverDesc5%
ECHO.
ECHO.           %LangExit%...
ECHO.***********************************************
ECHO.
fastboot.exe reboot recovery
pause >NUL

EXIT
 

DumbHokage

Member
Jan 9, 2021
14
12
13
and i pack 3 language in 1 file
Code:
chcp 65001
@ECHO OFF
cls
color 1f


ECHO.***********************************************
ECHO.           Please select a language:
ECHO,
ECHO.               1.English
ECHO.               2.Vietnamese
ECHO.               3.Simplified Chinese
ECHO,
ECHO.***********************************************
choice /c 123

:** Language Config Start, DON'T DELETE EMPTY LINE **
if errorlevel 1 (
    set language=english
    set LangTitle=One click flash
    set LangRecInfo=RECOVERY INFORMATION
    set LangRecName=REC name
    set LangRecver=REC version
    set LangDevName=Device name
    set LangRecAuth=Author
    set LangRecDate=Release date
    set LangSuppMode=Support flash in normal mode and fastboot mode
    set LangPause=Press any key to continue
    set LangMenuMode=Your phone current mode
    Set LangMenuNormalMode=Normal mode
    Set LangMenuFastMode=Fastboot mode
    Set LangMenuOtherMode=Other mode
    Set LangMenuNumChoice=Please enter correct mode number
    Set LangOtherReboot=Please reboot phone to
    Set LangOtherPause=Press anykey to return back to main menu. It will automatically return if no key pressed in 6 secs.
    Set LangOr=or
    Set LangDevTypeTitle=Please connect your phone to your computer
    Set LangDevTypeMakeSure=Make sure
    Set LangDevTypeMakeSure1=Phone is unlocked bootloader
    Set LangDevTypeMakeSure2=Phone is screen on
    Set LangDevTypeMakeSure3=USB debugging is enable
    Set LangDevTypeMakeSure4=Driver installed on PC
    Set LangDevTypeMakeSure5=When the phone prompts USB debugging
    Set LangDevTypeMakeSure5a=authorization, check Always and click Authorize
    Set LangDevTypeMakeSure6=Phone in fastboot mode
    Set LangDevTypeCheckTitle=Checking device connected
    Set LangDevTypeCheckDesc1=If staying on this step too long, please check above information
    Set LangDevTypeCheckDesc2=And restart the phone
    Set LangDevTypeRestarting=The phone is restarting
    Set LangFlashingDesc=If staying on this step too long, please check
    Set LangFlashingDesc1=USB cable is connected
    Set LangFlashingDesc2=Driver install correctly
    Set LangFlashingDesc3=Phone is on fastboot mode
    Set LangFlashingRec=Flashing recovery
    Set LangFlashingRecDesc1=If OKAY is flash successfully, otherwise it fails
    Set LangFlashingRecDesc2=If staying on this step too long, please restart tool
    Set LangFlashFailed=SOMETHING WENT WRONG!
    Set LangFlashFailedTitle=Flash failed
    Set LangFlashFailedDesc1=Please check model is correct
    Set LangFlashFailedDesc2=Make sure fastboot is correct
    Set LangFlashFailedDesc3=Run the program again
    Set LangFlashFailedDesc4=If still not successful, please contact author
    Set LangFlashFailedDesc5=thank you for use this tool
    Set LangFlashOverTitle=Flash recovery complete
    Set LangFlashOverDesc1=The phone will restart to
    Set LangFlashOverDesc2=Phone may restart 1-2 times
    Set LangFlashOverDesc3=Thank you for using our tool
    Set LangFlashOverDesc4=A tool by
    Set LangFlashOverDesc5=Based on wzsx150's script
    Set LangExit=Press any key to exit
)
if errorlevel 2 (
    set language=vietnamese

    set LangTitle=One click flash

    set LangRecInfo=THÔNG TIN RECOVERY

    set LangRecName=Tên Recovery

    set LangRecver=Phiên bản Recovery

    set LangDevName=Tên thiết bị

    set LangRecAuth=Tác giả

    set LangRecDate=Ngày xuất bản

    set LangSuppMode=Hỗ trợ flash ở chế độ thường và fastboot

    set LangPause=Nhấn phím bất kỳ để tiếp tục

    set LangMenuMode=Chế độ hiện tại trên điện thoại của bạn là

    Set LangMenuNormalMode=Chế độ thường

    Set LangMenuFastMode=Chế độ fastboot

    Set LangMenuOtherMode=Chế độ khác

    Set LangMenuNumChoice=Nhập đúng số bạn chọn rồi nhấn ENTER

    Set LangOtherReboot=Hãy khởi động điện thoại của bạn về 1 trong 2 chế độ dưới

    Set LangOtherPause=Nhấn phím bất kỳ để quay trở về menu chính. Tool sẽ tự động quay về trong vòng 6 giây nếu không nhấn bất kỳ phím nào.

    Set LangOr=hoặc

    Set LangDevTypeTitle=Hãy kết nối điện thoại của bạn với máy tính

    Set LangDevTypeMakeSure=Đảm bảo rằng

    Set LangDevTypeMakeSure1=Điện thoại của bạn đã mở khoá bootloader

    Set LangDevTypeMakeSure2=Điện thoại đang mở sáng

    Set LangDevTypeMakeSure3=Đã bật USB Debugging

    Set LangDevTypeMakeSure4=Đã cài đặt đủ driver

    Set LangDevTypeMakeSure5=When the phone prompts USB debugging

    Set LangDevTypeMakeSure5a=authorization, check Always and click Authorize

    Set LangDevTypeMakeSure6=Điện thoại dang ở chế độ fastboot

    Set LangDevTypeCheckTitle=Đang kiểm tra thiết bị được kết nối

    Set LangDevTypeCheckDesc1=Nếu bạn đang ở bước này quá lâu, hãy kiểm tra các thông tin trên
  
    Set LangDevTypeCheckDesc2=và khởi động lại thiết bị của bạn

    Set LangDevTypeRestarting=Điện thoại đang khởi động lại

    Set LangFlashingDesc=Nếu bạn đang ở bước này quá lâu, hãy kiểm tra lại rằng

    Set LangFlashingDesc1=Đã kết nói cáp USB

    Set LangFlashingDesc2=Cài đặt đúng driver cần thiết

    Set LangFlashingDesc3=Điện thoại ĐANG ở chế độ fastboot

    Set LangFlashingRec=Đang flash recovery

    Set LangFlashingRecDesc1=Nếu hiện OKAY là flash thành công, ngược lại là thất bại

    Set LangFlashingRecDesc2=Nếu bạn đang ở bước này quá lâu, hãy khởi động lại tool

    Set LangFlashFailed=SOMETHING WENT WRONG!

    Set LangFlashFailedTitle=Flash thất bại

    Set LangFlashFailedDesc1=Hãy kiểm tra model khớp đúng với thiết bị

    Set LangFlashFailedDesc2=Đảm bảo fastboot thực hiện đúng với thiết bị

    Set LangFlashFailedDesc3=Chạy lại tool

    Set LangFlashFailedDesc4=Nếu bạn vẫn không thành công, hãy liên hệ với tác giả

    Set LangFlashFailedDesc5=Cảm ơn bạn đả sử dụng tool của chúng tôi

    Set LangFlashOverTitle=Flash recovery thành công

    Set LangFlashOverDesc1=Điện thoại sẽ khởi động về

    Set LangFlashOverDesc2=Điện thoại của bạn sẽ có thể khởi động 1-2 lần

    Set LangFlashOverDesc3=Cảm ơn bạn đả sử dụng tool của chúng tôi

    Set LangFlashOverDesc4=Tool được viết bởi

    Set LangFlashOverDesc5=Dựa trên script của wzsx150

    Set LangExit=Nhấn phím bất kỳ để thoát
)
if errorlevel 3 (
    set language=chinese

    set LangTitle=一键刷入

    set LangRecInfo=Recovery 信息

    set LangRecName=REC 名称

    set LangRecver=REC 版本

    set LangDevName=设备名称

    set LangRecAuth=作者
  
    set LangRecDate=发布日期

    set LangSuppMode=支持设备处于开机或 Fastboot 状态

    set LangPause=按任意键继续

    set LangMenuMode=您的设备当前状态是

    Set LangMenuNormalMode=正常开机模式

    Set LangMenuFastMode=Fastboot 模式

    Set LangMenuOtherMode=其他模式

    Set LangMenuNumChoice=请选择当前手机运行状态

    Set LangOtherReboot=请重启您的设备至

    Set LangOtherPause=按任意键返回主菜单。若 6 秒内无操作将自动返回。

    Set LangOr=或

    Set LangDevTypeTitle=请连接您的设备至您的计算机

    Set LangDevTypeMakeSure=并确保

    Set LangDevTypeMakeSure1=设备已经解锁 Bootloader 锁

    Set LangDevTypeMakeSure2=设备已经解锁屏幕

    Set LangDevTypeMakeSure3=USB 调试已启用

    Set LangDevTypeMakeSure4=设备驱动已经安装至计算机内

    Set LangDevTypeMakeSure5=当设备提示申请 USB 调试授权时,

    Set LangDevTypeMakeSure5a=勾选“一律允许使用该计算机”并点击允许

    Set LangDevTypeMakeSure6=设备当前状态为 Fastboot 模式

    Set LangDevTypeCheckTitle=正在检查设备连接状态

    Set LangDevTypeCheckDesc1=如果在此步骤上停留时间过长,请检查上述信息。
  
    Set LangDevTypeCheckDesc2=并重启您的设备

    Set LangDevTypeRestarting=设备正在重启中

    Set LangFlashingDesc=如果在此步骤上停留时间过长,请检查

    Set LangFlashingDesc1=USB 线已经连接

    Set LangFlashingDesc2=设备驱动已经正确安装

    Set LangFlashingRec=正在刷入 Recovery

    Set LangFlashingRecDesc1=若提示 [OKAY] 则刷入成功,否则为失败。

    Set LangFlashingRecDesc2=如果在此步骤上停留时间过长,请重启本工具

    Set LangFlashFailed=出了点问题!

    Set LangFlashFailedTitle=刷入失败

    Set LangFlashFailedDesc1=请检查设备型号是否正确

    Set LangFlashFailedDesc2=确保设备状态在 Fastboot 模式,并且 Bootloader 已解锁

    Set LangFlashFailedDesc3=重新启动本脚本

    Set LangFlashFailedDesc4=若仍失败,请联系作者

    Set LangFlashFailedDesc5=感谢您使用本工具

    Set LangFlashOverTitle=刷入 Recovery 成功

    Set LangFlashOverDesc1=设备将会重启至

    Set LangFlashOverDesc2=设备可能会重启 1-2 次

    Set LangFlashOverDesc3=感谢您使用本工具

    Set LangFlashOverDesc4=本工具作者为

    Set LangFlashOverDesc5=基于 wzsx150 的脚本制作

    Set LangExit=按任意键退出
)
:** Language Config End, DON'T DELETE EMPTY LINE **

set device_name=Redmi K30 5G
set rec_name=OFRP_TWRP
set rec_ver=1.2
set rec_auth=masemoel
set rec_tooleditor=DumbHokage
set rec_date=2021.01.21
set rec_img=recovery_a11.img

TITLE %device_name% %LangTitle% %rec_name%
color 1f

cd /d "%~dp0"

:LOGO
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.              %LangRecInfo%
ECHO.
ECHO.              %LangRecName%:%rec_name%
ECHO.              %LangRecver%:%rec_ver%
ECHO.              %LangDevName%:%device_name%
ECHO.              %LangRecAuth%:%rec_auth%
ECHO.              %LangRecDate%:%rec_date%
ECHO.         
ECHO.     %LangSuppMode%
ECHO.***********************************************
ECHO.
ECHO.%LangPause%...
pause>nul

:MENU
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.             %LangMenuMode%:
ECHO.
ECHO.              1.%LangMenuNormalMode%
ECHO.
ECHO.              2.%LangMenuFastMode%
ECHO.
ECHO.              3.%LangMenuOtherMode%
ECHO.
ECHO.
ECHO.***********************************************
ECHO.
choice /c 123 /m "%LangMenuNumChoice%:"
set MenuNumChoice=%errorlevel%
if "%MenuNumChoice%"=="1" (
    goto IN_SYSTEM
)
if "%MenuNumChoice%"=="2" (
    goto FASTBOOT_MODE
)
if "%MenuNumChoice%"=="3" (
    goto OTHERS
)

:OTHERS
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.             %LangOtherReboot%
ECHO.
ECHO.              %LangMenuNormalMode%
ECHO.                   %LangOr%
ECHO.              %LangMenuFastMode%
ECHO.
ECHO.%LangOtherPause%
ECHO.***********************************************
ECHO.
timeout /t 6 >nul
echo.
goto MENU


:IN_SYSTEM
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.        %LangDevTypeTitle%
ECHO.
ECHO.            %LangDevTypeMakeSure%:
ECHO.      1. %LangDevTypeMakeSure1%
ECHO.      2. %LangDevTypeMakeSure2%
ECHO.      3. %LangDevTypeMakeSure3%
ECHO.      4. %LangDevTypeMakeSure4%
ECHO.      5. %LangDevTypeMakeSure5%
ECHO.         %LangDevTypeMakeSure5a%
ECHO.
ECHO.            %LangPause%...
ECHO.***********************************************
ECHO.
pause>nul
ECHO.        %LangDevTypeCheckTitle%...
ECHO.
ECHO.   %LangDevTypeCheckDesc1%
ECHO.           %LangDevTypeCheckDesc2%
ECHO.***********************************************
ECHO.
timeout /t 2 /nobreak >NUL
adb.exe wait-for-device >NUL 2>NUL

CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.
ECHO.             %LangDevTypeRestarting%
ECHO.
ECHO.
ECHO.***********************************************
ECHO.
ECHO.   %LangDevTypeCheckDesc1%
ECHO.
adb.exe reboot bootloader >NUL 2>NUL
timeout /t 3 /nobreak >NUL
goto FLASHING


:FASTBOOT_MODE
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.          %LangDevTypeTitle%
ECHO.
ECHO.           %LangDevTypeMakeSure%:
ECHO.      1. %LangDevTypeMakeSure1%
ECHO.      2. %LangDevTypeMakeSure6%
ECHO.      3. %LangDevTypeMakeSure4%
ECHO.
ECHO.            %LangPause%...
ECHO.***********************************************
ECHO.
pause>nul
goto FLASHING


:FLASHING
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.          %LangDevTypeCheckTitle%...
ECHO.
ECHO.
ECHO.      %LangFlashingDesc%
ECHO.
ECHO.      1. %LangFlashingDesc1%
ECHO.      2. %LangFlashingDesc2%
ECHO.      3. %LangDevTypeMakeSure6%
ECHO.
ECHO.             %LangDevTypeCheckDesc2%
ECHO.***********************************************
timeout /t 2 /nobreak >NUL
fastboot.exe wait-for-device >NUL 2>NUL

CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.
ECHO.             %LangFlashingRec%...
ECHO.
ECHO.
ECHO.***********************************************
ECHO.
ECHO.      %LangFlashingRecDesc1%
ECHO.
ECHO.    %LangFlashingRecDesc2%
ECHO.
fastboot.exe flash recovery "%rec_img%" || goto FLASH_FAILED
REM fastboot.exe flash misc misc.bin >NUL 2>NUL
timeout /t 6 /nobreak >NUL
goto FLASH_OVER


:FLASH_FAILED
ECHO.
ECHO. %LangFlashFailed%
timeout /t 6 /nobreak >NUL
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.                   %LangFlashFailedTitle%
ECHO.
ECHO.           1. %LangFlashFailedDesc1%
ECHO.           2. %LangFlashFailedDesc2%
ECHO.           3. %LangFlashFailedDesc3%
ECHO.              %LangFlashFailedDesc4%
ECHO.
ECHO.           %rec_auth% %LangFlashFailedDesc5%
ECHO.
ECHO.            %LangExit%...
ECHO.***********************************************
ECHO.
timeout /t 1 /nobreak >NUL
pause >NUL
EXIT


:FLASH_OVER
CLS
ECHO.
ECHO.         %device_name% %LangTitle% %rec_name%
ECHO.***********************************************
ECHO.
ECHO.             %LangFlashOverTitle%
ECHO.
ECHO.
ECHO.        %LangFlashOverDesc1% %rec_name%
ECHO.            %LangFlashOverDesc2%
ECHO.
ECHO.
ECHO.           %LangFlashOverDesc3%
ECHO.           %LangFlashOverDesc4% %rec_tooleditor%
ECHO.        %LangFlashOverDesc5%
ECHO.
ECHO.           %LangExit%...
ECHO.***********************************************
ECHO.
fastboot.exe reboot recovery
pause >NUL

EXIT
Great idea, but through my test of ur code, there a problem with Chinese characters
I may recommended to seperate languages that is not support UTF-8 because it is impossible to activate 2 chcp characters codes
So Chinese is chcp 936, then it should different from chcp 65001 which is UTF-8 (support latin-accents characters)
Anyway thanks for ur idea, ur name will be credited in next tool update
 

sonicswink

Member
Sep 25, 2015
48
5
38
Saida
Stuck at Fastboot mode when tried to install with One-click Installation Tool, same with manual flash method, reinstalled ADB drivers and still same results. Even OFRP tool would not progress any more further than "checking device connected" message.
USB debugging enabled - Bootloader unlocked.
 

DumbHokage

Member
Jan 9, 2021
14
12
13
Stuck at Fastboot mode when tried to install with One-click Installation Tool, same with manual flash method, reinstalled ADB drivers and still same results. Even OFRP tool would not progress any more further than "checking device connected" message.
USB debugging enabled - Bootloader unlocked.
This must be your driver problem, mine is still success in latest version
if u keep stucking in fastboot mode, try restore firmware
don't remind me if ur device is bricked
Screenshot 2021-01-30 081242.png
 
  • Like
Reactions: sonicswink

SummonHIM

Member
Apr 20, 2019
5
1
13
China
8bits.group
Great idea, but through my test of ur code, there a problem with Chinese characters
I may recommended to seperate languages that is not support UTF-8 because it is impossible to activate 2 chcp characters codes
So Chinese is chcp 936, then it should different from chcp 65001 which is UTF-8 (support latin-accents characters)
Anyway thanks for ur idea, ur name will be credited in next tool update
Maybe loss fonts? i also have problem with Vietnamese characters (in utf-8) too.
but chinese charcters (in utf-8) work well.

vit-utf8.png

chn-utf8.png
 
Last edited:
  • Like
Reactions: DumbHokage

DumbHokage

Member
Jan 9, 2021
14
12
13
Maybe loss fonts? i also have problem with Vietnamese characters (in utf-8) too.
but chinese charcters (in utf-8) work well.

View attachment 5204233
View attachment 5204235
Oh I see, maybe because of CMD fonts
And it could depend on Windows edition, like if u have Home China, there will be full of Chinese support but Latin UTF-8 were not natively supported, I have Pro (International) and Latin UTF-8 fully support, Chinese were not fully supported by default
Anyway thanks for ur screenshot