Trying to install cyanogenmod to nexus 4, I cannot flash it through TWRP recovery - Nexus 4 Q&A, Help & Troubleshooting

I am trying to flash my N4 with cyanogenmod following the official wiki.
I'm at the point where I've installed TWRP into recovery, I've wiped everything (I've even formatted them since I couldn't wipe all of it initially), and the only error I see is "unable to mount /usb-otg".
Then, I've "installed" the CN zip files for the 13 and 12 versions, none of them works in the sense that when I reboot the system, I'm always coming back to TWRP.
What's wrong? Any suggestion?
Thanks

I've the same problems with my nexus 4
gerardgerard said:
I am trying to flash my N4 with cyanogenmod following the official wiki.
I'm at the point where I've installed TWRP into recovery, I've wiped everything (I've even formatted them since I couldn't wipe all of it initially), and the only error I see is "unable to mount /usb-otg".
Then, I've "installed" the CN zip files for the 13 and 12 versions, none of them works in the sense that when I reboot the system, I'm always coming back to TWRP.
What's wrong? Any suggestion?
Thanks
Click to expand...
Click to collapse
Hi gerardgerard,
I also wanted to flash my Nexus 4 with Cyanogenmod 12.1. So I installed TWRP into recovery and wiped everything, like it's explained in the wiki. I can also see the error "unable to mount /usb-otg". When I want to reboot the system I always get back to TWRP. Cyanogenmod doesn't boot correctly. Did you find a solution for the problem?

