Category: Uncategorized

Power Problems

I have been having trouble with my battery not charging.  The battery seems to have good capacity — I just replaced it a few months ago.  But, I can run it down, plug the laptop in, and then hours later the battery is still dead.

I found this article that seemed like it might help:

Ubuntu Productivity: Battery always 0% in Ubuntu 10.04

I tried the two things suggested on the blog:  I pressed the power button for a couple of seconds while the battery and power cord were out, and I tried to start upower.  I didn’t have upower as an option even for installing probably because I am still on Ubuntu 9.10.

What I haven’t tried yet is recompiling libusb as suggested in the related forum topic.

Update Dell BIOS

I found this article that describes updating the BIOS, so I thought I would give it a try.

Here is the first command:

sudo apt-get install libsmbios-bin

Then, I ran the command to see what version my laptop was currently on:

sudo getSystemId

Here are the first few lines of the output (the version is A07):

Libsmbios version:      2.2.13
Product Name:           Inspiron 1720
Vendor:                 Dell Inc.
BIOS Version:           A07

On support.dell.com, I found that the latest version out there is A09.  Then, I used wine to extract the header:

 wine 1720_A09.EXE –writehdrfile

Sure enough, it created the hdr file:

$ ls *.hdr
1720_A09.hdr

Next, I loaded the module:

sudo modprobe dell_rbu

Finally, I ran the update:

sudo dellBiosUpdate -u -f 1720_A09.hdr

Here is the output:

Performing BIOS update...
Update successfully staged. Reboot the system to begin BIOS update.
No reboot option specified. The --reboot option is highly recommended.
Finally, I had to reboot.  After the reboot, I found I now had version A09.

Installing APK files through ADB

I was having trouble getting adb to recognize my phone.  I found this post that helped.  Here is what I did.

First, I used this command to determine, which device was my phone:

lsusb | grep "High Tech Computer Corp"

The output looked like this:

Bus 002 Device 008: ID 0bb4:0c01 High Tech Computer Corp.

When I look at the device node, I can see that permissions might be an issue.  If you notice from the above statement, the Bus is 002 and the Device is 008 so those are the numbers I will use in looking at the device.  Here is the command:

ls -l /dev/bus/usb/002/008

Here is the output

crw-rw-r-- 1 root vboxusers 189, 135 2010-06-16 09:54 /dev/bus/usb/002/008

Next, the post did not say where to place the rules file to correct this.  I found another article with a little more information on udev rules.

So, I opened the file with this command:

sudo gedit /etc/udev/rules.d/70-android.rules

And, I placed this in the file:

BUS=="usb", SYSFS{idVendor}=="0bb4", GROUP="android", MODE="0660" /* HTC */

Next add the group with this command:

sudo groupadd android

Next add the user (my username is skp) to the group with this command:

sudo usermod -a -G android skp

Then, it was time to test.  I restarted the udev service with this command:

sudo restart udev

Here is the output of the service:

udev start/running, process 23528

Now, I don’t see the phone, but I had VMWare running, so that may have grabbed the device instead.  I don’t know what happened and I had to come back to this later.  Then, after a reboot, my security settings looked better:

crw-rw---- 1 root android 189, 133 2010-06-16 21:25 /dev/bus/usb/002/006

Still, it didn’t work.  The command:

./adb devices

gives this output:

* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
Then, I realized that there is security on the phone. (I felt kind of silly)  I had to turn on the USB debugging option.  In the settings, I enabled Settings > Application settings > Development > USB debugging.
Then, the adb output looks like this:
List of devices attached
HT849GZ65323	device

Now that I have access to the phone, I used this command:

./adb install ~/app/<my program file>.apk

The output looked like this (I had already installed the application from the SDCard, so it makes sense):

383 KB/s (28018 bytes in 0.071s)
	pkg: /data/local/tmp/nehemiahG1.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]

This command did the reinstall:

./adb install -r ~/app/nehemiahG1.apk

Here is the output

224 KB/s (28018 bytes in 0.121s)
	pkg: /data/local/tmp/nehemiahG1.apk
Success

Success!

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.

Android Patterns

I came across this post with Android patterns taken from the Twitter App:

Android Developer’s Blog: Twitter for Android: A closer look at Android’s evolving UI patterns

I finally found a post that pointed me to the source code for a pattern application (I don’t think it is the Twitter application like I first thought): IOSched.

While I was at it, I thought I would search for some more patterns that I would come in handy for Android development:

In addition, here are some other links that aren’t really patterns, but I found they were help links with examples for what I was trying to do:

If you have any other helpful links that you like, please comment.

Lirc Remote Revisited

Back in May, I had posted an issue with lirc, Mythbuntu, and my MceUsb2 Remote.  The final solution ended up being just waiting some time, running the update manager to update the machine, and trying again.

If you didn’t see the comments, Orlovsky did post a helpful link to a bug.  My attempt was going to be to try to remove the old kernels and see if that would fix it.  But, like I said, some update fixed it in the meantime — I am grateful to the community.

To be complete, my remote is AVS Gear GP-IR02BK Vista 2 channel IR Remote Control.  It seems to work pretty well with Mythbuntu.  MythTV.org has a good resource for configuring the remote.

Linux at Google

In catching up on my RSS feeds, I found a flurry of articles about Google switching away from Windows because of the Chinese hack.  This sounds exciting to me because it probably means that the Linux community will grow.

The articles say that Google employs more than 10,000 people.  They have a choice of going to Apple, but surely a decent number of them will choose Linux.  The other encouraging thing is that many of them are probably programmers.  So, I would hope that this would mean more contributions to the desktop features of Linux.

Articles:

Possibly related?