Post

My basic setup of CyanogenMod-6.0 on HTC Desire

https://linux-old.xvx.cz/2010/09/my-basic-setup-of-cyanogenmod-6-0-on-htc-desire/

Since I bought my HTC Desire I wanted to put CyanogenMod on it. This ROM is quite popular, but only version 6.0 released last week supports HTC Desire.

I’m going to put a few notes here on how I did “post installation” changes like removing some programs, ssh key config, OpenVPN setup and few more.

I don’t want to describe here how to install this ROM to the HTC Desire, because there is nice how-to on their pages: Full Update Guide - HTC Desire

Just one remark - If you suffer with signal lost please look at this page.

Put ssh keys to the phone and start dropbear (SSH server): (taken from CyanogenMod Wiki - Connect with SSH)

Copy your ssh public key from your linux box to the phone:

1
adb push /home/ruzickap/.ssh/id_rsa.pub /sdcard/authorized_keys

Prepare dropbear on the phone:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
adb shell

mkdir -p /data/dropbear/.ssh/

dropbearkey -t rsa -f /data/dropbear/dropbear_rsa_host_key
dropbearkey -t dss -f /data/dropbear/dropbear_dss_host_key

cp /sdcard/authorized_keys /data/dropbear/.ssh/

chmod 755 /data/dropbear /data/dropbear/.ssh
chmod 644 /data/dropbear/dropbear*host_key /data/dropbear/.ssh/authorized_keys

echo "export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin" >>/data/dropbear/.profile

dropbear

Remove some useless applications: (check this page CyanogenMod Wiki - Barebones to see what can be removed)

Reboot to “ClockworkMod recovery” (using Fake Flash by Koush).

Mount /system partition:

1
2
3
adb shell
mount -o nodev,noatime,nodiratime -t yaffs2 /dev/block/mtdblock3 /system
mount /data

Backup directories under /data:

1
2
3
4
BACKUP_DESTINATION="/sdcard/mybackup"
cd /data
mkdir -p $BACKUP_DESTINATION/data/ && \
cp -R `ls /data | egrep -v "dalvik-cache|lost\+found"` $BACKUP_DESTINATION/data/

Move applications to sdcard:

1
2
3
4
5
6
7
for APK in ApplicationsProvider.apk CarHomeGoogle.apk CarHomeLauncher.apk com.amazon.mp3.apk Development.apk Email.apk Facebook.apk GenieWidget.apk googlevoice.apk Maps.apk PicoTts.apk Protips.apk RomManager.apk SetupWizard.apk SpeechRecorder.apk Stk.apk Street.apk Talk.apk TtsService.apk Twitter.apk VoiceDialer.apk YouTube.apk; do
echo "*** $APK"
mkdir $BACKUP_DESTINATION/$APK && \
mv /system/app/$APK $BACKUP_DESTINATION/$APK/ && \
mv /data/data/`awk -F \" '/'$APK'/ { print $2 }' /data/system/packages.xml` $BACKUP_DESTINATION/$APK/
#/system/bin/pm uninstall `awk -F \" '/'package.apk'/ { print $2 }' /data/system/packages.xml`
done

Remove unused audio files:

1
2
3
4
5
for AUDIO in `find /system/media/audio -type f|egrep -v "ui|Alarm_Buzzer.ogg|SpaceSeed.ogg|Doink.ogg|SpaceSeed.ogg|CrayonRock.ogg"`; do
for AUDIO in `find /system/media/audio -type f|egrep -v "ui|pixiedust.ogg"`; do
    echo "*** Removing $AUDIO"
    rm $AUDIO
done

Unmount all used filesystems:

1
2
cd /
umount /data /sdcard /system

It’s all for now… I’m sure I will do more sooner or later, but it’s just a few notes for now.

Enjoy :-)

This post is licensed under CC BY 4.0 by the author.