Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

Sunday, May 24, 2015

Moto G OTA update error


If you get an OTA (over-the-air) update for your Moto G and it fails, here's what you can do. First, a few requirements:

  • A Moto G. This may work with the Moto E or X as well. YMMV.
  • Retail Android. This goes without saying, but you won't get an OTA update unless you're running one of the stock/retail ROMs.
  • Your phone has been rooted or otherwise customized (custom boot logo, custom recovery, etc). This isn't a strict requirement, but it's probably the reason the update is failing in the first place.
  • These instructions were written for Linux, but they should run with minor adjustments on Mac and a few not-so-minor adjustments on Windows.
There are two main ways to go about resolving this:

Method 1: recommended
This method is the easiest and probably the fastest:
  1. (Recommended) Back up your phone in case something goes wrong

  2. Get the model number for your phone
    Settings → About phone → Hardware SKU

    Or:

  3. Get the build number for your phone
    SettingsAbout phoneBuild number

  4. Download the retail firmware for your phone corresponding to the phone's model and build numbers. You can download them from here:
    http://www.filefactory.com/folder/c6cdedc45a775d27

    For me, I had the Moto G XT1034 with build number KXB21.14-L1.61, so I downloaded this file:
    AWSRETAIL_XT1034_4.4.4_KXB21.14-L1.61_cid9_CFC.xml.zip

  5. Once the retail firmware has finished downloading, extract it

  6. Install the Android SDK tools

  7. Put your phone into fastboot mode. To do so, power off the phone, press and hold the volume down button, press power button, hold both for about 3 seconds and then let go

  8. Go to the folder where you extracted the retail firmware. Now we're going to restore the stock firmware without erasing the data partition (where all of your apps, settings, etc are stored):

    sudo fastboot flash boot boot.img
    sudo fastboot flash recovery recovery.img
    for file in system.img_sparsechunk.*; do sudo fastboot flash system $file; done
    sudo fastboot reboot


    If you're using Windows, you'll have to flash the system.img_sparsechunk files on at a time, for example:

    fastboot flash system system.img_sparsechunk.0
    fastboot flash system system.img_sparsechunk.1


    ... and so on.

  9. Now try the update again
    SettingsAbout phone → System updates

  10. If the update fails again, you have one of two options. If you don't mind wiping your phone and starting from scratch (which will erase everything), the easiest thing to do is to do fully restore the stock firmware. You'll put your phone into fastboot mode as before, but this time you're going to overwrite everything:

    sudo fastboot flash partition gpt.bin
    sudo fastboot flash motoboot motoboot.img
    sudo fastboot flash logo logo.bin
    sudo fastboot flash boot boot.img
    sudo fastboot flash bootloader bootloader.img
    sudo fastboot flash recovery recovery.img
    for file in system.img_sparsechunk.*; do sudo fastboot flash system $file; done
    sudo fastboot flash modem NON-HLOS.bin
    sudo fastboot erase modemst1
    sudo fastboot erase modemst2
    sudo fastboot flash fsg fsg.mbn
    sudo fastboot erase cache
    sudo fastboot erase userdata
    sudo fastboot reboot


    If, however, you don't want to completely wipe your phone and you don't mind getting your hands dirty, read on.

