I have the 128GB model and I was transferring 32GB worth of music over to my 6P and before it completed I was getting warnings that files couldn't be copied. I stopped it and then looked at the phone on my PC and it was saying it's size was 24.1 GB. It shows the same thing when I look at the storage on the phone. What happened?
If you flashed the factory image, it probably set the partition for userdata to the wrong size. One fix is to go into recovery and perform a factory reset from recovery and it will fix the size. I am not sure if there are other methods that can fix it without doing the reset. Another person may be able to offer a better alternative.
tkoreaper said:
I have the 128GB model and I was transferring 32GB worth of music over to my 6P and before it completed I was getting warnings that files couldn't be copied. I stopped it and then looked at the phone on my PC and it was saying it's size was 24.1 GB. It shows the same thing when I look at the storage on the phone. What happened?
Click to expand...
Click to collapse
Did you flash the userdata.img from the factory images at some point? Doing so always allocates the smallest of the available storage sizes, so it really shouldn't be used. You can fix it by issuing this fastboot command:
Code:
fastboot format userdata
This will wipe your userdata partition so make sure you back up anything important first.
Heisenberg said:
Did you flash the userdata.img from the factory images at some point? Doing so always allocates the smallest of the available storage sizes, so it really shouldn't be used. You can fix it by issuing this fastboot command:
Code:
fastboot format userdata
This will wipe your userdata partition so make sure you back up anything important first.
Click to expand...
Click to collapse
That explains it, thank you. I ended up just starting over so it's all good now.
Heisenberg said:
Did you flash the userdata.img from the factory images at some point? Doing so always allocates the smallest of the available storage sizes, so it really shouldn't be used. You can fix it by issuing this fastboot command:
Code:
fastboot format userdata
This will wipe your userdata partition so make sure you back up anything important first.
Click to expand...
Click to collapse
Hehe that's exactly what I just did (flahsed my own cooked up userdata.img, which cut my size in half), thanks Heisenberg
Related
Sometimes I completely wipe my device before puting a rom on it, when I got my Gnex obviously because it had no removable sd card I couldnt remove it and format it.
I used this command yesterday to wipe my rooted N4 and it wont boot, I've flashed a stock image to get it up and running again and for testing purposes tried it again but with a different rooted rom, same outcome.
1) Does anyone know why this would be?
2) Is there a better way to completely wipe my device without causing this problem
Thanks in advance
on fastboot erase userdata
Hello.
I think I got into a similar problem as you did.
I wanted to write JOP40D using the google factory images on my Nexus 4, and in the process I also used a combination of fastboot -w as well as fastboot erase userdata. Now my phone won't boot up completely.
I wanted to ask you if/how you managed to recover to stock...
I personally tried using google's stock factory images for Nexus 4 (from developers.google.com), without success.
Thanks in advance.
Re: on fastboot erase userdata
FYI, Nexus 4 Toolkit did it for me.
1) The problem is the google factory image script does not reformat userdata && cache. These stay damaged from the initial fastboot erase operation done within the same script sequence. The Toolkit does 'reformat' them.
Not sure why this happens, may be from a bad erase that does not trigger reformatting, but it probably has to do with the version of fastboot you run on your PC versus the fastboot backend phone daemon. I posted online about this and hope to get some answers.
2) There must be a way to trigger this reformatting of userdata && cache...
boy3dfx said:
FYI, Nexus 4 Toolkit did it for me.
1) The problem is the google factory image script does not reformat userdata && cache. These stay damaged from the initial fastboot erase operation done within the same script sequence. The Toolkit does 'reformat' them.
Not sure why this happens, may be from a bad erase that does not trigger reformatting, but it probably has to do with the version of fastboot you run on your PC versus the fastboot backend phone daemon. I posted online about this and hope to get some answers.
2) There must be a way to trigger this reformatting of userdata && cache...
Click to expand...
Click to collapse
Sorry for the late reply only just seen it, so there's def a problem then and not something im doing wrong...
you might wanna update the sdk, when i used the same commands adb said someting like "you mean format" and processed the command without isssues
Stretlow said:
Sometimes I completely wipe my device before puting a rom on it, when I got my Gnex obviously because it had no removable sd card I couldnt remove it and format it.
I used this command yesterday to wipe my rooted N4 and it wont boot, I've flashed a stock image to get it up and running again and for testing purposes tried it again but with a different rooted rom, same outcome.
1) Does anyone know why this would be?
2) Is there a better way to completely wipe my device without causing this problem
Thanks in advance
Click to expand...
Click to collapse
1) Doing this on my Atrix 2 also causes a bootloop. I'm assuming it's because it is completely erasing the data partition instead of formatting it.
2) Try using fastboot format userdata (this works for me), or use the toolkit/a custom recovery to do your wiping.
Sent from my MB865 using xda premium
boy3dfx said:
FYI, Nexus 4 Toolkit did it for me.
1) The problem is the google factory image script does not reformat userdata && cache. These stay damaged from the initial fastboot erase operation done within the same script sequence. The Toolkit does 'reformat' them.
Not sure why this happens, may be from a bad erase that does not trigger reformatting, but it probably has to do with the version of fastboot you run on your PC versus the fastboot backend phone daemon. I posted online about this and hope to get some answers.
2) There must be a way to trigger this reformatting of userdata && cache...
Click to expand...
Click to collapse
Yes, there is a way to format partitions. The most recent version of fastboot supports this command.
Code:
fastboot format <partition>
So it works like this:
Code:
#format userdata
fastboot format userdata
#format cache
fastboot format cache
comminus said:
Yes, there is a way to format partitions. The most recent version of fastboot supports this command.
Code:
fastboot format <partition>
So it works like this:
Code:
#format userdata
fastboot format userdata
#format cache
fastboot format cache
Click to expand...
Click to collapse
Thanks! I was stuck at the endless boot logo after trying to restore with the factory image via fastboot. This got me back to normal booting.
Ok so I updated my SDk last night and typed (without quotes) "fastboot erase userdata" it gave me a message saying DID YOU MEAN FASTBOOT FORMAT USERDATA" then it completed the action however my phone still didnt boot.
Sorry for my ADB noobness but just to clarify...
I used to type exactly as this "fastboot erase userdata"
And now I have to type this
"fastboot format userdata" which should fix the issue, Erase all userdata (media, pictures etc) and boot the device
Thanks again chaps
boy3dfx said:
FYI, Nexus 4 Toolkit did it for me.
1) The problem is the google factory image script does not reformat userdata && cache. These stay damaged from the initial fastboot erase operation done within the same script sequence. The Toolkit does 'reformat' them.
Not sure why this happens, may be from a bad erase that does not trigger reformatting, but it probably has to do with the version of fastboot you run on your PC versus the fastboot backend phone daemon. I posted online about this and hope to get some answers.
2) There must be a way to trigger this reformatting of userdata && cache...
Click to expand...
Click to collapse
^^^ This, I have been going crazy trying to figure out the issue with the hanging boot. The format makes it boot everytime.
The problems are being caused when fastboot erase is used to delete the contents of the partition.
FASTBOOT ERASE IS NOT NEEDED ON THE NEXUS 4 (only the Nexus 7 uses fastboot erase to wipe the partitions before flashing).
If flashing manually just use the google script supplied with the stock image to flash correctly (from the jop40d build. If flashing jop40c then use the correct image names for that):
fastboot flash bootloader bootloader-mako-makoz10l.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.33.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update image-occam-jop40d.zip
Or use the Nexus 4 Toolkit to do it all automatically and properly
Mark.
[removed].
sdkmanager
android_sdk/tools/bin
I have a isue with my Nexus 7 which is really annoying and I need it fixed asap, the issue is that only 6GB out of 32GB is displaying after I flashed the userdata from one of my compiled roms.
I have tried flashing factory images, bootloader and more, but nothing works, anyone know how to fix this?
devstaff said:
I have a isue with my Nexus 7 which is really annoying and I need it fixed asap, the issue is that only 6GB out of 32GB is displaying after I flashed the userdata from one of my compiled roms.
I have tried flashing factory images, bootloader and more, but nothing works, anyone know how to fix this?
Click to expand...
Click to collapse
Did you try already to do a
fastboot erase userdata
???
VERY common issue. A search would have given you a solution thread. All you need to do is boot into recovery and format /data. This NOT the same as a factory reset. You could also do it with the above fastboot command, but it's easier to use recovery and I'm pretty sure it's more successful.
I have a defective device and in preparing to return it, I locked the bootloader and found a nasty little message at the top of the screen when booting:
Code:
This is a development device not intended for production use.
I was afraid that the N9 was like the N5 & 7 with the "tamper" flag, but after some digging (and advice from others out here), I decided to restore the factory image to see if that would overwrite the image. Yes! No more big fat red "I unlocked my bootloader and may have voided my warranty" message.
I can't take credit for this, but I thought I would consolidate everything I was finding in the Q&A threads into one spot, so I put this little tutorial together. Thank you @Pilz, @jd1639 & @PhilDX for your various posts.
Step 1 - Prepare your system
[Windows]
Since your bootloader is unlocked, you probably already have ADB and fastboot, but if not, grab the SDK from here, unzip and add the "platform-tools" directory to your PATH statement
If your drivers are set up properly and your device has Android debugging enabled, connect USB and execute `adb devices` from a command prompt you should see your device listed
Download the factory image for "volantis" here
The image is double zipped, so unzip, untar, then unzip the image-volantis-lrx21q.zip file into the same directory that contains the bootloader*.img file
Step 2 - Unlock bootloader
If you locked your bootloader, unlock again:
Code:
adb reboot bootloader
fastboot oem unlock
Step 3 - Flash stock image
The flash-all.bat script is broken, so you have to do it by hand:
Open a command prompt
cd into the directory where you unzipped the factory image files
Code:
fastboot flash bootloader bootloader-flounder-3.43.0.0114.img
fastboot reboot-bootloader
fastboot erase system
fastboot erase recovery
fastboot erase cache
fastboot erase boot
fastboot erase userdata
fastboot erase vendor
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot flash boot boot.img
fastboot flash vendor vendor.img
Before rebooting, relock the bootloader:
Code:
fastboot oem lock
Your N9 will reboot and do another factory reset (even though an oem lock is not supposed to).
Typo: fastboot oem unlock
hirndurst said:
Typo: fastboot oem unlock
Click to expand...
Click to collapse
Hahaha! Thanks.
always good to know! thanks!
Just a question, I'm still a beginner at adb fastboot flashing.
But doesn't the oem unlocking and subsequent oem lock, erase everything anyway, so are the erase commands still required?
AjunNg said:
Just a question, I'm still a beginner at adb fastboot flashing.
But doesn't the oem unlocking and subsequent oem lock, erase everything anyway, so are the erase commands still required?
Click to expand...
Click to collapse
The erase commands are required. I believe that a factory reset only clears userdata (and probably cache). You need to run the others to clear those partitions to make room for the factory images. Each of those commands run pretty quick anyway.
DarthSudo said:
The erase commands are required. I believe that a factory reset only clears userdata (and probably cache). You need to run the others to clear those partitions to make room for the factory images. Each of those commands run pretty quick anyway.
Click to expand...
Click to collapse
You could also use fastboot -w instead of the erases
Sent from my Nexus 9 using XDA Free mobile app
Thanks for this thread. Great guide.
jd1639 said:
You could also use fastboot -w instead of the erases
Click to expand...
Click to collapse
According to the fastboot "help", -w only formats userdata and cache, does it actually format the other partitions as well? This wouldn't be the first time the documentation is wrong...
Code:
-w erase userdata and cache (and format
if supported by partition type)
Thanks for this. I RMA'd my Nexus 9 and sending it back tomorrow
DarthSudo said:
According to the fastboot "help", -w only formats userdata and cache, does it actually format the other partitions as well? This wouldn't be the first time the documentation is wrong...
Code:
-w erase userdata and cache (and format
if supported by partition type)
Click to expand...
Click to collapse
It only formats userdata and cache. But you don't need to erase the other partitions
Sent from my Nexus 5 using XDA Free mobile app
AjunNg said:
Just a question, I'm still a beginner at adb fastboot flashing.
But doesn't the oem unlocking and subsequent oem lock, erase everything anyway, so are the erase commands still required?
Click to expand...
Click to collapse
jd1639 said:
You could also use fastboot -w instead of the erases
Sent from my Nexus 9 using XDA Free mobile app
Click to expand...
Click to collapse
jd1639 said:
It only formats userdata and cache. But you don't need to erase the other partitions
Sent from my Nexus 5 using XDA Free mobile app
Click to expand...
Click to collapse
You guys are all right. I looked back at some of my notes and I've flashed plenty of devices w/o formatting the other partitions first. Just userdata and cache. Thanks!
Hey guys, just wanted to thank you for the fixed "script". This is now my flash-stock.sh script I use whenever I need to flash a nexus device as the one delivered by google just doesn't work (reboot loop due to crashing apps on startup or "missing system.img").
Works perfect and I always like to not dirty but rather make a clean flash as it just reduces the number of possible faults .
Cheers
Creamy
Just got my N9. First thing I did was to apply all updates, then unlock bootloader, boot into TWRP and make a system image. Then I flashed TWRP and rooted. Now if I want to take an OTA update, all I have to do restore the system image and flash the stock recovery, right? Am I missing anything? Thx.
Sent from my Nexus 6 using Tapatalk
bruce7373 said:
Just got my N9. First thing I did was to apply all updates, then unlock bootloader, boot into TWRP and make a system image. Then I flashed TWRP and rooted. Now if I want to take an OTA update, all I have to do restore the system image and flash the stock recovery, right? Am I missing anything? Thx.
Sent from my Nexus 6 using Tapatalk
Click to expand...
Click to collapse
The OTA will run a check and will fail if the image isn't basically stock. For you, just do a full unroot in the SuperSU app (under Settings), then you need to replace TWRP with the stock recovery from fastboot:
Code:
fastboot flash recovery recovery.img
Reboot then take the OTA.
Of course, you will need to install TWRP and re-root again after the OTA...
DarthSudo said:
The OTA will run a check and will fail if the image isn't basically stock. For you, just do a full unroot in the SuperSU app (under Settings), then you need to replace TWRP with the stock recovery from fastboot:
Code:
fastboot flash recovery recovery.img
Reboot then take the OTA.
Of course, you will need to install TWRP and re-root again after the OTA...
Click to expand...
Click to collapse
Thx, that seems simple enough. But I made the initial system (stock) backup before I rooted. That's why I was thinking restoring that would work. I just wasn't sure about the recovery, whether the restore would put the stock recovery back or not.
Sent from my Nexus 6 using Tapatalk
DarthSudo said:
I have a defective device and in preparing to return it, I locked to bootloader and found a nasty little message at the top of the screen when booting:
Code:
This is a development device not intended for production use.
Your N9 will reboot and do another factory reset (even though an oem lock is not supposed to).
Click to expand...
Click to collapse
Hi,
is there a way to get rid of that red message if your bootloader is locked and you cannot boot into OS?
Thanks!
EDIT* Nevermind
Hey. Sorry for reviving this thread.
I installed Remix OS on my N9 and (after discovering that performance is horrible, with ~80% RAM usage on idle) after a reboot, Remix OS won't get past it's boot splash. I am attempting to flash my device back to stock.
I never touched the bootloader (never did any 'fastboot flash bootloader ...' or anything), so it it still necessary to flash the bootloader image, or can I just flash the system.img, boot.img, vendor.img etc.?
The bootloader had never changed so there is no reason to flash it.
Sent from my Nexus 9 using XDA Free mobile app
Hi all,
My n10 is bootlooping and I tried to flash a factory image from ADB but it fails with the error that there is no space left. Is it possible to erase the SD card through ADB? Thanks!
mlclm- said:
Hi all,
My n10 is bootlooping and I tried to flash a factory image from ADB but it fails with the error that there is no space left. Is it possible to erase the SD card through ADB? Thanks!
Click to expand...
Click to collapse
Yes
fastboot erase data
But when flashing new software its best to
fastboot erase system -w
Side note, I have seen this issue fixed often just by updating fastboot and adb binaries on pc
OK, not help exactly but more info than help. People talk about doing fastboot -w instead if fastboot format userdata. My question is, what's the difference and is it safe?
jamescable said:
OK, not help exactly but more info than help. People talk about doing fastboot -w instead if fastboot format userdata. My question is, what's the difference and is it safe?
Click to expand...
Click to collapse
@hiesenberg, any help with this before I possibly brick my phone lol
jamescable said:
OK, not help exactly but more info than help. People talk about doing fastboot -w instead if fastboot format userdata. My question is, what's the difference and is it safe?
Click to expand...
Click to collapse
The -w flag will erase userdata and cache
http://elinux.org/Android_Fastboot#Erase_an_individual_partition
spunks3 said:
The -w flag will erase userdata and cache
http://elinux.org/Android_Fastboot#Erase_an_individual_partition
Click to expand...
Click to collapse
So, its safe to use that command then...won't **** anything up?
jamescable said:
So, its safe to use that command then...won't **** anything up?
Click to expand...
Click to collapse
So what is your end goal? If you are okay with losing all data (pictures, downloads, etc.) then that command should be okay.
The only time I've had to format is when flashing userdata.img on my 128GB 6P which caused it to only recognize 32GB. I then formatted and it was back to 128.
Well I am a junior ROM dev(personal builds) and have a lot of junk on my internal memory that I wasn't to get ride if. Some say that fastboot format user data technically only hides the data until overwritten and using fastboot erase destroys the data partiton and I have heard mention of fastboot -w but google doesn't show anything when searched
jamescable said:
Well I am a junior ROM dev(personal builds) and have a lot of junk on my internal memory that I wasn't to get ride if. Some say that fastboot format user data technically only hides the data until overwritten and using fastboot erase destroys the data partiton and I have heard mention of fastboot -w but google doesn't show anything when searched
Click to expand...
Click to collapse
In this case the -w flag is the same as erase but does this to both userdata and cache instead of just one by using 'fastboot erase'.
As long as your cool losing data, that command is good to go
spunks3 said:
In this case the -w flag is the same as erase but does this to both userdata and cache instead of just one by using 'fastboot erase'.
As long as your cool losing data, that command is good to go
Click to expand...
Click to collapse
Ah OK, so it basically destroys the partition and recreates it
jamescable said:
Ah OK, so it basically destroys the partition and recreates it
Click to expand...
Click to collapse
The partition should stay, this will instead delete everything on the partition.
spunks3 said:
The partition should stay, this will instead delete everything on the partition.
Click to expand...
Click to collapse
I guess my fear is accidently deleting all partitions lol
jamescable said:
I guess my fear is accidently deleting all partitions lol
Click to expand...
Click to collapse
I would stuck to individual commands then
'fastboot erase userdata'