Getting app logs from an Android device

Hi,

Thanks for helping me track down the cause of the problem with Zombie Outbreak Simulator (ZOS) on your device!

The beta version of ZOS logs info about what the game is doing, and has a way to let you email me a copy of the logs. This can sometimes help track down the cause of problems. However, this doesn’t help if the game is crashing on startup before it even displays anything!

In this case we need to use Android developer tools to get a log from the device. For this you’ll need a computer (Windows PC or Mac) that you can install some software on. You’ll then connect your device to the computer via USB, and use the software to get the logs from the device.

Here’s what you need to do to get this to work:

1. Set up developer mode and USB debugging on the device

Go to Settings -> About phone (or About device). Scroll down to near the bottom, and then tap on ‘Build number’ seven times. After you’ve done this, you’ll be prompted that you’re now a developer.

If you can’t find the Build number under the Settings, this article lists some other locations it might be.

Now that you’re a developer, go to Settings -> Developer options, and turn on USB debugging.

Android USB debugging

2. Install the Android SDK on your computer

Go to the Android SDK download page, scroll to the bottom, and download the command-line tools for your machine (for Mac, or the no-installer one for Windows).

Android SDK download options

Once downloaded, unzip them somewhere onto your computer.

The download is missing some additional tools which are required. To install these, you’ll need to run the Android SDK Manager.

On a Mac, the SDK manager is in the tools folder, called ‘android’.

SDK Manager location on a Mac

On Windows, the SDK manager is in the top level folder, called ‘SDK Manager.exe’.

Android SDK Manager Windows location

Double-click to run the SDK Manager.

On a Mac, you might get an error like this:

Android SDK Manager open error on Mac

If so, right-click on android and choose Open.

Android SDK Manager right-click on Mac

Then click the Open button:

Android SDK Manager open on Mac

The SDK Manager will check for updates for a minute or so, then auto-select a bunch of packages which you don’t need. Deselect all of these via the Deselect All link.

Android SDK Manager deselect all

Then, select the “Android SDK Platform-tools” under “Tools” near the top:

Android SDK Manager platform tools

If you’re on Windows, then also select the “Google USB Driver” option under “Extras” near the bottom:

Android SDK Manager USB driver

Then click the Install packages button:

Android SDK Manager install packages

Select the license in the list, click Accept License, then click Install.

Android SDK Manager license

When it’s finished downloading and installing the packages, you can then close the SDK Manager.

3. Run the Android Monitor app

Now locate and run the monitor app (monitor.bat on Windows) which is under the tools folder.

On Mac you’ll probably need to right-click and choose Open, as with the SDK Manager. On Windows you’ll probably need to right-click and choose Run as Administrator, or else you’ll get a permissions error.

Android SDK Monitor app location on Windows

The monitor app should look like the following:

Android SDK Monitor app on startup

4. Plug in your device

Connect your device to your computer via USB.

On the device, you’ll be prompted whether to allow USB debugging from this computer. Check ‘always allow from this computer’, and then tap OK.

Android allow USB debugging

You should now see your device listed. If you select it, then make sure the LogCat tab is selected, then you should see a bunch of log messages.

Android SDK monitor app with device

5. Add a filter for messages from Zombie Outbreak Simulator

Your device will be logging a lot of messages from many apps. To make it easier to manage, we add a filter to just show messages from ZOS.

Click the + next to Saved Filters on the LogCat tab.

Android SDK monitor LogCat add filter button

Enter the following details:

Filter Name: ZOS
by Application Name: zombieoutbreaksimulator

Then click OK.

Android SDK monitor app LogCat filter settings

Make sure the ZOS filter is selected in the LogCat tab.

Android SDK monitor LogCat filter selected

6. Run Zombie Outbreak Simulator

Now you can finally run ZOS on the device!

Hopefully while it’s starting up you’ll see some log messages, and then the app will crash.

7. Save and email the logs

Click in the log area, and then choose Edit -> Select All from the menu to select all of the log messages.

Then, click the Save button at the top-right of the messages.

Android SDK monitor log messages

Save the logs to a file somewhere on your computer.

Then, send me the log file as an attachment in an email to info@binaryspacegames.com. Hopefully I’ll be able to figure out where it’s crashing, and fix the problem! :)

Thanks again for your help!

cya,
Saxon