Thread
:
Sailfish OS (officially) on Sony Xperia devices
View Single Post
alfmar
2017-10-23 , 18:43
Posts: 88 | Thanked: 411 times | Joined on Mar 2010 @ southern Italy
#
1975
Originally Posted by
n950
Hi,
I have only 17,9 GB why?
In the Sony Xperia X the advertised "32 Gb" are actually 29.1 Gb (31.2 billion bytes). And they have the usual baroque Android partitioning scheme (52 partitions, ouch!)
Thus we have:
- 20.7 Gb user partition (root+home, managed by lvm mapper)
- 7.3 Gb factory reset image
- ~1.1 Gb of supplementary partitions that must survive reformatting or even the factory reset (odm Sony drivers, FCC compliance HTML files, bluetooth associations, Android crash monitor, etc: sounds like everytime an Android system developer had some idea, he added a new partition for it).
So we have about 2.5 Gb for sailfish-root and the remaining 18.3 Gb for sailfish-home, as of the "sailfish" volume group of the
lvm
(logical volume manager).
In the last Mer/Sailfish meeting a few days ago they discussed the issue (see
point 5
) but maybe they'll have to strictly stick with Android partitioning because they're not authorized to do anything flashy.
I see the 7.3 Gb "factory reset" partition only contains ~600 megabytes (in the meeting they say "1.5Gb actually used by SailfishX", but AFAIK that's the uncompressed size; also, you could save 100 megabytes if you don't include the
Sailfish_OS_2.0.mp4
file).
I guess we can reclaim about 6.6 Gb of those 7.3 Gb.
For example:
- backup factory reset partition data (~600 Mb ext4) into home
- fdisk: erase factory reset partition /dev/mmcblk0p52 (releasing those 7.3 Gb)
- fdisk: enlarge user partition (mmcblk0p51) from 20.7 Gb to 27.3 Gb (+6.6Gb), for example startsector=2334720 (same as before, doublecheck it) and endsector=59629567
- fdisk: create again /dev/mmcblk0p52 on the remaining ~700 Mb, for example startsector=59629568, endsector=61063167 (same as before)
- format the 700 Mb to ext4 and then restore its contents (SailfishX *img.gz images etc)
- restart the phone in recovery mode
- you now have 27.3 Gb (instead of 20.7) in mmcblk0p51 available to lvm, and the already filled 0.7 Gb in mmcblk0p52
- if the "vgdisplay" command does not show any Free PE blocks, then maybe you should "vgextend sailfish /dev/mmcblk0p51"
- now you should be able to manage the root/home volumes with lvm as suggested by
seiichiro
but enjoying the 27+Gb.
Even if the Sailfish "factory reset" required 1.5Gb instead of 0.6Gb, it would still be a +5.6Gb gain over the default partitioning scheme.
Disclaimer:
I did not try to do it.
Also,
I'm no expert and I don't take responsibility.
There's a chance some residual Android turd lying around could expect the partitioning scheme to not to change (maybe in the boot phase or even in the kernel): you may brick your Xperia soon after having rendered useless the Recovery Mode and the Factory Reset...
__________________
(sources: on github)
Quote & Reply
|
The Following 17 Users Say Thank You to alfmar For This Useful Post:
BluesLee
,
Feathers McGraw
,
hhbbap
,
imaginaryenemy
,
jameson
,
juiceme
,
jurop88
,
MartinK
,
meemorph
,
meloferz
,
mosen
,
mrsellout
,
objectifnul
,
pasko
,
pichlo
,
sbock
,
uber
alfmar
View Public Profile
Send a private message to alfmar
Visit alfmar's homepage!
Find all posts by alfmar