Ever since I rooted and de-bloated my S6 I've wanted to re-partition it because it would free up over 2GB of unused space of my /system partition. The way I see it, there are two possible ways this could be done:
One, customising a PIT-file
A PIT-file is a file that can be flashed through ODIN. It tells the phone how to partition the internal eMMC storage. It's quite easy to modify and read, however, the phone will refuse to run it without a digital signature. To digitally sign a file one has to have a private key, a key which I'm guessing only Samsung has. So without a leak, we're at a loss.
Which leads us to possibility two:
Using LVM
LVM is short for Logical Volume Management and is a way to make "virtual partitions". It's much more complex than customising a PIT-file, but it's doable - it's been done on Android devices before. The author of that thread, steven676, has made a version of LVM for Android, and has included some nice documentation. Since I'm not an expert in Android I did run into some problems. I'm making this thread so that we may be able to sort them out together (read up here):
I'm going to give each step a status on how far we've come: problem; hopefull and done. As we figure out this further I'll update the steps.
Step 1: Gathering information problem
This is the only place I really got stuck. What I couldn't find out was the erase block size. Basically that's the smallest size of data that can be deleted from your flash memory at a time. He's referring to a tool called flashbench, which ran nicely in my linux VM, but I can't figure out a way to use that tool to benchmark the internal storage of the S6. I'm at a loss.
Step 2: Configuring LVM hopefull
I've read through his sample configuration file. It doesn't seem to be any trouble there.
Step 3: Creating a modified recovery hopefull
I'm assuming this wouldn't be a problem, we just have to compile a version of TWRP with the said changes.
Step 4: Creating LVM volumes on the device hopefull
Easy as pie. We should start the volumes on /dev/block/sda15 (system partition), and end them at the end of the flash memory. Four volumes in total: system; cache; hidden and userdata. The system volume should be the size of your system (obviously), the cache partition on my device is slightly above 200MB, so I'm assuming it's smart to keep it like that, I know the hidden partition is used for carriers to install their apps on, however I'm unsure if it's really needed. Could someone fill me in here? Lastly, the userdata volume should fill the rest of the flash memory.
Step 5: Creating a modified boot image hopefull
I know for a fact this is doable and it should be fairly easy. I just don't know how. I believe it would be fairly easy with Android Kitchen. I'll have to read up on this.
He's also included a step 6, but that's only for ROM developers to automate the process.
I'd be very grateful if someone could help with figuring out the erase block size on the S6, which seems to be the only major obstacle. I'll be sure to write a guide on how to use LVM on the S6 if I figure this out.
One, customising a PIT-file
A PIT-file is a file that can be flashed through ODIN. It tells the phone how to partition the internal eMMC storage. It's quite easy to modify and read, however, the phone will refuse to run it without a digital signature. To digitally sign a file one has to have a private key, a key which I'm guessing only Samsung has. So without a leak, we're at a loss.
Which leads us to possibility two:
Using LVM
LVM is short for Logical Volume Management and is a way to make "virtual partitions". It's much more complex than customising a PIT-file, but it's doable - it's been done on Android devices before. The author of that thread, steven676, has made a version of LVM for Android, and has included some nice documentation. Since I'm not an expert in Android I did run into some problems. I'm making this thread so that we may be able to sort them out together (read up here):
I'm going to give each step a status on how far we've come: problem; hopefull and done. As we figure out this further I'll update the steps.
Step 1: Gathering information problem
This is the only place I really got stuck. What I couldn't find out was the erase block size. Basically that's the smallest size of data that can be deleted from your flash memory at a time. He's referring to a tool called flashbench, which ran nicely in my linux VM, but I can't figure out a way to use that tool to benchmark the internal storage of the S6. I'm at a loss.
Step 2: Configuring LVM hopefull
I've read through his sample configuration file. It doesn't seem to be any trouble there.
Step 3: Creating a modified recovery hopefull
I'm assuming this wouldn't be a problem, we just have to compile a version of TWRP with the said changes.
Step 4: Creating LVM volumes on the device hopefull
Easy as pie. We should start the volumes on /dev/block/sda15 (system partition), and end them at the end of the flash memory. Four volumes in total: system; cache; hidden and userdata. The system volume should be the size of your system (obviously), the cache partition on my device is slightly above 200MB, so I'm assuming it's smart to keep it like that, I know the hidden partition is used for carriers to install their apps on, however I'm unsure if it's really needed. Could someone fill me in here? Lastly, the userdata volume should fill the rest of the flash memory.
Step 5: Creating a modified boot image hopefull
I know for a fact this is doable and it should be fairly easy. I just don't know how. I believe it would be fairly easy with Android Kitchen. I'll have to read up on this.
He's also included a step 6, but that's only for ROM developers to automate the process.
I'd be very grateful if someone could help with figuring out the erase block size on the S6, which seems to be the only major obstacle. I'll be sure to write a guide on how to use LVM on the S6 if I figure this out.
Aucun commentaire:
Enregistrer un commentaire