HTC HD2 - Android

Hardware info on main page.

hints: magldr menu - press power button while mgldr screen is showing,

Links

Links: xda-developers wiki: NativeSD, NativeSD Rom+EXT4 for New Users with peechurs, MAGLDR introduction, DirectSD, NexusHD2 Android forum: NexusHD2-KitKat-CM11.0 V4.2 [Kernel: tytung_jellybean_r2], more links: xda: Nougat 7.1 ROM, CM12.1 / Android 5.1.1 ROM, CM13.0 / Android 6.0 ROM, Android 6.0.1 ROM, github: LineageOS HTC Leo, Local links: Chromecast,

History

2017-06-12: RRcm13_v3 - boot - I select the "DirectSD" folder fromservices, boot settings, AD SD dir, then boot AD SD. The ROM starts booting. After a few tries, I finally get it working when I install without Gapps. Now this phone has Android 6.0.1 on it. Wicked.

2017-06-12: install from recovery - install, select zip file, next, choose options, start. I'm installing Ressurrection Remix, it uses DirectSD method.

2017-06-12: recovery - select "recovery" folder from services, boot settings, AD SD dir, then boot AD SD.

2017-06-11: I formatted a 16 GB microSD card like this

[tingo@localhost ~]$ sudo parted /dev/mmcblk0 print                       
[sudo] password for tingo: 
Model: SD SD16G (sd/mmc)
Disk /dev/mmcblk0: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  5240MB  5239MB  primary  ext4
 2      5240MB  9535MB  4295MB  primary  ext4
 3      9535MB  15.7GB  6181MB  primary  fat32

ok. Well, that didn't work. Maybe the fat32 partition needs to be first? Change it

tingo@localhost ~]$ sudo parted /dev/mmcblk0 print
Model: SD SD16G (sd/mmc)
Disk /dev/mmcblk0: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 3      1049kB  6182MB  6181MB  primary  fat32
 1      6182MB  11.4GB  5238MB  primary  ext4
 2      11.4GB  15.7GB  4296MB  primary  ext4

ok. Moving didn't work, so I just re-created the partitions. and yes, with the fat32 partition as partiton 1, things work.

2017-06-11: I took out the microSD card and put it into my Fedora laptop to figure out the layout:

[tingo@localhost ~]$ sudo parted /dev/mmcblk0 print
Model: SD 00000 (sd/mmc)
Disk /dev/mmcblk0: 31.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  29.2GB  29.2GB  primary  fat32
 2      29.2GB  31.4GB  2149MB  primary  ext4

ok.

2017-06-11: NativeSD - CM11 - info df info

1|u0_a80@leo:/storage/sdcard0/Android/data/org.digimead.digi.ctrl/files/var/b30a289a-6487-4370-9774-14878e48ce0d $ df
Filesystem               Size     Used     Free   Blksize
/dev                   205.2M   136.0K   205.1M   4096
/mnt/secure            205.2M     0.0K   205.2M   4096
/mnt/asec              205.2M     0.0K   205.2M   4096
/mnt/obb               205.2M     0.0K   205.2M   4096
/mnt/fuse              205.2M     0.0K   205.2M   4096
/NativeSD                2.0G     1.7G   302.6M   4096
/system                  2.0G     1.7G   302.6M   4096
/data                    2.0G     1.7G   302.6M   4096
/mnt/media_rw/sdcard0: Permission denied
/storage/sdcard0        27.2G     2.1G    25.2G   16384
/mnt/asec/com.bubblesoft.android.bubbleupnp-1     4.0M     2.3M     1.7M   4096
/mnt/asec/com.a0soft.gphone.aCurrency-2     3.0M     1.9M     1.1M   4096
/mnt/asec/org.digimead.digi.ctrl.sshd-1     5.0M     3.2M     1.8M   4096
/mnt/asec/uk.co.nickfines.RealCalc-1     2.0M   344.0K     1.7M   4096
/mnt/asec/jackpal.androidterm-1     2.0M   520.0K     1.5M   4096
/mnt/asec/com.estrongs.android.pop-1     4.0M     2.9M     1.1M   4096
/mnt/asec/com.freenet.mail-1     2.0M   844.0K     1.2M   4096
/mnt/asec/com.vlcforandroid.vlcdirectprofree-1     3.0M     1.5M     1.5M   4096

mount info

1|u0_a80@leo:/storage/sdcard0/Android/data/org.digimead.digi.ctrl/files/var/b30a289a-6487-4370-9774-14878e48ce0d $ mount
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
/dev/block/mmcblk0p2 /NativeSD ext4 rw,noatime,nodiratime,barrier=0,stripe=64,data=ordered 0 0
/dev/block/mmcblk0p2 /system ext4 ro,nosuid,nodev,relatime,barrier=0,stripe=64,data=ordered 0 0
/dev/block/mmcblk0p2 /data ext4 rw,noatime,nodiratime,barrier=0,stripe=64,data=ordered 0 0
/dev/block/vold/179:1 /mnt/media_rw/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/dm-0 /mnt/asec/com.bubblesoft.android.bubbleupnp-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-1 /mnt/asec/com.a0soft.gphone.aCurrency-2 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-2 /mnt/asec/org.digimead.digi.ctrl.sshd-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-3 /mnt/asec/uk.co.nickfines.RealCalc-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-4 /mnt/asec/jackpal.androidterm-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-5 /mnt/asec/com.estrongs.android.pop-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-6 /mnt/asec/com.freenet.mail-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-7 /mnt/asec/com.vlcforandroid.vlcdirectprofree-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0

hmm, is parted there? No, it isn't.

2017-06-11: I started DigiSSHD and enabled the service. Connecting via ssh

[tingo@localhost ~]$ ssh android@10.1.161.19 -p 2222
android@10.1.161.19's password: 

Welcome to Android MirBSD Korn!
DigiSSHD v0.2.2 build 2012-07-15 18:24:04.000+0200
DigiControl v0.2.2 build 2012-07-15 18:25:26.000+0200

You may find more detailed information about shell at https://www.mirbsd.org/mksh.htm

Profile: /storage/sdcard0/Android/data/org.digimead.digi.ctrl/files/var/b30a289a-6487-4370-9774-14878e48ce0d/.profile
Available console editors: aee vi
Your current terminal: xterm-256color
Terminal descriptors located at /system/etc/terminfo
Possible terminals are vt100, linux, xterm (search for more at TERMINFO, for example xterm-utf8 ;-) )

Your current state is uid=10080(u0_a80) gid=10080(u0_a80) groups=1015(sdcard_rw),1028(sdcard_r),3003(inet),50080(all_a80)

Aliases:
autoload='typeset -fu'
functions='typeset -f'
hash='alias -t'
history='fc -l'
integer='typeset -i'
local=typeset
login='exec login'
nameref='typeset -n'
nohup='nohup '
r='fc -e -'
source='PATH=$PATH:. command .'
type='whence -v'

u0_a80@leo:/storage/sdcard0/Android/data/org.digimead.digi.ctrl/files/var/b30a289a-6487-4370-9774-14878e48ce0d $ 

it works.

2017-06-11: I put back the original battery, and connected the phone to charger. at least, the original battery is not bulging. after a few restarts, the phone booted into CM11 and started charging.

2015-06-19: NativeSD - CM11 - battery - it is at 8% after 3d 17h 38m. ok.

2015-06-15: NativeSD - CM11 - battery - this morning, the phone has been 3d 8h 38m on battery, and it is at 15%. Good.

2015-06-08: NativeSD - CM11 - battery - the last few days the phone has been eating battery. Checking - yes, Google Play services is now at version 7.5.71 (1955121-034). Let me try the trick from xda-developers PSA: Google Play Services Wakelock Affects Many 5.x ROMs, go to Sikkerhet (Security), Privacy Guard, enable built-in apps, long press on Google Play-tjenester (Google Play services), and turn off Hold aktiv (keep awake). Then I reboot the phone. We shall see if this works.

2015-06-06: I found out that the KitKat ROM has been updated to Android 4.4.4: NexusHD2-KitKat-CM11.0 V4.7 [Kernel: tytung_jellybean_r2], nice.

2015-06-06: NativeSD - CM11 - app - back into CM11 I updated Chromecast to 1.11.11, which worked nicely. Updated TV 2 Sumo to 1.4, still doesn't work on this phone.

2015-06-06: NativeSD - CM10 - booted into the ROM to see if I could free some space. Build number JZO54K (NexusHD2-JellyBean v1.3a). I deleted (ok, uninstalled) some apps, hope that helps. Switched back to CM11 via NativeSDMultiboot and rebooted.

2015-06-06: NativeSD - CM11 - I used NativeSDMultiboot to switch to the CM10 ROM and rebooted.

2015-06-06: NativeSD - CM11 - I started DigiSSHD and ssh'ed into the phone to figure things out: mounts

root@leo:/ # mount
mount
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p2 /NativeSD ext4 rw,noatime,nodiratime,barrier=0,stripe=64,data=ordered 0 0
/dev/block/mmcblk0p2 /system ext4 rw,noatime,nodiratime,barrier=0,stripe=64,data=ordered 0 0
/dev/block/mmcblk0p2 /data ext4 rw,noatime,nodiratime,barrier=0,stripe=64,data=ordered 0 0
/dev/block/vold/179:1 /mnt/media_rw/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/dm-0 /mnt/asec/com.a0soft.gphone.aCurrency-2 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-1 /mnt/asec/com.bubblesoft.android.bubbleupnp-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-2 /mnt/asec/org.digimead.digi.ctrl.sshd-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-3 /mnt/asec/com.vlcforandroid.vlcdirectprofree-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-4 /mnt/asec/com.estrongs.android.pop-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-5 /mnt/asec/uk.co.nickfines.RealCalc-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-6 /mnt/asec/jackpal.androidterm-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0
/dev/block/dm-7 /mnt/asec/com.freenet.mail-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1,data=writeback 0 0

disk free space

root@leo:/ # df 
df
Filesystem               Size     Used     Free   Blksize
/dev                   205.2M   136.0K   205.1M   4096
/mnt/secure            205.2M     0.0K   205.2M   4096
/mnt/asec              205.2M     0.0K   205.2M   4096
/mnt/obb               205.2M     0.0K   205.2M   4096
/mnt/fuse              205.2M     0.0K   205.2M   4096
/NativeSD                2.0G     1.8G   203.7M   4096
/system                  2.0G     1.8G   203.7M   4096
/data                    2.0G     1.8G   203.7M   4096
/mnt/media_rw/sdcard0    27.2G     2.1G    25.2G   16384
/mnt/secure/asec        27.2G     2.1G    25.2G   16384
/storage/sdcard0        27.2G     2.1G    25.2G   16384
/mnt/asec/com.a0soft.gphone.aCurrency-2     3.0M     1.9M     1.1M   4096
/mnt/asec/com.bubblesoft.android.bubbleupnp-1     4.0M     2.3M     1.7M   4096
/mnt/asec/org.digimead.digi.ctrl.sshd-1     5.0M     3.2M     1.8M   4096
/mnt/asec/com.vlcforandroid.vlcdirectprofree-1     3.0M     1.5M     1.5M   4096
/mnt/asec/com.estrongs.android.pop-1     4.0M     2.9M     1.1M   4096
/mnt/asec/uk.co.nickfines.RealCalc-1     2.0M   344.0K     1.7M   4096
/mnt/asec/jackpal.androidterm-1     2.0M   520.0K     1.5M   4096
/mnt/asec/com.freenet.mail-1     2.0M   844.0K     1.2M   4096

layout of SDcard:

root@leo:/ # ls -l /mnt/media_rw/sdcard0
ls -l /mnt/media_rw/sdcard0
drwxrwx--- media_rw media_rw          2012-11-08 22:50 4EXTRecovery
-rwxrwx--- media_rw media_rw  2316260 2012-12-17 21:17 4EXTRecoveryUpdater.apk
drwxrwx--- media_rw media_rw          2012-12-17 21:25 4ext
drwxrwx--- media_rw media_rw          2012-11-08 23:30 Alarms
drwxrwx--- media_rw media_rw          2013-03-23 00:11 Android
drwxrwx--- media_rw media_rw          2015-06-06 11:44 App_Manager
drwxrwx--- media_rw media_rw          2012-11-09 14:00 BubbleUPnP
drwxrwx--- media_rw media_rw          2012-11-09 00:53 DCIM
drwxrwx--- media_rw media_rw          2014-09-28 19:59 Download
drwxrwx--- media_rw media_rw          2014-09-28 20:10 Expensify
drwxrwx--- media_rw media_rw          2012-11-08 22:29 LOST.DIR
drwxrwx--- media_rw media_rw          2012-11-08 23:30 Movies
drwxrwx--- media_rw media_rw          2012-11-08 23:30 Music
drwxrwx--- media_rw media_rw          2014-01-06 17:33 NativeSD
-rwxrwx--- media_rw media_rw   192998 2012-11-08 20:22 NativeSDBootV10.apk
-rwxrwx--- media_rw media_rw 203675003 2014-01-05 19:32 NexusHD2-KitKat-CM11.0_V4.2.zip
drwxrwx--- media_rw media_rw          2012-11-08 23:30 Notifications
drwxrwx--- media_rw media_rw          2012-11-08 23:30 Pictures
drwxrwx--- media_rw media_rw          2012-11-08 23:30 Podcasts
drwxrwx--- media_rw media_rw          2012-11-09 20:27 ReceivedFiles
drwxrwx--- media_rw media_rw          2012-11-08 23:30 Ringtones
drwxrwx--- media_rw media_rw          2012-11-09 21:06 SDTools
drwxrwx--- media_rw media_rw          2012-11-09 13:59 TitaniumBackup
drwxrwx--- media_rw media_rw          2012-12-18 21:53 backups
drwxrwx--- media_rw media_rw          2012-12-17 21:02 clockworkmod
drwxrwx--- media_rw media_rw          2012-11-09 13:59 data
drwxrwx--- media_rw media_rw          2012-12-18 21:38 drop
drwxrwx--- media_rw media_rw          2012-11-09 14:01 mdm
drwxrwx--- media_rw media_rw          2012-11-09 20:44 privacy-inspector
drwxrwx--- media_rw media_rw          2014-01-06 17:01 romtoolbox

and the NativeSD folder:

root@leo:/ # ls -l /mnt/media_rw/sdcard0/NativeSD
ls -l /mnt/media_rw/sdcard0/NativeSD
drwxrwx--- media_rw media_rw          2012-11-08 22:55 NexusHD2-JellyBean
drwxrwx--- media_rw media_rw          2014-01-05 19:04 NexusHD2-KitKat
-rwxrwx--- media_rw media_rw     4096 2008-08-01 12:00 clrcad.exe
-rwxrwx--- media_rw media_rw   162304 2008-08-01 12:00 haret.exe
-rwxrwx--- media_rw media_rw  1148528 2014-01-06 17:33 initrd.gz
-rwxrwx--- media_rw media_rw      183 2008-08-01 12:00 startup.txt
-rwxrwx--- media_rw media_rw  2914252 2014-01-06 17:33 zImage

