Double OS in STREAK - Streak 5 Android Development

you can see the test video from here:
http://sdrv.ms/ZbWj9V
http://v.youku.com/v_show/id_XNDczNjkxMzc2.html
http://pan.baidu.com/share/link?shareid=99216&uk=3508921813
as you know , after android 2.3.7 (miui\cm7\ics...)
userdata(firstboot) is not use anymore
so we can install two os in STREAK at the same time
OS1
boot:mtdblock0(boot)
system:mtdblock6(system)
cache:innersd0p5(cache)
data:innersd0p6(data)
Click to expand...
Click to collapse
OS2
boot:mtdblock1(recovery)
system:mtdblock7(userdata)
cache:innersd0p7(new ext3 partition)
data:innersd0p8(new ext3 partition)
Click to expand...
Click to collapse
for userdata is only 140mb (system is 260mb)
you must choose a little os to install OS2
i have no idea how to creat a new "yaffs2" partition in innersd0
or maybe i will try to partition mtdblock
but it will be much more dangerous
I success finished in clockworkmod 5.0.2.7
(mke2fs 1.40.8 (13-Mar-2008) 、BusyBox v1.19.2-cm71 static (2011-10-06 22:09 +0200))
if you are using streakmod 0.3.2.8 ,
it may show error report like
“E:Can't mount /dev/block/innersd0p5(Invalid argument)
E:Can't mount CACHE:recovery/log
E:Can't open CACHE:recovery/log
E:Can't mount /dev/block/innersd0p5”
try “mke2fs_static -F -j -b4096 -m0 /dev/block/innersd0p5” and so on
or try clockworkmod 6.0.1.2
First, add partitions reboot to recovery ,use adb to enter the follow commands
Code:
umount /cache
fdisk /dev/block/innersd0
p //see the default partitions,there may be 1、5、6、7
d //del partition 7
7 //del partition 7
d //del partition 6
6 //del partition 6
d //del partition 5
5 //del partition 5
n //add new partition
l //logic partition
//use default partition begining
+125M //the end of new partition 5,about 125mb
n //add new partition
l //logic partition
//use default partition begining
+850M //the end of new partition 6,about 850mb
n //add new partition
l //logic partition
//use default partition begining
+125M //the end of new partition 7,about 125mb
n //add new partition
l //logic partition
//use default partition begining
//use default partition end,about 850mb
w //start partitioning
q //exit fdisk
Second, formate partitions to ext3 also use adb to enter the follow commands
Code:
mke2fs -F -j -b4096 -m0 /dev/block/innersd0p5
mke2fs -F -j -b4096 -m0 /dev/block/innersd0p6
mke2fs -F -j -b4096 -m0 /dev/block/innersd0p7
mke2fs -F -j -b4096 -m0 /dev/block/innersd0p8
by the way ,if you have a big innersd0 and you want to add one fat32 partition
you can use the next command to mount it as a usbdisk ,and format it in PC
Code:
echo /dev/block/innersd0p9 > /sys/devices/platform/msm_hsusb/gadget/lun0/file
Third, install OS1 and OS2
OS1:
just as usual
Click to expand...
Click to collapse
OS2:you must modify two spaces:
1.init.rc in boot.img
open init.rc with notepad (or other),find "userdata"
in the two lines before , change "[email protected]system" to "[email protected]userdata"
in this line , change "[email protected]userdata" to "[email protected]system"
in the next two lines , change "/dev/block/innersd0p6" to "/dev/block/innersd0p8" , change "/dev/block/innersd0p5" to "/dev/block/innersd0p7"
save "init.rc",rebuild "boot.img"
2.updater-script
in the begining ,change "format("yaffs2", "MTD", "system");mount("yaffs2", "MTD", "system", "/system")"
to "format("yaffs2", "MTD", "userdata");mount("yaffs2", "MTD", "userdata", "/system")“
at the end ,change "write_raw_image("/tmp/boot.img", "boot")"
to "write_raw_image("/tmp/boot.img", "recovery")"
3.put "boot.img" and "updater-script" back to update.zip ,and flash it
Click to expand...
Click to collapse
because sometimes i need to format innersd0p7 and innersd0p8
because i don't want to back up userdata(firstboot) when i am backing up os1
so I make new recoverys for OS1 and OS2
i also make a tool pack to unpack and rebuild boot.img
and tool pack to flash boot or recovery (both in PC and in STREAK)
but they are chinese version
if anyone need them , i will post them later

Thats some clever ****, your a genius.

Dear Manics,
_n0p_ introduce me contact you due he thinks you can help me this issue. I'm using MIUI 2.4.20 (Android 2.3.7) but last time it face big problem so I want return to DSC of _n0p_ but failed, I have l flashed 407 then DSC 1.0 then 1.7update but it can not work, reboot frequently.
Could you please help me! Thanks in advance.

great share!Thanks

ak1978 said:
Dear Manics,
_n0p_ introduce me contact you due he thinks you can help me this issue. I'm using MIUI 2.4.20 (Android 2.3.7) but last time it face big problem so I want return to DSC of _n0p_ but failed, I have l flashed 407 then DSC 1.0 then 1.7update but it can not work, reboot frequently.
Could you please help me! Thanks in advance.
Click to expand...
Click to collapse
how did you flash 407/DSC ?
pkg? zip? or fastboot?
did you wipe data and cache ?
in android 2.3.3 or lower
it's better to do a factory restart after you flashed new os

manics said:
how did you flash 407/DSC ?
pkg? zip? or fastboot?
did you wipe data and cache ?
in android 2.3.3 or lower
it's better to do a factory restart after you flashed new os
Click to expand...
Click to collapse
Thanks Manics,
1st I go to fastboot_mode flash recovery407.img then Select "2.update.pkg to flash zip file update.pkg.
2st go to fastboot_mode flash recoverysm.img then flash zip file DSC v.1.0 the flash update v.1.7
Full flashing then I do all wipe data & cache, davik cache...reboot then choose Factory Reset then...pending at DSC logo & reboot again & again.
Does it cause by MIUI is Android 2.3.7 but DSC A 2.3.3?

@ manics
while you are at it, would you mind try to activate swap support? we could use some vram here

ak1978 said:
Thanks Manics,
1st I go to fastboot_mode flash recovery407.img then Select "2.update.pkg to flash zip file update.pkg.
2st go to fastboot_mode flash recoverysm.img then flash zip file DSC v.1.0 the flash update v.1.7
Full flashing then I do all wipe data & cache, davik cache...reboot then choose Factory Reset then...pending at DSC logo & reboot again & again.
Does it cause by MIUI is Android 2.3.7 but DSC A 2.3.3?
Click to expand...
Click to collapse
when you wipe data and cache
was there any Error reporting?
try to flash DSC v.1.0 (zip) again and boot
if it works well
then reboot and update to 1.7

deysmacro said:
@ manics
while you are at it, would you mind try to activate swap support? we could use some vram here
Click to expand...
Click to collapse
maybe you can use clockworkmod 6.0.1.2 to partition sdcard
add swap and\or app2sd partitions
then use “Swapper for root users” or other software to active swap

nah... tried that already... all swap application would failed miserably with streak... since the kernel has no swap support by default...

deysmacro said:
nah... tried that already... all swap application would failed miserably with streak... since the kernel has no swap support by default...
Click to expand...
Click to collapse
for swap support in kernel
i think you should ask n0p for help

lol... i had this feeling you would say that... nah... it is not urgent or important... if someone else would want to ask bout it to n0p.. please do

somebody told me that swap is not urgently required for our streak, our streak still good enough without swap
Sent from my Amazon Kindle Fire using Tapatalk 2

for average user.. yes.. but for more advanced user.. 512mb ram is nothing...

i tried another way these days
i installed system2 in innersd0
so os1 is nothing different as before
all from 2.2 to 4.0 works well
but i don't know how to make yaffs2 partitions
so os2 use ext3 system&firstboot
till now, 2.3.7 or higher works well in os2
but 2.3.3 or lower couldn't boot

deysmacro said:
nah... tried that already... all swap application would failed miserably with streak... since the kernel has no swap support by default...
Click to expand...
Click to collapse
I'm not an expert but using the harddrive (or sd-card in this case) as virtual RAM in XP for instance is often said to have rather negative than positive effects in real world performance. Is there any difference on Android?
OT: Double OS works like a charm!

Related

[HOW-TO] Custom MTD Partitions [12/30/2010]

DISCLAIMER: Nobody -- and I do mean nobody -- is responsible for a bricked device except for the person attempting this modification. Do not contact me, Firerat, Cyanogen or anyone else to complain that you borked your Slide by not following instructions.​
ORIGINAL THREAD
All credit for this work goes to Firerat and lbcoder -- especially to Firerat for making this so darn easy!​
This post will provide instructions for resizing your device's MTD partitions.
PREREQUISITES:
An understanding of basic arithmetic
Familiarity with disk partitioning
S-OFF
The Espresso has 465.1 MB to play around with and it ships with the following partition layout:
System: 240 MB
Data: 145.1 MB
Cache: 80 MB
You can check your current layout by launching an ADB SHELL and entering the following command:
Code:
busybox df -h
You will likely notice that the system partition has a *lot* of free space, likely well over 100 MB available! The instructions in this post will walk you through requisitioning that available space and putting it into the data partition, avoiding the need to ever use Apps2SD or Apps2EXT.
So let's get started...
Step 1: Downloading the necessary files​
Firerat's Mediafire repository can be found here... You will need two files from it:
Custom MTD recovery zip
Custom MTD boot zip
Download those files and place them on your sdcard.
Step 2: Configuring your partition scheme​
As I mentioned earlier, by executing the busybox command you'll get an idea of how much empty space you have on your system partition. Your choices in the section depend entirely on the rom you are using -- for the sake of simplicity I will be assuming the use of a CM6-based rom.
So, once again, launch an ADB SHELL...
You're going to be executing an echo command to create a text file on the root of your sdcard -- this text file will contain the information needed to re-partition your internal memory. This is where you have to make your own choice about sizing -- here is the format of the command you must enter:
Code:
echo "mtd [SYSTEM SIZE IN MB] [CACHE SIZE IN MB]" > /sdcard/mtdpartmap.txt
For my partition scheme on an Espresso running CM6.1.1 I executed the following:
Code:
echo "mtd 140 1.5" > /sdcard/mtdpartmap.txt
NOTES:
If you're using a CM6-based rom you do not need a large cache partition as a script will bind-mount cache -- the smallest size you can set is 1.5 MB -- other roms have their own cache size requirements, so do your research before setting this to a low value.
All partition sizes must be rounded up to the nearest 0.125 MB, but I recommend using increments of 0.5 MB.
All the excess storage not set aside for system and cache will be used for the data partition.
Step 3: Getting your hands dirty​
NOTE: If you had previously configured your device to use apps2ext you will need to perform one additional restoration in step 7. See below for more details...
So assuming you've now downloaded the two zip files (step 1) and added the mtdpartmap.txt file to the root of your sdcard (step 2), you're ready to proceed with the nitty-gritty work. For the sake of simplicity I'm assuming that during the S-OFF procedure you opted to [permanently] flash ClockworkMod Recovery 2.5.0.1 on your device.
Boot your Slide into recovery -- my preferred method is to use ADB REBOOT RECOVERY.
Execute a Nandroid Backup -- within recovery: nandroid->Backup
Wipe your data and cache partitions -- within recovery: wipe data/factory reset
Flash the recovery patcher -- within recovery: install zip from sdcard->choose zip from sdcard->recovery-v1.5.8-Beta-CustomMTD_S.zip
Format the system, data and cache partitions -- within recovery: partitions menu->format [system/data/cache]
Reboot into recovery -- within recovery: advanced->Reboot Recovery
Execute an advanced Nandroid restore of system and data* -- within recovery: nandroid->Advanced Restore->[CHOOSE THE BACKUP]->Restore [system/data]
Flash the boot patcher -- within recovery: install zip from sdcard->choose zip from sdcard->boot-v1.5.8-Beta-CustomMTD_S.zip
Reboot -- within recovery: reboot system now
* Devices with apps2ext configurations must remember to nandroid restore the sd-ext partition as well.
And that should do it. Be patient on first boot as it may take a little longer than expected. To verify that your changes have worked you can repeat the busybox command I listed earlier:
Code:
busybox df -h
Moving forward, let's say you want to flash the latest CM6 nightly -- simply flash the nightly zip (and gapps if necessary) and, immediately after that, flash the boot patcher (boot-v1.5.8-Beta-CustomMTD_S.zip).
I do not plan to field questions in this thread, so if you're looking for support I suggest that you visit the #mytouchslide channel on Freenode IRC.
And, once again, ALL CREDIT goes to Firerat and lbcoder.
Additional Notes (provided by Firerat)​
Removal
There are two ways to remove customMTD ( to return to stock layout ):
Flash an unmodified recovery.img (NOTE: You must format system, cache and data)
Edit the mtdpartmap.txt to have a system size of 0 -- e.g. echo "mtd 0" > /sdcard/mtdpartmap.txt -- and flash the recovery patcher (NOTE: You must format system, cache and data)
Resizing
If you wish to resize, change the mtdpartmap.txt and flash recovery patcher (NOTE: You must format system, cache and data)
Recovery Upgrade
The easiest way to upgrade recovery is to flash manually in recovery via an ADB SHELL while booted into recovery:
Code:
mount /sdcard
flash_image recovery /sdcard/RECOVERY_VERSION#.img
NOTE: You do not need to format system, cache and data in this case as you are not resizing.
Again, thanks go out to Firerat for these additional notes.
Damn I was going to post this later, well done bro thank you
Sent from my T-Mobile myTouch 3G Slide using XDA App
Many thanks for the clear instructions that were surprisingly easy to follow and the phone did boot up again just fine (as noted in the OP, the boot up took longer the first time around, but there is always
Code:
adb logcat
for anyone worried about what the phone is doing when it looks bored). Total data space is now 320 MB (and sleepykit is one happy kitten).
Many thanks, sir!
Sent from my HTC Espresso running CM6.
Ty very much
Sent from my T-Mobile myTouch 3G Slide using XDA App
@HebrewToYou
very good post
I think it's the clearest I have seen to date
just couple of points which I think would prove useful
Removal
there are two ways to remove customMTD ( to return to stock layout )
the first is to simply flash an unmodified recovery.img
Note You *must* format system, cache and data with clockwork or use
fastboot erase system -w
the second is to edit the mtdpartmap.txt to have a system size of 0
e.g.
echo "mtd 0" > /sdcard/mtdpartmap.txt
flash the recovery patcher
again you must format system, cache and data
Resizing
if you wish to resize
change the mtdpartmap.txt
flash recovery patcher
format system, cache and data
Recovery Upgrade
the easiest way to upgrade recovery is to flash manually
in recovery ( adb shell )
mount /sdcard
flash_image recovery /sdcard/recovery<version>.img
via running recovery ui
flash recovery patcher
Note, you don't need to format system, cache and data, as you are not resizing
Thanks for this!
myTouch 3G Slide using XDA App
Firerat said:
@HebrewToYou
very good post
I think it's the clearest I have seen to date
just couple of points which I think would prove useful
Click to expand...
Click to collapse
Firerat, thank you for the compliment! It means a lot.
I'll add your notes to the second post of the thread.
On Cm based roms you should be able to shrink system to atleast 100, mines is currently 100MB, but actual usage is 89MB(I removed some stuff)
Ace42 said:
On Cm based roms you should be able to shrink system to atleast 100, mines is currently 100MB, but actual usage is 89MB(I removed some stuff)
Click to expand...
Click to collapse
You're free to make system whatever size you like -- my recommendations are just that: recommendations. The size I suggested will likely be large enough to accommodate CM7 when it is released -- I cannot say the same about 100 MB...
Thank you for this clear, concise, well formatted tutorial. Easy to read and follow extra /data/ memory made my day.
nice tutorial. too bad im using cr-mod and current system usage is at 204. does this ever change or does it only change with different roms because I want to shrink it to about 210 but i dont want any hidden surprises
lilshortwun said:
nice tutorial. too bad im using cr-mod and current system usage is at 204. does this ever change or does it only change with different roms because I want to shrink it to about 210 but i dont want any hidden surprises
Click to expand...
Click to collapse
Sense roms always have large system sizes, vanilla ones are normally under 100~. You can always delete some apps from sys that you dont want to shrink it even more, but there should be no hidden traps if you make it 210. I am so happy that we finally have mtd cause i dont use ext anymore and i dont like apps2sd either. On Cm I have 372 in total for data, which is more than enough for me.
does it make the phone faster or just more space to install the app?
chiensibut said:
does it make the phone faster or just more space to install the app?
Click to expand...
Click to collapse
It doesn't make the phone faster... It gives you fine control over how your phone's internal memory is allocated. If you're running a non-stock rom, there's no reason to have such a huge /system partition. This will allow you to remedy that.
thank you for this. didnt even know we had all the extra space on our phones
only thing is i didnt understand what was said about the cache. i noticed my phone was using >60MB so i gave it 80. wish i could have gotten it down to 1.5 like you did
guitarist5122 said:
thank you for this. didnt even know we had all the extra space on our phones
only thing is i didnt understand what was said about the cache. i noticed my phone was using >60MB so i gave it 80. wish i could have gotten it down to 1.5 like you did
Click to expand...
Click to collapse
Cache is not permanently stored data -- it's just a temporary repository. CM6-based roms will bind-mount /cache to /data if the size is too small, which it will be if you set it to 1.5 MB. That way you can repurpose the 80 MB of /cache and put it directly towards /data -- then /data becomes a shared space /data and /cache which is much better (IMHO).
HebrewToYou said:
Cache is not permanently stored data -- it's just a temporary repository. CM6-based roms will bind-mount /cache to /data if the size is too small, which it will be if you set it to 1.5 MB. That way you can repurpose the 80 MB of /cache and put it directly towards /data -- then /data becomes a shared space /data and /cache which is much better (IMHO).
Click to expand...
Click to collapse
ahhhhh, now i get it. thx for breaking it down
Does this make the phone think that space on an SD card is in /data? So if lets say I have a 4GB partition on my sd card I can make the phone think that partition is /data?

