Mitm addon for PCAPdroid
Go to file
emanuele-f 93ffb594ef Optionally request MANAGE_EXTERNAL_STORAGE for write access
Due to the scoped storage constraints, the only way to get a publicly
writable directory with a real, non-content-resolver-based, path is
via the MANAGE_EXTERNAL_STORAGE permission.

The mitm addon now allow the user to optionally request it. When
granted, user addons will be loaded directly from the public dir
without an additional copy.

Closes #16
2024-08-19 12:53:11 +02:00
app Optionally request MANAGE_EXTERNAL_STORAGE for write access 2024-08-19 12:53:11 +02:00
gradle/wrapper Update gradle 2023-06-04 17:16:12 +02:00
submodules Bump mitmproxy to 10.1.6+pcapdroid.1 2024-01-28 22:42:08 +01:00
.gitignore Initial support for mitmproxy 9.0.1 2023-03-24 22:12:30 +01:00
.gitmodules Initial support for mitmproxy 9.0.1 2023-03-24 22:12:30 +01:00
build.gradle Update Chaquopy to version 15.0.1 2024-06-28 11:57:10 +02:00
COPYING Initial commit 2022-02-13 00:20:03 +01:00
gradle.properties Update gradle 2023-06-04 17:16:12 +02:00
gradlew Initial commit 2022-02-13 00:20:03 +01:00
gradlew.bat Initial commit 2022-02-13 00:20:03 +01:00
make_dist.py Add build flavors to reduce apk size 2022-04-30 23:51:26 +02:00
README.md Add detailed build instructions 2024-06-28 12:19:34 +02:00
settings.gradle Move to open source chaquopy 2022-08-03 11:40:30 +02:00

PCAPdroid mitm addon

A PCAPdroid addon which uses mitmproxy to decrypt the TLS/SSL connections and show the decrypted data in the app.

The addon uses the open source framework chaquopy to bundle and run python modules. The native python modules are pre-built and installed from the chaquopy pip repository.

Build

The following build instructions work on a clean Ubuntu 24.04 LTS at the moment, but may get updated. Build on Windows is not currently supported.

  1. Install Java 17 and git
sudo apt install openjdk-17-jdk git

# should print "openjdk 17.x"
java --version
  1. Install python 3.10, which is required to correctly build with Chaquopy
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10 python3.10-distutils

# should print "Python 3.10.x"
python3.10 --version
  1. Clone the repo
git clone https://github.com/emanuele-f/PCAPdroid-mitm
cd PCAPdroid-mitm
git submodule update --init
  1. Install the Android SDK. These instructions assume you will work from the CLI, however you can do the same via Android Studio, which will make installing and managing SDK versions easier.
# 1. Grab the latest "Command line tools only" for linux from https://developer.android.com/studio,
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
unzip commandlinetools-linux-11076708_latest.zip

# 2. Set up the environment
export ANDROID_SDK_ROOT=~/Android
alias sdkmanager="cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT"
sdkmanager --update

# 3. Install the SDK
# android-34 corresponds to targetSdk in app/build.gradle
sdkmanager "platforms;android-34" "extras;google;m2repository" "extras;android;m2repository"
  1. Create keystore for signing
keytool -genkey -alias key0 -keyalg RSA -keystore keystore -storepass android -keypass android -dname "CN=Unknown, OU=Unknown, O=Unknown, C=Unknown"
  1. Build release
./gradlew assembleRelease

# The signed apks should be located under `./app/build/outputs/apk`
# find . -name "*.apk"