Hi,
I just tired to compile and repack the LL-Kernel for Z1c into a boot.img.
But I can't get it to start. I only see red LED blinken when I try to boot.
I used following sources:
http://developer.sonymobile.com/dow...rchives/open-source-archive-for-14-5-a-0-242/
And did it like it is mentioned in README_Xperia, which was all working fine and without errors.
Code:
### get defconfig
ARCH=arm CROSS_COMPILE=./arm-eabi-4.6/bin/arm-eabi- make rhine_amami_row_defconfig
### compile kernel
ARCH=arm CROSS_COMPILE=./arm-eabi-4.6/bin/arm-eabi- make
echo "checking for compiled kernel..."
if [ -f arch/arm/boot/zImage ]
then
echo "generating device tree..."
./dtbTool -o dt.img -s 2048 -p ./scripts/dtc/ ./arch/arm/boot/
echo "DONE"
fi
### D5503
./mkbootimg --cmdline "androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3b7 ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1 vmalloc=300M dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --base 0x00000000 --kernel arch/arm/boot/zImage --ramdisk ramdisk.cpio.gz --ramdisk_offset 0x02000000 -o boot.img --dt dt.img --tags_offset 0x01E00000
The ramdisk.img I got from http://forum.xda-developers.com/son...5-0-242-generic-1279-6978-pre-rooted-t3083764
And I extracted the boot.elf with "Andrid Kitchen", which was working almost:
Code:
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=de_DE.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: kernel.elf
Extracting 0
Extracting 1
Extracting 2
Everything is Ok
Files: 3
Size: 11304622
Compressed: 11308906
mv: call of stat for »3“ not possible: File or Directory not found
mv: call of stat for »cmdline.txt“ not possible: File or Directory not found
After that there was a ramdisk.img in output folder which I used for mkbootimg.
After getting boot.img I tried to flash/load it via fastboot, which was not working. Can't figuere aout why.
Bootloader is unlocked.
Code:
fastboot boot boot.img
downloading 'boot.img'...
OKAY [ 0.349s]
booting...
FAILED (status read failed (No such device))
finished. total time: 5.437s
Code:
fastboot flash boot boot.img
sending 'boot' (11044 KB)...
OKAY [ 0.349s]
writing 'boot'...
FAILED (remote: Command not allowed)
finished. total time: 0.352s
And because of that I tried to flash it via TWRP/CWM/... with following updater-script:
Code:
show_progress(0,0);
ui_print(" flashing boot.img...");
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
ui_print(" finished");
show_progress(10.000000, 1);
So maybe anyone can point me to mistake I make?
EDIT:
Problem solved and Kernel is working. I must have relocked my bootloader in the past and couldn't remember it^^
So now I was able to flash the boot.img via fastboot.
C:\adb>fastboot flashing unlock
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if fou
nd,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
C:\adb>
That means your version of fastboot doesn't understand the command. You'll need to update it.
when i type fastboot reboot fastboot my phone does nothing and that's what i get:
PS F:\ONEPLUS 7T\platform-tools_r30.0.4-windows\platform-tools> fastboot reboot fastboot
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
It seems like i do not enter fastbootd. any solution?
altojd said:
when i type fastboot reboot fastboot my phone does nothing and that's what i get:
PS F:\ONEPLUS 7T\platform-tools_r30.0.4-windows\platform-tools> fastboot reboot fastboot
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and
flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
It seems like i do not enter fastbootd. any solution?
Click to expand...
Click to collapse
Download latest fastboot version
Kollachi said:
Download latest fastboot version
Click to expand...
Click to collapse
Thanks but where do i find the latest fastboot version? if u mean fastboot.exe in platform tools i am on the latest one (r30.0.4)
altojd said:
Thanks but where do i find the latest fastboot version? if u mean fastboot.exe in platform tools i am on the latest one (r30.0.4)
Click to expand...
Click to collapse
Download the All in one tool from the forums here, it contains all of the drivers and files you need.
When you open up a command window, drag the fastboot.exe into command and then leave a space
Type fastboot reboot fastboot
Same thing happened with me it's weird but I use this is as a workaround
i solved my problem by flashing msm extended recovery. it has the function in advance to reach fastbootd.
Hi!
When im try to flash the firmware i recive that error:
"failed remote:failed to check sparse crc"
this is the first time i get that error....
any help?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Try to override checks by editing the batch command file.
Locate the batch command, open with your text editor, remove everything before something like "fastboot flash *** ***.img", run the command.
Try unofficial mi flash toolv2. It's best and lag free.
kekesed97 said:
Try to override checks by editing the batch command file.
Locate the batch command, open with your text editor, remove everything before something like "fastboot flash *** ***.img", run the command.
Click to expand...
Click to collapse
Hey!
Can u be more specific?
Also its weird....because im used many time the same firmware and i never received this error....
why im reveiving now that error and never in the past???
This is what FLASH ALL.BAT has:
also i want to know why i receiving that error if in the past i never received....
if exist %~dp0images\anti_version.txt (for /f "delims==" %%a in (%~dp0images\anti_version.txt) do (set CURRENT_ANTI_VER=%%a))
if [%CURRENT_ANTI_VER%] EQU [] set CURRENT_ANTI_VER=0
for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar anti 2^>^&1 ^| findstr /r /c:"anti:"') do (set version=%%i)
if [%version%] EQU [] set version=0
set anticheck="antirollback check pass"
if %version% GTR %CURRENT_ANTI_VER% set anticheck="Current device antirollback version is greater than this pakcage"
echo %anticheck% | findstr /r /c:"pass" || @ECHO "Antirollback check error" && exit /B 1
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *begonia" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *begonia" || exit /B 1
fastboot %* flash crclist %~dp0images\crclist.txt || @ECHO "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @ECHO "Flash sparsecrclist error" && exit /B 1
fastboot %* erase boot || @ECHO "Erase boot error" && exit /B 1
fastboot %* flash preloader %~dp0images\preloader_begonia.bin || @ECHO "Flash preloader error" && exit /B 1
fastboot %* flash lk %~dp0images\lk.img || @ECHO "Flash lk error" && exit /B 1
fastboot %* flash lk2 %~dp0images\lk.img || @ECHO "Flash lk2 error" && exit /B 1
fastboot %* flash tee1 %~dp0images\tee.img || @ECHO "Flash tee1 error" && exit /B 1
fastboot %* flash tee2 %~dp0images\tee.img || @ECHO "Flash tee2 error" && exit /B 1
fastboot %* flash sspm_1 %~dp0images\sspm.img || @ECHO "Flash sspm_1 error" && exit /B 1
fastboot %* flash sspm_2 %~dp0images\sspm.img || @ECHO "Flash sspm_2 error" && exit /B 1
fastboot %* flash gz1 %~dp0images\gz.img || @ECHO "Flash gz1 error" && exit /B 1
fastboot %* flash gz2 %~dp0images\gz.img || @ECHO "Flash gz2 error" && exit /B 1
fastboot %* flash scp1 %~dp0images\scp.img || @ECHO "Flash scp1 error" && exit /B 1
fastboot %* flash scp2 %~dp0images\scp.img || @ECHO "Flash scp2 error" && exit /B 1
fastboot %* flash logo %~dp0images\logo.bin || @ECHO "Flash logo error" && exit /B 1
fastboot %* flash dtbo %~dp0images\dtbo.img || @ECHO "Flash dtbo error" && exit /B 1
fastboot %* flash spmfw %~dp0images\spmfw.img || @ECHO "Flash spmfw error" && exit /B 1
fastboot %* flash exaid %~dp0images\exaid.img || @ECHO "Flash exaid error" && exit /B 1
fastboot %* flash oem_misc1 %~dp0images\oem_misc1.img || @ECHO "Flash oem_misc1 error" && exit /B 1
fastboot %* flash md1img %~dp0images\md1img.img || @ECHO "Flash md1img error" && exit /B 1
fastboot %* flash cam_vpu1 %~dp0images\cam_vpu1.img || @ECHO "Flash cam_vpu1 error" && exit /B 1
fastboot %* flash cam_vpu2 %~dp0images\cam_vpu2.img || @ECHO "Flash cam_vpu2 error" && exit /B 1
fastboot %* flash cam_vpu3 %~dp0images\cam_vpu3.img || @ECHO "Flash cam_vpu3 error" && exit /B 1
fastboot %* flash audio_dsp %~dp0images\audio_dsp.img || @ECHO "Flash audio_dsp error" && exit /B 1
fastboot %* flash vendor %~dp0images\vendor.img || @ECHO "Flash vendor error" && exit /B 1
fastboot %* flash system %~dp0images\system.img || @ECHO "Flash system error" && exit /B 1
fastboot %* flash cache %~dp0images\cache.img || @ECHO "Flash cache error" && exit /B 1
fastboot %* flash recovery %~dp0images\recovery.img || @ECHO "Flash recovery error" && exit /B 1
fastboot %* flash cust %~dp0images\cust.img || @ECHO "Flash cust error" && exit /B 1
fastboot %* flash vbmeta %~dp0images\vbmeta.img || @ECHO "Flash vbmeta error" && exit /B 1
fastboot %* flash userdata %~dp0images\userdata.img || @ECHO "Flash userdata error" && exit /B 1
fastboot %* flash boot %~dp0images\boot.img || @ECHO "Flash boot error" && exit /B 1
fastboot %* reboot || @ECHO "Reboot error" && exit /B 1
roberto_1986 said:
Hey!
Can u be more specific?
Also its weird....because im used many time the same firmware and i never received this error....
why im reveiving now that error and never in the past???
Click to expand...
Click to collapse
Don't use flash all. It will erase all the partition, including your data.
I was away from my computer so sorry if my answer is vague.
Erase everything before "fastboot erase boot || bla bla bla". It basically overriding checks.
kekesed97 said:
Don't use flash all. It will erase all the partition, including your data.
I was away from my computer so sorry if my answer is vague.
Erase everything before "fastboot erase boot || bla bla bla". It basically overriding checks.
Click to expand...
Click to collapse
Well ty but idk whats happened but i received another error but i was able to install the firmware on my phone and the weird thing is that was already unlocked it....then im flash again the firmware and i was able to install without problem
anyc solution on flash preloader error?
Hello guys, I created this account because I think I have bricked my Poco F3 badly, but you guys may know how to recover from this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
How did I get here:
This is the first time I try to install a custom rom on any Android phone, nevertheless I followed tutorials step by step on how to unlock the device (I waited 136 hours as instructed) and then I was able to install TWRP first to RAM, and then as a recovery tool as stated in the tutorial I followed. I tried installing LineageOS following this tutorial (in Spanish) but it got seemingly stuck at "step 2/2" stating: "to flash additional zips please reboot recovery", so then I rebooted but this is where things spiraled out of control... After rebooting I was greeted by LineageOS boot logo animation, but it didn't do boot even after 10 minutes, so then I attempted to reboot in recovery by pressing Vol Up+Power, but was greeted by a Recovery tool by LineageOS instead of TWRP, which didn't let me do anything, so then I though "maybe I should do a factory reset and start all over", after which the whole thing wiped.
Now when rebooting it always takes me to LineageOS recovery tool, but now my PC won't recognize the device as storage, it just recognizes it as "Android Bootloader Interface", but CMD doesn't recognize it anymore...
Any idea how to fix this mess? I'm kinda desperate at this point
donwload sdk platform tools
extract it
in file explorer url type cmd it will show cmd
hold power and volume down to your phone to boot it into fastboot
connect phone to pc
type in the opened cmd, fastboot devices
if your devices showed in cmd we can repair it back
try also downloading xiaomi flash tool latest and open the software click drivers on the upper right corner install all 5 drivers and try connecting your phone see if its detected on your device manager
Thank you for your quick response, cmd finally detected my phone, I got Mi Flash Tool but it got me a weird message in after installing drivers:
(hopefully it means it was successful) and it detects it as well!
Edit: Not sure what to do next, monkey brain tells me I should probably try installing TWRP again and see if it detects it as storage to try again and install LineageOS? Unless I can do that with Mi Flash Tool instead
HBMHD said:
Thank you for your quick response, cmd finally detected my phone, I got Mi Flash Tool but it got me a weird message in after installing drivers:
View attachment 5470215
(hopefully it means it was successful) and it detects it as well!
Click to expand...
Click to collapse
its in chinese character dont worry it is successful hahaha
go flash your stock rom before installing and perfecting your custom recovery and roms take note: before flashing stock rom tick clean flash dont flash it if its clean flash and relock bootloader
disregard my stock rom my phone is global variant choose your designated variant to flash
khazzey said:
disregard my stock rom my phone is global variant choose your designated variant to flash
Click to expand...
Click to collapse
Mine is too, I'm downloading it right now, will take a while.
This may be a silly question and idk if you know the answer of, but will my phone keep charging even if it's in Fastboot mode? It has been on for a few hours since attempting to fix and I don't want it to die in the middle of installing the stock rom, the damn thing won't turn off, every time I hold the power button it just turns on again into that LineageOS recovery tool
HBMHD said:
Mine is too, I'm downloading it right now, will take a while.
This may be a silly question and idk if you know the answer of, but will my phone keep charging even if it's in Fastboot mode? It has been on for a few hours since attempting to fix and I don't want it to die in the middle of installing the stock rom, the damn thing won't turn off, every time I hold the power button it just turns on again into that LineageOS recovery tool
Click to expand...
Click to collapse
it will definitely charge like the speed of micro usb like 2.0 amperes in fastboot only it charges too slow but it will keep your phone still alive dont worry after you flashed stock rom it will go back normal 33W
before i forgot you cant flash your stock rom, you need to install notepad ++ edit the extracted rom batch file clean flash all bat remove the first script, stop the editing for the first fastboot word you read to avoid anti rollback protection of xiaomi
khazzey said:
before i forgot you cant flash your stock rom, you need to install notepad ++ edit the extracted rom batch file clean flash all bat remove the first script, stop the editing for the first fastboot word you read to avoid anti rollback protection of xiaomi
Click to expand...
Click to collapse
I'm waiting for my file to download again to check that batch file... What I downloaded was "miui_ALIOTHGlobal_V12.5.4.0.RKHMIXM_76076865ce_11.0.zip" which I think it's a file meant for TWRP as it says "Recovery" and not Fastboot (which I didn't know was strictly different), I'm downloading the Fastboot version from here that has the same name as yours now, and then I'll see if I can figure out how to remove a script from a batch file; I was so not prepared for this, but I'm learning slowly lol.
Thank you for the explanations and warnings, I'll keep you and possible readers posted.
HBMHD said:
I'm waiting for my file to download again to check that batch file... What I downloaded was "miui_ALIOTHGlobal_V12.5.4.0.RKHMIXM_76076865ce_11.0.zip" which I think it's a file meant for TWRP as it says "Recovery" and not Fastboot (which I didn't know was strictly different), I'm downloading the Fastboot version from here that has the same name as yours now, and then I'll see if I can figure out how to remove a script from a batch file; I was so not prepared for this, but I'm learning slowly lol.
Thank you for the explanations and warnings, I'll keep you and possible readers posted.
Click to expand...
Click to collapse
thats the right rom you are downloading now the fastboot one after that extract it to drive C: of your pc in able to detect it from xiaomi flash after you downloaded and extracted it go back here i am going to teach you how to edit fastboot command line to avoid anti rollback
khazzey said:
thats the right rom you are downloading now the fastboot one after that extract it to drive C: of your pc in able to detect it from xiaomi flash after you downloaded and extracted it go back here i am going to teach you how to edit fastboot command line to avoid anti rollback
Click to expand...
Click to collapse
Finally, that took a while; I see the "flash_all.bat" file after extracting.
HBMHD said:
Finally, that took a while; I see the "flash_all.bat" file after extracting
Click to expand...
Click to collapse
edit it with notepad ++ save the first fastboot comand line upto last. then flash it ticking clean flash youre good to go
khazzey said:
edit it with notepad ++ save the first fastboot comand line upto last. then flash it ticking clean flash youre good to go
Click to expand...
Click to collapse
Sorry I got a bit lost there, what do I edit in Notepad++? Do I remove something or do I copy the first line and move it?
This is what's inside the batch file:
Code:
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *alioth" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *alioth" || exit /B 1
::check anti_version
if exist %~dp0images\anti_version.txt (for /f "delims==" %%a in (%~dp0images\anti_version.txt) do (set CURRENT_ANTI_VER=%%a))
if [%CURRENT_ANTI_VER%] EQU [] set CURRENT_ANTI_VER=0
for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar anti 2^>^&1 ^| findstr /r /c:"anti:"') do (set version=%%i)
if [%version%] EQU [] set version=0
set anticheck="antirollback check pass"
if %version% GTR %CURRENT_ANTI_VER% set anticheck="Current device antirollback version is greater than this pakcage"
echo %anticheck% | findstr /r /c:"pass" || @echo "Antirollback check error" && exit /B 1
fastboot %* erase boot_ab || @echo "Erase boot_ab error" && exit /B 1
fastboot %* flash crclist %~dp0images\crclist.txt || @echo "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @echo "Flash sparsecrclist error" && exit /B 1
fastboot %* flash xbl_ab %~dp0images\xbl.elf || @echo "Flash xbl_ab error" && exit /B 1
fastboot %* flash xbl_config_ab %~dp0images\xbl_config.elf || @echo "Flash xbl_config_ab error" && exit /B 1
fastboot %* flash abl_ab %~dp0images\abl.elf || @echo "Flash abl_ab error" && exit /B 1
fastboot %* flash tz_ab %~dp0images\tz.mbn || @echo "Flash tz_ab error" && exit /B 1
fastboot %* flash hyp_ab %~dp0images\hyp.mbn || @echo "Flash hyp_ab error" && exit /B 1
fastboot %* flash devcfg_ab %~dp0images\devcfg.mbn || @echo "Flash devcfg_ab error" && exit /B 1
fastboot %* flash storsec %~dp0images\storsec.mbn || @echo "Flash storsec error" && exit /B 1
fastboot %* flash bluetooth_ab %~dp0images\BTFM.bin || @echo "Flash bluetooth_ab error" && exit /B 1
fastboot %* flash cmnlib_ab %~dp0images\cmnlib.mbn || @echo "Flash cmnlib_ab error" && exit /B 1
fastboot %* flash cmnlib64_ab %~dp0images\cmnlib64.mbn || @echo "Flash cmnlib64_ab error" && exit /B 1
fastboot %* flash modem_ab %~dp0images\NON-HLOS.bin || @echo "Flash modem_ab error" && exit /B 1
fastboot %* flash dsp_ab %~dp0images\dspso.bin || @echo "Flash dsp_ab error" && exit /B 1
fastboot %* flash keymaster_ab %~dp0images\km41.mbn || @echo "Flash keymaster_ab error" && exit /B 1
fastboot %* flash logo %~dp0images\logo.img || @echo "Flash logo error" && exit /B 1
fastboot %* flash featenabler_ab %~dp0images\featenabler.mbn || @echo "Flash featenabler_ab error" && exit /B 1
fastboot %* flash aop_ab %~dp0images\aop.mbn || @echo "Flash aop_ab error" && exit /B 1
fastboot %* flash qupfw_ab %~dp0images\qupv3fw.elf || @echo "Flash qupfw_ab error" && exit /B 1
fastboot %* flash uefisecapp_ab %~dp0images\uefi_sec.mbn || @echo "Flash uefisecapp_ab error" && exit /B 1
fastboot %* flash multiimgoem_ab %~dp0images\multi_image.mbn || @echo "Flash multiimgoem_ab error" && exit /B 1
fastboot %* flash super %~dp0images\super.img || @echo "Flash super error" && exit /B 1
fastboot %* flash misc %~dp0images\misc.img || @echo "Flash misc error" && exit /B 1
fastboot %* flash vbmeta_ab %~dp0images\vbmeta.img || @echo "Flash vbmeta_ab error" && exit /B 1
fastboot %* flash dtbo_ab %~dp0images\dtbo.img || @echo "Flash dtbo_ab error" && exit /B 1
fastboot %* flash vbmeta_system_ab %~dp0images\vbmeta_system.img || @echo "Flash vbmeta_system_ab error" && exit /B 1
fastboot %* erase metadata || @echo "Erase metadata error" && exit /B 1
fastboot %* flash userdata %~dp0images\userdata.img || @echo "Flash userdata error" && exit /B 1
fastboot %* flash cust %~dp0images\cust.img || @echo "Flash cust error" && exit /B 1
fastboot %* erase imagefv_ab || @echo "Erase imagefv_ab error" && exit /B 1
fastboot %* flash imagefv_ab %~dp0images\imagefv.elf || @echo "Flash imagefv_ab error" && exit /B 1
fastboot %* flash rescue %~dp0images\rescue.img || @echo "Flash rescue error" && exit 1
fastboot %* flash spunvm %~dp0images\spunvm.bin || @echo "Flash spunvm error" && exit /B 1
fastboot %* flash vendor_boot_ab %~dp0images\vendor_boot.img || @echo "Flash vendor_boot_ab error" && exit /B 1
fastboot %* flash logfs %~dp0images\logfs_ufs_8mb.bin || @echo "Flash logfs error" && exit /B 1
fastboot %* flash boot_ab %~dp0images\boot.img || @echo "Flash boot_ab error" && exit /B 1
fastboot %* set_active a || @echo "Set active error" && exit /B 1
fastboot %* reboot || @echo "Reboot error" && exit /B 1
remove the first 10 lines
you shold save the fastboot erase boot_ab upto fastboot reboot
just save this only
dont forget to tick clean flash only dont lock your bootloader
update me if flashing is done