FORUMS
Remove All Ads from XDA

[TOOL] Lanchon REPIT: The Data-Sparing Repartitioning Tool For Android

2,676 posts
Thanks Meter: 4,452
 
By Lanchon, Senior Member on 13th April 2016, 06:50 PM
Post Reply Email Thread
28th April 2016, 10:15 PM |#31  
Lanchon's Avatar
OP Senior Member
Thanks Meter: 4,452
 
Donate to Me
More
Quote:
Originally Posted by woook

didn't know that big sdcard0 is necessary,
i'll make it like this - hope this is a good solution,
-system=1+wipe-data=6+wipe-sdcard=max+wipe-preload=min+wipe

yes those are my recommended sizes.

(wiping everything as you have chosen to do will make repit run in under a minute. you don't need to plug into a power source for this.)
The Following User Says Thank You to Lanchon For This Useful Post: [ View ] Gift Lanchon Ad-Free
28th April 2016, 10:18 PM |#32  
Junior Member
Thanks Meter: 4
 
More
now i get it, sorry for chaos i made
at first I thought that system is for apps and data=sdcard0, nvm now
Thanks again
The Following User Says Thank You to woook For This Useful Post: [ View ] Gift woook Ad-Free
21st May 2016, 06:54 PM |#33  
JavaScout's Avatar
Senior Member
Thanks Meter: 275
 
More
Hi, folks. Need some simple math help here:
how much free space will be left in 'sdcard' partition, with this kind of config?
Code:
system = size:1.0 + content:keep + fs:ext4
data = size:6 + content:keep + fs:ext4
sdcard = size:max + content:keep + fs:vfat
preload = size:min + content:keep + fs:ext4
I just want to keep all of my partitions data, hence the question.
P.S. btw, @Lanchon , how do you achieve this effect, when data is kept untouched during repartition?
I'm mean - from technical perspective?
21st May 2016, 09:44 PM |#34  
Lanchon's Avatar
OP Senior Member
Thanks Meter: 4,452
 
Donate to Me
More
Quote:
Originally Posted by JavaScout

Hi, folks. Need some simple math help here:

how much free space will be left in 'sdcard' partition, with this kind of config?
Code:
system = size:1.0 + content:keep + fs:ext4
data = size:6 + content:keep + fs:ext4
sdcard = size:max + content:keep + fs:vfat
preload = size:min + content:keep + fs:ext4
I just want to keep all of my partitions data, hence the question.
P.S. btw, @Lanchon , how do you achieve this effect, when data is kept untouched during repartition?
I'm mean - from technical perspective?

you can'r shrink preload to minimum size AND keep its content! either wipe it (recommended) or size it appropriately.

regarding your question: it depends on the type of partition (file system, etc); different types have different handlers. look at the docs to see which types support content keep, then look a the source code. there is a separate source file for each supported partition type.
The Following User Says Thank You to Lanchon For This Useful Post: [ View ] Gift Lanchon Ad-Free
21st May 2016, 09:45 PM |#35  
the.gangster's Avatar
Senior Member
Thanks Meter: 1,371
 
More
@JavaScout
You'll have 7.5gb total SD space. Free space will be dependant on your currently used space in there. So you must not have more occupied already.
Preserving data is done by moving data chunks.
So it's quite some load on your memory chip during that operation.
The Following User Says Thank You to the.gangster For This Useful Post: [ View ] Gift the.gangster Ad-Free
22nd May 2016, 09:17 AM |#36  
JavaScout's Avatar
Senior Member
Thanks Meter: 275
 
More
Thanks, @the.gangster and @Lanchon.

/e

Is there a direct connection between cache and system sizes ?

/e #2

How do you handle partitions that are NOT provided as input?
22nd May 2016, 03:03 PM |#37  
Lanchon's Avatar
OP Senior Member
Thanks Meter: 4,452
 
Donate to Me
More
Quote:
Originally Posted by JavaScout

Thanks, @the.gangster and @Lanchon.

/e

Is there a direct connection between cache and system sizes ?

/e #2

How do you handle partitions that are NOT provided as input?

1) no. cache is mostly unused in recent androids. some devices use cache for stock OTAs, so on those there is. CM and other custom OTAs use the sdcard instead.

2) there are per-device, per-partition defaults. typically SAME, KEEP, and some appropriate file system. this usually means that on unconfigured partitions, the contained file system will be checked, fixed, trimmed, and resized to match partition size minus encryption footer if applicable. they can also be moved to satisfy size changes of other partitions and alignment constraints.
The Following User Says Thank You to Lanchon For This Useful Post: [ View ] Gift Lanchon Ad-Free
23rd May 2016, 11:18 AM |#38  
JavaScout's Avatar
Senior Member
Thanks Meter: 275
 