same problem
Hi
I'm having the same problem. As follows:
Cause (my mistake): I have been using Cyanogen-mod nightlies for a couple of months on my Nexus 4, and made the grave mistake of leaving the phone to upgrade one night but without it being plugged in properly - and it ran out of power part way through! (At least, that's what I think happened).
Fortunately, it would boot into bootloader and I could use adb/fastboot. I (re)installed TWRP 2.8.7.0 (from my Mac, using fastboot). And that works fine - I can boot into twrp ok.
Next I loaded the latest nightly from cm (using fastboot - is this what people call sideloading?) and used twrp to install it. It goes through the installation fine (the only error message is that it can't mount /usb-otg). But when I reboot it just goes back to twrp.
I then tried installing the earlier cm nightly that I know worked, but with the same result.
Finally, before I first installed cm I did a backup (using twrp), and I have tried recovering that. It seems to do all the right things, but again when I reboot it just goes back to twrp.
Any suggestions would be welcome.
Thanks
J

Flash back to a completely stock ROM and run through the set up to make sure everything works. Then copy CM to the phone, reboot to fastboot, flash twrp, immediately boot into recovery using the volume and power button without leaving fastboot, wipe data, cache, system, flash CM, reboot.
If the phone will not boot after flashing a stock ROM, boot to fastboot, flash the userdata.img file, and immediately go to stock recovery without leaving fastboot, wipe data/cache, reboot.

It works now!
I managed to fix the problem ... I found this guide for the Nexus 5:
http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
and I applied those instructions. It didn't work first time, so I just repeated them and now it's working. I used the 5.1.1 stock downloaded from https://developers.google.com/android/nexus/images#occam.
I guess this is what audit13 means in their post - so thanks are due there.
I will next reinstall twrp and cm and I don't expect any problems with that (having done it successfully before).
Smaje

Related

[Q] TWRP nor CWM will successfully wipe/format data

First, I searched and read all relevant threads concerning this issue. The five threads that showed up in the search did not help me solve my issue.
So on to my problem. I can no longer flash any rom onto my device. I attempted to flash the first official CM10 nightly (which I recently found out was not flashing properly for others) and had no success. I simply got a black screen and nothing more. I eventually got back into TWRP (v2.2.1.4) to try and Nandroid restore, but I noticed that /data was not formatting and the restore failed. Every time I would slide the bar across to confirm the restore TWRP would reboot itself. I then flashed CWM (v6.0.1.0) and the same problems were there. After that I flashed an earlier version of TWRP and successfully restored the backup. I'm not 100% sure how it was successful. So I decided to try flashing another ROM and no go. Same problems. Anyone have any ideas? When I was using CWM I got the error message below.
Code:
E: unable to locate volume information
E: unable to open ums lunfile '/sys/devices/platform/usb_mass_storage/lun0/file'
E: unable to format data
I'm running Bugless Beast with Motley #219
I'm having similar, if not identical problems. After flashing TWRP 2.2.1.4, I tried flashing a rom and gapps; the tablet would boot endlessly into recovery. Nothing I did would do anything, so I flashed the stock image to start over. This time, I used CWM 6.0.1.0 touch to make sure that it wasn't the recovery that was causing the problem. However, now after flashing the rom and gapps, instead of booting into recovery, I got stuck at a black screen and had to hold the power button in order to get back to the bootloader.
Now, like you, it seems I can't flash any roms anymore. It's frustrating to say the least.
Sent from my Galaxy Nexus using xda app-developers app
aznxk3vi17 said:
I'm having similar, if not identical problems. After flashing TWRP 2.2.1.4, I tried flashing a rom and gapps; the tablet would boot endlessly into recovery. Nothing I did would do anything, so I flashed the stock image to start over. This time, I used CWM 6.0.1.0 touch to make sure that it wasn't the recovery that was causing the problem. However, now after flashing the rom and gapps, instead of booting into recovery, I got stuck at a black screen and had to hold the power button in order to get back to the bootloader.
Now, like you, it seems I can't flash any roms anymore. It's frustrating to say the least.
Sent from my Galaxy Nexus using xda app-developers app
Click to expand...
Click to collapse
What rom did you attempt to flash?
elementur said:
What rom did you attempt to flash?
Click to expand...
Click to collapse
So do I.I attempted to flash the first official CM10 8.18 nightly and had no success. I just got a black screen.Even more I boot into bootloader and choose to boot into recover but just stay at google logo.I try to flash recover once more,but just can't boot into recover!!
I have the same problem, i flashed the cm10 nightly which I learned would not boot. No I have no backup to boot to, and cannot even push a new rom to the storage to try to install.
Shano56 said:
I have the same problem, i flashed the cm10 nightly which I learned would not boot. No I have no backup to boot to, and cannot even push a new rom to the storage to try to install.
Click to expand...
Click to collapse
Can't boot into recover,does anyone know what is wrong?When it is in android I can use APM boot into recover or via ADB,but unusually when it is in the bootloader I choose to boot into recover,it just stay at google logo!!What it is going wrong?
phiracle said:
Can't boot into recover,does anyone know what is wrong?When it is in android I can use APM boot into recover or via ADB,but unusually when it is in the bootloader I choose to boot into recover,it just stay at google logo!!What it is going wrong?
Click to expand...
Click to collapse
There is a bug with the Nexus 7 where you cannot access the recovery through the bootloader. To fix this, boot up into the bootloader on your nexus 7 and, without doing anything, plug it into the computer you used for rooting it and then select the option Restart bootloader and press the power button. Once it gets you back into the bootloader again select Recovery mode and press the power button. It will now get you into the recovery and once you're in recovery you can unplug your tablet from the computer. Note that this fix is not permanent and you will have to do this every time you wish to access your recovery via the bootloader (and this problem is not relevant to the OP's problem).
android1234567 said:
There is a bug with the Nexus 7 where you cannot access the recovery through the bootloader. To fix this, boot up into the bootloader on your nexus 7 and, without doing anything, plug it into the computer you used for rooting it and then select the option Restart bootloader and press the power button. Once it gets you back into the bootloader again select Recovery mode and press the power button. It will now get you into the recovery and once you're in recovery you can unplug your tablet from the computer. Note that this fix is not permanent and you will have to do this every time you wish to access your recovery via the bootloader (and this problem is not relevant to the OP's problem).
Click to expand...
Click to collapse
Thank You Very Much!!!
I am having much the same problem as the OP. I finally rooted my Nexus 7 using WugFresh's Nexus Root Toolkit. It seemed all went well. I chose to use TWRP in a first attempt to install a ROM (I was on rooted stock), and following the instructions for installing my chosen ROM I went into it to wipe cache, Dalvic Cache and data. Both cache and dalvic cache wiped without issue, but when I attempted to wipe /data TWRP simply reported that it failed. With that failing, I did not attempt to install a rom. I was still able to boot out of recovery, but even with repeated attempts wiping data always failed. Is any one aware of any solution or have any suggestions. Thank you!

