Resizing Data and System Partitions? - HTC Desire 510

Assuming that I debloated the rom that I want, and have some extra space I want to transfer from the system partition to the data partition; how would one go about resizing the partitions of this device? I know it is possible on some other phones, but I was wondering if this process is similar with this one, if there is a type of universal process or if it must be done specific to this phone with a specific script or command sequence via ADB?

davidw.roggenkamp said:
Assuming that I debloated the rom that I want, and have some extra space I want to transfer from the system partition to the data partition; how would one go about resizing the partitions of this device? I know it is possible on some other phones, but I was wondering if this process is similar with this one, if there is a type of universal process or if it must be done specific to this phone with a specific script or command sequence via ADB?
Click to expand...
Click to collapse
If you're hoping to resize the partitions such as System mmcblk0p43 or any other mmcblk's it's not possible on this device you'll break it and besides, you can't even try to resize it while you're s-on!

Related

How to specify custom partition layouts?

I just saw an interesting thread in the development section that explains an alternative to the Death SPL. The method there lets you flash ANY rom on any SPL, but I dont really understand how it works.
The thread can be found here: http://forum.xda-developers.com/showthread.php?t=704560
So basically, you shrink the cache partition to allow for more room for the actual ROM(which partition does that go in?)?
To do this do we edit the boot.img in the ROM update.zip? What else do we do?
Could someone explain this in a way a 9th grader could understand?
kingkurry said:
Could someone explain this in a way a 9th grader could understand?
Click to expand...
Click to collapse
Take file by firerat, flash file. omgroflpartitons.
If you don't understand the instructions as they are, wait for it to be perfected before you try anything. This will probably end up being integrated into releases that need it, so you don't need to worry about the specifics at the moment.
Will that patch file work for all ROMs. He said its only been tested with CyanogenMod 5. And I want to understand what im doing, not just do it without thinking about it...
Also, does the recovery patcher decrease the size of the partition that holds the recovery image?
Does it permanently change the size of the recovery partition?
When you flash a ROM, what partition is it being flashed too? Is this the one being increased in size?
What does the boot.img in an update.zip package hold, and is that copied to the boot partition?
Sorry but my curiosity is killing me
OK well to break it down we have 6 partitions on the internal memory:
Misc - Here be dragons
Recovery - Contains recovery system (+seperate recovery kernel) - recovery.img lives here
Boot - Contains kernel & important initialization stuff - boot.img lives here
-------------
System - Contains the whole android system (the "ROM", if you like).. everything else from an update.zip apart from the boot.img
Cache - Used by system and recovery for temporary storage
Userdata - Contains all personal data, downloaded apps, settings etc.
The first three partitions must be left at the default size so don't worry about them.
What this patch does is pass a command to the kernel which remaps the 3 large partitions at boot time. Since we're flashing system images from recovery, we also need to pass the same command to the recovery kernel before attempting to flash the main system, or we'd be writing to one place then telling the kernel to look for it in another.. bad idea.
This method allows any partition setup you like, but the most useful at the moment (and this is the way firerat has set up his scripts to suit cm5) is to make the /system partition just the right size for the "ROM" with a bit of breathing space, make the /cache partition a minimal size for the recovery system to use, then have /userdata fill the remaining space so we can load it up with apps. Since we've reduced cache to a minimal size, it's redirected at boot time to a place on the sdcard instead.. this give us maximum space to divide between /system and /data with no wastage.
Does that help at all..?
Thanks dude. That does help a lot.
Just wondering though, how much breathing space do u need in the system partition?
What does the recovery system use the cache partition for and how do we know what "a minimal size for the recovery system to use" is?
Is it possible to reduce the userdata partition to the minimum possible size a partition can be(if i recall correctly it was 128kb) and use an ext partition on your SD card instead?
If we shrink the Cache partition a lot, does this mean we have to use linux swap to compensate for the lowered amount of cache?
Also do we have to remap the partitions every time we flash a new ROM?
And what are the "dragons"?
kingkurry said:
And what are the "dragons"?
Click to expand...
Click to collapse
He's saying that it's just there. There could be anything from nothing there to a text document containing the ingredients to the cure of AIDs.
Well what about every thing else? Can you guys help me with that? Also what is the total size of all 3 of the big partitions combined?

Can't move Dalvik-cache to cache partition

I've search the forum and find different ways to move dalvik-cache from data partition to cache partition, from creating links or mounting, to a2sd command, but none of them worked for me. In all cases after reboot another dalvik-cache with system access will created along the dalvik-cache the method created in data partition. so I have two dalvik-cache folders (that one of them is link) and system will use the real one that will waste my data partition size.
this is how it look like:
Code:
drwxrwx--x system system 2010-10-23 12:30 dalvik-cache
drwxrwxrwx root shell 2010-10-23 11:41 dalvik-cache
I am struggling to find a way to free some memory on /data partition, as I rooted without unlocking the boot loader, I couldn't be able to resize the data system and cache partitions, (booted into fastboot mode, used fastboot command to erase system but it couldn't be erased with a access denied error).
Anybody can you please help?
I am on stock Froyo 2.2.1 and rooted without unlocking bootloader.
bohlool said:
I've search the forum and find different ways to move dalvik-cache from data partition to cache partition, from creating links or mounting, to a2sd command, but none of them worked for me. In all cases after reboot another dalvik-cache with system access will created along the dalvik-cache the method created in data partition. so I have two dalvik-cache folders (that one of them is link) and system will use the real one that will waste my data partition size.
this is how it look like:
Code:
drwxrwx--x system system 2010-10-23 12:30 dalvik-cache
drwxrwxrwx root shell 2010-10-23 11:41 dalvik-cache
I am struggling to find a way to free some memory on /data partition, as I rooted without unlocking the boot loader, I couldn't be able to resize the data system and cache partitions, (booted into fastboot mode, used fastboot command to erase system but it couldn't be erased with a access denied error).
Anybody can you please help?
I am on stock Froyo 2.2.1 and rooted without unlocking bootloader.
Click to expand...
Click to collapse
I think the stock kernel re-establishes the file system on boot and does not support moving anything.
I think you'll need a custom rom and kernel with apps2ext support to do what you're wanting.
Try the latest test release of my rom (in my sig), has everything you need.
djmcnz said:
I think the stock kernel re-establishes the file system on boot and does not support moving anything.
I think you'll need a custom rom and kernel with apps2ext support to do what you're wanting.
Try the latest test release of my rom (in my sig), has everything you need.
Click to expand...
Click to collapse
Is there any other way? e.g. Changing something, or Install something to make it no re-establishment? Or any way to change the partition sizes on Stock ROM (rooted but without unlocking boot loader)
bohlool said:
Is there any other way? e.g. Changing something, or Install something to make it no re-establishment? Or any way to change the partition sizes on Stock ROM (rooted but without unlocking boot loader)
Click to expand...
Click to collapse
Nope.
Root and be done with it, that's why people get the Nexus...
Edit: Hang on... I didn't read properly...
But the answer's still no... Just load a custom rom/kernel, you're already rooted.
Edit 2: Even with a custom rom you can not change partition sizes.

/system file system question

Hey there.
In twrp I can't change my system partition file system to F2FS. To do it, I enter twrp and do the "normal" steps (wipe, advanced, change to f2fs).
TWRP says it changed but if I perform the same steps the file system type remains ext4.
Is this supposed to be like this?
You cannot format the system
It's really not practical to change the filesystem of /system since it's distributed as an image and not as files. You theoretically could do it, but it would be a lot of work and you'd have to redo it from scratch every time you updated your ROM. Also, you wouldn't get most of the benefits of f2fs since you'd almost never be writing to it.

Is it possible to mount data partition on PC or USB to recover data

Is it possible to mount data partition on PC or USB to recover data?
Edit: I meant userdata partition
I have tried backing up data partition using TWRP, but it prompted me that pictures and downloads will not be backed-up!
Isn't the data partition that holds my camera and download folder?
I am looking for a tool or and app that can let me take a disk image of internal SD partition, or create a whole image of my phone; so that I can use data recovery in my PC.
Making Dump Files Out of Android Device Partitions
have u try this
Thanks I have tried it but when I execute
Code:
noblelte:/ # dd if=/dev/block/sda17 of=/sda17.img
Gives me
Code:
dd: /sda17.img: Read-only file system
Just to be sure : I ran the adb code while the phone is on normally not in TWRP.
I also ran the code in TWRP terminal, while connecting a USB and mounting it.
It created the image inside the USB , however it stopped at 4GB saying the file is too large.
SilverDove said:
I also ran the code in TWRP terminal, while connecting a USB and mounting it.
It created the image inside the USB , however it stopped at 4GB saying the file is too large.
Click to expand...
Click to collapse
Are you just wanting to back up pictures, download folder, etc etc? Backing up the data partition the way you are is pointless as you're just accomplishing what twrp already does. Data partition is apps, system configurations, texts, calls, etc. Not pictures you've taking, download folder, etc.
And is there a reason you want an img file? Seems pointless to me when you can just copy it all over by drag and drop or adb pull the internal storage lol
I want to make a userdata partition image because it holds the camera album I deleted by mistake. I want to take the image and try to recover the deleted files using PC recovery software.
I found out that my problem was the 4GB limit of FAT32, so I formatted my USB flash memory using both exFat and ext4 and recovered the partition using TWRP terminal with the code above.
However I am still unable to read the image through Linux Reader and I can't attach the image as VHD.
Is what I am doing is useless? Because it came to my mind that if the recovered userdata partition is encrypted I will not be able to opened it, however, TWRP can browse the files so I guess it is not encrypted.
SilverDove said:
I want to make a userdata partition image because it holds the camera album I deleted by mistake. I want to take the image and try to recover the deleted files using PC recovery software.
I found out that my problem was the 4GB limit of FAT32, so I formatted my USB flash memory using both exFat and ext4 and recovered the partition using TWRP terminal with the code above.
However I am still unable to read the image through Linux Reader and I can't attach the image as VHD.
Is what I am doing is useless? Because it came to my mind that if the recovered userdata partition is encrypted I will not be able to opened it, however, TWRP can browse the files so I guess it is not encrypted.
Click to expand...
Click to collapse
You may need to convert the file type of the img using simg2img, make_ext4fs, etc
You can see what the file system type of the img you have by running:
file blahblah.img
But still don't think you're going to recover them but possibly lol never tried as I sync everything to a cloud
SilverDove said:
Is it possible to mount data partition on PC or USB to recover data?
Edit: I meant userdata partition
Click to expand...
Click to collapse
For backing up app data, I'm more of a Titanium Backup person myself and for backing up partitions I generally prefer TWRP, but there are also apps for backing up all the different partitions as well. This is just one. Never tried it, but Wanam is a much trusted developer in the XDA community for Samsung devices.
https://play.google.com/store/apps/details?id=ma.wanam.partitions
NOTE: You can always save these backups to a USB OTG device if you need to as well. That's what I do with my Titanium Backup app data files and the information is with me all the time hanging on my key chain.(More info about that under "No SD Card Slot" on this post HERE.) This information can of course always be copied to a PC too.

Question Taking a full backup

Hi there everyone!
A few days ago, I was wondering about taking a full backup of my phone. I thought about titanium backup, but I also red something about extracting a partition as an image from the device. And then, I came up with an idea:
Is it possible to extract the userdata and the data partition as an image on this device? (I know that boot image can be extracted)
And if it's possible, after a full wipe and reflash of the phone, can I also flash these two images to get back my user data and the data of my apps? Or will it be enough?
As far as I know, these two partitions store most of the data, maybe system stores data too, like system apps.
Can you also provide me some commands for the process?
Thank you!
gurtnyi said:
Hi there everyone!
A few days ago, I was wondering about taking a full backup of my phone. I thought about titanium backup, but I also red something about extracting a partition as an image from the device. And then, I came up with an idea:
Is it possible to extract the userdata and the data partition as an image on this device? (I know that boot image can be extracted)
And if it's possible, after a full wipe and reflash of the phone, can I also flash these two images to get back my user data and the data of my apps? Or will it be enough?
As far as I know, these two partitions store most of the data, maybe system stores data too, like system apps.
Can you also provide me some commands for the process?
Thank you!
Click to expand...
Click to collapse
use twrp for that
tutibreaker said:
use twrp for that
Click to expand...
Click to collapse
Does it also backup the full data partition including /data/media ?

Categories

Resources