Wednesday, August 28, 2013

No cover when uploading to Google Play Books

If you upload a book to Google Play Books in EPUB format and one of these things happens:

  • The cover isn't showing up
  • The cover looks like the above image
  • The book doesn't open/gives you a 404 error
Here are some things to try:

  1. First of all, wait! Google has to extract the cover from the file, and for some reason it can take a long time for it to show up. I would recommend waiting at least an hour, if not longer. Yes, this might seem like way too long, but I've seen it take that long.

  2. If you're absolutely sure it isn't working, you can try to fix the cover using Calibre:
    1. Download Calibre, install it, and use it to open the EPUB file
    2. If the cover doesn't show up in Calibre:
      1. Right-click → Edit metadataEdit metadata individually
      2. Click Download cover
      3. Select a cover and click OK
      4. If no cover is found, find a cover online, and then from the metadata window in Calibre, click Browse to browse to the cover and add it.
      5. Click OK
    3. If the cover does show up in Calibre, the EPUB file may be corrupt. To fix it:
      1. Right-click → Convert booksConvert individually
      2. Output format → EPUB
      3. OK
    4. Save the file
      1. Right-click → Save to disk → Save to disk
      2. Select a location to save the EPUB to
    5. Remove the file you previously uploaded to Google Play Books
    6. Upload the modified EPUB to Google Play Books. It will be located in a subfolder in the location you specified in the previous step. You just want the EPUB file; you can ignore the other files.

  3. If the cover still isn't showing up, you can try to manually repair it.
    1. Download Sigil, install it, and use it to open the EPUB file
    2. Fix the cover according to the guidelines in the following blog post:
      Best practices in ePub cover images by Keith Fahlgren
    3. Once you're done, upload the modified EPUB to Google Play Books

  4. If the book won't upload at all, the cover may not be the problem
    1. Validate the EPUB using the validator here:
    2. Modify the EPUB using Sigil or another EPUB editor, and keep validating it until there are no more errors
    3. Try uploading it to Google Play Books again

Saturday, August 24, 2013

Import playlists into Google Play Music

I've already covered getting playlists out of Google Play Music, but what if you want to import your playlists into Google Play Music? The easiest way to do this would probably be to get your playlists into iTunes or Windows Media Player and use Google's Music Manager to sync your playlists.

Being a Linux user, that's not the best option for me, so I came up with another way. This one's not for the faint of heart, so be sure you've got some time on your hands and lots of patience. Here we go:

  1. Just like my method for exporting playlists from Google Play Music, importing them will require a rooted Android device. The exact method for doing this varies by device, so you'll need to Google it.

  2. This may seem obvious, but first of all you need to make sure all of your music is in Google Play Music. It can take a while, so if you haven't done this you should probably get crackin. These links should help:

  3. Remove any music stored on your Android device's internal memory or SD card. This isn't absolutely necessary, but if you don't do this, any music in the playlists you wish to import that's on your device may not get added to Google Play Music playlists in the cloud.

  4. Get the playlists to import. This step will vary widely depending on where the playlists are coming from. You'll want your data file to contain the following fields:
    1. Playlist name
    2. Artist
    3. Title

    Based on the tools I've used to import data into a Sqlite database, I'd recommend that the data is in one of these formats:
    • A text file where each row is on one line, the fields are separated by a unique character (like the pipe symbol: |), and the fields aren't quoted. For example:

      Folk|Gregory Alan Isakov|Dandelion Wine
      Folk|Gregory Alan Isakov|That Moon Song
    • A Microsoft Excel XML file. You don't need Excel to create this; free programs such as LibreOffice Calc work fine.

  5. Make sure all of your tracks and playlists on your Android device are synced with Google's servers. I've already documented this; see step 1 in my post on exporting playlists from Google Play Music.

  6. Optional, but strongly recommended: back up Google Play Music. My app of choice for doing this is Titanium Backup (the free version will suffice, although I think it's worth paying for).

  7. Get the Google Play Music database file (music.db). The instructions for this are also in my post on exporting playlists from Google Play Music (step 2).

  8. Open the music database file. You can use a tool such as Sqliteman, or you can use the sqlite3 command in a terminal, like so:
    sqlite3 /path/to/music.db

  9. Import your playlists into the database file. This is where it gets fun!
    1. Create temporary tables
      create table "temp" ("Playlist Name" text, "Artist" text, "Title" text);
      create table "temp2" ("Playlist Name" text, "Artist" text, "Title" text, "ClientPosition" integer primary key autoincrement);

    2. Import the data. This will vary depending how your playlists are formatted and what program you're using. If you're using Sqliteman:
      • In the menu go to Database --> Import Table Data...
      • Table to Import Into --> select temp
      • File to Import --> Search... --> browse to your playlist file
      • Select an appropriate separator under Column Separators
      • Under Preview, you should see three columns with playlist name, artist, and title
      • Click OK

      If you're using the sqlite3 command:
      • Define the separator between fields. If it's a pipe (|), you can skip this step. For example, to set the separator to a dollar sign:
        sqlite> .separator $
      • Then import the file (things will be easier if the file name doesn't have spaces):
        sqlite> .import /path/to/playlists.txt temp

    3. Before we actually import the playlist entries, this query will show you what's actually going to get imported:
      select temp."playlist name", temp.artist, temp.title from music join temp on music.artist=temp.artist and music.title=temp.title;

    4. If some of your songs don't show up in the above query, then they either aren't in Google Play Music, or the artist or title aren't spelled the same. If you want at this time, upload or rename any missing music. If you decide to fix any missing music, you'll have to start over at the step above where you make sure the music on your Android device is synced with Google's servers.

    5. Copy the data from the temp table to the temp2 table (the temp2 table is my hack to keep the playlist order):
      insert into temp2 ("playlist name", artist, title) select * from temp;

    6. Now, we're finally ready to create the playlists. If you already have playlists in Google Play Music with the same names as the ones you're importing, you can skip this step. Here's the query (the _sync_dirty part is what tells Google Play Music that the data needs to be synced to the cloud):
      insert into lists ("Name", "_sync_dirty") select distinct "Playlist Name", '1' from temp2;

    7. We've created the lists, now we need to import the data into them:
      insert into listitems ("MusicId", "ListId", "ClientPosition", "_sync_dirty") select as musicid, as listid, clientposition, "1" from music join temp2 on music.artist=temp2.artist and music.title=temp2.title join lists on "playlist name";

    8. Clean up after ourselves:
      drop table temp;
      drop table temp2;

  10. Just to be safe, turn off internet on the Android device (whether it's wifi or data)

  11. On the Android device, kill the Google Play Music app by going to the home screen --> Menu --> Settings --> Application manager --> scroll down and click on Google Play Music --> Force stop

  12. Copy the music.db file you modified back to the device's SD card

  13. Copy the music.db file from the SD card back to /data/data/

  14. This part can be tricky. Copying music.db back will probably mess up the permissions, which means at this point if you were to open the Google Play Music app, it would probably crash. To fix the permissions, you need to either use the command line or use a file explorer app that's capable of modifying the permissions. For these instructions, I used File Explorer by NextApp with the Root Add-On:
    1. Long-press on one of the other files in the folder, like music.db-journal --> Permissions
    2. Make a note of the Owner and Group
    3. Now long-press on music.db --> Permissions
    4. Click on Owner --> App --> change it to the same owner as the other file you just looked at. You'll see a Google Play Music icon beside the owner, which will confirm you're picking the right one.
    5. Repeat the same thing for the group.
    6. This isn't completely necessary, but you can also uncheck all of the boxes in the Exec column, and uncheck the Global box in the Read column. In the bottom left it should say Octal: 0660.
    7. Click OK --> OK.

  15. Phew, we're almost there! Now open the Play Music app, and go to Playlists. Scroll down and you should see the playlists you imported (if you don't, make sure you're viewing All Music instead of music On Device). Open the playlists, and you should see all the songs you imported.

  16. Lastly, if everything looks good, go ahead and connect your device to the internet again, and follow the step you did above on making sure your music's synced with Google's servers.

  17. To make sure your playlists are on Google's servers, go to and your playlists should be there. If they don't show up, don't worry. Give it some time, try syncing from the Play Music app again, and refresh the page. It can take a little bit to sync.

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:

  • 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. 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, 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.

Sunday, August 11, 2013

Dell iDRAC: The Virtual Media native library cannot be loaded

If you get the above error when trying to open the virtual media on a Dell iDRAC console session (Virtual Media --> Launch Virtual Media) and you're running 64-bit Linux, you may need to install 32-bit Java. Here's what I did on Ubuntu 12.04:

  1. First of all, I happened to run into this issue on an iDRAC that was running old firmware, so before continuing, I'd recommend updating to the latest firmware if possible and seeing if that fixes the issue.

  2. If that didn't fix it or you're unable to update to the latest iDRAC firmware, install 32-bit Java on your workstation:
    sudo apt-get install openjdk-6-jdk:i386

  3. Next, download the viewer.jnlp file from the iDRAC web interface by clicking the link to launch the virtual console/viewer. If the viewer.jnlp file you downloaded has a really long name, you might want to rename it to make the next step easier.

  4. Open the viewer.jnlp file with the 32-bit javaws (Java Web Start) binary:
    /usr/lib/jvm/java-6-openjdk-i386/jre/bin/javaws /path/to/viewer.jnlp

Wednesday, August 7, 2013

Typing Arabic vowels/diacritics on Android

If you would like to type Arabic vowels/diacritics/harakat on Android, you first need a keyboard that supports it. I've tried most of the keyboards available, and I've listed the ones that fit the bill. Most surprisingly, my keyboard of choice (Swype) doesn't support Arabic diacritics. Guess it's time to switch!

The first thing you'll need to do for all of these keyboards is install Arabic in the settings for each keyboard, which is normally accessible by going to Home --> Menu --> Settings --> Language and input. Once you've installed Arabic, you'll need to switch to Arabic language while using the keyboard.

Google Keyboard (pictured)

To type Arabic diacritics, long-press the period key near the lower-right.

Google Keyboard is free, lightweight, and probably the best out of the options I tried. In a move against Android fragmentation, Google is modularising Android by making a lot of new features available through the Play Store, meaning it matters a lot less what version of Android you're running. The Google Keyboard is one of the results of this modularisation.


Long-press the apostrophe/single quote key near the lower right to access diacritics.

SwiftKey is a solid keyboard. It isn't free, but it's gone on sale periodically.

GO Keyboard

There's a button near the bottom left that has a doubled fatha symbol. Long-press it to access other diacritics.

This one's pretty good and it's free, although it does feel a little bloated and several of the options will prompt you to install additional GO-branded software.


Tap the button that brings up numbers and symbols. From there you should see a "1/6" button. You'll need to tap that five times until it says "6/6", and from there you'll see the diacritics.

This was probably my least favorite. The interface felt cluttered, and having to go through six keypresses just to get to the diacritics was annoying. In addition, some of the time the 1/6 button said 1/3 instead, meaning I couldn't get to the diacritic page. It seemed that happened mostly when switching between other keyboards.

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:

  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:

  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!