How To Guide How to Flash GSI on Moto g62 5g - Moto G62 5G

Download your GSI image. (if u want gapps install pixelexperience)
Download platform tools i attached
Unlock bootloader (If you have unlocked bootloader skip this step.). guide how to unlock bootloader here https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a/
After unlocking bootloader we can go to installing our GSI.
Boot to bootloader. to boot to bootloader turn off phone and press volume down + power button
After doing that you need to boot to fastbootd write "fastboot reboot fastboot" in platform tools
If there is a screen with bold red text written "fastbootd" we can go to erasing data and system partitions.
now u need to Flash vbmeta.img : "fastboot --disable-verification flash vbmeta vbmeta.img" and wait until it says OK
If we did that we can erase system partition by typing in fastboot "fastboot erase system" If it says OK we can go to the next step
If we get "CANNOT RESIZE SYSTEM PARTITION" do this: "fastboot delete-logical-partition product_a" and "fastboot delete-logical-partition product_b"
Now it's time to flash our GSI. To do that just type "fastboot --u flash system *name of your gsi*.img
And wait until it flashes and !!!!DO NOT REBOOT!!!!!
After successful flash we need to type "fastboot -w" and then go to recovery do factory data reset
And now you can reboot.
if u don't know what rom to install this rom linked here https://drive.google.com/file/d/1UsCY-gsn3rU4JpefOMMoIMzYdC-rsr_K/view?usp=sharing is 100% working list of other roms for this phone is here https://forum.xda-developers.com/t/...g-gsis-for-moto-g62-5g.4600029/#post-88688661
(The files i meant like vbmeta and platform tools are attached to thread)

Related

Stuck on fastboot ,no recovery with locked bootlaoder

I unlocked the bootloader install TWRP , then into recovery I wiped all data , but can't install the ROM I want to install.
I tried to use the toolkit to fix but somehow the bootloader was relocked again, I can't unlocked or flash any recovery , my phone just stuck on the fastboot with no OS on it.
Would not let me flash anything as it's locked.
Tried fastboot boot ... no lucky.
Any fix?
jasonnew said:
I unlocked the bootloader install TWRP , then into recovery I wiped all data , but can't install the ROM I want to install.
I tried to use the toolkit to fix but somehow the bootloader was relocked again, I can't unlocked or flash any recovery , my phone just stuck on the fastboot with no OS on it.
Would not let me flash anything as it's locked.
Tried fastboot boot ... no lucky.
Any fix?
Click to expand...
Click to collapse
Download the fastboot image from the link below.
http://builds.cyngn.com/factory/bacon/cm-11.0-XNPH38R-bacon-signed-fastboot.zip
Code:
"fastboot flash modem NON-HLOS.bin"
"fastboot flash sbl1 sbl1.mbn"
"fastboot flash dbi sdi.mbn"
"fastboot flash aboot emmc_appsboot.mbn"
"fastboot flash rpm rpm.mbn"
"fastboot flash tz tz.mbn"
"fastboot flash LOGO logo.bin"
"fastboot flash boot boot.img"
"fastboot flash cache cache.img"
"fastboot flash recovery recovery.img"
"fastboot flash system system.img"
"fastboot flash userdata userdata.img" (or userdata_64g.img for 64G version)
"fastboot oem lock"
"fastboot reboot"
Skip the fasboot oem lock if you do not want to relock the bootloader.
Stop using toolkit
Toolkit is for noobs
Download fastboot drivers
Put your phone in fastboot
Then in fastboot prompt > Fastboot oem unlock
Then flash the rom by that command
"fastboot flash modem NON-HLOS.bin"
"fastboot flash sbl1 sbl1.mbn"
"fastboot flash dbi sdi.mbn"
"fastboot flash aboot emmc_appsboot.mbn"
"fastboot flash rpm rpm.mbn"
"fastboot flash tz tz.mbn"
"fastboot flash LOGO logo.bin"
"fastboot flash boot boot.img"
"fastboot flash cache cache.img"
"fastboot flash recovery recovery.img"
"fastboot flash system system.img"
"fastboot flash userdata userdata.img" (or userdata_64g.img for 64G version)
"fastboot oem lock"
"fastboot reboot"
Remove ('')
I found the fix already thru opo forum by download ing the color OS fix tool which Can flash back to color OS
Thanks very much for all replies above.
jasonnew said:
I found the fix already thru opo forum by download ing the color OS fix tool which Can flash back to color OS
Click to expand...
Click to collapse
Can you give me a link to it because I'm in a similar situation?
I formatted my phone bymistake now it has no os installed. i am on twrp and its 54gb free memory. what should i do
tried to use the toolkit to fix but somehow the bootloader was relocked again, I can't unlocked or flash any recovery , my phone just stuck on the fastboot with no OS on it
And not installing the driver only showing driver "Microsoft device association root enumerator". So plz hlp me how to install my opo driver

[Nexus, Bricked] After fastboot flash bootloader ~ , The phone doesn't work at all

I wanted to install custom recovery system on my phone.
So I tried fastboot with recovery image
what I did is this
1. Download recovery image
2. fastboot oem unlock
3. fastboot flash recovery recovery.img
then again it seems I got an error
the error was
Your device is corrupt. It can't be trusted and may not work properly
so I tried to reinstall OS
the step was this
1. fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot erase userdata
fastboot oem unlock
fastboot flash bootloader ~(img file download it from google)
but suddenly it doesn't work anymore
doesn't work any button....
what should I do now..

