Hey all.
I was playing around with my old Pixel earlier and I realized that using twrp, as far as from fastboot is concerned, can be loaded: 'fastboot boot twrp.img' while Essential users do 'fastboot flash boot twrp.img'. On an adventure, I tried 'fastboot boot twrp.img' on my Essential, but to no success "FAILED (remote: unknown command)". I've tracked down that fastboot expects a kernel and ramdisk, which is contained in a boot.img. I took a look inside the two img files (stock boot.img, versus twrp_mata_11.img) but I don't really know what I'm looking at. I see a very obvious difference in size for the ramdisk and in the below code the 'cmdline' which, I'm taking an uneducated guess is basically extra arguments sent to the kernel(?) during boot.
So I'm curious, why is it that Pixel can boot without installing over the in-place boot, while Essential must overwrite it? They're both A/B phones.
I'm just asking out of the sake of curiosity. I am here to learn.
Thank you.
actual boot image:
Code:
$ ./bootimg.exe --unpack-bootimg boot.img
arguments: [bootimg file]
bootimg file: boot.img
output: kernel[.gz] ramdisk[.gz] second[.gz]
base: 0x0
ramdisk_addr: 0x1000000
second_addr: 0xf00000
tags_addr: 0x100
page_size: 4096
name: ""
cmdline: "quiet androidboot.hardware=mata user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a800000.dwc3 androidboot.selinux=permissive buildvariant=user veritykeyid=id:84678c054b9c09576bf1ecb156ea6e5e65f52593"
padding_size=4096
arguments: [ramdisk file] [directory]
ramdisk file: ramdisk.gz
directory: initrd
output: cpiolist.txt
compress: True
twrp boot image:
Code:
$ ./bootimg.exe --unpack-bootimg boot.img
arguments: [bootimg file]
bootimg file: boot.img
output: kernel[.gz] ramdisk[.gz] second[.gz]
base: 0x80000000
ramdisk_addr: 0x81000000
second_addr: 0x80f00000
tags_addr: 0x80000100
page_size: 4096
name: ""
cmdline: "androidboot.hardware=mata user_debug=31 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 [email protected] buildvariant=eng"
padding_size=4096
arguments: [ramdisk file] [directory]
ramdisk file: ramdisk.gz
directory: initrd
output: cpiolist.txt
compress: True
What is going on.... Is that with Pixel devices....you BOOT TWRP first on its own sans flashing. Then you install TWRP from within TWRP. Hence, "fastboot boot twrp.img" versus "fastboot flast boot boot.img". On Pixel devices, TWRP gets installed to your A and B ROM firmware slots, whereas on Essential TWRP lives in the boot partition.
At least that is my loose understanding of it.
https://forum.xda-developers.com/pixel-xl/development/twrp-alpha1-pixel-devices-t3500312
Whereas TWRP on Essential is always temporary.
Skripka said:
What is going on.... Is that with Pixel devices....you BOOT TWRP first on its own sans flashing. Then you install TWRP from within TWRP. Hence, "fastboot boot twrp.img" versus "fastboot flast boot boot.img". On Pixel devices, TWRP gets installed to your A and B ROM firmware slots, whereas on Essential TWRP lives in the boot partition.
At least that is my loose understanding of it.
https://forum.xda-developers.com/pixel-xl/development/twrp-alpha1-pixel-devices-t3500312
Whereas TWRP on Essential is always temporary.
Click to expand...
Click to collapse
Thanks for the reply!
Is it then theoretically possible to make a bootable twrp that we don't actually write to Essential boot?
For instance, since twrp is always and forever temporary on the Essential, just for simplicity, wouldn't it be a lot easier to just boot from a "temp twrp boot image" (not actually installing it) to install zips? Then we don't have to redo the stock boot, then custom kernel (if applicable) and then Magisk (if applicable) each time?
Again, just here to learn so if this is not feasible, it is what it is.
Thanks again.
jake5253 said:
Thanks for the reply!
Is it then theoretically possible to make a bootable twrp that we don't actually write to Essential boot?
For instance, since twrp is always and forever temporary on the Essential, just for simplicity, wouldn't it be a lot easier to just boot from a "temp twrp boot image" (not actually installing it) to install zips? Then we don't have to redo the stock boot, then custom kernel (if applicable) and then Magisk (if applicable) each time?
Again, just here to learn so if this is not feasible, it is what it is.
Thanks again.
Click to expand...
Click to collapse
That would be a question for someone who knows a ton more about TWRP than I.
I suspect it has to do with how Essential is partitioned and loads things. But that is just a hunch. Although with for example LineageOS's built-in updater and how Magisk work--there's very little need for regular TWRP access...unlike the Good Old Days even 2 years ago where TWRP was where everything was to do anything firmware related on your phone.
we dont have that command available, which is why it doesnt work.
there is no "fastboot boot" anything available
aer0zer0 said:
we dont have that command available, which is why it doesnt work.
there is no "fastboot boot" anything available
Click to expand...
Click to collapse
I guess I thought 'boot' was an argument as part of the fastboot command on the PC end of things. (Which it probably is, and then fastboot sends whatever commands to the phone which on the Pixel cause it to boot a 'temp image', just doesn't work the same on Essential as it does for others)
I just tried to 'fastboot boot' an actual boot.img and I get the same command failed, so this makes sense; it just doesn't have the ability to boot from an unflashed, temp boot.img... I don't know why I didn't think to test booting an actual boot image before asking.
I just assumed that fastboot was created equally for any phones that allowed fastboot at all.
From my searching, its actually kind of hard to track down any documentation worth reading on fastboot. The best I was able to locate was basically man page for fastboot, which is minimal at best.
Thanks guys for clearing this up!
jake5253 said:
I guess I thought 'boot' was an argument as part of the fastboot command on the PC end of things. (Which it probably is, and then fastboot sends whatever commands to the phone which on the Pixel cause it to boot a 'temp image', just doesn't work the same on Essential as it does for others)
I just tried to 'fastboot boot' an actual boot.img and I get the same command failed, so this makes sense; it just doesn't have the ability to boot from an unflashed, temp boot.img... I don't know why I didn't think to test booting an actual boot image before asking.
I just assumed that fastboot was created equally for any phones that allowed fastboot at all.
From my searching, its actually kind of hard to track down any documentation worth reading on fastboot. The best I was able to locate was basically man page for fastboot, which is minimal at best.
Thanks guys for clearing this up!
Click to expand...
Click to collapse
we have beat that drum at the AMA's to get them to add fastboot boot to the aboot. You should too, since you realize the potential
aer0zer0 said:
we have beat that drum at the AMA's to get them to add fastboot boot to the aboot. You should too, since you realize the potential
Click to expand...
Click to collapse
I always miss the AMAs. If I'm reading the most current plans, it should be the 3rd Wednesday each month, so March 21st? I also see on the latest one, there's a decently up-voted post which suggests adding fastboot boot, amongst other things.
Essential eeven responded with:
I too like to be able to boot a boot.img from memory, and we have this in our backlog, but it just isn't getting any love from our developers given our other priorities. No promises, but it's on our radar.
Click to expand...
Click to collapse
I'll attempt to be a part of the next AMA and push for fastboot boot.
Thanks
Related
Yesterday, I was messing about trying to fastboot boot other MSM8998 TWRP boot.imgs, with the hopes that the device-trees on some of them would be close enough to get far enough in boot to bring up the USB port (even if they didn't mount anything or bring up the screen). As it turns out, none of them did (and, in fact, they all blanked the screen and went back to having the USB interface enumerate as fastboot -- how could that be? does anyone understand what could cause fastboot to reject a kernel before even trying to boot it?), but when I was done for the day, I had another disturbing event: when I tried to boot the device normally, it would simply sit there at the fastboot screen, and in fact, when I tried to boot into recovery, it would still just kick me back to fastboot.
This was very scary -- without factory images to reflash it with, I thought I had bricked my device! I did a fastboot getvar all, and saw:
Code:
(bootloader) current-slot:a
(bootloader) has-slot:boot:yes
(bootloader) slot-retry-count:b:0
(bootloader) slot-unbootable:b:no
(bootloader) slot-successful:b:no
(bootloader) slot-retry-count:a:3
(bootloader) slot-unbootable:a:yes
(bootloader) slot-successful:a:yes
(bootloader) slot-count:2
So apparently just fastboot booting something that fails to boot can cause fastboot to declare that the live system image is no good.
If this happens to you, the answer to this is to make sure that you have the latest platform-tools (I had a properly oldschool version of fastboot that I've been kicking along on my Mac from the unrevoked era...) -- get them from Google -- and you can un-confuse the bootloader even without flashing a new image by doing a fastboot set_active a.
Then your phone will boot again. Phew!
So useful, thanx man!
Thank you, this is good to know.
Can anyone share system dump pls?
No need for system dump, the factory images are up: https://developers.google.com/android/images
joshua_ said:
Yesterday, I was messing about trying to fastboot boot other MSM8998 TWRP boot.imgs, with the hopes that the device-trees on some of them would be close enough to get far enough in boot to bring up the USB port (even if they didn't mount anything or bring up the screen). As it turns out, none of them did (and, in fact, they all blanked the screen and went back to having the USB interface enumerate as fastboot -- how could that be? does anyone understand what could cause fastboot to reject a kernel before even trying to boot it?), but when I was done for the day, I had another disturbing event: when I tried to boot the device normally, it would simply sit there at the fastboot screen, and in fact, when I tried to boot into recovery, it would still just kick me back to fastboot.
This was very scary -- without factory images to reflash it with, I thought I had bricked my device! I did a fastboot getvar all, and saw:
So apparently just fastboot booting something that fails to boot can cause fastboot to declare that the live system image is no good.
If this happens to you, the answer to this is to make sure that you have the latest platform-tools (I had a properly oldschool version of fastboot that I've been kicking along on my Mac from the unrevoked era...) -- get them from Google -- and you can un-confuse the bootloader even without flashing a new image by doing a fastboot set_active a.
Then your phone will boot again. Phew!
Click to expand...
Click to collapse
With that said you should still probably reflash partition_b because it might interfere with future updates which I assume you know how they work. Images like @hazzamon said are finally available.
Sent from my marlin using XDA Labs
Doesn't pixel 1 have a TWRP version which can see both slots and boot to either? Did you try to install or just fastboot to .img file? Did you unlock the bootloader? If you bought it from Google, I would think the bootloader should be pretty easy to unlock, there is the option to allow it in the dev settings.
I flashed the 8.1 beta using an old fastboot (that didn't know about slots) and now I'm stuck in the bootloader. I can't get android to boot, and I can't even get into the stock recovery or download options.
I've tried flashing the stock image several times, but that didn't do any good.
Any Help would be greatly appreciated!
Thanks!
I was looking through the bootloader screen and apparently there is a download mode, perhaps you could sideload an OTA
RagedElimanator said:
With that said you should still probably reflash partition_b because it might interfere with future updates which I assume you know how they work. Images like @hazzamon said are finally available.
Click to expand...
Click to collapse
Reflashing slot B is kind of funny on these devices. When they come from the factory, slot B doesn't come with an Android image, but instead the extra space is used to host prebuilt .odex images, to speed up first boot. (They comment on this in the A/B appnote: https://source.android.com/devices/...size-of-the-system-partition-without-squashfs ). So you actually don't really want to reflash slot B if you can avoid it.
pvillegeek said:
I flashed the 8.1 beta using an old fastboot (that didn't know about slots) and now I'm stuck in the bootloader. I can't get android to boot, and I can't even get into the stock recovery or download options.
I've tried flashing the stock image several times, but that didn't do any good.
Click to expand...
Click to collapse
Have you tried with a modern fastboot?
What does 'fastboot getvar all' tell you?
You need to set_active, like I mentioned.
pixel-painter said:
I was looking through the bootloader screen and apparently there is a download mode, perhaps you could sideload an OTA
Click to expand...
Click to collapse
The download mode is a no-op on production Walleye, I think
pixel-painter said:
Doesn't pixel 1 have a TWRP version which can see both slots and boot to either? Did you try to install or just fastboot to .img file? Did you unlock the bootloader? If you bought it from Google, I would think the bootloader should be pretty easy to unlock, there is the option to allow it in the dev settings.
Click to expand...
Click to collapse
I took the steps I mentioned in the OP You can't fastboot boot, fastboot set_active, or fastboot flash something without unlocking the bootloader.
joshua_ said:
Reflashing slot B is kind of funny on these devices. When they come from the factory, slot B doesn't come with an Android image, but instead the extra space is used to host prebuilt .odex images, to speed up first boot. (They comment on this in the A/B appnote: https://source.android.com/devices/...size-of-the-system-partition-without-squashfs ). So you actually don't really want to reflash slot B if you can avoid it.
Have you tried with a modern fastboot?
What does 'fastboot getvar all' tell you?
You need to set_active, like I mentioned.
The download mode is a no-op on production Walleye, I think
I took the steps I mentioned in the OP You can't fastboot boot, fastboot set_active, or fastboot flash something without unlocking the bootloader.
Click to expand...
Click to collapse
Which is why I asked if the bootloader was unlocked
joshua_ said:
Reflashing slot B is kind of funny on these devices. When they come from the factory, slot B doesn't come with an Android image, but instead the extra space is used to host prebuilt .odex images, to speed up first boot. (They comment on this in the A/B appnote: https://source.android.com/devices/...size-of-the-system-partition-without-squashfs ). So you actually don't really want to reflash slot B if you can avoid it.
Click to expand...
Click to collapse
I wonder if that means that flashing the factory image replaces the opposite slot with those prebuilt odex files then. On the original Pixel and Pixel XL it just flashed the opposite slot with an empty image.
joshua_ said:
Reflashing slot B is kind of funny on these devices. When they come from the factory, slot B doesn't come with an Android image, but instead the extra space is used to host prebuilt .odex images, to speed up first boot. (They comment on this in the A/B appnote: https://source.android.com/devices/...size-of-the-system-partition-without-squashfs ). So you actually don't really want to reflash slot B if you can avoid it.
Have you tried with a modern fastboot?
What does 'fastboot getvar all' tell you?
You need to set_active, like I mentioned.
The download mode is a no-op on production Walleye, I think
I took the steps I mentioned in the OP You can't fastboot boot, fastboot set_active, or fastboot flash something without unlocking the bootloader.
Click to expand...
Click to collapse
Well if you want to use slot_b then you might as well flash the image over that the slot_a pretty much takes place of what slot_b was in the beginning, but yeah you are right though about having slot_b at preconfigured state yet that's if you are on slot_a.
I think I might be in real trouble. I can't boot anything at all, just like others in this thread. I can't even boot TWRP, and I get this error:
PS C:\Users\hanna\Desktop\platform-tools> fastboot boot twrp-3.1.1-beta1-walleye.img
downloading 'boot.img'...
OKAY [ 0.715s]
booting...
FAILED (remote: Failed to load/authenticate boot image: Load Error)
finished. total time: 0.734s
Click to expand...
Click to collapse
I've tried setting the active slot to a, and back to b. I've tried multiple times to flash the stock image files from Google. They appear to flash normally, but I still can't boot.
All of this started after I accidentally tried to boot the recovery image from the pixel 2 xl. Something got seriously messed up, and I can't figure out how to repair it.
Does anyone know what else I can try?
mtpease said:
I think I might be in real trouble. I can't boot anything at all, just like others in this thread. I can't even boot TWRP, and I get this error:
I've tried setting the active slot to a, and back to b. I've tried multiple times to flash the stock image files from Google. They appear to flash normally, but I still can't boot.
All of this started after I accidentally tried to boot the recovery image from the pixel 2 xl. Something got seriously messed up, and I can't figure out how to repair it.
Does anyone know what else I can try?
Click to expand...
Click to collapse
Use cmd instead of powershell. I've had issues relating to fastboot/adb with PS in the past
Sent from my Pixel 2 using Tapatalk
mtpease said:
I think I might be in real trouble. I can't boot anything at all, just like others in this thread. I can't even boot TWRP, and I get this error:
I've tried setting the active slot to a, and back to b. I've tried multiple times to flash the stock image files from Google. They appear to flash normally, but I still can't boot.
All of this started after I accidentally tried to boot the recovery image from the pixel 2 xl. Something got seriously messed up, and I can't figure out how to repair it.
Does anyone know what else I can try?
Click to expand...
Click to collapse
I was in the same boat. Would only boot to bootloader after typical manual flash-all of the system image (no recovery, no nothing, just bootloader).
Here's what I did (Windows 10):
1) Update fastboot/adb
2) Download and extract latest 8.0 image (ends in 25)
3) Open CMD (not powershell)
4) fastboot set_active other
5) Manually flash bootloader (failed for me), radio (went ok), update .zip (some errors), reboot bootloader between each:
fastboot flash bootloader <location>
fastboot flash radio <location>
fastboot update <location of image-walleye-opd1.170816.025.zip>
6) fastboot set_active other then repeat bootloader, radio, update.zip manual flashes
Though I read this about the og Pixels... Basically just manually flash images to both slots when all else fails.
joetheshmo said:
Use cmd instead of powershell. I've had issues relating to fastboot/adb with PS in the past
Sent from my Pixel 2 using Tapatalk
Click to expand...
Click to collapse
I'm trying this now, but I can't get my phone to boot. It just goes back to the bootloader (which is unlocked). I'm getting the same "FAILED (remote: Failed to load/authenticate boot image: Load Error)" error. My adb/fastboot is at the latest version. Trying to flash the 8.1 factory image.
joshua_ said:
Yesterday, I was messing about trying to fastboot boot other MSM8998 TWRP boot.imgs, with the hopes that the device-trees on some of them would be close enough to get far enough in boot to bring up the USB port (even if they didn't mount anything or bring up the screen). As it turns out, none of them did (and, in fact, they all blanked the screen and went back to having the USB interface enumerate as fastboot -- how could that be? does anyone understand what could cause fastboot to reject a kernel before even trying to boot it?), but when I was done for the day, I had another disturbing event: when I tried to boot the device normally, it would simply sit there at the fastboot screen, and in fact, when I tried to boot into recovery, it would still just kick me back to fastboot.
This was very scary -- without factory images to reflash it with, I thought I had bricked my device! I did a fastboot getvar all, and saw:
Code:
(bootloader) current-slot:a
(bootloader) has-slot:boot:yes
(bootloader) slot-retry-count:b:0
(bootloader) slot-unbootable:b:no
(bootloader) slot-successful:b:no
(bootloader) slot-retry-count:a:3
(bootloader) slot-unbootable:a:yes
(bootloader) slot-successful:a:yes
(bootloader) slot-count:2
So apparently just fastboot booting something that fails to boot can cause fastboot to declare that the live system image is no good.
If this happens to you, the answer to this is to make sure that you have the latest platform-tools (I had a properly oldschool version of fastboot that I've been kicking along on my Mac from the unrevoked era...) -- get them from Google -- and you can un-confuse the bootloader even without flashing a new image by doing a fastboot set_active a.
Then your phone will boot again. Phew!
Click to expand...
Click to collapse
What if both partitions show as not successful?
Code:
(bootloader) current-slot:b
(bootloader) has-slot:boot:yes
(bootloader) slot-retry-count:b:6
(bootloader) slot-unbootable:b:no
(bootloader) slot-successful:b:no
(bootloader) slot-retry-count:a:5
(bootloader) slot-unbootable:a:no
(bootloader) slot-successful:a:no
Sorry to resurect this from the dead, but I was in the same boat and there doesn't seem to be an answer here, So I'll tell you what I did.
1. I booted into linux
2. Made sure my android platform tools were up to date
3. from the bootload I went to recovery(which would not open, ended up with phone with black screen)
4. from that black screen I could use Duece's tool and that fix the phone to where it will at least boot properly.
In hope this helps
I bought a new Moto G6 Plus XT1926. My goal is to install a twrp image as recovery and then next the lineage.
I got a weird issue when trying to flash "twrp-3.2.1-37-evert.img" on my 1926 by using "./fastboot flash recovery twrp-3.2.1-37-evert.img" on a mac console. The output is:
XT1926 myMac$ ./fastboot flash recovery recovery.img
sending 'recovery' (29440 KB)...
OKAY [ 0.630s]
writing 'recovery'..
(bootloader) Invalid partition name recovery
FAILED (remote failure)
finished. total time: 0.634s
Just before I unlocked the Bootloader. I tried:
1. Locking bootloader again and flash => nope
2. Restoring the partition table by the following commands:
./fastboot oem fb_mode_set
./fastboot flash partition gpt.bin
./fastboot flash bootloader bootloader.img
./fastboot flash logo logo.bin
./fastboot flash boot boot.img
Does anyone know why the partition "recovery" may be not present and how to make it flashable?
I flashed a XT1039 multiple times without issues, so I got some experiences. But i am out of ideas here.
How can it be that there simple is no recover on the phone I wonder.
Also I downloaded the "TWRP official" App and installed it within the Moto G stock rom and it also says that it can not locate the recovery.
I tried some stuff for two evenings and now i do not know how to continue...
Thanks for hints!
The Recovery is inside the boot, that's why the G6Plus don't have an official TWRP.
The ones we have are the bootable one with decryption enabled, or a flashable one with no decryption
So instead of flashing the TWRP to the recovery partition, I should flash it to the boot partition?
kietob said:
So instead of flashing the TWRP to the recovery partition, I should flash it to the boot partition?
Click to expand...
Click to collapse
No. Do not flash it at all! Load bootloader on your phone, from a pc with a fb and fastboot on it, run "fastboot boot twrp.img" without quotes and twrp.img matches the filename of the twrp IMG file. At this time we can not install twrp to our device. We can only boot it on our device using a pc every single time you need twrp. There was a twrp.img for our device we could flash with fastboot to install on our device but it does not properly flash files sadly. We are trying to raise funds to buy a device for a recognized developer in hopes of making some real progress on modding this device! Look around the G6 forums here and find the thread if you are able to make a PayPal donation or would like to see if you could donate in another way.
Sent from my moto g(6) plus using Tapatalk
Xplorer4x4 said:
No. Do not flash it at all! Load bootloader on your phone, from a pc with a fb and fastboot on it, run "fastboot boot twrp.img" without quotes and twrp.img matches the filename of the twrp IMG file. At this time we can not install twrp to our device. We can only boot it on our device using a pc every single time you need twrp. There was a twrp.img for our device we could flash with fastboot to install on our device but it does not properly flash files sadly. We are trying to raise funds to buy a device for a recognized developer in hopes of making some real progress on modding this device! Look around the G6 forums here and find the thread if you are able to make a PayPal donation or would like to see if you could donate in another way.
Sent from my moto g(6) plus using Tapatalk
Click to expand...
Click to collapse
Hey, any news about flashable TWRP? How can I donate someone who would work on it?
rafikowy said:
Hey, any news about flashable TWRP? How can I donate someone who would work on it?
Click to expand...
Click to collapse
Sadly no news. We have official TWRP now which is good. I'll talk to the devs and try to figure out if it's worth getting a pool started.
Sent from my Moto G6 Plus using XDA Labs
Hi! Seems like there are many different reasons why a Mi A1 can be stuck in Fastboot. I found others having the same symptom but the proposed solutions didn’t work for me.
Not matter what I do, my A1 won’t leave Fastboot:
- holding power button reboots to Fastboot
- holding power and volume up button reboots to Fastboot
- holding power and volume down button reboots to Fastboot
- `fastboot boot twrp.bin` does nothing (`sending`, `booting`, nothing)
- `fastboot flash recovery twrp.bin` complains `partition table doesn’t exist`
- `fastboot flash boot twrp.bin` complains `partition table doesn’t exist`
I basically followed the installation guide to install Lineage OS, used CosmicDan’s TWRP though. That didn’t work. Found out that I had to partition the storage for Treble. Flashed TWRP. Used “tissot manager” to partition. No I am stuck in Fastboot.
Any clues what is happening here?
There is a mistake in syntax for the flash command.
After the fastboot command you have to provide the slot for flashing boot.img
example: fastboot flash boot_a boot.img
In order to not screw up your device, download stock boot.img and write to both A and B slots then execute the reboot command.
This should do it
punktnet said:
There is a mistake in syntax for the flash command.
After the fastboot command you have to provide the slot for flashing boot.img
example: fastboot flash boot_a boot.img
In order to not screw up your device, download stock boot.img and write to both A and B slots then execute the reboot command.
This should do it
Click to expand...
Click to collapse
Thank you so much, this sounds promising. Where can I get the stock boot.img from?
punktnet said:
There is a mistake in syntax for the flash command.
After the fastboot command you have to provide the slot for flashing boot.img
example: fastboot flash boot_a boot.img
In order to not screw up your device, download stock boot.img and write to both A and B slots then execute the reboot command.
This should do it
Click to expand...
Click to collapse
tzyac said:
Thank you so much, this sounds promising. Where can I get the stock boot.img from?
Click to expand...
Click to collapse
I just flashed TWRP. And it is working. Thanks again!
My pleasure.
Just remember that this phone is almost impossible to brick
Hi, it can happen that after flashing TWRP, Orangefox or SHRP and after restarting in recovery, the device gets stuck on the recovery logo.
This happens because the data partition is encrypted and TWRP does not often support it does not support encryption and therefore data must be decrypted.
Before following this guide I recommend making a backup because the data will be deleted.
WARNING: NEVER run "fastboot -w" on Minimal Fastboot and ADB or 15 Seconds ADB installer, doing this the DATA partition is corrupted so it must necessarily be run on platform-tools.
To decrypt with fastboot you need platform tools taken from the Android SDK, click here for download.
To decrypt you need to:
1) Reboot the device in fastboot
2) Open the CMD inside the platform-tools folder
3) Run the "fastboot -w" command.
4) Now the device is decrypted.
Why not use TWRP_4pda_edition, which decrypts /data, at least with Android P? (have not tried Android Q yet)
Aerobatic said:
Why not use TWRP_4pda_edition, which decrypts /data, at least with Android P? (have not tried Android Q yet)
Click to expand...
Click to collapse
For those who want a data decrypted or compatible with all recovery. Many people have complained about the recoveries that were stuck in the splash logo and I wanted to make a thread so instead of always asking the same question, look at the thread
XRed_CubeX said:
Hi, it can happen that after flashing TWRP, Orangefox or SHRP and after restarting in recovery, the device gets stuck on the recovery logo.
This happens because the data partition is encrypted and TWRP does not often support it does not support encryption and therefore data must be decrypted.
Before following this guide I recommend making a backup because the data will be deleted.
WARNING: NEVER run "fastboot -w" on Minimal Fastboot and ADB or 15 Seconds ADB installer, doing this the DATA partition is corrupted so it must necessarily be run on platform-tools.
To decrypt with fastboot you need platform tools taken from the Android SDK, click here for download.
To decrypt you need to:
1) Reboot the device in fastboot
2) Open the CMD inside the platform-tools folder
3) Run the "fastboot -w" command.
4) Now the device is decrypted.
Click to expand...
Click to collapse
Will this erase anything?
DinIslamJoy said:
Will this erase anything?
Click to expand...
Click to collapse
Yes, "fastboot -w" command is the full wipe.
I just do not understand why people insist on using buggy variants of TWRP and tampering their phones because of this, while there is TWRP_4pda_version successfully decrypting user data in Androids 8, 9, 10?
Probably because those who successfully used it, did it silently, and did not bother to "Star" the thread promoting TWRP_4pda_version, and thus the thread is buried behind threads with faulty TWRP variants?
Aerobatic said:
Yes, "fastboot -w" command is the full wipe.
I just do not understand why people insist on using buggy variants of TWRP and tampering their phones because of this, while there is TWRP_4pda_version successfully decrypting user data in Androids 8, 9, 10?
Probably because those who successfully used it, did it silently, and did not bother to "Star" the thread promoting TWRP_4pda_version, and thus the thread is buried behind threads with faulty TWRP variants?
Click to expand...
Click to collapse
I did this thread because many people complain about the freeze in the logo and I could not answer one by one and therefore I decided to do this guide
Fixed my issue, thanks!
XRed_CubeX said:
Hi, it can happen that after flashing TWRP, Orangefox or SHRP and after restarting in recovery, the device gets stuck on the recovery logo.
This happens because the data partition is encrypted and TWRP does not often support it does not support encryption and therefore data must be decrypted.
Click to expand...
Click to collapse
I was facing this issue and tried to do the mentioned steps but it gave me this error:-
Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
Sending 'cache' (56 KB) FAILED (remote: 'Error: Last flash failed : Write Protected')
fastboot: error: Command failed
device- Xiaomi Mi A2 , it always give me this error (Write protected). Any suggestions would be helpful.
adb tells me this, I dont know if it worked or not yet, but the code makes me think it didnt:
C:\adb\platform-tools>fastboot -w
Erasing 'userdata' OKAY [ 0.436s]
F2FS-tools: mkfs.f2fs Ver: 1.15.0 (2022-05-20)
Info: Disable heap-based policy
Info: Debug level = 1
Info: Trim is disabled
Info: Set conf for android
Info: Enable Project quota
Error: Sparse mode is only supported for android
C:\adb\platform-tools/make_f2fs failed: 4294967295
fastboot: error: Cannot generate image for userdata
C:\adb\platform-tools>
Update, it actually did work Thanks.
Aerobatic said:
Yes, "fastboot -w" command is the full wipe.
I just do not understand why people insist on using buggy variants of TWRP and tampering their phones because of this, while there is TWRP_4pda_version successfully decrypting user data in Androids 8, 9, 10?
Probably because those who successfully used it, did it silently, and did not bother to "Star" the thread promoting TWRP_4pda_version, and thus the thread is buried behind threads with faulty TWRP variants?
Click to expand...
Click to collapse
Im guessing it is because it doesnt work flawlessly on any device, for my redmi 9a for example, it is recomended to use PBRP or OFRP and avoid TWRP if posible, IDK man, Im just a n00b so I repeat what I hear and hope Im not spreading missinformation, but thats what I think.
Ivan.Adriazola said:
adb tells me this, I dont know if it worked or not yet, but the code makes me think it didnt:
C:\adb\platform-tools>fastboot -w
Erasing 'userdata' OKAY [ 0.436s]
F2FS-tools: mkfs.f2fs Ver: 1.15.0 (2022-05-20)
Info: Disable heap-based policy
Info: Debug level = 1
Info: Trim is disabled
Info: Set conf for android
Info: Enable Project quota
Error: Sparse mode is only supported for android
C:\adb\platform-tools/make_f2fs failed: 4294967295
fastboot: error: Cannot generate image for userdata
C:\adb\platform-tools>
Update, it actually did work Thanks.
Click to expand...
Click to collapse
Strange that after two years the guide still works, it may no longer be current because it was an old problem but apparently it is still there.
To make you understand I don't even have the device anymore.
Ivan.Adriazola said:
Im guessing it is because it doesnt work flawlessly on any device, for my redmi 9a for example, it is recomended to use PBRP or OFRP and avoid TWRP if posible, IDK man, Im just a n00b so I repeat what I hear and hope Im not spreading missinformation, but thats what I think.
Click to expand...
Click to collapse
Yes, there are some errors, in reality the stability of the recovery can depend on various factors such as: device, device tree, recovery maintainer and in some cases the TWRP, PBRP or other sources.
You should never blame TWRP or recovery in general because not all TWRP of every device is the same as not all PBRP may be the same, it can change many things.
If someone still using.
facing this
C:\Users\Lucky\Desktop\MI BOOT\A2\platform-tools>fastboot -w
Erasing 'userdata' OKAY [ 0.142s]
mke2fs 1.46.6-rc1 (12-Sep-2022)
mke2fs: Illegal or malformed device name while trying to determine filesystem size
C:\Users\Lucky\Desktop\MI BOOT\A2\platform-tools/mke2fs failed: 1
fastboot: error: Cannot generate image for userdata
MantriJi said:
If someone still using.
facing this
C:\Users\Lucky\Desktop\MI BOOT\A2\platform-tools>fastboot -w
Erasing 'userdata' OKAY [ 0.142s]
mke2fs 1.46.6-rc1 (12-Sep-2022)
mke2fs: Illegal or malformed device name while trying to determine filesystem size
C:\Users\Lucky\Desktop\MI BOOT\A2\platform-tools/mke2fs failed: 1
fastboot: error: Cannot generate image for userdata
Click to expand...
Click to collapse
The guide is old and may be outdated, repair partition with TWRP
I wanted to make this post about my adventure with my old Pixel 2. I was getting non-stop red lines out of the log in TWRP. Many times I would have problems mounting system and vendor partitions as well as vendor partitions needing "to be cleaned".
This led me to believe that I may have a corrupted partition, so I did some research into how the partitions are organized, and what happens when you flash a lot of ROMs. Perhaps you want to go back to the stock firmware? Perhaps - like in my case - you want to install a ROM such as GrapheneOS that's meant to lock the bootloader afterwards, and act more like the stock ROM.
What I didn't understand up until recently is how exactly the A and B slots of phones like the Pixel 2 work. They work because the firmware allows updating OTA to the opposite slot of what's active. That way - in the worst case scenario - you can actually boot into the opposite slot and regain access to your phone. I'm not an expert on this, but that's my basic understanding.
So now that that's covered, another important aspect is flashing ROMs. If you are like me and like testing many different ROMs, you may end up running into issues such as the one I stated above with TWRP.
The only way I was able to avoid these types of issues is to run some commands through fastboot.
One such command is
Code:
fastboot format system
This command will format the system partition and make it easier to install ROMs without running into issues.
Another command is
Code:
fastboot format vendor
This command was very important in my case, because the vendor partition was actually unusable for my slot A. Doing this command finally fixed that issue.
Another thing to note is ROMs can be installed in both slots. A lot of people don't do this, because they leave their bootloader unlocked and probably just run the ROM for half a day, and flash another. In my case, I needed to flash both slots in order to lock the bootloader in GrapheneOS, and allow the OS to update OTA. If you don't flash both slots, that won't work.
Just to clarify further, these are the commands (at the bootloader) I ran (from a command prompt in Windows) in order from start to finish when I was flashing a ROM I wanted to keep:
Code:
fastboot --set-active=a
fastboot format system
fastboot format vendor
fastboot reboot bootloader
fastboot --set-active=b
fastboot format system
fastboot format vendor
fastboot reboot bootloader
fastboot flash bootloader bootloader.img
fastboot reboot bootloader
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update rom.zip
// Let the phone reboot into the new ROM, let it sit for a minute,
// then reboot into bootloader manually and then continue with fastboot:
fastboot --set-active=a
fastboot flash bootloader bootloader.img
fastboot reboot bootloader
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update rom.zip
Once I've done this, and can confirm it successfully loads into the ROM I've installed, I can now say that I have a clean, fresh install in BOTH slots A and B.
I'll update this thread if I can think of anything else that can help newbies like me.
Cheers!
HCFL said:
I wanted to make this post about my adventure with my old Pixel 2. I was getting non-stop red lines out of the log in TWRP. Many times I would have problems mounting system and vendor partitions as well as vendor partitions needing "to be cleaned".
This led me to believe that I may have a corrupted partition, so I did some research into how the partitions are organized, and what happens when you flash a lot of ROMs. Perhaps you want to go back to the stock firmware? Perhaps - like in my case - you want to install a ROM such as GrapheneOS that's meant to lock the bootloader afterwards, and act more like the stock ROM.
What I didn't understand up until recently is how exactly the A and B slots of phones like the Pixel 2 work. They work because the firmware allows updating OTA to the opposite slot of what's active. That way - in the worst case scenario - you can actually boot into the opposite slot and regain access to your phone. I'm not an expert on this, but that's my basic understanding.
So now that that's covered, another important aspect is flashing ROMs. If you are like me and like testing many different ROMs, you may end up running into issues such as the one I stated above with TWRP.
The only way I was able to avoid these types of issues is to run some commands through fastboot.
One such command is
Code:
fastboot format system
This command will format the system partition and make it easier to install ROMs without running into issues.
Another command is
Code:
fastboot format vendor
This command was very important in my case, because the vendor partition was actually unusable for my slot A. Doing this command finally fixed that issue.
Another thing to note is ROMs can be installed in both slots. A lot of people don't do this, because they leave their bootloader unlocked and probably just run the ROM for half a day, and flash another. In my case, I needed to flash both slots in order to lock the bootloader in GrapheneOS, and allow the OS to update OTA. If you don't flash both slots, that won't work.
Just to clarify further, these are the commands (at the bootloader) I ran (from a command prompt in Windows) in order from start to finish when I was flashing a ROM I wanted to keep:
Code:
fastboot --set-active=a
fastboot format system
fastboot format vendor
fastboot reboot bootloader
fastboot --set-active=b
fastboot format system
fastboot format vendor
fastboot reboot bootloader
fastboot flash bootloader bootloader.img
fastboot reboot bootloader
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update rom.zip
// Let the phone reboot into the new ROM, let it sit for a minute,
// then reboot into bootloader manually and then continue with fastboot:
fastboot --set-active=a
fastboot flash bootloader bootloader.img
fastboot reboot bootloader
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update rom.zip
Once I've done this, and can confirm it successfully loads into the ROM I've installed, I can now say that I have a clean, fresh install in BOTH slots A and B.
I'll update this thread if I can think of anything else that can help newbies like me.
Cheers!
Click to expand...
Click to collapse
Would this help in bootloop as well? I have a pixel 1st gen that does. I have flashed and or tried to anyways factory images...OTA and even was able to boot twrp and get lineage to flash, only to get a random reboot and bootloop. I would need to flash the factory image in order to get this phone operable. Should I flash a factory image and then do your steps or should I do the steps first and then flash the factory image?
Nope. Did not work. Seems as if the stock recovery is fubar