How to flash a treble img without fastboot (/system wiped, twrp operational)? - Treble-Enabled Device Questions and Answers

I may be in a tricky spot here. I've a Palm phone which doesn't have fastboot. I flashed twrp and a replacement system image but the system image didn't boot as planned. I wiped it with the intention of replacing using dd which writes the data, but the partition is corrupt and can't be mounted.
How to recover? TWRP only has 'boot' and 'recovery' as options for the img flash, which I assume is because it's using fastboot and that isn't available.

snoopy20 said:
I may be in a tricky spot here. I've a Palm phone which doesn't have fastboot. I flashed twrp and a replacement system image but the system image didn't boot as planned. I wiped it with the intention of replacing using dd which writes the data, but the partition is corrupt and can't be mounted.
How to recover? TWRP only has 'boot' and 'recovery' as options for the img flash, which I assume is because it's using fastboot and that isn't available.
Click to expand...
Click to collapse
Try manually formatting the system partition into whatever your device has as default, ext4 for example, or alternatively reinstall the stock Rom and continue from there, also, wrong thread

Related

Twrp disappears after loading, recovery Red Triangle NO Command

Getting confused.
Loaded Nougat on my Nexus 5x... unlocked boot loader, loaded TWRP 3.0.2-2 rebooted, saw TWRP,
Moving files to the phone to restore using TB, but have not yet done SUPERSU.. reboot back into recovery, Android Flat on back Red Triangle, No command??
Can reboot into the phone it works, just can't get back to TWRP for reasons I can't figure out.
Feels like I missing a step, but can't figure out what. Looked at a lot of pages, but nothing really stands out.
Update: Used fastboot boot [twrp imagename].img
And it got me directly to TWRP. Able to load SuperSU then.
Update #2: What I didn't make clear in this original post was I did in fact flash the TWRP recovery, it just didn't stick.
Command used originally:
Code:
C:\SDK\platform-tools>fastboot flash recovery twrp-3.0.2-2-bullhead.img
target reported max download size of 536870912 bytes
sending 'recovery' (16433 KB)...
OKAY [ 0.421s]
writing 'recovery'...
OKAY [ 0.154s]
finished. total time: 0.579s
My mistake was to then reboot where it was apparently overwritten hence the confusion.
krelvinaz said:
Getting confused.
Loaded Nougat on my Nexus 5x... unlocked boot loader, loaded TWRP 3.0.2-2 rebooted, saw TWRP,
Moving files to the phone to restore using TB, but have not yet done SUPERSU.. reboot back into recovery, Android Flat on back Red Triangle, No command??
Can reboot into the phone it works, just can't get back to TWRP for reasons I can't figure out.
Feels like I missing a step, but can't figure out what. Looked at a lot of pages, but nothing really stands out.
Update: Used fastboot boot [twrp imagename].img
And it got me directly to TWRP. Able to load SuperSU then.
Click to expand...
Click to collapse
The reason that happens is if u fastboot boot twrp.img u will only have a temporary twrp until u reboot..if u had typed fastboot flash recovery recovery twrp.img then when u reboot the recovery would be permanent...
Sent from my Nexus 5X using XDA-Developers mobile app
dog121 said:
The reason that happens is if u fastboot boot twrp.img u will only have a temporary twrp until u reboot..if u had typed fastboot flash recovery recovery twrp.img then when u reboot the recovery would be permanent...
Click to expand...
Click to collapse
Actually, I did use flash the recovery. It came up just fine. However, after a reboot, when I booted back to recovery I got the No Command.
I had to re-flash TWRP, and then reboot back to Recover from TWRP, then reboot, then it worked like it should.
The command you posted was to boot a recovery, not to flash one in the recovery partition.
Anyway, you can't just flash TWRP and boot, because the boot will replace stock recovery, you got to flash supersu/another kernel from the recovery after flashing for it to stick.
You Can try this adb command :
fastboot flash recovery twrp_3.0-2-2.img
fastboot boot twrp_3.0-2-2.img
And normaly it's ok you have twrp installed
Thanks for the other responses...
Just to confirm what I did originally (I just unrooted so that I could use Magisk and PPH Root)
Code:
C:\SDK\platform-tools>fastboot flash recovery twrp-3.0.2-2-bullhead.img
target reported max download size of 536870912 bytes
sending 'recovery' (16433 KB)...
OKAY [ 0.421s]
writing 'recovery'...
OKAY [ 0.154s]
finished. total time: 0.579s
However, If after doing this I rebooted the phone etc... TWRP was no longer there again. I had to do the same, force a boot to twrp, and then install Magisk before rebooting for it to stick.
Just in case someone else runs into this confusion.
I am now on Android 7 Nougat on a Nexus 5X with Magisk using PPH Root and can now use Root, Android Pay and some other apps which won't run with root enabled. Happy Camper for now.
The step your missing is after you fastboot flash the recovery don't reboot the phone just yet. You have to reboot the bootloader by typing fastboot reboot bootloader. After doing that use the volume up button to access recovery. Once you do that then you can start the phone.
Sent from my Nexus 5X using Tapatalk
krelvinaz said:
However, If after doing this I rebooted the phone etc... TWRP was no longer there again. I had to do the same, force a boot to twrp, and then install Magisk before rebooting for it to stick.
Click to expand...
Click to collapse
If you boot with a stock boot.img the android boot process will replace your recovery partition with stock if the SHA256 for the recovery doesn't match what it expects. The way you can stop this is to modify your boot.img, which would happen if you install SuperSU prior to first android boot after a new flash.

Can't encrypt w CM 12.1

I recently re-installed CM 12.1 and have found that I can't encrypt my phone. Every time I try to encrypt, the phone shows the Android working screen for about 5 seconds, then restarts. No encryption.
Very strange, bc previously I was able to encrypt while running the exact same version of CM. Stats below.
Sony Xperia Z1C
CM 12.1-20161016-NIGHTLY-amami
Recovery: TWRP 3.0.2-0
Any idea what I'm doing wrong? Thanks!
Hi,
most likely, this is because you formatted you data partition with a twrp that doesn't support decryption and hence your partition is too big now.
Try my build which support decryption (https://www.androidfilehost.com/?fid=24533103863142425), backup your stuff, format data and try again.
Cheers
most likely, this is because you formatted you data partition with a twrp that doesn't support decryption and hence your partition is too big now.
Click to expand...
Click to collapse
Thank you derf!
Question: I've also been unable to install AICP using this version of TWRP, but I've been able to install CM12 on multiple occasions. Do you think this is related?
Thanks!
@derf elot I can't seem to get the new recovery to install. Terminal says it's successful, but when I boot into recovery, it's still 3.0.2-0, and I get an error when I try to format data. Any ideas? Deets below.
Here's a readout from Terminal:
./fastboot flash recovery twrp-3.0.2-1.img
sending 'recovery' (11660 KB)...
OKAY [ 0.397s]
writing 'recovery'...
OKAY [ 0.774s]
finished. total time: 1.172s​
Then I reboot, and then reboot again into recovery. I see TWRP 3.0.2-0. When I try to format data, I get
E:Unable to wipe '/data' - - unknown file system 'atuo'
Unable to format to remove encryption​Even though I'm not encrypted.
What am I doing wrong?
Recovery must be instaled in FOTA i think?
P.S. try Rashr app from the store to flash recovery to FOTA.
zlata said:
Recovery must be instaled in FOTA i think?
P.S. try Rashr app from the store to flash recovery to FOTA.
Click to expand...
Click to collapse
I just tried Rashr. Same results: Even though I'm installing TWRP 3.0.2-1, I still see TWRP 3.0.2.0 when I boot into recovery. And I'm still not able to format data.
How do I install via FOTA? Is there a fastboot or adb command?
Thank you!
@zlata would this command work?
Code:
fastboot flash FOTAKernel twrp-3.0.2-1.img
Hi,
yes, that should work. It might be because of some fstab settings I put in there.
Please try the attached one, unzip and flash the .img. Let me know.
Cheers
derf elot said:
Hi,
yes, that should work. It might be because of some fstab settings I put in there.
Please try the attached one, unzip and flash the .img. Let me know.
Cheers
Click to expand...
Click to collapse
Success! I was able to format data, restore from a backup, and encrypt my phone. Thank you @derf elot!!!
I'm still unable to install AICP for some reason, but it doesn't seem to be a TWRP issue. I'll solve in an AICP thread. Thank you!!!

How to install twrp without being able to boot into system?

I hate doing this since I've been a long time user and usually am able to figure stuff out on my own, but I'm hoping there is an easy fix. I dirty flashed the new aokp update over an older aokp version for the pixel xl and i forgot to flash the twrp image after. Now the system ui crashes upon boot (no surprise there) and I can only get into bootloader and the stock phone recovery. How do I get twrp back?
localceleb said:
I hate doing this since I've been a long time user and usually am able to figure stuff out on my own, but I'm hoping there is an easy fix. I dirty flashed the new update over an older aokp version for the pixel xl and i forgot to flash the twrp image after. Now the system ui crashes upon boot (no surprise there) and I can only get into bootloader and the stock phone recovery. How do I get twrp back?
Click to expand...
Click to collapse
You fastboot boot twrp then flash it in twrp. The same way you got it the first time.
pcriz said:
You fastboot boot twrp then flash it in twrp. The same way you got it the first time.
Click to expand...
Click to collapse
I used the toolkit last time, but I cant adb to recognize the phone in its current state
localceleb said:
I used the toolkit last time, but I cant adb to recognize the phone in its current state
Click to expand...
Click to collapse
This why I wouldn't use a toolkit, you're just kind of handicapping yourself..
You don't need adb to fastboot. either you are using adb (in the booted OS or in recovery) or you are using fastboot (in the bootloader).
You should take a gander at a few of the guides in the Guides section on how to install recovery.
TWRP Thread:
https://forum.xda-developers.com/pixel-xl/development/twrp-alpha1-pixel-devices-t3500312
How to Guide for Beginners (look for the portion on installing twrp):
https://forum.xda-developers.com/pixel-xl/how-to/guide-how-to-unlock-root-flash-pixel-xl-t3507886
Good luck.
localceleb said:
I used the toolkit last time, but I cant adb to recognize the phone in its current state
Click to expand...
Click to collapse
If you are in bootloader mode when you type adb commands it will fail. You use Fastboot commands at that point.
ADB commands are for when tbe phone is booted normally.
TonikJDK said:
If you are in bootloader mode when you type adb commands it will fail. You use Fastboot commands at that point.
ADB commands are for when tbe phone is booted normally.
Click to expand...
Click to collapse
Can you mount the system and use adb commands through the stock recovery? I can't seem to get any fastboot or adb commands to work at all. Even when the system is booted up. The system ui crashes, but shouldn't adb commands still work at that point?
localceleb said:
Can you mount the system and use adb commands through the stock recovery? I can't seem to get any fastboot or adb commands to work at all. Even when the system is booted up. The system ui crashes, but shouldn't adb commands still work at that point?
Click to expand...
Click to collapse
Who knows what else crashed if the ui crashed. Power down, count to ten. Then power and vol down. Once in recovery, connect it to the computer. Not before.
Fastboot devices
If it shows flash the factory image. Modify the bat file and remove the -w to save your data.
If it doesn't connect try other usb ports. Mine won't connect to my front panel, only the rear.
And try another cable.
TonikJDK said:
Who knows what else crashed if the ui crashed. Power down, count to ten. Then power and vol down. Once in recovery, connect it to the computer. Not before.
Fastboot devices
If it shows flash the factory image. Modify the bat file and remove the -w to save your data.
If it doesn't connect try other usb ports. Mine won't connect to my front panel, only the rear.
And try another cable.
Click to expand...
Click to collapse
Well, in theory if I can get fastboot to work I would want to flash the twrp recovery image and then restore a backup, right?
localceleb said:
Well, in theory if I can get fastboot to work I would want to flash the twrp recovery image and then restore a backup, right?
Click to expand...
Click to collapse
I am not a fan of TWRP backups on the Pixels. Seen a few bricks, especially on R2.
So i have attempted to fastboot flash a twrp img and its failing.
C:\Android\TWRP>fastboot flash recovery twrp-3.0.2-0-RC1-fastboot-marlin.img
target reported max download size of 536870912 bytes
sending 'recovery' (26588 KB)...
OKAY [ 0.917s]
writing 'recovery'...
(bootloader) Flashing active slot "_b"
FAILED (remote: partition [recovery] doesn't exist)
finished. total time: 1.020s
Am I safe to try a factory image or am I doing something wrong trying to flash the recovery image. ADB commands don't seem to work at this point for some reason.
Thanks for any help!
localceleb said:
So i have attempted to fastboot flash a twrp img and its failing.
C:\Android\TWRP>fastboot flash recovery twrp-3.0.2-0-RC1-fastboot-marlin.img
target reported max download size of 536870912 bytes
sending 'recovery' (26588 KB)...
OKAY [ 0.917s]
writing 'recovery'...
(bootloader) Flashing active slot "_b"
FAILED (remote: partition [recovery] doesn't exist)
finished. total time: 1.020s
Am I safe to try a factory image or am I doing something wrong trying to flash the recovery image. ADB commands don't seem to work at this point for some reason.
Thanks for any help!
Click to expand...
Click to collapse
You are doing it wrong. You copy the TWRP zip to the phone.
Then
Fastboot BOOT twrp twrp-3.0.2-0-RC1-fastboot-marlin.img
That boots you to twrp. Then you install the twrp zip while in twrp.
You can not install twrp any other way.
TonikJDK said:
You are doing it wrong. You copy the TWRP zip to the phone.
Then
Fastboot BOOT twrp twrp-3.0.2-0-RC1-fastboot-marlin.img
That boots you to twrp. Then you install the twrp zip while in twrp.
You can not install twrp any other way.
Click to expand...
Click to collapse
I need to add that I cant boot into the system as the system ui crashes so I have no way to transfer files to the phone at this place.
localceleb said:
I need to add that I cant boot into the system as the system ui crashes so I have no way to transfer files to the phone at this place.
Click to expand...
Click to collapse
Fastboot boot to twrp as I described. TWRP has ADB in it, so then from your computer you can ADB push the twrp zip and install it.
But I still advise you to flash the factory image after removing the -w from the flashall bat file.
TonikJDK said:
Fastboot boot to twrp as I described. TWRP has ADB in it, so then from your computer you can ADB push the twrp zip and install it.
But I still advise you to flash the factory image after removing the -w from the flashall bat file.
Click to expand...
Click to collapse
He shouldn't bother removing the -w. A fresh image is what he is in need of. Wipe the phone and start over. Easy.

[Q] Problem with system partition

Hi, i have several problem or maeby is the same. I'm trying to go back so stock system and i can't i already reflash al *.img except system i always have errors: "FAILED (data transfer failure (Unknown error))" and only with system, i already install twrp and pass with adb push the system.img to the tablet, but twrp doesn't allow me to flash to system partition.
So i have some doubts:
1) is there a way to know if the memory is damage in some way?, i mean physicaly damage.
2) can i flash system partition from the device? twrp or any other ways?

Question [URGENT] TWRP fails to decrypt /data partition using the correct passcode and can't mount /cust partition with error "Structure needs cleaning"

Long story short, read the previous thread: https://forum.xda-developers.com/t/...-product-vendor-odm-invalid-argument.4431903/
After succesfully installing the fastboot rom via Mi Flash, the phone is still in a bootloop. Tried flashing TWRP via fastboot command (fastboot boot twrp.img) but it can't decrypt the /data partition with the correct passcode anymore. after a reboot in recovery, the /cust partition also can't be mounted anymore, with error "Structure needs cleaning".
I do not have a backup of my system nor data partition, nor internal storage, so i absolutely need it to work again without wiping/formatting the data partition
EDIT: after flashing the fastboot rom again via mi flash and twrp via fastboot command, the cust error disappears but twrp still can't decrypt /data
EDIT: i decided to do a full wipe of my internal memory and the phone works again. this thread should be closed.

Categories

Resources