There are instructions out there (
here specifically) for getting gPodder running on an Android phone.
At this point, what you get is a command-line version.
Since I don’t yet know whether this version is capable of syncing with gpodder.net, the only definite advantage this podcatcher has over the popular android podcatchers is that it is Free Software (capitol F for free as in freedom, but this also happens to be free as in free beer).
What I’d like to do here is make this stuff easy to understand to the absolute n00b, because I found it fairly hard, and I’m at least used to the command line. Since the result is a command-line only program on your phone, it’s worth re-writing these instructions in a shorter form for the intermediate user at some point. I’ll do that some time. Or if anyone reads this and wants to do that please do. In the meantime, I think this is a good project for someone just starting with Ubuntu and / or Android who is looking to gain a tiny bit of familiarity and comfort with how and when to use the command line, and taking the first tentative steps toward the kind of understanding that will help you to eventually write useful programs. I’m sending users to gedit rather than vi, because the GUI is more familiar, comfortable, and meaningful to n00bs.
Without further ado:
On the phone:
1) Install Android Scripting: SL4A. You can get it from
http://code.google.com/p/android-scripting - I don’t think it’s available through the market.
If you haven’t gotten stuff outside the Market before, use the phone’s web browser to go to that address, save the file, then drag down the dock and tap on the “download complete” message to install it.
2) Install Python 2.6: Python For Android available from the link on the right side of the SL4A page on googlecode.
3) Go to Settings - Applications - Development, and make sure USB Debugging is checked.
4) If it wasn't already, connect the phone to the computer via USB.
On your computer
This assumes you’re running Ubuntu. For the sake of this being a guide for people even less experienced than me, this also assumes that you don’t know some relatively basic things. No offense. If I’m being overly descriptive, it’s because I’ve made all of the mistakes I’m trying to prevent at one time or another.
1) Download the Android SDK. This should be pretty easy to google and find. It’s safe to assume if you don’t know for sure that you should use the Linux 86 version (unless of course you’re not running linux, in which case I really can’t help you - remember how I said this assumes you’re running Ubuntu?)
a) Find the “adb” binary file. It will either be in the “tools” or “platform tools folder. I’m going to move it into the /usr/bin/ directory. If you know how to do that, or you’d rather use it from where it is, skip to #2. In any case, leave the window with adb open.
b) More experienced people than me will read the following and tell me it’s a terrible idea, but it ultimately makes your life much easier, and, in my experience, is basically safe if you don’t goof it up.
i) Hold down ‘alt’ and hit ‘F2’.
ii) Type ”gksu nautilus“ in the prompt and hit return. Enter your password. A file browser window will come up. This file browser window has Superuser permission - meaning you can do stuff you’re not supposed to. BE CAREFUL in this window.
iii) Navigate to /usr/bin/ This might take a few seconds to load, since there’s probably a heck of a lot of stuff in there.
iv) In the other window, where you can see the ”adb’ file, right-click it and select “Copy”.
v) In the /usr/bin/ window, make sure you don’t click on any folders. If you do, you should be able to Ctrl+Click to deselect them. Now, right-click in that window and select “paste”. Alternatively, rather than going into /usr/bin/, you could just go to /usr/ and right click on the ‘bin’ folder and select “Paste Into Folder”.
vi) If the adb file is now in the /usr/bin/ folder, and not in any of its subfolders, close that window now. If you can’t find it, go to the /usr/ directory and click “search” on the right hand side of the window’s menu and see if you can find where it is and move it into the “bin” folder.
2) Google, download, and unzip the current version of the following source codes (probably easiest to use the Desktop for this. Just right click and select “Extract Here” to unzip):
mygpoclient
gpodder
feedparser
3) Open a terminal. You can find the terminal under the main menu, under Accessories.
4) Whatever the path to the mygpoclient folder is, you should be ready with it; it will probably be something like “/home/Yourname/Desktop/mygpoclient-#.#”
Enter in the terminal: cd /[the path to the mygpoclient folder from above]
The prompt should change to the path. Basically, the ‘cd’ command has just taken you into the directory you named.
Enter: sudo adb push src/gpodder/ /sdcard/com.googlecode.pythonforandroid/extras/python/gpodder/
You’ll need to type your password, then you should see a big stream of text. The adb command communicates with your phone in USB debugging mode, and the push command copied the src/gpodder folder into the directory on the phone that we named.
5) Next we’ll use the ‘cd’ command again to get into the feedparser folder. Somewhere in that folder will be the file “feedparser.py”, and you’ll need to use the cd command to get to the folder that it’s in.
a) eg, you might wind up entering “cd /home/Yourname/Desktop/feedparser-#.#/”
b) Enter “sudo adb push feedparser.py /sdcard/com.googlecode.pythonforandroid/extras/python/”
Note the space between “feedparser.py” and “/sdcard[etc.]”. We’re sending feedparser to the sdcard.
6) Here’s where it begins to get tricky.
a) Right-click on the desktop. Select “Create Document” and “Empty File”. Right click the new document and rename it “patch.diff” (you could rename it [anything].diff if you wanted to, as long as you used the same name later in the instructions).
b) Right click “patch.diff”. Select “open with text editor” or “open with gedit” or “open with” “other application” and then type “gedit” in the prompt.
c) You should now be editing patch.diff in the gedit text editor. Copy and paste the text from between the lines of asterisks exactly as it appears here:
************************************************************
and close diff --git a/bin/gpo b/bin/gpo
index fd57ab6..7075491 100755
--- a/bin/gpo
+++ b/bin/gpo
@@ -57,6 +57,9 @@ import os
import re
import inspect
+os.environ[‘GPODDER_HOME’] = ‘/sdcard/gpodder/’
+os.environ[‘GPODDER_DOWNLOAD_DIR’] = ‘/sdcard/gpodder/podcasts/’
+
gpodder_script = sys.argv[0]
if os.path.islink(gpodder_script):
gpodder_script = os.readlink(gpodder_script)
@@ -334,6 +337,13 @@ def stylize(s):
if __name__ == ‘__main__’:
cli = gPodderCli()
- cli._parse(sys.argv[1:]) or sys.stderr.write(stylize(__doc__))
+ while True:
+ line = raw_input(‘gpo> ’)
+ if line == ‘help’:
+ sys.stderr.write(stylize(__doc__))
+ elif line == ‘quit’:
+ break
+
+ cli._parse(line.split())
******************************************************************
Now save the patch file and close the text editor. I don’t follow everything this does myself, and I don’t think I’ve ever edited a patch file before, but I do know that this will be a patch that will change the gpodder program, and part of what it does it to make that program compatible with the Android phone’s filesystem. The fact that the path specified is “a/bin/gpo” led me to the realization that we may have to change things a bit as specified in #7 below.
7) Open the folder where you extracted the source code for gpodder. Move the patch into that folder. Before we run the patch I found that what I had to do to get this to work was:
a) Right click in the open window of the gpodder folder. Select “create folder”. Name your new folder “a”.
b) Right click on the “bin” folder. Select “Copy”, the right-click on the “a” folder and select “paste into folder”. If you don’t have that option, open the “a” folder and select “paste”, then navigate back up to the gpodder folder widow, so that you see the “bin” folder, the “a” folder, and the “patch.diff” file you created.
8) Use cd to get into the gpodder folder in the terminal.
eg Enter “cd /home/Yourname/Desktop/gpodder-#.#”
9) Enter “patch -p0 < patch.diff "
Did you see an error message? If so it hasn't worked, and you might try copying gpodder's "bin" folder into a new "b" folder in the gpodder folder.
10) Assuming it worked, you may want to double check which copy of the "gpo" file it worked on. Remember when I said I don't know exactly what this patch file is doing?
a) Open up the various copies of the "gpo" file from inside the various copies of the "bin" folder using the gedit text editor.
b) For each copy, do Ctrl+F to search the document for "sdcard". The unpatched version won't mention "sdcard", so when you find one that does, you've got the right one. For me it was in "a".
11) Presumably you're still cd'd into the gpodder folder (the path should appear in the terminal prompt). Edit the following command depending on where the patched copy of "gpo" turned up for you.
Enter: adb push bin/gpo[/a -or- /b -or- nothing] /sdcard/sl4a/scripts/gpo-app.py
You should now have put the gpodder python script onto your phone’s sdcard.
12) It should work now, but don’t disconnect your phone from the computer until you’re sure. Open ”SL4A“ on the phone. If ”gpo-app.py“ is there, you’re doing well. Tap it. If it tells you feedparser or mygpoclient is missing, you’ll need to repeat step 4 and/or 5 as needed. Once you get the ”gpo“ prompt, you’re golden. You can disconect the phone from the computer and move the stuff from the desktop or throw it away if you feel like it.
Using the GPO podcatching client on your phone
Type ”help“, and you’ll get a list of commands you can use to download podcasts.
I haven’t actually used it to download any podcasts yet, so I can’t tell you how. I was just flush with the excitement of having gotten it successfully installed. Really, I was mostly hoping i could put a podcatcher on my phone that would sync to gPodder.net, but I don’t yet know if that’s possible.