and the folders within

root@leo:/ # ls -l /mnt/media_rw/sdcard0/NativeSD/NexusHD2-JellyBean
ls -l /mnt/media_rw/sdcard0/NativeSD/NexusHD2-JellyBean
-rwxrwx--- media_rw media_rw   982389 2012-12-17 21:07 initrd.gz
-rwxrwx--- media_rw media_rw  2914084 2012-12-17 21:07 zImage
root@leo:/ # ls -l /mnt/media_rw/sdcard0/NativeSD/NexusHD2-KitKat
ls -l /mnt/media_rw/sdcard0/NativeSD/NexusHD2-KitKat
-rwxrwx--- media_rw media_rw  1148528 2014-01-05 19:04 initrd.gz
-rwxrwx--- media_rw media_rw  2914252 2014-01-05 19:04 zImage

these are just the "boot" folder for each ROM.

Layout of the ext4 partition:

root@leo:/ # ls -l /NativeSD
ls -l /NativeSD
drwxrwxrwx root     root              2012-11-09 00:55 NexusHD2-JellyBean
drwxrwxrwx root     root              2014-01-05 21:04 NexusHD2-KitKat
drwxrwx--x system   system            2012-11-16 19:58 app
drwxrwx--x system   system            2012-11-16 19:58 app-private
drwxrwx--x system   system            2012-11-16 19:59 dalvik-cache
drwx------ root     root              2012-11-08 23:47 lost+found

and folders within

root@leo:/ # ls -l /NativeSD/NexusHD2-JellyBean
ls -l /NativeSD/NexusHD2-JellyBean
drwxrwx--x system   system            2012-12-17 23:14 data
drwxr-xr-x root     root              2012-12-17 23:09 system
root@leo:/ # ls -l /NativeSD/NexusHD2-KitKat
ls -l /NativeSD/NexusHD2-KitKat
drwxrwx--x system   system            2014-06-10 23:22 data
drwxr-xr-x root     root              2014-01-05 21:06 system

ok, so that's the data and system partitions for each ROM. Perhaps I could increase the size of the ext4 partition?

2015-06-06: NativeSD - CM11 - app - Chromecast 1.11.11 - not enough space?, I rebooted the phone to see if that helps, nope, no go.

2015-06-06: NativeSD - CM11 - the phone runs Android 4.4.2, Google Play Services is at version 6.1.09 (1459805-034),

2014-09-28: NativeSD - CM11 - app - I install the TV 2 Sumo app, version 1.1, this has support for Chromecast. Unfortunately, this app also turns into a "black screen" thing. Crap.

2014-09-28: NativeSD - CM11 - for some reason, the TV 2Sumo app claims that there isn't enough space ton install it, which is funny, as I run a NativeSD installation, and FreeSpace claims that there is 25 GB free on my SDcard... Oh well, I'll just remove the nrk.no and NRK TV apps (they don't work anyway). After that I have space. Still it complains of no space after downloading the app, it won't install. I deinstall Google Goggles, Jorte Kalender, MissedIT, and finally I have enough space to install the TV 2 Sumo app.

2014-09-28: NativeSD - CM11 - apps - I update the nrk.no app to version 1.2.6 "Mindre bugfiks", I also install the NRK TV app, version 1.0.1, Unfortunately, it doesn't look like the NRK TV app works on my HD2.

2014-09-28: NativeSD - CM11 - I installed Chromecast version 1.7.4 from Google Play, to use with my Google Chromecast device. . 2014-04-16: NativeSD - CM11 - I downloaded Heartbleed Security Scanner by Lookout and tested my device. Result: "The version of OpenSSL on your device is affected by the Heartbleed bug (1.0.1e). But the vulnerable behavior is not enabled. Everything is OK".

2014-03-06: NativeSD - CM11 - after 3 days, 13 hours and 17 minutes the battery is at 14% and I connect the charger, it seems that a few "run until empty" rounds has remedied the battery situation.

2014-02-09: NativeSD - CM11 - today the phone was off again. Connecting it to a charger revealed that it had done 15h 56m 46s on battery before turning off. Perhaps the battery is broken.

2014-02-08: NativeSD - CM11 - this morning the phone was off. The battery was empty. When I got it connected to a charger, I could see that the previous charge only lasted for 16 hours and some minutes. The battery was fully charged. Normally one full charge lasts three days and some hours. I've recharged the phone fully now, and have to watch how quickly it discharges.

2014-01-31: NativeSD - CM11 - this evening the phone wasn't connected to the mobile network (indicator was at zero, and trying to call resulted in "the mobile network is not available"), so I rebooted the phone, which brought the mobile network back online again.

2014-01-05: NativeSD - CM11 - to undo a folder, press it then drag any unwanted items out of it. Works for the launcher too.

2014-01-05: NativeSD - CM11 - the phone (NexusHD2) now runs Android 4,4.2, baseband version 15.42.50.11U_2.15,50.14, kernel version 2.6.32_tytung_jellybean_r2, CPU ARMv7 Processor rev 2 (v7l), Memory 410 MB, CyanogenMod version 11-20140101-UNOFFICIAL-leo, Build date Wed Jan 1 10:15:41 CST 2014, Build number KOT49H (NexusHD2-KitKat V4.2) [NativeSD], SE Linux-status disabled. Pressing seven times on build number enables developer options.

2014-01-05: NativeSD - prepare to install cm11 (NexusHD2-KitKat-CM11.0_V4.2.zip), push the file via adb:

tingo@kg-u35jc:~/doc/HTC/HD2/android/NativeSD$ ~/work/android-sdk-linux/platform-tools/adb push ./NexusHD2-KitKat-CM11.0_V4.2.zip /mnt/sdcard/
1279 KB/s (203675003 bytes in 155.442s)

done. start aMAGLDR: reboot phone, hold power button down until the menu appears. In aMAGLDR, use volume up / down keys to navigate, and call (leftmost button) to select. Start 4ExtRecovery: Go Settings, BootSettings, AD SD Dir, select 4EXTRE~1, then Boot AD SD. In 4EXT Recovery, select install from sdcard, choose zip from sdcard, choose NexusHD2-KitKat-CM11.0_V4.2.zip, Yes, Next the AROMA installer starts. Select NativeSD, Full install (270 MB), Default connection type RMNET Connection, Enable softkeys, Wipe Dalvik-Cache, Start. After the install is finished, reboot into aMAGLDR again, Services, BootSettings, AD SD Dir, select NATIVESD, Boot AD SD. Next Cyanogenmod starts up, and after a while the setup begins, I select Norwegian language.

2014-01-05: NativeSD - CM10 - connecting via adb to check out a few things:

tingo@kg-u35jc:~$ ~/work/android-sdk-linux/platform-tools/adb devices
List of devices attached
0123456789ABCDEF    device

Ok, it is there.

tingo@kg-u35jc:~$ ~/work/android-sdk-linux/platform-tools/adb get-state
device

and it is device. Other info:

tingo@kg-u35jc:~$ ~/work/android-sdk-linux/platform-tools/adb get-serialno
0123456789ABCDEF
tingo@kg-u35jc:~$ ~/work/android-sdk-linux/platform-tools/adb version
Android Debug Bridge version 1.0.29

run a shell:

tingo@kg-u35jc:~$ ~/work/android-sdk-linux/platform-tools/adb shell
root@android:/ #

good. Now check out various things:

root@android:/ # id
uid=0(root) gid=0(root)

I'm root.

What filesystems are mounted?

root@android:/ # mount
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p2 /NativeSD ext4 rw,noatime,nodiratime,barrier=0,stripe=64,data=ordered 0 0
/dev/block/mmcblk0p2 /system ext4 rw,noatime,nodiratime,barrier=0,stripe=64,data=ordered 0 0
/dev/block/mmcblk0p2 /data ext4 rw,noatime,nodiratime,barrier=0,stripe=64,data=ordered 0 0
/dev/block/vold/179:1 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0

directory and files:

root@android:/ # pwd
/
root@android:/ # ls -l
drwxrwx--x system   system            2012-11-16 19:58 NativeSD
drwxr-xr-x root     root              2013-12-08 21:00 acct
lrwxrwxrwx root     root              2013-12-08 21:00 cache -> /data/cache
dr-x------ root     root              2013-12-08 21:00 config
lrwxrwxrwx root     root              2013-12-08 21:00 d -> /sys/kernel/debug
drwxrwx--x system   system            2012-12-17 23:14 data
-rw-r--r-- system   system        191 2012-10-09 17:50 default.prop
drwxr-xr-x root     root              2013-12-08 21:03 dev
lrwxrwxrwx root     root              2013-12-08 21:00 etc -> /system/etc
-rw-rw-rw- root     root           69 2013-12-08 21:00 fsck.log
-rwxrwxr-x system   system      98868 2012-09-30 09:42 init
-rw-r--r-- system   system       6747 2012-10-20 20:07 init.htcleo.rc
-rw-r--r-- system   system       1500 2012-09-22 14:16 init.htcleo.usb.rc
-rw-r--r-- system   system      19924 2012-10-27 11:16 init.rc
-rw-r--r-- system   system       1637 2012-10-09 12:00 init.trace.rc
-rw-r--r-- system   system       3915 2012-10-09 12:00 init.usb.rc
-rw-r--r-- system   system       4408 2012-09-15 20:08 logo.rle
drwxrwxr-x root     system            2013-12-08 21:00 mnt
dr-xr-xr-x root     root              1970-01-01 01:00 proc
drwx------ root     root              2012-10-14 14:29 root
drwxrwxr-x system   system            2012-10-20 19:47 sbin
lrwxrwxrwx root     root              2013-12-08 21:00 sdcard -> /storage/sdcard0
drwxrwxrwx system   root              2013-12-08 21:00 storage
drwxr-xr-x root     root              1970-01-01 01:00 sys
drwxr-xr-x root     root              2012-12-17 23:09 system
-rw-r--r-- system   system        613 2012-10-31 09:41 ueventd.htcleo.rc
-rw-r--r-- system   system       3879 2012-09-29 20:18 ueventd.rc
lrwxrwxrwx root     root              2013-12-08 21:00 vendor -> /system/vendor

interesting things in NativeSD?

root@android:/ # ls -l /NativeSD
drwxrwxrwx root     root              2012-11-09 00:24 NexusHD2-ICS
drwxrwxrwx root     root              2012-11-09 00:55 NexusHD2-JellyBean
drwxrwx--x system   system            2012-11-16 19:58 app
drwxrwx--x system   system            2012-11-16 19:58 app-private
drwxrwx--x system   system            2012-11-16 19:59 dalvik-cache
drwx------ root     root              2012-11-08 23:47 lost+found

Since I'm running CM10 at the moment, NexusHD2-JellyBean is the current folder.

Aha, init.rc (in /) has this interesting part:

        # wait for sdcard
        # wait has a timeot of 5 seconds.
        # calling it 4 times allows 20 seconds for the mmcblk0p2 partition to show up
        wait /dev/block/mmcblk0p2
        wait /dev/block/mmcblk0p2
        wait /dev/block/mmcblk0p2
        wait /dev/block/mmcblk0p2
        # SD Card Speed Fix
        write /sys/devices/virtual/bdi/179:0/read_ahead_kb 2048
        # File system check
        exec /bin/busybox sh -c "/bin/e2fsck -p /dev/block/mmcblk0p2 > /fsck.log"
        # mount the 1st (NativeSD) SD-EXT partition
        mkdir /NativeSD
        mount ext4  /dev/block/mmcblk0p2 /NativeSD wait noatime nodiratime barrier=0
        # mount the system and data dir
        exec /bin/busybox mount --bind /NativeSD/NexusHD2-JellyBean/system /system
        exec /bin/busybox mount --bind /NativeSD/NexusHD2-JellyBean/data /data
        # cleanup
        # delete /bin to free ram
        rm /bin/busybox
        rm /bin/e2fsck
        rmdir /bin

followed by

on post-fs
    # once everything is setup, no need to modify /
    #mount rootfs rootfs / ro remount

    # move cache to /data -TYT
    mkdir /data/cache 0770 system cache
    mkdir /data/cache/recovery 0770 system cache
    symlink /data/cache /cache

so something has to rewrite init.rc on change of rom. Listing the files on the SDcard:

root@android:/ # ll /mnt/sdcard/NativeSD                                      
d---rwxr-x system   sdcard_rw          2012-11-08 23:24 NexusHD2-ICS
d---rwxr-x system   sdcard_rw          2012-11-08 23:55 NexusHD2-JellyBean
----rwxr-x system   sdcard_rw     4096 2008-08-01 13:00 clrcad.exe
----rwxr-x system   sdcard_rw   162304 2008-08-01 13:00 haret.exe
----rwxr-x system   sdcard_rw   982389 2012-12-17 22:07 initrd.gz
----rwxr-x system   sdcard_rw      182 2008-08-01 13:00 startup.txt
----rwxr-x system   sdcard_rw  2914084 2012-12-17 22:07 zImage

what's in startup.txt?

root@android:/ # more /mnt/sdcard/NativeSD/startup.txt
set mtype 2524
set ramaddr 0x11800000
set ramsize 0x1e400000
set initrd_offset 0x00a00000
set KERNEL zImage
set initrd initrd.gz
set cmdline "rel_path=NativeSD bootloader=haret"

this looks like a WM thing.

2013-10-26: NativeSD - CM10 - This evening there was no picture on the screen (but I could see a glow when touching a button to turn it on or off). Also, the touch screen didn't respond anymore, making it impossible to unlock the phone, and impossible to power it off via the power reset menu. Holding the power button for ten seconds doesn't work either. I ended up taking out the battery. After inserting the battery again and powering on the phone, things are back to normal.

2013-07-16: NativeSD - CM10 - Today the touch screen didn't respond anymore, making it impossible to unlock the phone, and impossible to power it off via the power reset menu. Holding the power button for ten seconds doesn't work either. I ended up taking out the battery. After inserting the battery again and powering on the phone, things are back to normal.

2013-06-18: NativeSD - CM10 - I had to unlock the SIM card again this evening, and got the "A SIM card has been added, reboot the phone to activate it", with the reboot button. But this time I just ignored the dialog (pressing outside of it made it go away), and tested if I could call and check my messages. Yes - it works. Nice to know.

2013-01-23: NativeSD - CM10 - it happened again: this afternoon, I had to unlock the SIM card, and then Android / CM10 informed me that "A SIM card has been added, reboot the phone to activate it". So it seems the phone dropped off the mobile net somehow.

2012-12-23: streaming videos from a CIFS (Samba) file server: I'm using ES File Explorer (LAN view), currently at version 1.6.2.3 to browse the video files, and MX Player, currently at version 1.7.10 to play the videos. It works like a charm, ES File Explorer even understands DNS names (unlike CIFS Manager, which must have ip addresses). Latest: ES File Explorer upgraded to version 1.6.2.4.

2012-12-17: NativeSD - CM10 - I installed NexusHD2-JellyBean-CM10_V1.3a.zip from 4EXT Recovery, Install, select zip file from SD card, yes (install it), NativeSD (SD-EXT), Full install, RMNET Connection, Enable softkeys, Wipe Dalvik-Cache, After the install is finished it is back to MAGLDR, Services, Boot Settings, AD SD Dir,select NativeSD. Then Boot AD SD. On first boot, I get "Android oppgraderes" (Android is being upgraded), where Android is doing it's "app optimizing" thing before it starts. The "about phone" now reports build number JZO54K (NexusHD2-JellyBean v1.3a) [NativeSD].

2012-12-17: 4EXT Recovery - I did a backup, this backed up both NAND and SD-EXT, probably not a wise choice.

2012-12-17: NativeSD - CM10 - I just tested the power menu, Reboot, Recovery (and Bootloader) - it doesn't not work, it just reboots "normal". Too boot into MAGLDR, you'll have to hold the power button (rightmost button) down until the MAGLDR menu appears. To boot into 4EXT Recovery, from MAGLDR select Boot Settings, AD SD Dir, then Select the 4Extrecovery directory (named 4ext~1 or something like that), then select Boot from AD SD. I currently have 4EXT Recovery v2.2.7 RC5 installed.

2012-11-16: NativeSD - CM10 - this afternoon, I had to unlock the SIM card, and then Android / CM10 informed me that "A SIM card has been added, reboot the phone to activate it". So it seems the phone dropped off the mobile net somehow. On a related note: MAGLDR is currently set to boot from Nand, I need to set it to boot from SDcard. Fixed from MAGLDR menu: Settings / Boot Settings / Boot source - AD SD.

2012-11-09: NativeSD: CM10 - I rebooted my phone into MAGLDR, set AD SD Dir to 4ExtRecovery and booted. Then I installed NexusHD2-JellyBean-CM10_V1.2.zip from the FAT-32 partition, rebooted, set NativeSD as the SD boot dir, and booted from SD again. Android 4.1.2 is here, CM10, build JZO54K (NexusHD2-JellyBean v1.2). Nice!

2012-11-09: NativeSD: I installed NexusHD2-ICS-CM9-HWA_V2.7_NativeSD.zip from the SDcard (FAT-32 partition), to SD-EXT. Rebooted the phone, set the AD SD Dire to "NativeSD" and booted from SD. Up came Android 4.0.4, CM 9.1.0-stable-leo, build IMM76L (NexusHD2-ICS-CM9-HWA v2.7). Cool!

2012-11-08: Prepare for NativeSD: format your SD card. With my new 32 GB SD card: I used the built-in SDcard reader of my Linux laptop, and gparted to partition and format the card as a single FAT-32 partition. Then I put the 4EXTRecovery folder onto the card, unmounted it and put it into my HD2. Boot to MAGLDR (hold down the rightmost button until the menu shows up), select Services, Boot Settings, AD SD Dir (I selected the 4EXTRecovery folder), then boot from AD SD. 4Ext Recovery showed up, I selected Advanced, Partition SD Card, delete all, selected 2 GB for the SD-Ext partiton, 0 GB swap, (the rest for FAT-32), which promptly reformatted my SD card. Next I powered off my phone, took out the card and put it back into my Linux laptop again. I put the 4EXTRecovery folder back onto the FAT-32 partition again. I downladed a few rOMS and put them onto the SD card (FAT-32 partition), Then I put the card back in

2012-08-12: (in Norwegian) I dag (søndag 12.8.2012) oppdaterte jeg CM7 til v3.8.8 (fortsatt Android 2.3.7) ved å følge “ROM or Kernel-Update.pdf”, dvs. legge CM7-fila på sdkort root, boote i CWM, ta backup, installere .zip-fil fra SD kort, reboot. Funker så langt. En morsom detalj: noen ikoner (feks. “Meldinger”) og indikatorsymbolene i statuslinjen har nå fått en slags blåfarge, istedet for “Android-grønn”. søndag 12.8.2012: oppdatert til CM7 v3.8.8 ved å følge "ROM or Kernel-Update.pdf", som består av følgende trinn: 1) kopier inn ny CM7 zip-fil til rota på SDkortet (via usb kabel fra laptop) 2) boot MAGLDR (hold ned høyre tast til meny vises) 3) start CWM ved hjelp av menyvalg AD recovery 4) backup 5) install - "install zip from sdcard", "choose zip from sdcard", (valgte "TyphooN_CM7_v3.8.8-MAGLDR. zip"), "yes" 6) "wipe cache partition" 7) "advanced", "Wipe Dalvik cache" 8) "Fix Permissions" 9) (back to main menu) "reboot system now"

