[HD2 General] doublehp:
I had to install RAPI.dll, and CEUTIL.dll (found in google), re-install ActiveSync, and use a very specific ROM. HD2toolkit did not work at all for me. I forgot how I installed MAGDLR, but it was PITA to install it. And once installed, I spent 2 days on trying to use it. Putting ROMs on uSD does not allow to install the from SD.

After viewing http://cdn.youtubeavi.com/view-video/0TpYHpfHW-8 (confirmed by reading http://resetguide.com/2012/05/how-to-install-android-on-hd2-nand/ ), I saw that amongst my 1GB of data downloaded in the last days, I did not have the file ANDR_install.exe; I downloaded all possible ROMs until I find one having this magic file: http://xdaforums.com/showthread.php?t=893637 . Only this ROM has andr_install.exe . And when I ran it, it worked on the first time (while of course having HD with MAGLDR on option 5: USB flash).

Now, my HD2 started Android. I still can not use it at all for now, but at least, I have made a step.

adb works, so it will probably be very easy for me. From ADB, I can do almost anything: install APKs(pm install), getprop, remount /system rw, install Debian manually ... the hardest part may be to click on buttons, but I can find a WA for this: create minimal apps on my other Android phone, using Tasker with AppFactory, apps which will be able to send keystrokes, and start them as required. Long way, but should work (if I don't have CPU uncompat issues). Anyway, without touch pad, it's not gonna stay a "phone"; it will mostly be a VNC-viewer for other devices (like my RaspberryPi).

Hell I am lucky: both HTD HD2 and HTC Sensation use the exact same CPU: "ARMv7 Processor rev 2 (v7l)" . Gonna be trivial to have fun around :) An example to install a VNC-client:

dhp@uranus /tmp $ adb -s SH169V80XXXX pull /data/app/android.androidVNC-1.apk
1703 KB/s (245795 bytes in 0.140s)
dhp@uranus /tmp $
dhp@uranus /tmp $ adb -s 0123456789ABCDEF install android.androidVNC-1.apk
2015 KB/s (245795 bytes in 0.119s)
pkg: /data/local/tmp/android.androidVNC-1.apk
Success
dhp@uranus /tmp $

Same for server.

Like in my Sensation (definitly, I am lucky), I have a free folder in the default PATH :

localhost / # echo $PATH
/sbin:/system/sbin:/system/xbin:/system/bin
localhost / # ls /system/
app dmesg.txt framework lost+found lost+found xbin
bin etc lib lost+found media
build.prop fonts lost+found lost+found usr
localhost / #

so, let's populate it :D

localhost / # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 205.9M 0 205.9M 0% /dev
tmpfs 205.9M 0 205.9M 0% /mnt/asec
/dev/block/mtdblock1 127.3M 118.8M 8.5M 93% /system
/dev/block/mtdblock3 248.8M 65.2M 183.5M 26% /data
/dev/block/mtdblock2 40.0M 1.1M 38.9M 3% /cache
/dev/block/vold/179:1
3.7G 2.3G 1.4G 63% /mnt/sdcard
/dev/block/vold/179:1
3.7G 2.3G 1.4G 63% /mnt/secure/asec
localhost / # mount -o remount,rw /dev/block/mtdblock1 /system
localhost / # cd /system/
localhost system # ln -s /data/local/bin/ sbin
localhost system #

Now add my personal boot script:

localhost system # cd /etc/init.d/
localhost init.d # ls -l
-rwxrwxrwx 1 root root 365 Feb 29 2008 00banner
-rwxrwxrwx 1 root root 27 Oct 9 2010 01sysctl
-rwxrwxrwx 1 root root 229 Feb 29 2008 03firstboot
-rwxrwxrwx 1 root root 105 Feb 29 2008 04modules
-rwxrwxrwx 1 root root 1593 Feb 29 2008 05mountsd
-rwxrwxrwx 1 root root 794 Feb 29 2008 20userinit
localhost init.d # ln -s /data/local/bin/rc.local 99doublehp
localhost init.d #

and populate /data as required:

bash-3.2# tar -czf bin.tgz /data/local/bin/
tar: removing leading '/' from member names
bash-3.2#

dhp@uranus /tmp $ adb -s SH169V80XXXX pull /data/app/bin.tgz
3660 KB/s (411734 bytes in 0.109s)
dhp@uranus /tmp $
dhp@uranus /tmp $ adb -s 0123456789ABCDEF push bin.tgz /data/local/tmp/
1972 KB/s (411734 bytes in 0.203s)
dhp@uranus /tmp $

localhost / # tar -xvzf /data/local/tmp/bin.tgz
data/local/bin/
data/local/bin/cpu
data/local/bin/rc.local
data/local/bin/psa
[...]

ah ... at last, ONE difference:

localhost / # head -n1 /system/sbin/psa
#!/system/bin/bash
localhost / # which bash
/system/xbin/bash
localhost / #
localhost / # cd /system/bin/
localhost bin # ln -s ../xbin/bash .
localhost bin #

No way to edit each and every script ^^

Most important one for debugging:

localhost ~ # vibrate 100
Voltage not provided. Using default 3100 mV.
/system/sbin/vibrate: line 37: /sys/devices/virtual/timed_output/vibrator/voltage_level: No such file or directory
localhost ~ # vibrate 500
Voltage not provided. Using default 3100 mV.
/system/sbin/vibrate: line 37: /sys/devices/virtual/timed_output/vibrator/voltage_level: No such file or directory
localhost ~ #

Let's prepare the SDcard for Debian use; since CM6 does not have mkfs.ext3, I did that on my workstation.

localhost / # mkdir -p /data/local/mnt/sdcard_ext
localhost / # mount /dev/block/mmcblk0p1 /data/local/mnt/sdcard_ext/
localhost / #

I should have started by this (to help understand these logs), but it's never too late:

on HD: vi /etc/bash/bashrc

PS1='\[\033[01;31m\]root@hd2\[\033[01;34m\]:\w\[\033[00m\] '

on Sensation: vi $HOME/.bashrc

PS1='\[\033[01;31m\]root@sent\[\033[01;34m\]:\w\[\033[00m\] '

This prompt is handy so that I can do copy-paste of the prompt itself for use with scp and rsync: if I am at one place in ssh, I can copy the prompt to scp a file there from an other machine.

So ... I was about to copy my Debian: I put both SDcards in the workstation.

root@uranus:~ cp -a /media/uSD_ext3/Linux /media/Hmmm/

Remove sshd keys to force regen ( /etc/ssh/ssh_host_*). Update hostname (it never properly worked in Armel).

... I'll continue overnight.