[GUIDE] Rooting the UMIDIGI F2 | Magisk | TWRP

This is an attempt at rooting the UMIDIGI F2. Caution be advised, we are not responsible for your mistakes; but rest assured, most of them can be corrected.
Rooting the F2
Disclaimers
This is important, please read thoughtfully.
whatever you do, never ever use SP Flash Tool in "Format All+Download" mode. This will wipe your IMEIs and some other bad stuff will happen like loss of fingerprint sensor. This cannot be reversed by us.
Once bootloader is unlocked, warranty is considered void. By following this guide, you consent to that happening. Safety net CTS will not pass anymore unless you flash Magisk which hides the unlocked bootloader.
Never relock your bootloader while running anything unofficial as the phone will not boot until you unlock again.
And, once again, a lot of bad things can happen like bootloops, if that happens to you don't freak out and reflash stock, redoing the rooting process from the start. It might be time consuming, but that's your safest bet!
More important even, have fun rooting, it's before all a hobby!
Various Resources
>>> Latest official stock ROM <<<
Minimal ADB and Fastboot by shimp208
> Magisk (and Manager) by topjohnwu <
Mediatek SP Flash Tool
Latest unofficial TWRP
Unlocking Bootloader
ATTENTION!! After unlocking the bootloader, all user data in the phone's memory will be lost, so do not forget to throw all the most important things on your computer or flash drive!
1) Activate "Developer options" through Settings > About Phone > Tap Build Number multiple times.
2) Open "Developer options" in Settings > System > Tap Advanced.
Enable "OEM Unlocking" and enter your password to confirm. Enable "USB Debugging" as well.
3) On Windows, download and install Minimal ADB and Fastboot by shimp208
On Linux, use your packet manager to install android-tools-adb and android-tools-fastboot
4) Open command prompt (Win + R > type cmd) or a terminal on linux.
5) Plug your phone, accept the prompt about adb and the PC signature.
6) Type adb reboot bootloader to reboot in fastboot mode.
THESE NEXT TWO STEPS WILL COMPLETELY WIPE YOUR DATA
7) Unlock the bootloader using fastboot flashing unlock and pressing Vol+
8) Unlock the secure partitions using fastboot flashing unlock_critical and pressing Vol+
9) Restart using fastboot reboot
You will now always see "Orange State" at boot; this is completely fine and will only delay your boot by 5 seconds.
Rooting using Magisk patched boot.img
This is "experimental" and is probably overkill, but everyone managed to install Magisk with it.
1) Clean install UMIDIGI_F2_V1.0_20200106.V3.08 with SPFT by selecting the scatter file, pressing download an rebooting the phone (Make sure it is in "Download Mode" and not "Format + Download")
2) Patch boot.img by copying it to your device, using Magisk Manager to patch it, and get back the magisk_patched.img in the Download folder back to your PC.
3) Start ADB while booted; run adb reboot bootloader. Alternative is to reboot to recovery and selecting "reboot to bootloader"
4) unlock if not already done with fastboot flashing unlock followed by fastboot flashing unlock_critical
You can try without --disable-verity --disable-verification if those commands are not recognized. I have not tested without them.
6) fastboot --disable-verity --disable-verification flash boot magisk_patched.img
7) fastboot --disable-verity --disable-verification flash recovery recovery.img (recovery.img from stock)
8) fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img (vbmeta.img from stock)
9) fastboot reboot
When rebooting, install Magisk Manager. It will prompt to finalize the installation, you can do so.
Congratulations ! You are now a proud Magisk user ! All credits goes to @topjohnwu he's the real MVP here.
Returning to stock / Resolving issues
The best way to resolve any issue is to return to stock. Here is the method.
1) Download latest stock ROM ("SPFT .zip") on UMIDIGI's forums
2) Download SP Flash Tool if you don't have it yet (Windows only)
3) Extract stock ROM in SP Flash Tool directory
4) Open SP Flash Tool, Download Tab, "Choose" in Scatter-loading file, select the scatter file in the stock ROM directory.
5) If you want to keep your data, untick "userdata" partition
6) Press Download and connect your device via USB. Reboot the phone or turn it off and everything will be flashed.
7) If you want a full stock experience, I recommend relocking the bootloader so that SafetyNet will pass. Get into fastboot mode by using adb reboot bootloader and use fastboot flashing lock_critical followed by fastboot flashing lock. This will wipe your data once more.
You should be good to go.
TWRP
Device Tree
>> Download my latest build here <<
Flash in Bootloader mode with fastboot flash recovery twrp_f2.img
Android 10 and TWRP aren't compatible yet. /system and /vendor cannot be mounted. /data partition is encrypted. You can still flash .img and some zips that alter different partitions. Nothing I can do about it.
Misc
Different boot modes
Recovery / TWRP :
Turn off the phone (or reboot)
Press Vol+ and Power until some choice comes up to you
Navigate using Vol+, select Recovery Mode using Vol-
Bootloader mode :
Boot into TWRP, select Reboot, Bootloader
Or use adb reboot bootloader either in recovery or system
Or use fastboot reboot-bootloader in fastboot mode
Magisk and EdXposed
Fixing Magisk bootloop
Two techniques that could work after installing a module that broke everything :
Hook your device up to a computer (or other device you can run adb from) and execute the following command:
adb wait-for-device shell magisk --remove-modules
After that you can start your device and as soon as adb is available the command will activate, the modules will be removed and the device will reboot.
Click to expand...
Click to collapse
-----
You could also try :
If you can't boot your device, this can be done by placing a file in /cache (/data/cache on A/B devices) named ".disable_magisk" (without quotation marks and with the leading dot). This will enable Core Only Mode and you can boot up your device, uninstall the troublesome module and then go into the Manager settings, disable Core Only Mode and reboot. In TWRP you can create the file through the TWRP terminal with the touch command, see below for an example.
Click to expand...
Click to collapse
Installing EdXposed
Please use the latest YAHFA or Sandhook canary build. I have a report of Xposed-SandHook-v0.4.6.1 (4504)-tdgptedc-release working.
_cab13_ said:
This is an attempt at rooting the UMIDIGI F2. For now, unsuccessful. Any help would be appreciated!
Click to expand...
Click to collapse
ATTENTION!! After unlocking the bootloader, all user data in the phone's memory will be lost, so do not forget to throw all the most important things on your computer or flash drive!
1) Activate the "for developers" item in the settings (7 times click on the "build number" in the "about phone" settings at the bottom)
2) Go to "Settings"(the main screen of the application) go to "for developers" and move the switches to the enabled position near the items "USB Debugging" and " Unlocking the bootloader"
3) Then download platform tools from here https://developer.andr...eleases/platform-tools
4) Unpack the archive from platform tools to the root of the C: drive(so that the platform-tools folder is in the root of the C drive: )
5) if the process does not go install VCOM driver
6) Switch your smartphone to fastboot mode:
6.1) connect the included phone to the computer
6.2) Open the command prompt
6.2.1) Click Win+R
6.2.2) in the window that appears, write "cmd" and click " OK"
6.3) in the command line when the phone is turned on, write(without quotes)
6.3.1) " cd " (note that there is a space after "cd") and drag the "platform-tools" folder with the cursor to the command line window, press Enter
6.3.2) the Following command "adb reboot bootloader"
6.3.3) Your phone should reboot into Fastboot mode or a window should appear on the phone asking for debugging permission for this computer - put a check mark "Always allow debugging from this computer" and click "OK", repeat point 6.3.2
7) After that, on the computer in the same command line, enter " fastboot flashing unlock"
8) when the smartphone screen will prompt confirm by pressing vol+
9) after you see Finished, restart your device
Now the logo will be labeled Orange state when loading
I've rooted my F2. I used magisk to patch the boot.img then flashed the boot.img through fastboot on Linux. It didn't work with magisk 20.1. Had to used the newest magisk manager. I am interested in your twrp if you have one to try. Would you upload it so I may try to flash it.
Please upload your patched boot.img file. Thanks
I would love to have that boot image as well! What magisk version did you use then ? I can start crafting a guide.
EDIT: what boxes did you tick in Magisk Manager ?
EDIT 2: did you pad the boot image with DD ? Or maybe you wiped the boot partition beforehand to make it all zeroes ? It seems to be the missing thing and a known bug in Magisk.
Magisk 20.2 was what I used. Then flashed the boot through fastboot using Debian Linux.
Rooted f2 boot IMG
I've tried everything to get it rooted but any magisk patched boot image I flash just sends it into a bootloop including the one posted in this thread. It doesn't matter whether I flash it in Linux or Windows, in fastboot or in SP Flash Tool. What stock build are you guys on, the European or the Global? It seems that the boot.img is the same in both.
Apparently the issue is that the bootloader really doesn't like the fact that the image is not the full size of the partition. I'll try to dd it to the "max" size so it completely replaces the boot image and not only parts of it.
Seems to be an issue with the bootloader which doesn't like being flashed with a smaller boot image than it's partition size. Could you try padding it ? https://github.com/topjohnwu/Magisk/issues/2005
With this command
Code:
dd if=/dev/zero of=magisk_patched.img bs=1 count=1 seek=33554431
EDIT: Double post, my internet is pretty bad, I thought the first one didn't go. Can't delete apparently.
When I unlocked the bootloader I also unlocked critical areas
fastboot flashing unlock_critical
Warning---- this will wipe your phone again just like the bootloader unlock.
Haha seems to be the key to it ! Thanks for the update !
I've tried everything as well. Still bootloop. Your patched image doesn't work for me. I've unlocked critical as well as regular unlock.
1. Did you tick any box in Magisk Manager ?
2. Did you relock afterwards ?
3. What firmware version ?
I downloaded the new update today and I haven't been able to root the boot.IMG so far. I will keep trying and note anything that is successful.
GOOD NEWS ! I managed to make it work, I don't really know how, but I now have Magisk 20.2 installed. Here is what I did.
1) Clean install UMIDIGI_F2_V1.0_20200106.V3.08 with SPFT
2) Download the f2rootedboot file from zironia
3) Start ADB while booted; run adb reboot bootloader
4) unlock if not already done with fastboot flashing unlock followed by fastboot flashing unlock_critical
5) I flashed a bunch of partitions with dm-verity disabled.
6) fastboot --disable-verity --disable-verification flash boot f2rootedboot.img
7) fastboot --disable-verity --disable-verification flash recovery recovery.img
8) fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
9) fastboot --disable-verity --disable-verification flash super super.img
10) fastboot --disable-verity --disable-verification flash tee1 tee.img
11) fastboot --disable-verity --disable-verification flash tee2 tee.img
12) fastboot --disable-verity --disable-verification flash cache cache.img
13)/!\ WILL RESET DATA : fastboot --disable-verity --disable-verification flash userdata userdata.img
13) fastboot reboot
I'm really not sure if you really need all that hassle, but that made it work for me. PLEASE USE FASTBOOT FROM BOOTLOADER (adb reboot bootloader, or choose "Reboot in Bootloader" in recovery / fastbootd)
_cab13_ said:
GOOD NEWS ! I managed to make it work, I don't really know how, but I now have Magisk 20.2 installed. Here is what I did.
1) Clean install UMIDIGI_F2_V1.0_20200106.V3.08 with SPFT
2) Download the f2rootedboot file from zironia
3) Start ADB while booted; run adb reboot bootloader
4) unlock if not already done with fastboot flashing unlock followed by fastboot flashing unlock_critical
5) I flashed a bunch of partitions with dm-verity disabled.
6) fastboot --disable-verity --disable-verification flash boot f2rootedboot.img
7) fastboot --disable-verity --disable-verification flash recovery recovery.img
8) fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
9) fastboot --disable-verity --disable-verification flash super super.img
10) fastboot --disable-verity --disable-verification flash tee1 tee.img
11) fastboot --disable-verity --disable-verification flash tee2 tee.img
12) fastboot --disable-verity --disable-verification flash cache cache.img
13)/!\ WILL RESET DATA : fastboot --disable-verity --disable-verification flash userdata userdata.img
13) fastboot reboot
I'm really not sure if you really need all that hassle, but that made it work for me. PLEASE USE FASTBOOT FROM BOOTLOADER (adb reboot bootloader, or choose "Reboot in Bootloader" in recovery / fastbootd)
Click to expand...
Click to collapse
This worked for me to reroot after the update today. Not sure what part of it is necessary for the boot image to work right though. I left off the userdata.img so I could keep my files in place.
_cab13_ said:
GOOD NEWS ! I managed to make it work, I don't really know how, but I now have Magisk 20.2 installed. Here is what I did.
1) Clean install UMIDIGI_F2_V1.0_20200106.V3.08 with SPFT
2) Download the f2rootedboot file from zironia
3) Start ADB while booted; run adb reboot bootloader
4) unlock if not already done with fastboot flashing unlock followed by fastboot flashing unlock_critical
5) I flashed a bunch of partitions with dm-verity disabled.
6) fastboot --disable-verity --disable-verification flash boot f2rootedboot.img
7) fastboot --disable-verity --disable-verification flash recovery recovery.img
8) fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
9) fastboot --disable-verity --disable-verification flash super super.img
10) fastboot --disable-verity --disable-verification flash tee1 tee.img
11) fastboot --disable-verity --disable-verification flash tee2 tee.img
12) fastboot --disable-verity --disable-verification flash cache cache.img
13)/!\ WILL RESET DATA : fastboot --disable-verity --disable-verification flash userdata userdata.img
13) fastboot reboot
I'm really not sure if you really need all that hassle, but that made it work for me. PLEASE USE FASTBOOT FROM BOOTLOADER (adb reboot bootloader, or choose "Reboot in Bootloader" in recovery / fastbootd)
Click to expand...
Click to collapse
Confirmed working, thanks. I ended up patching the new boot.img myself and that also worked. I own a Note 10 + and OnePlus 7 Pro and honestly I think the Umidigi is an awesome deal, everything is pretty good on the device. It's something I wanted to try out and I'm actually impressed.
Did one of you already tried some treble roms on the f2? lineagOS, Havoc 3.0 or aosp?
ubuntuh said:
Did one of you already tried some treble roms on the f2? lineagOS, Havoc 3.0 or aosp?
Click to expand...
Click to collapse
Currently there is no twrp recovery for the f2. I've tried a couple ports of twrp but can't get past the splash screen.
We don't need TWRP to flash ROMs. Fastboot / SPFT should suffice.
_cab13_ said:
We don't need TWRP to flash ROMs. Fastboot / SPFT should suffice.
Click to expand...
Click to collapse
True. Twrp just makes it quicker and has easier backup option

