Nexus 5 installation stuck at erasing 'userdata'
I just found this thread. Maybe my problem is even better addressed here:
I followed the instructions on your website. Unlocked bootloader and root the device.
Using magic-device-tool I receive through following error message:
err: fork/exec /usr/bin/xz: cannot allocate memory
Can you please help me?
Before this error message I received:
Unable to write recovery img
@hans1977se I saw that blog too. I have a reasonable amount of skill with soldering, but I think I'd also like to have a bit of good luck on my side to pull that off. On the other hand, if the phone isn't working anyway, maybe its worth a shot...
@tH3f0rC3 I'm definitely not an expert at this, but I'll give my input.
I took a quick look at the man page for xz. It is a compression/decompression tool. The terminal output I posted earlier shows that one part of the installation is copying various *.xz files to the phone. It appears that it then runs xz on those compressed files to uncompress them. The "Unable to write recovery img" and "cannot allocate memory" error messages suggest to me that the phone's memory is full. Whether that means RAM or flash memory, I'm not sure. If it is a RAM problem, I'm not sure what to do. If it is a flash problem, perhaps the partitions were not properly reformatted during the installation process or maybe the phone has a nonstandard partition layout that doesn't have enough room for the uncompressed files?
Can the phone boot to its previous operating system and work properly?
@JoeBeach I have soldered these kind of chips, both successfully and unsuccessfully, and i think there are particularly two things that are difficult. The first thing is that surrounding components very easily goes off the pcb, and the other thing is to get good connections to the pcb on all pads. I think an IR-heater is probably the best for this job.
I don't know where you're located, but is some parts of the world it is very easy and cheap to have someone doing this. Otherwise, if you have to do it yourself, like you say on the other hand it is unusable scrap anyway.
Did you try the un-brick instruction i linked to as well?
@hans1977se I had not looked at the unbrick link, I missed that along the way. I don't normally work in windows, but I have a dual boot laptop at work for occasions like this. I'll give it a try and let you know what I find.
Yes, the currently installed Android system works still very well.
Do you have any suggestion how to clean memory and try again. By the way, its a 16GB Nexus 5.
Flohack last edited by
Dont know if it helps, but we got one user that could rectify this by installing TWRP, and following all possible clean/erase/format steps
@hans1977se I tried the unbrick software that you linked to on xda, but had no luck. The phone never showed up on a COM port even after installing the drivers that were mentioned. That prevents the use of the software. I'm taking that as a sign that the flash is damaged.
@Flohack I tried installing TWRP again and trying the various format and wipe options. No luck there. They all ended up giving error messages about not being able to mount various partitions. I'm taking this as another indication that the flash is damaged.
I am giving up on trying to fix things via software. I'll either be finding another Nexus 5 that I can confirm works before buying or perhaps trying to replace the flash. Probably the first option just because it sounds like it should be quicker.
@JoeBeach Thanks for the update! I think buying a phone that you can verify that it works is probably going to be the most predictable and easy solution.
Soldering that kind of chip could easily go wrong.
@JoeBeach I got a suggestion from a friend. You could try CWM recovery for Nexus 5. It's similar to TWRP, he said, but maybe some differences that you could benefit from.
I ended up buying another used Nexus 5 from Cellular Exchange for $169 and I have successfully installed UBports on it. It took three runs of Magic Device Tool: 1st to unlock the bootloader, 2nd to install the UBports Recover, 3rd to install UBPorts. So far, everything seems to be working fine. I have changed my T-mobile service over to it, so I'll be getting a crash course in UBports use.
Thank you for all of the suggestions troubleshooting the other phone. I may yet try to repair it.
Would it be worthwhile to start another thread outlining the successful installation? Or maybe add it to the wiki?
Thanks for the good news. Enjoy!