More
Success!
Quote:
Originally Posted by Lanchon

1) no. cache is mostly unused in recent androids. some devices use cache for stock OTAs, so on those there is. CM and other custom OTAs use the sdcard instead.

2) there are per-device, per-partition defaults. typically SAME, KEEP, and some appropriate file system. this usually means that on unconfigured partitions, the contained file system will be checked, fixed, trimmed, and resized to match partition size minus encryption footer if applicable. they can also be moved to satisfied size changes of other partitions and alignment constraints.

Thanks, Lanchon - it worked almost perfect (had to fire script from /tmp) with the following config:
Code:
-----  DEFAULTS  -----
system = size:same + content:keep + fs:ext4
data = size:same + content:keep + fs:ext4
sdcard = size:same + content:keep + fs:vfat
preload = size:same + content:keep + fs:ext4

info: parsing package name

-----  CONFIGURATION  -----
system = size:1 + content:keep + fs:ext4
data = size:5 + content:keep + fs:ext4
sdcard = size:max + content:keep + fs:ext4
preload = size:min + content:wipe + fs:ext4
However, I got a minor question, please see screenshots.

I've compared the output of "mount", "cat *partitions", "df", "diskinfo app" and it looks like "df" is not equal to the output of "cat * ".

Can you please tell me why is that?
Attached Thumbnails
Click image for larger version

Name:	cat.png
Views:	168
Size:	51.8 KB
ID:	3759643   Click image for larger version

Name:	df.png
Views:	176
Size:	65.2 KB
ID:	3759644   Click image for larger version

Name:	diskinfoApp.png
Views:	174
Size:	57.7 KB
ID:	3759645   Click image for larger version

Name:	mount.png
Views:	156
Size:	94.5 KB
ID:	3759646  
23rd May 2016, 05:56 PM |#39  
Lanchon's Avatar
OP Senior Member
Thanks Meter: 4,452
 
Donate to Me
More
Quote:
Originally Posted by JavaScout

Thanks, Lanchon - it worked almost perfect (had to fire script from /tmp) with the following config:

Code:
-----  DEFAULTS  -----
system = size:same + content:keep + fs:ext4
data = size:same + content:keep + fs:ext4
sdcard = size:same + content:keep + fs:vfat
preload = size:same + content:keep + fs:ext4

info: parsing package name

-----  CONFIGURATION  -----
system = size:1 + content:keep + fs:ext4
data = size:5 + content:keep + fs:ext4
sdcard = size:max + content:keep + fs:ext4
preload = size:min + content:wipe + fs:ext4
However, I got a minor question, please see screenshots.

I've compared the output of "mount", "cat *partitions", "df", "diskinfo app" and it looks like "df" is not equal to the output of "cat * ".

Can you please tell me why is that?

ok so you have a bunch of numbers in those pics. df and proc/* outputs are different because they do different things. please give a concrete example of two numbers that you expected should match.
23rd May 2016, 10:48 PM |#40  
JavaScout's Avatar
Senior Member
Thanks Meter: 275
 
More
Quote:
Originally Posted by Lanchon

ok so you have a bunch of numbers in those pics. df and proc/* outputs are different because they do different things. please give a concrete example of two numbers that you expected should match.

Well, here it is: df shows 4.9G for data, after Repit; and proc/* shows 5242880 blocks, which makes perfect sense (5242880/(1024*1024)=5).
4.9G != 5
24th May 2016, 12:05 AM |#41  
Lanchon's Avatar
OP Senior Member
Thanks Meter: 4,452
 
Donate to Me
More
Quote:
Originally Posted by JavaScout

Well, here it is: df shows 4.9G for data, after Repit; and proc/* shows 5242880 blocks, which makes perfect sense (5242880/(1024*1024)=5).
4.9G != 5

/proc shows you the partition size, which is the 5GiB you configured. df shows you the size of file system within it.

the difference for the case of /data in your device is configured here:
https://github.com/Lanchon/REPIT/blo.../common.sh#L59
and is 16KiB as shown.

this fits android's encryption footer, where newer androids store encryption metadata on older phones. newer phones have a small encryption metadata partition. but to support upgrading older devices and adding encryption without touching the partition table, the footer mechanism was also implemented. if REPIT didn't do this for your particular device, an attempt to encrypt your phone after REPITing would fail.
The Following 2 Users Say Thank You to Lanchon For This Useful Post: [ View ] Gift Lanchon Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes