[DEV] Dual booting on Desire HD

Search This thread

michyprima

Senior Member
Sep 30, 2007
1,268
157
twitter.com
Welcome to the first dual boot menu for Desire HD

What it is, and what it does.
It is nothing more than a C-written executable which will start at your phone boot waiting for you to make a choice. When you choose, it will init the android you want. That lets you to have 2 android install, one on nand, one on sdcard, without booting through fastboot or switching boot.img

Wonderful. What I need to make it working?
Basically you need nothing more than a SD card and your desire HD.

You said I need an sd card. I need to prepare it somehow?
Yes, you do. You will need a tool which supports creating fat32 and ext4 partitions. There are a couple for windows (EASEUS). If you have linux, it is included in your distro for sure. Your partition table should look like this:

In order: archiving (photo, videos etc), system, cache, data.
Sizes are of your choice. Remember to not make them too small anyway.

Are you booting two different kernels for sense and nosense roms? I know theres a difference.
Well...no. Since you can not swap kernels at runtime, you will have to use one kernel for both. I will post 2 version though. One for sense and one for nosense. If you intend to boot sense roms, then you must choose a sense kernel. No-sense roms will be able to boot with the sense kernel though, but will need a fix for the bluetooth. I will post some way to make this as easier as possible.

So if I want to run at the same time a sense rom and an aosp based rom I will have to keep the sense kernel?
Absolutely, or the sense rom will not boot at all (unless you fix it somehow).

DEMO:
View full screen to see the sentences on my phone's screen.

Download:
f7e92db13730066329f5e78609e03b32 dualboot-1.0.zip
No mirroring so I can keep track of some statistics :)
 
Last edited:

michyprima

Senior Member
Sep 30, 2007
1,268
157
twitter.com
HOW TO 1: Partitioning with Minitool Partition Wizard 6 Home Edition​
  1. Locate your sdcard in the list
  2. Right click, delete all partitions
  3. Right click, create
  4. Select the size you wish
  5. Pick fat32 as filesystem, create as primary, this will hold your photos, music etc
  6. Click ok
  7. Right click, create
  8. Select the size you wish
  9. Pick ext4 as filesystem, create as primary
  10. Click ok
  11. Go back to 7 (you need 3 partitions)
  12. You will now have 4 partitions, 1 fat32 and 3 ext4, system, cache, data. Click apply
HOW TO 2: Adapting a zip file to extract to sd card instead of nand​
  • First extract it in a folder
  • Then navigate into META-INF/com/google/android and open updater-script (use notepad++ on windows, any editor for linux will be ok)
  • modify:
    • for system
      • mount("MTD", "system", "/system"); and mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system"); in mount("ext4", "EMMC", "/dev/block/mmcblk1p2", "/system");
      • format("MTD", "system"); and format("ext4", "EMMC", "/dev/block/mmcblk0p25"); in format("ext4", "EMMC", "/dev/block/mmcblk1p2");
    • for data
      • mount("MTD","userdata","/data"); and mount("ext4", "EMMC", "/dev/block/mmcblk0p26", "/data"); in mount("ext4", "EMMC", "/dev/block/mmcblk1p4", "/data");
      • format("MTD", "userdata"); and format("ext4", "EMMC", "/dev/block/mmcblk0p26"); in format("ext4", "EMMC", "/dev/block/mmcblk1p4");
    • for cache
      • mount("MTD","cache","/cache"); and mount("ext4", "EMMC", "/dev/block/mmcblk0p27", "/cache"); in mount("ext4", "EMMC", "/dev/block/mmcblk1p3", "/cache");
      • format("MTD", "cache"); and format("ext4", "EMMC", "/dev/block/mmcblk0p27"); in format("ext4", "EMMC", "/dev/block/mmcblk1p3");
    • remove anything that contains boot.img to avoid replacing the boot menu eg
      • package_extract_file("boot.img", "/tmp/boot.img");
      • write_raw_image("/tmp/boot.img", "boot");
      • delete("/tmp/boot.img");
  • save, compress, install through recovery (unmount all partitions through the recovery menu, mounts and storage -> click on everything that starts with unmount)
  • Done!
HOW TO 3: Transferring a rom from nand to sd​
  • Boot into recovery
  • Mount all partitions through the recovery menu
  • mount -o remount,rw /
  • mkdir system2 data2 cache2
  • mount /dev/block/mmcblk1p2 system2
  • mount /dev/block/mmcblk1p3 cache2
  • mount /dev/block/mmcblk1p4 data2
  • cp -af system/* system2/
  • cp -af cache/* cache2/
  • cp -af data/* data2/
  • umount /system2
  • umount /data2
  • umount /cache2
  • Done!
 
Last edited:

LorD ClockaN

Inactive Recognized Developer
Sep 1, 2008
14,106
28,536
Veli Losinj
www.losinj.com
Some more insfo also would be nice.. I know that they will be added in 2nd and 3rd post, but I wanna know now! :)

What partitions are needed and used? where are apps installed in rom that is on SD. Is the rom on SD much slower than the on on NAND or no noticable difference? I already have class 10 16GB card :)
 
  • Like
Reactions: -Alaa-

Paradoxxx

Senior Member
Aug 14, 2008
5,580
5,956
Krakow
doesn't the thread name reveal anything? :)
he boots one rom from Nand, than reboots and boots another rom from SD... and has a dual boot menu when he powers up

It does, but I tough he was describing how he was doing:)

Post a guide!
I'll be able to dual boot, benchmark and normal edition of my ROM.


Sent from my Desire HD using XDA Premium App
 
Last edited:

michyprima

Senior Member
Sep 30, 2007
1,268
157
twitter.com
Hmm what I'm wondering is, would it not be possible to partition /system and install both roms on there?
I'm not so fearless. If an operation of that kind will fail, you will brick your phone man :)

Some more insfo also would be nice.. I know that they will be added in 2nd and 3rd post, but I wanna know now! :)

What partitions are needed and used? where are apps installed in rom that is on SD. Is the rom on SD much slower than the on on NAND or no noticable difference? I already have class 10 16GB card :)
I'm using a 4 partitioned 8 GB sd card for experimenting:
- 1 fat32
- 3 ext4 (system, cache, data)

That can easily changed though, since the partition scheme is defined in init scripts which can be edited with ease ;)
You could also use image files, but I never liked the "loopback approch". If you can have real partitions why should you use fake ones?

I'm not noticing major slow downs though. You will be able of trying yourself in next days!
 

Hakimy

Senior Member
Oct 17, 2010
407
17
awesome.now I'll have the chance to try other roms which I didn't cus they didn't support my language :p

and just to make sure,will this make us use other operating systems say like windows phone 7 (just like HD2) or just another android rom? ;)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 64
    Welcome to the first dual boot menu for Desire HD

    What it is, and what it does.
    It is nothing more than a C-written executable which will start at your phone boot waiting for you to make a choice. When you choose, it will init the android you want. That lets you to have 2 android install, one on nand, one on sdcard, without booting through fastboot or switching boot.img

    Wonderful. What I need to make it working?
    Basically you need nothing more than a SD card and your desire HD.

    You said I need an sd card. I need to prepare it somehow?
    Yes, you do. You will need a tool which supports creating fat32 and ext4 partitions. There are a couple for windows (EASEUS). If you have linux, it is included in your distro for sure. Your partition table should look like this:

    In order: archiving (photo, videos etc), system, cache, data.
    Sizes are of your choice. Remember to not make them too small anyway.

    Are you booting two different kernels for sense and nosense roms? I know theres a difference.
    Well...no. Since you can not swap kernels at runtime, you will have to use one kernel for both. I will post 2 version though. One for sense and one for nosense. If you intend to boot sense roms, then you must choose a sense kernel. No-sense roms will be able to boot with the sense kernel though, but will need a fix for the bluetooth. I will post some way to make this as easier as possible.

    So if I want to run at the same time a sense rom and an aosp based rom I will have to keep the sense kernel?
    Absolutely, or the sense rom will not boot at all (unless you fix it somehow).

    DEMO:
    View full screen to see the sentences on my phone's screen.

    Download:
    f7e92db13730066329f5e78609e03b32 dualboot-1.0.zip
    No mirroring so I can keep track of some statistics :)
    17
    HOW TO 1: Partitioning with Minitool Partition Wizard 6 Home Edition​
    1. Locate your sdcard in the list
    2. Right click, delete all partitions
    3. Right click, create
    4. Select the size you wish
    5. Pick fat32 as filesystem, create as primary, this will hold your photos, music etc
    6. Click ok
    7. Right click, create
    8. Select the size you wish
    9. Pick ext4 as filesystem, create as primary
    10. Click ok
    11. Go back to 7 (you need 3 partitions)
    12. You will now have 4 partitions, 1 fat32 and 3 ext4, system, cache, data. Click apply
    HOW TO 2: Adapting a zip file to extract to sd card instead of nand​
    • First extract it in a folder
    • Then navigate into META-INF/com/google/android and open updater-script (use notepad++ on windows, any editor for linux will be ok)
    • modify:
      • for system
        • mount("MTD", "system", "/system"); and mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system"); in mount("ext4", "EMMC", "/dev/block/mmcblk1p2", "/system");
        • format("MTD", "system"); and format("ext4", "EMMC", "/dev/block/mmcblk0p25"); in format("ext4", "EMMC", "/dev/block/mmcblk1p2");
      • for data
        • mount("MTD","userdata","/data"); and mount("ext4", "EMMC", "/dev/block/mmcblk0p26", "/data"); in mount("ext4", "EMMC", "/dev/block/mmcblk1p4", "/data");
        • format("MTD", "userdata"); and format("ext4", "EMMC", "/dev/block/mmcblk0p26"); in format("ext4", "EMMC", "/dev/block/mmcblk1p4");
      • for cache
        • mount("MTD","cache","/cache"); and mount("ext4", "EMMC", "/dev/block/mmcblk0p27", "/cache"); in mount("ext4", "EMMC", "/dev/block/mmcblk1p3", "/cache");
        • format("MTD", "cache"); and format("ext4", "EMMC", "/dev/block/mmcblk0p27"); in format("ext4", "EMMC", "/dev/block/mmcblk1p3");
      • remove anything that contains boot.img to avoid replacing the boot menu eg
        • package_extract_file("boot.img", "/tmp/boot.img");
        • write_raw_image("/tmp/boot.img", "boot");
        • delete("/tmp/boot.img");
    • save, compress, install through recovery (unmount all partitions through the recovery menu, mounts and storage -> click on everything that starts with unmount)
    • Done!
    HOW TO 3: Transferring a rom from nand to sd​
    • Boot into recovery
    • Mount all partitions through the recovery menu
    • mount -o remount,rw /
    • mkdir system2 data2 cache2
    • mount /dev/block/mmcblk1p2 system2
    • mount /dev/block/mmcblk1p3 cache2
    • mount /dev/block/mmcblk1p4 data2
    • cp -af system/* system2/
    • cp -af cache/* cache2/
    • cp -af data/* data2/
    • umount /system2
    • umount /data2
    • umount /cache2
    • Done!
    8
    Dual-Boot HTC Desire HD: The Guide

    I've created a complete guide with pictures. It has six chapters:
    1. Before we start
    2. Partitioning
    3. Preparing ROM for SD install
    4. Flashing your ZIP to SD
    5. Update the NAND ROM
    6. Flash a boot.img separately

    I had to put the guide in an archive because the maximum file size for PDF is only 488.3KB.
    3
    For those having difficulties with dual booting, take a look at this Multiboot APK beta testing. Am trying this and I must say its easy and has a very good interface for installing and changing ROMS!!!!!!!!!!!!!:D


    I have this installed and working.

    1. First ROM Virtuous 1.29.0
    2. Second ROM Coredriod 7.0 RV
    3. Third ROM CM Nightly
    4. Fourth ROM Android Revolution 5.2.3

    http://forum.xda-developers.com/showthread.php?t=1184173&highlight=Beta+test+multiboot
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone