Since, I got a new phone, I decided to upgrade my old Motorola Milestone with the latest cyanogenmod. CyanogenMod 7 for Milestone A853 is not officially supported by CyanogenMod, however, since I don’t need the phone to be working, I installed it.
As my phone is already rooted, I did not need to follow these instructions.
OpenRecovery/updateschmod a+x repo.bison flex g++-multilib gcc-multilib gperf lib32ncurses5-dev lib32z1-dev libc6-dev-i386 libx11-dev mesa-common-dev openjdk-6-jdkDepending on your CPU and bandwidth, this may take some hours.
mkdir cm4mm
cd cm4mm
repo init -u git://github.com/nadlabak/android.git -b gingerbread
repo sync
vendor/cyanogen/get-rommanager
. build/envsetup.sh && brunch umts_sholes
First, install opkg by using the NMT Community Software Installer. If you are using Ubuntu, install sudo apt-get install mono-complete (which is probably more than you need) to make NMT-CSI run. Download the opkg package, then run sh "Linux Start.sh" and go to File -> Install from File -> opkg_c200_v0.1.8-nmt1.zip. Of course you need to start FTP in order to connect to your device. For more details, go here.
Once opkg is installed get the package list opkg update and install opkg install dropbear. This failed with my setup, so I had to configure it manually:
dropbearkey -t dss -f dropbear_dss_host_key, dropbearkey -t rsa -s 1024 -f dropbear_rsa_host_keychmod 600authorized_keys to this directoryAfter that, I modified /share/Apps/local/etc/init.d/51dropbear.sh in order to start dropbear (inspired by this thread.
#!/bin/sh
[ -e /share/Apps/local/etc/default/dropbear ] && . /share/Apps/local/etc/default/dropbear
if [ "$DROPBEAR_ENABLE" = "no" ]; then
exit
fi
if [ -n "`pidof /share/Apps/local/sbin/dropbear`" ]; then
killall /share/Apps/local/sbin/dropbear 2>/dev/null
fi
# root does not have a shell, so ssh wont work. Give the root a shell
sed -i 's#root:x:0:0:root:/root:/bin/true#root:x:0:0:root:/root:/bin/sh#g' /etc/passwd
mkdir -p /etc/dropbear
cp /share/.ssh/dropbear_dss_host_key /etc/dropbear
mkdir -p /root/.ssh
chmod 700 /root/.ssh
cp /share/.ssh/authorized_keys /root/.ssh/
chown root.root /root
# -s Disable password logins
/share/Apps/local/sbin/dropbear -s
Lets hope that the installation of an ssh server on the new Popcorn Hour A-300 is a bit easier.
Update 15.12.2011: I installed unison for doing backups on my NMT. Unfortunately, I did not find the package here. However, it turned out to be easier than I thougt. Instead of cross-compiling my own package, I tried the package from debian, and it worked by just copying the binary into the /share/Apps/local/bin/. The only problem is the CPU that slows the encrypted traffic down to around 10MBit/s.
I had to patch an external library and since my project uses Maven, I wanted to upload this patched library to my Maven repository. It turned out that I had to use maven2 as maven3 handles extensions differently.
Stackoverflow provided the rest of the information I needed to upload a library to my maven repository.
/home/draft/java/apache-maven-2.2.1/bin/mvn deploy:deploy-file -Durl=scp://tomp2p.net/home/draft/maven -DrepositoryId=ssh-tomp2p -DgroupId=org.jboss.netty -DartifactId=netty -Dversion=3.2.6.Patched -Dpackaging=jar -Dfile=target/netty-3.2.6.Patched.jar
After reading the following articles, I decided to tweak battery life on my HP 5103. Before I started, I installed the latest Linux 3.1 kernel.
The battery usage without any tweaks was 11.4W as reported by powertop. I tested the option pcie_aspm=force and the power usage went down to 10.3W. Another tweak I did was to mount the / with the option noatime to reduce disk IO. If this option is set, reading accesses won’t be written (atime) to disk. However, I did not do any measurements.
Furthermore, I disabled bluetooth and added the following lines to rc.local (found here and here
for i in /sys/class/scsi_host/host?/link_power_management_policy; do
echo min_power > $i
done
for i in /sys/bus/usb/devices/*/power/autosuspend; do
echo 1 > $i
done
for i in $(find /sys/devices/pci* -wholename "/sys/devices/pci*/power/control");
do if [[ "$(cat $i)" == "on" ]]; then
echo "auto" > $i;
fi;
done;
And now I’m down to 9.5W. Further reduction can be achieved by dimming the backligth.
If you want to have this done automatically, you may want to install laptop-mode-tools. However, you need first to change the line
Look for :
"2.6" ) ;;
And add right after on line following, which ought to allow kernel 3.0, 3.12 .. 3.9876.
3.[0-9]*) ;;
If your mouse is only working after replugging, add it to the blacklist (in /etc/laptop-mode/conf.d/usb-autosuspend.conf set AUTOSUSPEND_USBID_BLACKLIST="046d:c018"), or buy a mouse that supports autosuspend. I also had to disable the WLAN autosuspend (/etc/laptop-mode/conf.d/wireless-power.conf), as this is with brcmsmac not possible.