On the first boot, it rebooted quickly (before the "flying sand" of the Android icon), but the next boot seems "normal" so far. Yes, it booted up and appears to work. Note: some icons (Messages, Call, status line indicators) now are kind of bluish instead of bright green. Info (fra Instillinger, Om telefonen):

Android: 2.3.7
Kjerne: 2.6.32.15_tytung_r14-g6333fda
Mod version: CyanogenMod-7-20120805-NIGHTLY-bravo[TyphooN_v3.8.8-MAGLDR]

2011-11-09: (in Norwegian) I kveld ble HD2'en oppgradert til CM7 versjon 3.7.5, som vil si Android 2.3.7. Denne er "experimental", så det blir spennende å se hvor godt den fungerer. CWM ble oppgradert i samme slengen, fra 3.0.2.4 til 3.0.2.5. Jeg fulgte oppskriften "ROM-Update including CWM-Update TyphooN CyanogenMod 7 with MAGLDR".

2011-11-09: (in Norwegian) før oppgraderingen byttet jeg minnekort i telefonen fra 2 GB til 4 GB. Det er fortsatt kun en fat32 partisjon på det nye minnekortet.

2011-10-12: (in Norwegian) En stund nå har jeg irritert meg litt over at kalenderen i Android (2.3.4) starter opp med uke som standard "view"; jeg vil mye heller at den skal vise måned når den starter opp. Fant løsningen i dag, fra en forumtråd: * start kalenderen * velg det "view" du vil ha * bruke HOME-tasten for å gå ut av kalenderen * reboot telefonen

