This is a twrp developed by a chinese team-LR.Team. It's not developed by me, but I will update with the developer wzsx150 on a daily basis (He said he is too busy to post here). So basically, this post is just for your convenience because the original thread was on the official chinese oneplus forum (which is of course all in chinese), and the link provided there was impossible for people here to download.
Instruction:
1. Download the twrp.rar file and unzip it. There should be one folder in the rar, "TWRP-3.3.1-0527-ONEPLUS7PRO-CN-wzsx150-", and a photo"Pic4".
3. Download stock boot.img here: Link removed due to non-compliance with GPL
3. Rename the boot image into "boot.img" and place it in the root directory of the folder("TWRP-3.3.1-0527-ONEPLUS7PRO-CN-wzsx150-") you just unzipped.
4. Reboot your phone into fastboot mode and connect to computer (you must have already unlocked your bootloader).
5. Run recovery-twrp_flash.bat and you should see bunch of chinese characters.
5. Hit enter 3 times and you should see something like Pic4.
6. Press 2 on your keyboard and hit Enter twice.
7. Wait for about 10 seconds and you should see the following on screen:
"Sending 'boot_a' (52560 KB) OKAY [ 1.136s]
Writing 'boot_a' OKAY [ 0.292s]
Finished. Total time: 1.440s
Sending 'boot_b' (52560 KB) OKAY [ 1.132s]
Writing 'boot_b' OKAY [ 0.156s]
Finished. Total time: 1.300s"
Rebooting
Finished. Total time: 0.003s
8. Your phone will automatically reboot twice and you will end up in twrp.
9. Enter your pin for decryption (maybe change the language to English) and install root in "ADCANCED".
10. Reboot.
Download Link:
Link removed due to non-compliance with GPL
Passcode:APBWgGrR65hGGjVvdvEsNb3_SaalCFwyp9Tq7wZvBw4
Again, all credits goes to wzsx150. I'm only here to help you understand chinese lol.
UPDATE:
Here is the actual coding inside the bat file. All credit goes to H1442060767555 on Oneplus forum.
Instruction:
1. Download the twrp.rar file and unzip it. There should be one folder in the rar, "TWRP-3.3.1-0527-ONEPLUS7PRO-CN-wzsx150-", and a photo"Pic4".
3. Download stock boot.img here: Link removed due to non-compliance with GPL
3. Rename the boot image into "boot.img" and place it in the root directory of the folder("TWRP-3.3.1-0527-ONEPLUS7PRO-CN-wzsx150-") you just unzipped.
4. Reboot your phone into fastboot mode and connect to computer (you must have already unlocked your bootloader).
5. Run recovery-twrp_flash.bat and you should see bunch of chinese characters.
5. Hit enter 3 times and you should see something like Pic4.
6. Press 2 on your keyboard and hit Enter twice.
7. Wait for about 10 seconds and you should see the following on screen:
"Sending 'boot_a' (52560 KB) OKAY [ 1.136s]
Writing 'boot_a' OKAY [ 0.292s]
Finished. Total time: 1.440s
Sending 'boot_b' (52560 KB) OKAY [ 1.132s]
Writing 'boot_b' OKAY [ 0.156s]
Finished. Total time: 1.300s"
Rebooting
Finished. Total time: 0.003s
8. Your phone will automatically reboot twice and you will end up in twrp.
9. Enter your pin for decryption (maybe change the language to English) and install root in "ADCANCED".
10. Reboot.
Download Link:
Link removed due to non-compliance with GPL
Passcode:APBWgGrR65hGGjVvdvEsNb3_SaalCFwyp9Tq7wZvBw4
Again, all credits goes to wzsx150. I'm only here to help you understand chinese lol.
UPDATE:
Here is the actual coding inside the bat file. All credit goes to H1442060767555 on Oneplus forum.
Code:
@ECHO on&@endlocal&@cls
@Echo off
set device_name=OnePlus 7 Pro
set rec_name=TWRP
set rec_ver=3.3.0-0526
set rec_auth=wzsx150
set rec_team=LR.Team
set rec_date=2019.05.26
set rec_img_name=recovery-TWRP-3.3.0-0526-ONEPLUS7PRO-CN-wzsx150.img
set rec_img=%rec_img_name%-tmp
set rec_img_tmp=%rec_img%-%random%
set rec_boot_need=
TITLE %device_name% 一键刷入recovery工具 --by wzsx150
color 3f
:LOGO
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO. RECOVERY基本信息
ECHO.
ECHO. REC名称 :%rec_name%
ECHO. REC版本 :%rec_ver%
ECHO. 适配机型:%device_name%
ECHO. 编译作者:%rec_auth%
ECHO. 团队名称:%rec_team%
ECHO. 编译时间:%rec_date%
ECHO.
ECHO. (支持开机状态刷入和fastboot模式刷入)
ECHO.
ECHO. (需要提供当前系统相同版本的boot.img文件)
ECHO.***********************************************
ECHO.
ECHO.按任意键继续...
pause>nul
:PATCHBOOT
CLS
ECHO.
ECHO. 处理并生成TWRP的镜像文件
ECHO.***********************************************
ECHO.
ECHO. 请将你当前手机内系统相同版本的boot.img文件
ECHO. 复制到本目录下!
ECHO.
ECHO.
ECHO. 可以从%rec_auth%发布%rec_name%的百度云网盘里下载
ECHO. 也可以从官方刷机包中提取
ECHO.
ECHO.
ECHO. (操作完毕后,按任意键继续)
ECHO.***********************************************
ECHO.
pause>nul
del /f "*.img-tmp-*" 2>nul
dir /a-d /b "boot*.img" 2>nul | findstr /ei ".img" >nul || goto PATCHBOOT_NOBOOTIMG
for /f "delims=" %%a in ('dir /a-d /b "boot*.img" ^| findstr /ei ".img"') do [user=352992]@set[/user] "rec_boot_need=%%a"
:PATCHBOOT_FILE
CLS
ECHO.
ECHO. 处理并生成TWRP的镜像文件
ECHO.***********************************************
ECHO.
ECHO. 发现boot镜像文件:%rec_boot_need%
ECHO.
ECHO.
ECHO.
ECHO. 请确认该文件是否为当前手机内系统相同
ECHO. 版本的boot镜像文件,如果不是请退出本工具
ECHO.
ECHO. (确认后,按任意键继续)
ECHO.***********************************************
timeout /t 1 /nobreak >NUL
ECHO.请确认...
pause>nul
cd AIK || goto PATCHBOOT_FAILED
del /f "*.img" 2>nul
del /f "zImage" 2>nul
copy /y .."%rec_boot_need%" boot.img-tmp
goto PATCHBOOT_DOING
:PATCHBOOT_NOBOOTIMG
CLS
ECHO.
ECHO. 处理并生成TWRP的镜像文件
ECHO.***********************************************
ECHO. 未找到boot镜像文件,生成失败!
ECHO.
ECHO.
ECHO. 请确认已经将boot***.img文件复制到了本目录后
ECHO. 再重新运行本工具
ECHO.
ECHO.
ECHO. (按任意键退出程序)
ECHO.***********************************************
ECHO.
pause >NUL
EXIT
:PATCHBOOT_DOING
CLS
ECHO.
ECHO. 处理并生成TWRP的镜像文件
ECHO.***********************************************
ECHO.
ECHO. 正在生成TWRP镜像文件...
ECHO.
ECHO.
ECHO.
ECHO. (请稍等)
ECHO.***********************************************
ECHO.
call "cleanup.bat" >nul 2>&1
rem 解包官方boot
call "unpackimg-abslot.bat" boot.img-tmp >nul 2>&1
if not exist "split_img\*-zImage" goto PATCHBOOT_FAILED
for /f "delims=" %%a in ('dir /b "split_img\*-zImage"') do [user=352992]@set[/user] "tmp_kernela=%%a"
copy /y "split_img\%tmp_kernela%" zImage
call "cleanup.bat" >nul 2>&1
rem 解包twrp
copy /y "..\%rec_img%" recovery.img-tmp
call "unpackimg-abslot.bat" recovery.img-tmp >nul 2>&1
rem 替换kernel
if not exist "split_img\*-zImage" goto PATCHBOOT_FAILED
for /f "delims=" %%a in ('dir /b "split_img\*-zImage"') do [user=352992]@set[/user] "tmp_kernelb=%%a"
copy /y zImage "split_img\%tmp_kernelb%"
rem 打包twrp
call "repackimg-abslot.bat" >nul 2>&1
rem 如果系统没有jave环境,签名会失败,现在想办法规避这种情况
if exist image-new.img (
copy /y image-new.img .."%rec_img_tmp%"
) else (
if not exist unsigned-new.img goto PATCHBOOT_FAILED
copy /y unsigned-new.img .."%rec_img_tmp%"
ECHO.
ECHO. 【你的电脑系统可能需要安装java环境】
ECHO. 【虽然这并不影响此次刷入%rec_name%】
ECHO.
timeout /t 5 /nobreak >NUL
)
ECHO.
ECHO. 生成TWRP的镜像文件成功!
ECHO.***********************************************
ECHO.%rec_img_tmp%
rem ECHO.
timeout /t 5 /nobreak >NUL
call "cleanup.bat" >nul 2>&1
del /f "*.img" 2>nul
del /f "zImage" 2>nul
cd .. || goto PATCHBOOT_FAILED
goto MENU
:PATCHBOOT_FAILED
CLS
ECHO.
ECHO. 处理并生成TWRP的镜像文件
ECHO.***********************************************
ECHO. 生成失败!
ECHO.
ECHO.
ECHO. 请尝试重新下载并解压后运行本程序
ECHO.
ECHO. 若仍旧无法成功,请联系作者:%rec_auth%
ECHO.
ECHO. (按任意键退出程序)
ECHO.***********************************************
ECHO.
pause >NUL
EXIT
:MENU
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO. 您手机的当前状态:
ECHO.
ECHO. 1.开机状态
ECHO.
ECHO. 2.fastboot模式
ECHO.
ECHO. 3.其他状态
ECHO.
ECHO.
ECHO.***********************************************
ECHO.
set choice=
set /p choice=请直接输入对应数字回车:
if not "%choice%"=="" set choice=%choice:~0,1%
if /i "%choice%"=="1" goto IN_SYSTEM
if /i "%choice%"=="2" goto FASTBOOT_MODE
if /i "%choice%"=="3" goto OTHERS
ECHO.
ECHO.输入无效,请重新输入...
timeout /t 2 /nobreak >NUL
ECHO.
goto MENU
:eek:THERS
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO. 请先将手机处于
ECHO.
ECHO. 【开机状态】
ECHO. 或者
ECHO. 【fastboot模式】
ECHO.
ECHO.(按任意键返回上级菜单,若无操作则6秒后自动返回)
ECHO.***********************************************
ECHO.
timeout /t 6 >nul
echo.
goto MENU
:IN_SYSTEM
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO. 请您将手机正确连接到电脑:
ECHO.
ECHO. 请确保:
ECHO. 【1.手机bootloader未锁】
ECHO. 【2.手机处于开机状态】
ECHO. 【3.手机开启USB调试】
ECHO. 【4.电脑上已经正确安装驱动】
ECHO. 【5.手机提示USB调试授权时勾选始终点击授权】
ECHO.
ECHO. (按下任意键继续)
ECHO.***********************************************
ECHO.
pause>nul
ECHO. 正在检查设备是否正常连接...
ECHO.
ECHO. (若长时间停留在此界面,请检查上述几项)
ECHO. (并重启该工具)
ECHO.***********************************************
ECHO.
timeout /t 2 /nobreak >NUL
adb.exe wait-for-device >NUL 2>NUL
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO.
ECHO.
ECHO. 手机重启中...
ECHO.
ECHO.
ECHO.***********************************************
ECHO.
ECHO. (若长时间停留在此界面,请重启该工具)
ECHO.
adb.exe reboot bootloader >NUL 2>NUL
timeout /t 3 /nobreak >NUL
goto FLASHING
:FASTBOOT_MODE
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO. 请您将手机正确连接到电脑:
ECHO.
ECHO. 请确保:
ECHO. 【1.手机bootloader未锁】
ECHO. 【2.手机处于fastboot模式】
ECHO. 【3.电脑上已经正确安装驱动】
ECHO.
ECHO. (按下任意键继续)
ECHO.***********************************************
ECHO.
pause>nul
goto FLASHING
:FLASHING
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO.
ECHO. 正在检查设备是否正常连接...
ECHO.
ECHO.
ECHO. (如果长时间停留在此界面,请检查:)
ECHO.
ECHO. 【1.USB线是否正确连接】
ECHO. 【2.电脑驱动是否正确安装并识别】
ECHO. 【3.手机是否进入fastboot模式】
ECHO.
ECHO. (并重启该工具)
ECHO.***********************************************
timeout /t 2 /nobreak >NUL
fastboot.exe wait-for-device >NUL 2>NUL
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO.
ECHO.
ECHO. 正在刷入recovery...
ECHO.
ECHO.
ECHO.***********************************************
ECHO.
ECHO. (若出现 OKAY 刷入成功,否则失败)
ECHO.
ECHO. (若长时间停留在此界面,请重启该工具)
ECHO.
rem fastboot.exe flash boot %rec_img_tmp%
fastboot.exe flash boot_a "%rec_img_tmp%" || goto FLASH_FAILED
fastboot.exe flash boot_b "%rec_img_tmp%"
fastboot.exe flash misc misc.bin >NUL 2>NUL
timeout /t 6 /nobreak >NUL
goto FLASH_OVER
:FLASH_FAILED
ECHO.
ECHO. !!出错!!
timeout /t 6 /nobreak >NUL
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO.
ECHO. 刷入失败!
ECHO.
ECHO. 1.请检查手机型号是否正确
ECHO. 2.请确认fastboot是否正常
ECHO. 3.解压后重新运行本程序,
ECHO. 若还不成功,请联系作者
ECHO.
ECHO. %rec_auth%感谢您使用本工具
ECHO.
ECHO. (按任意键退出程序)
ECHO.***********************************************
ECHO.
timeout /t 1 /nobreak >NUL
pause >NUL
EXIT
:FLASH_OVER
CLS
ECHO.
ECHO. %device_name% 一键刷入recovery工具
ECHO.***********************************************
ECHO.
ECHO. 刷写recovery完成
ECHO.
ECHO.
ECHO. 手机将重启进入%rec_name%的rec模式
ECHO. (可能会重启1-2次)
ECHO.
ECHO.
ECHO. %rec_auth%感谢您使用本工具
ECHO.
ECHO. (按任意键关闭此窗口)
ECHO.***********************************************
ECHO.
fastboot.exe reboot
pause >NUL
EXIT
Last edited by a moderator: