Android overview Flashcards
Android vs Apple
- open source
- can run on many devices
- easy to inspect reverse and modify Android apps
- side load permits to test developed apps
- easy to jailbreak.
- can be customized by vendors (Open source, problem of security patches)
• widespread, more interesting for research purposes - security problems
Languages used to write android apps
1- Java
2- Kotlin
3- c/c++ (useful for low level task)
Android APIs are used for?
- for apps to interact with the “external world” (via the API)
- for the Android framework to interact with the Android app
- > Many java API are part of Android APIs
Can android apps be executed in non-android devices?
No, they can only be executed in the Android framework (phisical device or emulator).
Android general architecture (from lower to higher)
1- Linux Kernel
2- Hardware Abstraction Layer (HAL) to interact with hardware and sensors
3- Android Runtime (supports android apps runtime execution) + Native C/C++ libraries
4- Java API Framework
5- System Apps (pre-installed)
Android framework APIs
- many, differ from features but not base framework
- old APIs are deprecated but not removed
- backward compatible
- identifyed by integer
package name
- each app has a package name “com.company.app”
- unique identifier
- two apps cannot have the same package name (both android and playstore)
Four main components types
- Activity
- Service
- Broadcast Receiver
- Content Provider
Activity
- entry point
- has an UI
- app could have many, but one must be chosen as launcher
- external apps can interact with activity
- other activities in same app can interact with activity
- has a lifecycle
Service
- no UI
- generally executed in background (in some cases foreground)
- cannot be launched with graphical launcher
Content providers
- databases
- used to share data between apps
- app can query and interact with data
Intents
- applications can communicate with each other through intents
- explicit (specifies components to communicate with)
- implicit (no target, only action type)
- broadcast intent
Intent filter
- declaration in manifest
* necessary if anactivity can receive a certain intent
Manifest file
- fingerprint of the app
- hall details and key informations
- permissions
- intent filters
- XML file
Important Android tools
- Android Studio
- adb
- sdkmanager
- avdmanager
- compilation with gradlew from the terminal
- app-debug.apk