F2FS | Improved I/O Performance on /data

For those who don't know what F2FS is, check these links out:
General info
Benchmarks
Warnings
1. Make sure you have a standard kernel for backup that uses ext4 just in case. If anything goes wrong, just install the backup kernel and reboot to recovery.
2. You will have to wipe your /data and /cache partitions for this. Basically factory reset.
3. For 2, you could try to backup data and restore after formatting. I haven't tried this but I could work.
Instructions to format /cache and /data as F2FS:
1. Boot into recovery
2. Install this kernel with F2FS CWM recovery
3. Reboot to recovery again
4. Go to 'Mounts and Storage'
5. Enable "toggle f2fs <-> ext4 migration"
6. Format /data and /cache to F2FS
7. Reboot
And now you have F2FS on /data and /cache :]
To install a new ROM that is not F2FS compatible, edit the updater-script as follows:
1. Replace strings
"mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");"
with string
"run_program("/sbin/busybox", "mount", "/system");"
2. Replace string
"format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0", "/system");"
with string
"run_program("/sbin/mkfs.f2fs", "/dev/block/mmcblk0p3");"
Note: this string needs this patch in ROM
3. Add string
"run_program("/sbin/busybox", "mount", "/data");"
after strings
"run_program("/sbin/mkfs.f2fs", "/dev/block/mmcblk0p3");"
"run_program("/sbin/busybox", "mount", "/system");"
4. Add string
"unmount("/data");"
before string
unmount("/system");
what the benefit of this?
@up
if you read the links you will understand...
Seems faster... and using much more the /cache partition...
zipperX said:
what the benefit of this?
Click to expand...
Click to collapse
Read the first 2 links, mainly the 2nd one. It delivers better I/O performance than what ext4 has to offer.
monstro78 said:
@up
if you read the links you will understand...
Seems faster... and using much more the /cache partition...
Click to expand...
Click to collapse
It uses more /cache because it is a log-based filesystem
For install rom updates, the steps from install this kernel is always format data and cache?
Thanks by advance.
AtEExll
Sent from my GT-I8160 powered by CyanogenMod 11
AtEExll said:
For install rom updates, the steps from install this kernel is always format data and cache?
Thanks by advance.
AtEExll
Sent from my GT-I8160 powered by CyanogenMod 11
Click to expand...
Click to collapse
if you have already formatted to f2fs before, all you have to do is install this kernel again after installing the rom.
@zwliew Only /data for now? How about /system too?
exodius48 said:
@zwliew Only /data for now? How about /system too?
Click to expand...
Click to collapse
i'll work on it. probably have it done within a few days :]
when I try to format my cache partition I always get an error, that formatting was not possible.
also now im not able anymore to write on my /system partition. installing zips and restoring backups are always cancelled... sh***
S.AMU said:
when I try to format my cache partition I always get an error, that formatting was not possible.
also now im not able anymore to write on my /system partition. installing zips and restoring backups are always cancelled... sh***
Click to expand...
Click to collapse
Try re-partioning using this technique http://forum.xda-developers.com/showthread.php?t=2596521
or reflashing via ODIN.
zwliew said:
2. Install this kernel with F2FS CWM recovery
Click to expand...
Click to collapse
Hello! Where I can download separated F2FS CWM image?
ChronoMonochrome said:
Hello! Where I can download separated F2FS CWM image?
Click to expand...
Click to collapse
i believe we don't have separate recovery and boot partitions
zwliew said:
i believe we don't have separate recovery and boot partitions
Click to expand...
Click to collapse
I meant *.cpio image.
ChronoMonochrome said:
I meant *.cpio image.
Click to expand...
Click to collapse
lol i didn't think someone would want that. anyway i don't have it anymore.
zwliew said:
lol i didn't think someone would want that. anyway i don't have it anymore.
Click to expand...
Click to collapse
Is there any way to getting *.cpio image except compiling it from source? I can't extract initramfs from your kernel with f2fs support because it's compiled with LZ4 compression.
zwliew said:
anyway i don't have it anymore.
Click to expand...
Click to collapse
But why f2fs support hasn't been added in your newest kernel releases? it's unstable?
It's possible to format /system as F2FS also or not at the moment ?
No way ??!!!
And: can i use this Kernel for formatting F2FS on my codinap Device ?? Or that will be a brick ?
Many Thanks !!

[Dev][Guide][JB+KK] Dedicated recovery/boot.cpio partition

Hi there!
Today I finally found how to make our codinas' kernels universal, i.e. allow to install kernel on whatever ROM and finally separate recovery from kernel. It's well known, bootloader decides what will be loaded - kernel or recovery. That probably may explain why AnyKernel installer(or other similar) doesn't work on codina, because we can't move recovery partition anywhere.
But there is also a little trick that allow us load recovery and boot.cpio from different partition - https://github.com/ChronoMonochrome/Chrono_Kernel/commit/df9094f1f12618ad9599da266792d6b2f8106170 - just an another approach
Don't worry, we won't touch bootloader at all.
As can be seen, /dev/block/mmcblk0p17 (kernel2 partition) will be used for storing recovery.cpio and boot.cpio. On stock that may not work (I don't know for what exactly uses Kernel2 partition, besides of manually restoring of kernel1 partition. I only know that is almost useless on custom ROMs, and we can use it as we want )
First do some preparations:
Download this kernel and needed recovery/boot scripts(4.4.x.cpio.zip, 4.4.x_f2fs.cpio.zip, etc... 4.4.x.cpio means that it support only ext4) from my google drive (folder ramdisks), unzip recovery (twrp or cwm) and rename to recovery.cpio, then move it to external SD card. Then do it with boot scripts that you've downloaded (e.g. 4.4.x_f2fs.cpio.zip - unzip and rename to boot.cpio)
Well, that all that needs for installation. Read following instruction very carefully, otherwise that may cause brick Keep in mind, all that you do at your own risk! I'm not responsible if you brick your phone!
Installation method:
1) reboot into recovery, plug your phone to your PC, enable adb:
Code:
adb shell
2) Format kernel2 partition to ext4 file system:
Code:
mke2fs -T ext4 /dev/block/mmcblk0p17
Think twice before you hit 'enter' button - wrong command may cause hardbrick!
3) create /ramdisk folder and mount kernel2 partition
Code:
mkdir /ramdisk
mount -t ext4 /dev/block/mmcblk0p17 /ramdisk
move your recovery.cpio and boot.cpio to this folder, give 777 permissions:
Code:
chmod 777 /ramdisk/recovery.cpio
chmod 777 /ramdisk/boot.cpio
4) install downloaded kernel
Now you can change recovery via changing /ramdisk/recovery.cpio - just make a backup of this file, and then replace with one of another recoveries. If you want to install another ROM or change filesystem of partition then replace /ramdisk/boot.cpio with one of needed boot scripts. Don't forget to give 777 permission (probably 644 is enough, but I didn't test it) to both of these files.
This method tested and working on 4.4.x TC ROM + twrp recovery + kernel with full F2FS support.
Well, now it's time to create uncompressed kernel, that may slightly decrease the boot time
@ChronoMonochrome
Thanks. do you mean that kernel2 partition is useless in stock and cyanogenmod firmware?
Is it right that boot loader will read kernel1 partition then it will read system partition? and kernel2 is not necessary for booting?
I have installed new universal kernel (2.5) , so I flashed new ramdisk for 4.4.x , can I roll back to older versions or stock firmware with this ramdisk or I should restore Partition17 backup?
sorset said:
@ChronoMonochrome
Thanks. do you mean that kernel2 partition is useless in stock and cyanogenmod firmware?
Click to expand...
Click to collapse
As it turned out, it's unneeded even on stock. So if you won't restore kernel2 partition, nothing will happen.
Is it right that boot loader will read kernel1 partition then it will read system partition? and kernel2 is not necessary for booting?
I have installed new universal kernel (2.5) , so I flashed new ramdisk for 4.4.x , can I roll back to older versions or stock firmware with this ramdisk or I should restore Partition17 backup?
Click to expand...
Click to collapse
Yes, you can roll back to usual kernels. it doesn't matter what written on kernel2 partition - real kernel or anything else...
ChronoMonochrome said:
As it turned out, it's unneeded even on stock. So if you won't restore kernel2 partition, nothing will happen.
Click to expand...
Click to collapse
Ok, thanks , But why do you mount kernel2 partition inside of OS? As I understand boot.cpio is necessary before booting OS . And inside of OS is just an extra storage! (is that true?)
sorset said:
And inside of OS is just an extra storage! (is that true?)
Click to expand...
Click to collapse
Yes and no, is 16 Mb big enough to be called "storage"? I did it, just to be able replace ramdisks even without booting to recovery. But newest boot scripts doesn't have it.
Ace 2 has 15 - 20 Partitions my Friend
ace2nutzer said:
Ace 2 has 15 - 20 Partitions my Friend
Click to expand...
Click to collapse
And what ? We actually talking about kernel2 partition.
ChronoMonochrome said:
And what ? We actually talking about kernel2 partition.
Click to expand...
Click to collapse
sorry, i meant @sorset
ChronoMonochrome said:
Yes and no, is 16 Mb big enough to be called "storage"? I did it, just to be able replace ramdisks even without booting to recovery. But newest boot scripts doesn't have it.
Click to expand...
Click to collapse
You are right , but I remember days that 1.44MB floppy disk was a large STORAGE and 16MB was HUGE
sry , I have another question , So can I remove its line from fstab to prevent mounting?
I'm confused
boot.img in kernel archive is recovery image that will extract on partition15 (kernel) , but what recovery.cpio exactly is that yu copy on partition17 (kernel2) ?
ace2nutzer said:
Ace 2 has 15 - 20 Partitions my Friend
Click to expand...
Click to collapse
Yes,With counting internal storage , 17 exactly , but thats not the point , I'm afraid.
sorset said:
sry , I have another question , So can I remove its line from fstab to prevent mounting?
Click to expand...
Click to collapse
just redownload bootscripts(kernel/ramdisks), as I said, newest scripts doesn't mount kernel2 partition.
boot.img in kernel archive is recovery image that will extract on partition15 (kernel) , but what recovery.cpio exactly is that yu copy on partition17 (kernel2) ?
Click to expand...
Click to collapse
I don't get it rephrase please
ChronoMonochrome said:
just redownload bootscripts(kernel/ramdisks), as I said, newest scripts doesn't mount kernel2 partition.
I don't get it rephrase please
Click to expand...
Click to collapse
I didn't too
There is an Image named boot.img in kernel flashable zip archive that extracts into partition 15 (named kernel) as I understood is recovery (TWRP or CWM) image and you wont touch linux orginal image , and your modified custom kernel is new modules for linux image that loads while booting (sry, I cant explain fine), So what is recovery.cpio that is in recovery flashable zip image that extracts into partition 17 (named kernel2) ?
sorset said:
as I understood is recovery (TWRP or CWM) image and you wont touch linux orginal image
Click to expand...
Click to collapse
originally kernel + recovery
, and your modified custom kernel is new modules for linux image that loads while booting (sry, I cant explain fine), So what is recovery.cpio that is in recovery flashable zip image that extracts into partition 17 (named kernel2) ?
Click to expand...
Click to collapse
In my mod kernel(mmcblk0p15) and recovery (mmcblk0p17) are splitted.
Thank you. I see.
This is probably the best (and only?) way to rebuild the ramdisk without having to compile anything, which is an excellent base for my NoUMS patches
:good:
<remove>

Android 5.0.1 for Neo....

Hi All,
I found a CM12 Rom for Neo made by a developer called Komhir..... I think it has lot of bugs.... I tried it in my Neo V but it was only for Neo I suppose... Can anyone using Neo check and update what are working...... Below is the link to thread... Since the site was not in English I am posting the Google translate link...
http://translate.google.com/transla...ial-lolipop-5-0-1-cm12-0-legacyxperia-488058/
... for Neo L ?? It is for Neo but you can install it on your Neo V. First you must flash my kernel cm11 and do all wipes with format system. Now from CWM install cm12 and gapps. After this power off the phone and flash right kernel from zip cm12. I only compiled ROM from source from Mike. I dont change anything. Camera, Calling, SMSing dont work. You need partition Ext4 on memory card, becouse all apps will be installed on they. I recomend min. 1 GB and class 10 card.
Hi Komhir
Not Neo L..... I meant Neo..... I am using Neo V and have class 10 card with ext 4 partition done for 2 GB. But still I am unable to flash the ROM.. I shall try in the method you mentioned and will update.... Anyway thanks for your reply ....
Komhir said:
... for Neo L ?? It is for Neo but you can install it on your Neo V. First you must flash my kernel cm11 and do all wipes with format system. Now from CWM install cm12 and gapps. After this power off the phone and flash right kernel from zip cm12. I only compiled ROM from source from Mike. I dont change anything. Camera, Calling, SMSing dont work. You need partition Ext4 on memory card, becouse all apps will be installed on they. I recomend min. 1 GB and class 10 card.
Click to expand...
Click to collapse
Hello,
Thank you for making the CM12, i just want to ask what are the bugs with this?
Can you read?? "Camera Autofocus, Calling, SMSing dont work" itd Rom have a lot of bugs. I will not be exchanged to you all. Try you self and you will be know. Its not for daily use, but for satisfy the curiosity.
Komhir said:
Can you read?? "Camera Autofocus, Calling, SMSing dont work" itd Rom have a lot of bugs. I will not be exchanged to you all. Try you self and you will be know. Its not for daily use, but for satisfy the curiosity.
Click to expand...
Click to collapse
I did read about the non working, i was wondering about this:
http://translate.googleusercontent....LkJrhjK2NhW2795tjMza3RXT4ApalmKjg#post4307267
since he uploaded it for haida and not for hallon, i was referring to that question about the haida.
Atomrat build is for haida and have added overclocking to 2GHz and swap. Kernel from Atomrat you can install on my ROM, becouse date of compilacion is the same
Komhir said:
Atomrat build is for haida and have added overclocking to 2GHz and swap. Kernel from Atomrat you can install on my ROM, becouse date of compilacion is the same
Click to expand...
Click to collapse
Ok, thank you, uhm.. what if i got EXT2 than EXT4 will it be ok? Or do i need EXT4 for that? and what's the difference between the two? Thank you..
I dont now. You can try on EXT2 and write here if it work or not.
Keep getting: "Encryption unsuccessful"
"Encryption was interrupted and can't complete......"
"To resume using your phone, you need to perform a factory reset...."
Any ideias?
"factory reset"??
You must do all wipes with format system.
EDIT: Probably you dont have partition EXT4 on SDcard
- Modified CM11 kernel: fastboot flash boot boot.img - OK
- Wipe data/factory reset. Not All Ok: Message: 'E: format_volume:no MTD partition "userdata"'
- Wipe cache partition: OK
- Wipe dalvik cache: failed to find "userdata" partition to mount at "/data"
- Format /system: OK
- Install cm-12-20141219....zip:
- Finding update package...
-Opening update package....
-Installing update....
-mount: failed to mount /dev/block/mmcblk0p2 at /data: No such file or directory
unmoun of /data failed; no such volume
- Script succeeded: result was [/system]
- Install from sdcard complete.
- new CM12 kernel: fastboot flash boot boot.img - OK
Just tried again. I thought i had worked :'( a message showed asking if I wanted to trust my computer and enable debug (exacly what I need). But it didn't. Then I got the same message as before!
I suppose '/data' missing is important! How can i fix it?!
Flash3001 said:
- Modified CM11 kernel: fastboot flash boot boot.img - OK
- Wipe data/factory reset. Not All Ok: Message: 'E: format_volume:no MTD partition "userdata"'
- Wipe cache partition: OK
- Wipe dalvik cache: failed to find "userdata" partition to mount at "/data"
- Format /system: OK
- Install cm-12-20141219....zip:
- Finding update package...
-Opening update package....
-Installing update....
-mount: failed to mount /dev/block/mmcblk0p2 at /data: No such file or directory
unmoun of /data failed; no such volume
- Script succeeded: result was [/system]
- Install from sdcard complete.
- new CM12 kernel: fastboot flash boot boot.img - OK
Just tried again. I thought i had worked :'( a message showed asking if I wanted to trust my computer and enable debug (exacly what I need). But it didn't. Then I got the same message as before!
I suppose '/data' missing is important! How can i fix it?!
Click to expand...
Click to collapse
What i did is,
- Flash Modified Kernel of Komhir
- Wipe Everything
- Flash the Rom
- Flash the Haida Kernel by atomrat
- Then it's good to go, but please before installing any gapps, you must have EXT-4 because i tried with EXT-2 it doesn't work, no apps has been installed on my system except the one's in the rom.
Thanks for Komhir and Atomrat
Note: The list of the non-working is on their thread, check it, if you can live with your phone like that, then it's fine.
where is the thread ?
where can i download Rom & Gapps
Steps of installation
My device is Xperia Neo Mt15i using cm-11-20141224-UNOFFICIAL-LegacyXperia-hallon
thanks

[DUAL_BOOT]Dual booting an android phone with an extrrnal SD card

So here you come. To read and perform this tutorial, you obviously need a first hand experience on flashing a ROM and/or kernels. Otherwise this tutorial and my efforts to get you a device with two OSes running might end up giving you a bricked device. So, if you're hearing the terms "flashing" or 'kernels' for the first time and thinking it's kinda good food, then bro, just go and taste those first.
Something's to remind before we gonna dig deep into this tutorial->
1> Noone but you will be responsible for what you end up with.
2> The warranty of your device will be voided after this if it isn't already after rooting. For MI users, the good news is that you can reclaim it by just flashing the fastboot ROM for your device.
Enough lectures. Bro let's get to work.
This you'll be needing =>
1> One working Windows PC(because I doesn't know any replacement of bootimg.exe on any other OS. If you know, then let me).
2> A class 10 memory card ( I recommend 32GB for the spaces)
3> A custom ROM and kernel for your phone(the second os)
4> Any custom CWM based recovery installed.(since TWRP is most popular, I will demonstrate using it. You can use any other you want overall process will be the same)
5> ADB, fastboot and the device drivers (easily found in XDA)
PART 1: MODIFYING THE BOOT
At first, how does your device boots up? What are the partitions called /data and /system? The answer is quite simple. It's your kernel that points out the location from where the OS should be picked up. So for booting into the second OS we need some modifications to it at first.
Search and download bootimg.exe on XDA, I'll post a link later. Create two folders. Name them "Internal OS" and "External OS" respectively. Put the zip file of the OS you're currently using to the first one and the OS you're gonna use on the external storage to the second one. Rename the second OS to originalExternalOS.zip. Extract originalExternalOS.zip. Pick the boot.img file from the root of the extracted folder and move it to a new folder named "boot2". Extract the IMG using bootimg.exe. Navigate to the initrd folder and you will get a file named 'fstab".
Basically it's the file that tells the kernel which partition does the OS resides in.
Open the file in your favourite text editor.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
/dev/block/bootdevice/by-name/cache => /dev/block/mmcblk1p4
Save the file without giving any extension to it. Repack it using the same tool. You'll have boot-new.img and boot-old.img. Rename boot-new.img to boot.img and replace the one in the root folder with this. Basically what we're doing here is replacing the old boot.img with the modified one.
For your knowledge, blocks are the partitions of any storage you have on your device. For example, your internal storage is partitioned to near about 30 different blocks each starting with prefix "mmcblk0p". We here just told the kernel to load the OS from the blocks mentioned. We'll be creating these blocks in the external SD card next.
PART 2: PARTITIONING THE SD CARD
Connect your device with the memory card inserted to your PC. If you haven't installed fastboot, ADB, and the drivers, do it now.
READ THE FOLLOWING CAREFULLY
Reboot the device to recovery mode. Type the commands in cmd:
Code:
adb shell
parted
unit MB
print
quit
umount external_sd
Read and store the minimum and maximum capacity of your card. Since different cards will have different capacities I will point it as variable MIN_SIZE and MAX_SIZE. You'll need to calculate and put the values in the commands. Now type the following commands on cmd:
Code:
parted /dev/block/mmcblk1
rm 1
//START_BLOCK = MAX_SIZE - 5000
mkpartfs primary fat32 MIN_SIZE START_BLOCK
//SYS_START = START_BLOCK+1
//SYS_END = SYS_START + 1200
mkpartfs primary ext2 SYS_START SYS_END
//DATA_START = SYS_END+1
//DATA_END = DATA_START + 3500
mkpartfs primary ext2 DATA_START DATA_END
//CACHE_START = DATA_END + 1
mkpartfs primary ext2 CACHE_START MAX_SIZE
//We have partitioned the memory card. Let's format them. Ignore all "Do you wish to continue" question in the next commands as we're already mentioning yes.
mkfs yes 1 fat32
mkfs yes 2 ext2
mkfs yes 3 ext2
mkfs yes 4 ext2
quit
//Now they are almost ready. Just make the newly created blocks readable by the OS.
make_ext4fs /dev/block/mmcblk1p2
make_ext4fs /dev/block/mmcblk1p3
make_ext4fs /dev/block/mmcblk1p4
//Now you get where does the blocks come in the kernel right?
exit
//You've covered up the hardest part. Let's get some coffee and cheeerssss.
PART 3: MODIFYING THE NEW OS
You've left the OS extracted in the "External OS" folder right? It's time to do some magic in it. We're gonna tell the OS to be installed in the blocks we created just like the kernel. But wait, where does the OS know before installing where it should get installed? Well, the answer hides in the updater-script in the folder META-INF > com > google > android. Navigate yourself in it. Open the updater-script file in your favourite editor ( I use notepad++ ) and modify it in the same way as the kernel.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
Leave the /dev/block/bootdevice/by-name/boot as it's the fundamental block and we can't replicate it. Don't think for the /cache partition as we've already done that in the boot.img file. Now navigate to the root of the folder where you extracted the External OS. Select all files, add them to a zip file using WinRAR. Name the file to newOS.zip. Open newOs.zip and originalExternalOS.zip with WinRAR and compare them if you find any change in the folder tree. They must and they should be exactly the same. You're 80% done.
PART 4: MODIFYING THE RECOVERY
We often flash many zips including very popular Xposed and other mods to our OS right? They also look for the /system partition. So what are we gonna do? Modifying each of them? Nah. Let's modify where they get which one the /system is. The recovery. Extract the img of the recovery you're using with the same bootimg.exe. Modify exactly the same things. I.e.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
/dev/block/bootdevice/by-name/cache => /dev/block/mmcblk1p4
in the following files : initrd/fstab.qcom
initrd/etc/recovery.fstab
initrd/etc/twrp.fstab(For TWRP only)
Save them. Repack. And you got your recovery-new.img and recovery-old.img. Put recovery-new.img and newOS.zip in the same folder. Now wake up, it's time for some action.
PART 5 : INSTALLING THE OS
Open cmd in the folder where newOS.zip resides. Reboot the devixe in fastboot mode. Type the following commands:
Code:
adb push newOS.zip external_sd
fastboot flash recovery recovery-new.img
fastboot boot recovery
Now your device should boot up in recovery mode. To check if everything has gone fine mount system using TWRP. Use twrp's built in file manager and navigate to system folder. It's empty? Yup. You've done a great job. Now flash the newOS.zip using TWRP and your device should boot up in the new OS. To cross check again remove the SD card and try to boot. If you're headed towards recovery or bootloop after that then it's a win. Put the SD card back again and watch the new OS to boot.
PART 6: SWITCHING BETWEEN THE TWO
Extract the boot.img from the "Internal OS" zip file and put it together with recovery-old.img. To check if your old system is untouched type the following commands in fastboot mode:
Code:
fastboot flash recovery recovery-old.img
fastboot flash boot boot.img
fastboot boot system
Your device should take you back to the old one. Surprised? Now let's make a switch between the two. There are two methods.
METHOD 1: USING FLASHIFY
Create two folders in your SD card. Put boot.img and recovery-old.img to one and boot-new.img and recovery-new.img to the other. To switch to the external OS, just flash boot-new.img as boot and recovery-new.img using flashify. Ignore reboot now dialog and reboot directly to the system. To go back, first install flashify in the new OS and flash boot.img and recovery-old.img. Easy right?
METHOD 2: USING ZIPS
I'm gonna tell you that tomorrow as I can write no more today.
More to come....
CREDITS:
justzzshadz from MIUI forum for this revolutionary concept. @iamsubhranil for adding TWRP support and rewriting the tutorial.
Unnecessary
Continuation2
........
reserved
For future posts.
reserved
For future posts
"External" is spelled wrong in the title.
God of War™ said:
"External" is spelled wrong in the title.
Click to expand...
Click to collapse
If you read the whole tutorial, then that just doesn't matter
God of War™ said:
"External" is spelled wrong in the title.
Click to expand...
Click to collapse
Have you tried it?
bootimg.exe
"bootimg.exe on any other OS. If you know, then let me)."
please, send bootimg.exe
tim241 said:
Thanks!!
Click to expand...
Click to collapse
Why you quoted the whole post only to say thanks? That thank you button under the post isn't enough?
tim241 said:
Thanks!!
Click to expand...
Click to collapse
Tried?
fstab not found there is a file named fstab.qcom??????
keerten said:
fstab not found there is a file named fstab.qcom??????
Click to expand...
Click to collapse
Try MultiROM man
iamsubhranil said:
Try MultiROM man
Click to expand...
Click to collapse
Ok Bro
iamsubhranil said:
Try MultiROM man
Click to expand...
Click to collapse
Bro, you are working on EFIDROID. Can you give us update that project
abhianand123 said:
Bro, you are working on EFIDROID. Can you give us update that project
Click to expand...
Click to collapse
I've already told it to some people. The project is currently stun for some complications. Will resume.
Pretty useful. Thanks a lot.
Am I right, that when the memory chip on the motheboard holding /system and /userdata partitions died, I can boot the phone from sdcard using this method? I have HM2014813 variant of Redmi 2.
EDIT: I tried this method but I need to use fastboot boot modified.img to boot my phone. Any ideas how to avoid this step?
tulen_kobi said:
Am I right, that when the memory chip on the motheboard holding /system and /userdata partitions died, I can boot the phone from sdcard using this method? I have HM2014813 variant of Redmi 2.
EDIT: I tried this method but I need to use fastboot boot modified.img to boot my phone. Any ideas how to avoid this step?
Click to expand...
Click to collapse
I too have same problem 0 mb internal stoarage
/sbin/sh: parted: not found
---------- Post added at 03:49 PM ---------- Previous post was at 03:43 PM ----------
warrenlobo said:
I too have same problem 0 mb internal stoarage
/sbin/sh: parted: not found
Click to expand...
Click to collapse
they are missing i guess
warrenlobo said:
I too have same problem 0 mb internal stoarage
/sbin/sh: parted: not found
---------- Post added at 03:49 PM ---------- Previous post was at 03:43 PM ----------
they are missing i guess
Click to expand...
Click to collapse
There is no parted on the device anymore, you need to preparation your sdcard on your computer. Do you use Windows or Linux on your pc?
If Windows try to use: FWUL to partition your sdcard.

Categories

Resources