Det sies at man kan bruke en task killer til å drepe kalender-prosessen istedet for trinn fire, men det har jeg ikke prøvd.

2011-07-04: (in Norwegian) Og bare for moro skyld: Unix Furtune – Free.

2011-07-01: (in Norwegian) Dette har hendt to ganger; plutselig er fargene på skjermen helt rare, som på (dette bildet). Dersom jeg tar et bilde med hjelp av "screenshot" i ddms (via adb), så ser det (helt ok ut). Merkelig feil.

2011-05-16: (in Norwegian) Og SMS Backup (1.1.1) by Christoph Studer. Backup av SMS’ene til GMail (egen label: SMS).

2011-05-13: (in Norwegian) Oppdaterte til CM7 versjon 3.2.6 i dag (brukte CWM – enkelt!).

2011-05-13: (in Norwegian) Telefonterror har et lite problem: oppdatering av databasen funker ikke, får bare melding om nettverksfeil.

2011-05-13: (in Norwegian) Android ville ikke se trådløs-nettet mitt hjemme. Etter at jeg byttet kanal på WLAN-ruteren til 11, så funker det (Android "så" ikke kanal 13).

2011-05-09: (in Norwegian) I helga tok jeg endelig mot til meg og installerte Android 2.3.4 på min HTC HD2 mobiltelefon. Det ble CM7 versjon 3.2.2. Noen tips: - velg norsk språk på telefonen for å få kontakter sortert rett - får du ikke sendt / mottatt MMS? sjekk APN-oppsettet (mobilnett). Du må ha korrekt APN / APNer for den leverandøren du har. For Telenor er ett APN for Telenor, og ett APN for Telenor MMS. - det tok litt tid (en hel dag) før været skjønte at jeg var i Oslo og ikke i Sandvika. - notatprogram: jeg installerte AK Notepad (versjon 2.3, gratis) Installert i tlllegg: programmer - AK Notepad - Barcode Scanner - Gmail - Googles - Google Reader - Netcounter (0.14.1) - Telefonterror - Touchdown (Android 2.0) - dette er en 30 dagers demo-versjon widgets - Battery Widget (1.6.7) - CalWidget (0.2.53) 2x2 - Retro Clock / Retro Date (1.6.3) 2x1 oppdatering: vurderer å bytte ut denne med WF & Clock widget (selv om den kommer med reklame) - YRwidget (1.6.5) 4x1 - aCurrency Lite (4.26) 1x1

Oppskrift: lørdag 7.5.2011: installert CM7 ved å følge denne[1] oppskriften. Med god støtte fra denne[2] oppskriften. Jeg hadde allerede installert: - HSPL 2.08 - radio 15.42.50 ("Baseband version" i Android)

I korte trekk: - installert MAGLDR 1.13 (se [2]) - installert CWM (ClockWorkMod Recovery 150M) som beskrevet her[3] - kopiert CM7 zip-fila til sd-kortet, som beskrevet her[2] - installert CM7 fra zip (se [2])

Etter å ha brukt Android litt, så jeg at jeg manglet et notatprogram. Browset (med telefonen) til barcode scanner[4], og installert fra browser. Deretter fant jeg AK Notepad[5] i browseren på PC, brukte barcode scanner, og vips så ble den lastet ned og installert.

Referanser: 1) http://forum.xda-developers.com/showthread.php?t=933951 2) http://forum.xda-developers.com/showthread.php?t=893948 3) http://forum.xda-developers.com/showthread.php?t=1044830 4) http://anmelder.no/android-applikasjoner/barcode-scanner-android-applikasjon.html 5) http://anmelder.no/android-applikasjoner/ak-notepad-en-enkel-android-applikasjon-med-mange-muligheter.html