Method 2: advanced
  1. At a minimum, you will need to make sure the stock recovery is flashed. Follow the instructions above, flashing only the recovery:

    sudo fastboot flash recovery recovery.img
    sudo fastboot reboot

  2. Now try to apply the OTA update. If it fails, now the fun begins! First of all, if your phone isn't rooted, you'll need to root it to get access to the update log files. If you flash a custom recovery to root, then flash the stock recovery back (the OTA will fail with a custom recovery).

  3. Once your phone is rooted, connect to it using adb and look at the update log, which will be located in /cache/recovery/last_log

    adb shell
    su
    more last_log

  4. Look particularly at the end of the log file to see what went wrong. This is what mine said:

    script aborted: "/system/etc/install-recovery.sh" has unexpected contents.
    "/system/etc/install-recovery.sh" has unexpected contents.
    E:Error in /cache/Blur_Version.210.12.61.falcon_umts.AWSRetail.en.US.zip
    (Status 7)
    Installation aborted.


    You can see that apparently the file /system/etc/install-recovery.sh had been modified, probably from when I rooted the phone.

  5. If the file causing errors is in this list:
    • /system/bin/app_process32
    • /system/bin/app_process64
    • /system/bin/install-recovery.sh
    • /system/etc/install-recovery.sh

    • Then the problem is SuperSU itself, which modifies a bunch of files when it's installed. You'll need to restore the files from backup:

      cp /system/bin/app_process32_original /system/bin/app_process32
      cp /system/bin/app_process64_original /system/bin/app_process64
      cp /system/bin/install-recovery_original.sh /system/bin/install-recovery.sh
      cp /system/etc/install-recovery_original.sh /system/etc/install-recovery.sh

  6. If another file has been modified, you need to replace the original file. This will take some work. First, you'll need a special utility called simg2img. You can probably find a pre-built binary for your system. I just compiled it myself:

    sudo apt-get -y install build-essential git zlib1g-dev
    git clone https://android.googlesource.com/platform/system/core
    cd core/libsparse
    gcc -o simg2img -Iinclude simg2img.c sparse_crc32.c backed_block.c output_file.c sparse.c sparse_err.c sparse_read.c -lz
    sudo cp simg2img /usr/local/bin

  7. Go to the folder where you extracted the retail firmware, and you should have one or more files starting with system.img_sparsechunk. The next step is to combine them using simg2img:

    simg2img system.img_sparsechunk* system.raw.img.tmp

  8. Now we're going to extract the ext4 partition from the image file we made:

    offset=`LANG=C grep -aobP -m1 '\x53\xEF' system.raw.img.tmp | head -1 | awk '{print $1 - 1080}'`
    dd if=system.raw.img.tmp of=system.raw.img ibs=$offset skip=1

  9. Getting close! Now, we'll mount the image we just created:

    sudo mkdir /mnt/system
    sudo mount system.raw.img /mnt/system

  10. Now we should have access to all of the original files from the retail firmware. The next step is to copy them to the device. Here's what I did to copy /system/etc/install-recovery.sh:

    adb push /mnt/system/etc/install-recovery.sh /sdcard/

  11. Now connect to the device and get the mount point for the /system partition:

    adb shell
    mount | grep system

  12. Finally, remount /system as read-write, copy the file, and then remount /system as read-only. Don't forget to replace the mountpoints in my example (/dev/block/platform/msm_sdcc.1/by-name/system) with the mountpoint you got from the previous step:

    mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system
    cp /sdcard/install-recovery.sh /system/etc/install-recovery.sh
    mount -o ro,remount /dev/block/platform/msm_sdcc.1/by-name/system /system

  13. If you've made it this far, congratulations! Try the update again. Hopefully, as in my case, it will now work. If not, you'll have to look at the update log file again and see if there's anything else you missed. Thankfully it'll go much quicker now that you've already done all the prep work.

Saturday, November 1, 2014

Using Exchange without Outlook


There are some good alternatives to Microsoft Exchange, for instance Zimbra. If your experience is like mine, however, most places use Exchange. Up until now, there haven't been many good options for using Exchange without Outlook. Support for Exchange calendar integration in particular has been lacking. But now there's a great option for using Exchange without Outlook, and you can set it up in less than 15 minutes:

  1. Install Thunderbird

  2. Install the Lightning calendar extension
    1. Download it from here:
      https://www.mozilla.org/projects/calendar/

    2. To install, open the downloaded .xpi extension file with Thunderbird. If that isn't an option:
      1. Open Thunderbird and go to the Tools menu → Add-ons

      2. Click the button to the left of the Search bar → Install Add-on From File

      3. Browse to the extension file and select it → Open

      4. Click Install Now

      5. Click the Restart Now button near the top right

      6. When Thunderbird reopens, close the Add-ons Manager tab

    3. You can also install it as a package in Debian/Ubuntu/Elementary (I normally prefer to download it to get the latest version):
      sudo apt-get -y install xul-ext-lightning

  3. Install the Exchange EWS Provider extension
    1. Download it from here:
      https://github.com/Ericsson/exchangecalendar/releases

    2. Unzip it

    3. Follow the instructions above for installing the Lightning extension to install the Exchange EWS Provider extension

  4. Set up your Exchange email
    1. If you haven't set up your Exchange email address yet, you can do so by using the following instructions. You may need to get the server addresses (IMAP/POP/SMTP) from your system administrator or IT department:
      https://support.mozilla.org/kb/manual-account-configuration

  5. Set up your Exchange calendar
    1. Open Thunderbird and then open the Calendar tab (Events and Tasks menu → Calendar)

    2. Right-click in the Calendar section in the lower-left side of the screen → New Calendar

    3. Select On the Network → Next

    4. Select Microsoft Exchange 2007/2010/2013 → Next

    5. Give it a name, select your email address, and click Next

    6. Check Use Exchange's autodiscovery function, enter your primary email address, Active Directory username, and Active Directory domain name. Then click Perform autodiscovery

    7. Enter your password when prompted

    8. The EWS server URL should automatically be detected. When it is, click Select

    9. Enter your password again if prompted

    10. You should be brought back to the Create New Calendar dialog. Click Next → Finish

    11. Your calendar should now be populated with your Exchange calendar events

  6. Set up your Exchange address book
    1. In Thunderbird go to the Tools menu → Address Book

    2. Click Add Exchange contact folder

    3. Give it a name

    4. Check Add global address list to search results (otherwise, it will only use your personal address book in Exchange)

    5. Check Use Exchange's autodiscovery function

    6. Enter your primary email address, Active Directory username, and Active Directory domain name, then click Perform autodiscovery

    7. The EWS server URL should automatically be detected. When it is, click Select

    8. You should be brought back to the Exchange Contact Settings dialog. Click Save

    9. Now you can search for a contact in Exchange by selecting Exchange contacts on the left and then using the search box in the upper right. Contacts will also be auto-populated when composing new emails.
There are other options out there for Outlook alternatives. One I tried is DavMail Gateway. Compared to Exchange EWS Provider, however, it used a lot of memory because it ran as a Java application in the background. It also didn't handle calendar events as well; for instance, if a calendar event was moved to a different time, it would show up under the new time as well as the old time.

Saturday, October 25, 2014

HERE Maps: The best free map/navigation app


I've long been an advocate of phone apps that work with no internet connection. When it comes to map/navigation apps, there are several important reasons for offline use:
  1. Like myself, there are people who—gasp—don't have a data plan on their phone
  2. Others have limited data plans, and map apps can use a lot of data
  3. Even for those with unlimited data plans, there are still many places where cellular coverage is bad or even nonexistent
  4. Lastly, it's really nice to have if you travel outside of your country and have no cellular service
Unfortunately, the most popular maps app—Google Maps—is terrible when it comes to offline use:
  1. You can download portions of maps for offline use, but the size of the area you can download is limited (you can't download an entire US state, for instance)
  2. Navigation doesn't work offline at all
  3. When offline you won't see any place names like businesses, parks, etc.
There are some free map apps out there that can be used offline, but they have limited capabilities and often ads. So that means if you want offline use, your best option is to pay for an expensive premium maps app.

But as of this week, there's a premium maps app that works offline, and it's free! I give you: HERE Maps.

HERE Maps has actually been around for a long time under other names (NAVTEQ/Ovi Maps/Nokia Maps). They're actually one of only four big map sources (the others being Google, OpenStreetMap, and TomTom), and they license their maps to many others, like Garmin and Yahoo.

Here are some of the features that HERE Maps offers:
  • Download countries and regions ahead of time for offline use
  • Maps in nearly 200 countries, and turn-by-turn navigation in nearly 100 countries
  • Full street addresses
  • Alternate routes
  • Points of interest
  • Traffic
  • Public transit
  • Speed limits
Ready to try it? Go here to read how to get it and install it:
HERE for Android unleashed on more smartphones!

Once you've got it installed, here are some great tips for getting started:
Getting started with HERE for Android: the basics

If you have an iPhone, HERE Maps should be available for you before the end of 2014.

Saturday, September 6, 2014

The best task/to-do app for Android

I blogged a while back about there not being a viable replacement for the amazing Astrid Tasks task/to-do list app. Fortunately, that is no longer the case. I present to you: Tasks. Simple name, serious app.

Tasks essentially is the next version of Astrid. Since the Android version of Astrid was open-source, someone has picked up where Astrid left off after it was acquired by Yahoo, which means we still have a decent task/to-do list app for those of us who need more than the watered-down alternatives out there.

You can read my afore-mentioned post to see which specific apps I tried, but suffice it to say none of them had the features that Astrid did. In particular, I couldn't find these two features in any other app:

  • The ability to hide tasks until a certain date
  • The ability to repeat tasks based on when they were completed (instead of just when they were originally due)
What makes Astrid (and now Tasks) incredible is it hides all of those powerful features under a nice, clean interface, which makes it actually enjoyable to use.

So what are you waiting for? You can get Tasks for Android now from the Google Play Store.

Unfortunately, while Astrid was available for Android and iOS, the iOS version of Astrid wasn't open-source. So for those of you with an iPhone/iPad, you'll have to look elsewhere for a great task/to-do list app.

La meilleure appli de liste des tâches pour Android

J'ai blogué il y a longtemps qu'il n'y avait aucun remplacement viable pour l'appli Astrid liste de tâches. Heureusement, ce n'est plus le cas. Je vous présente: Tasks. Nom simple, une appli sérieuse.

Tasks est essentiellement la prochaine version d'Astrid. Depuis la version Android de Astrid était open-source, quelqu'un a repris où Astrid a lâché après son acquisition par Yahoo, ce qui signifie que nous avons encore une appli décente de liste de tâches pour ceux d'entre nous qui ont besoin de plus que les alternatives édulcorés qui sont nombreuses.

Vous pouvez lire mon post mentionné ci-dessus pour voir quelles applis spécifiques j'ai essayé, mais il suffit de dire qu'aucun d'eux n'avait les fonctionnalité que Astrid a eu. En particulier, je ne pouvais pas trouver ces deux fonctions dans toute autre application:

  • La capacité de masquer les tâches jusqu'à une certaine date 
  • La capacité de répéter des tâches basée sur quand ils ont été complétés (au lieu de simplement quand ils étaient à l'échéance) 
Ce qui rend Astrid (et maintenant Tasks) incroyable, c'est qu'il cache l'ensemble de ces fonctionnalités puissantes sous un interface beau et propre, ce qui le rend réellement agréable à utiliser.

Alors qu'attendez-vous ? Vous pouvez obtenir Tasks pour Android maintenant du Google Play Store.

Malheureusement, alors que Astrid était disponible pour Android et iOS, la version iOS de Astrid n'était pas open-source. Donc, pour ceux d'entre vous avec un iPhone / iPad, vous aurez à chercher ailleurs une tellement super appli des tâches.

Friday, September 20, 2013

The best podcast app for Android: AntennaPod


It's about time! I've been looking for a decent Android podcast app for a while. The only ones I've seen up to this point are either:
  • Free but really lousy
  • Decent but cost $7
But my search is finally over.

Say hello to AntennaPod. It has all you'd need and want in a podcast app, plus it has a nice, clean interface, no ads, and it's free. There really isn't much more to say. Check it out, and if you like it, send the developer a buck or two.

Here's what the interface looks like so you can see for yourself:

Enjoy!

Wednesday, September 4, 2013

MP3s ripped from CDs in Ubuntu have incorrect track length

If you rip a CD in Ubuntu 12.04+ using the default program provided for this (Rhythmbox), the track lengths will be incorrect. This is because by default, Ubuntu will rip your mp3s using VBR, but it doesn't add the VBR headers.

Rather than go into the details, here's the easiest way to fix it:
  1. Install vbrfix by running this command in a terminal:
    sudo apt-get install vbrfix

  2. Now CD to the folder where the mp3s are that you need to fix:
    cd /path/to/mp3s

  3. Run this command to add the VBR headers to the mp3s:
    find . -type f -iname '*.mp3' -exec vbrfix {} {} \;

  4. Vbrfix seems to leave behind a couple of temporary files, so clean them up:
    rm vbrfix.log vbrfix.tmp
Another option would be to change the default preset to make it CBR. You can read more about doing that here: How do you edit the “Preferred Format” settings in Rhythmbox? Something like this ought to do the trick (change the bit rate as desired):
[mp3-cbr]
name=lamemp3enc
target=bitrate
bitrate=192
cbr=true
encoding-engine-quality=high
mono=false
You can read the details of the problem at this bug report:
Rhythmbox does not add VBR headers when ripping CDs to MP3

Monday, August 19, 2013

The best alternative to Astrid Tasks


Update: see here for a better alternative: The best task/to-do app for Android


Yahoo recently purchased the excellent Astrid Tasks app and discontinued its development. I've looked high and low, and the best alternative to Astrid Tasks appears to be (drum roll) ...

Astrid Tasks.

Yep, there really aren't any good alternatives. I've tried:

  • Any.do
  • Checkmark To Do & Task List
  • GTasks
  • Task List by taskos
  • Wunderlist
and more, and none of them have what makes Astrid so great. In particular, Astrid is great because it has a nice, clean interface but it is also very powerful under the hood. It has features like hiding tasks until a certain date, or repeating them based on when they were completed (as opposed to when they were due), which I haven't found in any other apps.

Any.do in particular seems popular, but I have no idea why. It lacks functionality that I would consider basic to a task/to-do app like snoozing for a precise amount of time or repeating tasks at a precise interval.

So my recommendation: stick with Astrid Tasks. Now that it's been shut down, it won't be receiving any more updates. But it still works great. It was already an excellent app, not really lacking anything. It will no longer sync with astrid.com, but it still syncs with Google Tasks.

The latest version of Astrid for Android is 4.6.5, which you can download from here if you've previously installed Astrid:

If you've never installed Astrid before, you can download the latest version from here, since the previous URL won't work for you:

The latest version for iOS appears to be 2.6.2.

Friday, August 2, 2013

Import Catch notes into Evernote


If you haven't heard, Catch Notes is shutting down at the end of the month. It was one of the nicest note taking apps for Android. There are a lot of alternatives out there. In most cases I opt for whatever Google has to offer, and in this case they have a note app of their own called Google Keep, but it only allows you to organize notes by color instead of Catch's useful spaces and tags. I don't know about you, but trying to find a note by a particular color alone is incredibly useless for anything other than eye candy.

It seems the best alternative is to finally join the masses who are using what's pretty much the king of cross-platform note-taking: Evernote. If you export your Catch notes by the end of this month, you'll be able to easily import them into Evernote. Here's how:

  1. Go to this link, log in, and download the Zip Archive File of your Catch notes:
    https://catch.com/tools/export/new

  2. Unzip the file somewhere. It will contain a folder for each Catch Notes space you had.

  3. Download the Evernote desktop app from here:
    http://evernote.com/download/

  4. Open the Evernote desktop app. Log in or create a new account if you don't have one already.

  5. Go to File --> Import --> Evernote Export Files...

  6. Browse to the location where you extracted the Catch Notes zip archive file. Open one of the folders for one of your Catch Notes spaces, and select the notes.enex file to import it.

  7. When it asks you if you want to place the notes into a synchronized notebook, click Yes.

  8. The notes will be imported into an Evernote notebook, which is essentially the same as a Catch Notes space. The notebook will be called Imported Notes. Right-click on it, click Rename, and give it the same name as the Catch Notes space you imported.

  9. Repeat the previous four steps to finish importing the rest of your Catch Notes spaces into Evernote. You can probably skip importing the All Notes notebook to avoid importing duplicates.

  10. In Evernote, your default notebook is called something like username's notebook. In Catch, the default was called Notes. If you want, move all your notes from the Notes notebook into the default Evernote notebook, or vice-versa. You can then delete one of them. If you want to change your default notebook, right-click on a notebook --> Properties --> check Make this my default notebook.

  11. At the top of the Evernote desktop application, click the Sync button to sync your new notebooks to the cloud.

  12. Install the Evernote app:
  13. Open it up, sign in, and all your notes from Catch should be there.
Farewell, Catch. We'll miss you!

Wednesday, March 13, 2013

Spotify Linux woes

spotify

I recently (okay, almost 2 months ago) updated Spotify on my Ubuntu Linux machine, and the new version is having lots of problems:
  • Dragging from search results into a playlist crashes spotify

  • Dragging items to the top or bottom of a playlist crashes Spotify

  • Artist radio isn't working (or it's taking so long to load that I gave up waiting)

  • Searching doesn't display instant search results like it used to
My solution: downgrade spotify. Here goes:
(Note: I'm running Ubuntu 12.04 64-bit. If you're using 32-bit Ubuntu replace "amd64" in steps 3 and 6 with "i386". If you're using a different version of Ubuntu or a different flavor of Linux, you're on your own.)

  1. First, completely quit spotify. Make sure you click on the icon and click Exit if it's in the system tray

  2. Run this command in a terminal to make sure you've got the problematic version of Spotify:
    dpkg -l spotify-client
    The output should include this line:
    ii spotify-client 1:0.8.8.323.gd Spotify desktop client

  3. Download the previous version of spotify by running this command in a terminal:
    wget http://packages.bodhilinux.com/bodhi/pool/stable/s/spotify/spotify-client_0.8.4.103.g9cb177b.260-1_amd64.deb

  4. Uninstall the current version:
    sudo dpkg -r spotify-client

  5. Move the cache folder out of the way:
    sudo mv ~/.cache/spotify/ /tmp

    Note: if you don't do this, you might get this error when running spotify:
    Missing Dependencies
    Framework compatible with bridge-desktop (version 0.7.0) does not exist.

  6. Install the previous version:
    sudo dpkg -i spotify-client_0.8.4.103.g9cb177b.260-1_amd64.deb

    If you get this error:
    dpkg: error processing spotify-client (--install):
    dependency problems - leaving unconfigured

    run this command to fix it by installing any missing dependencies:
    sudo apt-get -f install

  7. To keep spotify from being upgraded again to the broken version, run this command:
    grep -r repository.spotify.com /etc/apt/sources.list* | egrep -v "\.(save|distUpgrade):deb" | cut -f 1 -d :

  8. The previous step should output one or more files. Edit them and put a pound sign (#) in front of any occurrences of this line:
    deb http://repository.spotify.com stable non-free

    Like so:
    #deb http://repository.spotify.com stable non-free
Now spotify should work, at least as well as it did before ;)

Friday, December 14, 2012

Planetside 2 newbie guide

704
Planetside 2 is a great game, but there is no official documentation, and there were a few things that were unclear to me when I first started playing the game, so I thought I'd share my findings:

Capturing bases

Each base has capture points that you can see on the map and your display as letters (A, B, C, etc). To capture a capture point, just stand close to it until it turns your empire's color. Then a meter will show up with the enemy's color which will gradually go down, followed by one with your color which will gradually go up, and then you've captured the base. The enemy can reverse this process by recapturing the capture points.

Generators

Main bases (bio labs, tech plants, amp stations) have generators that power the shields. There is also a special unit called an SCU (Spawn Control Unit) that determines whether or not you can spawn at a base.
  • Overloading (destroying) enemy generators
    To overload an enemy base's generator, just stand near it and hold the E key when prompted. No special items or certs are required. And no, shooting at them won't do anything (common newbie mistake).
  • Repairing generators
    Once an enemy base has been captured, you can repair any destroyed generators. This must be done by an engineer using the nano armor kit (which can also be used to repair vehicles, turrets, and MAXes).

Hacking enemy terminals/turrets

Only the infiltrator class can hack enemy terminals. Hacking terminals doesn't require any special items or certs. An infiltrator can simply approach an enemy's terminal and hold the E key when prompted to hack it so that it can be used by that person's empire. The same goes for enemy turrets--pretty cool, huh? In addition, if an enemy is in a turret when you hack it, they will get kicked out once the hack is complete.

Deploying spawn beacons

If you are a squad leader, you can get the Spawn Beacon cert which will give you an extra item in your inventory (it will be the last item) that can be used to deploy a spawn beacon where your squad members can spawn.

Certs and cert points

  • Offline cert points
    Cert points will be accumulated even when you aren't playing the game. Currently about one cert point is acquired every two hours when offline, up to a current maximum of 12 cert points.
  • Auto granted certs
    Some of your certs will show up as "Auto Granted." It seems there are some certs that have a cost of 0 cert points, and you're given them automatically. My guess is maybe these certs used to cost something but they repriced them as they've been modifying the game during beta.

Spotting enemies

If you see an enemy, you can spot them out by placing your crosshairs over them and pressing the Q key (it may help to press it repeatedly). You will call out to friendly troops that an enemy has been spotted, and you may get some XP if someone from your empire kills that enemy soon afterward.

Deploying a sunderer

By default, you cannot deploy a sunderer. You must first get the Sunderer Advanced Mobile Station (S-AMS) cert, and then add the S-AMS attachment to your sunderer before spawning it. Then you can deploy the sunderer while sitting in the front seat by pressing the B key.

You cannot deploy a sunderer within 200m of another deployed friendly sunderer.

Special abilities

Most classes have special abilities that can be activated.
  • Infiltrator
    Infiltrators can temporarily become invisible by pressing the ability key (F).
  • Light assault
    Light assaults have jump-jets that can be activated by holding down the jump key (spacebar).
  • Medic
    Medics have an ability that heals people in the nearby vicinity that is activated by pressing the ability key (F).
  • Heavy Assault
    Heavy Assaults have a special shield that can be activated by pressing the ability key (F).
  • MAX
    MAXes can charge forward a short distance by pressing the ability key (F).

Third-person vehicle view

The default key for third-person view when in a vehicle is T. You may not be able to switch to third-person view immediately after spawning; wait a few seconds and try again.

Tuesday, November 6, 2012

OpenLDAP mdb backend ready for production

OpenLDAP's new memory-mapped backend, mdb, is ready for production. It was first introducted over a year ago, and since then, the OpenLDAP developers (Howard Chu in particular) have put quite a bit of work into getting all of the bugs worked out.

The OpenLDAP mailing lists report that several companies are deploying it in production:
http://www.openldap.org/lists/openldap-technical/201208/msg00137.html

The latest version of email/collaboration software Zimbra uses the mdb backend as well:
http://wiki.zimbra.com/wiki/OpenLDAP_Tuning_Keys_8.0#OpenLDAP_Tuning_Keys

All of this leads me to believe it's production-ready. I've been running it myself at my own job for a couple weeks now, and it's actually lived up to the hype. It really is faster, uses less memory, and is way easier to configure. You can read more about the advantages of mdb here: Coming soon: memory-mapped db for OpenLDAP

Here's a short list of what I would consider the caveats:
  • Since it's new technology, I highly recommend compiling the latest version of OpenLDAP (as of this posting 2.4.33) to get the latest bug fixes and performance improvements. I have a page of useful tips for compiling OpenLDAP to get the most out of it here: compiling OpenLDAP.

  • Write performance is still being optimized. My personal recommendation would be to continue to use hdb on the master server (properly optimized), and mdb on the replica servers.

  • I'm guessing because of the previous point, it can take quite a bit longer to do the initial database load. Using hdb it took a few hours to slapadd our database, but it's taking around 12 hours to slapadd it using mdb. It's worth the wait, though.
    (see comments)
I've updated my wiki on optimizing OpenLDAP with instructions for mdb. Instead of worrying about locks and three different levels of caches, there's just one important option which is trivial to configure:
Optimizing OpenLDAP

More information about mdb is available here:
http://highlandsun.com/hyc/mdb/

Now, if Symas would only post some updated benchmarks, I could point to just how much faster OpenLDAP is than the competition...

Tuesday, August 28, 2012

Android: can't upgrade read-only database from version 0 to 1

Solution:

If you have named one of your SQLite tables "default", change the name to something else.

Details:

So I was poking around with Android programming the other day, and I ran into this error:

04-12 14:35:09.779: ERROR/AndroidRuntime(790): Caused by: android.database.sqlite.SQLiteException: Can't upgrade read-only database from version 0 to 1: /data/data/com.example.test/databases/mydatabase.db
04-12 14:35:09.779: ERROR/AndroidRuntime(790): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:170)


The line causing the error was simply calling SQLiteOpenHelper.getReadableDatabase():

SQLiteDatabase db = dbHelper.getReadableDatabase();

I finally narrowed it down to the database table name I was using: "default". As soon as I changed the table name, it worked fine. In fact, I simply changed it from "default" to "default1".

Just to be clear, I wasn't doing anything fancy. I was using pretty basic code to create the database:

public class DatabaseHelper extends SQLiteOpenHelper {
    public static final String DB_TABLE_NAME = "default";
    ...
    public static final String DB_TABLE_CREATE =
        "CREATE TABLE " + DB_TABLE_NAME...


It doesn't appear to be a SQLite thing, because according to their documentation the only reserved table names begin with "sqlite_". So it appears to be an Android issue, and as far as I can tell it isn't documented.

I checked the database after I changed the name, and the "default" table was never created either, so I'm not sure why it wouldn't work:

sqlite> .tables
android_metadata default1


A bug, perhaps?

Thursday, August 23, 2012

GO Launcher EX: a great LauncherPro replacement


I've been using LauncherPro for my android launcher/home screen for a while. I was quite happy with it at first, but I've been gradually growing less pleased with it:
  • It hangs/crashes every time my phone first boots up

  • If I accidentally long press on one of my widgets, I get an annoying nag screen to buy the pro version