Mako always booting into recovery

Hi all,
I was running the official Google 5.1.1 version until this morning. I now did an oem unlock using fastboot and installed the latest twrp recovery 3.0.0, and finally copied overy CM-13 nightly (and Chroma-2016-02 for testing purposes) using adb.
Flashing itself work flawless, there is no warning or error message, but when hitting "Reboot" within twrp the Google logo shows up for a few seconds and it directly boots into twrp again. This is with both, CM-13 and the latest Chroma.
So I basically cannot get my Nexus-4 bootet regulary any more.
Any ideas what the problem might be?
Any help is welcome,
regards, mistersixt.
Mmmh, strange, I did a factory installation (latest 5.1.1 from Google) and started the same thing from scratch ... and guess what... the system is booting fine now.
No idea why it did not work on my first attempt .
Regards, mistersixt.
mistersixt said:
Hi all,
I was running the official Google 5.1.1 version until this morning. I now did an oem unlock using fastboot and installed the latest twrp recovery 3.0.0, and finally copied overy CM-13 nightly (and Chroma-2016-02 for testing purposes) using adb.
Flashing itself work flawless, there is no warning or error message, but when hitting "Reboot" within twrp the Google logo shows up for a few seconds and it directly boots into twrp again. This is with both, CM-13 and the latest Chroma.
So I basically cannot get my Nexus-4 bootet regulary any more.
Any ideas what the problem might be?
Any help is welcome,
regards, mistersixt.
Click to expand...
Click to collapse
Same here. Running stock until today, wanted to see a different ROM, flashed TWRP 3.0.0, it refused to boot anything else. Tried to flash DU, then tried Chroma. Did a full wipe, then an advanced wipe selecting everything, then a full format, same thing. Installed TWRP 2.8.7, same thing. Finally installed latest stock, it is now booting, optimizing apps. I don't know if installing a custom rom will work or not yet.
Edit: Yeap, after flashing stock 5.1.1 and installing TWRP 3 again, the phone is now booting into DU.
First time I did a wipe with TWRP, it complained that it couldn't mount /data. Since this is the first time doing it, I assumed it was normal. After going through a full format, it didn't complain about data anymore, but it did complain about something to do with /dev/zero and another file under /dev/. I assume it was trying to dd /dev/zero to a file under /dev/ that didn't exist.
+1
Done the whole process from scratch again and worked like a charm
Hello, same story here.
First I:
- unlocked bootloader
- flashed TWRP (last version)
- flashed Chroma and Gapps
- reboot
=> I consistently rebooted on TWRP. No way to properly install the ROM. No error message at all.
Then I found this thread, and did as described:
- flashed the latest stock ROM
- flashed TWRP again (took me ages to manage to do this: TWRP would not install. I don't know how I finally did it, but at some point it suddenly worked. Probably a driver problem)
- flashed Chroma and Gapps again
Bingo, this time it worked! I don't know why it didn't work the first time. Could it be linked to the bootloader unlock thing?

Stuck in bootloop in all LOS and OOS based roms

Hi guys, been using my rooted but otherwise stock OOS rom with TWRP and Magisk for the past few weeks. Today I decided to take the plunge and try either the Lineage OS or Resurrection Remix roms.
I'm using the latest OFFICIAL TWRP.
So I decrypted following the instructions to flash "no-verity-opt-encrypt-5.1.zip", then format data. All went well, so I then sent over the ROMS I wanted to try out. I started with the official ResurrectionRemix. Bootloop. Then the unofficial LineageOS. Bootloop.
Ok, well I guess I'm not gonna get to use any of the cool new OS's for awhile. I'll install the full stock firmware zip so I can have a working phone again. Bootloop.
Now when I say bootloop, the phone is booting to the BootAnimation and just repeating it. It shows the proper boot animation for whatever zip I have installed (resurrection/LOS/OOS), but it stays on there for up to 20 minutes before I have to hard reboot to the recovery again.
I decided to install the stock recovery trying a few methods. I first tried the ALL-IN-ONE tool. It said it flashed the recovery fine, so I booted to the recovery and after staying on a black screen for too long, the language options came up and I sighed a breath of relief. But before I could select English with the volume buttons, it rebooted by itself. It did this again when I manually entered recovery. So I figured maybe the tool flashed the wrong version, so I googled stock recovery for OnePlus 5, I found a few random links for stock recoveries for the OP5 and flashed them, but they more or less do the same thing or not boot at all.
I've tried changing the filesystem for both Data and System using any combinations of EXT4 and F2FS. Everything results in boot animation bootloops.
I have been flashing Roms since the Samsung Galaxy S3 and every phone since and never had any problems.
Currently when trying to install the stock Full OOS official zip with TWRP, the phone won't even go to the boot animation, it only goes to a black screen with the top LED in a light blue color.
I have also tried every version of TWRP there is for the OnePlus 5. Unofficial, Official, 3.1.1-0 and 3.1.1-1.
So I guess my question is....What filesystem is each partition supposed to be on and for which OS?
Lineage based:
System: ?
Data: ?
OOS Based:
System: ?
Data: ?
And any ideas on getting my phone running again?
And anyone have an official confirmed working version of the stock recovery? The one from ALL-IN-ONE TOOL doesn't work for me. It loads the language selection, then the screen goes black with a light blue LED on the top of the phone.
Actually I'm getting that on some roms instead of the bootanimation, like FreedomOOS. What does it mean when you have a black screen and a white LED?
Man, I really thought I was getting somewhere. If I boot into TWRP, change the Data partition to "F2FS", then flash the stock recovery, the stock recovery will boot, however, when inside the stock recovery and I try to flash the stock zip, it says "Flashing, don't turn off your device" for about 5 seconds and then goes back to the list of roms on the SD card, not having flashed anything at all.
Ok, I have the official stock recovery from the OnePlus site, but still can't use it. Here is was happens depending on how I left it with TWRP:
System: F2FS
DATA: F2FS
- Stock recovery will load after some time, freeze, then the screen goes black with white LED on top.
System: EXT4
DATA: F2FS
- Stock recovery loads fine, I can go through the settings and install from SD card, but when I do it says "Flashing, don't turn off your device" for about 5 seconds and then goes back to the list of roms on the SD card, not having flashed anything at all.
System: EXT4
DATA: F2FS
- If I try to flash stock rom through TWRP, it just boot loops on the animation forever.
I have now also tried flashing the stock boot.img, but no difference.
I have 2 things you can try!
First, replace the bootloader with stock and do a factory reset:
1. flash the stock recovery over
2. then in fastboot mode enter, fastboot oem lock (This forces the phone to wipe cache and data, and also do a complete reset)
Did it work? if yes YAY if not go to Second!
Second if your system.img is ****ed up you have to replace it!
Download the newest version of the stock rom from oneplus link here
Unpack it
research how to use an extractor to convert the system.new.dat to system.img
once thats completed enter fastboot mode and flash the new system.img over with Fastboot flash system system.img
now go into recovery and do a factory reset and wipe cache, and dalvik
Please reply back wether or not this work
"Ihave 2 things you can try! First, replace the bootloader with stock and do a factory reset..."
Is the bootloader simply the boot.img?
After doing the first thing, it simply says that the device is corrupt and will not boot. But it is locked again.
But I will have to unlock it again to do any further flashing.
Hmm, I think I may have gotten it. After unlocking again, flashing the stock recovery and boot.img, then locking again and wiping in the stock recovery, I have finally booted into the stock rom.
I still have no idea what went wrong, and I really want to know, so that in the future I can flash other Roms, like LineageOS.
I mean, I followed the steps exactly.
If it says the device is corrupt it simply means you got something else besides stock rom.
So now unlock it and try the system.img instead
It was because I still had TWRP with the stock rom.
I got it working though, thanks for your help.
Do you have any idea on what might have went wrong when trying to flash the lineageOS based roms and why it got messed up so royally?
Great to hear you fixed it ^_^
Probably some minor bug, if you wanna try installing lineageos again use the 3.1.1 TWRP build that supports backups and do a full backup so you don't have to go thru all this again
---------- Post added at 12:17 AM ---------- Previous post was at 12:13 AM ----------
Not really just try again but remember to use TWRP 3.1.1, as 3.1.0 don't support backup and probably have been part of your problem
If your trying again and gets it successfully installed could you do me a favor and test if Drivedroid works on it? And pm me the result, I'm looking for a rom where Drivedroid will work... Haven't found one so far
You know, I did do a backup with the OFFICIAL TWRP, but it also resulted in a bootloop. I made the backup after decrypting, so I don't know why it bootlopped.
https://forum.xda-developers.com/oneplus-5/development/rom-unified-lineageos-7-1-2-t3635483
Is this the one you tried installing?
I tried like every ROM at one point yesterday, but I think I started with
https://forum.xda-developers.com/oneplus-5/development/rom-resurrection-remix-n-7-1-2-t3636578
Did you remember Gapps?
Also in some cases its better not to root before you have the custom rom running, you usually only need a custom bootloader like TWRP
Yeah, I tried with Gapps, and I never rooted before first trying to boot.
As of yesterday Ressurrection remix, released the first official stable build so try again your should'nt have any problems if you follow the guide 100%
Ever find a solution? I'm stuck here now. Can't get any ROM to boot up, they all get stuck on the boot animation
Bump. I am also stuck in this state

I'm stumped on this (Rebooting into TWRP)

I've had this happen before on other phones, usually fixed by just installing a different rom or restoring a backup. Not here.
I finally unlocked my bootloader on the XT1607 (the Motorola site just randomly worked one day), installed TWRP & the 7.1.1 Soak Test (from here). I forgot to backup 6.0.1, so I backed up the soak test which was booting and working flawlessly. I was using it for a while, but I did a factory reset inside TWRP and it randomly said "cannot mount storage" and when I rebooted, it was into TWRP. It wasn't working at all, so I got LineageOS 15.1 and flashed that. Same error, "cannot mount storage" and back to TWRP. I went into Wipe>Format Data and then reinstalled Lineage. The "cannot mount storage" error was gone, but still booting into TWRP. I tried AOSP Extended, CyanogenMod, Paranoid Android. roms with gapps, roms without, with & without supersu or magisk. Nothing worked. So then I thought that restoring my backup (of all partitions) would fix the issue. It didn't, still booting back into TWRP. I'd also like to mention that plugging the phone in still worked, I can view the files in file manager, sd card works, etc.
So, no clue what to do here. What's wrong? It all started with that simple factory reset from twrp.
edit: I found that if I boot into bootloader and press start it will go into android, but hardly a permanent solution.
Same thing happened to me but my issue resolved after restoring back to stock rom with stock recovery and after that u can again flash twrp it will work fine
sumit1327 said:
Same thing happened to me but my issue resolved after restoring back to stock rom with stock recovery and after that u can again flash twrp it will work fine
Click to expand...
Click to collapse
Heyyy, thanks man. Worked like a charm.

flashing firmware zip fails every time

I am currently using a OnePlus 5 which used to run on a stock based rom, xxxNoLimits v3.1
Since the dev ended the support I wanted to revert back to pure OOS, so I downlaoded the newest 5.1.5 zip and followed the instructions using the newest blu_spark twrp recovery but right after pressing the "flash" button I kept getting error 7, so I download the zip from a mirror link and I have also tried the newest version of codeworkx twrp, still error 7. Then I tried flashing the original stock recovery in order to flash the zip but it instantly threw me back to the zip selection menu, flashing the zip via adb sideload kept quitting at exactly 47%. At this point I was pretty frustrated, I flashed twrp codeworkx again and wiped EVERYTHING, which includes the system, data, cache, dalvik partitions and then I also did a format on the data partition, the point was that now I would have a clean phone only running twrp and I thought I could easily flash the newest zip now without any problems, NOPE, still error 7!!! Now I am stuck here, the stock recovery doesnt let me flash anything and I've tried 4 different versions of twrp recoverys and every single one gives me the same error, I even dug up an older version of OOS, I think it which I had running for a few weeks without any probles so I knew that the zip was not corrupted but same error
Now I had given up and wanted to restore the backup I did just in case anything goes wrong, well, restoring the backup fails when it tries to restore the data partition, so I unchecked everything except system, system image and recovery but it didnt work, now I am sitting here with my phone telling me that there's no OS installed. any advice?
Use Unbrick Tool and Restore
Hey,
You can Flash your Mobile using the Unbrick tool at - https://androidfilehost.com/?w=files&flid=204903
Use the Latest file which I guess comes with OOS 5.1.3 - https://androidfilehost.com/?fid=962339331458999196
If you try to Go to Open Beta ROM First Flash Open Beta 12--> Open Beta 13 --> Open Beta 17
freaky2xd said:
I am currently using a OnePlus 5 which used to run on a stock based rom, xxxNoLimits v3.1
Since the dev ended the support I wanted to revert back to pure OOS, so I downlaoded the newest 5.1.5 zip and followed the instructions using the newest blu_spark twrp recovery but right after pressing the "flash" button I kept getting error 7, so I download the zip from a mirror link and I have also tried the newest version of codeworkx twrp, still error 7. Then I tried flashing the original stock recovery in order to flash the zip but it instantly threw me back to the zip selection menu, flashing the zip via adb sideload kept quitting at exactly 47%. At this point I was pretty frustrated, I flashed twrp codeworkx again and wiped EVERYTHING, which includes the system, data, cache, dalvik partitions and then I also did a format on the data partition, the point was that now I would have a clean phone only running twrp and I thought I could easily flash the newest zip now without any problems, NOPE, still error 7!!! Now I am stuck here, the stock recovery doesnt let me flash anything and I've tried 4 different versions of twrp recoverys and every single one gives me the same error, I even dug up an older version of OOS, I think it which I had running for a few weeks without any probles so I knew that the zip was not corrupted but same error
Now I had given up and wanted to restore the backup I did just in case anything goes wrong, well, restoring the backup fails when it tries to restore the data partition, so I unchecked everything except system, system image and recovery but it didnt work, now I am sitting here with my phone telling me that there's no OS installed. any advice?
Click to expand...
Click to collapse
Flashing newest oos doesn't always work l have had this sometime l have had to go back 3 oos versions then flash them in order to flash the latest release.
freaky2xd said:
I am currently using a OnePlus 5 which used to run on a stock based rom, xxxNoLimits v3.1
Since the dev ended the support I wanted to revert back to pure OOS, so I downlaoded the newest 5.1.5 zip and followed the instructions using the newest blu_spark twrp recovery but right after pressing the "flash" button I kept getting error 7, so I download the zip from a mirror link and I have also tried the newest version of codeworkx twrp, still error 7. Then I tried flashing the original stock recovery in order to flash the zip but it instantly threw me back to the zip selection menu, flashing the zip via adb sideload kept quitting at exactly 47%. At this point I was pretty frustrated, I flashed twrp codeworkx again and wiped EVERYTHING, which includes the system, data, cache, dalvik partitions and then I also did a format on the data partition, the point was that now I would have a clean phone only running twrp and I thought I could easily flash the newest zip now without any problems, NOPE, still error 7!!! Now I am stuck here, the stock recovery doesnt let me flash anything and I've tried 4 different versions of twrp recoverys and every single one gives me the same error, I even dug up an older version of OOS, I think it which I had running for a few weeks without any probles so I knew that the zip was not corrupted but same error
Now I had given up and wanted to restore the backup I did just in case anything goes wrong, well, restoring the backup fails when it tries to restore the data partition, so I unchecked everything except system, system image and recovery but it didnt work, now I am sitting here with my phone telling me that there's no OS installed. any advice?
Click to expand...
Click to collapse
Hi ! Do you have some news about it ? I have the same issue since Monday...
I've tried like anything i've found and even more, but nothing did the job ...
The only way to have my OP5 working is downgrade to an old version running Android 7.1.1

Categories

Resources