Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linuxct/PhoneAccountDetector
#PAAD: PhoneAccount Abuse Detector for Android 6.0+ devices
https://github.com/linuxct/PhoneAccountDetector
abuse-detection android aosp emergency-calls paad phoneaccount
Last synced: 21 days ago
JSON representation
#PAAD: PhoneAccount Abuse Detector for Android 6.0+ devices
- Host: GitHub
- URL: https://github.com/linuxct/PhoneAccountDetector
- Owner: linuxct
- License: agpl-3.0
- Archived: true
- Created: 2021-12-11T03:48:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-04T22:00:46.000Z (about 2 years ago)
- Last Synced: 2024-08-05T17:39:06.787Z (4 months ago)
- Topics: abuse-detection, android, aosp, emergency-calls, paad, phoneaccount
- Language: Kotlin
- Homepage: https://paad.linuxct.space
- Size: 331 KB
- Stars: 106
- Watchers: 7
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hacking-lists - linuxct/PhoneAccountDetector - #PAAD: PhoneAccount Abuse Detector for Android 6.0+ devices (Kotlin)
README
# PhoneAccount Abuse Detector (PAAD)
[![Latest Version](https://img.shields.io/github/v/release/linuxct/PhoneAccountDetector)](https://github.com/linuxct/PhoneAccountDetector/releases/latest) ![Compatibility](https://img.shields.io/badge/compat-API%2029%2B-brightgreen)**Simple application to enumerate and detect any application that (ab)uses adding an indefinite amount of PhoneAccount(s) to Android's TelecomManager.** As seen on [Android Police](https://www.androidpolice.com/heres-a-way-to-find-out-if-911-calls-on-your-android-phone-might-fail/), [XDA-Developers](https://www.xda-developers.com/avoid-android-emergency-calling-bug-this-app/), [Xataka Android](https://www.xatakandroid.com/aplicaciones-android/descubre-tu-movil-puede-bloquearse-llamando-a-emergencias-esta-app-te-dice), [Ars Technica](https://arstechnica.com/gadgets/2022/01/google-fixes-nightmare-android-bug-that-stopped-user-from-calling-911/).
Check out the project's amazing landing page at [paad.linuxct.space](https://paad.linuxct.space/).
## Background
This application exists because malicious or just improperly programmed applications can, intentionally or not, block your device from the ability to call emergency numbers. If you are in such a situation, this app helps you to find the culprit – which you then can uninstall (or disable).
For the exact details on the vulnerability (why this happens, how it was discovered, fixes timeline, ...), please check the article by Mishaal Rahman [here](https://medium.com/@mmrahman123/how-a-bug-in-android-and-microsoft-teams-could-have-caused-this-users-911-call-to-fail-6525f9ba5e63).
## About permissions
This application requires two call management permissions, [Manifest.permission.READ_PHONE_STATE](https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE) and [Manifest.permission.READ_PHONE_NUMBERS](https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_NUMBERS).
READ_PHONE_STATE is used in all supported Android versions, whereas READ_PHONE_NUMBERS is requested on Android 12 and onwards exclusively. This is because on Android, in order to read which applications are adding PhoneAccounts to Android's TelecomManager, these permissions are necessary.
No permission is (ab)used to log, collect or process any personally identifiable user information.
## Download
Click here to download the latest version
## Application usage
The application is very simple, and contains 2 components:
- A message at the top of the device, explaining if the application detected a possible abuse of this functionality which may cause issues while attempting to call Emergency Services.
- A list of the applications that have registered a Phone Account in your device, usually including your own SIM Cards, Google Duo, Teams, among others. Alongside each app, the number of accounts is displayed to facilitate the identification of the malfunctioning/hijacking application.
Check this video if you have doubts on how to interpret this data:
(Thanks to Explaining Android for the video)## Screenshots
Permissions necessary for the app to work
Case where Teams added 4 PhoneAccounts to TelecomManager
The app flags this as abnormal behaviour
Case without any abnormal app behaviour## Build
You can use Android Studio to build the application, or you can build it by using the CLI.
Navigate to the folder where the source code is located:
```cd /path/where/you/downloaded/PhoneAccountDetector/```Then, check that Gradle runs properly by executing:
For Linux/MacOS: `./gradlew tasks`
For Windows: `gradlew tasks`You can now build the application in release or debug flavor:
`./gradlew assemble`After it's done building, you will now need to sign the resulting APK by using apksigner, or jarsigner. Here's an example:
```apksigner sign --ks /path/to/example.keystore --ks-pass pass:"EXAMPLEPASSWORD" --v1-signing-enabled true --v2-signing-enabled true --verity-enabled true *.apk```