Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,547 Members 45,803 Now Online
XDA Developers Android and Mobile Development Forum

[DEV] Dual booting on Desire HD

Tip us?
 
michyprima
Old
(Last edited by michyprima; 18th July 2011 at 07:32 PM.)
#1  
michyprima's Avatar
Senior Member - OP
Thanks Meter 135
Posts: 1,220
Join Date: Sep 2007

 
DONATE TO ME
Default [DEV] Dual booting on Desire HD

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
LG G2 - CM11

My apps for android

DO NOT PM ME - I rarely read PMs, drop me an email instead!
The Following 65 Users Say Thank You to michyprima For This Useful Post: [ Click to Expand ]
 
michyprima
Old
(Last edited by michyprima; 28th July 2011 at 11:23 AM.)
#2  
michyprima's Avatar
Senior Member - OP
Thanks Meter 135
Posts: 1,220
Join Date: Sep 2007

 
DONATE TO ME
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!
The Following 17 Users Say Thank You to michyprima For This Useful Post: [ Click to Expand ]
 
michyprima
Old
#3  
michyprima's Avatar
Senior Member - OP
Thanks Meter 135
Posts: 1,220
Join Date: Sep 2007

 
DONATE TO ME
reserved 2
LG G2 - CM11

My apps for android

DO NOT PM ME - I rarely read PMs, drop me an email instead!
The Following 5 Users Say Thank You to michyprima For This Useful Post: [ Click to Expand ]
 
LorD ClockaN
Old
#4  
LorD ClockaN's Avatar
Recognized Developer
Thanks Meter 27372
Posts: 13,096
Join Date: Sep 2008
Location: Veli Losinj

 
DONATE TO ME
Hell YEAH!!
New ROM/kernel versions depend strictly on my wife's sex drive, so ask her for ETA!!

IceColdJelly IRC channel
HTC One X -> IceColdJelly422
Build IceColdJelly422 from source - link

One X: IceColdJelly JB - OneX - git, IceColdAOKP ICS - OneX - git
Desire HD: IceColdSandwich - git, AOSP GB kernel - 10.0, Sense GB kernel

If you like my work, please consider buying me a beer via paypal to my email: davor@losinj.com
Help me get some extra space on dropbox - link
The Following User Says Thank You to LorD ClockaN For This Useful Post: [ Click to Expand ]
 
gewuerzwiesel1977
Old
#5  
gewuerzwiesel1977's Avatar
Senior Member
Thanks Meter 205
Posts: 1,261
Join Date: Jan 2009
Location: Weaslhausen
gsus...give us this!!! that'll be great...

- you've been gingerbreaded with a kraut dhd -
Note 3/N9005 - running AOSP
 
io53
Old
#6  
io53's Avatar
Senior Member
Thanks Meter 257
Posts: 757
Join Date: Oct 2010
Yes please. That would be awesome*e^(NaN)

Sent from my HTC Desire HD using XDA Premium App
 
liljom
Old
#7  
Senior Member
Thanks Meter 88
Posts: 1,170
Join Date: Mar 2010
Location: Copenhagen, Denmark
Quote:
Originally Posted by michyprima View Post
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
 
DjPash
Old
#8  
Member
Thanks Meter 5
Posts: 30
Join Date: Jan 2011
Location: Riga
Thumbs up At last!!

OMG OMG OMG, at last!! Thats what I wanted since flashed first custom ROM!!
 
MrYuiM
Old
#9  
Senior Member
Thanks Meter 38
Posts: 511
Join Date: Jun 2010
Location: Stalkerland
Hmm what I'm wondering is, would it not be possible to partition /system and install both roms on there?
 
LorD ClockaN
Old
#10  
LorD ClockaN's Avatar
Recognized Developer
Thanks Meter 27372
Posts: 13,096
Join Date: Sep 2008
Location: Veli Losinj

 
DONATE TO ME
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
New ROM/kernel versions depend strictly on my wife's sex drive, so ask her for ETA!!

IceColdJelly IRC channel
HTC One X -> IceColdJelly422
Build IceColdJelly422 from source - link

One X: IceColdJelly JB - OneX - git, IceColdAOKP ICS - OneX - git
Desire HD: IceColdSandwich - git, AOSP GB kernel - 10.0, Sense GB kernel

If you like my work, please consider buying me a beer via paypal to my email: davor@losinj.com
Help me get some extra space on dropbox - link

The Following User Says Thank You to LorD ClockaN For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes