Install X820 Rom to X829 - LeEco Le Max 2 Questions & Answers

Hi guys,
I just want to ask if it is safe to install the X820 ROM with the unbrick tool ???

Hi,
why would there be a special tool needed? My x829 arrived bootloader unlocked and I installed twrp multirom and a few child roms fine
---------- Post added at 04:39 PM ---------- Previous post was at 04:39 PM ----------
Hi,
why would there be a special tool needed? My x829 arrived bootloader unlocked and I installed twrp multirom and a few child roms fine

mame76 said:
Hi,
why would there be a special tool needed? My x829 arrived bootloader unlocked and I installed twrp multirom and a few child roms fine
---------- Post added at 04:39 PM ---------- Previous post was at 04:39 PM ----------
Hi,
why would there be a special tool needed? My x829 arrived bootloader unlocked and I installed twrp multirom and a few child roms fine
Click to expand...
Click to collapse
I want to change the stock rom of the X829 to the X820 using QPST, is that possible ??

Do you want to add missing bands from x820 to x829?

Not only that but also OTA. I just want to know if i get my device bricked that this solution will work
http://www.leeco.re/topic/1856-tutorialx820-hard-brick-fix-qualcomm-hs-usb-qdloader-9008-issue/

I managed to find this ROMs also
https://bbs.le.com//zt/eui/le_max2.html

Yep its possible.
I can confirm that a x820 can be flashed onto a x829, (my friend did this and the his x829 device was shown as x820), based on this I think that you can flash x820 roms, although those extra bands may be locked but I have seen people unlock them, so have fun flashing!

I_Raptor_I said:
I can confirm that a x820 can be flashed onto a x829, (my friend did this and the his x829 device was shown as x820), based on this I think that you can flash x820 roms, although those extra bands may be locked but I have seen people unlock them, so have fun flashing!
Click to expand...
Click to collapse
Thank you so much :silly:

I just found a ROM flashable with fastboot. the flashing script is interesting
i.e. It is for X829
http://blog.geekbuying.com/2017/03/...smartphone-firmware-adding-language-software/
.\tools\fastboot.exe -s %1 devices
.\tools\fastboot.exe -s %1 getvar product 2>&1 | findstr /r /c:"^product: *MSM8996" || echo Missmatching image and device
.\tools\fastboot.exe -s %1 getvar product 2>&1 | findstr /r /c:"^product: *MSM8996" || exit /B 1
.\tools\fastboot.exe -s %1 flash ddr %~dp0images\ddr.mbn
.\tools\fastboot.exe -s %1 flash dsp %~dp0images\adspso.bin
.\tools\fastboot.exe -s %1 flash boot %~dp0images\boot.img
.\tools\fastboot.exe -s %1 flash bluetooth %~dp0images\BTFM.bin
.\tools\fastboot.exe -s %1 flash cmnlib %~dp0images\cmnlib.mbn
.\tools\fastboot.exe -s %1 flash cmnlibbak %~dp0images\cmnlib.mbn
.\tools\fastboot.exe -s %1 flash cmnlib64 %~dp0images\cmnlib64.mbn
.\tools\fastboot.exe -s %1 flash cmnlib64bak %~dp0images\cmnlib64.mbn
.\tools\fastboot.exe -s %1 flash devcfg %~dp0images\devcfg.mbn
.\tools\fastboot.exe -s %1 flash devinfo %~dp0images\devinfo.bin
.\tools\fastboot.exe -s %1 flash aboot %~dp0images\emmc_appsboot.mbn
.\tools\fastboot.exe -s %1 flash abootbak %~dp0images\emmc_appsboot.mbn
.\tools\fastboot.exe -s %1 flash hyp %~dp0images\hyp.mbn
.\tools\fastboot.exe -s %1 flash hypbak %~dp0images\hyp.mbn
.\tools\fastboot.exe -s %1 flash keymaster %~dp0images\keymaster.mbn
.\tools\fastboot.exe -s %1 flash keymasterbak %~dp0images\keymaster.mbn
.\tools\fastboot.exe -s %1 flash modem %~dp0images\NON-HLOS.bin
.\tools\fastboot.exe -s %1 flash pmic %~dp0images\pmic.elf
.\tools\fastboot.exe -s %1 flash pmicbak %~dp0images\pmic.elf
.\tools\fastboot.exe -s %1 flash rpm %~dp0images\rpm.mbn
.\tools\fastboot.exe -s %1 flash rpmbak %~dp0images\rpm.mbn
.\tools\fastboot.exe -s %1 flash splash %~dp0images\splash.img
.\tools\fastboot.exe -s %1 flash -S 100M system %~dp0images\system.img
.\tools\fastboot.exe -s %1 flash tz %~dp0images\tz.mbn
.\tools\fastboot.exe -s %1 flash tzbak %~dp0images\tz.mbn
.\tools\fastboot.exe -s %1 flash xbl %~dp0images\xbl.elf
.\tools\fastboot.exe -s %1 flash xblbak %~dp0images\xbl.elf
.\tools\fastboot.exe -s %1 -w
.\tools\fastboot.exe -s %1 reboot
exit

The device reboots to the 9008 Qualcomme Emergency download mode from adb
write the command : adb reboot edl ( just tested and it works)
to reboot your phone, presse the power button until it vibrates

Related

[Q] Fastboot commands only give menu - please advise.

Every time I try and run a fastboot command... it just shows the fastboot help menu.
"fastboot devices" = menu
"fastboot recovery c:\recovery-en-goapk-0630-1029.img" = menu
all i ever get is:
--------------------------------
Fastboot version 1.0
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot + recovery + system
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
reboot reboot device normally
reboot-bootloader reboot device into bootloader
setserial <serial> set the device serial number
setrev <rev> set the device hardware revision
options:
-w erase userdata and cache
-s <serial number> specify device serial number
-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
-n <page size> specify the nand page size. default:
2048
----------------------------------------------------
i am unlocked.
i am in fastboot mode on my phone
i have used fastboot before to install 2.3.4 and i had zero issues
Anyone know why this could be happening?
no reply yet?
"fastboot flash recovery c:\recovery-en-goapk-0630-1029.img"
nevermind... im an idiot.
DISREGARD!
lol it happens.
i actually figured it out right as you posted a reply. thanks a lot, though!
Writing recovery failed. Any idea????

Yureka Device hardbricked After Flashing CM12

HI all.
I was having cwm recovery and cm12 rom in yureka..... i decded to roll it back to kitkat but ended in soft brick......to get recover from that i tried so many ways and in 1 site they asked me to do below steps
fastboot -i 0x1ebf oem unlock
fastboot -i 0x1ebf erase modem
fastboot -i 0x1ebf erase boot
fastboot -i 0x1ebf erase recovery
fastboot -i 0x1ebf erase aboot
fastboot -i 0x1ebf erase abootbak
fastboot -i 0x1ebf erase hyp
fastboot -i 0x1ebf erase hypbak
fastboot -i 0x1ebf erase rpm
fastboot -i 0x1ebf erase rpmbak
fastboot -i 0x1ebf erase sbl1
fastboot -i 0x1ebf erase sbl1bak
fastboot -i 0x1ebf erase tz
fastboot -i 0x1ebf erase tzbak
fastboot -i 0x1ebf format system
fastboot -i 0x1ebf format userdata
fastboot -i 0x1ebf format cache
i stuck in this step fastboot -i 0x1ebf flash modem NON-HLOS.bin and the phone powered off and not powering on both in recovery mode nor in fast boot please help me out.........:crying::crying::crying:
bump...

Flash Moto One Action Please !

Good afternoon sirs !
I need some help from you regarding my one action bike.
I recently bought it linked to the telephone operator Claro (BR) which the last update he received was in October 2019 on Android version 9
PSBS29.21-20-7 version.
I can't upgrade to a later version and saw that on this site: https://mirrors.lolinet.com/firmware/moto/troika/official/AMXBR/ has a more current version ending 49-7-1. I wonder how do I install it either via RSD or ADB? Remembering! Need to unlock bootloader? Has anyone ever updated it otherwise?
Diogownz said:
Good afternoon sirs !
I need some help from you regarding my one action bike.
I recently bought it linked to the telephone operator Claro (BR) which the last update he received was in October 2019 on Android version 9
PSBS29.21-20-7 version.
I can't upgrade to a later version and saw that on this site: https://mirrors.lolinet.com/firmware/moto/troika/official/AMXBR/ has a more current version ending 49-7-1. I wonder how do I install it either via RSD or ADB? Remembering! Need to unlock bootloader? Has anyone ever updated it otherwise?
Click to expand...
Click to collapse
How are you! You must first have unlock bootloader and then flash the firmware with adb !!
Polnareff said:
How are you! You must first have unlock bootloader and then flash the firmware with adb !!
Click to expand...
Click to collapse
How are you! Exact! First you unlock the bootloader and then flash the firmware.
1) Install motorola drivers
2) download the adb
3) Extract the firmware in the adb folder
3) Enter fastboot mode on the cell phone (volume down + power)
4) Enter through the system symbol (plus two)
4.1 Put fastboot devices
4.2 copy all this ans paste:
%fastboot% oem fb_mode_set
%fastboot% flash pit diskmap.pit
%fastboot% flash fwbl1 fwbl1.nbl1.bin
%fastboot% flash ldfw_a ldfw.bin
%fastboot% flash ldfw_b ldfw.bin
%fastboot% flash keystorage_a keystorage.bin
%fastboot% flash keystorage_b keystorage.bin
%fastboot% flash bootloader_a bootloader.bin
%fastboot% flash bootloader_b bootloader.bin
%fastboot% flash modem_a modem.bin
%fastboot% flash vbmeta_a vbmeta.img
%fastboot% flash oem_a oem.img
%fastboot% flash oem_b oem_other.img
%fastboot% flash logo_a logo.bin
%fastboot% flash dtbo_a dtbo.img
%fastboot% flash boot_a boot.img
%fastboot% flash system_a system.img_sparsechunk.0
%fastboot% flash system_a system.img_sparsechunk.1
%fastboot% flash system_a system.img_sparsechunk.2
%fastboot% flash system_a system.img_sparsechunk.3
%fastboot% flash system_a system.img_sparsechunk.4
%fastboot% flash system_a system.img_sparsechunk.5
%fastboot% flash system_a system.img_sparsechunk.6
%fastboot% flash system_a system.img_sparsechunk.7
%fastboot% flash system_a system.img_sparsechunk.8
%fastboot% flash system_a system.img_sparsechunk.9
%fastboot% flash system_a system.img_sparsechunk.10
%fastboot% flash system_b system_other.img_sparsechunk.0
%fastboot% flash system_b system_other.img_sparsechunk.1
%fastboot% flash system_b system_other.img_sparsechunk.2
%fastboot% flash vendor_a vendor.img
%fastboot% erase cache
%fastboot% erase userdata
%fastboot% erase ddr
%fastboot% oem fb_mode_clear
%fastboot% reboot bootloader
This is more or less the method ... in the forum it is better explained! don't be scared !!!
Polnareff said:
How are you! Exact! First you unlock the bootloader and then flash the firmware.
1) Install motorola drivers
2) download the adb
3) Extract the firmware in the adb folder
3) Enter fastboot mode on the cell phone (volume down + power)
4) Enter through the system symbol (plus two)
4.1 Put fastboot devices
4.2 copy all this ans paste:
%fastboot% oem fb_mode_set
%fastboot% flash pit diskmap.pit
%fastboot% flash fwbl1 fwbl1.nbl1.bin
%fastboot% flash ldfw_a ldfw.bin
%fastboot% flash ldfw_b ldfw.bin
%fastboot% flash keystorage_a keystorage.bin
%fastboot% flash keystorage_b keystorage.bin
%fastboot% flash bootloader_a bootloader.bin
%fastboot% flash bootloader_b bootloader.bin
%fastboot% flash modem_a modem.bin
%fastboot% flash vbmeta_a vbmeta.img
%fastboot% flash oem_a oem.img
%fastboot% flash oem_b oem_other.img
%fastboot% flash logo_a logo.bin
%fastboot% flash dtbo_a dtbo.img
%fastboot% flash boot_a boot.img
%fastboot% flash system_a system.img_sparsechunk.0
%fastboot% flash system_a system.img_sparsechunk.1
%fastboot% flash system_a system.img_sparsechunk.2
%fastboot% flash system_a system.img_sparsechunk.3
%fastboot% flash system_a system.img_sparsechunk.4
%fastboot% flash system_a system.img_sparsechunk.5
%fastboot% flash system_a system.img_sparsechunk.6
%fastboot% flash system_a system.img_sparsechunk.7
%fastboot% flash system_a system.img_sparsechunk.8
%fastboot% flash system_a system.img_sparsechunk.9
%fastboot% flash system_a system.img_sparsechunk.10
%fastboot% flash system_b system_other.img_sparsechunk.0
%fastboot% flash system_b system_other.img_sparsechunk.1
%fastboot% flash system_b system_other.img_sparsechunk.2
%fastboot% flash vendor_a vendor.img
%fastboot% erase cache
%fastboot% erase userdata
%fastboot% erase ddr
%fastboot% oem fb_mode_clear
%fastboot% reboot bootloader
This is more or less the method ... in the forum it is better explained! don't be scared !!!
Click to expand...
Click to collapse
Thank you I will have to get with you when I got more time. I'm ready to r..t my phone. I'm sure I will need help. Thank you so much.

How To Guide [Tool] Flash Custom ROMs through Fastboot [mojito / sunny]

Are you struggling to install custom roms on this device?
Lots of recovery errors?
Can't boot to any rom?
Don't worry. Fastboot is a good way to avoid such nonsense...
Click to expand...
Click to collapse
{
"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"
}
Install any custom rom & miui recovery rom through fastboot
Steps:
1. Extract Fastboot OTA Tool. Put the ROM zip in it's root.
2. Run the flash script.
3. Wait till the script asks for device.
4. Boot device to fastboot & connect.
After Installation, it'll be headed to recovery:
You can format to start fresh (or)
Just boot up, for dirty flash way
Windows users:
Make sure you have usb drivers installed through manual method. This is done only once.
Refer this on how to install them... Download USB Drivers from here.
Linux users: Must have latest python & pip
For Ubuntu distros:
sudo apt install python python-pip
And have an alias into ~/.bashrc or ~/.bash_aliases file:
alias python=python3
For Arch based distros:
sudo pacman -S python python-pip
For Fedora:
sudo dnf install snapd python3.9 python3-pip
For Mac users, make sure you allow img2simg tool from Privacy & Security to work. Or Disable Gatekeeper temperorily.
Thanks to @LoV432 for his auto extraction idea.
& @lyoko_xana to bringup Mac issues.
If you have any trouble using this tool, please feel free to reply here...
Happy flashing
According to the script, it is used exclusively for pure flash.
Can you please make an option for upgrade (dirty flash) as well?
StaryMuz said:
According to the script, it is used exclusively for pure flash.
Can you please make an option for upgrade (dirty flash) as well?
Click to expand...
Click to collapse
It does dirty flash bydefault (caz it doesn't affect data partition). It'll be clean flash only when you wipe from recovery at post install...
I've edited post & clarified this...
this tool doesn't seem to work with xiaomi eu roms
sahbimath said:
this tool doesn't seem to work with xiaomi eu roms
Click to expand...
Click to collapse
Currently, it's only for OTA based roms, that have payload.bin in it.
I'll update the script for eu roms too when I get time.
sahbimath said:
this tool doesn't seem to work with xiaomi eu roms
Click to expand...
Click to collapse
Done adding the scripts for miui roms. Check it out & confirm if that works.
...testing it next time when I upgrade or change rom
Zirila said:
...testing it next time when I upgrade or change rom
Click to expand...
Click to collapse
K
Anybody with the m12.0.11 OTA update for sunny Global?
seunlayi said:
Anybody with the m12.0.11 OTA update for sunny Global?
Click to expand...
Click to collapse
I don't think it's the right place to ask.
but why ?
This adds auto rom extraction to the OTA based script. So you just put the rom zip in the root directory and the script auto extracts it.
Disclaimer: I have no actual knowledge of this so theres a 50/50 chance this might nuke your pc or something
I will try this tool later , it seem promising coz it has dirty flash feature , it is very tiring when the only option is clean flash/no internal data after that
Newer update.
Fastboot_OTA_20210715
Instructions in the main thread.
Changelog (2021-07-15):
- Auto Extraction support (Thanks to @LoV432 for the idea)
- Merged updater script & payload extractions
- Fixed "Partition does not exist" error
- Updated flash instructions for linux & mac
If you have trouble working with fastboot for windows, follow this guide if you're ok installing manually
Script error.
Vendor is entered only as Vendor, not as Vendor_a or Vendor_b.
The script did everything correctly after editing.
tools\fastboot %* delete-logical-partition vendor
tools\fastboot %* create-logical-partition vendor 4096
And then flash to a/b:
tools\fastboot %* flash -w system_a output\system.img
tools\fastboot %* flash system_ext_a output\system_ext.img
tools\fastboot %* flash -w system_b output\system.img
tools\fastboot %* flash system_ext_b output\system_ext.img
tools\fastboot %* flash product_a output\product.img
tools\fastboot %* flash product_b output\product.img
StaryMuz said:
Script error.
Vendor is entered only as Vendor, not as Vendor_a or Vendor_b.
The script did everything correctly after editing.
tools\fastboot %* delete-logical-partition vendor
tools\fastboot %* create-logical-partition vendor 4096
And then flash to a/b:
tools\fastboot %* flash -w system_a output\system.img
tools\fastboot %* flash system_ext_a output\system_ext.img
tools\fastboot %* flash -w system_b output\system.img
tools\fastboot %* flash system_ext_b output\system_ext.img
tools\fastboot %* flash product_a output\product.img
tools\fastboot %* flash product_b output\product.img
Click to expand...
Click to collapse
Fastbootd already capable of retrieving active slot through get-active-slot implicitly & flash it to inactive slot. No need to explicitly declare & flash on a specific slot.
It's mandatory for physical partitions, not for logical partitions.
Also, explicit declaration is a bad practice
I was wrong about Vendor.
I flashed PE+ and the system did not load afterwards.
After editing the following, it worked.
tools\fastboot -w %* flash system_a output\system.img
tools\fastboot %* flash system_ext_a output\system_ext.img
tools\fastboot -w %* flash system_b output\system.img
tools\fastboot %* flash system_ext_b output\system_ext.img
tools\fastboot %* flash product_a output\product.img
tools\fastboot %* flash product_b output\product.img
tools\fastboot %* flash vendor_a output\product.img
tools\fastboot %* flash vendor_b output\product.img
But that's not right either.
I found out that:
Slot B should not flash during an update, only during a full ROM install.
For the update, it is flash to slot A, from where the running system updates itself (running from slot B).
The instructions executed during full flash and update should therefore be adapted to this.
Full flash to both B and A.
Update to A only.
If the update then fails, the system can roll back.
EDIT: scripts
I edited your script to flash only to A and only to B.:
Spoiler: Only to B
@Echo off
cd "%~dp0"
echo This is a recovery rom installation script for Windows
mkdir output
tools\7za.exe x *.zip -aos
if exist payload.bin if not exist output\vendor.img (
echo.
echo Extracting images from the build...
tools\payload_dumper.exe payload.bin
)
if exist dynamic_partitions_op_list (
echo.
echo Decompressing system
tools\bin\brotli.exe -d system.new.dat.br
echo Decompressing system_ext
tools\bin\brotli.exe -d system_ext.new.dat.br
echo Decompressing product
tools\bin\brotli.exe -d product.new.dat.br
echo Decompressing vendor
tools\bin\brotli.exe -d vendor.new.dat.br
echo Unpacking all the images...
tools\bin\sdat2img.exe system.transfer.list system.new.dat output\system.img
tools\bin\sdat2img.exe system_ext.transfer.list system_ext.new.dat output\system_ext.img
tools\bin\sdat2img.exe product.transfer.list product.new.dat output\product.img
tools\bin\sdat2img.exe vendor.transfer.list vendor.new.dat output\vendor.img
)
echo.
echo Checking fastboot version. If it's not v31 or above, you're screwed...!
tools\fastboot %* --version
echo.
echo Flashing stock boot for mojito
fastboot --set-active=a
tools\fastboot %* flash boot_b tools\boot_mojito.img
fastboot --set-active=b
echo Booting to fastbootd
tools\fastboot %* reboot fastboot
fastboot --set-active=a
echo.
echo Removing existing logical partitions only slot B ...
tools\fastboot %* delete-logical-partition vendor_b
tools\fastboot %* delete-logical-partition system_b
tools\fastboot %* delete-logical-partition system_ext_b
tools\fastboot %* delete-logical-partition product_b
echo.
echo Creating new logical partitions...
tools\fastboot %* create-logical-partition vendor_b 4096
tools\fastboot %* create-logical-partition system_b 4096
tools\fastboot %* create-logical-partition system_ext_b 4096
tools\fastboot %* create-logical-partition product_b 4096
echo.
echo Flashing the ROM...
echo Just ignore the below sparse file errors...
tools\fastboot -w %* flash system_b output\system.img
tools\fastboot %* flash system_ext_b output\system_ext.img
tools\fastboot %* flash product_b output\product.img
tools\fastboot %* flash vendor_b output\vendor.img
echo.
echo Flashing boot partitions...
tools\fastboot %* reboot bootloader
tools\fastboot %* flash boot_b output\boot.img
tools\fastboot %* flash vendor_boot_b output\vendor_boot.img
fastboot --set-active=b
echo.
echo Cleaning Stuff...
rmdir /q /s META-INF output
del /f *.img *.br *.dat *.list payload.bin care_map.pb payload_properties.txt dynamic_partitions_op_list
echo.
echo Done. Rebooting to recovery...
timeout 1 > nul
echo ...3...
timeout 1 > nul
echo ..2..
timeout 1 > nul
echo .1.
timeout 1 > nul
tools\fastboot %* reboot recovery
echo Done...
pause
Spoiler: Only to A
@Echo off
cd "%~dp0"
echo This is a recovery rom installation script for Windows
mkdir output
tools\7za.exe x *.zip -aos
if exist payload.bin if not exist output\vendor.img (
echo.
echo Extracting images from the build...
tools\payload_dumper.exe payload.bin
)
if exist dynamic_partitions_op_list (
echo.
echo Decompressing system
tools\bin\brotli.exe -d system.new.dat.br
echo Decompressing system_ext
tools\bin\brotli.exe -d system_ext.new.dat.br
echo Decompressing product
tools\bin\brotli.exe -d product.new.dat.br
echo Decompressing vendor
tools\bin\brotli.exe -d vendor.new.dat.br
echo Unpacking all the images...
tools\bin\sdat2img.exe system.transfer.list system.new.dat output\system.img
tools\bin\sdat2img.exe system_ext.transfer.list system_ext.new.dat output\system_ext.img
tools\bin\sdat2img.exe product.transfer.list product.new.dat output\product.img
tools\bin\sdat2img.exe vendor.transfer.list vendor.new.dat output\vendor.img
)
echo.
echo Checking fastboot version. If it's not v31 or above, you're screwed...!
tools\fastboot %* --version
echo.
echo Flashing stock boot for mojito
fastboot --set-active=b
tools\fastboot %* flash boot_a tools\boot_mojito.img
fastboot --set-active=a
echo Booting to fastbootd
tools\fastboot %* reboot fastboot
fastboot --set-active=b
echo.
echo Removing existing logical partitions only slot A ...
tools\fastboot %* delete-logical-partition vendor_a
tools\fastboot %* delete-logical-partition system_a
tools\fastboot %* delete-logical-partition system_ext_a
tools\fastboot %* delete-logical-partition product_a
echo.
echo Creating new logical partitions...
tools\fastboot %* create-logical-partition vendor_a 4096
tools\fastboot %* create-logical-partition system_a 4096
tools\fastboot %* create-logical-partition system_ext_a 4096
tools\fastboot %* create-logical-partition product_a 4096
echo.
echo Flashing the ROM...
echo Just ignore the below sparse file errors...
tools\fastboot -w %* flash system_a output\system.img
tools\fastboot %* flash system_ext_a output\system_ext.img
tools\fastboot %* flash product_a output\product.img
tools\fastboot %* flash vendor_a output\vendor.img
echo.
echo Flashing boot partitions...
tools\fastboot %* reboot bootloader
tools\fastboot %* flash boot_a output\boot.img
tools\fastboot %* flash vendor_boot_a output\vendor_boot.img
fastboot --set-active=a
echo.
echo Cleaning Stuff...
rmdir /q /s META-INF output
del /f *.img *.br *.dat *.list payload.bin care_map.pb payload_properties.txt dynamic_partitions_op_list
echo.
echo Done. Rebooting to recovery...
timeout 1 > nul
echo ...3...
timeout 1 > nul
echo ..2..
timeout 1 > nul
echo .1.
timeout 1 > nul
tools\fastboot %* reboot recovery
echo Done...
pause
StaryMuz said:
I was wrong about Vendor.
I flashed PE+ and the system did not load afterwards.
After editing the following, it worked.
tools\fastboot -w %* flash system_a output\system.img
tools\fastboot %* flash system_ext_a output\system_ext.img
tools\fastboot -w %* flash system_b output\system.img
tools\fastboot %* flash system_ext_b output\system_ext.img
tools\fastboot %* flash product_a output\product.img
tools\fastboot %* flash product_b output\product.img
tools\fastboot %* flash vendor_a output\product.img
tools\fastboot %* flash vendor_b output\product.img
But that's not right either.
I found out that:
Slot B should not flash during an update, only during a full ROM install.
For the update, it is flash to slot A, from where the running system updates itself (running from slot B).
The instructions executed during full flash and update should therefore be adapted to this.
Full flash to both B and A.
Update to A only.
If the update then fails, the system can roll back.
EDIT: scripts
I edited your script to flash only to A and only to B.:
Spoiler: Only to B
@Echo off
cd "%~dp0"
echo This is a recovery rom installation script for Windows
mkdir output
tools\7za.exe x *.zip -aos
if exist payload.bin if not exist output\vendor.img (
echo.
echo Extracting images from the build...
tools\payload_dumper.exe payload.bin
)
if exist dynamic_partitions_op_list (
echo.
echo Decompressing system
tools\bin\brotli.exe -d system.new.dat.br
echo Decompressing system_ext
tools\bin\brotli.exe -d system_ext.new.dat.br
echo Decompressing product
tools\bin\brotli.exe -d product.new.dat.br
echo Decompressing vendor
tools\bin\brotli.exe -d vendor.new.dat.br
echo Unpacking all the images...
tools\bin\sdat2img.exe system.transfer.list system.new.dat output\system.img
tools\bin\sdat2img.exe system_ext.transfer.list system_ext.new.dat output\system_ext.img
tools\bin\sdat2img.exe product.transfer.list product.new.dat output\product.img
tools\bin\sdat2img.exe vendor.transfer.list vendor.new.dat output\vendor.img
)
echo.
echo Checking fastboot version. If it's not v31 or above, you're screwed...!
tools\fastboot %* --version
echo.
echo Flashing stock boot for mojito
fastboot --set-active=a
tools\fastboot %* flash boot_b tools\boot_mojito.img
fastboot --set-active=b
echo Booting to fastbootd
tools\fastboot %* reboot fastboot
fastboot --set-active=a
echo.
echo Removing existing logical partitions only slot B ...
tools\fastboot %* delete-logical-partition vendor_b
tools\fastboot %* delete-logical-partition system_b
tools\fastboot %* delete-logical-partition system_ext_b
tools\fastboot %* delete-logical-partition product_b
echo.
echo Creating new logical partitions...
tools\fastboot %* create-logical-partition vendor_b 4096
tools\fastboot %* create-logical-partition system_b 4096
tools\fastboot %* create-logical-partition system_ext_b 4096
tools\fastboot %* create-logical-partition product_b 4096
echo.
echo Flashing the ROM...
echo Just ignore the below sparse file errors...
tools\fastboot -w %* flash system_b output\system.img
tools\fastboot %* flash system_ext_b output\system_ext.img
tools\fastboot %* flash product_b output\product.img
tools\fastboot %* flash vendor_b output\vendor.img
echo.
echo Flashing boot partitions...
tools\fastboot %* reboot bootloader
tools\fastboot %* flash boot_b output\boot.img
tools\fastboot %* flash vendor_boot_b output\vendor_boot.img
fastboot --set-active=b
echo.
echo Cleaning Stuff...
rmdir /q /s META-INF output
del /f *.img *.br *.dat *.list payload.bin care_map.pb payload_properties.txt dynamic_partitions_op_list
echo.
echo Done. Rebooting to recovery...
timeout 1 > nul
echo ...3...
timeout 1 > nul
echo ..2..
timeout 1 > nul
echo .1.
timeout 1 > nul
tools\fastboot %* reboot recovery
echo Done...
pause
Spoiler: Only to A
@Echo off
cd "%~dp0"
echo This is a recovery rom installation script for Windows
mkdir output
tools\7za.exe x *.zip -aos
if exist payload.bin if not exist output\vendor.img (
echo.
echo Extracting images from the build...
tools\payload_dumper.exe payload.bin
)
if exist dynamic_partitions_op_list (
echo.
echo Decompressing system
tools\bin\brotli.exe -d system.new.dat.br
echo Decompressing system_ext
tools\bin\brotli.exe -d system_ext.new.dat.br
echo Decompressing product
tools\bin\brotli.exe -d product.new.dat.br
echo Decompressing vendor
tools\bin\brotli.exe -d vendor.new.dat.br
echo Unpacking all the images...
tools\bin\sdat2img.exe system.transfer.list system.new.dat output\system.img
tools\bin\sdat2img.exe system_ext.transfer.list system_ext.new.dat output\system_ext.img
tools\bin\sdat2img.exe product.transfer.list product.new.dat output\product.img
tools\bin\sdat2img.exe vendor.transfer.list vendor.new.dat output\vendor.img
)
echo.
echo Checking fastboot version. If it's not v31 or above, you're screwed...!
tools\fastboot %* --version
echo.
echo Flashing stock boot for mojito
fastboot --set-active=b
tools\fastboot %* flash boot_a tools\boot_mojito.img
fastboot --set-active=a
echo Booting to fastbootd
tools\fastboot %* reboot fastboot
fastboot --set-active=b
echo.
echo Removing existing logical partitions only slot A ...
tools\fastboot %* delete-logical-partition vendor_a
tools\fastboot %* delete-logical-partition system_a
tools\fastboot %* delete-logical-partition system_ext_a
tools\fastboot %* delete-logical-partition product_a
echo.
echo Creating new logical partitions...
tools\fastboot %* create-logical-partition vendor_a 4096
tools\fastboot %* create-logical-partition system_a 4096
tools\fastboot %* create-logical-partition system_ext_a 4096
tools\fastboot %* create-logical-partition product_a 4096
echo.
echo Flashing the ROM...
echo Just ignore the below sparse file errors...
tools\fastboot -w %* flash system_a output\system.img
tools\fastboot %* flash system_ext_a output\system_ext.img
tools\fastboot %* flash product_a output\product.img
tools\fastboot %* flash vendor_a output\vendor.img
echo.
echo Flashing boot partitions...
tools\fastboot %* reboot bootloader
tools\fastboot %* flash boot_a output\boot.img
tools\fastboot %* flash vendor_boot_a output\vendor_boot.img
fastboot --set-active=a
echo.
echo Cleaning Stuff...
rmdir /q /s META-INF output
del /f *.img *.br *.dat *.list payload.bin care_map.pb payload_properties.txt dynamic_partitions_op_list
echo.
echo Done. Rebooting to recovery...
timeout 1 > nul
echo ...3...
timeout 1 > nul
echo ..2..
timeout 1 > nul
echo .1.
timeout 1 > nul
tools\fastboot %* reboot recovery
echo Done...
pause
Click to expand...
Click to collapse
You're wrong about many other things. I don't encourage manual slot selection. Fastboot decides this based on the current active slot...
You shouldn't flash the updates through manual slot selection, that's not how A/B partition scheme works.
It is possible that I did not understand all the processes correctly, but your tool did not work as it should for me with PE+.
Everything that preceded it:
- In a functional old version of PE+, I did an OTA update.
- After a reboot, the system should have updated, but it was left hanging in the system loading (even for tens of minutes).
- So I made a dirty flash using your tool. Without a factory reset, I booted the system, but it still hung in startup. During the flash process, it seemed to me that something was flash only to the A slot, and something to both A and B. This led me to the idea of editing the flash slots manually.
- So I had system, system_ext, product and vendor flashed into both slots. This resulted in the system booting without factory settings. However, the system started as new, without data and settings.
- I then experimented a bit and uploaded using flash to A, then flash to B, different systems. If I ran the last flash A system, it worked. Then I changed the active slot to the first flash B slot and also the second system started. But the other system started updating and performed some action. It kept working. I rebooted into the active A slot again, but the previous A system no longer started.
There must be a bug somewhere in the current use of updates and flash custom ROMs.
StaryMuz said:
It is possible that I did not understand all the processes correctly, but your tool did not work as it should for me with PE+.
Everything that preceded it:
- In a functional old version of PE+, I did an OTA update.
- After a reboot, the system should have updated, but it was left hanging in the system loading (even for tens of minutes).
- So I made a dirty flash using your tool. Without a factory reset, I booted the system, but it still hung in startup. During the flash process, it seemed to me that something was flash only to the A slot, and something to both A and B. This led me to the idea of editing the flash slots manually.
- So I had system, system_ext, product and vendor flashed into both slots. This resulted in the system booting without factory settings. However, the system started as new, without data and settings.
- I then experimented a bit and uploaded using flash to A, then flash to B, different systems. If I ran the last flash A system, it worked. Then I changed the active slot to the first flash B slot and also the second system started. But the other system started updating and performed some action. It kept working. I rebooted into the active A slot again, but the previous A system no longer started.
There must be a bug somewhere in the current use of updates and flash custom ROMs.
Click to expand...
Click to collapse
Everything works for me & the users on telegram support groups too.
For dirty flash to work properly, updated slot also must have the same set of ROM, magisk, kernel, boot, it's modules, etc... That you've used in your last rom
It's always recommended that keep backups of everything especially for this device as A/B is still very new to the developers.
I can't install gapps with all available recoveries, it keeps giving me the not enough space error

Magisk/Recovery in official rom Android 12+ (Oxygen/ColorOS )

1. Extract rom.zip and get payload.bin
2. Extract payload_drumper-win64 (attach)
3. Put payload.bin in folder payload_drumper-win64
4. Run payload_dumper.exe​
Spoiler: 5.1 Flash Recovery (method #1)
fastboot -w (erase all data)
fastboot flash boot magisk.img
fastboot flash recovery OrangeFox.img
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
fastboot flash vbmeta_system --disable-verity --disable-verification vbmeta_system.img
start recovery (key +)
Spoiler: 5.2 Flash recovery (method #2)
fastboot -w
fastboot reboot fastboot
fastboot flash boot boot.img
fastboot flash recovery OrangeFox.img
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
fastboot flash vbmeta_system --disable-verity --disable-verification vbmeta_system.img
fastboot reboot bootloader
start recovery (key +)
Spoiler: bonus - Full script
@Echo off
title Oxygen OS 11/12 OnePlus a/b Fastboot ROM by DKPOST3
ECHO ############################################################################
ECHO # OxygenOS 11/12 FASTBOOT ROM INSTALLER FOR ONEPLUS a/b BY DKPOST3 #
ECHO ##############################
ECHO # SETTING ACTIVE SLOT TO A #
fastboot --set-active=a
ECHO #######################
ECHO # FORMATTING DATA #
fastboot -w
ECHO ###############################
ECHO # FLASHING RECOVERY IMAGE #
fastboot flash recovery recovery.img
ECHO ############################
ECHO # REBOOTING TO FASTBOOTD #
fastboot reboot fastboot
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash --slot=all abl abl.img
fastboot flash --slot=all aop aop.img
fastboot flash --slot=all bluetooth bluetooth.img
fastboot flash --slot=all cmnlib64 cmnlib64.img
fastboot flash --slot=all cmnlib cmnlib.img
fastboot flash --slot=all devcfg devcfg.img
fastboot flash --slot=all dsp dsp.img
fastboot flash --slot=all featenabler featenabler.img
fastboot flash --slot=all hyp hyp.img
fastboot flash --slot=all imagefv imagefv.img
fastboot flash --slot=all keymaster keymaster.img
fastboot flash --slot=all logo logo.img
fastboot flash --slot=all mdm_oem_stanvbk mdm_oem_stanvbk.img
fastboot flash --slot=all modem modem.img
fastboot flash --slot=all multiimgoem multiimgoem.img
fastboot flash --slot=all qupfw qupfw.img
fastboot flash --slot=all spunvm spunvm.img
fastboot flash --slot=all storsec storsec.img
fastboot flash --slot=all tz tz.img
fastboot flash --slot=all uefisecapp uefisecapp.img
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
fastboot flash vbmeta_system --disable-verity --disable-verification vbmeta_system.img
ECHO #################################
ECHO # RESIZING LOGICAL PARTITIONS #
fastboot delete-logical-partition my_carrier_a
fastboot delete-logical-partition my_carrier_b
fastboot delete-logical-partition my_company_a
fastboot delete-logical-partition my_company_b
fastboot delete-logical-partition my_engineering_a
fastboot delete-logical-partition my_engineering_b
fastboot delete-logical-partition my_heytap_a
fastboot delete-logical-partition my_heytap_b
fastboot delete-logical-partition my_manifest_a
fastboot delete-logical-partition my_manifest_b
fastboot delete-logical-partition my_preload_a
fastboot delete-logical-partition my_preload_b
fastboot delete-logical-partition my_product_a
fastboot delete-logical-partition my_product_b
fastboot delete-logical-partition my_region_a
fastboot delete-logical-partition my_region_b
fastboot delete-logical-partition my_stock_a
fastboot delete-logical-partition my_stock_b
fastboot delete-logical-partition my_bigball_a
fastboot delete-logical-partition my_bigball_b
fastboot delete-logical-partition odm_a
fastboot delete-logical-partition odm_b
fastboot delete-logical-partition system_a
fastboot delete-logical-partition system_b
fastboot delete-logical-partition system_ext_a
fastboot delete-logical-partition system_ext_b
fastboot delete-logical-partition product_a
fastboot delete-logical-partition product_b
fastboot delete-logical-partition vendor_a
fastboot delete-logical-partition vendor_b
fastboot create-logical-partition my_carrier_a 1
fastboot create-logical-partition my_carrier_b 1
fastboot create-logical-partition my_company_a 1
fastboot create-logical-partition my_company_b 1
fastboot create-logical-partition my_engineering_a 1
fastboot create-logical-partition my_engineering_b 1
fastboot create-logical-partition my_heytap_a 1
fastboot create-logical-partition my_heytap_b 1
fastboot create-logical-partition my_manifest_a 1
fastboot create-logical-partition my_manifest_b 1
fastboot create-logical-partition my_preload_a 1
fastboot create-logical-partition my_preload_b 1
fastboot create-logical-partition my_product_a 1
fastboot create-logical-partition my_product_b 1
fastboot create-logical-partition my_region_a 1
fastboot create-logical-partition my_region_b 1
fastboot create-logical-partition my_stock_a 1
fastboot create-logical-partition my_stock_b 1
fastboot create-logical-partition my_bigball_a 1
fastboot create-logical-partition my_bigball_b 1
fastboot create-logical-partition vendor_a 1
fastboot create-logical-partition vendor_b 1
fastboot create-logical-partition product_a 1
fastboot create-logical-partition product_b 1
fastboot create-logical-partition system_a 1
fastboot create-logical-partition system_b 1
fastboot create-logical-partition system_ext_a 1
fastboot create-logical-partition system_ext_b 1
fastboot create-logical-partition odm_a 1
fastboot create-logical-partition odm_b 1#
ECHO # FLASHING LOGICAL PARTITIONS #
ECHO ###############################
fastboot flash vendor vendor.img
fastboot flash product product.img
fastboot flash system system.img
fastboot flash system_ext system_ext.img
fastboot flash my_carrier my_carrier.img
fastboot flash my_manifest my_manifest.img
fastboot flash my_preload my_preload.img
fastboot flash my_product my_product.img
fastboot flash my_region my_region.img
fastboot flash my_stock my_stock.img
fastboot flash my_bigball my_bigball.img
fastboot flash my_company my_company.img
fastboot flash my_engineering my_engineering.img
fastboot flash my_heytap my_heytap.img
fastboot flash odm odm.img
ECHO ###############
ECHO # REBOOTING #
fastboot reboot
pause

Categories

Resources