<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# API Reference — Auditing Mobile App Permissions

## aapt (Android)
```bash
aapt dump permissions target.apk         # List permissions
aapt dump badging target.apk             # Package info + permissions
aapt dump xmltree target.apk AndroidManifest.xml  # Full manifest
```

## androguard
```bash
androguard permissions target.apk        # Permission listing
androguard analyze target.apk            # Interactive shell
```

## codesign (iOS)
```bash
codesign -d --entitlements - App.app     # Extract entitlements
codesign -d -vvvv App.app                # Verify signature
```

## ldid (iOS, jailbroken)
```bash
ldid -e AppBinary                        # Extract entitlements
ldid -S entitlements.xml AppBinary       # Sign with entitlements
```

## Android Permission Groups
| Group | Permissions |
|-------|-------------|
| CAMERA | CAMERA |
| MICROPHONE | RECORD_AUDIO |
| LOCATION | ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION, ACCESS_BACKGROUND_LOCATION |
| CONTACTS | READ_CONTACTS, WRITE_CONTACTS, GET_ACCOUNTS |
| PHONE | READ_PHONE_STATE, CALL_PHONE, READ_CALL_LOG |
| SMS | READ_SMS, SEND_SMS, RECEIVE_SMS, RECEIVE_MMS |
| STORAGE | READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE |
| SENSORS | BODY_SENSORS |

## iOS Privacy Keys (Info.plist)
| Key | Capability |
|-----|-----------|
| NSCameraUsageDescription | Camera |
| NSMicrophoneUsageDescription | Microphone |
| NSLocationWhenInUseUsageDescription | Location (foreground) |
| NSLocationAlwaysUsageDescription | Location (background) |
| NSContactsUsageDescription | Contacts |
| NSPhotoLibraryUsageDescription | Photo library |
| NSCalendarsUsageDescription | Calendar |
| NSFaceIDUsageDescription | Face ID |
