You are on page 1of 28

How to Acquire Console and Crash Logs

a guide on how to acquire console logs and sync different operating systems devices across
multiple machines, including the retrieval of web browsers’ console logs

Table of contents:
1. Acquiring Android crash logs on Windows machines
2. Acquiring Android crash logs on Mac OS machines
3. Acquiring Android crash logs on Linux machines
4. Acquiring iOS crash logs on Windows machines
5. Acquiring iOS crash logs on Mac OS machines
6. Acquiring console logs on Chrome
7. Acquiring console logs on Firefox
8. Acquiring console logs on Safari
9. Acquiring console logs on Opera
1. Acquire Crash Logs on Android devices using Windows machines

Obtain the crash logs via Android Studio

From our past experience, the data provided by logs created with other applications (installed on the
device) does not provide accurate and full device and app information.

Firstly, you will need to install Android Studio for Windows


(note you will need approximately 1.5gb free space on your computer)

● http://developer.android.com/sdk/index.html?hl=sk

1. From the above link, click on the green “Download Android Studio” button

2. Make sure you read the terms and conditions, then tick the checkbox before downloading the
application

1
3. Run the file ​android-studio-bundle-141.2135290-windows.exe

4. Proceed through the installation wizard

2
5. When reaching the second step, a “We could not detect a Java Development Kit (JDK)” message
will be displayed. Click on the provided link in order to install the additional necessary tool. Close the
installer after this step.

6. Scroll down the website to “Java SE Development Kit 7u80” and download the tool for your specific
Windows (32-bit or 64-bit)

3
7. Run the file​ jdk-7u80-windows-x64.exe

8. Proceed through the installation wizard

9. Run again the Android Studio setup file and proceed through the installation wizard. (It will now
detect that the Java Development kit is installed)

10. Launch Android Studio after the setup is finished.

11. After the project has been set up, click on the Android Device Monitor icon in the toolbar:

4
12. Connect your Android device to your Mac machine using a USB cable (note: USB debugging must
be turned on - this can be done in the Developer Options area of the device’s Settings app;)

13. Optionally, for ease of access, pin the Android Device Monitor app in the taskbar:

5
● note: after connecting your device, if you cannot see it in the left side “devices” panel, then you
might have to install its USB driver.
● you can download the USB drivers from the list below:

Acer - ​http://www.acer.com/worldwide/support/mobile.html
Alcatel - ​http://www.alcatelonetouch.com/global-en/support/faq/usbdriver.html
Asus - ​http://support.asus.com/download/
Dell - ​http://support.dell.com/support/downloads/index.aspx?c=us&cs=19&l=en&s=dhs&~ck=anavml
Foxconn - ​http://drivers.cmcs.com.tw/
Fujitsu - ​http://www.fmworld.net/product/phone/sp/android/develop/
Garmin-Asus - ​https://www.garminasus.com/en_US/support/pcsync/
Hisense - ​http://app.hismarttv.com/dss/resourcecontent.do?method=viewResourceDetail&resourceId=16&type=5
HTC - ​http://www.htc.com
Huawei - ​http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index
Intel - ​http://www.intel.com/software/android
KT Tech - ​http://www.kttech.co.kr/cscenter/download05.asp
Kyocera - ​http://www.kyocera-wireless.com/support/phone_drivers.htm
Lenovo - ​http://developer.lenovomm.com/developer/download.jsp
LGE - ​http://www.lg.com/us/mobile-phones/mobile-support/mobile-lg-mobile-phone-support.jsp
Motorola - ​http://developer.motorola.com/docstools/USB_Drivers/
MTK - ​http://online.mediatek.com/Public%20Documents/MTK_Android_USB_Driver.zip
Oppo - ​http://www.oppo.com/index.php?q=software/view&sw_id=631
Pantech - ​http://www.isky.co.kr/cs/software/software.sky?fromUrl=index
Pegatron - ​http://www.pegatroncorp.com/download/New_Duke_PC_Driver_0705.zip
Samsung - ​http://www.samsung.com/us/support/downloads
Sharp - ​http://k-tai.sharp.co.jp/support/
SK Telesys - ​http://www.sk-w.com/service/wDownload/wDownload.jsp
Sony - ​http://developer.sonymobile.com/downloads/drivers/
Teleepoch - ​http://www.teleepoch.com/android.html
Toshiba - ​http://support.toshiba.com/sscontent?docId=4001814
Yulong Coolpad - ​http://www.yulong.com/product/product/product/downloadList.html#downListUL
Xiaomi - ​http://www.xiaomi.com/c/driver/index.html
ZTE - ​http://support.zte.com.cn/support/news/NewsDetail.aspx?newsId=1000442
(source: developer.android.com)

