| OLD | NEW |
| 1 # Chromoting Android Hacking | 1 # Chromoting Android Hacking |
| 2 | 2 |
| 3 This guide, which is meant to accompany the | 3 This guide, which is meant to accompany the |
| 4 [compilation guide](chromoting_build_instructions.md), explains the process of | 4 [compilation guide](chromoting_build_instructions.md), explains the process of |
| 5 viewing the logs and debugging the CRD Android client. I'll assume you've | 5 viewing the logs and debugging the CRD Android client. I'll assume you've |
| 6 already built the APK as described in the aforementioned guide, that you're in | 6 already built the APK as described in the aforementioned guide, that you're in |
| 7 the `src/` directory, and that your binary is at | 7 the `src/` directory, and that your binary is at |
| 8 `out/Release/apks/Chromoting.apk`. Additionally, you should have installed the | 8 `out/Release/apks/Chromoting.apk`. Additionally, you should have installed the |
| 9 app on at least one (still) connected device. | 9 app on at least one (still) connected device. |
| 10 | 10 |
| 11 [TOC] | 11 [TOC] |
| 12 | 12 |
| 13 ## Viewing logging output | 13 ## Viewing logging output |
| 14 | 14 |
| 15 In order to access LogCat and view the app's logging output, we need to launch | 15 In order to access LogCat and view the app's logging output, we need to launch |
| 16 the Android Device Monitor. Run `third_party/android_tools/sdk/tools/monitor` | 16 the Android Device Monitor. Run `third_party/android_tools/sdk/tools/monitor` |
| 17 and select the desired device under `Devices`. Using the app as normal will | 17 and select the desired device under `Devices`. Using the app as normal will |
| 18 display log messages to the `LogCat` pane. | 18 display log messages to the `LogCat` pane. |
| 19 | 19 |
| 20 ## Attaching debuggers for Java code | 20 ## Attaching debuggers for Java code |
| 21 | 21 |
| 22 ### Eclipse | 22 ### Eclipse |
| 23 | 23 |
| 24 1. Go to http://developer.android.com/sdk/index.html and click "Download the | 24 1. Go to https://developer.android.com/sdk/index.html and click "Download the |
| 25 SDK ADT Bundle for Linux" | 25 SDK ADT Bundle for Linux" |
| 26 1. Configure eclipse | 26 1. Configure eclipse |
| 27 1. Select General > Workspace from the tree on the left. | 27 1. Select General > Workspace from the tree on the left. |
| 28 1. Uncheck Refresh workspace on startup (if present) | 28 1. Uncheck Refresh workspace on startup (if present) |
| 29 1. Uncheck Refresh using native hooks or polling (if present) | 29 1. Uncheck Refresh using native hooks or polling (if present) |
| 30 1. Disable build before launching | 30 1. Disable build before launching |
| 31 1. Select Run/Debug > Launching | 31 1. Select Run/Debug > Launching |
| 32 1. Uncheck Build (if required) before launching | 32 1. Uncheck Build (if required) before launching |
| 33 1. Create a project | 33 1. Create a project |
| 34 1. Select File > New > Project... from the main menu. | 34 1. Select File > New > Project... from the main menu. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 to easily launch GDB. Run | 148 to easily launch GDB. Run |
| 149 | 149 |
| 150 ```shell | 150 ```shell |
| 151 $ build/android/adb_gdb --package-name=org.chromium.chromoting \ | 151 $ build/android/adb_gdb --package-name=org.chromium.chromoting \ |
| 152 --activity=.Chromoting --start | 152 --activity=.Chromoting --start |
| 153 ``` | 153 ``` |
| 154 | 154 |
| 155 Note that if you have multiple devices connected, you must export | 155 Note that if you have multiple devices connected, you must export |
| 156 `ANDROID_SERIAL` to select one; set it to the serial number of the desired | 156 `ANDROID_SERIAL` to select one; set it to the serial number of the desired |
| 157 device as output by `$ adb devices`. | 157 device as output by `$ adb devices`. |
| OLD | NEW |