Installing sqlite on a rooted Android phone.

Many rooting tools install the sqlite3 binary by default, but the pre-rooted rom on my SGS seems to be an exception, so here is a guide to install it manually.

You will need the SDK tools on your computer for this to work!

Connect the phone, bring up a shell and get root permissions:

$ adb shell
/ $ su
#

Find the device for the system partition:

# mount                                
rootfs / rootfs ro,relatime 0 0
proc /proc proc rw,relatime 0 0
sys /sys sysfs rw,relatime 0 0
/dev/block/stl11 /cache ext4 rw,noatime,barrier=0,data=writeback,noauto_da_alloc 0 0
/dev/block/stl10 /dbdata ext4 rw,noatime,barrier=0,nodelalloc,data=ordered,noauto_da_alloc 0 0
/dev/block/mmcblk0p2 /data ext4 rw,noatime,barrier=1,data=ordered,noauto_da_alloc 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
/dev/block/stl6 /mnt/.lfs j4fs rw,relatime 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/stl9 /system rfs ro,relatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/stl3 /efs rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:9 /mnt/sdcard/external_sd vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:9 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/external_sd/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0

The important bit here is /dev/block/stl9 /system rfs which is needed for the next step.

Remount the file system rw (replace rfs and /dev/block/stl9 with the values from the output of mount):

# mount -o remount,rw -t rfs /dev/block/stl9 /system

Next, in a separate terminal copy the sqlite3 binary to the phone (can be obtained from the Super One Click package http://www.shortfuse.org/):

$ adb push sqlite3 /sdcard/
42 KB/s (24120 bytes in 0.557s)

Back in the original terminal, move the binary to /system/bin and set permissions:

# cp /sdcard/sqlite3 /system/bin
# chmod 4755 /system/bin/sqlite3

Finally, remount the /system filesystem read only again:

# mount -o remount,ro -t rfs /dev/block/stl9 /system
Share

First Android app completed.

My first Android app has now been completed and is available on the Android Marketplace, it’s not going to be any use to anyone who is not using the vps247 cloud service, but for anyone is it’s a very handy app.

Here is quick overview of the features available in the app:

1. Resource viewer, displays current memory, disk, IP and bandwidth usage:



2. Server viewer, displaying all servers and a traffic light to indicate the server status, servers can be tapped to show detailed information and access start/stop controls:



3. IP address viewer:



4. Create new servers, which has a nice interface with sliders and drop downs to make it easy to configure a new server. The available resources are used to dynamically generate the creation interface:



To download the app, just search for ‘vps247’ in the Android Marketplace and it should show up!

Share

First attempt at a (useful) Android app

I’ve had the Android SDK installed for a few months, but down to lack of ideas and time I’ve not really done anything with it.

One of the hosting companies (VPS247) I am using at the moment have just released an iPhone app, as well as an API, they’re exposing almost the full functionality of their cloud hosting admin area via the API which is quite a nice idea. With lack the lack of an Android app I decided to have a go.

So far I’ve created a ‘login’ which just requires the API key of your account:

Once you’ve entered a valid 40 character API key, the API is then queried twice for your account resource info and details of virtual servers that are currently setup (I’ve blurred my host names as I don’t think anyone really needs to know these):

Here is the package file if anyone want’s to give it a try: VPS247Monitor

Share