Just found out that I had to change my udev rules for my Nexus One to work with my laptop, which I had made rules for to work with my HTC Magic – the vendor IDs have changed a bit for the Nexus One, so for the Nexus One I use the following rules which reside in /etc/udev/rules.d/50-android.rules
1
2
3
4
| SUBSYSTEM=="usb|usb_device", SYSFS{idVendor}=="18d1", MODE="0660", GROUP="plugdev"
SUBSYSTEM=="usb|usb_device", SYSFS{idVendor}=="0bb4", MODE="0660", GROUP="plugdev"
SUBSYSTEM=="usb|usb_device", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", SYMLINK+="android_adb"
SUBSYSTEM=="usb|usb_device", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot" |
This works well with both adb and fastboot.
Oh and for reference I had the following rules for my Magic which ought to work with the Dream as well:
1
2
3
| SUBSYSTEM=="usb|usb_device", SYSFS{idVendor}=="0bb4", MODE="0660", GROUP="plugdev"
SUBSYSTEM=="usb|usb_device", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", SYMLINK+="android_fastboot"
SUBSYSTEM=="usb|usb_device", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0c02", SYMLINK+="android_adb" |
Posted by ostebaronen at 9:28 pm on May 14th, 2010.
Tags: Android, Driver, Google, HTC Nexus One, Linux, nexus, Nexus One, One, udev.
I made a small script just to test the syntax highlighting plug-in I installed for WordPress. So here it goes:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| #!/bin/bash
# Scipt that installs a batch of apk files on an Android device,
# through the adb tool from Android SDK.
adbPath="/home/tomasz/android/android-sdk/tools/adb"
if [ $# -ne 1 ]; then
echo "usage: `basename $0` foldername"
exit 1
fi
for f in $( ls "$1" );
do
$adbPath install "$f"
done |
The script is very simple and installs apk files in a folder through adb (Android Debug Bridge). This of course requires the Android SDK and a some kind of a Linux distribution.
Posted by ostebaronen at 2:19 pm on November 8th, 2009.
Tags: adb, Android, Bash, Cellphone, Language, Linux.
I have made a script for pushing files and folders through adb to the SDcard of an Android device. This can be used in combination with nautilus for right-clicking on folders to push it.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
| #!/bin/bash
# Script for pushing files and folders through adb.
# Can also be used without nautilus.
# Feel free to edit and distribute as much as you want.
# if you want dialogs set dialog_enable=1 else dialog_enable=0
dialog_enable=1
# Write the entire path to adb here
adbPath="/home/tomasz/AndroidSDK/tools/adb"
function dialogs {
if [ $dialog_enable = 1 ]; then
if [ -e "/usr/bin/gdialog" ]; then
gdialog --title "adb push" --msgbox "$1" 200 200
elif [ -e "/usr/bin/Xdialog" ]; then
Xdialog --title "adb push" --msgbox "$1" 0 0
else
echo "No dialog program present"
fi
fi
}
if [ $# -ne 1 ]; then # If arguments not equal 1, complain!
echo "Usage - $0 file"
echo "or - $0 directory"
exit 1
fi
if [ -d "$1" ]; then
$adbPath shell mkdir "/sdcard/`basename "$1"`" # Create the directory on SDcard
$adbPath push "$1" "/sdcard/`basename "$1"`" # Push files in the folder to folder on SDcard
dialogs "Folder $1 was pushed"
elif [ -e "$1" ]; then
$adbPath push "$1" /sdcard/ # Push single file to SDcard
dialogs "$1 was pushed"
else
echo "Gurumeditation!" # Oops!
fi |
Download the script by using this link: http://ostebaronen.dk/android/adbpush.sh
In order to have it in your right-click menu in Nautilus place the script in: ~/.gnome2/nautilus-scripts/ and run chmod u+x ~/.gnome2/nautilus-scripts/. Now you should see the script in your right click menu under scripts in Nautilus.
Posted by ostebaronen at 3:52 pm on October 25th, 2009.
Tags: Android, Bash, Linux, Scripts.

Awesome, I got it working. My own compiled Linux Kernel from CyanogenMod’s repository. It boots and wlan does also work. Great success!
The process of doing so is pretty straight forward. I followed a post, by a guy called bcrook at XDA-developers had made to help some other person, with slight modifications.
This guide requires you to run a Linux based system, since the compilers are made for this system. You might as well have some luck with Cygwin, but I wouldn’t count on it.
So here is what I did to get it working.
- First get the android source and build it. You will need JDK, curl and git and probably also some other tools to get this working.
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
mkdir <Android source dir> && cd <Android source dir>
repo init -u git://android.git.kernel.org/platform/manifest.git
When it is done build it.
make
- Now we have the tools and compilers ready so we just need to add them to our PATH.
export PATH=$PATH:~/<Android source dir>/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin
- Grab the CyanogenMod kernel from his GIT repo. Make sure to get the correct branch or you will see a lot of errors while compiling!
git clone git://github.com/cyanogen/cm-kernel.git
git branch -r
git checkout --track -b cm-2.6.29-bfs origin/android-2.6.29-bfs
- Now get a configuration for the kernel. You can pull an existing one from you phone, it is found in /proc/config.gz or you can use your own. This needs to be put in your cm-kernel dir, where you will se a lot of folders and such.
zcat config.gz > ~/cm-kernel/.config
- Apply any patches to the kernel now.
- Build it! This is done easily it is here the PATH we exported earlier comes in handy.
cd ~/cm-kernel
make ARCH=arm CROSS_COMPILE=arm-eabi-
Wait for it to get done. The built kernel will be in arch/arm/boot/zImage
- Now we just need to build the wlan.ko module, so we can get some WiFi on our phone.
cd <Android source dir>/system/wlan/ti/sta_dk_4_0_4_32
make KERNEL_DIR="<kernel source dir>" ARCH=arm
The kernel is now built!
Last thing to do is to pack it into a boot.img instructions can be found on android-dl’s Wiki.
Posted by ostebaronen at 5:47 pm on October 3rd, 2009.
Tags: Android, Compiling, GIT, Kernel, Linux.
My brother and I share the same host, and have been experiencing some problems with the old one, which was Gigahost.dk. Their MySQL service didn’t work as well as intended, and often just did not work.
Therefore we decided to get our own Virtual Private Server (VPS) at GoTekky.com, which is a server host, who has their servers located at CANIX. So now we have got a small VPS with 128 MB RAM, though 256 MB bursted, 15 GB harddisk space and 100 GB bandwith pr. month. All this costs 60 USD each year, which is very cheap considered you can do practically anything with the server! The server is by the way running CentOS with Kloxo panel, which seems to work very well!
Posted by ostebaronen at 5:40 pm on September 16th, 2009.
Tags: GoTekky, Hosting, Linux, Server, Site updates, Virtual Private Server, VPS.
Yesterday I tried out the newest version of Cyanogen’s experimental branch of his ROM, which includes a lot of new features and code from Donut, but also a lot of nice Linux kernel tweaks such as BFS, which is a scheduler aimed towards slow hardware. It seems that it looks up to it’s promise because the experience with the Linux kernel with BFS was pretty good.
Everything about the whole system feels a lot snappier. Menues are not choppy, scrolling the app list is fluid, switching between the desktops is painless aswell. Execution of applications is very fast aswell! I really hope that Google implements BFS or a simillar scheduler in their future kernel releases, because this really kicks ass. And with the new HTC Tattoo comming with a more optimized CPU, I think it will kick a lot off buttocks when it gets combined with a better scheduler.
So all in all. BFS is awesome. If it does not work for you as I state, you might be doing something wrong
Read more about BFS
Read more about Cyanogens ROM
Posted by ostebaronen at 3:01 pm on September 10th, 2009.
Tags: Android, BFS, Cellphone, Linux.
If you keep a spreadsheet file with all your contacts you can easily import them to your phone. This is done by uploading the CSV file to your gmail account where you import it.
First step: Save a CSV file
Follow the Gmail Help page, which describes what your columns are supposed to be called and so on. Save the file to a CSV file.
Second step: Importing the CSV file to Gmail
- Sign in to Gmail
- Click Contacts (located below your list of views) on any Gmail page.
- Click Import in the top portion of the Contact Manager.
- Click the Browse… or Choose File button and locate the CSV file you’d like to upload.
- Select the file and click the Import button.
If some of the fields in the CSV file are left out Gmail will tell you why. Also a smart thing is to make a Category for your contacts, this way you can delete them all again if you made a big mistake.
Many thanks to Google Android Bruger Blog!
Posted by ostebaronen at 9:56 am on September 5th, 2009.
Tags: Android, Cellphone, Contacts, Converting, Gmail, Linux.
NOTICE, some autosigners and sign programs do not work on Vista and Windows 7, either use Windows XP, MacOS or Linux for signing.
The other thread about changing the animated boot screen on HTC Magic, seems to only work on HTC builds, which implement the ability to have animated boot screens through a simple gif image. This does unfortunately not apply to the Google build ROMs, therefore we need to avail ourselfs of another method of changing the boot screen, which also is more complicated.
First we need to pull the framework-res.apk which resides in /system/framework/ from a update.zip for a full ROM.
Next unpack the file somewhere, inside the folder assets/images there should be two or more png images. They are called:
android-logo-mask.png

android-logo-shine.png

And can look like the images above. Those are the two files we need to edit or remake to our likings.
As you maybe can se the letters and the android in the first image are transparent, which means the shine will be shown on the phone it self as background image. This is as far as I know the only possibility of having a animated boot screen on the Google build ROMs, which is not as fancy as the animated gif images that you can make for the HTC build ROMs.
For this guide I will use the same splash image I am using for the first non animated splash screen.

As you can see it does not contain any transparent areas, I am going to turn the outline of the android and the lettering transparent and change the color of the shine. You can do that in any photo editing program such as GIMP, photoshop and Paint.net, and I will not guide you through that. The result is as follows.


Now that I have to two images, I overrite the images in framework-res/assets/images, zip the file and rename it back to framework-res.apk and put it back in the update.zip, then sign it according to android developers. Now flash it to your phone and you should be seeing it next time you boot your phone.
Posted by ostebaronen at 5:59 pm on August 23rd, 2009.
Tags: Android, Cellphone, Gadgets, Linux, Modification.
From time to time when you change ROM’s on your HTC Magic the accelerometer goes crazy and won’t read any values, which means no rotation of the screen and the compas will not respond either. This is fixed by deleting the file that contains previous data about the positioning. The reason for this is when you sometimes forget to wipe before applying new ROM’s old data is stored and messes up the accelerometer.
Reboot your phone in Recovery mode (home+end/power)
adb shell
mount -o rw /dev/block/mtdblock5 /data
rm /data/misc/akmd* /data/misc/rild*
Now reboot the phone and everything should be working again.
Posted by ostebaronen at 5:46 pm on August 2nd, 2009.
Tags: Android, Cellphone, Gadgets, HTC Magic, Linux.
You might have noticed that the first bootscreen, the one we changed in the previous guide on how to change the Android Splash, changes into some other boot image, which is animated. You might want to change that, which is super simple. This only works for HTC builds of the Android ROMs.
See this post for Google Builds
The second boot screen has quite alot of possibilities, it can be animated and it can have sound. It can be made of two seperate images, one where the animation happens and a background image. You can found some of these bootscreens here: 2nd splash images
Now when you have the image(s) and the sound file we need to edit the boot_animation.xml file to contain the file names of the images and the soundfile you want to show up upon boot. Here is an example of how it can look:
<BootConfiguration>
<BootAnimation
image="/system/media/boot.gif"
audio="/system/media/boot.mp3"
image2="/system/media/boot2.gif"
image3="/system/media/boot3.gif"
screenX="100"
screenY="130"
image_bg = "/system/media/boot_bg.gif"
useAudio="1" // 1: true ; 0:false
/>
</BootConfiguration>
Everything except the image entry is optional. So if you don’t want to have sound you do not need to have it in the file. The screenX and screenY are offsets if you are using image_bg along with a smaller image that doesn’t fit the whole screen, it is for positioning it on the screen.
When you are done editing the file save it as boot_animation.xml and now we can push all the files to the phone. Remember to remount the /system partition with the rw option
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push boot_animation.xml /system/media/
adb push boot.gif /system/media/
Do so with every file mentioned in the boot_animation.xml file and reboot your phone to see the final result.
Enjoy
EDIT:
Apparently some ROM’s have their bootscreen stuff in /system/media/bootscreen/ rather than just in the media folder.
Posted by ostebaronen at 7:35 pm on July 20th, 2009.
Tags: Android, Cellphone, Gadgets, HTC Magic, Linux.