How To Guide Restore OnePlus 9 to Stock via Fastboot Commands

This guide assumes you have the SDK Platform Tools installed and working, along with USB drivers for your device (if needed), and have your full update zip which you've already extracted the payload.bin from, and then dumped the images using payload dumper. If you haven't done any of these things yet, there are plenty of other guides out there on how to do them.
Steps:
1. Reboot your device to the bootloader (power off, then hold volume up + power) and connect it to USB.
2. The following command will wipe your device. I found this to be necessary to recover my OnePlus 9:
Code:
fastboot -w
3. Now flash the following files:
Code:
fastboot flash boot boot.img
fastboot flash cpucp cpucp.img
fastboot flash dtbo dtbo.img
fastboot flash modem modem.img
fastboot flash oplusstanvbk oplusstanvbk.img
fastboot flash oplus_sec oplus_sec.img
fastboot flash qweslicstore qweslicstore.img
fastboot flash shrm shrm.img
fastboot flash splash splash.img
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_vendor vbmeta_vendor.img
fastboot flash vbmeta_system vbmeta_system.img
fastboot flash vendor_boot vendor_boot.img
fastboot flash vm-bootsys vm-bootsys.img
4. Now reboot into userspace fastboot, aka fastbootd. If you don't do this, the remaining files cannot be flashed:
Code:
fastboot reboot fastboot
5. Flash the remaining files:
Code:
fastboot flash abl abl.img
fastboot flash aop aop.img
fastboot flash bluetooth bluetooth.img
fastboot flash devcfg devcfg.img
fastboot flash dsp dsp.img
fastboot flash featenabler featenabler.img
fastboot flash hyp hyp.img
fastboot flash imagefv imagefv.img
fastboot flash keymaster keymaster.img
fastboot flash multiimgoem multiimgoem.img
fastboot flash qupfw qupfw.img
fastboot flash tz tz.img
fastboot flash uefisecapp uefisecapp.img
fastboot flash xbl xbl.img
fastboot flash xbl_config xbl_config.img
fastboot flash product product.img
fastboot flash system system.img
fastboot flash system_ext system_ext.img
fastboot flash vendor vendor.img
fastboot flash odm odm.img
6. Final reboot:
Code:
fastboot reboot
7. If everything worked your phone should now boot into OxygenOS.
Note:
The files will be flashed to your currently active boot slot. If any of them fail to flash, switch to the other slot and start over from the beginning. I wasn't able to flash odm, product, system, system_ext and vendor to slot a, and had to use slot b instead. To check current slot:
Code:
fastboot getvar current-slot
To switch slots:
Code:
fastboot --set-active=a
or
Code:
fastboot --set-active=b
Use this guide at your own risk. I take no responsibility if you brick your device, set it on fire, or otherwise mess it up as a result of any of the above steps. That being said, it worked for me using 11.2.2.2.LE25AA available from the official OnePlus support website.
If you want, you can do the flashing easily with powershell, rather than running each command one after the other. Here is what I did:
1. Have fastboot.exe in your path, or in the same folder as all your extracted images. Open powershell and navigate to the folder with your boot images. Connect your phone to USB.
2. This will wipe your device! Reboot to the bootloader and run:
Code:
fastboot -w
3. Run:
Code:
gci -filter *.img | where {$_.Name.split('.')[0] -match 'boot|cpucp|dtbo|modem|oplusstanvbk|oplus_sec|qweslicstore|shrm|splash|vbmeta|vbmeta_vendor|vbmeta_system|vendor_boot|vm-bootsys'} | foreach-object { fastboot.exe flash $($_.Name.split('.')[0]) $_.Name }
4. Run:
Code:
fastboot reboot fastboot
5. Run:
Code:
gci -filter *.img | where {$_.Name.split('.')[0] -match 'abl|aop|bluetooth|devcfg|dsp|featenabler|hyp|imagefv|keymaster|multiimgoem|qupfw|tz|uefisecapp|xbl|xbl_config|product|system|system_ext|vendor|odm'} | foreach-object { fastboot.exe flash $($_.Name.split('.')[0]) $_.Name }
6. Run:
Code:
fastboot reboot
7. Proceed to boot normally.
The commands in steps 3 and 5 get a list of all files in the current directory with the .img extension, filter them to the correct ones to flash, and then flash them one after another.
If someone wants, I can probably throw together a script to run the whole process start to finish.
Edit: script attached. I've (unfortunately) had the opportunity to test it and fix all the bugs. So it works. You will need to have fastboot.exe accessible in your system PATH to run it.
Slikkster2k said:
If you want, you can do the flashing easily with powershell, rather than running each command one after the other. Here is what I did:
1. Have fastboot.exe in your path, or in the same folder as all your extracted images. Open powershell and navigate to the folder with your boot images. Connect your phone to USB.
2. Reboot to the bootloader and run:
Code:
fastboot -w
This will wipe your device!
3. Run:
Code:
gci -filter *.img | where {$_.Name.split('.')[0] -match 'boot|cpucp|dtbo|modem|oplusstanvbk|oplus_sec|qweslicstore|shrm|splash|vbmeta|vbmeta_vendor|vbmeta_system|vendor_boot|vm-bootsys'} | foreach-object { fastboot.exe flash $($_.Name.split('.')[0]) $_.Name }
4. Run:
Code:
fastboot reboot fastboot
5. Run:
Code:
gci -filter *.img | where {$_.Name.split('.')[0] -match 'abl|aop|bluetooth|devcfg|dsp|featenabler|hyp|imagefv|keymaster|multiimgoem|qupfw|tz|uefisecapp|xbl|xbl_config|product|system|system_ext|vendor|odm'} | foreach-object { fastboot.exe flash $($_.Name.split('.')[0]) $_.Name }
6. Run:
Code:
fastboot reboot bootloader
7. Proceed to boot normally.
The commands in steps 3 and 5 get a list of all files in the current directory with the .img extension, filter them to the correct ones to flash, and then flash them one after another.
If someone wants, I can probably throw together a script to run the whole process start to finish.
Click to expand...
Click to collapse
That would be helpful indeed. Would this script run on mac as well?
Not unless there's a version of PowerShell for macs (there is for Linux, but I don't know if it's compatible).
@Slikkster2k: I tried your tutorial. At first it did not work...serveral errors occure during copying one file. On the second run I had to change the slot, than it runs through.
But now I am in a boot loop, during starting the oxygen.
While wiping I got this message:
Code:
fastboot: error: Cannot generate image for userdata
Which version of the OS did you use?
I tried to install the actual european rom (11.2.3.3) on my indian device from china but this obviously did not work. Do you have any suggestions for me?
AxelM said:
@Slikkster2k: I tried your tutorial. At first it did not work...serveral errors occure during copying one file. On the second run I had to change the slot, than it runs through.
But now I am in a boot loop, during starting the oxygen.
While wiping I got this message:
Code:
fastboot: error: Cannot generate image for userdata
Which version of the OS did you use?
I tried to install the actual european rom (11.2.3.3) on my indian device from china but this obviously did not work. Do you have any suggestions for me?
Click to expand...
Click to collapse
I used 11.2.2.2.LE25AA as I said in the original post (this is the global variant, which matches my device). I am not sure if this works for cross-flashing, or if it's possible to cross-flash an Indian phone to EU. Have you tried restoring the Indian ROM? Does that work?
You're getting an actual boot loop? The error I was getting (and the reason I had to restore) was the phone booting to the bootloader or fastbootd (depending on the slot I tried) instead of Oxygen, because it couldn't mount the user partition due to encryption. In fastbootd an error was reported (I forget the exact one) which made me suspect it was a partition mounting issue. At no point was my phone actually boot looping, even during partial/failed flashes.
I've never encountered the error with fastboot -w, but I only did that on my phone once. From some searching online, it can be caused by an old version of the platform tools, so did you download the latest version?
@Slikkster2k: First of all, thank you for providing help
In deed, what worked was the indian first version. This i could flash and from there on everything works. Up to OS and than installing the latest european os. Now everything ist fine...
The error while whiping did not occure while using the indian version...so no clue why...
But now it works for me, thank you!
AxelM said:
@Slikkster2k: First of all, thank you for providing help
In deed, what worked was the indian first version. This i could flash and from there on everything works. Up to OS and than installing the latest european os. Now everything ist fine...
The error while whiping did not occure while using the indian version...so no clue why...
But now it works for me, thank you!
Click to expand...
Click to collapse
Glad to hear you got it working!
PowerShell script added to second post. Totally untested, but I tried to make it as idiot proof as possible.
Slikkster2k said:
This guide assumes you have the SDK Platform Tools installed and working, along with USB drivers for your device (if needed), and have your full update zip which you've already extracted the payload.bin from, and then dumped the images using payload dumper. If you haven't done any of these things yet, there are plenty of other guides out there on how to do them.
Steps:
1. Reboot your device to the bootloader (power off, hold volume up + power) and connect it to USB.
2. The following command will wipe your device. I found this to be necessary to recover my OnePlus 9:
Code:
fastboot -w
3. Now flash the following files:
Code:
fastboot flash boot boot.img
fastboot flash cpucp cpucp.img
fastboot flash dtbo dtbo.img
fastboot flash modem modem.img
fastboot flash oplusstanvbk oplusstanvbk.img
fastboot flash oplus_sec oplus_sec.img
fastboot flash qweslicstore qweslicstore.img
fastboot flash shrm shrm.img
fastboot flash splash splash.img
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_vendor vbmeta_vendor.img
fastboot flash vbmeta_system vbmeta_system.img
fastboot flash vendor_boot vendor_boot.img
fastboot flash vm-bootsys vm-bootsys.img
4. Now reboot into userspace fastboot, aka fastbootd. If you don't do this, the remaining files cannot be flashed:
Code:
fastboot reboot fastboot
5. Flash the remaining files:
Code:
fastboot flash abl abl.img
fastboot flash aop aop.img
fastboot flash bluetooth bluetooth.img
fastboot flash devcfg devcfg.img
fastboot flash dsp dsp.img
fastboot flash featenabler featenabler.img
fastboot flash hyp hyp.img
fastboot flash imagefv imagefv.img
fastboot flash keymaster keymaster.img
fastboot flash multiimgoem multiimgoem.img
fastboot flash qupfw qupfw.img
fastboot flash tz tz.img
fastboot flash uefisecapp uefisecapp.img
fastboot flash xbl xbl.img
fastboot flash xbl_config xbl_config.img
fastboot flash product product.img
fastboot flash system system.img
fastboot flash system_ext system_ext.img
fastboot flash vendor vendor.img
fastboot flash odm odm.img
6. Reboot back into the bootloader:
Code:
fastboot reboot bootloader
7. You should now be able to continue booting normally by pressing the power button.
Note:
The files will be flashed to your currently active boot slot. If any of them fail to flash, switch to the other slot and start over from the beginning. I wasn't able to flash odm, product, system, system_ext and vendor to slot a, and had to use slot b instead. To switch slots:
Code:
fastboot --set-active=a
or
Code:
fastboot --set-active=b
Use this guide at your own risk. I take no responsibility if you brick your device, set it on fire, or otherwise mess it up as a result of any of the above steps. That being said, it worked for me using 11.2.2.2.LE25AA available from the official OnePlus support website.
Click to expand...
Click to collapse
My phone has been weird for a week or so occasionally freezing up and saying system ui has crashed or something so I followed these instructions last night to completely wipe and reset everything (after backing up). It worked perfectly!
My only suggestion would be for step 7 to be:
fastboot reboot
Since we're already using fastboot it's just quicker and less fiddly than using the power button
toyanucci said:
That would be helpful indeed. Would this script run on mac as well?
Click to expand...
Click to collapse
Windows offered now to add to MAC - https://support.apple.com/en-us/HT201468
toyanucci said:
My phone has been weird for a week or so occasionally freezing up and saying system ui has crashed or something so I followed these instructions last night to completely wipe and reset everything (after backing up). It worked perfectly!
My only suggestion would be for step 7 to be:
fastboot reboot
Since we're already using fastboot it's just quicker and less fiddly than using the power button
Click to expand...
Click to collapse
Thanks, updated OP.
ok i kind of bricked my phone using this and i need a little help PLEASE?
Ok i tried the fist 2 steps 1. fastboot -w than the first list of commands using cmd with admin rights it worked...i think but it did load everything without issues...now i go to do the "fastboot reboot fastboot"
and now my phone is stuck on a black screen with nothing and i just hear the chime windows makes when you disconnect and reconnect a device..... and in the Device manager this comes up for 10 seconds than goes away for 5 than comes back NON STOP
i cant adb i cant do anything please help !
I'm not sure if this will help you, but I had a lot of issues initially running this. First off you need to use the Oneplus drivers, I don't think the qualcom driver will work the same way. I could be wrong, but that's what I did. Secondly, you need to force install the driver because Windows doesn't like it.
Here are the steps I took.
1. Uninstall any old drivers.
2. Install the newest Oneplus Drivers from here https://oneplususbdrivers.com/
3. Extract the zip file and run the installer like normal
4. Once the installer finishes, you'll need to reboot your machine and bring up the Startup settings (hold down shift and reboot (keep holding down shift until you get a screen with options)) Then click advanced and startup settings and hit restart after that. Once the machines starts up, on the first boot you will have a bunch of options. Choose option 7 "disabling driver signature enforcement" mode.
5. Once Windows launches and you login, go back into the device manager and follow these steps:
right click the device --> update driver
Browse my computer for drivers
Let me pick from a list of available drivers on my computer
Show all Devices --> Next
Have Disk (Button)
Navigate to where you installed Oneplus drivers (Default: C:\Program Files (x86)\OnePlus USB Drivers)
Select "OnePlus_android_winusb.inf"
Select "Oneplus Android Bootloader Interface" and then just hit next/OK until it installs.
You might need to reboot after doing the above, but this worked for me.
----------------------------------------
The above should get your drivers working properly in all modes (adb, fastbootd, bootloader, normal)
One other issue that I ran into when I was using the powershell script was that I was seeing intermittent errors. After trial and error I realized that Windows was picking up a different version of fastboot. I was initially using the minimal adb/fastboot files, but if you compare those to the ones listed in the first post in the "SDK Platform Tools", they are very different from each other, so you need to make sure you use the SDK Platform Tools version. The minimal ADB/Fastboot version will NOT work.
After I got those 2 things ironed out, the powershell script ran without a hiccup and my phone is stock and booting without an issue.
I know I'm late to respond to this thread, but I hope someone finds this information helpful!
Mine keeps trying this and it isn't running and or rebooting into Fastbootd when the script is ran. Should I just try and invoke this manually? I've tried that as well an I'm seeming to get errors left and right with no resolve.
I'd say try it manually and see where the errors happen. Does it boot into fastbootd at all?
Good work
toyanucci said:
I'd say try it manually and see where the errors happen. Does it boot into fastbootd at all?
Click to expand...
Click to collapse
Actually, I ended up making my phone hard bricked to the point where it doesn’t even turn on at this point. I’m just going to send it in for repair, which is nothing short of being due to my stupidity.
ilikepie___ said:
Actually, I ended up making my phone hard bricked to the point where it doesn’t even turn on at this point. I’m just going to send it in for repair, which is nothing short of being due to my stupidity.
Click to expand...
Click to collapse
It's probably stuck in edl mode. Nothing on the screen, no vibration or anything but it shows up in device manager when connected to a computer?
Try the man tool mentioned Here that worked for me.
toyanucci said:
It's probably stuck in edl mode. Nothing on the screen, no vibration or anything but it shows up in device manager when connected to a computer?
Try the man tool mentioned Here that worked for me.
Click to expand...
Click to collapse
I’ll give it a shot, yeah it doesn’t do anything. Can’t see a display or anything on the screen.

