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 Tomasz Cielecki 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 Tomasz Cielecki 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 Tomasz Cielecki 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 Tomasz Cielecki 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 Tomasz Cielecki at 3:01 pm on September 10th, 2009.
Tags: Android, BFS, Cellphone, Linux.