Category: Uncategorized

My Server Configuration

These were the steps that I went through to configure my server after installing Ubuntu.  (just to help remember)

Installing SSH

My first requirement for a server is that I be able to get to it from my laptop.  SSH will allow me to both open remote terminal sessions and copy files from nautilus.

I simply installed this ssh metapackage from the Software Center.

My first attempt to connect brought me this message:


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.

This was because I was reinstalling my server, and I had connected to the previous installation with my laptop.  The fix was easy (it was actually in the message):

ssh-keygen -R israel

To set it up to where I could connect without a password, I ran this command:

ssh-copy-id israel

Printing

I have an HP printer, so I chose to install the HPLIP Toolbox from the Software Center.

I could launch it through ssh with the command “hp-toolbox”.  Then, I chose the Setup Device option off the Device menu for my printer.

I selected USB:

Then, I selected the device:

Then, I entered the information about the printer:

This added, the printer.  Next, I made it the default printer:

To make the printer accessible over the network, I had to tweak the cups configuration.  I edited the /etc/cups/cupsd.conf.  I added a Listen line with the machine’s hostname.

I also turned “Browsing” on to make it easier to discover the printer.

To make the network name resolve correctly, I removed this line from /etc/hosts:

Finally, I restarted the cups service with the command:

sudo service cups restart

That gave me some access, but I still had issues.  Then, I found an easier way to do it.  I ran the the printer configuration:

system-config-printer

On the printer dialog, there is a Server > Settings option.

There, I checked the sharing options to open things up for my private network.

Java Installation

I have a personal application that I use at home, and Java is a requirement for that.  I took the easy route and installed Java using Web Upd8’s method.  That just meant running these three commands:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

I confirmed that it installed with:


skp@israel:~$ java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b55)
Java HotSpot(TM) Client VM (build 24.0-b22, mixed mode)
skp@israel:~$ javac -version
javac 1.8.0-ea

Finally, I needed to add a mysql user.  I don’t need to install mysql because it’s embedded into my application, but I do need the user.  I used this command:

useradd -r mysql

Resources

Packt Celebrates Their 1000th Title

You may want to sign up on Packt’s website!

From what I understand, Packt is publishing their 1000th book on September 30th.  To celebrate, they will be giving out two free surprises.  I don’t know what the surprises are, but they have been good to me so far.

Here’s the official text:

To celebrate this event with our readers, we’d be gifting them with not one but two assured surprises which would be revealed to them by the 30th of September, 2012. Anyone who is already registered or signs up for a free Packt account before 30th September 2012 is guaranteed a surprise gift.

So, head on over to their website:  http://www.packtpub.com/

Fixing APK Compile Error

I have been trying to change, decompile, and recompile Trebuchet to change the items on the dock and home screen.  I keep getting errors, and I think I have finally found the solution.

The output of the command is quite long, so let me post the beginning:


skp@chestnut:~/app/hd2/dev/work$ apktool b Trebuchet-orig Trebuchet.apk
I: Copying classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: /home/skp/app/hd2/dev/work/Trebuchet-orig/res/values-sw720dp-land
invalid resource directory name: /home/skp/app/hd2/dev/work/Trebuchet-orig/res/drawable-sw600dp-nodpi
invalid resource directory name: /home/skp/app/hd2/dev/work/Trebuchet-orig/res/drawable-sw600dp-land-hdpi

And, here’s the end of the output:


invalid resource directory name: /home/skp/app/hd2/dev/work/Trebuchet-orig/res/layout-sw720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL1399953021396634018.tmp, -I, /home/skp/apktool/framework/1.apk, -S, /home/skp/app/hd2/dev/work/Trebuchet-orig/res, -M, /home/skp/app/hd2/dev/work/Trebuchet-orig/AndroidManifest.xml]
 at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
 at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
 at brut.androlib.Androlib.buildResources(Androlib.java:248)
 at brut.androlib.Androlib.build(Androlib.java:171)
 at brut.androlib.Androlib.build(Androlib.java:154)
 at brut.apktool.Main.cmdBuild(Main.java:182)
 at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL1399953021396634018.tmp, -I, /home/skp/apktool/framework/1.apk, -S, /home/skp/app/hd2/dev/work/Trebuchet-orig/res, -M, /home/skp/app/hd2/dev/work/Trebuchet-orig/AndroidManifest.xml]
 at brut.util.OS.exec(OS.java:83)
 at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
 ... 6 more

What I finally found, was that I installed an old or invalid version of aapt with apktool.  It was installed into /usr/local/bin…


skp@chestnut:~/app/hd2/dev/work$ which aapt
/usr/local/bin/aapt
skp@chestnut:~/app/hd2/dev/work$ ll `which aapt`
-rwxr-x--- 1 skp skp 3747857 May 15 2011 /usr/local/bin/aapt*

The easy fix was to just rename this one installed with apktool.  Then, it pulled the one from my Android SDK intallation. (I already had the platform-tools directory in the path.)


skp@chestnut:~/app/hd2/dev/work$ cd /usr/local/bin/
skp@chestnut:/usr/local/bin$ sudo mv aapt aapt-broken
[sudo] password for skp:
skp@chestnut:/usr/local/bin$ which aapt
/home/skp/app/android-sdk-linux/platform-tools/aapt

After that, it compiled fine!

skp@chestnut:~/app/hd2/dev/work$ apktool b Trebuchet-orig Trebuchet.apk
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...

Microsoft Outlook on Linux

I’ve been using Word and Excel on my Ubuntu for a while now.  For the most part, it works pretty good.  Just recently, someone asked me about how Outlook worked.

My personal preference is GMail.  I like the interface, and I like having my mail in the cloud.  When I refresh my computer, it’s one less thing to have to backup.  For a while, I did use Thunderbird.  It works natively on Linux.  Still, I’ll explore Outlook for a second.

For the instructions on installing Office, you can see my post: Ubuntu 12.04: Office and Play on Linux

Read More

HD2 Android Cooking

This is my first delve into cooking my own ROM for HD2.  I am not at a point where I can give step-by-step directions, but I wanted to post some of the things that I figured out so far.

Danial’s (dsixda) Android Kitchen

I have heard a lot about the Android Kitchen, so I thought I would try it.  It was an easy install.  I just had to download the zip file from Git Hub and extract it into a directory:

To launch it, I go to that directory in a terminal…

… and run the ./menu command.  That brings up the Kitchen menu.

Importing My First ROM

I started with the Paranoid Android – AOKP – Sourcery ROM.  I simply downloaded it, and placed it in the

Then, on the menu, I chose option 1 to create the working folder.

When it was done, it created this working directory:

Adding My First App

Just to make a small easy change, I decided to add an app to the ROM.  I have been using the Wifi Tether program, and I decided to bake that into the ROM.  It was as easy as placing it into the working folder under data/app.

This worked fine, but for some reason, the wireless tethering won’t work on my ROM.  The app works fine, but when it tethers, it gets an error.   That’s an issue for troubleshooting another day.

Changing the Default Background

I found some instructions that suggested using the apktool program to update the background.  But, rather than that, I just used the File Roller to extract and replace the files in the apk file.

I found the framework-res.apk file inside the system/framework folder in the working directory.  I opened the file with file-roller and I went to the /res/drawable-hdpi folder.  There I extracted the default_wallpaper.jpg.

I simply edited the image with Gimp and replaced it in the apk file.

This worked great at first.  Then, my old wallpaper mysteriously reappeared.  I assume that was from Google’s syncing my phone to previous setups.

Adding Chrome By Default

I unzipped my Titanium backup of Chrome to the System directory.

This made Chrome show up in the list, but it failed to run.  I ended up moving it to the /data/app folder of the ROM, and that fixed the problem.  Chrome was installed by default.

Note: I did the same thing with Swype.  I found it also had to go in the /data/app folder.

Changing the Launcher

The ROM that I started with has the Nova Launcher in it.  I did a little reading up on launchers, and I decided to try to the Go Launcher EX.

First, I removed the Nova Launcher.  I deleted the NovaLauncher.apk file:

I tried to download the Go Launcher from their website, but it mostly sent me to the market.  Instead, I installed it from the Market.  Then, I pulled it off the phone with adb.

adb pull /data/app/com.gau.go.launcherex-1.apk
adb pull /data/app/com.gau.go.launcherex.gowidget.weatherwidget-1.apk

I simply removed the NovaLauncher.apk from the /system/app folder.  Then, I added these two apk files in its place.  That gave me the Go launcher.

I tried that out for a bit, but then I decided to go back to Trebuchet.  So, I swapped the two Go apk files with Trebuchet.apk from another CM10 ROM.

Building the ROM

After all this, I built the ROM from the kitchen.  I just used option #99.

Then, I picked option#1, the interactive mode.  Then, I took the defaults.  It creates the zip file in the output zip folder.

I had a problem with the ROM flashing.  I think that it has to do with the “if” statements in the update script.  The kitchen didn’t translate it correctly.  So, I replaced the update script with the original script from the original ROM.

Later, I went back into it and found that I could remove the if, else, and end-if lines from the update-script in the working folder.  This takes out the feature that autodetects CLK vs. MagLdr.  But, it flashes on my phone fine.  I can figure that out later.

Resources

Enabling Chrome on My Custom ROM

On my latest ROM download, I found that Chrome wouldn’t work for some reason.  It said that it wasn’t compatible with my phone, but that really confused me.  I’ve had it running on my phone with no problem in the past.

I still haven’t gotten it to work.  If you know what I am doing wrong, please point it out.  Or, you might find a tip that will help you out.  In any regard, I can’t promise any answers.

Read More

First Install on a New Dell Inspiron 17R

Ok, I have finally retired my old laptop to light duty in my wife’s service, and I have a nice brand new Dell Inspiron 17R.  (Inspiron 7720)  This post was originally intended to document how I initially set it up.  Unfortunately, it wasn’t as straightforward as I wanted.  It took me a bit of experimenting to figure it out, and this post might be a little crazy.

Read More

Android: I have Jelly Bean!

Thanks to ThdDude and his Unofficial CM10 HD2 ROM, I now have Jelly Bean (Android 4.1) on my phone.  I thought I would show off a few pictures and at least capture the link to his XDA Thread so that I can remember where to go back for updates.

Jelly Bean ROMS for HD2

Right now, using the HD2 ROMs page, I see three different ROMs out there.  I have only tried the one at this point, but here is the list of ROMs I know of:

My Home Screen

For starters, here is the way I have my home screen customized.  I removed the stock clock, and I added the Fancy Widgets clock.  I also removed the messaging and Email to replace them with Gesture Search and GMail.

Notifications

One of the new features in Jelly Bean is the notifications.  I like how they are dynamic and adjust to the situation.  For example, the following screenshots show a bunch of notifications all together.  Notice how they are packed in together and take up the minimal amount of space.

When, I clear out some of the notifications, notice how the email notification expands to show more information now that it has room.

Application Switcher

I don’t think this is new to Jelly Bean, but it has the ICS Application Switcher.  When you hold the Home key down, you get this:

Google Now

I just stumbled on the Google Now interface.  I had read a little about, but I just now accidentally pulled it up.  To open it, you click on the search bar on the home screen:

It brings up an interface that looks like this.  The various cards give you information:

When you talk, it has updated the interface.  I have read that now this voice recognition happens on your phone and we don’t have to go to the web to get it to recognize.

Version Information

Here is the basic information from the Settings > About screen.

Here are the build details:

If you tap on the Android Version, you’ll see this easter egg:

The Lock Screen

The lock screen has a slightly different feel to it.  Just a different look…

Chrome

One disappointment I had was that Chrome would not install.  It said that it was not compatible with this version!

I wonder if this is because hardware acceleration is not included yet?

HD2 Toolkit

After getting a new laptop, I was looking for the HD2 Toolkit.  I use it to flash my HD2 phone.  The new Jelly Bean ROM that I am trying out needed a bigger partition.

Apparently, it was just updated in July.  Here’s the new link:

XDA: Updated with new Recovery!

I still can’t use it on Linux though, which is kind of frustrating.  It installs fine under Wine or a on a VirtualBox virtual machine, but it can’t see the phone through the USB cable.  I wish I could fix that, but it works great through my Windows partition.