Question Help! ADB sideload LOS rom doesn't work with TWRP

I got Motorola Edge S from China, and plan to:
1. Unlock (Succeeded !)
2a. fastboot flash boot twrp-3.5.2_11.0-2-nio.img
fastboot flash boot_b twrp-3.5.2_11.0-2-nio.img
SD card cannot work properly, as well as Adb sideload, so Official LOS.zip cannot be flashed,
OR
2b. fastboot flash boot lineage-19.1-20220604-recovery-nio.img
fastboot flash boot_b lineage-19.1-20220604-recovery-nio.img
Stucked on the Boot-up screen with Logo before Recovery mode.
3. flash Stock EU rom
(to achieve more international firmware, since I don't find independent firmware.zip)
4. flash LOS rom
N.B. [data] partition had been cleared, and I should haven't cleared [system] partition, but I cannot boot back to stock rom after Step 2, and I believe the stock rom has been removed for any accident.
Please help
Might be a long shot here, but I bricked G100 when trying to flash to both slots. Use the Motorola device recovery tool to bring it back to stock and flash only ONE slot (the active one) with your rom. There's installation scripts on this forum that do exactly this for you.
twelfth said:
Might be a long shot here, but I bricked G100 when trying to flash to both slots. Use the Motorola device recovery tool to bring it back to stock and flash only ONE slot (the active one) with your rom. There's installation scripts on this forum that do exactly this for you.
Click to expand...
Click to collapse
Initially I just flash one slot. Then I read that inconsistency between 2 slots can cause problem, so I have flash 2nd slot also, by copy-partitions-20210323_1922.zip or by "fastboot flash boot_b ...".
Now, I can also recovery and boot back to stock rom, by flash boot.img extracted from stock rom.zip with the same version as mine.
So the KEY problem is:
Under TWRP recovery loader, with ADB sideload turned on, the PC seems cannot connect & send below crucial command to Android:
$ fastboot flash boot lineage-19.1-20220604-recovery-nio.img
N.B. I have already used USB driver from Motorola, so ADB commands can run without problem, except ADB Sideload mode. Also, I have tried using USB 2.0 hub port with 2.0 cable (4-pins) as well.
TWRP for nio is not stable (yet). Use the instructions for lineageos official.
patwwh said:
I got Motorola Edge S from China, and plan to:
1. Unlock (Succeeded !)
2a. fastboot flash boot twrp-3.5.2_11.0-2-nio.img
fastboot flash boot_b twrp-3.5.2_11.0-2-nio.img
SD card cannot work properly, as well as Adb sideload, so Official LOS.zip cannot be flashed,
OR
2b. fastboot flash boot lineage-19.1-20220604-recovery-nio.img
fastboot flash boot_b lineage-19.1-20220604-recovery-nio.img
Stucked on the Boot-up screen with Logo before Recovery mode.
3. flash Stock EU rom
(to achieve more international firmware, since I don't find independent firmware.zip)
4. flash LOS rom
N.B. [data] partition had been cleared, and I should haven't cleared [system] partition, but I cannot boot back to stock rom after Step 2, and I believe the stock rom has been removed for any accident.
Please help
Click to expand...
Click to collapse
Late here but on 2a step, you can actually copy the ROM zip to internal storage since windows can detect your phone as storage device when it is in TWRP recovery.
https://wiki.lineageos.org/devices/nio/install is telling everything you need to know.
Though:
NEW:
Code:
fastboot devices
fastboot --set-active=a
// Update firmware
// Files taken from https://mirrors.lolinet.com/firmware/motorola/nio/official/RETEU/
fastboot flash modem_a NON-HLOS.bin
fastboot flash modem_b NON-HLOS.bin
fastboot erase mdmddr
fastboot flash fsg_a fsg.mbn
fastboot flash fsg_b fsg.mbn
fastboot erase mdm1m9kefs1
fastboot erase mdm1m9kefs2
fastboot flash bluetooth_a BTFM.bin
fastboot flash bluetooth_b BTFM.bin
fastboot erase carrier
fastboot erase ddr
fastboot reboot bootloader
fastboot devices
fastboot --set-active=a
// First setup
// Files taken from https://mirror.math.princeton.edu/pub/lineageos/full/nio/
fastboot flash dtbo_a dtbo.img
fastboot flash dtbo_b dtbo.img
fastboot flash vendor_boot_a vendor_boot.img
fastboot flash vendor_boot_b vendor_boot.img
fastboot reboot bootloader
fastboot devices
fastboot --set-active=a
// Install recovery
// Files taken from https://download.lineageos.org/nio
fastboot flash boot <recovery_filename>.img
for example:
fastboot flash boot_a <recovery.img>
fastboot flash boot_b <recovery.img>
fastboot reboot recovery
// Be sure all firmware is consistant
// Files taken from https://mirrorbits.lineageos.org/tools/copy-partitions-20220613-signed.zip
adb sideload copy-partitions-20220613-signed.zip
fastboot reboot recovery
FRESH INSTALL OF LINEAGE
Code:
Reboot into recovery
CHECK WHICH IS THE ACTIVE PARTITION, FIRST TIME A
Goto “Factory reset”
Goto “Format data/factory reset”
Goto “Format data”
Goto “Apply Update”
Goto “Apply from adb”
adb sideload <lineageos.zip>
Goto “Advanced”
Goto “Reboot to recovery” (now active partition is changed to the updated one)
CHECK WHICH IS THE ACTIVE PARTITION, FIRST TIME SHOULD BE B!!
Reboot to system and setup...
(This is how I do it...)
(On updates, active partition is switching on reboot after you have done a flash of lineageos.zip file)
(Forget TWRP for this device as it is not finished and several bugs are there. Just use Lineage OS)
TWRP only works on Android 11, above that nothing will work and it will be very buggy

Categories

Resources