[Dualboot] i9082 {Stock 4.2.2/AOSP 4.4.2 and AOSP 4.4.2} 23032014 V2

k2wl

Senior Member
Apr 19, 2008
3,166
7,573
0
Hi guys,

finally I found a way to make dualboot on our beloved i9082 working!!

This way isn't as much easy as on other devices like the desire HD where
you have just to install an app and everything is done by itself, so follow this
guide at your own risk!!

THIS IS WORST RISK YOU TAKE FOR YOUR PHONE>>>>
IT MAY BRICK YOUR PHONE.....
DONT DO IT IF YOU DONT KNOW WHAT YOU DOING...

How to dual boot your I9082...


1. Make a backup of your internal sdcard to your PC!! All your data on the sd card will be gone!
2. Reboot to cwm-recovery
3. connect your phone to your pc.
4, open up cmd or a terminal and type:

PHP:
adb shell

5. type:


PHP:
cd /dev/block 
parted mmcblk0 
print


This looks like following


Code:
print

Model: MMC M8G1WA (sd/mmc) 
Disk /dev/block/mmcblk0: 7818MB 
Sector size (logical/physical): 512B/512B 
Partition Table: gpt 

Number  Start   End     Size    File system  Name           Flags 
 1      14.7MB  15.7MB  1049kB               cal 
 2      15.7MB  16.0MB  262kB                sysparm_dep 
 3      16.0MB  16.3MB  262kB                parm-spml_dep 
 4      16.3MB  16.5MB  262kB                RF_CAL_FILE 
 5      16.5MB  24.9MB  8389kB               KERNEL 
 6      24.9MB  33.3MB  8389kB               RECOVERY 
 7      33.3MB  53.0MB  19.7MB               modem 
 8      53.0MB  86.2MB  33.3MB               reserved 
 9      86.2MB  88.3MB  2097kB               SBL1 
10      88.3MB  90.4MB  2097kB               SBL2 
11      90.4MB  98.8MB  8389kB               PARAM 
12      98.8MB  99.4MB  524kB                DTSBK 
13      99.4MB  99.9MB  524kB                DTS 
14      99.9MB  108MB   8389kB               VC-FirmwareBK 
15      108MB   117MB   8389kB               VC-Firmware 
16      117MB   117MB   262kB                FOTA_SIG 
17      117MB   138MB   21.0MB  ext4         efs 
18      138MB   1212MB  1074MB  ext4         CSC 
19      1212MB  2822MB  1611MB  ext4         system 
20      2822MB  3409MB  587MB   ext4         HIDDEN 
21      3409MB  7813MB  4404MB  ext4         data
The last partiton i.e data partion which is our internal SD card to be re partitioned .

6. Type
PHP:
rm 21
7. Note the start and end of the data partiton. In my case its 3409 and 7813
Firstly we have to create data partition. See the size of system partition i.e 1024 MB. So the new partion will be as follows

PHP:
mkpartfs primary ext2 3409 4433
second is system 2 partition
PHP:
mkpartfs primary ext2 4433 6044


next is cache2 partion

PHP:
mkpartfs primary ext2 6044 6744

next is data2 partion
Code:
mkpartfs primary ext2 6744 7813
Code:
quit
It will say

Code:
quit
Information: You may need to update /etc/fstab.
Ignore the warning Reboot into recovery again on pc type

Code:
adb shell 
mke2fs /dev/block/mmcblk0p21 
tune2fs -j /dev/block/mmcblk0p21 
mke2fs /dev/block/mmcblk0p22 
tune2fs -j /dev/block/mmcblk0p22 
mke2fs /dev/block/mmcblk0p23 
tune2fs -j /dev/block/mmcblk0p23
mke2fs /dev/block/mmcblk0p24 
tune2fs -j /dev/block/mmcblk0p24
This will create ext3 partition from ext2

Now convert them to ext4

Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p21 
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p22 
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p23 
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p24
Now lets check everything is ok
Code:
  cd /dev/block 
parted mmcblk0 
print
This should look like following

Code:
print 
Model: MMC M8G1WA (sd/mmc) 
Disk /dev/block/mmcblk0: 7818MB 
Sector size (logical/physical): 512B/512B 
Partition Table: gpt 

Number  Start   End     Size    File system  Name           Flags 
 1      14.7MB  15.7MB  1049kB               cal 
 2      15.7MB  16.0MB  262kB                sysparm_dep 
 3      16.0MB  16.3MB  262kB                parm-spml_dep 
 4      16.3MB  16.5MB  262kB                RF_CAL_FILE 
 5      16.5MB  24.9MB  8389kB               KERNEL 
 6      24.9MB  33.3MB  8389kB               RECOVERY 
 7      33.3MB  53.0MB  19.7MB               modem 
 8      53.0MB  86.2MB  33.3MB               reserved 
 9      86.2MB  88.3MB  2097kB               SBL1 
10      88.3MB  90.4MB  2097kB               SBL2 
11      90.4MB  98.8MB  8389kB               PARAM 
12      98.8MB  99.4MB  524kB                DTSBK 
13      99.4MB  99.9MB  524kB                DTS 
14      99.9MB  108MB   8389kB               VC-FirmwareBK 
15      108MB   117MB   8389kB               VC-Firmware 
16      117MB   117MB   262kB                FOTA_SIG 
17      117MB   138MB   21.0MB  ext4         efs 
18      138MB   1212MB  1074MB  ext4         CSC 
19      1212MB  2822MB  1611MB  ext4         system 
20      2822MB  3409MB  587MB   ext4         HIDDEN 
21      3409MB  4433MB  1024MB  ext4 
22      4433MB  6044MB  1611MB  ext4 
23      6044MB  6744MB  700MB   ext4 
24      6744MB  7813MB  1069MB  ext4
Then

Code:
quit
Now flash your first stock ROM..ofcource custom one from recovery.

Now You can flash your desired AOSP rom as primary and dualboot enabled secondary rom.
Scripts to switch roms has been updated.

Download following dualboot enabled AOSP rom by me CosmicCm

http://www.androidfilehost.com/?fid=23329332407579496



Download following tool kit and extract on your External sd card for AOSP rom and in Internal SD for your stock rom.

http://www.androidfilehost.com/?w=files&flid=12981

Install smanager (os.tools.scriptmanager-1.apk) in zip.

Instructions on ROM switching:

1. Go to Play Store and install SManager (or included in dualboot-k2wl-V2.zip)
2. Run SManager, browse to your DualBoot folder and select "StockPrimary.sh/AOSPprimary.sh" or "AOSPSecondary.sh". depending upon which rom you want to boot into.
3. Mark favourite and su options and run the script.
4. Optional - SManager has a homescreen widget system. It lets you add buttons in your homescreens that will directly run the linked script (it has to be put in favourites first).


AGAIN this is a nuclear level risky procedure and is for ADVANCE users only....
DO NOT TRY IF YOU DONT KNOW WHAT YOU ARE DOING.......

Bugs:-
Your data partitions will be small about 1 GB.
External SD card not working in stock rom.

More?>..... You telll me...

HAPPY FLASHING.....:p:eek:

Credits:-

dreccon
berni987654321
51dusty

and for best inspiration and beta tester....:eek:
xenon92
 
Last edited:

k2wl

Senior Member
Apr 19, 2008
3,166
7,573
0
Reverting

To revert

Boot into recovery

start

Code:
adb shell

Code:
cd /dev/block
parted mmcblk0

print

rm 24

rm 23

rm 22

rm 21

Code:
mkpartfs primary ext2 3409 7813
Code:
quit

Reboot into recovery again

on pc type

Code:
adb shell

mke2fs /dev/block/mmcblk0p21
tune2fs -j /dev/block/mmcblk0p21

tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p21
now you reverted back.
 
Last edited:

himuslg123

Senior Member
Jul 9, 2012
303
88
28
thanks for the tutorials k2wl :)

but I have a doubt

suppose ..I have installed 2 roms

now if I want to flash a mod zip( i.e pagapps or so) file for a specific rom via CWM recovery ...ll they be installed on a specific partition for a specific rom ?
 

k2wl

Senior Member
Apr 19, 2008
3,166
7,573
0
for second rom its a problem, i.e AOSP.
thats why i included gapps core in CosmicCM dual boot rom.
for original primary rom stock, you can flash any mods you want.

Give me links for the mods and gapps you wanted.
i will change them into dual boot...
 
Last edited:

raghavsharmaxda

Senior Member
Dec 14, 2013
852
397
0
25
mumbai
for second rom its a problem, i.e AOSP.
thats why i included gapps core in CosmicCM dual boot rom.
for original primary rom stock, you can flash any mods you want.
Give me links for the mods and gapps you wanted.
i will change them into dual boot...
Well ..first thanks for this procedure..the more i thank u , the less it would be mahn!..
Now, as u say that u will help guys for mods to dual boot too, the only thing i flash after ur roms is ur kernel :p... I dont think its already in there in cosmic rom,And cant live without evolution kernel mahn :|..but i think kernel flashing will screw things up right??
 

RIPPER

Senior Member
Sep 5, 2012
972
557
123
From Heavens
yes it might screw things up..
bt dont worry i will add option for evaluation dualboot kernel soon.
this is work in progress.
will add more options...
general question plss..y kernel is not put as a default in ROM( I mean ur kernel and ur ROM).

Though it will not allow users of RR and carbon to use this kernel. just of curosity:confused:
 

wiryawang

Senior Member
Apr 22, 2013
227
38
0
Any possibility for a GUI apps or flashable zip to do all this procedure of dual boot in future development? What I mean is like GUI apps of EFS backup
 

k2wl

Senior Member
Apr 19, 2008
3,166
7,573
0
Any possibility for a GUI apps or flashable zip to do all this procedure of dual boot in future development? What I mean is like GUI apps of EFS backup
No...not so soon...
firstly this is risky procedure
and second
i like commandline better.
better control and fast..
so i cant help you with this.
 
  • Like
Reactions: wiryawang