├── LICENSE ├── termux-pm3.sh └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Gerhard Klostermeier 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /termux-pm3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2019 Gerhard Klostermeier 4 | # Usage: bash termux-pm3.sh [ignore-warnings] [PLATFORM=PM3OTHER] 5 | # 6 | 7 | 8 | function compile { 9 | if [ "$1" == "ignore-warnings" ]; then 10 | # Allow warnings (needed on Android 5.x, 7.x, not needed on 8.x). 11 | echo "[*] Removing the -Werror flag from Makefiles" 12 | sed -i 's/-Werror //g' client/Makefile 13 | sed -i 's/-Werror //g' Makefile.host 14 | # Make the proxmark3 client. 15 | echo "[*] Compiling the client" 16 | make client $2 17 | else 18 | # Make the proxmark3 client. 19 | echo "[*] Compiling the client" 20 | make client $1 21 | fi 22 | } 23 | 24 | 25 | # Main function. 26 | if [ "$1" == "install" ]; then 27 | # Update Termux packages. 28 | echo "[*] Udate packages" 29 | pkg update -y 30 | 31 | # Install proxmark3 client build dependencies. 32 | echo "[*] Install dependencies" 33 | pkg install -y git make clang 34 | 35 | # Get the proxmark3 RDV4 repository. 36 | echo "[*] Get the Proxmark3 RDV4 repository" 37 | git clone https://github.com/RfidResearchGroup/proxmark3.git 38 | cd proxmark3 39 | git restore * 40 | compile $2 $3 41 | elif [ "$1" == "run" ]; then 42 | # Run Proxmark3 client (needs root for now). 43 | echo "[*] Run the Proxmark3 RDV4 client as root on /dev/ttyACM0" 44 | su -c 'cd proxmark3/client && ./proxmark3 -p /dev/ttyACM0' 45 | elif [ "$1" == "update" ]; then 46 | echo "[*] Update the Proxmark3 RDV4 repository" 47 | cd proxmark3 48 | git restore * 49 | git pull 50 | compile $2 $3 51 | else 52 | echo "Usage: bash termux-pm3.sh [ignore-warnings] [PLATFORM=PM3OTHER]" 53 | echo "Running the Proxmark3 client requires root (to access /dev/ttyACM0)." 54 | echo "Hint: There are plans in the Termux community to support USB-OTG and Bluetooth devices." \ 55 | "Maybe then it will be possible to do this without root." 56 | fi -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Termux Proxmark3 Client 2 | ======================= 3 | 4 | This script helps you to compile and run the [Proxmark3](http://www.proxmark.org/) client on Android. No special 5 | software is needed, just the [Termux](https://termux.com/) app. 6 | 7 | The script will install the [RDV4 version](https://github.com/RfidResearchGroup/proxmark3) of the client. 8 | 9 | 10 | 11 | Requirements 12 | ------------ 13 | 14 | * Android device with root access and USB-OTG support 15 | * USB-OTG adapter 16 | * [Termux app](https://termux.com/) 17 | * Proxmark3 with the latest (git master branch) [RDV4 firmware](https://github.com/RfidResearchGroup/proxmark3) 18 | flashed on it 19 | 20 | Root access is needed for now. There are plans in the Termux community to support USB-OTG and Bluetooth devices. 21 | It should be possible to drop the root requirement once Termux has USB-OTG and/or Bluetooth support. 22 | 23 | 24 | 25 | Installation 26 | ------------ 27 | 28 | Run the following commands in Termux: 29 | ``` 30 | pkg install git 31 | git clone https://github.com/ikarus23/termux-pm3.git 32 | cd termux-pm3 33 | bash termux-pm3.sh install 34 | ``` 35 | There are some issues with Android 5.x and 7.x (and maybe other) which stops the compiling process. 36 | Try the following command, it might help: 37 | ``` 38 | bash termux-pm3-sh install ignore-warnings 39 | ``` 40 | If you don't have a Proxmark RDV4 you need to add the `PLATFORM=PM3OTHER` flag. You might also want to check out 41 | `PLATFORM=help`. 42 | ``` 43 | bash termux-pm3-sh install [ignore-warnings] PLATFORM=PM3OTHER 44 | ``` 45 | Another hint: Do not run this script from within `/sdcard`. This could lead to troubles regarding the 46 | permission to execute a binary. Just run it from within the Termux root (default) directory. 47 | 48 | 49 | 50 | Usage 51 | ----- 52 | 53 | Connect the Proxmark3 via USB-OTG to your Android device and run the following command from within the 54 | `termux-pm3` folder in Termux: 55 | ``` 56 | bash termux-pm3.sh run 57 | ``` 58 | To update the Proxmark3 client just run: 59 | ``` 60 | bash termux-pm3.sh update [ignore-warnings] [PLATFORM=PM3OTHER] 61 | ``` 62 | --------------------------------------------------------------------------------