This guide will give an introduction on howto contribute to (open) Android projects. It is suited for every kind of contributors: Newcomers, developers and managers. The guide may be extended or updated from time to time and updated on this place. - Notice: Work in progress.
Notice: Commands listed in this guide are replaced to be ready to use for the following project:
In this part you can find basic tools for android development and information about them. Further chapters won’t describe these tools later.
Android Platform Tools
The platform tools include the most important tools for communication with an Android device. They are also included in the Android SDK package (5-800 MB), but also available seperatly (roughly 5 MB).
Android SDK / Studio
The Android SDK contains needed libraries and tools to develop Android applications, as said above it also include the Android Platform Tools. If you want to download this, you most likely want to start contributing code to an project or start a new one. Therefore you should maybe pick the Android Studio + SDK Download option.
You can find more information about SDK and Studio here. When opening a project you may get an error about not available tools, then you have to update/install the projects required versions, where the update guide may help out.
Activating the Debug Bridge (ADB)
You have to enable the android debug bridge on your device, so it gets visible when trying to use the adb tool on your computer. You can find the option to enable this in your Android devices system settings, take a look at the xda guide for Windows, Linux and Mac if you need more information.
Providing logs to developers (logcat)
Developers may ask for logfiles in bug reports, this is how you can get them. For all methods you have to enable adb on your device, run commands in the command line and need to provide the output by some way to the project. Usually you paste the log on the project’s bugtracker or the link to where you have pasted the log, e.g. on a pastebin.
- Start terminal emulator / cmd on your computer
- Run command(s) - platform availability: see below
- Start app and do those actions that produce errors, crashes or other bad results
- Go back to the terminal on your computer and terminate logcat - usually you have to press CTRL-C or STRG-C for that
- Copy the output and check if there are any personal details in it - if so remove those or replace them with some pseudo data
- Upload/Send log to developers/maintainers
- (Win) adb
adb logcat | findstr com.example.app
- (Lx,Mac) adb
adb logcat | grep com.example.app
psid=`adb shell ps | grep com.example.app | cut -d' ' -f2- | tr -s [:space:] ' ' | cut -d' ' -f2` adb logcat | grep " $psid $psid . "
- (Lx,Mac) pidcat
- (Android) Rootless logcat
Start adb (network mode), run the app on the device and put
com.example.appin Filter by keyword.
Helping in localization (translating)
TODO: string ressources