6
2. Acquire Crash Logs on Android devices using Mac OS machines

Obtain the crash logs via Android Studio

From our past experience, the data provided by logs created with other applications (installed on the
device) does not provide accurate and full device and app information.

Firstly, you will need to install Android Studio for Macintosh


(note you need approximately 500mb free space on your computer)

● http://developer.android.com/sdk/index.html?hl=sk

13. From the above link, click on the green “Download Android Studio” button

14. Make sure you read the terms and conditions, then tick the checkbox before downloading the
application

7
15. After the .dmg file is downloaded; run it then drag and drop it on the Applications folder icon

4. Launch Spotlight Search (cmd + space), type “android studio” and launch the application (click Open in
the warning alert)

8
5. When first opened, a “Java not found” pop up will appear - click on the link to download Java.

6. Proceed with downloading Java

9
7. After the download is finished, open javaforosx.dmg and double click on JavaForOSX.pkg

8. Proceed through the installation Wizard

9. After the Java installation has been completed, run Android Studio again and proceed through the
onboarding flow:

10. When reaching the “Welcome to Android Studio” screen, select “Start a new Android Studio project”
and set up the work environment (you can use the pre-selected options).

11. After the project has been set up, click on the Android Device Monitor icon in the toolbar:

10
12. Connect your Android device to your Mac machine using a USB cable (note: USB debugging must be
turned on - this can be done in the Developer Options area of the device’s Settings app;)

13. Optionally, for ease of access, lock the Android Device Monitor app in the dock:

11
12
3. Acquire Crash Logs on Android devices using Linux machines

Obtain the crash logs via Android Studio

From our past experience, the data provided by logs created with other applications (installed on the
device) does not provide accurate and full device and app information.

Firstly, you will need to install Android Studio for Linux


(note you will need approximately 1.5gb free space on your computer)

● http://developer.android.com/sdk/index.html?hl=sk

1. From the above link, click on the green “Download Android Studio” button

2. Make sure you read the terms and conditions, then tick the checkbox before downloading the
application

13
3. Download the file ​appropriate for your linux os. Ex:
Linux x64 172.84 MB jdk-8u60-linux-x64.tar.gz

4. Unzip the downloaded content in the Desktop folder.

Open terminal application (CTRL+ALT+T)

5. Cd into the /BIN directory inside the unzipped content (MainDir/Desktop/adroid-studio/bin)


6. Run the .sh executable ( ./studio.sh)
7. Notice the error displayed(JDK and JRE need to be installed and configured)
8. Launch another Terminal
9. Install JDK using the following commands in terminal:
● sudo add-apt-repository ppa:webupd8team/java
● sudo apt-get update && sudo apt-get install oracle-jdk7-installer
10. After installation you have to enable JDK:
● update-alternatives --display java
11. Check if Ubuntu uses Java JDK 7
● java -version
● If all went right the answer should be something like this:
● java version “1.7.0_25″ Java(TM) SE Runtime Environment (build 1.7.0_25-b15) Java
HotSpot(TM) Server VM (build 23.3-b01, mixed mode)
12. Check what compiler is used
● javac -version
● It should show something like this

14
● javac 1.7.0_25
13. Add JAVA_HOME to environment variable
● Edit /​ etc/environment​ and add J​ AVA_HOME=/usr/lib/jvm/java-7-oracle​ to the end of the
file
● sudo nano /etc/environment
● Append to the end of the file
● JAVA_HOME=/usr/lib/jvm/java-7-oracle
14. Get back to the first instance of the Terminal application and re-run the last
command(/.studio.sh).

15. Launch Android Studio after the setup is finished.

16. After the project has been set up, click on the Android Device Monitor icon in the toolbar:

17. Connect your Android device to your Linux machine using a USB cable.

18. . Optionally, for ease of access, pin the Android Device Monitor app in the launch-bar:

15
4. Acquiring Crash Logs on iOS devices using a Windows machine

The crash log files are copied to the computer when syncing your device via iTunes.

● You can download iTunes from this page: ​https://www.apple.com/itunes/download/

The log can be found in the following folder:

● C:\Users\<USERNAME>\AppData\Roaming\Apple
Computer\Logs\CrashReporter/MobileDevice/<DEVICE_NAME>

● note: the AppData folder is hidden by default, you might need to enable view hidden files

How to obtain the logs:

1. Reproduce the crash in your iOS device.

2. Connect your iOS device to the PC.

3. Launch iTunes.

4. Click on the iPhone button in the top-left area of the screen (iPad or iPod if you are testing on the
respective device).

16
5. Sync your device with the computer

17
6. Wait for the synchronisation to finish.

7. Find your app crash log.


screenshot

note: the crash log’s name includes the following:


- App’s name
- date of the crash (year-month-day)
- time of the crash (hour-minute-second)
- device on which the crash occured

18
5. Acquiring Crash Logs from iOS devices using a Macintosh machine

The crash log files are copied to the computer when syncing your device via iTunes.

● iTunes should arrive with your Mac OS X operation system, however you can download iTunes from
this page: ​https://www.apple.com/itunes/download/

The log can be found in the following folder:

● Library\Logs\CrashReporter\MobileDevice\<DEVICE_NAME>

● note: the Library folder is hidden by default, you have to hold the option key to view it (it can be
accessed via the Finder’s menu bar)

19
How to obtain the logs:

8. Reproduce the crash in your iOS device.

9. Connect your iOS device to the PC.

10. Launch iTunes.

11. Click on the iPhone button in the top-left area of the screen (iPad or iPod if you are testing on the
respective device).

20
12. Sync your device with the Mac

13. Wait for the synchronisation to finish.

21
14. Find your app crash log.

note: the crash log’s name includes the following:


- App’s name
- date of the crash (year-month-day)
- time of the crash (hour-minute-second)
- device on which the crash occured

22
7. Acquiring console logs on Chrome

1. Click on the Menu button in the upper-right corner


2. Hover the mouse cursor over “More Tools”
3. Select “Developer Tools” from the dropdown menu

alternatively, press:
- Ctrl+Shift+I (Windows)
- Cmd+Option+I (Mac)

4. Select Console from the menu bar

5. Reproduce the issue, and the log text can be copied and pasted into the bug report

23
8. Acquiring console logs on Firefox

1. Click on the Menu button in the upper-right corner


2. Click on “Developer”
3. Click on “Console”

alternatively, press:
- Ctrl+Shift+K (Windows)
- Option+Command+K (Mac)

4. Select “Console” from the menu bar

5. Reproduce the issue, and the log text can be copied and pasted into the bug report.

24
9. Acquiring console logs on Safari

1. On a Mac device, firstly, you need to activate Developer Mode on Safari


2. To do so, Click on Safari in the menu bar, then select Preferences (CMD+,)

3. Select the Advanced tab, then tick the “Show Develop menu in menu bar”

4. Click on Develop in the menu bar, then select “Show Error Console” (CMD+Option+C)

25
5. Reproduce the issue, and the log text can be copied and pasted into the bug report.

26
10. Acquiring console logs on Opera

4. Click on the Opera button in the upper-left corner


5. Click on “Developer”
6. Click on “Console”

alternatively, press:
- Ctrl+Shift+i (Windows)

4. Select “Console” from the menu bar

5. Reproduce the issue, and the log text can be copied and pasted into the bug report.

27

You might also like