0

I am having a lot of trouble restoring my GSM Galaxy Nexus to it's former glory. I installed CM12 and CWM recovery earlier but CM12 suddenly stopped working. My phone started rebooting over and over so I decided it was to time to flash the stock ROM.

I flashed the stock ROM with WugFresh's root toolkit. And it worked fine besides the fact that writing the system.img took 30 mins, which is very unusual. I rebooted my device and CM12 showed up again... ?!. I tried flashing it by hand with ADB but no luck either. CM12 was still there.

I've been busy 3 days now and suddenly realized that CM12 created new root folders after a factory reset which I did multiple times. So for example, my sdcard contains one root with a folder, named 0, that contains the files on my phone before the factory reset. The problem is that this folders contains the system and CM12 ROM too. So I have like four 0 folders, and the 'deepest' one contains the system and ROM.

Assuming that if you flash a stock ROM, it will install in the root of my SD-card, but doesn't boot because it didn't overwrite the CM12 ROM in the deepest '0' directory [​IMG]. If only CM12 was working, I could manualy delete all the unnecessary 0 folders... I really have no idea how to continue from now on and I really need your help [​IMG]

Edit: I tried: adb shell rm -r /sdcard/0 and it is gone but if I reboot Recovery and look into my folders everything is there again...

epilogue:

  • Maybe the fact that system.img took 30 minutes to write has something to do with all those 0 folders [​IMG]
  • I tried flashing multiple recovery's to my device but they only show up if I open them via ADB. Otherwise CWMR shows up again because that one is actually installed in the 'correct' (read:incorrect) folder.
  • With Skipsoft roolkit I actually received an error while writing userdata.img. It said: remote: write fail. I thought this was due the multiple installation folders and the toolkit not knowing where to place/flash the ROM.

So I need to remove all the 0 folders and place the OS back in the sdcard's root, or I have to somehow tell android to place the stock ROM in the same directory as CM12, or I need to somehow wipe the complete sdcard so I can install a new recovery and flash the stock ROM... I have no idea how however.

Thanks in advance!

  • Welcome to Android Enthusiasts, Dennis! I've just applied some formatting to your post. Some clarification is needed: Did you intend to add some screenshots, or what are those [IMG] placeholders for? Also, you're aware that the ROM isn't installed on the SD card but to the corresponding internal partitions (/system etc.)? Apart from that, with folders re-appearing that way it sounds like an issue with a defective card/storage – which also would explain CM suddenly stopped working. Could you try adding a file and check whether it's still there after reboot? – Izzy Dec 7 '16 at 14:14
  • Hi, those [img] were emoticons but that didnt work here :p. I am aware that it is installed on the sd-card but my galaxy nexus internal storage is named sd-card for some reason. I think those folders are re-appearing because I am looking for them in the recovery and the recovery's path is sdcard/0/0/0/0/0/clockworkmod/backup. So Android has to load al the folders prior to the clockworkmod folder to boot recovery I think?... If you know what I mean... I will push a file to the internal memory and see I it's still there after I boot the recovery again. – Dennis Uil Dec 7 '16 at 14:44
  • I flashed a file named test.zip to the root of the internal memory and it was gone after I rebooted the recovery. The same applies for sending it to /sdcard/0/0/0/0/0/test.zip... This was was gone too... can this have to do with mounting storages? – Dennis Uil Dec 7 '16 at 15:00
  • That's what usually indicates "broken storage": Changes are reflected in the "in-memory cache", but never get applied to the storage itself – so after a boot, all changes are "reverted". So you never really got that stock firmware written, which is why CM booted again afterwards. Bad luck, but AFAIK that cannot be repaired (at least not software-wise; the flash chip would have to be replaced). – Izzy Dec 7 '16 at 15:04
0

From what you describe, the most likely cause is that your flash storage no longer applies any writes – be it additions or deletions. For understanding, a simply description of what happens:

  1. You send a file to the storage (copy/flash).
  2. to be most responsive, the OS uses "buffers" in RAM to cache your storage, so that's where the file goes first.
  3. You check if the file arrived, and the OS says it did (but in fact, it just saw it in the "buffer pending to be written")
  4. Now the OS tries to "flush" the buffers (write them to "disk"), but fails
  5. As long as the buffer "lives", you won't notice. But as soon as you write more than the buffer can hold, the oldest entries disappear. On boot, the entire buffer disappears.

So in the end, that was the reason why CM "suddenly stopped working": the storage got unusable. And this is also the reason why your device booted up into CM after you thought you've flashed another ROM: the flash was never performed.

I had this twice with SD cards, a replacement was in order then. Unfortunately, internal storage is soldered in into your device, so you cannot simply replace it: you'd have to send-in the device to have its board replaced. Unless the device is still in warranty (which I very much doubt if we speak about the 2011 "Galaxy Nexus", code-named "Maguro" here), it's probably not worth the postage costs, but you'll rather have to get yourself a replacement device – which might even be cheaper than the repair.

  • Thanks alot man, everything is clear now. Luckily I have been able to get all the data from the internal memory. I use a OnePlus 2 now so no worries for me. I just wanted to get my old phone working again. I have one question left: How have I been able to adb pull all the data if the internal memory got unusable? – Dennis Uil Dec 7 '16 at 16:13
  • Think of the storage as a box of letters which are now "glued": you still can read them, but you cannot rearrange them. As the first paragraph in my answer says: you can no longer write to it; so to speak, it became "read-only". – Izzy Dec 7 '16 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.