Post Reply

[DEV] Dual booting on Desire HD

OP michyprima

17th July 2011, 08:23 PM   |  #1  
michyprima's Avatar
OP Senior Member
Thanks Meter: 137
 
1,234 posts
Join Date:Joined: Sep 2007
Donate to Me
More
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 by michyprima; 18th July 2011 at 07:32 PM.
The Following 65 Users Say Thank You to michyprima For This Useful Post: [ View ]
17th July 2011, 08:27 PM   |  #2  
michyprima's Avatar
OP Senior Member
Thanks Meter: 137
 
1,234 posts
Join Date:Joined: Sep 2007
Donate to Me
More
Quote:

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
Quote:

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!
Quote:

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 by michyprima; 28th July 2011 at 11:23 AM.
The Following 17 Users Say Thank You to michyprima For This Useful Post: [ View ]
17th July 2011, 08:27 PM   |  #3  
michyprima's Avatar
OP Senior Member
Thanks Meter: 137
 
1,234 posts
Join Date:Joined: Sep 2007
Donate to Me
More
reserved 2
The Following 5 Users Say Thank You to michyprima For This Useful Post: [ View ]
17th July 2011, 08:28 PM   |  #4  
LorD ClockaN's Avatar
Recognized Developer
Flag Veli Losinj
Thanks Meter: 27,502
 
13,243 posts
Join Date:Joined: Sep 2008
Donate to Me
More
Hell YEAH!!
The Following User Says Thank You to LorD ClockaN For This Useful Post: [ View ]
17th July 2011, 08:32 PM   |  #5  
gewuerzwiesel1977's Avatar
Senior Member
Flag Weaslhausen
Thanks Meter: 212
 
1,295 posts
Join Date:Joined: Jan 2009
More
gsus...give us this!!! that'll be great...

- you've been gingerbreaded with a kraut dhd -
17th July 2011, 08:33 PM   |  #6  
io53's Avatar
Senior Member
Thanks Meter: 257
 
757 posts
Join Date:Joined: Oct 2010
Yes please. That would be awesome*e^(NaN)

Sent from my HTC Desire HD using XDA Premium App
17th July 2011, 08:34 PM   |  #7  
Senior Member
Flag Copenhagen, Denmark
Thanks Meter: 91
 
1,179 posts
Join Date:Joined: Mar 2010
More
Quote:
Originally Posted by michyprima

Just spend 3 minutes viewing this video, it explains everything



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

Anyone interested in this?

I will prepare a guide on how to set everything up if needed...

what a question is it?

of course we want it
17th July 2011, 08:39 PM   |  #8  
Member
Flag Riga
Thanks Meter: 5
 
30 posts
Join Date:Joined: Jan 2011
More
Thumbs up At last!!
OMG OMG OMG, at last!! Thats what I wanted since flashed first custom ROM!!
17th July 2011, 08:41 PM   |  #9  
Senior Member
Flag Stalkerland
Thanks Meter: 38
 
511 posts
Join Date:Joined: Jun 2010
More
Hmm what I'm wondering is, would it not be possible to partition /system and install both roms on there?
17th July 2011, 08:41 PM   |  #10  
LorD ClockaN's Avatar
Recognized Developer
Flag Veli Losinj
Thanks Meter: 27,502
 
13,243 posts
Join Date:Joined: Sep 2008
Donate to Me
More
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

The Following User Says Thank You to LorD ClockaN For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Desire HD Android Development by ThreadRank