LogoLogo
  • About Me
  • Notes
    • Android Pentesting
      • First Android App
      • ADB
      • The INTERNET Permission
      • Installing Certificate in User Store
      • Installing system certificates
      • Install system certificates on android 14
      • apktool (for patching and decompiling)
      • Advanced Network interception using VPN
      • DNS Spoofing and Transparent Proxy
      • HTTP Mock
      • APK
      • Static analysis
        • Getting APK from a Device
      • Case Study: A Weather App
      • Frida & Objection
      • Frida Scripts
        • Tracing Activities
        • Tracing Fragments
      • Frida Trace
      • SSL Validation Bypasses
Powered by GitBook
On this page
  • 1) Backup the existing system certificates to the user certs folder
  • 2) Create the in-memory mount on top of the system certs folder
  • 3) copy all system certs and our user cert into the tmpfs system certs folder
  • 4) Fix any permissions & selinux context labels

Was this helpful?

  1. Notes
  2. Android Pentesting

Installing system certificates

PreviousInstalling Certificate in User StoreNextInstall system certificates on android 14

Last updated 2 days ago

Was this helpful?

  • Due to default rules, most apps only support “system” certificates.

  • To install our certificates in system store we need a rooted android device.

  • First install certificate as a regular user certificate.

  • Then ensure that you are root (adb -s <emulator_name> root).

    • To see the emulator name use adb devices

  • Then do adb -s <emulator_name> shell

1) Backup the existing system certificates to the user certs folder

cp /system/etc/security/cacerts/* /data/misc/user/0/cacerts-added/

2) Create the in-memory mount on top of the system certs folder

mount -t tmpfs tmpfs /system/etc/security/cacerts

3) copy all system certs and our user cert into the tmpfs system certs folder

cp /data/misc/user/0/cacerts-added/* /system/etc/security/cacerts/

4) Fix any permissions & selinux context labels

chown root:root /system/etc/security/cacerts/*
chmod 644 /system/etc/security/cacerts/*
chcon u:object_r:system_file:s0 /system/etc/security/cacerts/*

network security config