YU Firmware + Lineage-18.1 UnofficialNo more Noughat!Hello, Seems like you are about to flash this firmware, be sure that you have read instructions at xda by @pbteja.
This firmware was by manufacturer, which can be used to revive your dead Yureka Black, is modified to boot to unofficial-vanilla lineage-18.1 built directly from their sources available at github along with device sources, I don't own it.
Can also be used on Wiko U FEEL PRIME Or CECT DIGI U or other Yureka Black clones. NOT FOR ANY OTHER PHONE MODEL.
NO ASSURANCE FOR ANY MALFUNCTION, USE IT AT YOUR OWN RISK.
ON WINDOWS-On Windows operating system you need QFIL or QPST software.
ON GNU/LINUX-Install git libxml2-dev libudev-dev build-essentials make fastboot adb
On Debian/Ubuntu based operating systems the install command is:
sudo apt install fastboot libxml2-dev libudev-dev git build-essentials make
You can find the qdl source code at:
working/qualcomm/qdl.git - Read only mirror of https://github.com/andersson/qdl
git.linaro.org
Clone it to a folder with:
git clone https://git.linaro.org/landing-teams/working/qualcomm/qdl.git --depth=1
In the qdl folder , open a terminal instance in this directory for flashing firmware, run:
make
This should output a qdl executable in the same folder.
Flashing FIRMWARE (on GNU/LINUX)-Stop modem manager:
sudo systemctl stop ModemManager
or uninstall modem manager with:
sudo apt purge modemmanager
Put your phone in edl mode with:
adb reboot edl
(or)
Press power button and vol UP+ vol DWN+ at the same time when starting phone.
Leave power button when you see 'entering DLOAD mode' keep holding volume buttons for 8 seconds and connect to PC.
Command to flash is:
./qdl --debug --storage emmc --include /path/to/YU5040_FIRMWARE /path/to/YU5040_FIRMWARE/prog_firehose_ddr.elf /path/to/YU5040_FIRMWARE/rawprogram0_unparse0.xml /path/to/YU5040_FIRMWARE/patch0.xml
DO NOT disconnect the phone until the command has finished executing. If you face any error, ask in yureka black forum at xda.
The last lines you should see in command line must be like....
FIREHOSE READ: <?xml version="1.0" encoding="UTF-8" ?><data><log value="Set bootable drive to 0." /></data>
LOG: Set bootable drive to 0.
FIREHOSE READ: <?xml version="1.0" encoding="UTF-8" ?><data><response value="ACK" /></data>
partition 0 is now bootable
FIREHOSE WRITE: <?xml version="1.0"?>
<data><power value="reset"/></data>
FIREHOSE READ: <?xml version="1.0" encoding="UTF-8" ?><data><response value="ACK" /></data>
Agree to Factory reset. Format data in TWRP if it boots to recovery.
Have fun!
DOWNLOADS
Click HERE
Source code:
Kernel Source : Click Here
Device Tree : Click Here
LineageOS: https://github.com/lineageos
hello, maybe you can help me.
I'm a French user garlic clone
able to launch yu5040_sw_v12_hw_v1 and yu5040_sw_v17_hw_v1 firmwares, but not your custom version.
Qfil works great,
but impossible to boot system with this firmware.
You say Format data in TWRP if it boots to recovery, but no result
permissiver.zip don't change anything too
foxyone0809 said:
hello, maybe you can help me.
I'm a French user garlic clone
able to launch yu5040_sw_v12_hw_v1 and yu5040_sw_v17_hw_v1 firmwares, but not your custom version.
Qfil works great,
but impossible to boot system with this firmware.
You say Format data in TWRP if it boots to recovery, but no result
permissiver.zip don't change anything too
Click to expand...
Click to collapse
Do you get boot animation? The data format is required to userdata partition because partition is encrypted after qfil. This was automatically taken care by lineage recovery, but I have included twrp recovery instead because you cant flash zips with the lineage one, with twrp you have to do it manually. No other steps are needed at all. If you still have problem flash any treble rom, that should also work.
Related
Hi friends,
The app recommended by BQ "MTK Tool Flash" (SP_Flash_Tool_exe_Linux_v5.1612.00.100.zip) just didn't work for me on my Debian PC. There were always some excuses. So I tried some black command-line magic with fastboot and now I'm with a bricked device.
See ubuntu-android-installation-process-for-bq-aquaris-e4-5-and-e5 link I cannot post...
The good news is, I have installed the TWRP (twrp-3.1.1-0-freezerfhd.img) before I shot myself in the toe. So power + volume up gives me the comforting bluish screen of TWRP.
Question is, how can I bring the lovely device back to life? I wanted to flash official Android on it (which failed - 2.3.0_20170405-1553_bq_aquaris_m10_FHD_-FW.zip) and I'd like to complete that, but if it's a no go, I can go back to Ubuntu.
I have tried installing the image zip from twrp, but it said the image has invalid zip file format!
Thanks a lot for your help
Rob
failures
I've been struggling with this one. So I can switch to the bootloader mode and run fastboot commands. However, when I try to flash the system image I get some funny error:
Code:
sudo fastboot flash system ./system.img
target reported max download size of 134217728 bytes
erasing 'system'...
FAILED (remote: unknown command)
finished. total time: 0.002s
With the flash tool (after fixing all it's complaints) I'm stuck with a timeout on detecting the USB port (while fastboot works just fine)
Code:
Connecting to BROM...
Scanning USB port...
Search usb, timeout set as 3600000 ms
And with TWRP as mentioned earlier:
Code:
Invalid zip file format
I read the stock rom can be adjusted somehow to allow TWRP to flash it but I'm quite like what...? Android kitchen doesn't list my device as supported.
progress
Aha! This got us further:
Code:
sudo fastboot flash system -u -S 1G ./system.img
Which means do not erase the partition upfront, and sparse the file at max 1 GB.
Code:
sudo fastboot flash userdata -u -S 1G ./userdata.img
sudo fastboot flash boot -u -S 1G ./boot.img
sudo fastboot reboot
Now device is "powered by ubuntu" and stuck there... not sure what's happening
S now I tried flashing some more exotic partitions and the device is completely dead. I hope BQ can help...
undead
Wow, so BQ contacted me right away with a hard reset procedure. The key bit of information I must have overlooked somewhere is that for the flash tool to detect the device, the device must be plugged in while it's off and while the tool is waiting. We're now "powered by android" and system is ready to use. Oh my... thanks BQ
Ah yes, Oneplus released that new update. Now I must download 2+ GB off my capped data plan, then flash it to recovery, carefully switch back my slot then flash my custom ROM again to the slot I just flashed OOS to and then flash OOS again to the other slot and then I must repeat everything above. After that I must delete the 2 fake partitions the updater created on data because they are useless. Oh wait it doesn't let me delete them who'd have thought?
Seriously? What on earth happened there
A better solution is required, especially something that grants more control. Well here it is
The boring stuff:
I am not responsible for anything you do to your device
These zips contain the following files:
Code:
The firmware (duh)
flashall - flashes both a and b
flash_a - only flashes slot a
flash_b - only flashes slot b
The following partitions found in the official oxygenos zip have been removed:
Code:
vbmeta
boot
dtbo
odm
system
vendor
reserve
india
Because for custom ROM users these partitions are either unused or used by the currently running custom ROM
How to flash?
From TWRP (it doesn't even need to support decryption):
Code:
adb push abl.img aop.img bluetooth.img cmnlib64.img cmnlib.img devcfg.img dsp.img flash_a flashall flash_b hyp.img keymaster.img LOGO.img modem.img oem_stanvbk.img qupfw.img storsec.img tz.img xbl_config.img xbl.img /tmp/
adb shell
cd /tmp
chmod 777 flashall # or flash_a/b
./flashall # or sh flashall or use flash_a/b
I suggest you use one of the flash_a/b scripts to only flash your current slot and test the changes out before running flashall
From termux:
You might need to set selinux to permissive while flashing. Only try to flash your current slot, reboot and if there are no errors flash the other slot
unzip the zip file to a directory and cd to it. If you use termux you should already know this
Just run one of the flashing scripts as root
Note that the flashing takes some time. Do not abort it
From adb root:
Sadly I don't have adb root so if someone has it they can let me know how it goes and how they flashed it
Do NOT believe in myths. You do NOT need to wipe cache/dalvik/any other nonsense while upgrading firmware. Stop wasting your time
Downloads:
Open beta 9: https://glassrom.pw/guacamole-ob9fw.zip
More will be added when I have time
Yes I personally tested this on my device and it was fine. Except that the popup camera pops out sometimes but I just suspect big brother. Nothing abnormal
Happy flashing. Or whatever
Anybody caught the latest OOS release link yet? All I found was an incremental OTA
Is this project discontinued? If yes, I'd like to see a revival of this.
hellcat50 said:
Is this project discontinued? If yes, I'd like to see a revival of this.
Click to expand...
Click to collapse
He doesn't care about support
The link is dead.
Does anyone have this zip?
I need these files
flashall
flash_a
flash_b
in order to make an up to date zip.
alessio89g said:
The link is dead.
Does anyone have this zip?
I need these files
flashall
flash_a
flash_b
in order to make an up to date zip.
Click to expand...
Click to collapse
you can get the file list and the firmware collection from the glassrom device tree
i stopped maintaining this as now i just ship firmware into my roms
Bitbucket
bitbucket.org
flash_a, flash_b and flashall really were just script generated scripts
something like
```
for i in $(ls *img | sed 's/.img$//g')
do
echo dd if="$i".img of=/dev/block/bootdevice/by-name/"$i"_a;
done
```
same for slot b:
```
for i in $(ls *img | sed 's/.img$//g')
do
echo dd if="$i".img of=/dev/block/bootdevice/by-name/"$i"_b;
done
```
concetenate flash_a and flash_b as follows:
```
cat flash_a flash_b > flashall
```
PS: you need to remove the oem_stanvbk_{a,b} entries as that is not an A/B partition. also i have just shown you roughly what i use to generate the flash scripts. there is no guarantee these work. example you might need to remove the $ from the regex
{
"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"
}
Requirements
Android 10 firmware for your device:
Redmi 9A/9AT dandelion: LINK.
Dandelion
Download the latest fastbootable image: droidian-UNOFFICIAL-phosh-phone-xiaomi_dandelion-api29-armhf-nightly_XXXXXXXX.zip
Installation
Extract the archive
run the flash_all script
Boot to fastboot and let the script flash everything.
UBports Installer
Alternatively the UBports installer can also be used to install Droidian.
Notes
The default password is 1234.
List of working things can be found at https://github.com/droidian-mt6765/device-page
Bugs
Encryption is not supported.
Mobile data needs an APN to be set up from Settings -> Mobile -> Access Point Names.
RIL gets broken after switching airplane mode or modem off/on.
Mobile data might stop working after making or receiving phone calls. Toggle Mobile Data from the settins off/on.
Mobile data quick toggle doesn't work.
Bluetooth can be used via the terminal using bluetoothctl command or using blueman sudo apt install blueman but does not work via the settings app.
GPS works partially via Epiphany (tested with open street map).
Signal strength is reported at 1% but Mobile data and calls work just fine.
Anything related to cameras do not work it is a global issue across all devices, it does however work in Waydroid.
Changing audio to speaker in calls does not work on dandelion but works on angelica.
When a headphone is plugged in audio output must be changed manually in the settings.
Dual SIM functionality is currently not implemented in Phosh so only one SIM works at the moment.
Mobile hotspot does not work
Final notes
I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed.
Support
Device specific telegram group: @ut_angelica.
Droidian telegram group: @DroidianLinux.
All the sources are available at
Droidian for Redmi 9A/9AT and Redmi 9C/9C NFC
All repositories related to Droidian on Redmi 9A/9AT and Redmi 9C/9C NFC (MT6765/MT6762) - Droidian for Redmi 9A/9AT and Redmi 9C/9C NFC
github.com
Attached images are from different devices but the interface looks and acts the same.
I cant flash this on the recovery touchscreen dont Work what can i do for fix?il dont know my type of redmi 9a the data code is m2008c3lg
laharl_22 said:
I cant flash this on the recovery touchscreen dont Work what can i do for fix?il dont know my type of redmi 9a the data code is m2008c3lg
Click to expand...
Click to collapse
recovery touchscreen? if you mean the rootfs or adaptation package you can sideload them
FakeShell said:
recovery touchscreen? if you mean the rootfs or adaptation package you can sideload them
Click to expand...
Click to collapse
I cant do nothing on orangefox recovery tested many times the touchscreen and mouse with otg nothing work only the power button
laharl_22 said:
I cant do nothing on orangefox recovery tested many times the touchscreen and mouse with otg nothing work only the power button
Click to expand...
Click to collapse
can you try some other recovery such as the pbrp?
i will edit the post and add a second installation method soon
Just added the second installation method
you can try that out now
FakeShell said:
Just added the second installation method
you can try that out
Click to expand...
Click to collapse
It fails at the last step install.sh no such file or directory but the dir of the script is mounted and chmod work .sorry for my double post
laharl_22 said:
It fails at the last step install.sh no such file or directory but the dir of the script is mounted and chmod work .sorry for my double post
Click to expand...
Click to collapse
my bad it was a typo in my documentation
redo the second installation method
cd /tmp/adaptation-garden-script && chmod +x install.sh && sh install.sh
mount: '/dev/block/loop10'->'/mnt/': Block device required
mknod: /dev/loop1: File exists
losetup: /dev/loop1=/data/rootfs.img: Device or resource busy
mkdir: '/rootfs': File exists
cp: bad './etc/systemd/system/pulseaudio.service.d/*': No such file or directory
cp: /rootfs/etc/udev/rules.d/: No such file or directory
cp: /rootfs/etc/pulse/: Is a directory
cp: /rootfs/etc/ofono/: Is a directory
cp: '/rootfs/etc/modules-load.d/' not directory
cp: /rootfs/etc/apt/sources.list.d/: No such file or directory
cp: /rootfs/usr/share/keyrings/garden.gpg: No such file or directory
chroot: exec /bin/bash: No such file or directory i have this at the final step
laharl_22 said:
cd /tmp/adaptation-garden-script && chmod +x install.sh && sh install.sh
mount: '/dev/block/loop10'->'/mnt/': Block device required
mknod: /dev/loop1: File exists
losetup: /dev/loop1=/data/rootfs.img: Device or resource busy
mkdir: '/rootfs': File exists
cp: bad './etc/systemd/system/pulseaudio.service.d/*': No such file or directory
cp: /rootfs/etc/udev/rules.d/: No such file or directory
cp: /rootfs/etc/pulse/: Is a directory
cp: /rootfs/etc/ofono/: Is a directory
cp: '/rootfs/etc/modules-load.d/' not directory
cp: /rootfs/etc/apt/sources.list.d/: No such file or directory
cp: /rootfs/usr/share/keyrings/garden.gpg: No such file or directory
chroot: exec /bin/bash: No such file or directory i have this at the final step
Click to expand...
Click to collapse
Can you drop me a message at @FakeShell at telegram?
because this seems to work and run fine on my 9A
have to troubleshoot a bit
FakeShell said:
Can you drop me a message at @FakeShell at telegram?
because this seems to work and run fine on my 9A
have to troubleshoot a bit
Click to expand...
Click to collapse
I think my device is corrupted on all zip i have error 1 and unable to mount storage i dont know why.i dont have telegram
laharl_22 said:
I think my device is corrupted on all zip i have error 1 and unable to mount storage i dont know why.i dont have telegram
Click to expand...
Click to collapse
you can try flashing back android
Where to write it: cd /tmp/adaptation-garden-script && chmod +x install.sh && ./install.sh ???
vipinc said:
Where to write it: cd /tmp/adaptation-garden-script && chmod +x install.sh && ./install.sh ???
Click to expand...
Click to collapse
in adb shell
FakeShell said:
View attachment 5665895
Requirements
Android 10 firmware for your device:
Redmi 9A dandelion: LINK.
Redmi 9C angelica: LINK.
Dandelion
Download the latest rootfs: droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip.
Download the adaptation package: adaptation-droidian-garden.zip.
Download boot-dandelion.img, dtbo-dandelion.img, vbmeta-dandelion.img.
Download our customized version of OrangeFox recovery OrangeFox-R11-garden-droidian.img
Angelica
Download the latest rootfs: droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip.
Download the adaptation package: adaptation-droidian-garden.zip.
Download boot-dandelion.img, dtbo-dandelion.img, vbmeta-dandelion.img.
Download our customized version of OrangeFox recovery OrangeFox-R11-garden-droidian.img
Dandelion installation
Flash boot-dandelion.img: fastboot flash boot boot-dandelion.img.
Flash dtbo-dandelion.img: fastboot flash dtbo dtbo-dandelion.img.
Flash vbmeta-dandelion.img: fastboot --disable-verity --disable-verification flash vbmeta vbmeta-dandelion.img.
Flash OrangeFox-R11-garden-droidian.img: fastboot flash recovery OrangeFox-R11-garden-droidian.img.
Format userdata as ext4 from inside the recovery or via fastboot: fastboot format:ext4 userdata.
Now boot into recovery.
Go into sideload mode and sideload droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip: adb sideload droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip
Go into sideload mode and sideload adaptation-droidian-garden.zip: adb sideload adaptation-droidian-garden.zip
Now boot into your device.
If for some reason sideload or recovery did not work out for you should try my second installation method:
Download the adaptation script (not the adaptation package): [adaptation-garden-script.zip] (https://garden.bardia.tech/adaptation-garden-script.zip).
Download PBRP: [PBRP-3.1.0.img] (https://garden.bardia.tech/PBRP-3.1.0.img)
Flash PBRP-3.1.0.img: fastboot flash recovery PBRP-3.1.0.img.
Now boot into recovery
Now extract adaptation-garden-script.zip on your PC/Laptop and push it to your device: adb push adaptation-garden-script /tmp
adb shell and Change directory to /tmp and run the script: cd /tmp/adaptation-garden-script && chmod +x install.sh && ./install.sh
Now boot into your device.
The first boot will take a while.
Angelica installation
Flash boot-angelica.img: fastboot flash boot boot-angelica.img.
Flash dtbo-angelica.img: fastboot flash dtbo dtbo-angelica.img.
Flash vbmeta-dandelion.img: fastboot --disable-verity --disable-verification flash vbmeta vbmeta-angelica.img.
Flash OrangeFox-R11-garden-droidian.img: fastboot flash recovery OrangeFox-R11-garden-droidian.img.
Format userdata as ext4 from inside the recovery or via fastboot: fastboot format:ext4 userdata.
Now boot into recovery.
Go into sideload mode and sideload droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zipip: adb sideload droidian-OFFICIAL-phosh-phone-rootfs-api29-armhf-nightly_XXXXXXXX.zip
Go into sideload mode and sideload adaptation-droidian-garden.zip: adb sideload adaptation-droidian-garden.zip
Now boot into your device.
If for some reason sideload or recovery did not work out for you should try my second installation method:
Download the adaptation script (not the adaptation package): [adaptation-garden-script.zip] (https://garden.bardia.tech/adaptation-garden-script.zip).
Download PBRP: [PBRP-3.1.0.img] (https://garden.bardia.tech/PBRP-3.1.0.img)
Flash PBRP-3.1.0.img: fastboot flash recovery PBRP-3.1.0.img.
Now boot into recovery
Now extract adaptation-garden-script.zip on your PC/Laptop and push it to your device: adb push adaptation-garden-script /tmp
Change directory to /tmp and run the script: cd /tmp/adaptation-garden-script && chmod +x install.sh && ./install.sh
Now boot into your device.
The first boot will take a while.
Notes
The default password is 1234.
Xiaomi has not updated their kernel source tree and as a result some models of 9A and 9C have non functional display panels with our kernel.
Droidian GSIs are experimental! Bugs and missing features are expected.
List of working things can be found at https://garden.bardia.tech
Bugs
Mobile data needs an APN to be set up from Settings -> Mobile -> Acess Point Names.
RIL gets broken after switching airplane mode or modem off/on.
Mobile data might stop working after making or recieving phone calls. Toggle Mobile Data from the settins off/on.
Mobile data quick toggle doesn't work.
Bluetooth can be used via the terminal using bluetoothctl command or using blueman sudo apt install blueman but does not work via the settings app.
GPS works partially via Epiphany (tested with open street map).
Signal strengh is reported at 1% but Mobile data and calls work just fine.
Anything related to cameras do not work it is a global issue across all devices, it does however work in Waydroid which is currently not available on angelica and dandelion.
Changing audio to speaker in calls does not work on dandelion but works on angelica.
When a headphone is plugged in audio output must be changed manually in the settings.
Dual SIM functionality is currently not implemented in Phosh so only one SIM works at the moment.
Just like bluetooth, hotspot does not work from settings either and has to be used from a GUI application (such as the default advanced network app) or from terminal.
Flashlight can be used via the desktop icons only.
Final notes
I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed.
Support
Device specific telegram group: @ut_angelica.
Droidian telegram group: @DroidianLinux.
All the sources are available at
Droidian for Redmi 9A/9AT and Redmi 9C/9C NFC
All repositories related to Droidian on Redmi 9A/9AT and Redmi 9C/9C NFC (MT6765/MT6762) - Droidian for Redmi 9A/9AT and Redmi 9C/9C NFC
github.com
Click to expand...
Click to collapse
Ow Lord, atomic bomb breaked myself on knees
+1
FakeShell said:
in adb shell
Click to expand...
Click to collapse
Hello FakeShell I have a kernel sources arm64 for redmi 9a can you compile and make droidian arm64
if you want i can upload the kernel sources
Hello bro
Your work is appreciable but i have a question that your droidian rom is based on Android 10 (Q) and it is became old in this big community Android 11 (R) and Android 12 (T) will (maybe) also release soon then who wants downgrade to an old android version from the latest android and latest security patches
My main question is that this rom droidian cant be based on latest android ?
the_arxyn said:
Hello bro
Your work is appreciable but i have a question that your droidian rom is based on Android 10 (Q) and it is became old in this big community Android 11 (R) and Android 12 (T) will (maybe) also release soon then who wants downgrade to an old android version from the latest android and latest security patches
My main question is that this rom droidian cant be based on latest android ?
Click to expand...
Click to collapse
This is a Linux OS its not an Android ROM they are very different. It uses the Android 10 vendor and kernel and thats it. the rest is done on droidian itself. The kernel we have right now is patched to work with all variants of dandelion, angelica and angelican thanks to TheKit and Muhammad. as we all know xiaomi did not update their kernel source for these devices (garden). but we have all the needed drivers that Xiaomi did not include. for vendor the reason it cannot be upgraded is that we don't use the android vendor the way you might think we do. the system partition is completely wiped and the OS is completely up to date so I will argue that right now Droidian is much more secure than android itself. upgrading to Android 12 is impossible right now as we don't have a general Halium container image for Android 12 but Android 11 is doable albeit a waste of time. because of how low end these devices are and the ram usage will increase without any benefit on our end.
The main concern right now is with the vendor being armhf which forces us to also work with armhf rootfs instead of arm64 (while the kernel is arm64!).
But then again arm64 vendor will also just increase memory usage and there are variants of garden with 2GB of memory which already suffer with armhf so at least for now arm64 is completely out of the question.
I f****d up.
Hi everyone. I may have bitten more than I can chew. I'm trying to install a custom ROM to my recently unlocked Redmi Note 10 Pro. It's crDroid in case that's necessary.
I did a lot of things but I forgot most of them. Here's what I remember doing:
Connected my phone to my Linux computer.
Go into fastboot modevia the following command:
Code:
adb reboot bootloader
Use TWRP by running this in a terminal:
Code:
fastboot boot twrp.img
Went in to the wipe option in TWRP and do a complete factory reset and format data.
Pushed the custom ROM file to /sdcard.
Attempted to install the zip file via TWRP.
Got an error code. Forgot the code and I didn't take note of it. (Please make fun of me).
Attempted to reboot TWRP recovery by going to Reboot > Recovery
Reached stock MIUI Recovery.
And here I am.
I can only access MIUI Recovery 5.0 and fastboot mode, both by pressing the right buttons on the device.
I don't know what a bricked device is, but it sure does feel like my device is one.
Is there a way to solve this?
zepolyerf said:
I f****d up.
Hi everyone. I may have bitten more than I can chew. I'm trying to install a custom ROM to my recently unlocked Redmi Note 10 Pro. It's crDroid in case that's necessary.
I did a lot of things but I forgot most of them. Here's what I remember doing:
Connected my phone to my Linux computer.
Go into fastboot modevia the following command:
Code:
adb reboot bootloader
Use TWRP by running this in a terminal:
Code:
fastboot boot twrp.img
Went in to the wipe option in TWRP and do a complete factory reset and format data.
Pushed the custom ROM file to /sdcard.
Attempted to install the zip file via TWRP.
Got an error code. Forgot the code and I didn't take note of it. (Please make fun of me).
Attempted to reboot TWRP recovery by going to Reboot > Recovery
Reached stock MIUI Recovery.
And here I am.
I can only access MIUI Recovery 5.0 and fastboot mode, both by pressing the right buttons on the device.
I don't know what a bricked device is, but it sure does feel like my device is one.
Is there a way to solve this?
Click to expand...
Click to collapse
Drivers installed?
Hi! How can I check if drivers are installed? I'm on Linux, if that matters.
Your device isn't bricked until you can do absolutely nothing with it. Start by reflashing the factory firmware; this should get your device running again.
You should also still be able to boot TWRP just like you did. What ROM were you trying to use?
V0latyle said:
Your device isn't bricked until you can do absolutely nothing with it. Start by reflashing the factory firmware; this should get your device running again.
You should also still be able to boot TWRP just like you did. What ROM were you trying to use?
Click to expand...
Click to collapse
That's good to hear.
I'm trying to make another attempt to boot to TWRP. I'm currently in fastboot mode: running fastboot -l devices shows this:
Code:
f8b471a6 fastboot
usb:1-5
I tried to following official TWRP instructions to flash it. Ran fastboot flash recovery twrp.img and all I get is <waiting for device> as a response after running the command in the terminal.
I unplug the cable, then plug it back in to the computer, then this is what I got:
Code:
Sending 'recovery' (131072 KB) FAILED (Write to device failed (Device or resource busy))
fastboot: error: Command failed
Any ideas on how to get around this?
zepolyerf said:
That's good to hear.
I'm trying to make another attempt to boot to TWRP. I'm currently in fastboot mode: running fastboot -l devices shows this:
Code:
f8b471a6 fastboot
usb:1-5
I tried to following official TWRP instructions to flash it. Ran fastboot flash recovery twrp.img and all I get is <waiting for device> as a response after running the command in the terminal.
I unplug the cable, then plug it back in to the computer, then this is what I got:
Code:
Sending 'recovery' (131072 KB) FAILED (Write to device failed (Device or resource busy))
fastboot: error: Command failed
Any ideas on how to get around this?
Click to expand...
Click to collapse
Your device might not have a recovery partition; in A/B partition layout devices, recovery lives in the boot image.
A bit of an explanation:
When you use fastboot boot <image> you're telling the device to load the image you're sending - so if you use fastboot boot twrp.img you're telling it to load the TWRP.img on your computer. This is what you should be using if you want to boot TWRP.
When you use fastboot flash <partition> <image> you're telling bootloader to flash the specified partition with the specified image. So, if you used fastboot flash boot twrp.img, bootloader will overwrite /boot with the TWRP image...meaning the device will only boot into TWRP.
As for why the device would only boot into stock recovery after you flashed the custom ROM, I suspect that it didn't flash the kernel, or otherwise may have corrupted the boot image. So, when the device tries to start the kernel, it failed and just boots into recovery instead.
What should I do at this point if I can't do fasboot boot <image> or fastboot flash <parition> <image> because of the <waiting for device> thing I get everytime I run those commands?
zepolyerf said:
What should I do at this point if I can't do fasboot boot <image> or fastboot flash <parition> <image> because of the <waiting for device> thing I get everytime I run those commands?
Click to expand...
Click to collapse
Reboot to bootloader. If you're currently in recovery mode, cancel the command (Ctrl+C) and use adb reboot bootloader. If you're currently in bootloader but it's not responding, just use the button combo to force a reset.
Remember, you can only use fastboot commands in bootloader mode. If you're in recovery, you can only use some ADB commands, but in this case, I don't think that will be much help.
This is just soft brick. A hard brick means no life in the device as well. In your case, you can still access recovery and fastboot. You can either use MiFlash and use fastboot to flash the stock rom (your choice if you want to relock the bootloader or not) or flash miui recovery rom directly in the custom recovery.
If I remember correctly too, crDroid requires it's provided recovery instead of TWRP so maybe that's why the installation failed.
I went into fastboot mode by pressing Vol Down + Power buttons.
Plugged the phone in to my Linux machine. Have VirtualBox recognize my device.
Opened MiFlash tool. Selected the flash rom from Xiaomi's site. Got an Antirollback error. Here's the logs:
Code:
[4:41:24 AM]:lsusb path:"C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[4:41:25 AM]:GetScriptDevices
[4:41:28 AM]:add device f8b471a6 index 0
[4:41:48 AM]:lsusb path:"C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[4:41:48 AM]:GetScriptDevices
[4:41:51 AM]:FlashingDevice.flashDeviceList.Remove f8b471a6
[4:41:51 AM]:add device f8b471a6 index 0
[4:41:51 AM]:Thread start,thread id 11,thread name f8b471a6
[4:41:51 AM]:start process id 4212 name cmd
[4:49:16 AM]:lsusb path:"C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[4:49:16 AM]:GetScriptDevices
[4:49:16 AM]:add device f8b471a6 index 1
[4:49:24 AM]:lsusb path:"C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[4:49:24 AM]:GetScriptDevices
[4:49:24 AM]:FlashingDevice.flashDeviceList.Remove f8b471a6
[4:49:24 AM]:add device f8b471a6 index 1
[4:49:24 AM]:Thread start,thread id 12,thread name f8b471a6
[4:49:24 AM]:start process id 1704 name cmd
[4:49:25 AM]:Thread stopped, thread id 12, thread name f8b471a6
[4:51:22 AM]:lsusb path:"C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[4:51:23 AM]:GetScriptDevices
[4:51:23 AM]:FlashingDevice.flashDeviceList.Remove f8b471a6
[4:51:23 AM]:add device f8b471a6 index 1
[4:51:23 AM]:Thread start,thread id 19,thread name f8b471a6
[4:51:23 AM]:start process id 3400 name cmd
[4:52:26 AM]:GetUserInfo
[4:52:39 AM]:authentication edl error:Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
[4:56:31 AM]:lsusb path:"C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[4:56:31 AM]:GetScriptDevices
[6:00:17 AM]:open RegistryKey Software\XiaoMi\MiFlash\
[6:00:18 AM]:driver oem5.inf exists,uninstall,reuslt True,GetLastWin32Error
[6:00:19 AM]:install driver C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Google\Driver\android_winusb.inf to C:\Windows\INF\oem5.inf,result True,GetLastWin32Error
[6:00:19 AM]:set RegistryKey value:android_winusb.inf--oem5.inf
[6:00:19 AM]:mkdir "C:\Users\IEUser\.android"
[6:00:19 AM]:output:A subdirectory or file C:\Users\IEUser\.android already exists.
[6:00:19 AM]: echo 0x2717 >>"C:\Users\IEUser\.android\adb_usb.ini"
[6:00:19 AM]:output:
[6:00:19 AM]:open RegistryKey Software\XiaoMi\MiFlash\
[6:00:19 AM]:install driver C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Nvidia\Driver\NvidiaUsb.inf to ,result False,GetLastWin32Error Unknown error (0xe000022f)
[6:00:19 AM]:open RegistryKey Software\XiaoMi\MiFlash\
[6:00:20 AM]:install driver C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Microsoft\Driver\tetherxp.inf to ,result False,GetLastWin32Error Unknown error (0xe000022f)
[6:00:20 AM]:open RegistryKey Software\XiaoMi\MiFlash\
[6:00:21 AM]:install driver C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Microsoft\Driver\wpdmtphw.inf to ,result False,GetLastWin32Error Unknown error (0xe000022f)
[6:00:21 AM]:open RegistryKey Software\XiaoMi\MiFlash\
[6:00:21 AM]:driver oem6.inf exists,uninstall,reuslt True,GetLastWin32Error
[6:00:22 AM]:install driver C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Qualcomm\Driver\qcser.inf to C:\Windows\INF\oem6.inf,result True,GetLastWin32Error
[6:00:22 AM]:set RegistryKey value:qcser.inf--oem6.inf
[6:01:33 AM]:lsusb path:"C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[6:01:34 AM]:GetScriptDevices
[6:01:34 AM]:add device f8b471a6 index 1
[6:01:55 AM]:lsusb path:"C:\Users\IEUser\Downloads\MiFlash\MiFlash2020-3-14-0\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[6:01:55 AM]:GetScriptDevices
[6:01:55 AM]:FlashingDevice.flashDeviceList.Remove f8b471a6
[6:01:55 AM]:add device f8b471a6 index 1
[6:01:55 AM]:Thread start,thread id 12,thread name f8b471a6
[6:01:55 AM]:start process id 6280 name cmd
[6:01:56 AM]:Thread stopped, thread id 12, thread name f8b471a6
Any idea on what to do next?
BigChungus321 said:
This is just soft brick. A hard brick means no life in the device as well. In your case, you can still access recovery and fastboot. You can either use MiFlash and use fastboot to flash the stock rom (your choice if you want to relock the bootloader or not) or flash miui recovery rom directly in the custom recovery.
If I remember correctly too, crDroid requires it's provided recovery instead of TWRP so maybe that's why the installation failed.
Click to expand...
Click to collapse
It might as well be a brick haha. I must be dumb (very likely) or there's just not a lot of clear and comprehensive resources out there to fix this kind of thing.
Ahh anti roll back error is pretty simple to fix, you just have to remove the check from the .bat files, there are tutorials on YT that can help, after that reflash stock rom in MiFlash.
If you're worried about anti roll back, don't worry, ARB value for the device has been 3 so far so it's safe to downgrade. Goodluck
Seeing a ton of Bricked Notes on here this last week, Y`all making me nervous about doing anything with mine lol
I faced this problem in linux got around it with usb 2.0 interface doesn't worked with usb 3.0 and above but my device was different when I got this recovery flash waiting problem. Also try to updated the platform tools.
So the solution was to entirely ditch Linux and use Windows to play with fastboot and adb commands via the terminal.
I don't understand why it worked when I did it on Windows when I was using the same platform tools on Linux. Oh well.
The most important step to automate the installation and configuration of the Android OS is the installation of an OS image via script without user intervention. One method to do that is using the binary twrp from the recovery TWRP .
The twrp command to install an OS image with twrp is
Code:
/system/bin/twrp install /path/to/update.zip
The usage for the binary twrp is (see also here)
Spoiler: twrp usage help
Code:
I006D:/ # /system/bin/twrp --help
TWRP openrecoveryscript command line tool, TWRP version 3.7.0_12-0
Allows command line usage of TWRP via openrecoveryscript commands.
Some common commands include:
install /path/to/update.zip
backup <SDCRBAEM> [backupname]
restore <SDCRBAEM> [backupname]
wipe <partition name>
format data
sideload
set <variable> [value]
decrypt <password> [USER ID]
remountrw
fixperms
mount <path>
unmount <path>
listmounts
print <value>
mkdir <directory>
reboot [recovery|poweroff|bootloader|download|edl]
See more documentation at https://twrp.me/faq/openrecoveryscript.html
I006D:/ #
The binary twrp can also be used to wipe the data from the phone using the parameter wipe <partition_name>.
The command twrp install will not change the active boot slot for the next reboot so this must be done manually after installing the OS image. This can be done using the binary bootctl which is also part of TWRP.
The usage for the command bootctl is:
Spoiler: bootctl usage help
Code:
ASUS_I006D:/ # /system/bin/bootctl -h
/system/bin/bootctl - command-line wrapper for the boot HAL.
Usage:
/system/bin/bootctl COMMAND
Commands:
hal-info - Show info about boot_control HAL used.
get-number-slots - Prints number of slots.
get-current-slot - Prints currently running SLOT.
mark-boot-successful - Mark current slot as GOOD.
get-active-boot-slot - Prints the SLOT to load on next boot.
set-active-boot-slot SLOT - On next boot, load and execute SLOT.
set-slot-as-unbootable SLOT - Mark SLOT as invalid.
is-slot-bootable SLOT - Returns 0 only if SLOT is bootable.
is-slot-marked-successful SLOT - Returns 0 only if SLOT is marked GOOD.
get-suffix SLOT - Prints suffix for SLOT.
set-snapshot-merge-status STAT - Sets whether a snapshot-merge of any dynamic
partition is in progress. Valid STAT values
are: none, unknown, snapshotted, merging,
or cancelled.
get-snapshot-merge-status - Prints the current snapshot-merge status.
SLOT parameter is the zero-based slot-number.
64|ASUS_I006D:/ #
Afterwards the phone can be rebooted to activate the new installed OS
So the commands for installing an OS image via twrp are
- boot the phone from the TWRP image
- (optional) use twrp to wipe the data
- copy the OS image file via adb push to the phone
- install the OS image file via the twrp binary
- change the next active boot slot via the binary bootctl.
- reboot the phone
I wrote a simple script to just do that
install_os_via_twrp.sh
The usage of the script is :
Code:
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $ ./install_os_via_twrp.sh -h
install_os_via_twrp.sh version - v1.0.0.0 - install an OS image via the TWRP command twrp
install_os_via_twrp.sh [-h|help|-H] [--reboot|--noreboot] [force] [wipe|wipeall] [wipe_cache] [wipe_data] [wipe_dalvik] [format_data] [format_metadata] [factory_reset] [os_image_file]
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $
Use the parameter --help or -H to view the detailed usage help
Spoiler: Detailed usage help for install_os_via_twrp.sh
Code:
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $ ./install_os_via_twrp.sh -H
install_os_via_twrp.sh version - v1.0.0.0 - install an OS image via the TWRP command twrp
Usage
install_os_via_twrp.sh [-h|help|-H] [--reboot|--noreboot] [force] [wipe|wipeall] [wipe_cache] [wipe_data] [wipe_dalvik] [format_data] [format_metadata] [factory_reset] [os_image_file]
All parameter are optional, except the parameter for the OS image to install "os_image_file".
The parameter can be used in any order.
Use the parameter "help" or "-H" to print the detailed usage help; use the parameter "-h" to print only the short usage help
If the parameter "--reboot" is used the script will reboot the phone after successfully installing the OS image; to disable the automatic reboot use the parameter "--noreboot".
Default is to ask the user for confirmation to reboot the phone.
Use the parameter "wipe" or "wipeall" to wipe /data, /cache, and Dalvik before installing the OS image.
Use one or more of the parameter "wipe_cache", "wipe_data", or "wipe_dalvik" to only wipe some of the partitions used.
Use the parameter "format_metadata" to format the meta data partition; this wipe is NOT included in "wipe_all"
Use the parameter "format_data" to format the data partition; this wipe is NOT included in "wipe_all"
Use the parameter "factory_reset" to do a factory reset before installing the OS image; a factory reset is done by formatting the data and the metadata partitions.
Use the parameter "force" to ignore errors while wiping or formatting the data; without this parameter the script will abort if one of the wipe or format commands fails
To change some of the values used by the script these environment variables can be set before starting the script:
Set the environment variable REBOOT to "yes" before starting the script to automatically reboot the phone after enabling the root access
Set the environment variable REBOOT to "no" before starting the script to disable the automatic reboot after enabling the root access
Set the environment variable UPLOAD_DIR_ON_THE_PHONE to set the upload directory for the OS image file on the phone (default dir is /tmp; /tmp is mounted on a ramdiks)
See also the source code of the script
boot_phone_from_twrp.sh
for environment variables supported by this script
Prerequisites
- the phone must be connected via USB
- there must be a working connection to the phone using fastboot or adb
- a working TWRP image for the phone must exist
The script boot_phone_from_twrp.sh is required by this script -- see the source code of the script
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $
Note:
The script needs the helper script boot_phone_from_twrp.sh.sh (see How to boot a phone from a twrp recovery image)
Spoiler: Sample output of the script installing a new version of the same OS
Code:
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $ REBOOT=yes /data/develop/android/scripts_on_linux/install_os_via_twrp.sh /data/backup/ASUS_ZENFONE8/omnirom/omni-13/omni-13-202212180505-zenfone8-MICROG.zip
install_os_via_twrp.sh version - v1.0.0.0 - install an OS image via the TWRP command twrp
Using the TWRP helper script "/data/develop/android/scripts_on_linux/boot_phone_from_twrp.sh"
The OS image to install is: "/data/backup/ASUS_ZENFONE8/omnirom/omni-13/omni-13-202212180505-zenfone8-MICROG.zip"
Reading the helper script "boot_phone_from_twrp.sh" ...
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will use the attached phone with the serial number "M6AIB760D0939LX"
Using the default TWRP image: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
Using the options " -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking the script prerequisites ...
Will wait up to 60 second(s) after booting the phone into the bootloader
Will wait up to 60 second(s) after booting the phone from the TWRP image
Will wait up to 10 second(s) until the adb daemon is ready to use
Retrieving the current status of the phone ...
The phone is currently booted into the Android OS
The phone is booted into the Android OS
Booting the phone into the bootloader now ...
Waiting up to 60 seconds for the boot into the fastboot mode ...
The phone is booted into the bootloader
Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" now ...
Sending 'boot.img' (98304 KB) OKAY [ 2.833s]
Booting OKAY [ 10.359s]
Finished. Total time: 13.243s
Waiting up to 60 seconds for the boot of the phone ....
Waiting up to 10 seconds for the adb daemon to get ready ..
... the adb daemon is ready after second(s)
The phone is booted into TWRP: "twrp_I006D" version "3.7.0_12-0"
Waiting up to 10 seconds for the adb daemon to get ready
... the adb daemon is ready after second(s)
Coyping the OS image file "/data/backup/ASUS_ZENFONE8/omnirom/omni-13/omni-13-202212180505-zenfone8-MICROG.zip" to "/tmp/omni-13-202212180505-zenfone8-MICROG.zip" on the phone ...
adb: error: failed to read copy response8-MICROG.zip
/data/backup/ASUS_ZENFONE8/omnirom/omni-13/omni-13-202212180505-zenfone8-MICROG.zip: 1 file pushed, 0 skipped. 201.8 MB/s (1261116637 bytes in 5.959s)
adb: error: failed to read copy response
adb: device 'M6AIB760D0939LX' not found
Copying the image failed -- we will do another try in 5 seconds ...
/data/backup/ASUS_ZENFONE8/omnirom/omni-13/omni-13-202212180505-zenfone8-MICROG.zip: 1 file pushed, 0 skipped. 32.5 MB/s (1261116637 bytes in 37.056s)
Installing the OS image "/tmp/omni-13-202212180505-zenfone8-MICROG.zip" into the slot "_b" ...
Installing zip file '/tmp/omni-13-202212180505-zenfone8-MICROG.zip'
Flashing A/B zip to inactive slot: B
Step 1/2Step 2/2Updating partition details...
...done
Devices on super may not mount until rebooting recovery.
To flash additional zips, please reboot recovery to switch to the updated slot.
Done processing script file
OS image file "/tmp/omni-13-202212180505-zenfone8-MICROG.zip" successfully installed.
Now changing the next active slot to _b ...
... successfully changed the active slot for the next reboot
Rebooting the phone now ...
Booting the Android OS using the command "adb reboot " now ...
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $
Spoiler: Sample output of the script installing another OS in the inactive slot
Code:
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $ /data/develop/android/scripts_on_linux/install_os_via_twrp.sh factory_reset /data/backup/ASUS_ZENFONE8/Lineage-19_Android12/lineage-19.1-20221216-nightly-sake-signed.zip
install_os_via_twrp.sh version - v1.0.0.0 - install an OS image via the TWRP command twrp
Using the TWRP helper script "/data/develop/android/scripts_on_linux/boot_phone_from_twrp.sh"
The OS image to install is: "/data/backup/ASUS_ZENFONE8/Lineage-19_Android12/lineage-19.1-20221216-nightly-sake-signed.zip"
Reading the helper script "boot_phone_from_twrp.sh" ...
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will use the attached phone with the serial number "M6AIB760D0939LX"
Using the default TWRP image: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
Using the options " -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking the script prerequisites ...
Will wait up to 60 second(s) after booting the phone into the bootloader
Will wait up to 60 second(s) after booting the phone from the TWRP image
Will wait up to 10 second(s) until the adb daemon is ready to use
Retrieving the current status of the phone ...
The phone is currently booted into the Android OS
The phone is booted into the Android OS
Booting the phone into the bootloader now ...
Waiting up to 60 seconds for the boot into the fastboot mode ...
The phone is booted into the bootloader
Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" now ...
Sending 'boot.img' (98304 KB) OKAY [ 2.840s]
Booting OKAY [ 10.406s]
Finished. Total time: 13.286s
Waiting up to 60 seconds for the boot of the phone ....
Waiting up to 10 seconds for the adb daemon to get ready ..
... the adb daemon is ready after second(s)
The phone is booted into TWRP: "twrp_I006D" version "3.7.0_12-0"
Waiting up to 10 seconds for the adb daemon to get ready
... the adb daemon is ready after second(s)
Wiping all data including media ...
Done.
You may need to reboot recovery to be able to use /data again.
TWRP will not recreate /data/media on an FBE device. Please reboot into your rom to create /data/media
Formatting Metadata using mke2fs...
Done.
Done processing script file
Wiping the metadata ...
++ /usr/bin/adb -s M6AIB760D0939LX shell umount /dev/block/by-name/metadata
umount: /dev/block/sda22: Invalid argument
++ /usr/bin/adb -s M6AIB760D0939LX shell mke2fs -F -t ext4 /dev/block/by-name/metadata
mke2fs 1.45.4 (23-Sep-2019)
Discarding device blocks: done
Creating filesystem with 4096 4k blocks and 4096 inodes
Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done
Coyping the OS image file "/data/backup/ASUS_ZENFONE8/Lineage-19_Android12/lineage-19.1-20221216-nightly-sake-signed.zip" to "/tmp/lineage-19.1-20221216-nightly-sake-signed.zip" on the phone ...
adb: error: failed to read copy responsey-sake-signed.zip
/data/backup/ASUS_ZENFONE8/Lineage-19_Android12/lineage-19.1-20221216-nightly-sake-signed.zip: 1 file pushed, 0 skipped. 313.7 MB/s (1114300349 bytes in 3.387s)
adb: error: failed to read copy response
adb: device 'M6AIB760D0939LX' not found
Copying the image failed -- we will do another try in 5 seconds ...
/data/backup/ASUS_ZENFONE8/Lineage-19_Android12/lineage-19.1-20221216-nightly-sake-signed.zip: 1 file pushed, 0 skipped. 32.5 MB/s (1114300349 bytes in 32.719s)
Installing the OS image "/tmp/lineage-19.1-20221216-nightly-sake-signed.zip" into the slot "_a" ...
Installing zip file '/tmp/lineage-19.1-20221216-nightly-sake-signed.zip'
Flashing A/B zip to inactive slot: A
Step 1/2Step 2/2Updating partition details...
...done
Devices on super may not mount until rebooting recovery.
To flash additional zips, please reboot recovery to switch to the updated slot.
Done processing script file
OS image file "/tmp/lineage-19.1-20221216-nightly-sake-signed.zip" successfully installed.
Now changing the next active slot to _a ...
... successfully changed the active slot for the next reboot
*** Press return to reboot the phone now
Rebooting the phone now ...
Booting the Android OS using the command "adb reboot " now ...
[ OmniRom 13 Dev - [email protected] /data/develop/android/scripts_on_linux ] $
Testenvironment
I tested the script using this hardware and software:
Hardware:
ASUS Zenfone 8
TWRP
TWRP 3.7.0.12
OS Images installed via script
OmniROM 12
OmniROM 13
LineageOS 19
The script does not work for the images with the original Android from ASUS; the OS installation works but the phone does not boot from the new installation
The script install_os_via_twrp.sh is also available on my home page:
install_os_via_twrp.sh
Trouble Shooting
To update the installed OS to a new version in most cases neither a wipe nor a factory reset is necessary.
To install a different distribution on the phone in most cases a factory reset is required. (e.g installing LIneageOS if the current OS is OmniROM)