Skip to content

Android Installation Tutorial

Andrew Gallant edited this page Sep 10, 2013 · 2 revisions

Note from burntsushi: The following is a detailed set of instructions for copying nflgame to your Android phone on a Mac. If you already know how to copy stuff to your phone, then all you need to do is install QPython from the Play store and put nflgame in QPython's site-packages directory. (Look for the com.hipipal.qypyplus directory on your SD card.)

I recently set up nflgame on my HTC One Android phone. Nflgame works great. Clearly slower than on my Mac, but great. The following steps are what I did to install nflgame on my phone from my Mac. If you have a non-Mac PC, I'm sure the steps are similar, but I can't tell you exactly.

I apologize if this is overly simplistic.

Copy nflgame to a location you can see from a Finder window

For me, nflgame is installed in /Library/Python/2.7/site-packages/nflgame. I don't know how to see that directory from a Finder window. I only know my "User" directory. My Apple ID is cminton, so I can only see cminton under the /Users directory. So in the Finder window, I created a temp folder under cminton called "temp". Then I run the "Terminal" application which opens a shell.

I change the directory to where nflgame is with the following command: cd /Library/Python/2.7/site-packages

If you are not running Python 2.7, thne your path will have a different version number. Change accordingly.

You then copy nflgame to the temp directory with (replace "" with your user name): cp nflgame /Users/

Of course, if you can see the /Library directory in a Finder window, you do not need to do this. You may also want to clean up the temp directory when you are done.

Download Android File Transfer to your Mac

You need an application called Android File Transfer on your Mac. This allows you to connect to your android device as a hard drive and copy to it. As I type this, I realize I previously downloaded Android File Transfer from Android.com, so I can't really explain what to do. However, it should not be difficult. You can find it here:

http://www.android.com/filetransfer/

Install QPython on your Android device

You need a Python interpreter for the Android device. This one works for me and looks fine. Go to Google Play Store and download QPython. I downloaded two apps

  • one is for editing scripts and typing Python commands in a shell and the second simply runs scripts. Both apps are by Pipal Mobile Lab. The first app is "QPython - Python for Android" and the second is "QPython Player for Android".

Connect your Android device to your PC via USB.

When you plug in your device, "Android File Transfer" starts up and opens what looks like a Finder window.

Locate the directory on your Android device to copy nflgame

Installation of the QPython apps creates a directory on your sdcard. The directory is "com.hipipal.qypyplus". Under that directory is a sub-directory called "lib" and under that is "site-packages". You will want to copy nflgame to site-packages.

Open a finder window so that you can look at the files on your Mac.

In Finder, go to the temp directory you copied nflgame to. You now have the files on your Mac in one window and the files on your Android device in the other.

Copy nflgame

Click on the nflgame directory in the Finder window and drag it to the site-packages directory in the Android File Transfer window. It takes about two minutes to copy all the files.

That is all I did. Good luck.