Jump to content


Photo

[solved,tutorial updated]Dual boot possibility...


  • Please log in to reply
16 replies to this topic

#1
Archer_cn

Archer_cn

    Regular

  • Members
  • PipPip
  • 64 posts
  • Devices:ZTE Racer

Hi all, I just wonder if anyone have interest in this.
As we all know, GB has less battery consumption and more smoothness while ICS+ have more features and better looks.
And technically it's possible to have both system install in our phones. I think all need to do is to hack the recovery a little bit and then can install a send rom in internal SDcard.
I hope someone, Romers, developers, anyone ,, can make this happen, 'cause I ( myabe not just me)really like it but I'm a nooob for this..
Search "boot manage" on Play market you can also see apps that serve this purpose(unfortunately G300 not supported).


Finally I manage to do it on my G300. It works, now I have Stock GB & ICS installed

 

Here is a how to tutorial, Please do read ervery detail and do it carefully if you want to proceed.

 

How it works: make internal sd smller so have free space to make 2 new partitons(system&data);, then modify boot.img(init.rc) to change default mount point to new partitions, and flash new boot.img to recovery block..Thus we lost recovery program but boot to new os. There's a way to keep both, but i don't konw how and no time to figure it out. so you can see , default os is not affected, can always start you phone with no problem.

 

 

update:

1. KK doesn't mount internal SD。same in newest recovery using kernel 3.4. 

2.script to switch systems,recovery:

(1) reboot recovery               #reboot to recovery or OS2

(2)dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p16               #flash recovery ( be careful with dd command, make sure you write the correct partition!)

(3)dd if=/sdcard/boot2.img of=/dev/block/mmcblk0p16                    #flash sencond boot image to recovery for OS2 to boot.

(4)reboot oem-1                   # reboot to bootloader(fastboot)mode in case you want to flash something via fastboot.

 

you can save these scripts in gscipt for convenient use.( here assume you have recovery.img & boot2.img under /sdcard)

 

 

Edit: 1. if you don't want to touch internal storage for safety reason, can just do it on external sd( mmcblk1p1).make 3 primary partiton(fat32 first), it shall work too.

        2. second os must be ICS+.

 

 

Ok, Steps

 

1. Backup your internal SD data, because all data on it will be lost

2. boot your phone into recovery, connect phone with PC, and open a CMD window

3. Re-partition internal SD

adb shell
su
fdisk /dev/block/mmcblk0
p

then you should see current internal storage partitions;

Attached File  p.jpg   100.87KB   20 downloads

 

on G300 the correspondence is

mmcblk0p12-------system

mmcblk0p13-------Data

mmcblk0p15-------boot

mmcblk0p16-------recovery

mmcblk0p19-------internal SD only list the partitions that matters)

 

all we need to change is mmcblkop19!!! don't touch any other partitions

First, we need to delete mmcblkop19,

in CMD window, enter d, then 19

Command (m for help): [6nd
19
 

Now Create a new internal SD partition with smaller size.(it's very necessary to have a internal sd on most ROMs) the size is up to you.

Here I make a 500MB size for internal sd(mmcblk0p19)400M (second)system, and the rest for (second)Data.

 

Notes: 1). fdisk usagem for help d to delete a partiton, n to create new partition, p to print partition info, w to save all changes!

           2). First cylinder should be upper partition's last cylinder+2. ( it should be +1,but here don't know why have to be 2).

Command (m for help): [6np
p

Disk /dev/block/mmcblk0: 3909 MB, 3909091328 bytes
1 heads, 16 sectors/track, 477184 cylinders
Units = cylinders of 16 * 512 = 8192 bytes

              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1   *           1           3          20  4d Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2               3          41         300  45 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3              41       16681      133120   c Win95 FAT32 (LB
A)
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4           16681      477184     3684031+  5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5           16897       18432       12288  6a Unknown
/dev/block/mmcblk0p6           18433       43008      196608  83 Linux
/dev/block/mmcblk0p7           43009       43520        4096  63 GNU HURD or Sys
V
/dev/block/mmcblk0p8           43521       43904        3072  58 Unknown
/dev/block/mmcblk0p9           44033       44544        4096  46 Unknown
/dev/block/mmcblk0p10          44545       44928        3072  4a Unknown
/dev/block/mmcblk0p11          45057       45440        3072  4b Unknown
/dev/block/mmcblk0p12          45569       94720      393216  83 Linux
/dev/block/mmcblk0p13          94721      193024      786432  83 Linux
/dev/block/mmcblk0p14         193025      193536        4096  47 Unknown
/dev/block/mmcblk0p15         193537      194560        8192  48 Unknown
/dev/block/mmcblk0p16         194561      197120       20480  60 Unknown
/dev/block/mmcblk0p17         197121      197632        4096  6c Unknown
/dev/block/mmcblk0p18         197633      207872       81920  83 Linux

Command (m for help): [6nn
n
First cylinder (16682-477184, default 16682): [6n207874
207874
Last cylinder or +size or +sizeM or +sizeK (207874-477184, default 477184): [6n
+500M
+500M

Command (m for help): [6np
p

Disk /dev/block/mmcblk0: 3909 MB, 3909091328 bytes
1 heads, 16 sectors/track, 477184 cylinders
Units = cylinders of 16 * 512 = 8192 bytes

              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1   *           1           3          20  4d Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2               3          41         300  45 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3              41       16681      133120   c Win95 FAT32 (LB
A)
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4           16681      477184     3684031+  5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5           16897       18432       12288  6a Unknown
/dev/block/mmcblk0p6           18433       43008      196608  83 Linux
/dev/block/mmcblk0p7           43009       43520        4096  63 GNU HURD or Sys
V
/dev/block/mmcblk0p8           43521       43904        3072  58 Unknown
/dev/block/mmcblk0p9           44033       44544        4096  46 Unknown
/dev/block/mmcblk0p10          44545       44928        3072  4a Unknown
/dev/block/mmcblk0p11          45057       45440        3072  4b Unknown
/dev/block/mmcblk0p12          45569       94720      393216  83 Linux
/dev/block/mmcblk0p13          94721      193024      786432  83 Linux
/dev/block/mmcblk0p14         193025      193536        4096  47 Unknown
/dev/block/mmcblk0p15         193537      194560        8192  48 Unknown
/dev/block/mmcblk0p16         194561      197120       20480  60 Unknown
/dev/block/mmcblk0p17         197121      197632        4096  6c Unknown
/dev/block/mmcblk0p18         197633      207872       81920  83 Linux
/dev/block/mmcblk0p19         207874      268909      488288  83 Linux

Command (m for help): [6nn
n
First cylinder (268911-477184, default 268911): [6n268911
268911
Last cylinder or +size or +sizeM or +sizeK (268911-477184, default 477184): [6n
+400M
+400M

Command (m for help): [6np
p

Disk /dev/block/mmcblk0: 3909 MB, 3909091328 bytes
1 heads, 16 sectors/track, 477184 cylinders
Units = cylinders of 16 * 512 = 8192 bytes

              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1   *           1           3          20  4d Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2               3          41         300  45 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3              41       16681      133120   c Win95 FAT32 (LB
A)
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4           16681      477184     3684031+  5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5           16897       18432       12288  6a Unknown
/dev/block/mmcblk0p6           18433       43008      196608  83 Linux
/dev/block/mmcblk0p7           43009       43520        4096  63 GNU HURD or Sys
V
/dev/block/mmcblk0p8           43521       43904        3072  58 Unknown
/dev/block/mmcblk0p9           44033       44544        4096  46 Unknown
/dev/block/mmcblk0p10          44545       44928        3072  4a Unknown
/dev/block/mmcblk0p11          45057       45440        3072  4b Unknown
/dev/block/mmcblk0p12          45569       94720      393216  83 Linux
/dev/block/mmcblk0p13          94721      193024      786432  83 Linux
/dev/block/mmcblk0p14         193025      193536        4096  47 Unknown
/dev/block/mmcblk0p15         193537      194560        8192  48 Unknown
/dev/block/mmcblk0p16         194561      197120       20480  60 Unknown
/dev/block/mmcblk0p17         197121      197632        4096  6c Unknown
/dev/block/mmcblk0p18         197633      207872       81920  83 Linux
/dev/block/mmcblk0p19         207874      268909      488288  83 Linux
/dev/block/mmcblk0p20         268911      317739      390632  83 Linux

Command (m for help): [6nn
n
First cylinder (16682-477184, default 16682): [6n317741
317741
Last cylinder or +size or +sizeM or +sizeK (317741-477184, default 477184): [6n

Using default value 477184

Command (m for help): [6np
p

Disk /dev/block/mmcblk0: 3909 MB, 3909091328 bytes
1 heads, 16 sectors/track, 477184 cylinders
Units = cylinders of 16 * 512 = 8192 bytes

              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1   *           1           3          20  4d Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2               3          41         300  45 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3              41       16681      133120   c Win95 FAT32 (LB
A)
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4           16681      477184     3684031+  5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5           16897       18432       12288  6a Unknown
/dev/block/mmcblk0p6           18433       43008      196608  83 Linux
/dev/block/mmcblk0p7           43009       43520        4096  63 GNU HURD or Sys
V
/dev/block/mmcblk0p8           43521       43904        3072  58 Unknown
/dev/block/mmcblk0p9           44033       44544        4096  46 Unknown
/dev/block/mmcblk0p10          44545       44928        3072  4a Unknown
/dev/block/mmcblk0p11          45057       45440        3072  4b Unknown
/dev/block/mmcblk0p12          45569       94720      393216  83 Linux
/dev/block/mmcblk0p13          94721      193024      786432  83 Linux
/dev/block/mmcblk0p14         193025      193536        4096  47 Unknown
/dev/block/mmcblk0p15         193537      194560        8192  48 Unknown
/dev/block/mmcblk0p16         194561      197120       20480  60 Unknown
/dev/block/mmcblk0p17         197121      197632        4096  6c Unknown
/dev/block/mmcblk0p18         197633      207872       81920  83 Linux
/dev/block/mmcblk0p19         207874      268909      488288  83 Linux
/dev/block/mmcblk0p20         268911      317739      390632  83 Linux
/dev/block/mmcblk0p21         317741      477184     1275552  83 Linux

Command (m for help): [6n

now, last step, save all changes. before you do this ,make sure that no other partitions but old mmcblk0p19 are touched!

Command (m for help): [6nw

4. Format new partitions.

reboot to recovery again.

use adb..

adb shell
# mke2fs -T ext4 -b4096 -m 0 /dev/block/mmcblk0p20
# mke2fs -T ext4 -b4096 -m 0 /dev/block/mmcblk0p21

5. make a new rom for new partitons.

1). we need to edit boot.img. can use android kitchen,unpack boot.img  to edit init.rc, replace all mmcblk0p12 with mmcblk0p20

mmcblk0p13 to mmcblk0p21, then repack boot.img.

2).updater script in a zip rom (META-INF\com\google\android\updater-script)

add these 2 lines to the beginning

unmount("/data");
unmount("/system");

and replacement:

mmcblk0p12 >> mmcblock0p20
mmcblk0p13 >> mmcblk0p21
mmcblk0p15 >> mmcblk0p16

done. repack rom with new boot.img and flash it to second system...Then when you enter recovery, you actually booting the second android os.

Normal reboot will boot into default os.

 

There's a better way to switch os with script , will update later..

 

 

Here is the slimv13 rom I moded to fit new partitions,if you already done the repartition, flash this via recovery and then reboot into recovery, you should see it booting.

Moded ROM Download:

http://www.speedysha...Moded-2ndOS.zip


Edited by Archer_cn, 25 March 2014 - 05:28 AM.

  • 3

#2
Paulzie

Paulzie

    Regular

  • Members
  • PipPip
  • 101 posts
  • Devices:Huawei G300
Am curious if you get it working though I have no interest in going to GB from ICS. I found ICS (when overclocked and tweaked) performs great. Eg: Slim, Stock plus or MIUI 2.7.6 ROMs.

More of an issue with performance are newer MIUI V5 or JB ROMs. So would be curious on your findings as any success would allow me to keep running my production ICS OS and test newer revisions of those ROMs to see if they've improved performance.

  • 0
Huawei G300 ICS MIUI V4 2.7.6: fast, smooth, plenty of RAM & themes | Prev: Baidu, Stock+, Tesla, misc JB | Aussie 3G modems

#3
Archer_cn

Archer_cn

    Regular

  • Members
  • PipPip
  • 64 posts
  • Devices:ZTE Racer

Am curious if you get it working though I have no interest in going to GB from ICS. I found ICS (when overclocked and tweaked) performs great. Eg: Slim, Stock plus or MIUI 2.7.6 ROMs.

More of an issue with performance are newer MIUI V5 or JB ROMs. So would be curious on your findings as any success would allow me to keep running my production ICS OS and test newer revisions of those ROMs to see if they've improved performance.



Now I do find a way to do it. just use fdisk command to re-partition internal SD to 2 extra partition as System & Data for 2nd OS. and a little modification to the boot.img and CWM updater-script ,then can install ICS+ rom on internal memory.

  • 0

#4
dalyer

dalyer

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 2,258 posts
  • Gender:Male
  • Location:Dublin, Ireland
  • Devices:Haier W910, Coolpad F1 8297W

Now I do find a way to do it. just use fdisk command to re-partition internal SD to 2 extra partition as System & Data for 2nd OS. and a little modification to the boot.img and CWM updater-script ,then can install ICS+ rom on internal memory.

 

Any chance of a tutorial/guide?


  • 0

#5
Davidosky99

Davidosky99

    Enthusiast

  • Members
  • PipPipPip
  • 182 posts
  • Gender:Male
  • Location:Porto, Portugal
  • Interests:Android Programming and Developing
    Windows and Linux Programming
  • Devices:Huawei Ascend G300
  • Twitter:@Davidosky99

any modification on bootloader.

did tou ported grub from linux to android?


  • 0

Davidosky99

 

Don't forget to thanks if I helped you ;)

 

Phones i have used:

Nokia 2690

Huawei G6608

Vodafone Smart 2

Samsung Galaxy S i9000

Huawei Ascend G300

Wiko Darkfull :D

 

 

ROM's i have used(on Huawei Ascend G300):

Stock( for 1 day :D )

CyanogenMOD 9, 10, 10.1, 10.2

AOKP

SlimBean

Paranoid Android

Matrix ROM(work of a life :D )

 

 

 


#6
mnupea

mnupea

    Regular

  • Members
  • PipPip
  • 118 posts
  • Gender:Male
  • Location:Mallorca, Balearic Islands, Spain
  • Interests:Programing, Android and all related to tecnology.
  • Devices:Huawei Ascend G300
  • Twitter:@manuLpea

really? Is that safe? Cuz daz told that was possible but dangerous


  • 0

If you like my work you can donate me :D

btn_donateCC_LG.gif


#7
kyan31

kyan31

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 3,885 posts
  • Gender:Male

Now I do find a way to do it. just use fdisk command to re-partition internal SD to 2 extra partition as System & Data for 2nd OS. and a little modification to the boot.img and CWM updater-script ,then can install ICS+ rom on internal memory.


Lol, couldn't you make a video or something as this is a pretty big find?

  • 2

e2199c4dbb.png823c51b6b0.pngc3f6e04cdb.pngbc36a18046.pngead60d1912.pnge46a22ae54.png

 

Phones: Samsung Galaxy S4 Qualcomm & Huawei Ascend G300

PC: AMD FX 8350 8 CORE 4.2Ghz CPU, 16GB 1600Mhz Kingston HyperX RAM, Gigabyte R9 270X Winforce Edition GPU

Like my work? Hit that +1 button as a thank you! Want to support me? You could consider donating!  :)

Subscribe to my YT Channel: https://www.youtube.com/user/thekyan31


#8
ToKro

ToKro

    Newbie

  • Members
  • Pip
  • 33 posts
  • Gender:Male
  • Location:Beroun, Czech Republic
  • Interests:PC games, photo, reading, of course my G300 ;)
  • Devices:Ascend G300 CM11 KitKat
  • Twitter:@ToKroCZ

Wow, can you make tutorial or something like that?


  • 1
Sorry for my english ;)

#9
laurisss

laurisss

    Enthusiast

  • Members
  • PipPipPip
  • 155 posts
  • Gender:Male
  • Location:Lithuania
  • Interests:Girls :3
  • Devices:Huawei Ascend G300

Yeah you have to make a tut or something , that's amazing :blink:

gingerbread and kitkat .. hmmm.


  • 0

CPU: AMD FX 8350 Black Edition | GPU: AMD R9 270 | MOBO: ASRock 990FX Extreme 3 | RAM: Kingston HyperX 8GB 1600Mhz | Case: X Predator X1 |CPU COLLER: Zalman CNPS5X


#10
mnupea

mnupea

    Regular

  • Members
  • PipPip
  • 118 posts
  • Gender:Male
  • Location:Mallorca, Balearic Islands, Spain
  • Interests:Programing, Android and all related to tecnology.
  • Devices:Huawei Ascend G300
  • Twitter:@manuLpea

yh. or just proove that it's not fake with a video. Seems hard to belive tbh


  • 0

If you like my work you can donate me :D

btn_donateCC_LG.gif


#11
Archer_cn

Archer_cn

    Regular

  • Members
  • PipPip
  • 64 posts
  • Devices:ZTE Racer

no, I won't post a video, don't have time for that and no interest. But I'll update post with a short version of [how to]

 

yh. or just proove that it's not fake with a video. Seems hard to belive tbh


  • 1

#12
ToKro

ToKro

    Newbie

  • Members
  • Pip
  • 33 posts
  • Gender:Male
  • Location:Beroun, Czech Republic
  • Interests:PC games, photo, reading, of course my G300 ;)
  • Devices:Ascend G300 CM11 KitKat
  • Twitter:@ToKroCZ

Thank you for this tutorial! But is there any way to get recovery back? And can I use KitKat and GB together? If yes, which one should I install as second one?


Edited by ToKro, 21 March 2014 - 05:19 AM.

  • 1
Sorry for my english ;)

#13
hippy dave

hippy dave

    Diehard

  • Members
  • PipPipPipPip
  • 464 posts
  • Gender:Male
  • Devices:G300, Hudl
Interesting, thanks for sharing! Looking forward to seeing the script boot method.

  • 0

#14
hippy dave

hippy dave

    Diehard

  • Members
  • PipPipPipPip
  • 464 posts
  • Gender:Male
  • Devices:G300, Hudl
Any luck with the alternate method to retain the recovery?

  • 0

#15
vahit.lafci

vahit.lafci

    Newbie

  • Members
  • Pip
  • 40 posts
  • Devices:u8816
You can boot 2nd os from bootloader instead of recovery i think.
Edit: sorry this isnt possible. Can we contact with boot manager app's developer?

Edited by vahit.lafci, 10 May 2014 - 10:39 PM.

  • 0

#16
vahit.lafci

vahit.lafci

    Newbie

  • Members
  • Pip
  • 40 posts
  • Devices:u8816
Hi guys i have 8gb class10 sd card. İ flashed system data and cache. İm using cm 10.1 rom is working fast enough. Also i modified TWRP fstab file i can flash zips and using backup restore function. It is awesome :)

  • 0

#17
ToKro

ToKro

    Newbie

  • Members
  • Pip
  • 33 posts
  • Gender:Male
  • Location:Beroun, Czech Republic
  • Interests:PC games, photo, reading, of course my G300 ;)
  • Devices:Ascend G300 CM11 KitKat
  • Twitter:@ToKroCZ

Hi guys i have 8gb class10 sd card. İ flashed system data and cache. İm using cm 10.1 rom is working fast enough. Also i modified TWRP fstab file i can flash zips and using backup restore function. It is awesome :)

So you created new partitions on sdcard insted of internal storage reserved for recovery? So you have 2 systems + recovery too? Can u make simple tutorial?


  • 0
Sorry for my english ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users