LinuxCommandLibrary

apkeep

Manage automatically installed packages on Android

TLDR

Download an APK file to the specified directory

$ apkeep --app [com.example.application] [path/to/directory]
copy

List all available versions for download
$ apkeep --app [com.example.application] --list-versions [path/to/directory]
copy

Specify a store to download from
$ apkeep --app [com.example.application] --download-source [apk-pure|google-play|f-droid|huawei-app-gallery] [path/to/directory]
copy

SYNOPSIS

apkeep [OPTIONS] APP_ID_OR_URL

PARAMETERS

-o , --output
    Specify the directory where the downloaded APK should be saved.

-v , --version
    Download a specific version of the application by its version code.

-a , --arch
    Filter APKs by CPU architecture (e.g., armeabi-v7a, arm64-v8a).
Can be specified multiple times.

-c , --country
    Specify the country code (e.g., us, de) for geo-restricted content.

-L , --lang
    Specify the language code (e.g., en, de) for localization.

-p , --proxy
    Use an HTTP/SOCKS proxy for the download.

-s, --split-apks
    Download split APKs if available, which are common for modern apps.

-x, --extract-apks
    Extract the base APK from a downloaded bundle of split APKs.

-k , --key
    Use a Google account key file for authentication, necessary for
paid or region-restricted apps.

-u , --user-agent
    Specify a custom User-Agent string for requests.

-d, --download-data
    Attempt to download associated OBB (opaque binary blob) data files
along with the APK.

-D , --device
    Specify a specific device ID to simulate for the download.

--help
    Display a help message and exit.

--version
    Show version information and exit.

DESCRIPTION

apkeep is a powerful command-line utility written in
Rust that enables users to download Android Application Packages (APKs)
directly from the Google Play Store. It bypasses the need for an Android
device or a Google account for many free applications, making it ideal for
archival purposes, installing apps on devices without Google Play Services,
or accessing geo-restricted content. It supports downloading specific app
versions, filtering by architecture, country, and language. apkeep
achieves this by simulating Google Play API requests, providing a
convenient way to acquire APK files for analysis, preservation, or offline
installation.

CAVEATS

apkeep relies on simulating Google Play API interactions.
Changes to Google's API may occasionally break its functionality.
While many free apps can be downloaded without authentication,
paid applications, region-locked content, or certain restricted
updates may require a valid Google account key file (
often obtained via tools like gplaycli's login process).
Always be mindful of Google's Terms of Service when using
such tools.

AUTHENTICATION

For certain downloads (e.g., paid apps, region-restricted apps,
or specific app updates), apkeep requires a Google account
key file. This file, typically named key.proto,
contains authentication credentials. It can often be generated
using other Google Play-related command-line tools that
handle the initial login process.

APP ID OR URL

The APP_ID_OR_URL argument can either be the package name
(e.g., com.example.app) or a full Google Play Store URL
(e.g., https://play.google.com/store/apps/details?id=com.example.app).
apkeep automatically parses the ID from the URL.

HISTORY

Developed in
Rust, apkeep emerged as a modern, efficient, and robust
command-line solution for downloading APKs directly from Google Play.
It addresses the common need for users to acquire specific app versions,
access apps outside of geo-restrictions, or maintain an archive
of applications independent of a physical device. Its design
focuses on reliability and ease of use, providing a
streamlined alternative to more complex methods or relying on
third-party APK mirrors.

SEE ALSO

curl(1), wget(1), adb(1)

Copied to clipboard