[RECOVERY][xt912]Safestrap 3.75 for unused partitions (/preinstall & /webtop) - Motorola Droid RAZR

This version of SafeStrap is based on SafeStrap 3.75 but has a lot of differences with it:
- there is not more the splashscreen during the boot, to enter in Safestrap you have to select BP Tools in the Boot Mode Selection Menu(VolUp&&VolDown+PowerOn)
- has been added a Safe Rom slot that uses the unused partitions:
/preinstall (~ 600mb) for /system
/webtop (~ 1,4gb) for /data
/cache is shared with the Stock Rom slot
- in this version you have 6 slots: the Stock Rom slot, the Safe Rom slot and the four virtual slots
- the Safe Rom slot is faster than any virtual slot and safer than the Stock Rom slot
If you are using the original Safestrap you can simply install this new version over it and you will still have your roms in the virtual slots.
This version of Safestrap works like any other version of Safestrap and you can use the Stock Rom slot and the four virtual slots as you are usually do, the only thing that is a bit complicated is to install an aosp rom in the new Safe Rom slot that i provided in it.
DOWNLOAD AND GUIDE TO USE THE SAFE ROM SLOT
HOW TO POST REQUEST FOR HELP:
You have to entirely read this thread, I do NOT answer redundant question.
I do not answer to requests for help in private, I have neither the time nor the interest in doing so.
Any doubts, questions or requests must be posted in this thread in order to answer a single time and help everyone.
XDA:DevDB Information
Safestrap 3.75 for unused partitions (/preinstall & /webtop), Tool/Utility for the Motorola Droid RAZR
Contributors
Mentor.37
Version Information
Status: Stable
Created 2015-02-21
Last Updated 2016-01-05

This thread is not about the ramdisks so do not ask about them.
In case of problems you can build the ramdisk as i explained in the main thread.

Waiting to xt910 support... Does this version support lollipop ROMs?

Yes it supports lollipop roms.
As i told in the previous post i need to know the size of the partitions /preinstall and /webtop of the xt910, if they are big enough i will surely build a version for it.

How can I help you with it.. I have the xt910 but I don't know how to get my partitions' sizes
major minor #blocks name alias
7 0 30292 loop0
7 7 4096 loop7
179 0 15564800 mmcblk1
179 1 128 mmcblk1p1
179 2 512 mmcblk1p2
179 3 512 mmcblk1p3
179 4 1 mmcblk1p4
179 5 512 mmcblk1p5
179 6 512 mmcblk1p6
179 7 4096 mmcblk1p7 pds
179 8 512 mmcblk1p8 utags
179 9 1024 mmcblk1p9
179 10 2048 mmcblk1p10
179 11 512 mmcblk1p11
179 12 512 mmcblk1p12
179 13 4096 mmcblk1p13
179 14 8192 mmcblk1p14 boot
179 15 9216 mmcblk1p15 recovery
179 16 217088 mmcblk1p16 cdrom
179 17 512 mmcblk1p17 misc
179 18 512 mmcblk1p18 cid
179 19 4096 mmcblk1p19 kpanic
179 20 793600 mmcblk1p20 system
179 21 737280 mmcblk1p21 cache
179 22 9216 mmcblk1p22 preinstall
179 23 1364992 mmcblk1p23 webtop
179 24 3989504 mmcblk1p24 userdata
179 25 8401792 mmcblk1p25 emstorage
179 26 128 mmcblk1p26
179 32 15630336 mmcblk0
179 33 15626240 mmcblk0p1
254 0 30292 dm-0
There it goes
Based on what you said and what I can see, our preinstall is very much smaller than yours... If understood it right we (XT910 users) have only 9 MB on preinstall partition... :/

You can check their size with:
fdisk -l /dev/block/preinstall
fdisk -l /dev/block/webtop

As I presumed, we have only 9 mb on preinstall partition

Mentor.37 said:
You can check their size with:
fdisk -l /dev/block/preinstall
fdisk -l /dev/block/webtop
Click to expand...
Click to collapse
for xt910 could you still use Web top for data, with system on SD card?
Sent from my XT907 using Tapatalk

I just uploaded a little update that fixes a problem in the layout of the new safe slot menu.
I also saw that this recovery has been downloaded a lot of times in few hours and i'd like to know if everything is ok, in this way i can remove the warning from the second post.

icarome said:
As I presumed, we have only 9 mb on preinstall partition
Click to expand...
Click to collapse
Well, as i suspected, then i can't build a similar version for it, i'm sorry.
Anyway i can tell you that some days ago i built a versione without the splashscreen at boot time for several devices, xt910 included, if interested you can find it here.
sd_shadow said:
for xt910 could you still use Web top for data, with system on SD card?
Sent from my XT907 using Tapatalk
Click to expand...
Click to collapse
Yes i could but as i explained in the op the new safe slot in this version should be supported by the roms' mantainers with the editing of the fixboot.sh and for this i would avoid to create a lot of different versions to leave it the more "standard" possible. I'm afraid.

I used BMM over 2 years and I always tested roms on webtop partition which had 1.2 GB available for apps.I switched to SS just to be able to flash Lollipop.I miss BMM and I say that is still better than SS despite the fact that there is no longer support for it.
Is it possible to make SS like that? How come that XT 912 has bigger partition than XT 910? I thought they are the same phones except the radio...

Yes, me to i used bmm for more than an year on my xt894 and i loved it, for its second system it used this partitions layout:
- a virtual slot in /data/media/virtual/system_1/cache.img for /cache
- /cache for /system_2
- /webtop for /data_2
- /cdrom for /cache_2
and as you can see it did not use the /preinstall partition, at this point i think because on the xt910 /preinstall is very small.
Considering that on the xt894 we had /preinstall ~ 600mb and /webtop ~ 1,4gb i made a patch to change the layout for the second system in this way:
- /preinstall for /system_2
- /webtop for /data_2
- sharing the /cache partition between /system_1 and /system_2
but now bmm is an abandoned project that does not support the metadata and the SeLinux for the lp roms and for this i built this my personal version for the xt894 that installs a second rom in the unused partitions as i did with bmm with my patch and given that the xt912 has the same partitions with the same sizes i built a version also for it.
The xt910 and the xt912 are very similar but not identical, the xt912 is more similar at xt894 than at the xt910.
As i told in some post before you can verify what i'm telling simply checking the size of your partitions with these commands:
fdisk -l /dev/block/preinstall
fdisk -l /dev/block/webtop
I'm sorry.

Mentor.37 said:
Yes, me to i used bmm for more than an year on my xt894 and i loved it, for its second system it used this partitions layout:
- a virtual slot in /data/media/virtual/system_1/cache.img for /cache
- /cache for /system_2
- /webtop for /data_2
- /cdrom for /cache_2
and as you can see it did not use the /preinstall partition, at this point i think because on the xt910 /preinstall is very small.
Considering that on the xt894 we had /preinstall ~ 600mb and /webtop ~ 1,4gb i made a patch to change the layout for the second system in this way:
- /preinstall for /system_2
- /webtop for /data_2
- sharing the /cache partition between /system_1 and /system_2
but now bmm is an abandoned project that does not support the metadata and the SeLinux for the lp roms and for this i built this my personal version for the xt894 that installs a second rom in the unused partitions as i did with bmm with my patch and given that the xt912 has the same partitions with the same sizes i built a version also for it.
The xt910 and the xt912 are very similar but not identical, the xt912 is more similar at xt894 than at the xt910.
As i told in some post before you can verify what i'm telling simply checking the size of your partitions with these commands:
fdisk -l /dev/block/preinstall
fdisk -l /dev/block/webtop
I'm sorry.
Click to expand...
Click to collapse
Ok,here is what I got:
Disk /dev/block/preinstall: 9 MB, 9437184 bytes
4 heads,16 sectors/track,288 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/webtop: 1397 MB
4 heads,16 sectors/track,42656 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Update
Now we have an only Q&A thread shared between the xt894 and the xt912, in this way for me is easier follow the project.
I just uploaded in the download section the new version in which i cleaned the code and i also solved an error in it, now we should have a faster boot. I also updated the main thread with some useful info.

After what you've done I've noticed that I have at least 1,3 GB of useless space on webtop partition, so I decided to know more about this stuff and noticed that I can manually mount this partition and use this unused space. Now I just wish to know how can I automatically do it at every boot... I've created a mountpoint (a empty folder) on internal storage and mount webtop on it with this comand: mount -t vfat /dev/block/webtop /sdcard/extra it works like charm, but I didn't manage to do automatically, can you help me? Or anyone else?

You can put in /system/etc/init.d a script with permission 755 like this:
Code:
#!/system/bin/sh
mount -o rw,remount /
mkdir /storage/extra
mount -o ro,remount /
mount -t ext4 /dev/block/webtop /storage/extra
chmod 777 /storage/extra

Mentor.37 said:
You can put in /system/etc/init.d a script with permission 755 like this:
Code:
#!/system/bin/sh
mount -o rw,remount /
mkdir /storage/extra
mount -o ro,remount /
mount -t ext4 /dev/block/webtop /storage/extra
chmod 777 /storage/extra
Click to expand...
Click to collapse
Man thnx 4 this one! Now I can get rid off ScriptManager =)
by the way blkid shows that webtop's fs is ext3:
# blkid /dev/block/webtop
/dev/block/webtop: UUID="b564fc60-1780-4452-bbbf-5784b5833de9" TYPE="ext3"
Click to expand...
Click to collapse

I have cid deleted and im currently using bmm. And dats cos while i was using safestrap tho it can bypass cid bt my problem was dat my fone dosent charge while its off unlike bmm. Any fix for dis

Murphyung said:
I have cid deleted and im currently using bmm. And dats cos while i was using safestrap tho it can bypass cid bt my problem was dat my fone dosent charge while its off unlike bmm. Any fix for dis
Click to expand...
Click to collapse
Charging when off, that was the reason why I've switched to BMM from older version of SafeStrap. Which means it's impossible to calibrate battery. And that's what I was affraid when decide to take a try on early builds of CM12. So I've switched to not this but original SafeStrap 3.75.
Well in that version my phone does charge when off.

Eta for xt910 support?

Related

[Q] ADB Shell help?

As I posted previously about flashing issues and errors which came up with my device I've learned that my partitions were corrupted and nearly all were erased. With some help from developer Mev and other members I was able to get my device working with ADB shell yet the commands seemed to be far out of my lead.
I have an YP-G70 USA (8 Gigs) device.
From what I learned this is the partition to the device, yet the start/ending blocks aren't listed. Would that be a problem?
Code:
Device Size (KiB) Mount Name Notes
/dev/block/mmcblk0 7757824 Internal eMMC disk device
/dev/block/mmcblk0p1 1 Extended partition containing everything else
/dev/block/mmcblk0p5 256 boot.bin Initial+Primary Bootloaders
/dev/block/mmcblk0p6 256 YPG70_8G-0304.pit Partition Information Table
/dev/block/mmcblk0p7 1280 Sbl.bin Secondary Bootloader
/dev/block/mmcblk0p8 1280 Sbl.bin SBL backup
/dev/block/mmcblk0p9 5120 /mnt/.lfs param.lfs param.blk and boot logos - source of recovery loops
/dev/block/mmcblk0p10 10240 /efs efs.rfs WiFi and BT MAC addresses - causes missing lockscreen
/dev/block/mmcblk0p11 7680 zImage Kernel
/dev/block/mmcblk0p12 7680 zImage "Recovery" kernel that is never used
/dev/block/mmcblk0p13 296960 /system factoryfs.rfs System partition
/dev/block/mmcblk0p14 137216 /dbdata dbdata.rfs Various Android/app databases
/dev/block/mmcblk0p15 65536 /cache cache.rfs Cache partition
/dev/block/mmcblk0p16 1970176 /data datafs.rfs Data partition (apps and their data)
/dev/block/mmcblk0p17 5252096 /sdcard userfs_8G.rfs "Emmc" "Usb Storage" - where your media goes
/dev/block/mmcblk1 <varies> External SD Card disk device
/dev/block/mmcblk1p1 <varies> /sdcard/external_sd External SD Card partition
Next thing is, whenever I tried using
Code:
fdisk /dev/block/mmcblk0
and later on creating a prime partition within the settings that I try to use the "e" to extend (says nothing about "l" for logical) which I run out of sectors to create them with. And sadly the only ones that ever come up is mmcblk0p4 or mmcblk0p3.
Just looking for help to get my player back up and running .. it's all I have and use at work since I don't have a phone and really have been trying to get this to work but its difficult so im sorry for bothering..
I don't know what to do after this:
Jistropy said:
As I posted previously about flashing issues and errors which came up with my device I've learned that my partitions were corrupted and nearly all were erased. With some help from developer Mev and other members I was able to get my device working with ADB shell yet the commands seemed to be far out of my lead.
I have an YP-G70 USA (8 Gigs) device.
From what I learned this is the partition to the device, yet the start/ending blocks aren't listed. Would that be a problem?
Code:
Device Size (KiB) Mount Name Notes
/dev/block/mmcblk0 7757824 Internal eMMC disk device
/dev/block/mmcblk0p1 1 Extended partition containing everything else
/dev/block/mmcblk0p5 256 boot.bin Initial+Primary Bootloaders
/dev/block/mmcblk0p6 256 YPG70_8G-0304.pit Partition Information Table
/dev/block/mmcblk0p7 1280 Sbl.bin Secondary Bootloader
/dev/block/mmcblk0p8 1280 Sbl.bin SBL backup
/dev/block/mmcblk0p9 5120 /mnt/.lfs param.lfs param.blk and boot logos - source of recovery loops
/dev/block/mmcblk0p10 10240 /efs efs.rfs WiFi and BT MAC addresses - causes missing lockscreen
/dev/block/mmcblk0p11 7680 zImage Kernel
/dev/block/mmcblk0p12 7680 zImage "Recovery" kernel that is never used
/dev/block/mmcblk0p13 296960 /system factoryfs.rfs System partition
/dev/block/mmcblk0p14 137216 /dbdata dbdata.rfs Various Android/app databases
/dev/block/mmcblk0p15 65536 /cache cache.rfs Cache partition
/dev/block/mmcblk0p16 1970176 /data datafs.rfs Data partition (apps and their data)
/dev/block/mmcblk0p17 5252096 /sdcard userfs_8G.rfs "Emmc" "Usb Storage" - where your media goes
/dev/block/mmcblk1 <varies> External SD Card disk device
/dev/block/mmcblk1p1 <varies> /sdcard/external_sd External SD Card partition
Next thing is, whenever I tried using
Code:
fdisk /dev/block/mmcblk0
and later on creating a prime partition within the settings that I try to use the "e" to extend (says nothing about "l" for logical) which I run out of sectors to create them with. And sadly the only ones that ever come up is mmcblk0p4 or mmcblk0p3.
Just looking for help to get my player back up and running .. it's all I have and use at work since I don't have a phone and really have been trying to get this to work but its difficult so im sorry for bothering..
I don't know what to do after this:
Click to expand...
Click to collapse
You should have created that as an extended partition, not primary. Then go through and create new partitions "n"
I apologize for not giving you quite the right information. I know there's a table here with starting and ending blocks.
For illustration, here's an example of what to enter at the prompts. IGNORE THE BLOCK NUMBERS - it's just an illustration; just notice the extended/logical and the partition numbers.
Code:
[[email protected] ~]$ fdisk mmcblk0
Welcome to fdisk (util-linux 2.22.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xab3ebd8d.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): e
Partition number (1-4, default 1):
Using default value 1
First sector (2048-102399, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-102399, default 102399):
Using default value 102399
Partition 1 of type Extended and of size 49 MiB is set
Command (m for help): p
Disk mmcblk0: 52 MB, 52428800 bytes, 102400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xab3ebd8d
Device Boot Start End Blocks Id System
mmcblk0p1 2048 102399 50176 5 Extended
Command (m for help): n
Partition type:
p primary (0 primary, 1 extended, 3 free)
l logical (numbered from 5)
Select (default p): l
Adding logical partition 5
First sector (4096-102399, default 4096):
Using default value 4096
Last sector, +sectors or +size{K,M,G} (4096-102399, default 102399): 16383
Partition 5 of type Linux and of size 6 MiB is set
Command (m for help): p
Disk mmcblk0: 52 MB, 52428800 bytes, 102400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xab3ebd8d
Device Boot Start End Blocks Id System
mmcblk0p1 2048 102399 50176 5 Extended
mmcblk0p5 4096 16383 6144 83 Linux
Command (m for help): n
Partition type:
p primary (0 primary, 1 extended, 3 free)
l logical (numbered from 5)
Select (default p): l
Adding logical partition 6
First sector (18432-102399, default 18432):
Using default value 18432
Last sector, +sectors or +size{K,M,G} (18432-102399, default 102399):
Using default value 102399
Partition 6 of type Linux and of size 41 MiB is set
Command (m for help): p
Disk mmcblk0: 52 MB, 52428800 bytes, 102400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xab3ebd8d
Device Boot Start End Blocks Id System
mmcblk0p1 2048 102399 50176 5 Extended
mmcblk0p5 4096 16383 6144 83 Linux
mmcblk0p6 18432 102399 41984 83 Linux
Command (m for help): w
The partition table has been altered!
Syncing disks.
[[email protected] ~]$
Awe man thank you!! Going to try this out right now I felt bad for messaging you.
Give me like 15 minutes.
Those cover three of the partitions, how do I go about making the rest?
Jistropy said:
Awe man thank you!! Going to try this out right now I felt bad for messaging you.
Give me like 15 minutes.
Those cover three of the partitions, how do I go about making the rest?
Click to expand...
Click to collapse
Just keep going:
Code:
n (new)
l (logical)
<enter> (beginning)
+blocks (size)
and then
Code:
p (print)
to check your work, and
Code:
w (write)
to save changes and exit.
The Block sizes don't matter right?
Jistropy said:
The Block sizes don't matter right?
Click to expand...
Click to collapse
They matter very much. Use the ones from the device. The above was to illustrate the process. It has entirely wrong numbers.
I will have to repeat this process after doing the extended partition:
Code:
Command (m for help): n
Partition type:
p primary (0 primary, 1 extended, 3 free)
l logical (numbered from 5)
Select (default p): l
So what do I do with these?
Code:
First sector (18432-102399, default 18432):
Using default value 18432 (DONT FILL ?)
Last sector, +sectors or +size{K,M,G} (18432-102399, default 102399):
Using default value 102399 (DONT FILL ?)
Should I fill in those with this?
Code:
Device Size (KiB) Mount
/dev/block/mmcblk0 7757824
/dev/block/mmcblk0p1 1
/dev/block/mmcblk0p5 256
/dev/block/mmcblk0p6 256
/dev/block/mmcblk0p7 1280
/dev/block/mmcblk0p8 1280
/dev/block/mmcblk0p9 5120
/dev/block/mmcblk0p10 10240
/dev/block/mmcblk0p11 7680
/dev/block/mmcblk0p12 7680
/dev/block/mmcblk0p13 296960
/dev/block/mmcblk0p14 137216
/dev/block/mmcblk0p15 65536
/dev/block/mmcblk0p16 1970176
/dev/block/mmcblk0p17 5252096
/dev/block/mmcblk1 <varies>
/dev/block/mmcblk1p1 <varies>
Also, how do I do the last two? Just testing things I don't have the numbers so im randomly copying and pasting the number sets.
Jistropy said:
I will have to repeat this process after doing the extended partition:
Code:
Command (m for help): n
Partition type:
p primary (0 primary, 1 extended, 3 free)
l logical (numbered from 5)
Select (default p): l
So what do I do with these?
Code:
First sector (18432-102399, default 18432):
Using default value 18432 (DONT FILL ?)
Last sector, +sectors or +size{K,M,G} (18432-102399, default 102399):
Using default value 102399 (DONT FILL ?)
Should I fill in those with this?
Code:
Device Size (KiB) Mount
/dev/block/mmcblk0 7757824
/dev/block/mmcblk0p1 1
/dev/block/mmcblk0p5 256
/dev/block/mmcblk0p6 256
/dev/block/mmcblk0p7 1280
/dev/block/mmcblk0p8 1280
/dev/block/mmcblk0p9 5120
/dev/block/mmcblk0p10 10240
/dev/block/mmcblk0p11 7680
/dev/block/mmcblk0p12 7680
/dev/block/mmcblk0p13 296960
/dev/block/mmcblk0p14 137216
/dev/block/mmcblk0p15 65536
/dev/block/mmcblk0p16 1970176
/dev/block/mmcblk0p17 5252096
/dev/block/mmcblk1 <varies>
/dev/block/mmcblk1p1 <varies>
Also, how do I do the last two? Just testing things I don't have the numbers so im randomly copying and pasting the number sets.
Click to expand...
Click to collapse
PLEASE have a look around....
http://forum.xda-developers.com/showthread.php?t=1523682
the numbers you want are here within ^post n°8. (value is Kb) and in many other posts!
The last partition n°17, should and must have only some 5gb because your device is 8 gb. Take care to set fdisk with the proper set up between blocks and Bytes and in case of error don't panic, just trail again .
Good luck
sorry lolo9393
Jistropy said:
Okay, rude much?
Your no help, that's for: "CORRECT partition sizes (for 16GB model!):"
As I said above, I have a 8 GIG USA YP-G70.
If your gonna post, maybe you should read more clearly.
Click to expand...
Click to collapse
You follow the table until partition 17 that will show only some "5252096" kb remaining if entered numbers are correct, because you have a 8 Gb device.
I tried to help you with what I know, sorry for my bad english..
Jistropy said:
Okay, rude much?
Your no help, that's for: "CORRECT partition sizes (for 16GB model!):"
As I said above, I have a 8 GIG USA YP-G70.
If your gonna post, maybe you should read more clearly.
Click to expand...
Click to collapse
Please listen th his help. He knows more about it than I do.
i apologize but no matter how i insert those numbers they never come out close
I got up to block 16 but it says i over pass the cylendars
Code:
/dev/block/mmcblk0p16 64181 313396 1993728 83 Linux
/dev/block/mmcblk0p17 313401 1937720 12994560 83 Linux
What do I set for 17 as well?
I can't get the tables to add up to what u got so i copied the start and ending for each.
Stuck on 16/17 need some help.
Edit --
I was able to flash stock! But i get a bunch of errors about opening cache and mounting.
rfs format failed on /dev/block/mmcblk0p15
Jistropy said:
I got up to block 16 but it says i over pass the cylendars
Code:
/dev/block/mmcblk0p16 64181 313396 1993728 83 Linux
/dev/block/mmcblk0p17 313401 1937720 12994560 83 Linux
What do I set for 17 as well?
I can't get the tables to add up to what u got so i copied the start and ending for each.
Stuck on 16/17 need some help.
Edit --
I was able to flash stock! But i get a bunch of errors about opening cache and mounting.
rfs format failed on /dev/block/mmcblk0p15
Click to expand...
Click to collapse
Yes, you were able to flash but your device is still useless because partition 16 and 17 are wrongly built.
may be you entered the right numbers but resulting in wrong recording , check your print (p) attached.
It is perfect until partition 16 beginning..
.Now just delete and rewrite 16 and 17th. (end n°17 by +k instruction will fill the gap and give you the right number or enter 242432 blocks as follow .
Vdev/block/mmcblk0p17 313401 242432 ........... result dotted should give some 5252096 kb.
Then write and print again in order to check your good work and at this point your next flashing will be good! (may be a wipe cache to be sure and avoid bootloop)
other suggestion is you come to my home tomorrow morning in order I arrange that for you!!!!
Cheers
It is perfect until partition 16 beginning..
.Now just delete and rewrite 16 and 17th. (end n°17 by +k instruction will fill the gap and give you the right number or enter 242432 blocks as follow .
Vdev/block/mmcblk0p17 313401 242432 ........... result dotted should give some 5252096 kb.
Then write and print again in order to check your good work and at this point your next flashing will be good! (may be a wipe cache to be sure and avoid bootloop)
Click to expand...
Click to collapse
What do I put for 0p16 then? Sorry I'm making sure i dont mess up
Tried following the same 16 and it went through however for block 17 the number value is too high
Jistropy said:
What do I put for 0p16 then? Sorry I'm making sure i dont mess up
Tried following the same 16 and it went through however for block 17 the number value is too high
Click to expand...
Click to collapse
Quick because it is lunch time here...
P16 is the same as in the 16gb table.
/dev/block/mmcblk0p16 64181 313396 1993728 83 Linux
ok ,got it?
No risk you mess the device, only take care to verify what is done by (p) print instruction and check the written table.
it doesnt allow me to set that value.. im sorry
Jistropy said:
it doesnt allow me to set that value.. im sorry
Click to expand...
Click to collapse
Did you delete the partition before rewriting it?
Should work because you have enough numbers of blocks to fill as said.
If no success do as follow:
delete p16 and 17, then do a write and post the result you get.
here: (I dont have enough space for every 16, or 17)
but im glad you've gotten me this far.
Jistropy said:
here: (I dont have enough space for every 16, or 17)
but im glad you've gotten me this far.
Click to expand...
Click to collapse
Sorry i didn't check it first but you are 4 heads mode (read line 2 of your print) that explain wy your lack of blocks.
You shoud reset fdisk in secondary menu to 1 head like following example
1 heads, 16 sectors/track,
Units = cylinders of 16 * 512 = 8192 bytes
I have no means to open fdisk from here to guide you, but it is easy to find once understood.
I come back in 3 hours time and if you still have pb I'll check for more guidance.
OK?
ADD;
How to change heads number?
select (h) to change number of heads in expert menu (m)
(now you are the "expert") you should get some 970 000 cylinders to split.
For more details:
http://linux.omnipotent.net/article.php?article_id=6979
doing this will allow you to successfully complete your memory table. great!

[Q] How to permanently downgrade Google Maps?

I want to downgrade my rom-based google maps (v. 7.x) to 6.14.4. I have downloaded the apk file for 6.14.4 and I can install it without trouble. But when I reboot the phone, the rom-based google maps is the only one present. Currently, I install 6.14.4 after each reboot, but that seems silly. It is not autoupdating from Google Play because Google Play offers an updated v7.x (and autoupdate is turned off).
I am thinking the I have to erase google maps som /system (being root) and then install a the old google maps (and possibly move it to /system). Is that the only way?
galmok said:
I want to downgrade my rom-based google maps (v. 7.x) to 6.14.4. I have downloaded the apk file for 6.14.4 and I can install it without trouble. But when I reboot the phone, the rom-based google maps is the only one present. Currently, I install 6.14.4 after each reboot, but that seems silly. It is not autoupdating from Google Play because Google Play offers an updated v7.x (and autoupdate is turned off).
I am thinking the I have to erase google maps som /system (being root) and then install a the old google maps (and possibly move it to /system). Is that the only way?
Click to expand...
Click to collapse
yep that is your best choice coz each time you reboot the system app is shown.
Use titanium backup to backup the app incase something happens and uninstall it and move your desired version to system app folder and check permissions
machokingjim said:
yep that is your best choice coz each time you reboot the system app is shown.
Use titanium backup to backup the app incase something happens and uninstall it and move your desired version to system app folder and check permissions
Click to expand...
Click to collapse
Thanks. I'll do that.
But when I checked /system/app, I saw many (not all) files that were linked to /preload like this:
ls -l /system/app/YouTube.apk
lrw-r--r-- root root 2013-09-25 11:29 YouTube.apk -> /preload/symlink/system/app/YouTube.apk
Checking /preload I see this:
mount | grep preload
/dev/block/mmcblk0p12 /preload ext4 ro,nosuid,nodev,noatime,barrier=1,data=ordered 0 0
/preload is another partition on the internal memory.
[email protected]:/system/app # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 30777344 sectors, 29.3M
Logical sector size: 512
Disk identifier (GUID): 52444e41-494f-2044-4d4d-43204449534b
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 30775262
Number Start (sector) End (sector) Size Code Name
1 8192 49151 40960 0700 EFS
2 49152 51711 2560 0700 SBL1
3 53248 55807 2560 0700 SBL2
4 57344 73727 16384 0700 PARAM
5 73728 90111 16384 0700 KERNEL
6 90112 106495 16384 0700 RECOVERY
7 106496 311295 200K 0700 CACHE
8 311296 344063 32768 0700 MODEM
9 344064 1392639 1024K 0700 FACTORYFS
10 1392640 5586943 4096K 0700 DATAFS
11 5586944 29720575 23.0M 0700 UMS
12 29720576 30769151 1024K 0700 HIDDEN
p12 is 0.5GB, just like /system (that is p9).
Does anyone know if it is safe to modify /preload (p12)? It has more free space than /system:
df /system /preload
Filesystem Size Used Free Blksize
/system 503M 474M 29.0M 4096
/preload 503M 403M 100M 4096
It is confusing why Samsung has decided to split the files over so many partitions. It really limits the usability of the phone.

[U] [GB+JB] Repartitioning guide

Thanks to @munjeni for tipping me off in the right direction and to @judas1977 + @Tesla-MADAL93 for having done this on the Ace 2 I come from ~~
Everything else in this post applies to Gingerbread, scroll down to the 5th message for a more clear guide centered around a 4.1.2 ROM.
This is my annotated diary about the last 2 hours, I'm sorry if the story feels a little bit Dadaist but I don't want to encourage people who don't feel ready to try it, so please read all of it first and if anything is unclear ask instead of doing!!
I installed Busybox 1.22.1 (iirc) and replaced the default shell with bash (install Bash-X from market, copy /S/xbin/bash over /S/bin/sh, remove app if you like to). All of this was done with Gingerbread .188 and CWM 5.5.0.4 from Supercharged kernel.
Original partition table, with names added:
[email protected]:~$ adb shell
Code:
sh-4.2# fdisk -u -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
4 heads, 16 sectors/track, 242432 cylinders, total 15515648 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 2047 1023+ 0 Empty #### TA ("Trim Area") IMEI, BL UNLOCK, SIMLOCK ETC -- DO NOT TOUCH
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 2304 3327 512 f0 Linux/PA-RISC boot #### SBL? Mem-init? Power management? PARAM?
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 2048 2303 128 f0 Linux/PA-RISC boot #### unknown, as above
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 3328 15269887 7633280 5 Extended #### GROUPS ALL FOLLOWING PARTITIONS FOR THEM TO FIT INTO THE 4-PARTS MBR SCHEME
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 4096 20479 8192 4a Unknown #### another of the 4 unclear partitions
/dev/block/mmcblk0p6 20480 26623 3072 83 Linux #### MODEMFS (Samsung's "EFS") RADIO CALIBRATION
/dev/block/mmcblk0p7 26624 36863 5120 70 Unknown #### no idea either
/dev/block/mmcblk0p8 36864 53247 8192 83 Linux #### IDD (apparently related to usage stats reporting)
/dev/block/mmcblk0p9 53248 86015 16384 48 Unknown #### KERNEL
/dev/block/mmcblk0p10 118784 2215935 1048576 83 Linux #### SYSTEM
/dev/block/mmcblk0p11 2727936 6922239 2097152 83 Linux #### DATAFS
/dev/block/mmcblk0p12 2215936 2727935 256000 83 Linux #### CACHEFS
/dev/block/mmcblk0p13 86016 118783 16384 48 Unknown #### FOTAKERNEL?
/dev/block/mmcblk0p14 6922240 15269887 4173824 c Win95 FAT32 (LBA) #### SDCARD/EMMC/UMS
Partition table entries are not in disk order
so let's rearrange this list for easier thinking & reading
Code:
/dev/block/mmcblk0p1 1 2047 1023+ TA
/dev/block/mmcblk0p3 2048 2303 128 ?
/dev/block/mmcblk0p2 2304 3327 512 ?
/dev/block/mmcblk0p5 4096 20479 8192 ?
/dev/block/mmcblk0p6 20480 26623 3072 MODEMFS
/dev/block/mmcblk0p7 26624 36863 5120 ?
/dev/block/mmcblk0p8 36864 53247 8192 IDD
/dev/block/mmcblk0p9 53248 86015 16384 KERNEL
/dev/block/mmcblk0p13 86016 118783 16384 FOTAKERNEL?
/dev/block/mmcblk0p10 118784 2215935 1048576 SYSTEM
/dev/block/mmcblk0p12 2215936 2727935 256000 CACHEFS
/dev/block/mmcblk0p11 2727936 6922239 2097152 DATAFS
/dev/block/mmcblk0p14 6922240 15269887 4173824 SDCARD
great, the important (for us) stuff is contiguous so we can delete those partitions and recreate them
(if fdisk works like parted we must do that in numerical order, so system>data>cache>ums)
we must delete and recreate partition 13 with the same sizes
OTOH fdisk lets us experiment without saving in real time (!!!) but let's do this in recovery mode
Let's research the sizes we want first -- I find Link2SD's graphical df the best way to do this (see photo 1)
so 540 MB for /system should be enough (I have 454M used, account a safety margin as I integrate updates + FS overhead + 1000 vs 1024 units)
4,14 MB used on /cache... 7,8 MB should be more than enough (same size I used on my Ace 2 which had about 5 MB used there)
this large size is for dalvik cache on ROMs that store it there (vm.dalvik.dexopt-data-only=0 and vm.dalvik.dexopt-cache-only=1 or something)
494 MB on /data, but I'd probably want to change apps and stuff... let's try with 1,25 GB
but if we remove /system we'll have to reflash the rom from a zip, which I'd need to make...
let's leave that partition alone for this first time
reboot now
Click to expand...
Click to collapse
Launching fdisk:
#### SONY
#### SONY (red green blue lightbar)
#### + button
#### CWM-based recovery v5.5.0.4
[email protected]:~$ adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
#### No shell in ramdisk? Very lame...
#### [Mounts and storage]
#### [Mount /system, unmount everything else]
[email protected]:~$ adb shell
sh-4.2# fdisk -u /dev/block/mmcblk0
Command (m for help):
What I did in fdisk:
u #### change units to sectors
d #### delete
14
d
13
d
12
d
11
c #### disable cylinder rounding
n #### new
l #### logical partition
First sector (3334-15269887, default 3334): 2215936
Sector 2215936 is already allocated #### Apparently this version of fdisk makes you waste a sector...
First sector (2215937-15269887, default 2215937): Using default value 2215937
Last sector or +size or +sizeM or +sizeK (2215937-15269887, default 15269887): +1600M
#### CACHEFS:
n
l
First sector (3334-15269887, default 3334): 5340938
Sector 5340938 is already allocated
First sector (5340939-15269887, default 5340939): Using default value 5340939
Last sector or +size or +sizeM or +sizeK (5340939-15269887, default 15269887): +8M
#### FOTAKERNEL
n
l
First sector (3334-15269887, default 3334): 86016
Sector 86016 is already allocated
First sector (86017-15269887, default 86017): Using default value 86017
Last sector or +size or +sizeM or +sizeK (86017-118783, default 118783): Using default value 118783
t
Partition number (1-14): 13
Hex code (type L to list codes): 48
Changed system type of partition 13 to 48 (Unknown)
#### USB STORAGE
n
l
First sector (3334-15269887, default 3334): 5356564
Sector 5356564 is already allocated
First sector (5356566-15269887, default 5356566): Using default value 5356566
Last sector or +size or +sizeM or +sizeK (5356566-15269887, default 15269887): Using default value 15269887
c
Partition number (1-14): 14
Hex code (type L to list codes): c
Changed system type of partition 14 to c (W95 FAT32 LBA)
w
The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy
sh-4.2# reboot
Now enter CWM again and factory reset -- you'll get an error as it can't delete /sdcard/.android_secure as it's unformatted
(and for that matter this CWM can't format /sdcard either...)
No problem apart from skipped heartbeats, boot into Android and format it from the settings! (see photo 2)
Well, the last screenshot speaks for itself... but I'll repeat, don't try this at home! (Have a friend try it so you'll have someone to blame if it gets bricked)
Very interesting... It causes problems?
Inviato dal mio ST25i utilizzando Tapatalk
ale467 said:
Very interesting... It causes problems?
Click to expand...
Click to collapse
Unlike my example, you must have over 50M free on /cache (at least in Gingerbread) or cheat by bind-mounting it somewhere else... or give up on directly installing stuff from the market
I tried bind mounting /cache to /data/local/tmp/cache but Google Play is still broken, so I guess you'll want a 57M partition there...
Also, you can always return to stock layout by flashing a full ROM in green light download mode, then wiping /sdcard from settings
I'm going to update this for 4.1, it's even somewhat easier and more predictable
----------------
1: think of the rough partition sizes
Code:
system (350M)
data (1,5G)
cache (280M) ## keep in mind whether ROM uses this for dalvik-cache and at least in 2.x Google Play downloads there
sdcard (remaining space)
2: make sure you have some files ready
→ROM in recovery zip format
→Backup of everything you want
→Kernel with fdisk in ramdisk
→ADB known working in recovery and normal mode
→Fixed busybox (http://forum.xda-developers.com/attachment.php?attachmentid=1057725&d=1336884034)
3: enter recovery and dump partition table (adb shell, fdisk /dev/block/mmcblk0, p)
Unlike my previous experiment, I'll calculate sizes in cylinders -- harder but fdisk appears to work better that way
Code:
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
4 heads, 16 sectors/track, 242432 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
[...]
/dev/block/mmcblk0p10 1857 34624 1048576 83 Linux #SYSTEM
/dev/block/mmcblk0p11 42625 108160 2097152 83 Linux #DATAFS
/dev/block/mmcblk0p12 34625 42624 256000 83 Linux #CACHEFS
/dev/block/mmcblk0p13 1345 1856 16384 48 Unknown #FOTAKERNEL, move this on another line if it helps you think better but put it back there after calculations
/dev/block/mmcblk0p14 108161 238592 4173824 c Win95 FAT32 #UMS
so our work area starts at cylinder 1857 and ends at 238592!
4: calculate partition sizes (I'll only list start & end cylinders for clarity)
Code:
/dev/block/mmcblk0p10 1857 12538 << 1857 + (350000000÷32768)
/dev/block/mmcblk0p11 12538+1 >> 12539 58315 << 12539+(1500000000÷32768)
/dev/block/mmcblk0p12 58315+1 >> 58316 66861 << 58316 +(280000000÷32768)
/dev/block/mmcblk0p13 1345 1856
/dev/block/mmcblk0p14 66861+1 >> 66862 238592
5: remove partitions (d, 14, d, 13, ..., 10)
6: create partitions (n, l, 1857, 12538, repeat for next row)
7: retype partitions (t, 13, 48, t, 14, c)
8: save changes (w, reboot) - enter recovery again, you should get 5 "E: Can't {mount|open} /cache/[...]" lines
9: go to mounts and storage and run all 4 formats, sdcard will probably fail -- if it doesn't skip to step 13
10: install fixed busybox (adb push '/home/riki/Desktop/busybox' /cache/)
11: enter adb shell, make it executable (chmod +x /cache/busybox)
12: format media partition (/cache/busybox mkfs.vfat /dev/block/mmcblk0p14)
13: quit shell, mount /sdcard in CWM
14: adb push your ROM to /sdcard, install it and reboot!
This is so interesting, I've being doing this on a Samsung Galaxy SCL to fix it as its internal storage and /data partition were totally corrupted. I used parted instead of fdisk to repartition the external SD and edit then kernel's RAM disk to make it mount /data in one of the new partitions. Because of this that I've been doing lately, I'm thinking of using fdisk in my Xperia U too to have more available space in internal SD, that would be great, as I use dual boot feature.
I think I'll do this when I'm be fed up of Jelly Bean being the main ROM and KitKat just the secondary one.
By the way, I think it can be possible to leave enough free space before mmcblk0p14 to create my secondary ROM's partitions there (mmcblk0p15 for /system, mmcblk0p16 for /data and mmcblk0p17 for /cache) instead of creating system.ext4, data.ext4 and cache.ext4 inside my internal SD and mounting them in loop devices... What do you think? Could I brick my phone doing that? I've asked here too just in case.
The only thing I'd have to do is to format my mmcblk0p15 using mke2fs to set the same UUID as in mmcblk0p10 just if my secondary ROM doesn't boot (but I think this wouldn't be necessary):
Code:
mke2fs -T ext4 -O has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -U [COLOR="Silver"][mmcblk0p10's UUID][/COLOR] -I 256 /dev/block/mmcblk0p15
You've explained this how-to so well, @Ryccardo! Thanks for this tutorial.
Many, many thanks to you, sir!
Thanks to you i was able to increase data partition on my P (similar partition scheme to U).
Other tutorials weren't so useful than yours and i was searching quite a lot. Thank you, live in wealth!

[Q] Partitioning the internal memory

Hi,
I'm trying to figure out the partitioning on my phone (Acer E2 V370).
With fdisk I have this layout
Code:
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 65 64 2147483647+ 5 Extended
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 1665 2944 10240 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 2945 4224 10240 83 Linux
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 5825 6592 6144 83 Linux
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 8385 110784 819200 83 Linux
/dev/block/mmcblk0p6 257985 64 2145420287+ 83 Linux
This doesn't make a lot of sense. 2145420287 blocks means 1039.something Gigabytes ?
Using parted for my SDCard gives me neatly two partitions with their respective sizes and fstype,
but using it on my internal memory, gives me errors, stating that the partitions can't be outside the disk.
This necessarily doesn't mean anything's wrong though, the phone (used to) boot(s) just fine,
and I noticed other people getting the same error message because they gparted the internal memory by accident
What actually went wrong, is that I reformatted the internal sdcard with ext3 using gparted while my phone was connected by UMS.
Since then it won't mount in android or on my linux box.
The reason I wanted to do this, is to use that internal storage as the location for link2sd.
I accidently wiped pretty much everything on my SD-Card (32Gb)
and the backup from my previous ROM (4.2.2) doesn't restore properly,
so nothing more can go wrong.
I can always repush the images back onto the phone using fastboot, right ?
Can anyone help me out, maybe by posting the results of fdisk -l /dev/block/mmcblk0 ?
oneindelijk said:
Can anyone help me out, maybe by posting the results of fdisk -l /dev/block/mmcblk0 ?
Click to expand...
Click to collapse
Code:
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 5 757760 6062048 c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 757761 1003520 1966080 c Win95 FAT32 (LBA)
Partition 2 does not end on cylinder boundary
kalpetros said:
Code:
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 5 757760 6062048 c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 757761 1003520 1966080 c Win95 FAT32 (LBA)
Partition 2 does not end on cylinder boundary
Click to expand...
Click to collapse
Thanks !
That looks like your sdcard is on mmcblkp0, like I've seen with other devices.
Which device is this ?
It's a Galaxy S I9000.
mmcblk0p8
Hi,
I'm still trying to figure out this whole partition-mess.
I've found out by using parted on each partition in mmcblk0
that mmcblk0p8 is about 1.7 Gb.
This is the partition I'm looking for, but why is fdisk /dev/mmcblk0 only showing 6
(And parted is just throwing an error, because the boundaries are out of bounds...)
Is there a way to make a full backup of my whole device, so I can restore it when messing up ?
(Perhaps dd each partition and the bootsector somehow ?)
oneindelijk said:
Hi,
I'm still trying to figure out this whole partition-mess.
I've found out by using parted on each partition in mmcblk0
that mmcblk0p8 is about 1.7 Gb.
This is the partition I'm looking for, but why is fdisk /dev/mmcblk0 only showing 6
(And parted is just throwing an error, because the boundaries are out of bounds...)
Is there a way to make a full backup of my whole device, so I can restore it when messing up ?
(Perhaps dd each partition and the bootsector somehow ?)
Click to expand...
Click to collapse
Yes you can use the recovery (CWM) to backup your device.
CWM
kalpetros said:
Yes you can use the recovery (CWM) to backup your device.
Click to expand...
Click to collapse
Or TWRP is just as well I suppose ?
I already make several backups, but will these store the size of the partitions as well ?
oneindelijk said:
Or TWRP is just as well I suppose ?
I already make several backups, but will these store the size of the partitions as well ?
Click to expand...
Click to collapse
Yes the size of the partition will be stored.
You can use TWRP too.

[HOWTO][GUIDE][Mi3][Mi4]Resize/extend system partition capacity

Disclaimer: I am not responsible for bricked devices, obviously
Unlike most people here, I do not find the "dual-boot" feature particularly useful due to its buggyness and quirky configuration plus it made the available space for the /system partition divided, leaving only 600++ MB for each system1 and system2. This guide is using CWM v6.0.5.1 (R11) by furniel and donbo.
Prerequisites:
CWM Recovery V6.0.5.1
a Mi 3w (probably doable for the Mi 4 too)
ADB drivers installed
Not necessary, but do back up system1 if you wish to conserve your current ROM and config.
As parted cannot resize partitions, /system (system1) and /system1 (system2) partitions will have to be removed and re-created with the desired size, this is why backing up system1 is favourable.
Reboot to recovery and connect your phone
Open a cmd window (or terminal, if you're using linux), and connect through adb by typing;
Code:
adb devices
adb shell
If everything is fine and you get a shell input (#), start parted by typing;
Code:
parted /dev/block/mmcblk0
unit MB #to set storage unit as MB
print #shows partition table. do remember to screenshot this
Output of "print" should be something like this
Code:
Number Start End Size File system Name Flags
1 0.02MB 2.10MB 2.08MB sbl1
2 2.10MB 3.15MB 1.05MB rpm
3 3.15MB 4.19MB 1.05MB tz
4 4.19MB 5.24MB 1.05MB DDR
5 5.24MB 6.29MB 1.05MB ssd
6 6.29MB 7.34MB 1.05MB dbi
7 7.34MB 11.5MB 4.19MB aboot
8 11.5MB 16.8MB 5.24MB bk1
9 16.8MB 21.0MB 4.19MB misc
10 21.0MB 29.4MB 8.39MB logo
11 29.4MB 67.1MB 37.7MB bk2
12 67.1MB 68.7MB 1.57MB modemst1
13 68.7MB 70.3MB 1.57MB modemst2
14 70.3MB 70.3MB 0.00MB fsc
15 70.3MB 134MB 64.0MB bk3
16 134MB 136MB 1.57MB fsg
17 136MB 168MB 32.0MB bk4
18 168MB 201MB 33.6MB bk5
19 201MB 218MB 16.8MB boot
20 218MB 235MB 16.8MB boot1
21 235MB 252MB 16.8MB recovery
22 252MB 268MB 16.8MB ext4 persist
23 268MB 336MB 67.1MB fat16 modem
24 336MB 403MB 67.1MB fat16 modem1
25 403MB 1074MB 671MB ext4 system
26 1074MB 1745MB 671MB ext4 system1
27 1745MB 2147MB 403MB ext4 cache
28 2147MB 15758MB 13610MB ext4 userdata
Remove partition "system" (system1) and "system1" (system2);
Code:
rm 25
rm 26
Create new partitions after deleting them, partition size is up to you;
Code:
mkpartfs primary ext2 403 1645 # 403MB is the start of the partition ending at 1645 MB, this will be for system1
mkpartfs primary ext2 1645 1745 # Do the same for system2
print # show the partition table to confirm that the partitions are created
name 25 system # name the partition as "system" for system1
name 26 system1 # again for system2
print # check again
quit
Convert newly created partitions to ext4 from ext2;
Code:
#for system1;
tune2fs -j /dev/block/mmcblk0p25
e2fsck -fDp /dev/block/mmcblk0p25
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p25
e2fsck -fDp /dev/block/mmcblk0p25
# for system2;
tune2fs -j /dev/block/mmcblk0p26
e2fsck -fDp /dev/block/mmcblk0p26
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p26
e2fsck -fDp /dev/block/mmcblk0p26
Go back to parted to check whether it's applied;
Code:
parted /dev/block/mmcblk0
unit MB
print
It should be like this (if you followed my partition sizes)
Code:
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15758MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 0.02MB 2.10MB 2.08MB sbl1
2 2.10MB 3.15MB 1.05MB rpm
3 3.15MB 4.19MB 1.05MB tz
4 4.19MB 5.24MB 1.05MB DDR
5 5.24MB 6.29MB 1.05MB ssd
6 6.29MB 7.34MB 1.05MB dbi
7 7.34MB 11.5MB 4.19MB aboot
8 11.5MB 16.8MB 5.24MB bk1
9 16.8MB 21.0MB 4.19MB misc
10 21.0MB 29.4MB 8.39MB logo
11 29.4MB 67.1MB 37.7MB bk2
12 67.1MB 68.7MB 1.57MB modemst1
13 68.7MB 70.3MB 1.57MB modemst2
14 70.3MB 70.3MB 0.00MB fsc
15 70.3MB 134MB 64.0MB bk3
16 134MB 136MB 1.57MB fsg
17 136MB 168MB 32.0MB bk4
18 168MB 201MB 33.6MB bk5
19 201MB 218MB 16.8MB boot
20 218MB 235MB 16.8MB boot1
21 235MB 252MB 16.8MB recovery
22 252MB 268MB 16.8MB ext4 persist
23 268MB 336MB 67.1MB fat16 modem
24 336MB 403MB 67.1MB fat16 modem1
25 403MB 1645MB 1242MB ext4 system
26 1645MB 1745MB 99.8MB ext4 system1
27 1745MB 2147MB 403MB ext4 cache
28 2147MB 15758MB 13610MB ext4 userdata
You can quit adb now, process is finished. Reboot and restore your back up (if you have made one earlier) or flash a rom through CWM
Do comment/reply if you are having difficulties or otherwise
Thank you so much
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
One command is miswritten
mkpartfs primary ext2 1812 3070
It should be
mkpartfs primary ext2 1645 1745
shrisangram said:
One command is miswritten
mkpartfs primary ext2 1812 3070
It should be
mkpartfs primary ext2 1645 1745
Click to expand...
Click to collapse
Lol thanks! Fixed. Didn't notice that
can we use the remaining size of system to data partition?
cause i dont need big size of system, i need for app instead, can we do it?
Thanks,
Will this have any effect if I have to do fastboot of MIUI in future?
Is this method safe since we are playing with partition table?
arif920629 said:
Disclaimer: I am not responsible for bricked devices, obviously
Unlike most people here, I do not find the "dual-boot" feature particularly useful due to its buggyness and quirky configuration plus it made the available space for the /system partition divided, leaving only 600++ MB for each system1 and system2. This guide is using CWM v6.0.5.1 (R11) by furniel and donbo.
...
Do comment/reply if you are having difficulties or otherwise
Click to expand...
Click to collapse
why did these steps??
tune2fs -j /dev/block/mmcblk0p25
e2fsck -fDp /dev/block/mmcblk0p25
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p25
e2fsck -fDp /dev/block/mmcblk0p25
I was thinking this isn't possible all this while, thank you for posting this amazing tutorial! I have no use for the second system partition either, but instead, I actually needed more system space to flash bigger Gapps! Thank you so much!
Amruth Pillai said:
I was thinking this isn't possible all this while, thank you for posting this amazing tutorial! I have no use for the second system partition either, but instead, I actually needed more system space to flash bigger Gapps! Thank you so much!
Click to expand...
Click to collapse
Did u try it? Is it working?
I would like to know why you have changed the format of the file systems from ext3 to ext4.
srvoleti said:
I would like to know why you have changed the format of the file systems from ext3 to ext4.
Click to expand...
Click to collapse
Code:
[B]Ext4[/B]
[LIST]
[*]Ext4 stands for fourth extended file system.
[*]It was introduced in 2008.
[*]Starting from Linux Kernel 2.6.19 ext4 was available.
[*]Supports huge individual file size and overall file system size.
[*]Maximum individual file size can be from 16 GB to 16 TB
[*]Overall maximum ext4 file system size is 1 EB (exabyte). 1 EB = 1024 PB (petabyte). 1 PB = 1024 TB (terabyte).
[*]Directory can contain a maximum of 64,000 subdirectories (as opposed to 32,000 in ext3)
[*]You can also mount an existing ext3 fs as ext4 fs (without having to upgrade it).
[*]Several other new features are introduced in ext4: multiblock allocation, delayed allocation, journal checksum. fast fsck, etc. All you need to know is that these new features have improved the performance and reliability of the filesystem when compared to ext3.
[*]In ext4, you also have the option of turning the journaling feature “off”.
[/LIST]
With all these features, and an option to... who wouldn't?
Amruth Pillai said:
Code:
[B]Ext4[/B]
[LIST]
[*]Ext4 stands for fourth extended file system.
[*]It was introduced in 2008.
[*]Starting from Linux Kernel 2.6.19 ext4 was available.
[*]Supports huge individual file size and overall file system size.
[*]Maximum individual file size can be from 16 GB to 16 TB
[*]Overall maximum ext4 file system size is 1 EB (exabyte). 1 EB = 1024 PB (petabyte). 1 PB = 1024 TB (terabyte).
[*]Directory can contain a maximum of 64,000 subdirectories (as opposed to 32,000 in ext3)
[*]You can also mount an existing ext3 fs as ext4 fs (without having to upgrade it).
[*]Several other new features are introduced in ext4: multiblock allocation, delayed allocation, journal checksum. fast fsck, etc. All you need to know is that these new features have improved the performance and reliability of the filesystem when compared to ext3.
[*]In ext4, you also have the option of turning the journaling feature “off”.
[/LIST]
With all these features, and an option to... who wouldn't?
Click to expand...
Click to collapse
OK, Thank you for the info.
system2
Why is system2 still exist with 100MB size? I think it will cause error if you do OTA update because MI3 OTA update by default will flash update to system1 and then system2 in the next OTA. Unless if you stick to custom rom or always manually flash update to system1
srvoleti said:
I would like to know why you have changed the format of the file systems from ext3 to ext4.
Click to expand...
Click to collapse
changed? ext4 is default.
m11kkaa said:
changed? ext4 is default.
Click to expand...
Click to collapse
When I checked yesterday, the existing partitions it was shown as ext3 but now it is shown as ext4. That's why I asked that at that time.
This guide also works on Mi2S,its exact copy of it actually (except a minor difference in partition layout).
can anyone pls make a video of this tutorial?
got struck there
iwjy said:
Why is system2 still exist with 100MB size? I think it will cause error if you do OTA update because MI3 OTA update by default will flash update to system1 and then system2 in the next OTA. Unless if you stick to custom rom or always manually flash update to system1
Click to expand...
Click to collapse
Ah, yes, I have the same question, actually...we DO need system2 to be usable atleast, right?
naruse99 said:
can we use the remaining size of system to data partition?
cause i dont need big size of system, i need for app instead, can we do it?
Click to expand...
Click to collapse
can someone make tutorial to resize data partition?
Someone pls confirm the tutorial. Want to try very badly
what to do after step 1??
i am getting this...
anyone, pls help..

Categories

Resources