Using the linux parted command that is available when one boots into TWRP recovery, one sees the list of partitions starting with:
Code:
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
What are the functions of the dkernel and dfs partitions? Are their contents installed by Amazon and left unmodified by custom ROMs? Do they serve any useful function? Do they serve to give Amazon information that the user doesn't control, or allow Amazon to do anything to the device even after it has been modified by the user?
aarons510 said:
What are the functions of the dkernel and dfs partitions? Are their contents installed by Amazon and left unmodified by custom ROMs? Do they serve any useful function?
Click to expand...
Click to collapse
Diagnostics. It's pretty much a full stand-alone ROM. It's left unmodified by custom ROMs.
aarons510 said:
Do they serve to give Amazon information that the user doesn't control, or allow Amazon to do anything to the device even after it has been modified by the user?
Click to expand...
Click to collapse
No. It's probably best if you just leave them alone, unless you plan to get into editing, compiling and installing your own ROMs and -really- want the extra storage space.
Even though the space they occupy is not great (about 3% of the total on the device), what useful function do they serve? Is it possible for a user to, well, use them for anything? Are they used by other parts of the overall system?
The space could be used by just mounting it (probably just the larger one, partition 4) on a directory on the sdcard or userdata. Or one could perhaps move the cache (now on partition 11) to partition 4 (or 3 and 4 combined) and use the space freed to expand partition 10 or 12?
I realize that it's probably more work than it's worth to figure it out just for one's own KF, but if one could write simple instructions, or even a script, to do it for the masses, it might be worthwhile.
dkernel and dfs are debugging kernel and system filesystem, some how Amazon can boot that to do debug work on the kindle... No clue how to get the stock bootloader to start it, it's not useful to us anyway.
Unless it's used by the stock recovery to restore to the stock kernel and stock system, I saved a copy of mine, but I doubt it'll ever do back on.
I have my kindle partitioned like this right now:
Model: MMC MMC08G (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Code:
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 525kB 512B
4 525kB 525kB 512B
5 525kB 16.9MB 16.4MB recovery
6 16.9MB 16.9MB 512B
7 16.9MB 25.1MB 8191kB boot
8 25.1MB 25.1MB 512B
9 25.1MB 537MB 512MB ext4 system
10 537MB 1561MB 1024MB ext4 userdata
11 1561MB 1817MB 256MB ext4 cache
12 1817MB 2841MB 1024MB fat32 media msftres
13 2841MB 7818MB 4977MB ext4 linux
I have the unused partitions set to the smallest amount to maintain the original layout (so I can still use CM9 flashes with out having to mess around), I also changed the others a little (system went from 530 or something to 512MB, etc)...
Made media 1GB, the rest is my linux system, but rest of you could just put it on media or make userdata bigger.
seishuku said:
dkernel and dfs are debugging kernel and system filesystem, some how Amazon can boot that to do debug work on the kindle... No clue how to get the stock bootloader to start it, it's not useful to us anyway.
Click to expand...
Click to collapse
I did a bit of playing around with it myself before I saw your post. I mounted partition 4 (readonly, for safety) on /sdcard/dfs and got a good look at its contents.* It does look like a fairly complete UNIX/linux system. I can't imagine why Amazon would put it on Kindles that are sold to the public, rather on just the ones they use for development. Unless, as you speculate, it's used by the stock recovery to restore to the stock kernel and stock system. Otherwise, it seems like a big waste, considering the large number of these Kindles sold.
As for your re-partitioning of your Kindle, did you install anything other than linux after you re-partitioned, like a ROM, recovery, or bootloader? Or did you just move things around and resize them after they were installed?
BTW, what's the trick for being able to choose between booting into android and booting into (regular) linux? Could the same trick be used to allow choosing between two android ROMs at boot time? (I'm presuming you didn't write your own bootloader.)
* Added in edit: I posted a listing of the contents at
http://forum.xda-developers.com/showthread.php?t=1688601.
seishuku said:
dkernel and dfs are debugging kernel and system filesystem, some how Amazon can boot that to do debug work on the kindle... No clue how to get the stock bootloader to start it, it's not useful to us anyway.
Unless it's used by the stock recovery to restore to the stock kernel and stock system, I saved a copy of mine, but I doubt it'll ever do back on.
I have the unused partitions set to the smallest amount to maintain the original layout (so I can still use CM9 flashes with out having to mess around), I also changed the others a little (system went from 530 or something to 512MB, etc)...
Made media 1GB, the rest is my linux system, but rest of you could just put it on media or make userdata bigger.
Click to expand...
Click to collapse
Thanks for sharing your partition set up. It's very clever.
seishuku said:
dkernel and dfs are debugging kernel and system filesystem, some how Amazon can boot that to do debug work on the kindle... No clue how to get the stock bootloader to start it, it's not useful to us anyway.
Unless it's used by the stock recovery to restore to the stock kernel and stock system, I saved a copy of mine, but I doubt it'll ever do back on.
I have my kindle partitioned like this right now:
Model: MMC MMC08G (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Code:
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 525kB 512B
4 525kB 525kB 512B
5 525kB 16.9MB 16.4MB recovery
6 16.9MB 16.9MB 512B
7 16.9MB 25.1MB 8191kB boot
8 25.1MB 25.1MB 512B
9 25.1MB 537MB 512MB ext4 system
10 537MB 1561MB 1024MB ext4 userdata
11 1561MB 1817MB 256MB ext4 cache
12 1817MB 2841MB 1024MB fat32 media msftres
13 2841MB 7818MB 4977MB ext4 linux
I have the unused partitions set to the smallest amount to maintain the original layout (so I can still use CM9 flashes with out having to mess around), I also changed the others a little (system went from 530 or something to 512MB, etc)...
Made media 1GB, the rest is my linux system, but rest of you could just put it on media or make userdata bigger.
Click to expand...
Click to collapse
Seishuku: could you share the trick how you move the recovery partition to the new location please? As I understand parted run under adb shell while KF is in recovery mode. Therefore, if we remove recovery partition does it allow parted to do so (since TWRP is running from recovery partition)?
Thanks.
Once recovery is booted, it's in RAM, so nothing on the MMC is being actually used... Now, if you removed/moved it and rebooted, then yeah, it wouldn't work.
So no real "trick" is needed, just make the changes, reboot and reflash recovery via fastboot.
Also, until recently I was just booting the linux kernel by fastboot, but now I've made changes to FFF 1.4 to give an added boot option to load linux... Which also needs an added partition (I just resized cache to make the space).
Edit:
Oh, after working with the boot loader for a little bit, I see how dkernel is booted... It would seem that if the normal booting means fail (both boot and recovery) a number of times, it will automatically boot the alternative system (dkernel/dfs).
To what end? No clue, I didn't save my dkernel (probably no different than stock kindle 2.6.xx kernel), I have no interest in it. lol
Thanks! very helpful information.
seishuku said:
Edit:
Oh, after working with the boot loader for a little bit, I see how dkernel is booted... It would seem that if the normal booting means fail (both boot and recovery) a number of times, it will automatically boot the alternative system (dkernel/dfs).
To what end? No clue, I didn't save my dkernel (probably no different than stock kindle 2.6.xx kernel), I have no interest in it. lol
Click to expand...
Click to collapse
It would be interesting, to me, anyway, to be able to boot into it directly. It contains adbd, presumably an adb server daemon, and bash, so one could, presumably, run a shell, at least, using adb.
Related
I took some time today to play with the partition layout on my Kindle Fire and I decided I wanted to share my method in case anyone else found it interesting. The reason I did this is because I know that I'm not going to be putting much of anything onto the KF's /sdcard directory. Instead of having 1 GB for data/apps (and books?) and 5 GB for media, I wanted to more-or-less reverse those numbers. What I settled on was 4.5 GB for data/apps and about 1.7 GB of "external" storage. In other words, I can install 4 times as many apps as I could have on a stock layout, but can only store about 1/3 as much music/pictures/etc.
BIG HONKING DISCLAIMER: I have ONLY tested this on my own personal Kindle Fire. There is some very real potential that you could render your system unbootable if you're not careful, so if you want to try this or something similar, please BE CAREFUL, and please don't try to hold me responsible if something gets messed up. You've been fairly warned! You also stand the chance of losing your data partition by doing this. If you have anything you don't want to lose, please make a backup of some sort. That being said, as long as you're careful when doing this it should be fairly safe and you shouldn't lose your data, either.
1. Preparation
1.1 Installing a custom bootloader (FIREFIREFIRE)
Strictly speaking, this is somewhat "optional", but it makes things a whole lot easier. I strongly suggest that you head on over to pokey9000's thread and install his custom bootloader. Not only will this get you into recovery much more easily, but it will give you access to fastboot on every boot up (which will be very helpful if something goes wrong). I won't repeat the installation instructions here, just head over there and follow the instructions!
1.2 Installing a custom recovery (ClockworkMod)
The second thing you'll need is ClockworkMod recovery. Again, the heavy lifting is mostly done, and you can jump over to JackpotCalvin's installation and info thread to get it. Don't worry about the fact that you can't navigate the recovery menu - we won't be using that. The only purpose of the recovery is that it gives us an environment to safely work in with the /data and /cache partitions unmounted (i.e. not being used).
1.3 Root your Kindle Fire
You could do most of this (maybe all of the partitioning, in fact) without rooting, but at best you would lose everything on your /data partition. I'm not even positive if you could do the partitioning without root since...well, I was already rooted when I tried this. In any case, head over to this thread, get SuperOneClick, and root your KF. You'll be voiding your warranty by doing the rest of this anyway
1.4 ADB connection
Make sure you have ADB set up on your computer. You can follow the rooting guide to get this working. You can't do anything else in this post without working ADB.
1.5 (Optional) The parted and e2fsprogs binaries
This is somewhat optional since CWM has the utilities you need already, but it's not a bad idea to have a backup copy of the parted utility and the various e2fsprogs binaries (e2fsck, tune2fs, etc). You can grab this zip file and set it aside somewhere in case you need it. Here is the documentation for parted (applies to both the CWM binaries and the standalone ones).
2. Repartitioning your device
2.1 Backup your data
I cannot stress this enough: backup anything you don't want to lose. And don't just back it up to the external storage, either - move it to your computer or dropbox or something. I also highly recommend following the instructions in the FIREFIREFIRE thread to pull images of your various partitions in their current layout, in case you need to restore through fastboot (or you need them later down the line). Backing up your external data is as simple as copying it to your computer. To backup your /data partition, you can do the following:
Code:
C:\> adb shell
$ su
# cd /data
# tar -cvpzf /sdcard/data.tar.gz .
Note the "." at the end of the last line (in *nix this means "the current directory"). This will create an archive on your external storage named data.tar.gz. You should copy this to your computer for now, to make sure nothing happens to it. This could take a few minutes depending on how much stuff you already have on your /data partition, of course (mine was ~500 MB compressed).
Once you've backed up everything you want, reboot your Kindle by turning off and back on again. You should land at the FIREFIREFIRE bootloader (a yellow triangle with a flame in it). When you see the bootloader come up, press the power button (I had to hold it for a few seconds) to boot into ClockworkMod.
3. Repartitioning
3.1 External storage (/sdcard)
Time for the fun part
Use adb to shell into your device, and then run 'mount' with no parameters to see what's already mounted. You should see /cache has been mounted, and since we'll be moving it later we'll go ahead and unmount it now:
Code:
C:\> adb shell
~ # umount /cache
At this point, your /cache, /data and /sdcard partitions should all be unmounted. Now you need to start up the parted partition manager, which should be included with CWM (it's in /sbin). Fire it up and check your current partition layout by doing the following. Note that
Code:
(parted)
is the prompt that parted gives you after you start it up.
Code:
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
5 212MB 229MB 16.8MB recovery
6 229MB 296MB 67.1MB ext4 backup
7 296MB 307MB 10.5MB boot
8 307MB 312MB 5243kB ext4 splash
9 312MB 849MB 537MB ext4 system
10 849MB 2041MB 1192MB ext4 userdata
11 2041MB 2309MB 268MB ext4 cache
12 2309MB 7690MB 5381MB fat32 media msftres
(parted)
I highly recommend that you store this in a text file somewhere. I saved a copy to my Dropbox to make sure I don't lose it. The reason I say this is because I don't know how a custom partition layout will affect things like OTA updates. If you ever want to go back to the default layout, you'll need these numbers handy.
Now you can go ahead and resize your external partition, which is block 12 ("media"). Make sure you don't try to make it smaller than its contents, or else it will probably error out. For example, if you have 2 GB of music on your /sdcard storage, you won't want to shrink it to 1 GB. What you want to do to shrink the partition is increase the start value. If you were looking at this graphically, it would be equivalent to moving the start of the partition to the right. So, for example, I moved the start of my external partition from the default 2309 to 5809 (5809 - 2309 = 3500, so I made it 3.5 GB smaller). You can choose whatever size you want, and then set it like this:
Code:
(parted) resize 12 5809 7690
This says "resize partition 12 so that it starts at 5809 and ends at 7690 (same as the current end point, which is the end of the disk). As long as you don't see any errors, this should not affect your sdcard's data. I did not lose any of my data by doing this. If you want, you can reboot now to test and make sure everything is in good shape, but it's not required.
3.2 The /cache partition
Since data is partition 10, cache is 11, and media is 12, we now have a gap between the end of cache and the beginning of media. In order to expand the data partition to fill that gap, we need to move the cache partition so that it is next to media again. Unfortunately, parted doesn't support moving an ext4 partition, so we have to make some magic happen first. Basically, we're going to erase the current cache partition, create a new one that is ext2 in the proper spot, and then "upgrade" it to an ext4 partition.
To erase the cache partition (which will erase /cache's data - no big deal), do the following in parted:
Code:
(parted) rm 11
(parted) mkpartfs primary ext2 <begin> <end>
(parted) name 11 cache
To figure out the "begin" value, take the beginning value you used for your external partition and subtract 268. This will be the beginning of the cache partition (assuming you want it to stay the same size as before - this is what I recommend). For the "end" value, use the same number that you entered for the beginning of your media partition. Using my example, 5809 - 268 = 5541, so I used 5541 for the beginning and 5809 for the end. If you enter the "print" command again, you should now see that your cache partition has effectively been moved so that it's right next to your media partition again. Now we need to exit parted to "upgrade" the partition to ext4 by enabling some filesystem features and letting e2fsck run a check on the filesystem. It may say that it's fixing some group descriptor checksums - don't worry, this is normal.
Code:
(parted) quit
~ # tune2fs -j /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11
~ # e2fsck -fDp /dev/block/mmcblk0p11
If e2fsck complains that it needs to be run manually, you should omit the -p flag. This happened to me the second time I ran through this process, but the first time it did not. I'm not entirely sure why. In that case, the e2fsck commands simply become:
Code:
~ # e2fsck -fD /dev/block/mmcblk0p11
Which will cause it to ask if you want to fix the group descriptors. Just answer 'Y' and let it run through.
3.3. The userdata partition (/data)
The last thing we need to do is expand the userdata partition to use up the space we freed up by shrinking media. Once again, since we can't resize an ext4 partition directly, we're going to have to delete it, re-create it as an ext2 partition, and then "upgrade" it.
STOP. DO NOT PASS GO. DO NOT COLLECT $200
This will wipe your /data partition. Double check to make sure you have a copy of your backed up data, because it's going to be gone after this.
Code:
~ # parted /dev/block/mmcblk0
(parted) rm 10
(parted) mkpartfs primary ext2 849 <end>
(parted) name 10 userdata
Here the value of <end> should simply be the same as the beginning of your cache partition (in my case this was 5541). This creates the new partition between system and cache, and it takes up all of the available space. Next we need to enable the ext4 features, so we'll do the same thing we did with cache:
Code:
(parted) quit
~ # tune2fs -j /dev/block/mmcblk0p10
~ # e2fsck -fDp /dev/block/mmcblk0p10
~ # tune2fs extents,uninit_bg,dir_index /dev/block/mmcblk0p10
~ # e2fsck -fDp /dev/block/mmcblk0p10
At this point you can fire up parted again and use print to see your shiny new partition layout:
Code:
# parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 11.0MB 10.5MB dkernel
4 11.0MB 212MB 201MB ext4 dfs
5 212MB 229MB 16.8MB recovery
6 229MB 296MB 67.1MB ext4 backup
7 296MB 307MB 10.5MB boot
8 307MB 312MB 5243kB ext4 splash
9 312MB 849MB 537MB ext4 system
10 849MB 5541MB 4692MB ext4 userdata
11 5541MB 5809MB 268MB ext4 cache
12 5809MB 7690MB 1881MB fat32 media msftres
As you can see, the userdata partition is now 4692 MB You'll also notice that Titanium Backup will report the new size, so you can keep track of how much space you've used up.
4. Restoring your data from the archive
Don't reboot your Kindle Fire yet! Remember the data we backed up earlier into the data.tar.gz archive? Now we need to restore it to your nice new data partition. First mount your /data partition so you can get at it from the recovery shell:
Code:
~ # mount /dev/block/mmcblk0p10 /data
Now push your backup to your phone. From a command shell on our computer, just use adb push to move it over:
Code:
C:\> adb push /path/to/data.tar.gz /data
Now you can go back to your adb shell and extract everything you backed up earlier. Once it finishes extracting you can go ahead and remove the backup from your /data partition and reboot:
Code:
~ # cd /data
/data # tar -xvpzf data.tar.gz
/data # rm data.tar.gz
/data # reboot
And that's it! Now you should have a larger /data partition, and you can go on an app installation spree.
5. Credits/Thanks/Etc
Just want to give a quick thanks to JackpotCalvin and pokey9000 for CWM and the custom bootloader, since I obviously needed those to make this happen. Also thanks to all the other devs working on the KF for all the great work so far!
If something doesn't work, feel free to drop a reply here. I'll see what I can do to help, but bear in mind that this is intended to be for power users or extreme tweakers. I'd definitely be interested in hearing some success stories if anybody else decides to give this a try.
I also want to add a shoutout/plug for the Android Enthusiasts website, hosted by StackExchange. It's a Q&A site dedicated to power users of Android devices. Stop by if you have a question, I'm always hanging around!
Very impressive tuto! I haven't tried it because I haven't run out of space yet but sounds great and I'm glad to know that it is here when I need it. Thanks!
Sent from my Kindle Fire using Tapatalk
SikYou said:
Very impressive tuto! I haven't tried it because I haven't run out of space yet but sounds great and I'm glad to know that it is here when I need it. Thanks!
Sent from my Kindle Fire using Tapatalk
Click to expand...
Click to collapse
Thanks! I got motivated to play around with it today when I realized I'd already eaten through 500 MB of my internal storage. All those "wifi only" game downloads really add up...
Also, here's a screenshot of Ti after I repartitioned. Note that my internal storage is at 3.73GB out of 4.61GB at the bottom
Sweet! Made me double check my space and yeah.... Those games do eat up a lot of space
I don't know if I'll ever change the partitions layout, but this guide is absolutely impressive.
WOW!!! Great!
I was thinking of what would it take to go the other way, actually. I mean,
1) I don't care about any future OTA updates from Amazon, so I definitely don't need a 500+ Mb /system partition.
2)/512 Mb will be more than enough for me on /data - anything I can't fit in that, I'll be able to just move to the /media partition.
3) Since I won't be flashing any OTA updates, I don't need this huge /cache partition either - I have 2Mb on my phone, but I think there's a script in the ROM that actively avoids using the cache partition for anything really.
4) What is /dfs and why do we need 200 Mb there...
This all adds up to nearly 2GB more space I can definitely use in the /media partition....
Do you guys think this could work? I.e - apply the same approach to /system - back up/shrink/restore?
renegade027 said:
WOW!!! Great!
I was thinking of what would it take to go the other way, actually. I mean,
1) I don't care about any future OTA updates from Amazon, so I definitely don't need a 500+ Mb /system partition.
2)/512 Mb will be more than enough for me on /data - anything I can't fit in that, I'll be able to just move to the /media partition.
3) Since I won't be flashing any OTA updates, I don't need this huge /cache partition either - I have 2Mb on my phone, but I think there's a script in the ROM that actively avoids using the cache partition for anything really.
4) What is /dfs and why do we need 200 Mb there...
This all adds up to nearly 2GB more space I can definitely use in the /media partition....
Do you guys think this could work? I.e - apply the same approach to /system - back up/shrink/restore?
Click to expand...
Click to collapse
I would think you could do this as long as you make sure you get a good backup of /system and it restores properly, but I've never tried. You'd just need to be a little careful since you would have to erase and repartition it since parted doesn't understand ext4, although as long as you can get into recovery and fastboot you could partition back to normal and flash a stock system image if something went wrong (at least you should be able to). I'm probably not going to try that since I'm fine with this layout and I've only got my personal KF, but it doesn't sound unreasonable.
I'm not sure what /dfs, /dkernel or /backup are, either. I thought I saw a thread somewhere that had some talk about them, but I don't remember where it was. /dkernel is actually the same size as the /boot partition - which made me suspicious - but I can't unpack the image with my usual unpack/repack scripts so I'm not sure what it really is and I don't want to mess with it
Assuming you do everything right, how long would you expect this process to take?
WOW, that's a lot of work for just a little bit more space! Good write up though, thanks!
rmagruder said:
Assuming you do everything right, how long would you expect this process to take?
Click to expand...
Click to collapse
I'd wager you could probably knock this out in about 20-30 minutes, depending on how much stuff is on your /data partition.
The longest part, by far, was archiving and unarchiving /data. All of the partitioning commands together would only take, like, 10 minutes or so (they execute very fast). Archiving the /data partition alone took about 4 or 5 minutes for me and my archive was ~500 MB. Unzipping the archive later was another 3-5 minutes.
Altogether it probably took me about 45 minutes of actual time since I was playing with numbers and writing stuff down periodically.
I know it looks like it would take a lot longer, but I just have a tendency to write very, uh, "thorough" documentation. It's mostly out of habit (I'm a software developer).
Right there with you.
I'm not feeling brave enough to do this right now because I'm not sure I would get EVERYTHING backed up and sorted properly...but as I've now run out of app install space several times, my tolerance for it is steadily decreasing!
Randy
Good Friggin Stuff
eldarerathis,
This guide was excellent and worked fantabulously for me. Thanks for an excellent walk-thru.
One Caveat. In this section:-
eldarerathis said:
3.3. The userdata partition (/data)
...
Code:
~ # parted
...
Click to expand...
Click to collapse
The executed parted command in should read:-
Code:
~ # parted /dev/block/mmcblk0
...
Also, in setting up the /cache partition, after initiating this command:-
Code:
tune2fs -j /dev/block/mmcblk0p11
Thanks for pointing out the potential for the need to fix 'group descriptor checksums'. Though, in order to ensure the filesystem was marked clean, I had to initiate an extra step of running f2sck manually:-
Code:
~ # e2fsck -fD /dev/block/mmcblk0p11
(note the lack of the -p switch)
Again: Good work putting this together for the KF community. I, for one, had the immediate consideration of a small /media partition (and an inflated apps area) as this is mostly for books / apps / games for the kids whom would not use this for locally stored content and would stream any media they desired.
One question: can any of this be scripted in any way?
Cheers.
I'd love to see a script or something for this....
airmaxx23 said:
I'd love to see a script or something for this....
Click to expand...
Click to collapse
Ya, I agree - terrified to do this myself but happy to run a script by someone who's had it tested by others.
drExel said:
eldarerathis,
This guide was excellent and worked fantabulously for me. Thanks for an excellent walk-thru.
One Caveat. In this section:-
The executed parted command in should read:-
Code:
~ # parted /dev/block/mmcblk0
...
Also, in setting up the /cache partition, after initiating this command:-
Code:
tune2fs -j /dev/block/mmcblk0p11
Thanks for pointing out the potential for the need to fix 'group descriptor checksums'. Though, in order to ensure the filesystem was marked clean, I had to initiate an extra step of running f2sck manually:-
Code:
~ # e2fsck -fD /dev/block/mmcblk0p11
(note the lack of the -p switch)
Again: Good work putting this together for the KF community. I, for one, had the immediate consideration of a small /media partition (and an inflated apps area) as this is mostly for books / apps / games for the kids whom would not use this for locally stored content and would stream any media they desired.
One question: can any of this be scripted in any way?
Cheers.
Click to expand...
Click to collapse
Oops, you're right. I *always* forget the device parameter when I use parted (even when I'm actually running it; I do it the first time without a param constantly and parted yells at me), so I'm not surprised I missed one of them. Thanks, I'll fix that.
Per your second comment: I actually did this a second time because I changed my mind and decided to go with 3.5 GB /data and 2.5 GB /media, and I also had to run e2fsck manually. The first time I did this I didn't need to, and I'm not entirely sure why that is. Thanks for reminding me to add that note, though.
If I have some time I could try to put together a script for this. I was thinking about doing that since you should be able to do all of the parted stuff with command line parameters, but I haven't had time between work and the holidays. I might try to take a look at it again this weekend if I have a chance.
eldarerathis said:
Oops, you're right. I *always* forget the device parameter when I use parted (even when I'm actually running it; I do it the first time without a param constantly and parted yells at me), so I'm not surprised I missed one of them. Thanks, I'll fix that.
Per your second comment: I actually did this a second time because I changed my mind and decided to go with 3.5 GB /data and 2.5 GB /media, and I also had to run e2fsck manually. The first time I did this I didn't need to, and I'm not entirely sure why that is. Thanks for reminding me to add that note, though.
If I have some time I could try to put together a script for this. I was thinking about doing that since you should be able to do all of the parted stuff with command line parameters, but I haven't had time between work and the holidays. I might try to take a look at it again this weekend if I have a chance.
Click to expand...
Click to collapse
I'd make a donation to you if you get this done in a script.
Awesome space Space flip. Lov It.
eldarerathis said:
Per your second comment: I actually did this a second time because I changed my mind and decided to go with 3.5 GB /data and 2.5 GB /media, and I also had to run e2fsck manually.
Click to expand...
Click to collapse
Having done this with your original method, I totally understand why you might have had to revisit and partition as you did the second go-around. It seems most game downloads cache the initial files on the media partition before actually 'installing' the data to the SYSTEM partition. As a result, in no time at all (especially with Gameloft titles) you begin to receive 'LOW SPACE' warnings when downloading some of the extremely large game-data (ie. Dungeon Hunter 2 requires 900+ megs free available) so there is potential for required manual clean-up to see things through.
Does this work with TWRP installed? I actually want to increase my media storage, as I use my Kindle Fire mainly for reading things online and watching movies/anime (not porn you nasty people). I'm not so sure I would want to install ClockworkMod if I have TWRP already on here.
Hydrocharged said:
Does this work with TWRP installed? I actually want to increase my media storage, as I use my Kindle Fire mainly for reading things online and watching movies/anime (not porn you nasty people). I'm not so sure I would want to install ClockworkMod if I have TWRP already on here.
Click to expand...
Click to collapse
Yes, this should work fine. TWRP 2.0 has the utilities you need, to my knowledge.
Just thinking out loud....
I don't know if the ICS leak flashes change the partition table, but the way my phone is set up, there's 11 partitions:
p1: /efs
p2: /system
p3: /cache
p4: The "Internal SD"
p5: A mere 2MB. Mostly blank (long stretches of 00 or FF), except for <1KB of... something. Nothing jumps out at me in the hexdump. Could just be leftover garbage from Gingerbread.
p6: /data
p7: 16MB. Definitely something important here. Strings present suggest it's related to, if not part of, the bootloader, or perhaps download mode.
p8: 5MB: Looks like an Android bootimg. Recovery?
p9: 8MB: Pretty sure this is where the Linux kernel and rootfs for the actual system resides.
p10: 8MB: Completely blank.
p11: 500MB. An ext4 filesystem containing only the Asphalt 6 video and screenshots that you'd find on the "Internal SD" of a freshly Odin'd Glide.
I wonder if p5 actually serves a purpose; if not, we could theoretically merge it, p4, and p6 into one gigantic /data partition. That may be a bit more useful for those running with large microSD cards.
Things we need to look at:
One, bootloader. Does it look for things at static offsets? Does it read the partition table?
Two, recovery. I'm guessing CWMR will read the partition table, but is it expecting certain partitions to contain certain things?
In both cases, it shouldn't be anything we can't work around by filling out partition numbers or stretches of NAND with blank partitions. But we'll need to know what the offsets need to be.
Just putting the thought out there.
PIT & GPT, custom PIT
Actually the last PIT partition contains GPT data, and what we've seen inside the booted system comes out of GPT. But there is unallocated ~11Mb (according to GPT) before the first partition, and the PIT contains info about that!
cross-ref my thread: [Q] mmcblk0 Partiton table type (sgh-i927)
For now I'm looking a way of crafting my custom PIT-file, did you see any info about that?
Using CWM 5.0.2.0, when I try to format /data, I get:
Error formatting /data!
When I try to format /cache, I get:
Error formatting /cache!
This all started because I decided to try Albinoman's AOSP 4.2 ROM. This is what happened:
1. Booted into CWM 5.0.2.0, made a nandroid backup of stock GB ROM.
2. Installed Albinoman's ROM using CWM, wiped /cache and /data.
3. Booted Albinoman's ROM, no problems. Decided I wanted to backup and restore some apps in the old ROM using Titanium Backup.
4. Restored nandroid backup of stock ROM. When it rebooted, all was well.
5. Used Titanium Backup to back up my apps.
6. Installed Albinoman's ROM again.
7. Cleared /data, it was fine. Cleared /cache. Stuck at "formatting" for half an hour.
8. Rebooted back to recovery and tried it again. Couldn't find E:.
9. Tried letting it boot. Stuck on the boot animation for 30-minutes.
10. Wipe everything and re-flash. Tried again. Still stuck on boot animation.
11. Manually unmount and tried to format /data and /cache, and I get the error messages.
I had installed Convert2Ext4_no_data_limit_normal_dalvik.zip to the stock ROM about 4-months ago, not sure if that makes a difference or not.
When I search, it looks like the news is bad... most people that had this error gave up and believed it to be hardware NAND failure. Anything I can do to confirm or rule out NAND failure?
UPDATE: Managed to flash RUU, but results were interesting. It worked and it boots, home screen is blank (no HTC widgets), and apps I'd installed are still there. Clear Storage and Factory Reset does not get rid of them! I can manually uninstall apps, but when I reboot, they come back. I guess the /data must be stuck in some kind of read-only state.
GnatGoSplat said:
Using CWM 5.0.2.0, when I try to format /data, I get:
Error formatting /data!
When I try to format /cache, I get:
Error formatting /cache!
This all started because I decided to try Albinoman's AOSP 4.2 ROM. This is what happened:
1. Booted into CWM 5.0.2.0, made a nandroid backup of stock GB ROM.
2. Installed Albinoman's ROM using CWM, wiped /cache and /data.
3. Booted Albinoman's ROM, no problems. Decided I wanted to backup and restore some apps in the old ROM using Titanium Backup.
4. Restored nandroid backup of stock ROM. When it rebooted, all was well.
5. Used Titanium Backup to back up my apps.
6. Installed Albinoman's ROM again.
7. Cleared /data, it was fine. Cleared /cache. Stuck at "formatting" for half an hour.
8. Rebooted back to recovery and tried it again. Couldn't find E:.
9. Tried letting it boot. Stuck on the boot animation for 30-minutes.
10. Wipe everything and re-flash. Tried again. Still stuck on boot animation.
11. Manually unmount and tried to format /data and /cache, and I get the error messages.
I had installed Convert2Ext4_no_data_limit_normal_dalvik.zip to the stock ROM about 4-months ago, not sure if that makes a difference or not.
When I search, it looks like the news is bad... most people that had this error gave up and believed it to be hardware NAND failure. Anything I can do to confirm or rule out NAND failure?
UPDATE: Managed to flash RUU, but results were interesting. It worked and it boots, home screen is blank (no HTC widgets), and apps I'd installed are still there. Clear Storage and Factory Reset does not get rid of them! I can manually uninstall apps, but when I reboot, they come back. I guess the /data must be stuck in some kind of read-only state.
Click to expand...
Click to collapse
Did you reflash the Convert2Ext4 mod after you flashed the new rom? See this thread and read the top part after 'IMPORTANT:' There is a link in there to the old thread as well with a lot of info.
I did try that, but my /data and /cache are still unable to be written to, wiped, or formatted.
e2fsck won't touch /data, it has a superblock error. It finds errors on /cache and appears to be fixing them, but when I re-run it, the same errors are still there.
GnatGoSplat said:
I did try that, but my /data and /cache are still unable to be written to, wiped, or formatted.
e2fsck won't touch /data, it has a superblock error. It finds errors on /cache and appears to be fixing them, but when I re-run it, the same errors are still there.
Click to expand...
Click to collapse
Since you flashed the RUU, did you install an EXT4 compatible kernel or are you using the stock kernel? Maybe try restoring your working nandroid backup, then run the .zip to revert Convert2Ext4. Or even better, if you have a nandroid from before you installed the EXT4 mod.
DaggerDave said:
Since you flashed the RUU, did you install an EXT4 compatible kernel or are you using the stock kernel? Maybe try restoring your working nandroid backup, then run the .zip to revert Convert2Ext4. Or even better, if you have a nandroid from before you installed the EXT4 mod.
Click to expand...
Click to collapse
Wiping /data and /cache are enough to revert the mod.
Sent from my Galaxy Nexus using Tapatalk 2
Uggh, definitely doesn't sound so good. Since the RUU won't work, I'd say check out this thread:
http://forum.xda-developers.com/showthread.php?t=2123966
Yep, my partitions are no longer EXT4. #1 is EXT3 and #2 is EXT2. I guess that means Convert2Ext4 is no longer in play and the problem is unrelated.
Here is my parted:
Code:
parted /dev/block/mmcblk0 print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7944MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext3
2 797MB 1007MB 210MB primary ext2
3 1007MB 7944MB 6937MB primary fat32 lba
Yeah, I read that thread and it didn't sound encouraging! I get pretty much the same errors.
Even rm 1 and rm 2 don't remove the partitions. It's like they're read-only. I'm using the parted from CWM 5.0.2.0. Should I use a different one?
Also when I try e2fsck on it:
Code:
~ # e2fsck -pf /dev/block/mmcblk0p1
e2fsck -pf /dev/block/mmcblk0p1
/dev/block/mmcblk0p1: recovering journal
e2fsck: unable to set superblock flags on /dev/block/mmcblk0p1
~ # e2fsck -pf /dev/block/mmcblk0p2
e2fsck -pf /dev/block/mmcblk0p2
/dev/block/mmcblk0p2: Unconnected directory inode 34817 (/???)
/dev/block/mmcblk0p2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
~ # e2fsck -f /dev/block/mmcblk0p2
e2fsck -f /dev/block/mmcblk0p2
e2fsck 1.41.6 (30-May-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Unconnected directory inode 34817 (/???)
Connect to /lost+found<y>? y
yes
Pass 4: Checking reference counts
Inode 2 ref count is 2, should be 3. Fix<y>? yes
Inode 34817 ref count is 3, should be 2. Fix<y>? y
yes
Pass 5: Checking group summary information
Block bitmap differences: +274 +(449--510) +(645--701) -(139524--139541) -(139
85--139800)
Fix<y>? yes
Free blocks count wrong for group #0 (7919, counted=7799).
Fix<y>? y
yes
Free blocks count wrong for group #17 (7934, counted=7929).
Fix<y>? yes
Free blocks count wrong (198324, counted=198199).
Fix<y>? y
yes
Free inodes count wrong for group #17 (2048, counted=2045).
Fix<y>? yes
Directories count wrong for group #17 (0, counted=1).
Fix<y>? y
yes
Free inodes count wrong (51189, counted=51186).
Fix<y>? yes
/dev/block/mmcblk0p2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p2: 14/51200 files (14.3% non-contiguous), 6601/204800 blocks
When I tried it without the -p is when it looks above like it's fixing something, but it really didn't fix anything because it does the same thing when I try e2fsck again (as if it's read-only).
Is MMCBLK0 one physical NAND chip? If so, how come I can read/write/erase the /emmc with no problems? Isn't that just another partition on the same NAND disk?
If /data and /cache are really bad, is there any possible way to do an equivalent of a low-level format on the NAND and repartition?
Is booting CWM 5.0.2.0 and using adb shell supposed to have root privileges?
I can't modify the partition table using either parted or fdisk. I even tried zeroing the partitions using dd if=/dev/zero of=/dev/block/mmcblk0p1, p2, and even the whole of mmcblk0, but nothing actually gets written.
Since it seems like the NAND is probably irreparably borked, can I approach this problem from a different angle?
Can I partition my sdcard with an ext3 and ext2 partition, and tell Android to use those as /data and /cache respectively?
What in Android maps /dev/block/mmcblk0p1 to /data and /dev/block/mmcblk0p2 to /cache, and can I change those to point to partitions on sdcard?
Or is that hard-coded into the kernel?
GnatGoSplat said:
Since it seems like the NAND is probably irreparably borked, can I approach this problem from a different angle?
Can I partition my sdcard with an ext3 and ext2 partition, and tell Android to use those as /data and /cache respectively?
What in Android maps /dev/block/mmcblk0p1 to /data and /dev/block/mmcblk0p2 to /cache, and can I change those to point to partitions on sdcard?
Or is that hard-coded into the kernel?
Click to expand...
Click to collapse
It is hard coded into the kernel. To get root in adbshell try typimg su. This seems to be happening to more and more people as these phones get up there in age.
GnatGoSplat said:
Since it seems like the NAND is probably irreparably borked, can I approach this problem from a different angle?
Can I partition my sdcard with an ext3 and ext2 partition, and tell Android to use those as /data and /cache respectively?
What in Android maps /dev/block/mmcblk0p1 to /data and /dev/block/mmcblk0p2 to /cache, and can I change those to point to partitions on sdcard?
Or is that hard-coded into the kernel?
Click to expand...
Click to collapse
The answer is yes to both actually. Thrle boot.img would need to be customized. The best way is a flashable zip in recovery. Data and cache would need to be wiped manually ad recovery will not pick this up. Expect poorer performance though as SD cards tend to be slower than built in storage.
Sent from my Galaxy Nexus using Tapatalk 2
Thanks! So it sounds like the way to make this work is to compile a custom kernel? I don't know the first thing about it, but I think I could learn.
This is only in the kernel, so I could flash any 3rd party D-Inc ROM and just flash my customized kernel and it will see /data and /cache on the sdcard?
I could probably get one of those fast Class 10 cards if it turns out this is too slow, but I do recall changing vold.fstab once to fool Android into seeing /emmc as /sdcard and the /emmc (as /sdcard) didn't benchmark all that much faster than a real sdcard. I'm assuming /data and /cache are the same speed as /emmc since they're on the same mmcblk0 device, so I'm thinking maybe sdcard performance would be acceptable.
This actually sounds like it could be a better long-term solution than replacing the motherboard because no telling if a new motherboard will fail soon too.
The motherboard should be reliable. Emmc may die. Especially considering how old current dincs are.
I was talking about the boot.img which is not ROM independent and kernels aren't always either. Best idea is a flashable zip to modify the ram disk but I need the partition names if you decide to do it. I recommend keeping cache and data in the same order.
Also there would need to be a flashable wipe script to wipe data and cache.
Sent from my Galaxy Nexus using Tapatalk 2
Sorry, I wasn't very clear. By motherboard failing, I was assuming NAND is soldered to the motherboard, and if that's the case, ruined NAND = ruined motherboard. I had thought maybe I could buy a DInc with smashed LCD and good motherboard and just swap into mine (because mine is MINT condition), but I thought if I do that, I could very well end up in the same place as I'm in now and using sdcard would be more of a guarantee I wouldn't have to worry about this again.
I think I understand, the boot.img and kernel aren't exactly the same thing, but the kernel is part of boot.img? Or is it only the RAMDisk that needs changed, or both? You mentioned partition names, are you offering to make these modifications for me?
By same order, do you mean because mmcblk0p1 is /data, mmcblk0p2 is /cache, and mmcblkp3 is /emmc, I should partition my sdcard the same way with data 1st, cache 2nd, and sdcard 3rd?
Should I partition it with the phone, PC, or does it matter? Should the sizes of the new /data and /cache be the same size as original, or is there any reason I should make them larger?
Could I wipe the new /data and /cache simply by booting into Recovery and using adb shell and format them?
Also, the commands I was issuing in adb shell were from booting into CWM Recovery. Is it possible that mode can't write because I didn't login as root using the su command? I hadn't thought that would be the problem seeing as how the RUU and Android itself can't write to /data and /cache and other people managed to fix partition problems without needing to run su.
GnatGoSplat said:
Sorry, I wasn't very clear. By motherboard failing, I was assuming NAND is soldered to the motherboard, and if that's the case, ruined NAND = ruined motherboard. I had thought maybe I could buy a DInc with smashed LCD and good motherboard and just swap into mine (because mine is MINT condition), but I thought if I do that, I could very well end up in the same place as I'm in now and using sdcard would be more of a guarantee I wouldn't have to worry about this again.
I think I understand, the boot.img and kernel aren't exactly the same thing, but the kernel is part of boot.img? Or is it only the RAMDisk that needs changed, or both? You mentioned partition names, are you offering to make these modifications for me?
By same order, do you mean because mmcblk0p1 is /data, mmcblk0p2 is /cache, and mmcblkp3 is /emmc, I should partition my sdcard the same way with data 1st, cache 2nd, and sdcard 3rd?
Should I partition it with the phone, PC, or does it matter? Should the sizes of the new /data and /cache be the same size as original, or is there any reason I should make them larger?
Could I wipe the new /data and /cache simply by booting into Recovery and using adb shell and format them?
Also, the commands I was issuing in adb shell were from booting into CWM Recovery. Is it possible that mode can't write because I didn't login as root using the su command? I hadn't thought that would be the problem seeing as how the RUU and Android itself can't write to /data and /cache and other people managed to fix partition problems without needing to run su.
Click to expand...
Click to collapse
The NAND is likely soldered to the motherboard, so you're right about that.
To answer your first question, yeah, the kernel is part of the boot.img. The other part is the RAMdisk which is the only thing that needs to be changed.
Partition it in the same order. Probably parted via adb shell. 100MB for cache and at least 750MB for data. Sizes don't matter too much but you want enough.
adb shell has root access automatically in recovery. The issue is hardware most likely so your proposed workaround may be the only option.
First plan of attack is to find the partition names which would be mmcblk1p1 and mmcblk1p1 if you partition the sdcard the same way as the ROM is partitioned. Ideally you need to be able to fix the partitions themselves. I'll try to give more info later.
I copied the partition sizes from mmcblk0, so here's what I have on my 16GB SD card:
Code:
Model: SD SA16G (sd/mmc)
Disk /dev/block/mmcblk1: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext2
2 797MB 1007MB 210MB primary ext2
3 1007MB 16.0GB 15.0GB primary fat32 lba
mmcblk1p1 for /data
mmcblk1p2 for /cache
mmcblk1p3 for /sdcard
Will that work? I couldn't get mmcblk1p1 to show up as ext3. I did use mke2fs -j /dev/block/mmcblk1p1 to format it and I've read ext3 = ext2+journal, so I guess the fact it's not saying "ext3" under filesystem is okay?
GnatGoSplat said:
I copied the partition sizes from mmcblk0, so here's what I have on my 16GB SD card:
Code:
Model: SD SA16G (sd/mmc)
Disk /dev/block/mmcblk1: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext2
2 797MB 1007MB 210MB primary ext2
3 1007MB 16.0GB 15.0GB primary fat32 lba
mmcblk1p1 for /data
mmcblk1p2 for /cache
mmcblk1p3 for /sdcard
Will that work? I couldn't get mmcblk1p1 to show up as ext3. I did use mke2fs -j /dev/block/mmcblk1p1 to format it and I've read ext3 = ext2+journal, so I guess the fact it's not saying "ext3" under filesystem is okay?
Click to expand...
Click to collapse
You would be correct. Yes, that's fine.
Thanks, what should be my next steps?
GnatGoSplat said:
Thanks, what should be my next steps?
Click to expand...
Click to collapse
I'll have to find time to make scripts that will modify the ramdisk, unless you can just extract it and make the changes yourself.
That would be great, I really appreciate all the help so far.
Do you think ramdisk is the only place a change will need to be made?
I was trying to see if I could figure out how to extract ramdisk from boot.img and found a perl script, but I haven't gotten around to playing with it.
I know the S4 claims to give 16 gbs, when really we only have access to 8 gbs. Where exactly does the other 8 gb go? Ive read that the files to make the phone work, the OS is roughly 3 gbs big. Ok, so whats the other 5 gbs used for? I know most of the bloatware can result in another 1 gb... so that means 4 gbs should be used up.. but how does this all equate to 8 gbs? Is there any way to recover the space? Even if new ROMS are installed, the 8gb is always used up some how?
8GB? I have around 10GB usually.
Probably have cwm backups saved and hidden on internal SD. Go into cwm, click backup/restore, click delete, and see if it shows a backup or 2 saved
Sent from my SGH-M919 using Tapatalk 4
All I know is that the system holds right around 6.5GB for itself; bringing your grand total of usable storage down to around 9.5GB. It doesn't matter if you're using TouchWiz (~2GB) or SlimBean (~150MB), that little bit the system has reserved for itself doesn't change; you'll always have around 9.5GB available internal storage space.
/cache (2gb) + /system (2.7gb) + /data (9.6gb) = 14.3 gb. There are others partitions, but I think these are the biggest ones. So I think it's 16gb indeed.
Besides 16gb is a market thing. Actually it's 16000000000 bytes, which gives you 14.9 gb.
extrem0 said:
/cache (2gb) + /system (2.7gb) + /data (9.6gb) = 14.3 gb. There are others partitions, but I think these are the biggest ones. So I think it's 16gb indeed.
Besides 16gb is a market thing. Actually it's 16000000000 bytes, which gives you 14.9 gb.
Click to expand...
Click to collapse
Good point :thumbup:
Sent from my SGH-M919 using XDA Premium 4 mobile app
So are they false advertising, or just misleading. They say you have 16 gb, when really you only have 14.9 and to make it worse, when you get the phone you realize you only have access to a little over half of the "marketed" amount.
10cheesecakes said:
So are they false advertising, or just misleading. They say you have 16 gb, when really you only have 14.9 and to make it worse, when you get the phone you realize you only have access to a little over half of the "marketed" amount.
Click to expand...
Click to collapse
When was the last time you formatted a hard drive, ssd, flash drive, sdcard, or any other medium and had the full amount of space available?
9Lukas5 said:
cwm includes parted, and if you enter the print command you get this:
Code:
Number Start End Size File system Name Flags
1 4194kB 17.3MB 13.1MB apnhlos
2 17.3MB 71.3MB 54.0MB mdm
3 71.3MB 71.4MB 131kB sbl1
4 71.4MB 71.7MB 262kB sbl2
5 71.7MB 72.2MB 524kB sbl3
6 72.2MB 74.3MB 2097kB aboot
7 74.3MB 74.8MB 524kB rpm
8 74.8MB 75.4MB 524kB tz
9 75.4MB 92.7MB 17.3MB pad
10 92.7MB 107MB 14.3MB ext4 efs
11 107MB 110MB 3146kB modemst1
12 110MB 113MB 3146kB modemst2
13 113MB 114MB 799kB m9kefs1
14 114MB 115MB 799kB m9kefs2
15 115MB 116MB 799kB m9kefs3
16 116MB 3010MB 2894MB ext4 system
17 3010MB 3018MB 8389kB persist
18 3018MB 5189MB 2171MB ext4 cache
19 5189MB 5195MB 6291kB param
20 5195MB 5205MB 10.5MB boot
21 5205MB 5216MB 10.5MB recovery
22 5216MB 5226MB 10.5MB fota
23 5226MB 5233MB 6291kB backup
24 5233MB 5236MB 3146kB fsg
25 5236MB 5236MB 8192B ssd
26 5236MB 5245MB 9437kB ext4 persdata
27 5245MB 5770MB 524MB ext4 hidden
28 5770MB 5791MB 21.0MB carrier
29 5791MB 15.8GB 9961MB ext4 userdata
This is from a 16Gb model, so the hardware mount points of the partitions are /dev/block/mmcblk0p[Number]
Click to expand...
Click to collapse
tehstfu said:
When was the last time you formatted a hard drive, ssd, flash drive, sdcard, or any other medium and had the full amount of space available?
Click to expand...
Click to collapse
I've done it a bit, and its usually fairly close, but its still misleading isn't it? Especially when they market it as a specific amount, when in relity your only getting HALF of what they mentioned. Most of my hard drives were off by a bit.. but not by HALF. I got a 1 tb and it comes out to 996 gb. I have access to ALL 996 gb... not 498 gb.
10cheesecakes said:
I've done it a bit, and its usually fairly close, but its still misleading isn't it? Especially when they market it as a specific amount, when in relity your only getting HALF of what they mentioned. Most of my hard drives were off by a bit.. but not by HALF. I got a 1 tb and it comes out to 996 gb. I have access to ALL 996 gb... not 498 gb.
Click to expand...
Click to collapse
I agree, it sucks. But they're not telling you that it has 16gb of storage, just that it has a 16gb mmc block. 10 gb really isn't much anymore, but luckily, it comes with a microSD slot and supports 64 gig cards.
10cheesecakes said:
I've done it a bit, and its usually fairly close, but its still misleading isn't it? Especially when they market it as a specific amount, when in relity your only getting HALF of what they mentioned. Most of my hard drives were off by a bit.. but not by HALF. I got a 1 tb and it comes out to 996 gb. I have access to ALL 996 gb... not 498 gb.
Click to expand...
Click to collapse
I'm curious what platform you are formatting on because on Windows/NTFS, a 1TB drive formats to 931 GB. Also, as is mentioned, there is storage memory that is reserved/partitioned for system usage.
10cheesecakes said:
So are they false advertising, or just misleading. They say you have 16 gb, when really you only have 14.9 and to make it worse, when you get the phone you realize you only have access to a little over half of the "marketed" amount.
Click to expand...
Click to collapse
Flash drives market for 16 gb but you only get around 14. Blame physics
Also don't forget the bootloader kernel and modem need space
If you're having issues with space, try folder mount to move some folders off your internal onto your external sd card. And my touchwiz ROM has almost two gigs of free space in the system partition. I made a separate directory in there and labeled it "second_internal" then created a symlink to my storage directory and now apps see I have a third sd card
Sent from my SGH-M919 using Tapatalk
elesbb said:
Flash drives market for 16 gb but you only get around 14. Blame physics
Also don't forget the bootloader kernel and modem need space
If you're having issues with space, try folder mount to move some folders off your internal onto your external sd card. And my touchwiz ROM has almost two gigs of free space in the system partition. I made a separate directory in there and labeled it "second_internal" then created a symlink to my storage directory and now apps see I have a third sd card
Sent from my SGH-M919 using Tapatalk
Click to expand...
Click to collapse
Where is your ROM located so I can give it a spin =D
Good day fellow xda-developers!
I am currently have a problem with my galaxy ace 2 ( GT-I8160). My brother by accident and through Odin erased some partition files! He ticked Nand erased all and since then the mobile shows the first screen writting Samsung Galaxy Ace 2 GT-I8160 and then reboots.
More specific:
I:Checking for extendedcommand...
I:Skipping execution of extendedcommand, file not found..
I:Cannot load volume /misc
I:Can't partition non mmcblk device: /devices/sd i2/mmc_host/mmc0/mmc0
I have tried many Official roms by sammobile but no luck, i tried from here an official rom given with PDA,CSC and pit but still nothing.
I have even tried to flash through CWM many custom roms but still nothing. Some off them showed to be done correctly but still then it showed the first screen and then restarted.
Has anyone any idea how to fix it? Can someone provide me with a CWM back up to try to flash it?
@matlowpap, you PMed me:
matlowpap said:
Do you have any CWM back up to send me to try flash through there? I want to see if it will flash the missing partitions..
Click to expand...
Click to collapse
Not sure if flashing CWM backup will help here, since even flashing an official ROM didn't help. Probably your best bet is to try recovering deleted partitions via parted. Have you tried to repart internal sdcard via CWM ReParted? If no, then first connect the phone to PC via adb and run:
Code:
parted /dev/block/mmcblk0
print
If even this is not working, it's likely to be a hardware fault. Otherwise this command will print partition list. Compare output with this one
Code:
Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3959MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
10 524kB 1573kB 1049kB PIT
6 1573kB 3146kB 1573kB CSPSA FS
7 4194kB 14.7MB 10.5MB ext4 EFS
2 14.7MB 31.5MB 16.8MB ext4 Modem FS
14 32.5MB 34.6MB 2097kB SBL
16 34.6MB 36.7MB 2097kB SBL_2
1 36.7MB 53.5MB 16.8MB PARAM
12 53.5MB 55.6MB 2097kB IPL Modem
13 55.6MB 72.4MB 16.8MB Modem
15 72.4MB 89.1MB 16.8MB Kernel
17 89.1MB 106MB 16.8MB ext4 Kernel2
3 106MB 726MB 620MB ext4 SYSTEM
5 726MB 1972MB 1246MB ext4 DATAFS
4 1972MB 1982MB 10.0MB ext4 CACHEFS
9 1982MB 2602MB 620MB ext4 HIDDEN
8 2602MB 2702MB 100MB fat32 UMS
11 2702MB 3949MB 1247MB
to find out what partitions to restore. Note that CWM reparted doesn't touch any of "vital" partitions, and will recreate only System, data, cache and UMS. If some other partitions are missing, you have to create them via parted utility.
P.s. Be sure to read that topic in link above before flashing anything.
ChronoMonochrome said:
@matlowpap, you PMed me:
Not sure if flashing CWM backup will help here, since even flashing an official ROM didn't help. Probably your best bet is to try recovering deleted partitions via parted. Have you tried to repart internal sdcard via CWM ReParted? If no, then first connect the phone to PC via adb and run:
Code:
parted /dev/block/mmcblk0
print
If even this is not working, it's likely to be a hardware fault. Otherwise this command will print partition list. Compare output with this one
Code:
Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3959MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
10 524kB 1573kB 1049kB PIT
6 1573kB 3146kB 1573kB CSPSA FS
7 4194kB 14.7MB 10.5MB ext4 EFS
2 14.7MB 31.5MB 16.8MB ext4 Modem FS
14 32.5MB 34.6MB 2097kB SBL
16 34.6MB 36.7MB 2097kB SBL_2
1 36.7MB 53.5MB 16.8MB PARAM
12 53.5MB 55.6MB 2097kB IPL Modem
13 55.6MB 72.4MB 16.8MB Modem
15 72.4MB 89.1MB 16.8MB Kernel
17 89.1MB 106MB 16.8MB ext4 Kernel2
3 106MB 726MB 620MB ext4 SYSTEM
5 726MB 1972MB 1246MB ext4 DATAFS
4 1972MB 1982MB 10.0MB ext4 CACHEFS
9 1982MB 2602MB 620MB ext4 HIDDEN
8 2602MB 2702MB 100MB fat32 UMS
11 2702MB 3949MB 1247MB
to find out what partitions to restore. Note that CWM reparted doesn't touch any of "vital" partitions, and will recreate only System, data, cache and UMS. If some other partitions are missing, you have to create them via parted utility.
P.s. Be sure to read that topic in link above before flashing anything.
Click to expand...
Click to collapse
I will try as soon as I can your method but please can you upload a CWM back up too.
I want to be sure that it is not working.
matlowpap said:
I will try as soon as I can your method but please can you upload a CWM back up too.
I want to be sure that it is not working.
Click to expand...
Click to collapse
I don't have neither enough internet traffic to upload nand backup nor high enough upload speed. Of course you can ask someone else to upload CWM backup, but it would be senseless, as restoring nand backup won't create those deleted partitions.