Skip to main content

Install certificates to android system store

Project description

adb-install-cert (root required)

This script automatically detect android version and choose preffered way to install certificate to system store.

If you want manually install certificate, see my guide

Usage

After installation, you can plug your device and run:

adb-install-cert --cert ~/path/to/cert.pem

If certificate format detect incorrectly, pass it directly (only der and pem support):

adb-install-cert --cert ~/path/to/cert.crt --cert-format der

By default adb-install-cert automatically select installation mode, based on android version. If you want override it, pass --mode option (see --help or read technical description below for more information):

adb-install-cert --cert ~/path/to/cert.pem --mode temporary

If multiple devices present, you can specify one by serial:

adb-install-cert --cert ~/path/to/cert.pem --device-serial some-serial

As alternative, you can use environment variables, as described here:

ANDROID_SERIAL=emulator-5556 adb-install-cert --cert ~/path/to/cert.pem

Installation

pipx variant:

pipx install adb-install-cert

nix variant:

nix install github:sysraccoon/adb-install-cert

Technical Description

Before Android 10, permanent installation of a certificate is possible by remounting the root directory in read-write mode. These changes may require a device reboot.

Starting with Android 10, the root system is available in read-only mode. To install a certificate, the utility uses remounting /system/etc/security/cacerts directory in tmpfs with a preliminary copy of all existing certificates. After a reboot, the changes will be reset and the utility will need to be reused.

Starting with Android 14, all logic described before used, but also in order for the changes to take effect, the utility updates the state of running processes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adb_install_cert-0.2.2.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adb_install_cert-0.2.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file adb_install_cert-0.2.2.tar.gz.

File metadata

  • Download URL: adb_install_cert-0.2.2.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.7 Linux/6.11.0-26-generic

File hashes

Hashes for adb_install_cert-0.2.2.tar.gz
Algorithm Hash digest
SHA256 767256f889d709c4465264a793b4d719d19afde0c8d285cf9e4c1b3a9f4bb3ba
MD5 8be067ca26f1e30292e974851ab43f18
BLAKE2b-256 7808b065e72fd2d5df9b25e45b37d447f27a5790472385d5bbf0d5af6940d7aa

See more details on using hashes here.

File details

Details for the file adb_install_cert-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: adb_install_cert-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.7 Linux/6.11.0-26-generic

File hashes

Hashes for adb_install_cert-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 49c03f876d6cb0c6b119ae10b3ef03a5e8e7a1247f0d8710dab6c6e09dd04d78
MD5 4ca5c98523d732fd9360d424c87c54fa
BLAKE2b-256 cbe4685afab772133ab3785d43860f4f55bdaf279264636e9e362f2158042de3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page