Skip to content

Create comprehensive inventory of Android apps installed on your phone with Google Play Store integration via ADB

License

Notifications You must be signed in to change notification settings

akora/android-app-inventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android App Inventory

A powerful Python tool to create a comprehensive inventory of all installed Android applications on your device via ADB, with Google Play Store integration to get real app names and descriptions.

Features

  • Complete App Discovery: Inventory all installed packages from Android devices
  • Smart Filtering: Separate 3rd party apps from system apps automatically
  • Google Play Store Integration: Get real app names and descriptions from the Play Store
  • Multiple Output Formats: Generate both table format and simple lists
  • Intelligent Caching: Avoid duplicate API requests for better performance
  • Rate Limiting: Respectful API usage with built-in delays
  • Fallback Logic: Generic name extraction when Play Store lookup fails
  • Cross-Platform: Works on macOS, Linux, and Windows

Prerequisites

1. Install ADB (Android Debug Bridge) on macOS

Option 1: Using Homebrew (Recommended)

# Install Homebrew if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Android Platform Tools (includes ADB)
brew install android-platform-tools

Option 2: Manual Installation

  1. Download Android SDK Platform Tools from Google's official site

  2. Extract the downloaded zip file

  3. Add the platform-tools directory to your PATH:

    echo 'export PATH="$PATH:/path/to/platform-tools"' >> ~/.zshrc
    source ~/.zshrc

Verify ADB Installation

adb --version

2. Enable USB Debugging on Your Android Device

  1. Go to SettingsAbout Phone
  2. Tap Build Number 7 times to enable Developer Options
  3. Go to SettingsDeveloper Options
  4. Enable USB Debugging
  5. Connect your device via USB cable
  6. Accept the debugging authorization prompt on your device

3. Python Requirements

  • Python 3.7 or higher
  • requests library for Google Play Store integration

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/android-app-inventory.git
    cd android-app-inventory
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install requests

Usage

Basic Usage

  1. Connect your Android device via USB with USB debugging enabled

  2. Verify ADB connection:

    adb devices
  3. Run the extractor:

    python android_app_extractor.py

Advanced Usage

Disable Google Play Store Integration

from android_app_extractor import AndroidAppExtractor

# Initialize without Play Store API
extractor = AndroidAppExtractor(use_play_store_api=False)

Extract Only 3rd Party Apps

The script automatically separates 3rd party apps from system apps and generates separate files for each.

Output Files

The script generates two markdown files:

  1. third_party_android_apps.md - Only user-installed 3rd party applications with Play Store names
  2. all_android_apps.md - Complete list of all installed packages (including system apps)

Each file contains:

  • Summary with total app count
  • Table format with app names and package identifiers
  • Simple list of app names for easy copying

Example Output

# 3rd Party Android Apps (with Play Store names)

Total apps: 108

| App Name | Package Name |
|----------|-------------|
| 1Password: Password Manager | com.onepassword.android |
| Airbnb | com.airbnb.android |
| Spotify: Music and Podcasts | com.spotify.music |

## App Names List

1Password: Password Manager
Airbnb
Spotify: Music and Podcasts

How It Works

  1. ADB Connection: Connects to your Android device via ADB
  2. Package Discovery: Uses adb shell pm list packages to get all installed packages
  3. System App Filtering: Intelligently filters out system apps using package name patterns
  4. Play Store Lookup: Queries Google Play Store web interface for real app names
  5. Smart Caching: Caches API results to avoid duplicate requests
  6. Fallback Processing: Uses generic name extraction for apps not found on Play Store
  7. Output Generation: Creates formatted markdown files with results

Configuration

Rate Limiting

The script includes built-in rate limiting:

  • Maximum 50 Play Store API requests per run
  • 1-second delay every 5 requests
  • Automatic caching to avoid duplicate requests

System Package Filtering

The script automatically identifies system packages using these patterns:

  • com.android.*
  • com.google.android.*
  • com.samsung.*
  • OEM-specific packages (Xiaomi, Huawei, etc.)

Troubleshooting

ADB Issues

# Check if device is connected
adb devices

# Restart ADB server if needed
adb kill-server
adb start-server

# Check if USB debugging is enabled
adb shell getprop ro.debuggable

Permission Issues

  • Ensure USB debugging is enabled on your device
  • Accept the debugging authorization prompt
  • Try a different USB cable or port

Network Issues

  • The script will fall back to generic name extraction if Play Store requests fail
  • Check your internet connection for Play Store integration

Privacy and Security

  • No Personal Data Stored: The script only extracts package names and public app information
  • Local Processing: All processing happens locally on your machine
  • Respectful API Usage: Includes rate limiting and caching to be respectful to Google's servers
  • No Authentication Required: Uses public Play Store web interface (no API keys needed)

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Google for providing ADB and the Android platform
  • The Android developer community for documentation and best practices
  • Contributors and users who help improve this tool

Changelog

v1.0.0

  • Initial release with basic ADB integration
  • Google Play Store API integration
  • Smart system app filtering
  • Multiple output formats
  • Rate limiting and caching
  • Comprehensive error handling

About

Create comprehensive inventory of Android apps installed on your phone with Google Play Store integration via ADB

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages