Re-flashing OPX ROM via fastboot - OnePlus X Q&A, Help & Troubleshooting

Hi
First a little history...
I recently got an OPX with the intention of installing Sailfish OS on it. So first I need to get CM 12.1 installed. Following the instructions here I flashed TWRP using fastboot, but the version of TWRP provided at the link would not find any system partitions on my device and therefore could not be used to flash any images. Newer versions of TWRP would simply not load.
Eventually, using the stock OPX recovery, I managed to upgrade Oxygen OS to the latest version. I then flashed the latest version of TWRP (3.1.1-1) again and it worked! It found my devices partitions and I could flash ROMs with it. But, it wouldn't flash CM 12.1. Something about a trustzone incompatibility...
So I got the idea to try and downgrade Oxygen OS, which I did via TWRP. But then TWRP stopped working... and here is my problem.
I'm now stuck in a situation where:
- I can access fastboot
- The only versions of TWRP which work (e.g. 3.0.2-0) fail to find my system partitions, and therefore can't be used to flash ROMs
- The stock recovery also seems to fail to find the system partitions (clicking on "install locally" does nothing), so I can't use that to flash ROMs either
So I really need to get a working image on my phone somehow... but how?? Is it possible to do this via fastboot only?
Cheers!

Is your bootloader unlocked? TWRP cannot see system partitions if so.

I unlocked it originally... but since then I have installed a new ROM (Oxygen OS 2.x). Would this overwrite the bootloader? Do I need to unlock again? I think I must be using the old OOS bootloader now...

I think you can see if it's unlocked if you boot into bootloader, connect to pc and write on cmd "fastboot devices".
Whenever you switch between android 5.0 roms and 6.0 and further you have to first use the correct recovery from oneplus, only then you can flash the correct twrp and the adequate roms

My bootloader is unlocked. I cannot flash a new ROM via recovery, because none of the recovery images (stock, TWRP) can see my system partitions (I don't know why). At this stage I would just like to know if there is a way to flash a stock ROM/recovery/bootloader via some other method (fastboot, or a special tool), so I can restore my phone back to factory state. I don't care about losing data. Thanks.
EDIT: Just to clarify, I believe this is my current situation (please correct me if something doesn't make sense):
- OOS has two different bootloaders, 2.x and 3.x.
- The phone originally had OOS 2.x on it. None of the TWRP images I installed recognized my system partitions, so I couldn't flash with TWRP.
- After re-installing the stock recovery (which happened automatically when I booted to the stock ROM), I was able to upgrade to OOS 3.x via stock recovery. Now recent TWRP versions were working (I assume because upgrading to OOS 3.x updated the bootloader too), and were recognizing my system partitions.
- Using a new version of TWRP (3.1.1-1), I re-flashed an older version of OOS 2.x again. I think this was my mistake, because I think this downgraded the bootloader to 2.x again. Now none of the TWRP versions recognize my system partitions, so I cannot flash ROMs.
- I have re-flashed the stock recovery from the OnePlus website, but not even this allows me to flash ROMs. The symptoms look like in TWRP, i.e. that it fails to recognize my system partitions. So I am stuck with no way to flash ROMs, or upgrade the bootloader.

Related

[Q] Questions about a failed custom rom flash.

This is the first time I tried to install a custom rom. Please be gentle.
Device: Huawei Y300 (Bootloader unlocked and rooted)
TWRP Version: 2.5.0.1
Custom rom: cm-11-20140510-NIGHTLY-u8833.zip (found here)
I mindlessly tried to flash cyanogenmod 11 (kitkat) on my Huawei Y300. Here was the last steps I did:
copied rom and gapps zip files on phone root
restarted phone in fastboot mode
on ADB, ran
Code:
fastboot flash boot path\to\boot.img
(everything seem to be working fine)
ran
Code:
fastboot reboot
(phone rebooted in TWRP)
Tried to install cm-11-20140510-NIGHTLY-u8833.zip rom file (installation failed)
From what I read, the version of my twrp is not compatible with kitkat? Now i believe I bricked my phone because I forgot to create a backup of the stock rom.
Questions:
Is the stock rom still somehow there, hiding in my phone memory?
Is it possible to "undo"
Code:
fastboot flash boot path\to\boot.img
so that the "original" boot.img is used by my phone when I try to reboot it?
I am currently downloading Android SDK with a plan to upgrade my twrp for kitkat compatibility. I hope this will let me install cyanogenmod kitkat on my huawei. But I am not sure if I will succeed. If I still fail, can you guys tell me what other options I have to save my phone?
Thanks
Edit: problem solved.
I learned how to properly flash/upgrade twrp via fastboot.. Retried installing rom with twrp 2.7 and it was successful.

Encryption on custom ROMs?

I was able to enable Android encryption (/user partition) under a stock ROM, but I've tried several ROMs that where encryption fails. Specifically, when enabling encryption on AICP 4.4.4, the system reboots (as usual), then completely forgets that I asked it to get encrypted.
Semi-related, I'm having trouble installing TWRP onto the Xperia Z2. AFAIK it's the only recovery that supports encrypted partitions, and XZDualRecovery bundles a version of TWRP that may be too old to use the KK4.4 encryption.
(After installing TWRP based on directions from the site, booting into recovery via power + volume up buttons just hangs on a black screen.)
My phone is a Sony Xperia Z2 D6503, with unlocked bootloader.
Has anyone gotten this to work?
I have gotten this to work (sort of) with a two-kernel solution.
This post contains a stock kernel that has been modified to include TWRP 2.8.1.0 as its recovery (17.1.2.A.0.314-based, by Desperanto86). In combination with the TWRP image, encrypted partitions can be backed up:
Code:
fastboot flash boot boot.img
fastboot flash recovery openrecovery-twrp-2.8.1.0-sirius.img
If you enable encryption on top of this, the system no longer boots (I used custom ROM cm-11-20141206-NIGHTLY-sirius.zip). Flashing the CM boot.img allows the device to boot, but TWRP is no longer accessible.
It's probably possible to integrate TWRP into CyanogenMod's boot.img, but for now, I'm okay with just re-flashing the kernel at times when I need to back up my device (hopefully I don't burn through the flash memory with all the writes). So the process looks like this:
flash FTF firmware with Flashtool
enable developer options, then enable ADB in settings
install XZDualRecovery for root + recovery
copy custom ROM to /sdcard
boot into recovery, factory reset and install custom ROM
boot custom ROM, enable passcode, enable encryption
And when making backups:
power off phone
flash modded kernel + TWRP
take backup
flash original kernel boot.img from ROM (to restore boot ability)
Update for CM12/Lollipop: AOSP seems to enable hardware encryption for Qualcomm-based platforms, but this is not supported with TWRP (GitHub issue). Since hardware support is needed to decrypt storage, TWRP needs to load proprietary Qualcomm binaries to talk to the hardware (which are undocumented).
It seems like there will be no support for encrypted Lollipop backups, so I'll be sticking with 4.4.4.

Can't boot after 6.0 upgrade

Hi everybody.
I just flashed PureNexus 6.0 rom from 5.1.1 version, and after flashing and rebooting, the device gets stucked at the boot logo (an animation with 4 dots). This was the updating process (I'm rooted and with unlocked bootloader).
1) wiped all partitions (including system, data, etc...)
2) flashed bootloader from latest factory image via fastboot.
3) rebooted to bootloader
4) flashed vendor image via fastboot
5) flashed latest PureNexus 6.0 rom from recovery (latest twrp)
6) flashed dynamic-gapps from banks from recovery
7) rebooted
Did I do something wrong? Bootloader seems unlocked and I'm able to reboot to recovery but I don't know what else I can do.
ialana said:
Hi everybody.
I just flashed PureNexus 6.0 rom from 5.1.1 version, and after flashing and rebooting, the device gets stucked at the boot logo (an animation with 4 dots). This was the updating process (I'm rooted and with unlocked bootloader).
1) wiped all partitions (including system, data, etc...)
2) flashed bootloader from latest factory image via fastboot.
3) rebooted to bootloader
4) flashed vendor image via fastboot
5) flashed latest PureNexus 6.0 rom from recovery (latest twrp)
6) flashed dynamic-gapps from banks from recovery
7) rebooted
Did I do something wrong? Bootloader seems unlocked and I'm able to reboot to recovery but I don't know what else I can do.
Click to expand...
Click to collapse
Sounds like you did everything correct.
" Bootloader seems unlocked"
--- reboot into bootloader and it will tell you if you are unlocked.
Personally I would flash the volantis-mra58n factory image to get on the latest Marshmallow - boot up make sure all is running well.
Flash TWRP, make a nandroid, then flash the ROM.
No need to flash anything else, or at least that's what I did, here where my steps upon recieving the tablet last week.
unlocked bootloader.
flashed volantis-mra58n factory image, booted up played around for a bit (as Pure Nexus 6.0 wasn't out yet)
flashed TWRP, make a nandroid
flashed Pure Nexus 6.0 + banks gaaps
reboot, profit
sounds like something is going wrong, you should have the Marshmallow boot animation not the LP dots.
you don't need to flash the bootloader or vendor images doing my process as you are already on the latest ones from flashing the volantis-mra58n factory image.
Best of luck.
andybones said:
Sounds like you did everything correct.
" Bootloader seems unlocked"
--- reboot into bootloader and it will tell you if you are unlocked.
Personally I would flash the volantis-mra58n factory image to get on the latest Marshmallow - boot up make sure all is running well.
Flash TWRP, make a nandroid, then flash the ROM.
No need to flash anything else, or at least that's what I did, here where my steps upon recieving the tablet last week.
unlocked bootloader.
flashed volantis-mra58n factory image, booted up played around for a bit (as Pure Nexus 6.0 wasn't out yet)
flashed TWRP, make a nandroid
flashed Pure Nexus 6.0 + banks gaaps
reboot, profit
sounds like something is going wrong, you should have the Marshmallow boot animation not the LP dots.
you don't need to flash the bootloader or vendor images doing my process as you are already on the latest ones from flashing the volantis-mra58n factory image.
Best of luck.
Click to expand...
Click to collapse
Thanks for your answer. The bootloader is unlocked, or that's what it says when I boot on it. I'll try flash to the factory image and see what happens. Thanks!
Problem solved after flashing recovery, boot.img and system.img from factory image, thanks! I'll try flashing a custom rom now.
i've read that there needs to be gapps for 6.0, 5.1 gapps supposedly won't work on 6.0

No Recovery - can't flash TWRP or Stock Recovery

i'm in trouble. i'm running an old cm13 build on my oneplus x.
i wanted to clean install lineageos14, so i tried to flash the newest twrp recovery which didn't work (i have the old bootloader). so now i have no recovery on my device, cm13 is still booting fine.
when i try to flash twrp trough fastboot it tells me my device is not unlocked. when i try to oem unlock it reboots directly into cm13, not into recovery as i dont have one on my device. oem unlock is checked in developer settings.
i don't know how i can get a working recovery, i tried to flash old twrp (2.8.7) and the stock recovery trough fastboot, but no luck. how can i flash the stock oxygen rom without recovery?
maybe someone can help me. thanks in advance.
This guide will help https://forum.xda-developers.com/oneplus-x/general/guide-mega-unbrick-guide-hard-bricked-t3272108/
Latest stock oxygen will be flashed by recovery tool. But before it you should backup all needed data from internal memory.

Locked out of recovery after trying to update TWRP. Help?

I'm having major problems with TWRP, and I need help.
I have a Samsung Galaxy S4 with a properly unlocked bootloader (MDL), rooted, that has had a working version of TWRP 2.8.7.0 and running an older version of Cyanogen.
I'm overhauling the phone, so the first thing I tried to do was to update TWRP.
Since TWRP v2.8.7 supports flashing itself, I booted into recovery and flashed the TWRP update (v3.2.1.0) directly through TWRP. No errors that I saw.
But when I try to boot into recovery, I now get "System Software Not Authorized By AT&T Has Been Found On Your Phone". Fortunately, I can still boot normally - it's only recovery that I'm locked out of.
In trying to fix this, I tried re-flashing TWRP with three different methods:
1. I tried to flash TWRP again through the TWRP app. But I get "Flash Failed".
2. I tried Odin and got "FAIL! (Auth)"
3. I tried flashing v3.2.2.0 using the dd method. This I was able to do without any errors, but I'm still locked out of recovery mode with that same "System Software Not Authorized By AT&T Has Been Found On Your Phone" error.
Help?
Try connect to computer and execute:
adb reboot bootloader
fastboot flash recovery twrp-xxxx-xxx.img
Everything should be good to go.
Note: ALL TWRP settings will be reset.
HippoInWindow said:
Try connect to computer and execute:
adb reboot bootloader
fastboot flash recovery twrp-xxxx-xxx.img
Everything should be good to go.
Note: ALL TWRP settings will be reset.
Click to expand...
Click to collapse
ADB works fine for me, but fastboot does not. It says "waiting for any device". From what I understand, this is a common issue with Samsung phones. I'm using Windows 10, if that helps.
However, I came across a bug report for TWRP here, that reports the exact same problem from 3.0.0.0, and it's still open. That tells me that this may be a general issue with TWRP that they never bothered to fix.
So on a hunch, I tried re-flashing v2.8.7 using the dd method (since that's the only one I can get to work). And SUCCESS! I can now boot into recovery again!
So here's what I need to know:
1. Is there any way to get the latest version of TWRP to work on this phone?
2. Is it safe to flash a current version of LineageOS using this version of TWRP (v2.8.7)?
I'm really wary about that second question, because the last thing I want to do is brick my phone because an old version of TWRP doesn't know how to work with a new version of Lineage/Android. (This phone currently has KitKat on it)
You need Rashr to do this. You can find this app on the Google Play Store which can flash images in your system.
1. This version of TWRP should be able to flash modern LineageOS.
2. Using the above method provided should get you up and running the latest TWRP.
HippoInWindow said:
You need Rashr to do this. You can find this app on the Google Play Store which can flash images in your system.
1. This version of TWRP should be able to flash modern LineageOS.
2. Using the above method provided should get you up and running the latest TWRP.
Click to expand...
Click to collapse
I finally found an explanation and solution - it would appear that TWRP 3.x does not have the Loki exploit applied. So nothing 3.0+ will work unless it's been Lokied.
Fortunately, the current versions can be Loki patched, so once that's done, they'll install and work properly. Whew!

Categories

Resources