Only getting 6GB Free space after flashing 5.0 - Nexus 7 Q&A, Help & Troubleshooting

As the title goes, after I flashed the factory image for my nexus 7 (straight from google), I ended up with only 6GB of free space. I did not root this one yet, so I was wondering if there was any way to put back the lost partition.

There are other people in the forum who had the same issue. I think the solution was a factory reset, but I'm not sure.

luckyrumo said:
There are other people in the forum who had the same issue. I think the solution was a factory reset, but I'm not sure.
Click to expand...
Click to collapse
thanks for the quick reply, I'm going to try that while I wait for other possible solutions.
Edit: Factory reset worked! I know I read from another thread that reseting won't restore the space, but I guess it is worth a try especially if one was flashing a stock clean install of 5.0.

The problem occurs when you do a
...
fastboot erase userdata
...
fastboot flash userdata userdata.img
...
The erase is fine, but the second command is not. It's a better idea to use "fastboot format userdata" to create a empty filesystem in /data - the bootloader knows how big the device is, and will create an extN filesystem of the correct size. But when you do a "fastboot flash userdata userdata.img", the size created will always be 6 MB, even though the partition could be substantially larger. (That's because the smallest device in the N7 series was a 8 GB device)
What is a little ironic is that the "userdata.img" file actually contains few to zero files, despite it being rather large-ish. (I guess the size comes from the extN filesystem metadata - inode tables et cetera). When you think about it, that must be the case: how could a fresh boot of a "factory reset" device recreate identical fresh-from-factory behavior if it depended on certain files being present in /data?
If you are content with wiping all data from the tablet including the pseudo-SD Card (actually, now that I think of it, you really have no choice) correcting the problem is as simple as
fastboot erase userdata
fastboot format userdata
I suppose that the STOCK recovery does something quite similar to the above during a "factory reset", but with no guarantee of precisely the same results. (Because the recovery is running a full linux kernel and application code such as "mke2fs", whereas the "format userdata" operation is actually being performed by static (real mode) code found in the bootloader).
fastboot on the PC side is an extremely primitive and simplistic utility - all it does is shove blobs of data and simple commands to the companion process on the other side of the USB cable - the Android device. And that "companion process" is just the bootloader, operating in "fastboot mode". All the heavy lifting such as unpacking of .zip files, crypto verification, filesystem operations, etc are being performed by the bootloader on the device.
The subtle consequence of the above (fastboot on the PC is kinda "dumb") is that you can get different behaviors on different Android devices using the same (sequence of) fastboot commands - because the bootloaders are all proprietary, and the interpretation of what happens in response to a specific fastboot command is left up to the (proprietary) bootloader developer(s).

Related

[Q] [HELP] Can't boot into Android!

Hello guys, I am facing a major problem:
I have encrypted my N7 in the past, and now I replaced the faulty 3.34 bootloader with the 4.18 version. All went well, but for some reason my encryption password change so I can not go into recovery anymore. ( I have made sure that I did not mistype my old password )
Right now the only thing I have is Fastboot and a encrypted recovery. My question is: How to remove the encryption fully? I have tried:
- Re-locking and unlocking the bootloader (as it wypes all data) NO RESULT
Is there ANY way to remove the encryption from the fastboot menu?
Please and thank you
For anyone who is interested and facing the same problem: Flashing the stock rom via Fastboot worked.
Thread can be closed
SiemHermans said:
Is there ANY way to remove the encryption from the fastboot menu?
Click to expand...
Click to collapse
I would like to see a picture of a fastboot screen displaying any messages about encryption.
Are you sure you don't mean custom recovery or OS boot prompting about encryption passwords?
The OS concludes that the userdata partition is encrypted if it fails to mount it in the early boot - for any reason at all. This *could* be due to the fact that it actually was encrypted (as it apparently was in your case), but it could also be due to other failures such as a corrupted filesystem, hardware problems, etc.
BUT, if the tablet is otherwise working correctly, a "factory reset" (performed by a STOCK recovery, not a custom recovery) is supposed to be able to wipe & format userdata so that the "encryption" disappears. In this (successful) case the tablet would boot as if new; after all, the factory reset does not wipe whatever ROM was in the system partition.
The fact that you went through a lock/unlock step suggests that your bootloader (which version did the lock/unlock step?) should have already taken the correct action(s).
You can try this:
Code:
fastboot erase userdata
fastboot format userdata
to see if it makes any change in the behavior of the (custom?) recovery. (FYI the above procedure also fully wipes the SD card area, but I suppose you already know that)
I won't guarantee it will do anything, but it is worth a shot.
Also remember that if you have fastboot set up correctly you should be able to boot other recoveries without hard-flashing them to the tablet, e.g.
Code:
fastboot boot custom-recovery-image-file.img
You can use this if you suspect there is something wrong with your recovery, want to use a different version, etc.

[Q] Removing encrypted L

Hi, I've had CM11 for a while, and wanted to try preview L ROM.
The preview L ROM worked fine for the most part, but couldn't handle multiple Google accounts, and some apps I needed weren't ready I guess.
So I decided to flash back 4.4.4 (HCR-PRO R5.0 AOKP). The problem is I forgot that I've tried L's encryption. I wiped /system, /cache, and did factory reset.
Since the internal memory wasn't available, I've used adb sideload to flash radio 2.0.1701.03 and HCR-PRO ROM.
Now when I boot, I still get L's splash screen (with some weird flickering green vertical line) and it asks for password to decrypt data, which I have no idea about, because I used pattern, and which probably wouldn't work anyway because it's not for 4.4.4. Also, the recovery can't mount or wipe /data partition.
Now, I don't really need the encrypted data, I'm ok with losing it, but how to I just reset the whole thing, so I can load the new ROM?
Thanks,
Boris.
EDIT: welp, it looks like "fastboot erase userdata" helped, waiting for the splash screen for a long time now.
EDIT2: nope, just sits there on splash... and recovery still can't see /data
EDIT3: "fastboot -w erase userdata" was the right solution, RESOLVED

[ZE550KL] Unbrick Experience, QCN recovered, working from 9006/9008

First of all, thanks for all the people here provide very useful message.
Acutally I encouter a lot of similar issues across the posts.
Please refer to the posts here:
Unbrick guide Z00l Ze550kl
Need QCN file for ZE550KL/Z00L (2GB Ram) Please.
[Solved]Stuck on logo when booting into custom ROM( Zenfone 2 laser ZE550KL Z00LD)
My model is ZE550KL 2GB/16GB version.
What need to be prepared (please look around from google)
1. CSCImage for recovery
2. QPST 2.7
3. Workable QCN, if you have no backup please make one from the other post. (you will need imei coverter and HxD)
4. Retail image WW_ZE550KL_1.17.40.1234-rel-user-20160304185904-secured-releaseAFT_QC
5. Offical latest image
6. TWRP
7. Minitool Partition Manager (I tried diskpart but not working, so please use this one)
8. Qualcomm Driver
Here are the procedures for reference (I do this for over 10 times and 3 nights)
Please make sure you have working QCN...otherwise you cannot recover the calling feature.
1. Erase aboot
fastboot_8916 erase aboot
use above command to erase the partition
you can unplug the battery and cable and replug them.
or simply use fastboot reboot command.
Result: Device enter into 9006 mode
2. Open Minitool Partition manager
Right click and Delete all partition.
Create one single partition using ext4 format
Once done, remove the battery and cable, replug them.
Result: Device enter into 9008 mode
3. If you installed QPST, you should have a program called QFIL
Please use it and extract the firmware from CSCImage, it should have all the items except emmc MBN, just copy it from the root folder.
If you do this correct (follow other post for more detail)
Replug the device will give you a fastboot screen
Result: Device with workable fastboot
4. Now you have a clean bootloader, but no other thing
Go to CSCImage and click flashall
Once it is done, all the partitions will be ok (sometimes I got /factory not mount, let's fix this later)
Result: you will have a engineering OS and bootloader unlocked, diag mode natively enabled.
5. Open Software Downloader from QPST, and recover the QCN, it will reboot the phone.
If you are not doing this correctly (and many issues here), you will get bootloop.
And you have to start over again.
My suggestion is do not touch any of the bootloader setting. (so do not try to use unofficial bootloader unlock guide)
Even you give a command like "fastboot oem adb_enable" it will cause a bootloop and have to start over.
So my suggestion is not touch any bootloader setting
Result: The phone calling and data should be recovered. You can test by making some call.
6. If you want to keep your bootloader unlocked, the retail image flashall you can search there is a "oem lock"
change to unlock and run it in fastboot mode.
Result: You will have a bootloader unlocked phone, with WW firmware.
You can start from here to do TWRP.
to fix /factory partition. you can install busybox and in adb shell, use mkfs.vfat for the partition.
What is CSCImage, I tried your method but got stuck on missing partitions. (Boot, Recovery, System, etc..)
christian.arvin said:
What is CSCImage, I tried your method but got stuck on missing partitions. (Boot, Recovery, System, etc..)
Click to expand...
Click to collapse
This means you didn't unlock your bootloader.
bootloader needs to be unlocked to flash the partition file, and then the partition will be recovered without data.
My bootloader was unlock.
I digged deeper in your method. And this is what i understand and let it be an information for those who will try.
Back up all partition before you delete all partitions. (Your serial and other sensitive data are stored in some of this partition)
Your method only restore 5 partition table that is inside the main0 gpt mbn.
Note: the whole partition table is listed in the both0 gpt mbn.
In my stupidity I renamed the both0 gpt to main0 gpt thinking that it would work. Instead I run into an unstoppable bootloader bootloop.
In an ending note my ZF2 Laser's only hope is a full eMMC reflash that requires external methods. Or let the official professionals handle it.

Wipe stock Moto G5 Plus fully with adb or fastboot?

Hi there, my friend has a Moto G5 Plus they want to wipe entirely before discarding (or selling.) The power button on the phone doesn't work, but I was able to boot the phone up, so we could probably use the factory reset option from the settings menu.
The thing that concerns me is that sometimes certain wipe methods don't get every single file. Can someone point me to a method that will wipe absolutely everything and be unrecoverable?
In my experience typically adb or fastboot commands are the most thorough, whether it be flashing a full wipe factory image or something like that. The phone is recognized by fastboot and I assume I'll be able to get adb to see it also (Windows) so I should be able to run whatever commands are needed.
Can someone point me to the proper commands / method? I'm used to the Pixel 2 at this point, and it's been a long time since I used a Moto.
Well if you get into fastboot somehow then you can use fastboot erase userdata and fastboot erase cache. Get minimal adb it will be enough. Or from the backup and reset settings itself. I guess both of them do the same thing which is erasing the user data. Both of them will wipe the data partition completely so you can try either one of them.

[SOLVED] Bricked ALE-L21 | Damaged fastboot partition

So, I've had an issue with fastboot mode for some time, it reacted to everything with a "remote: command not allowed". I tried an sdcard upgrade to stock which did nothing, ran the oem unlock again and that said unlocked succesfully (it was aleady unlocked but ok) then tried to relock, tried to flash every stock image from B896 I knew the partition of - everything returned "remote: command not allowed", also did a fastboot reboot - which worked, if I remember correctly, enabled usb debugging and saved my computers key just to be sure - still no difference.
Later on, I tried reinstalling the fastboot image from the phone itself using dd - that was pretty stupid, I know - especially since there were two files named fastboot and fastboot1 but only one fastboot partition (I don't even, just had to try) and after a reboot it shows no logo, doesn't vibrate, only thing it does is blink the led red-green-green for a minute and power off again. I have a raw backup of the original partition but no way to restore it.
Does anyone know how to repair a diskdestroyer'd fastboot partition? I'm willing to try any risky methods, including disassembly and reflashing of the memory chip. Does someone have a model number for the built in flash storage?
Any help is much appreciated.

Categories

Resources