[Q] How big is system partition - TouchPad Q&A, Help & Troubleshooting

I see from a few Android ROMS that it says it requires a certain larger size system partition. I've already installed one android ROM (jcsullins CM10), but was wondering how I can tell how big a partition that got created and if it is big enough for these other ROMs.
Thanks.

Did you use ACMEInstaller2 or 3?
Or, type "df" in a terminal emulator.

bananagranola said:
Did you use ACMEInstaller2 or 3?
Or, type "df" in a terminal emulator.
Click to expand...
Click to collapse
I'm pretty sure I used ACMEInstaller3.
Totally forgot about the easy way with df. This is what it says.
/boot 31M
/system 387.4M
/data 1.5G
/cache 193.7M

Found a nice WebOS tool called Tailor that tells me the size.
system = 400M
cache = 200M
date = 1.5G
I guess my partition sizes are ok.
Thanks.

Related

Repartition Linux swap

Hi, ive searched around but cannot seem to find a complete answer, but basically is there a way to just repartition my linux swap from 32MB to 96MB.
I dont have a linux cd and so if theres a way to do it through ADB or recovery, that would be great.
Thanks.
D3NNY said:
Hi, ive searched around but cannot seem to find a complete answer, but basically is there a way to just repartition my linux swap from 32MB to 96MB.
I dont have a linux cd and so if theres a way to do it through ADB or recovery, that would be great.
Thanks.
Click to expand...
Click to collapse
i'll give you the short answer then i will edit this post with the long answer
short answer.
you use the resize command in parted on your ext3 and linux-swap partition. if you have used parted from the recovery console a few times before this will be easy but i will post through instructions in a minute
Long answer
go into the recovery console. (recovery screen then last option)
then type (if you want to use adb just type adb shell then do the commands)
Code:
parted /dev/block/mmcblk0
print (you will need the start and end points for your ext3 and linux-swap partitions)
resize 2 [start point] [end - 64mb]
resize 3 [start - 64mb] [end]
print (to verify it worked)
quit
upgrade_fs
reboot
there you go.
I have not tested the resize command on an ext3 partition but i do not think (key word think) it will destroy your data on ext3, but back up just to make sure.
to back up your ext3
with adb (since i assume you have it from the first post)
Code:
adb pull /system/sd [dir on computer]
to restore on empty card
Code:
adb shell mkdir /system/sd
adb push [dir on computer] /system/sd
thanks for the great reply. Will test out now and see what happens!
Can anyone verify if this works?
My only concern is the resizing of ext3. Will it cut out any data since I am shortening the partition?
mr_roboto said:
Can anyone verify if this works?
My only concern is the resizing of ext3. Will it cut out any data since I am shortening the partition?
Click to expand...
Click to collapse
Yes, it works. And yes it *can* corrupt/delete some data from the ext3 depending on how much extra space you have. To be safe, just back-up. The easiest way is doing a BART or switchrom backup (Which backs up you ext) move the backup from the FAT partition to a computer (not necessary but you seem worried about your ext, so just to be safe) resize the partitions and restore your backups.
or just use amon recovery
Thanks for the response guys, I went and started reading about switchrom.
I am planning to do the following steps:
switchrom.sh -s // to store my rom
resize my partitions
switchrom.sh -r
The thread says it stores the nandroid and the app data, I am assuming that means nandroid and ext partition right?
D3NNY said:
Hi, ive searched around but cannot seem to find a complete answer, but basically is there a way to just repartition my linux swap from 32MB to 96MB.
I dont have a linux cd and so if theres a way to do it through ADB or recovery, that would be great.
Thanks.
Click to expand...
Click to collapse
I don't think this is the same, but I am running a hero rom and was wondering what "swappiness" is? I keep reading stuff like "swappiness of 96mb", etc. Is this just referencing the linux swap file size? and with me running a hero rom, what is the best setup for my SD card? I am currently running simply a fat32 partition and an ext3- thanks

Running out of room

My phone constantly tells me it's running out of room. I used to be able to have 10+ apps, but I now only have 4 and it still gives me the message sometimes. I've slowly had to keep removing apps as it keeps appearing even though I remove apps.
I have no documents, no music, no videos, etc. on the phone. My four apps total less than 4MB.
What the hell is wrong? Is there a way to "clean up" the phone?
what build are you running?
thoughtlesskyle said:
what build are you running?
Click to expand...
Click to collapse
myn's latest release.
have you tried cleaning out your cache? A lot of people said web browsing alone would start eating up space. look in the recommended apps thread for recommendations
Yes, look for the app "CacheMate" in the market or online. It will clear all cache and speed up/clean up your phone. Also, if you ever find yourself running out of room because of so many apps (not really the case here, though) I strongly recommend doing system on NAND and data on SDCard Partition (ext2 partition). You can set an ext2 partition on your card from within android on the terminal. I reallly like it because you can have like 500mb for data, rather than the 128mb or whatever is available on our phones. Let me know if you'd like instructions or help with CacheMate or setting up a data partition.
Thanks guys.
I found a TON of downloaded .apk files from the market in /cache so I deleted them and I'm good to go.
drewden123 said:
I strongly recommend doing system on NAND and data on SDCard Partition (ext2 partition). You can set an ext2 partition on your card from within android on the terminal. I reallly like it because you can have like 500mb for data, rather than the 128mb or whatever is available on our phones. Let me know if you'd like instructions or help with CacheMate or setting up a data partition.
Click to expand...
Click to collapse
Hey, can you please let me know how I can set up a data on an ext2 partition. I have a 1gb ext2 partition but and changed the boot menu to "data on ext2 partition" but when I check the Internal Phone Storage in settings, it shows a low MB free and not the around 1GB like I thought. You mentioned something about the terminal... thanks
my2sense said:
Hey, can you please let me know how I can set up a data on an ext2 partition. I have a 1gb ext2 partition but and changed the boot menu to "data on ext2 partition" but when I check the Internal Phone Storage in settings, it shows a low MB free and not the around 1GB like I thought. You mentioned something about the terminal... thanks
Click to expand...
Click to collapse
Ok, first try choosing the option "Data on SDcard partition" that is the option you want. If you choose "Data on ext2 Img" it will do it on your fat32 partition of your memory card. Let me know if you need more guidance.
Ah, that's what I was missing, I didn't know I was suppose to choose the "data on SDcard partition" although it makes total sense now.
The weird thing is my card was originally partitioned like this:
6.5GB FAT32
1.0GB ext2
32MB linux-swap
It didn't work and kept telling me that there wasn't enough room. I deleted the 32MB linux-swap and combined the partitions to:
6.5GB FAT32
1.xGB ext2
and it told me that it couldn't find any ext2 SD partition so I finally formatted it like this just for the heck of it:
6.5GB FAT32
32MB linux-swap
1.0GB ext2
and it worked! I've read a lot of stuff on app2sd and they always stated to format the SDcard like how I had it originally. Oh well, thanks for the help.
Yeah, i just had to reformat mine to 1: fat32 2: swap 3: ext2, if swap and ext2 were flipped then it tried to use the swap part as an ext2 part
mrono said:
Yeah, i just had to reformat mine to 1: fat32 2: swap 3: ext2, if swap and ext2 were flipped then it tried to use the swap part as an ext2 part
Click to expand...
Click to collapse
It's because the installer is hardcoded to look for the 2nd part for system and 3rd for data. So if you only have two partitions, it won't let you put data there.
As far as the internal phone storage - I think it shows the remaining space on the system partition, not the data partition.
mrkite38 said:
It's because the installer is hardcoded to look for the 2nd part for system and 3rd for data. So if you only have two partitions, it won't let you put data there.
As far as the internal phone storage - I think it shows the remaining space on the system partition, not the data partition.
Click to expand...
Click to collapse
I had 3, just with swap and ext2 changed positions, it worked in V4 but not V5 of warm donut
mrono said:
I had 3, just with swap and ext2 changed positions, it worked in V4 but not V5 of warm donut
Click to expand...
Click to collapse
Interesting... the installer doesn't care what file system is there, it reformats it anyway if you 'wipe data.'
Code:
elif [ $RM_dataloc -eq 1 ] ; then
if [ $RM_wipedataforsys = "yes" ] ; then
/bin/mke2fs -F /dev/block/mmcblk0p3 > /dev/null
So could you set it up with 4 parts, fat, ext2, ext2, swap? I've never used swap...
mrkite38 said:
Interesting... the installer doesn't care what file system is there, it reformats it anyway if you 'wipe data.'
Code:
elif [ $RM_dataloc -eq 1 ] ; then
if [ $RM_wipedataforsys = "yes" ] ; then
/bin/mke2fs -F /dev/block/mmcblk0p3 > /dev/null
So could you set it up with 4 parts, fat, ext2, ext2, swap? I've never used swap...
Click to expand...
Click to collapse
no idea, I only ever set up fat32 ext2 swap, never needed a second swap partition
How do I make an ext2 partition and can I transfer data to it without reinstalling?
What is a swap partition? Do I need one?

How to Move dalvik-cache to RAM Memory

Hi! With 200 apps installed i move this cache to /dev with this script. O1 startup 2-2.5 minutes while recreating dalvik-cache directory. Runs fast and 70-80MB is free on sdcard or phone memory. SDCard life is loooong! Run this on Mik_os CyanogenMod Beta 3.1-4 without A2SD or uninstalled A2SD.
P.S. If you use A2SD then first: 1-locate where is dalvik-cache creating. 2- move it to phone. 3- remove (.txt) from attached file. 4- add script into /system/etc/init.d with root explorer and change right permission
Does this really works? I'm really damn curious, but I don't want to mess with it right off the bat without you telling me how does it performs.
Yes it works! About battery eating... No more from stock mik_os Cyanogen beta4, and RAM 240-250Mb after phone is fully loaded. Phone is loading after Homescreen is visible about 2mins...so dont touch him- wait for cache is genering
I just did it, couldn't resist, and yes it worked. I only have 17 mb worth of "dalvik-cache" files anyway, but I guess having it on /dev provides more performance than having it on SD card (unless the card is a class 10).
"I only have 17 mb worth of "dalvik-cache" files anyway"- on SdCard? delete it...! Sorry for bad english...
pomka78 said:
"I only have 17 mb worth of "dalvik-cache" files anyway"- on SdCard? delete it...! Sorry for bad english...
Click to expand...
Click to collapse
Not on sd-card anymore ofc...Don't worry everything is working as it should, I know my stuff
For possible a2sd - dalvik to sd users this is what I did:
1. Moved dalvik back to data (with darktremors I just typed a2sd nocache in the terminal);
2. Rebooted;
3. Wiped dalvik-cache at recovery;
4. Booted;
5. Copied this script into init.d;
6. Rebooted;
7. ??
8. Profit.
Yes. The /dev subdirectory size is 200mb and not used for user!? Not right...;-)
I'll try move to /dev /data/dropbox- this is trash directory?
pomka78 said:
Yes. The /dev subdirectory size is 200mb and not used for user!? Not right...;-)
I'll try move to /dev /data/dropbox- this is trash directory?
Click to expand...
Click to collapse
As far as I know /dev isn't used by "us" the user, but I don't know much more about it.
What do you want to move to /dev? I didn't understand completely.
/data/dropbox -- this is temporary files from What?
I have the dropbox app and I dont have that folder, but your path belongs to dropbox I bet
/data/system/dropbox - - another folder with some files
Doesn't this mean the dalvik-cache is rebuilt on every boot?
Sent from my LG-P500 using Tapatalk
Yes its rebuild, but into fast memory,not use sdcard
Hi friends,
i would say: the idea to put the cache in ram is good, but /dev is the VERY,VERY WRONG place to do that! Why? the /dev folder is specially ONLY for devices and user-data or other system data has not a place in it.
To work better with this idea:
create a new folder in /system or /data and mount a tmpfs in it. after do this, link /data/dalvik-cache to this this created folder and all is fine
tmpfs is nothing other than a loop device, specially for temporay data store when system is running. on shutdown, the tmpfs gets automaticly unmounted.
But /dev - is a "devices" ,they reinitialize every boot phone. what's wrong be if cache would be reinitializing in their own directory.
3 days - flight normal...
pomka78 said:
But /dev - is a "devices" ,they reinitialize every boot phone. what's wrong be if cache would be reinitializing in their own directory.
3 days - flight normal...
Click to expand...
Click to collapse
yes, "/dev" are devices, and dalvik-cache isn't a device and doesn't contains devices - so this folder must be placed in another place in file system.
It works, there is no problem - but it's not conform to a FHS standard (i know, android has it's own standard...)
I'm with Andy on this one, /dev is not the place to do this. It's not a normal directory and should be left alone. I think Andy's solution is the way to with this. And I'm still wondering what the actual benefit will be apart from saving space.
Sent from my LG-P500 using Tapatalk
FHS standard? Not hear about... i try to change script. Maybe resize /cache partition? How? I'll try
pomka78 said:
FHS standard? Not hear about... i try to change script. Maybe resize /cache partition? How? I'll try
Click to expand...
Click to collapse
FHS = Filesystem Hierarchy Standard. It was invented to have a clear file system on Linux, and android is a similar system to Linux/*NIX.
Clear means, that developers shouldn't install binaries/libs or scripts wild around the system - so this standard gives a way to organize files in a clear way
/bin = essential binaries needed by system
/boot = system boot related files (kernel,bootloader config,static binaries for boot time)
/dev = system device drivers
/etc = system wide configuration files
/lib = essential system libraries (libc...)
/media = mount point for media like CD-ROM or USB drives
/mnt = mount point for internal mounts (mount other harddrives in system)
/opt = optional installation files or temporary (test-)installtion
/sbin = essential system service binaries
/tmp = temorary files (content of this folder gets removed before every boot, but is a normal directory node - here you can create a folder and mount a tmpfs in)
/usr = secondary file hierarchy, provided for installtion files/applications & other libraries not needed by system to boot to a shell
/var = variable data here you can create a folder and mount a tmpfs in
Hope, this information helps some
Hmm, there's quite good information here, I didn't know that much about FHS... is tmpfs loaded into RAM as well?
EDIT: Yes it is loadaded into RAM... should've go search before asking.

Nook Color CM10 emmc Data Partition Size

Loving the CM10 ROMs. Everything has been snappy on my nook since beta 2.
I thought I had the newer (revision 1.2+) nook partition layout (5gb data(apps)/1gb media). But now with CM10 I am getting an out of space error when trying to install new apps. I have moved all apps to my sd card and still get the error about not enough space. If I try and look at the partiton size it looks like it is maybe only 1gb now. Did installing a CM10 ROM change my partition size? Am I missing something else? Perhaps I am just wrong about my original partition sizes.
I searched some threads and the web and saw some discussion on my issue, particularly mention of a 'new CM10 partition layout', but this was confusing at best. It may not have even been nook related, but pertained to some phones.
dcahoe said:
Loving the CM10 ROMs. Everything has been snappy on my nook since beta 2.
I thought I had the newer (revision 1.2+) nook partition layout (5gb data(apps)/1gb media). But now with CM10 I am getting an out of space error when trying to install new apps. I have moved all apps to my sd card and still get the error about not enough space. If I try and look at the partiton size it looks like it is maybe only 1gb now. Did installing a CM10 ROM change my partition size? Am I missing something else? Perhaps I am just wrong about my original partition sizes.
I searched some threads and the web and saw some discussion on my issue, particularly mention of a 'new CM10 partition layout', but this was confusing at best. It may not have even been nook related, but pertained to some phones.
Click to expand...
Click to collapse
You can tell by looking in settings and storage. It will tell you the size of your media storage. If you truly have the 1Gb /data, you might want to look at Dean Gibson's repartitioning thread. He has a 2gb/4gb version.
And no, there is no repartitioning that cm10 does. That was for a phone you saw.
Sent from my Nook HD+ running Tapatalk
Well, I think I do have the 5gb data/1gb media partition layout afterall.
In Setting->Apps->Downloaded it shows at the bottom 'Internal Storage, 753Mb used, 4.2Gb free'.
If I launch a terminal window:
$ df /data
/data Size=4G Used=643M Free=4G Blksize=4096
$ df /emmc
/emmc Size=1G Used=83M Free=942M Blksize=4096
$ df /mnt/sdcard
/mnt/sdcard Size=15G Used=10G Free=4G Blksize=8192
I guess the only app that is giving me the out of space is Titanium Backup. I can't get it to install from either the appstore or from .apk that I downloaded. Both methods start installing and then say 'out of space'. I have been installing and removing other apps along the way with no similar problem.
I did wipe cache/dalvik cache when installing ROM. I also tried CWM Fix Permissions. I also tried CWM Backup -> Wipe Data/Factory Reset -> Restore.
Anyone know why Titanium Backup won't install?
dcahoe said:
Well, I think I do have the 5gb data/1gb media partition layout afterall.
In Setting->Apps->Downloaded it shows at the bottom 'Internal Storage, 753Mb used, 4.2Gb free'.
If I launch a terminal window:
$ df /data
/data Size=4G Used=643M Free=4G Blksize=4096
$ df /emmc
/emmc Size=1G Used=83M Free=942M Blksize=4096
$ df /mnt/sdcard
/mnt/sdcard Size=15G Used=10G Free=4G Blksize=8192
I guess the only app that is giving me the out of space is Titanium Backup. I can't get it to install from either the appstore or from .apk that I downloaded. Both methods start installing and then say 'out of space'. I have been installing and removing other apps along the way with no similar problem.
I did wipe cache/dalvik cache when installing ROM. I also tried CWM Fix Permissions. I also tried CWM Backup -> Wipe Data/Factory Reset -> Restore.
Anyone know why Titanium Backup won't install?
Click to expand...
Click to collapse
The only thing I can think of is some users are having read only problems on both SD card and /data, which is where apps get installed. Have you tried to install other apps since the TB install failed? A test you can try to see if you are one of the users with ro issues is to use a root file manager (there is one built into CM10 now) to create a test file somewhere on /data.
Sent from my Nook HD+ using Tapatalk

[GUIDE][HOWTO] Multi-boot Android systems on Xperia TX

FIRST OF ALL, we should say thanks to @alvinhochun 's work on porting kexec hardboot patch to Xperia M. His original thread is here: http://forum.xda-developers.com/showthread.php?t=2568151
And @Tasssadar who has ported kexec hardboot patch on MSM chips. Original thread is here: http://forum.xda-developers.com/nexus-4/orig-development/kexec-hardboot-patch-t2472316/post46223952
As for the kernel patch and kexec binary for TX, they are here: http://forum.xda-developers.com/showthread.php?t=2747215
OK let's begin our tour on TX...
0. Disclaimer
This is a rather dangerous hack. I'm not responsible for data loss, broken SD cards, dead internal storage or bricked phones. Try this at your own risk. Proceed only when you know what you are doing.​
1. Requirements
a. ROM with “kexec hardboot” patched kernel. My OmniROM build will do the job. Since Alx31Tse is also using my kernel source for TX, the Carbon builds for TX may be capable of handling this as well. This ROM should be installed into internal storage : just flash it in recovery as usual.​b. External MicroSD card which is big enough for your ROMs. One ROM takes up ~4GB space.​c. Some basic knowledge of partitions, device nodes, ramdisk modding(check this thread by letama: http://forum.xda-developers.com/showthread.php?t=2418893).​
2. Partitioning the external sdcard
a. Plan the partitions​
Each ROM need three partitions : system, data and cache. You need at least 1.4GB system + 2GB data + 400MB cache for stock ROMs. The system partition for third-party ROMs can be shrinked to ~900MB. Of course you can set your own data partition size if 2GB does not suit your needs. The space left can be used for storing data just like a normal sdcard.
For example, I'm using a 16GB card and going to install two stock ROMs (9.1.B.1.67 + 9.2.A.0.295). So I have to create at least 6 partitions for them:
1.4GB system for 295
2GB data for 295
400MB cache for 295
1.4GB system for 67
2GB data for 67
400MB cache for 67
There is ~8GB left after all these partitions. This can be used as a normal sdcard. Just create another partition for it.​
b. Go partitioning it!​
Everyone has his own way of doing this. I prefer using a USB card reader and Disk Utility that comes with Ubuntu.
Erase the card and initialize it with GUID Partition Table (GPT). Of course you can use MBR, but I didn't test it. Be careful in the following steps if you choose MBR.
Create the “normal sdcard” partition. In my example, create a 8GB partition here and format it with FAT32. THIS PARTITION SHOULD BE THE FIRST ONE ON THE CARD! Otherwise Android system may not be able to recognize it.
Create the partitions for guest systems. There are no particular order for the partitions. Just make sure you remember their order. DO NOT FORMAT them for now.
In my example:
PART 1: 8GB, FAT32
PART 2: 1.4GB unformatted
PART 3: 2GB unformatted
PART 4: 400MB unformatted
PART 5: 1.4GB unformatted
PART 6: 2GB unformatted
PART 7: 400MB unformatted​
3. Kernel mods for guest systems
For each guest system:
a. Unpack its kernel.​
If you are going to install a full stock ROM, please choose a corresponding kernel with recovery built-in in Android Development section.
If you are going to install a third-party ROM (OmniROM, CM etc) or customized stock ROM (Rockers etc), chances are that their kernels have recovery built-in already and you can proceed.
Now unpack the kernel.
We have zImage(sec0.bin), ramdisk(sec1.bin) now. The rest can be ignored.​
b. Modify the mount entries in fstab (and other files)​
fstab is the file that suggests the real device for the /system, /data and /cache mount points. Modding it will make it possible to mount the partitions other than the ones in internal storage on /system /data and /cache, so that we can separate different systems into different partitions.
Now you have to be clear about “how the partitions on external card will be presented in your phone” (their device nodes). In my example (GPT with 7 partitions):
PART 1: 8GB → /dev/block/mmcblk1p1
PART 2: 1.4GB → /dev/block/mmcblk1p2
PART 3: 2GB → /dev/block/mmcblk1p3
PART 4: 400MB → /dev/block/mmcblk1p4
PART 5: 1.4GB → /dev/block/mmcblk1p5
PART 6: 2GB → /dev/block/mmcblk1p6
PART 7: 400MB → /dev/block/mmcblk1p7
As has been mentioned above, mmcblk1p1 is for normal file storage, p2~p4 is for 295, p5~p7 is for 67.
Files that need modding:
(sec1.bin/sbin/ramdisk.cpio) /fstab, /fstab.qcom, /init.target.rc
Click to expand...
Click to collapse
(sec1.bin/sbin/ramdisk-recovery.cpio) /fstab, /fstab.qcom, /etc/recovery.fstab, /etc/twrp.fstab
Click to expand...
Click to collapse
The fstabs are easy to deal with. Just change the block device name for /system /cache and /data to /dev/block/mmcblk1p* accordingly. The init.target.rc has only one line that should be modded. For example,
FOR 9.1.B.1.67 in my example:
ramdisk.cpio/fstab:
/data ext4 /dev/block/mmcblk1p6
/cache ext4 /dev/block/mmcblk1p7
/boot/modem_fs1 raw /dev/block/platform/msm_sdcc.1/by-name/modemst1
/boot/modem_fs2 raw /dev/block/platform/msm_sdcc.1/by-name/modemst2
Click to expand...
Click to collapse
ramdisk.cpio/fstab.qcom:
/dev/block/mmcblk1p5 /system ext4 ro,barrier=1,discard wait,check
/dev/block/mmcblk1p6 /data ext4 nosuid,nodev,noatime,barrier=1,noauto_da_alloc,discard wait,check,encryptable=footer
/dev/block/mmcblk1p7 /cache ext4 nosuid,nodev,noatime,barrier=1,discard wait,check
/dev/block/platform/msm_sdcc.1/by-name/SDCard /mnt/int_storage ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check
Click to expand...
Click to collapse
ramdisk.cpio/init.target.rc:
(SEARCH FOR /system)
on post-fs
mount ext4 /dev/block/mmcblk1p5 /system ro remount barrier=1
Click to expand...
Click to collapse
Just do the same for ramdisk-recovery.cpio. For example:
ramdisk-recovery.cpio/etc/recovery.fstab
/boot emmc /dev/block/mmcblk0p4
/system ext4 /dev/block/mmcblk1p5
/cache ext4 /dev/block/mmcblk1p7
/data ext4 /dev/block/mmcblk1p6 length=-16384
/sdcard ext4 /dev/block/mmcblk0p15
/external_sd auto /dev/block/mmcblk1p1 /dev/block/mmcblk1
Click to expand...
Click to collapse
And replace mmcblk1p5~p7 with p2~p4 then do it all again for 9.2.A.0.295's ramdisk.cpio & ramdisk-recovery.cpio
NOTE: All these fstab and rc files should be rw-r—r-- and owned by root:root. Otherwise the system may fail to boot.
Now repack the ramdisk.cpio, ramdisk-recovery.cpio and then the whole ramdisk.​
4. Installing the guest systems
Take notice of the texts in red. Change them to fit your needs.
a. Preparing the guest systems​If you are installing full stock ROM (FTF format), you can use Flashtool to dump the system image (Flashtool > Tools > Sin Editor, load system.sin from FTF archive and dump data). Then write the image to the sdcard by “dd if=system.ext4 of=/dev/sdb2“ on the computer.
If you are installing ROMs in ZIP format, you need to modify updater-script and replace all (for 9.1.B.1.67 in my example)
/dev/block/mmcblk0p12 or /dev/block/platform/msm_sdcc.1/by-name/System to /dev/block/mmcblk1p5
Click to expand...
Click to collapse
/dev/block/mmcblk0p13 or /dev/block/platform/msm_sdcc.1/by-name/Cache to /dev/block/mmcblk1p7
Click to expand...
Click to collapse
/dev/block/mmcblk0p14 or /dev/block/platform/msm_sdcc.1/by-name/Userdata to /dev/block/mmcblk1p6
Click to expand...
Click to collapse
And
remove /dev/block/mmcblk0p4 or /dev/block/platform/msm_sdcc.1/by-name/Kernel formatting/writing lines
Click to expand...
Click to collapse
Then repack the ROM and push it into phone's internal sdcard.​
b. Boot the guest kernel/system​Remember we have zImage and modded ramdisk for each guest system? adb push them to /data partition. The kexec binary is needed as well. Now you can use the kexec binary(check the beginning of this thread) to boot your guest kernel and then recovery.
For example:
I pushed 295 kernel zImage to /data/boot4.3/zImage-stock, modded ramdisk to /data/boot4.3/initrd-stock, and kexec binary to /data/kexec. Now execute as root:
Code:
cd /data
chmod 755 kexec
busybox sync
busybox mount -o remount,ro /system
busybox mount -o remount,ro /cache
busybox mount -o remount,ro /data
busybox sync
./kexec --load-hardboot [COLOR="Red"]./boot4.3/zImage-stock[/COLOR] –initrd=[COLOR="Red"]./boot4.3/initrd-stock[/COLOR] --mem-min=0x85000000 --command-line="`cat /proc/cmdline`"
busybox sync
./kexec -e # phone reboots and guest kernel (295) starts
NOTE: the guest kernel's cmdline may not be exactly the same as the host one. However, it doesn't matter much. 67 and 295 both boot fine using the same cmdline as OmniROM. Since bootloader will append some parameters to the command line, using guest's sec3 without appending these parameters manually is not a good idea.​
c. Preparing filesystems and installing ROMs in ZIP​After the phone reboots, press Vol buttons at purple LED to go into recovery. Now you are in the recovery for your guest system (295).
FORMAT (not wipe) /data and /cache there. For ZIP ROMs you need to format /system as well.
Then install the modded ZIP file if needed. You can also flash SuperSU or anything else to this guest system in the recovery (remember to check if there are wrong block device paths in updater-script).
After finishing the installation of one guest system, reboot and you will go into the host ROM. Execute the commands again and specific the next guest system's zImage and ramdisk to boot into the next guest system. Then do the formatting and flashing things as described above.​
5. Boot into guest systems
Once you finish installing all the guest systems, reboot. Then in the host ROM you can execute the commands in Step 4 again to boot into the corresponding guest system. Don't press any key after the reboot. If there's nothing wrong, you will see the bootanimation and then the Android system. Since external sdcards may not be as fast as internal storage, the first boot may take very long time. If you see the bootanimation, just be patient and it will boot up finally.​
===========================================================
I know I can't speak English well and it's hard to make myself clear. So if you feel confused, please post your questions here so that everyone who knows the answer will be able to help.
And if you are skilled in Android things, you can choose your own way to achieve the goal:
Partition the sdcard → Mod fstsb and rcs to mount partitions on sdcard to /system etc → Mod the ROM installation script → Boot into guest recovery to format(initialize) data & cache &system and flash ROM → Boot into the guest Android OS
Click to expand...
Click to collapse
This is a little bit complicated. But I do hope this will add more fun to our device
Thanks for your sharing
got it
Although this is labeled for the Xperia TX, after reading through everything, it looks like this works on all devices, you just have to change a few things. Good job putting this together! (Even though I don't have an Xperia TX)
r3pwn said:
Although this is labeled for the Xperia TX, after reading through everything, it looks like this works on all devices, you just have to change a few things. Good job putting this together! (Even though I don't have an Xperia TX)
Click to expand...
Click to collapse
Yeah, it seems that the guide applies to all devices with patched kernels
updateing said:
Yeah, it seems that the guide applies to all devices with patched kernels
Click to expand...
Click to collapse
This guide is nice, full of content, and detailed, but wouldn't it have been easier, though, to just make a MultiROM port?
r3pwn said:
This guide is nice, full of content, and detailed, but wouldn't it have been easier, though, to just make a MultiROM port?
Click to expand...
Click to collapse
I have thought of porting MultiROM, but I'm running a tight schedule...sorry
Whether this Xperia V can also be made from ??
Mircinko96 said:
Whether this Xperia V can also be made from ??
Click to expand...
Click to collapse
It's applicable to Xperia V in theory. But you need a kernel with kexec hardboot patch, which hasn't appeared yet (as far as I have seen). If you know how to compile a kernel, you can try patching the kernel yourself.
.........
do I need linux to unpack kernel?

Categories

Resources