  • Over a year ago, it stopped showing my unread gmail count
Why have I still been using LauncherPro then? it has a really cool scrollable dock that allows me to put multiple rows of my most used shortcuts.

Well, byebye launcherpro. I just stumbled across GO Launcher EX, and:

Tuesday, June 5, 2012

Eclipse Subversive plugin out of Java heap space

Solution:

Use the JavaHL SVN Connector instead of SVN Kit. to install the JavaHL Connector:
  1. In eclipse go to Help --> Install New Software...

  2. Work with: --> choose the community.polarion.com update site

  3. Expand Subversive SVN Connectors

  4. Choose the JavaHL version corresponding with your version of subversion

  5. Click Next, and then follow the instructions to complete installation

  6. Window --> Preferences --> expand Team --> select SVN --> select the SVN Connector tab --> change the SVN Connector to JavaHL --> OK
There are additional steps for completing the JavaHL installation. Subversive doesn't seem to have any helpful documentation regarding this, but Subclipse does:
http://subclipse.tigris.org/wiki/JavaHL

In Linux (elementary, Ubuntu, Debian), you can do this to finish the installation:
  1. Install libsvn-java:
    sudo apt-get install libsvn-java

  2. Then edit eclipse.ini (located in /etc/ if you installed eclipse from a package or in the eclipse folder you extracted if you downloaded it from the eclipse website), and add the following line after the -vmargs line:
    -Djava.library.path=/usr/lib/jni

    For Ubuntu 12.04 64-bit, the line should be:
    -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni/

  3. Restart Eclipse

Details:

So I recently switched to Subversive from Subclipse as my SVN plugin in Eclipse. I was checking out one of my repositories (a pretty big one), and I got this error:

Checkout operation for 'https://svn.example.com/myproject' failed.
Java heap space


I have 1 GB of java heap space given to Eclipse (-Xmx1024m in /etc/eclipse.ini), and I don't think I've run out yet, but I went ahead and upped it to 1.5 GB. I got the same error. 2 GB--same error. I tried again with 2 GB of heap space, closing all perspectives to save memory, and it finally worked.

I new something wasn't right, but at first I couldn't find anything in Google. I kept searching, and finally found this:
http://www.eclipse.org/forums/index.php?t=msg&goto=559537&S=9c09f002ceb108176748012e60540921

Essentially the problem is a bug with the SVNKit SVN connector. There are two connectors available:
  • SVNKit
    • Pros: easier to install
    • Cons: possibly buggier, because it's a Java reimplementation of Subversion
  • JavaHL
    • Pros: more stable, because it's a wrapper around the native subversion C code
    • Cons: a little more work to set up
The solution, as mentioned above, is to use the JavaHL connector, because this problem is caused by a bug in the SVNKit connector.

Friday, May 25, 2012

wine crashing on ubuntu 10.10

solution:



downgrade wine, like so:

  1. uninstall the current version of wine
    sudo apt-get remove wine1.3 wine1.3-gecko ttf-symbol-replacement-wine1.3

  2. install the older stable version of wine
    sudo apt-get install wine1.2




backstory:



I was recently trying to install steam on ubuntu 10.10 using the latest wine (1.4 something I believe). it kept crashing X windows right as it tried to launch steam.exe, or when I tried to launch it manually. here's the end of the terminal output:

err:wgl:is_extension_supported No OpenGL extensions found, check if your OpenGL setup is correct!
fixme:iphlpapi:NotifyAddrChange (Handle 0x453d95c, overlapped 0x4353d20): stub
fixme:winsock:WSALookupServiceBeginW (0x453da5c 0x00000ff0 0x453daa4) Stub!
[0525/102859:ERROR:network_change_notifier_win.cc(111)] WSALookupServiceBegin failed with: 8
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
ALSA lib pcm_pulse.c:1008:(_snd_pcm_pulse_open) Unknown field handle_underrun
err:winediag:AUDDRV_GetAudioEndpoint PulseAudio "default" -22 without handle_underrun. Audio may hang. Please upgrade to alsa_plugins >= 1.0.24
../../src/xcb_io.c:385: _XAllocID: Assertion `ret != inval_id' failed.
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 150 requests (144 known processed) with 0 events remaining.

I'm not sure which part of that caused the crash. I googled the third-to-last line, and came across this still unfixed bug that's been in ubuntu for the last four versions (please try to convince me the ubuntu developers care about stability):
https://bugs.launchpad.net/ubuntu/+source/libx11/+bug/507062

after I downgraded wine (see solution above), steam installed just fine:
winetricks steam

if, for some reason, you removed the wine PPA or need to install winetricks manually, this should do the trick:

cd /usr/local/bin
sudo wget http://winetricks.org/winetricks
sudo chmod +x winetricks
cd ~

Monday, April 30, 2012

my next OS: elementary



as ubuntu 12.04 brings yet another buggy release (see the comments here), I'm all the more excited about elementary's upcoming Luna release.

elementary, for those of you who don't already know, is everything linux (and any operating system) should be. it's crisp, clean, and most importantly, consistent! the team at elementary have created a desktop environment and suite of applications that adhere to a common set of interface guidelines. it's evident they care more about a great UX and UI than cramming more bells and whistles into an already inconsistent and unstable UI (ubuntu's unity).

for those of you suffering through another buggy ubuntu release with the lackluster unity desktop environment, I highly recommend elementary.

less is more.

Wednesday, February 29, 2012

Playing old-school adventure games on Android


Did you know you can play many of the old-school point-and-click adventure games on your Android device? Here's how:

  1. Install the ScummVM app

  2. Check compatibility
    In the game compatibility list, pick a game you want to play, and make sure it's compatible. Be sure to click on the game and read the compatibility notes.

  3. Install the game engine
    Go to the list of game engines, find the game you want to play, and then find the engine it needs. Then go to the Google Play Store and install the correct plugin for that engine.

  4. Get the game data files
    Find your game in the data files list, and make note of the data files it needs. You need to get those data files from your copy of the game (install the game if necessary), and then put these files somewhere on the SD card of your phone.

  5. Add the game to ScummVM
    On your phone, open ScummVM, then click Add Game. Browse to the folder where you put the data files, highlight the folder, and click Choose
A few games, such as Beneath a Steel Sky and Flight of the Amazon Queen have even been released as freeware. See here on where you can get them. Here's what the above steps would look like for one of the free games, Teen Agent:

  1. Install ScummVM

  2. Install the teenagent engine plugin

  3. Download Teen Agent from GOG

  4. Install Teen Agent (if you're using Linux this works fine in Wine)

  5. Go to the Teen Agent installation folder, and copy all the *.res files somewhere to your Android device's storage/SD card

  6. Get the teenagent.dat file (which was mentioned in the compatibility notes for this game) and put it in the same folder where you put the *.res files

  7. On your phone, open ScummVM, then click Add Game. Browse to the folder where you put the Teen Agent files, highlight the folder, and click Choose.
In case you're curious, I haven't actually found Teen Agent to be very fun. In particular, the English translation isn't that great (the original game was Polish, I believe) and the puzzles are somewhat difficult because many of them aren't very intuitive; many of the solutions simply don't make much sense. I chose it intentionally as my example, though, because it's important to check out the compatibility notes for any quirks, like the teenagent.dat file in this case.

You might also find these links helpful in using ScummVM on Android:
Enjoy!

Monday, February 6, 2012

Thursday, January 19, 2012

Why Linux?

Let's be honest, sometimes when I'm using Linux I get pretty frustrated. Especially with distributions like Ubuntu who have been focusing so much on new bells and whistles that they've been lackadaisical when it comes to fixing bugs.

...and then I have to use Windows for something or other (normally gaming), and I'm reminded why I use Linux in the first place. So I thought I'd write down some of the advantages, for myself, if nothing else:

  • No more viruses! (or spyware)
    Not only do you not have viruses in Linux, an even bigger advantage in my opinion is that you're not dedicating gobs of processor and memory to antivirus/antispyware software. This is all the more important on older/slower computers.

  • It's free!
    Free as in you can see the source code and modify it however you like, as well as free as in cost, Which you'll remember next time you have to purchase a retail copy of any Microsoft software. Which brings me to my next point...

  • No more licenses/activation!
    Have you ever tried installing Windows and the key wouldn't work because it was a Dell key with OEM media? Or installed office only to discover you've misplaced your key? Since Linux itself as well as most Linux software is free, so no licenses to fuss with!

  • Less rebooting
    Not much needs to be said about the ridiculousness of having to reboot a "modern" operating system (windows) every time it's updated. With Linux, you only need to reboot when updating the kernel. And even then, it doesn't nag you every 15 minutes to reboot.

  • More security
    Linux gets security patches every day, not once a month like Windows.

  • No more startup cramming
    Windows computers gradually get slower the longer you use them, because half of the programs you install (Adobe Reader, Office, iTunes, even Google software) decide they want to run at startup. Not so with Linux.

  • Less use of system resources
    Unlike the latest version of Windows, the latest versions of Linux will actually run on old computers, especially if you use a lightweight desktop environment like Xfce, LXDE, or Enlightenment.

  • Easier software acquisition/updates
    Want to install software in Linux? Almost everything you need is simply an apt-get (or yum) away! This includes codecs, which can be annoying to hunt down in Windows. Software is also automatically updated via the centralized package manager.

  • Easier development
    Everything you need for development is available through a package manager as well (C compiler, JRE, git, etc.). Python? Already comes with Linux. Plus, development software integrates much better in Linux because the terminal isn't just an afterthought like it is in Windows.

  • Automation
    This is more important for servers than for desktops, but every single task in Linux can be automated with free software (Python, shell scripting, Puppet...).

  • Nicer font rendering
    With windows 7, Microsoft is finally starting to catch up, but Linux has had much nicer font rendering for a long time now.
Next time I'm annoyed with Linux I can look at my list and remember life could be worse--I could be using Windows ;)