Category: Install Help

Installing My First APK from the SDCard

I finally finished my first Android application to the point that I wanted to try to start using it on my phone.

This post explains how to install applications, but I had some problems:

Bright Hub: How to install APK files on your Google Android Phone

First, with installing from the SD Card, it doesn’t say exactly what application to use.  From the Market, I installed “AppsInstaller” developed by ModMyMobile.com.  When I opened the program, it scanned my card, and found my application that I had uploaded via the USB cable.  But, it said that the applications were blocked and offered to take me to settings.  I check the “Unknown sources” option which is described  as “Allow install of non-Market applications”.  Then, it worked!

Also, I tried to install with adb, but I couldn’t get that to work.  When I ran “./adb devices”, I don’t see any devices listed.  This “G1 usb drivers for linux” post looks promising, but I haven’t finished going through all of the steps.  I will try to post back when I do.

WebEx working again in Ubuntu 9.10-64bit!

It seems like this is the pattern with me and WebEx.  I tinker to get it working, I upgrade, it breaks, repeat.  Well, my most recent fling through this cycle started with a broken hard drive.  Actually, several things started it.  First, I originally thought my laptop had a 32-bit processor.  When I found out the new version of PeopleSoft requires a 64-bit OS, I did some research and found that it was actually a 64-bit processor.  Then, when I sent the laptop off to have the hard drive replaced, I figured that was the time to put 64-bit Ubuntu on it.

So, that is how it started, and then, I couldn’t get WebEx to work.  I got Eclipse to work on 64-bit Java, Java worked in the browser, and everything was fine.  I didn’t want to try to pull it all out and reinstall the 32-bit Java just to get WebEx working.  So, I decided to attempt to try to install the 64-bit and 32-bit versions side by side.  With some help, I got it to work:

Ubuntu Forums: 32-bit and 64-bit Firefox at the same time

The first step was installing Java.  It was pretty simple and straight forward.  I downloaded it from Sun’s website.  Essentially, you just extract it and set your environment variables to use it.  The path I chose was $HOME/bin/java.

Next, I found that you cannot use the 32-bit version of Java with the 64-bit version of Firefox.  Firefox throws out all of the 32-bit plugins with this message: “wrong ELF class”.    So, I installed Firefox by downloading it from Firefox’s website.  I extracted it to $HOME/bin/java/firefox.

The next key was linking the Java plugin in the path where Firefox would see it.  First, I linked the plugin into plugins directory:

ln -s $JAVA_HOME/lib/i386/libnpjp2.so libnpgp2.so

Once in the Firefox plugins directory, you have to make sure Firefox knows where the plugins directory is with the MOZ_PLUGIN_PATH variable.

So, to recap, I have:

  • Java installed at $HOME/bin/java
  • Firefox installed at $HOME/bin/java/firefox
  • Java pluing installed at $HOME/bin/java/firefox/plugins from $HOME/bin/java/jdk…/lib/i386/libnpjp2.so

Then, I created an environment script that sets all of the paths and variables to make it work:

#!/bin/sh
export PATH=~/bin/java/firefox:~/bin/java/jdk1.6.0_18/jre/bin/:~/bin/java/jdk1.6.0_18/bin/:$PATH
export JAVA_HOME=~/bin/java/jdk1.6.0_18/jre
export MOZ_PLUGIN_PATH=~/bin/java/firefox/plugins

Finally, I created a script to launch firefox:

#!/bin/bash

cd ~/bin/java
. ./env.sh
firefox --no-remote -P WebEx

And, it worked!

Ubuntu 9.04

I finally upgraded to Ubuntu 9.04  last weekend.  My wireless card quit working.  I tried several things like reinstalling the broadcom driver and all, but it wouldn’t work in Ubuntu 8.10.  I thought “”what would it hurt”, I will probably have to reinstall anyway.

The upgrade went with no problems, but it still didn’t fix my wireless problem.  I finally determined that my problem was with the network-manager and not my driver because I could see it with ifconfig.  So, I completely removed the network-manager, rebooted, and reinstalled.  Still no luck.  So, I was sitting on the couch programming with no Internet, and it just started working again!

I have noticed a few things working better!  First, when I do my dual screens, I noticed that it now places my Applications bar on the laptop screen.  Before, it didn’t seem to matter how I switched to dual screens, it would place my Applications bar on the other monitor.

Resources

Thread used for info on reinstalling network-manager

Partitioning in Ubuntu Installs

I just read a good tip about partitioning for Ubuntu.

They suggest using GParted Live to partition the hard drive first.  That sounds great!

I miss the option that Fedora has where you can delete all the Linux partitions and have it automatically create the new partitions.  I don’t remember the options for sure, but I think you can only delete all the partitions or shrink the existing partitions.  If I am reinstalling, I want it to leave my Windows partition alone and delete the Linux ones.  Another great option would be to manually pick the partitions to delete and use the freed space to automatically create the partitions.  Finally, another option that would be nice is to choose how much it shrinks the existing partitions.

NavIt

I was having trouble downloading the maps for RoadNav, and I didn’t notice a lot of progress or change on the problem.  So, I checked for alternatives, and I found this.  I tried the first on the list: NavIt.

Installing

I didn’t find NavIt in the Ubuntu repository, and so, I had to install manually.  The Wiki has a getting started section with instructions for installing on Linux.

First, I had to install the dependencies so that I could compile it.  I installed the list from the dependencies section.

sudo apt-get install build-essential pkg-config automake libglib2.0-dev libtiff-dev libtool libxmu-dev libfribidi-dev gettext zlib1g-dev gpsd gpsd-clients libgps-dev libgtk2.0-dev freeglut3-dev glutg3-dev libcegui-mk2-dev libdevil-dev libglc-dev libpcre3-dev libmng-dev libfreeimage-dev

Next, I ran the configure and make.  Instead of installing, I just ran it from the directory where I compiled it.

Configuring

At this point, I had it working as long as I ran it from the directory where the program exists.  But, it didn’t have any maps for my area.  Next, I had to tackle configuring with the XML file.

First, I created a hidden directory and copied the xml file to it:

$ mkdir ~/.navit
$ cp /home/skp/bin/navit-0.1.0/navit/navit.xml  /home/skp/.navit/

Next, I opened the xml file with Gvim (my favorite text editor).  “Gvim ~/.navit/navit.xml”.  You could use any text editor to open it.

The first change I made was to change the default position.  I got my default coordinates from here as suggested in the Wiki.  I found that these coordinates got me close, but not quite the address I had requested.  So, I checked them with Google maps.  If you notice, the URL on the “Link” link in the upper right corner has the coordinates of the map you request.

I tried to run it at this point from my home directory, but it would not work.  It was looking in other directories, and so, I took the easy route and just keep running it from the source directory.  It still read my xml file from my home directory.

Next, I had to setup the maps.  I followed these directions.  I used the maps from CloudMade, which has maps of the United States.  I downloaded the *.navit.bin.zip files and extracted them to ~/.navit/.  For example, I downloaded the Florida map: florida.navit.bin.zip to ~/.navit/florida.navit.bin.  Finally, I added this to the XML file:

<mapset enabled=”yes”>
<map type=”binfile” enabled=”yes” data=”/home/skp/.navit/florida.navit.bin” />
</mapset>

Now, when I started it up, I saw a map with where I wanted it to start!

Creating a Shortcut

The last thing  I did was create a shortcut in my application menu.  This was pretty easy.

The first step was to create a simple shell script to launch the program.  This was necessary because the program has to run from the source folder.  Here is what my script looked like:

#!/bin/sh

cd ~/bin/navit-0.1.0/navit
./navit

Note: change the cd path to the location where you downloaded and compiled the program.

Then, make the script executable with:

chmod +x navit.sh

To add the menu, I used the Menus application by right clicking on the Applications menu and choosing “Edit Menus”.  I clicked on the Accessories menu and clicked the New Item button.  Here are the options that I chose:

  • Type: Application
  • Name: NavIt
  • Command: /home/skp/bin/navit.sh
  • Comment: <blank>

Note: change the Command path to the script that you created to launch the program.

For the icon, I clicked on the little spring icon on the left to choose a different icon.  For the path, I chose: /home/skp/bin/navit-0.1.0/navit/xpm/desktop_icons/128×128.

To troubleshoot, you may want to change the Type from Application to Application in Terminal because the terminal window will show you the output messages from the program.

Gpsd: Fixing for Ubuntu

I have an LT-20 Delorme Earthmate GPS.  It may not be the best GPS, but it gets the job done.  Getting it to work in Ubuntu was no easy feat.

I had to fix a bug in a cypress module.  I followed the instructions from here.

To get the kernel version, I ran:

uname -r

Then, to install the kernel source, I ran:

sudo apt-get install linux-source-2.6.24

Then, I changed directories into the installation directory and unzipped the source:

cd /usr/src
sudo tar -xvf linux-source-2.6.24.tar.bz2

Then, I copied the two files:

cd linux-source-2.6.24/drivers/usb/serial/
sudo mkdir /usr/src/modules
sudo cp cypress_m8.h cypress_m8.c /usr/src/modules/

Next, I created the make file (note that I have installed gvim.  I saw a note saying that they had problems using the gedit text editor):

cd /usr/src/modules
sudo gvim Makefile

And, I pasted these lines into the Makefile:

obj-m := cypress_m8.o
KDIR := /lib/modules/

$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

Then, I edited cypress_m8.c and commented out line 408.  The original instructions have more detail on this.  I thought the line number might be different, but it was the same as the original instructions.

When running make (sudo make) I had trouble with “make: Nothing to be done for `default’.” message.  I just opened the file and deleted and readded the tab in front of the last line.  Then, it ran fine.

Then, I ran the command:

sudo install -m 644 cypress_m8.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/cypress_m8.ko
sudo depmod -a

Resources