From 29ec3b9e3f0c8f425aaf90589f4693ca2bf90e37 Mon Sep 17 00:00:00 2001 From: Iddo Date: Wed, 23 May 2018 10:57:31 +0300 Subject: [PATCH] install frida server --- install_frida_server.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 install_frida_server.sh diff --git a/install_frida_server.sh b/install_frida_server.sh new file mode 100644 index 0000000..dfa506a --- /dev/null +++ b/install_frida_server.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Download latest frida-server, extract, push & run on android device/emulator +# adb 1.0.32, jq 1.5, xz 5.1, wget 1.17.1 +# sudo apt install wget jq xz + +# PARCH = phone architecture +# if oneliner [[ == "armeabi-v7a" ]] is a dirty fix because frida's release for armeabi-v7a is just "arm" + +# TODO fix adb root which does not work on phones, only emulators, use `adb shell su` instead + +PARCH=`adb shell getprop ro.product.cpu.abi`;\ +[[ "${PARCH}" == "armeabi-v7a" ]] && PARCH="arm";\ +wget -q -O - https://api.github.com/repos/frida/frida/releases \ +| jq '.[0] | .assets[] | select(.browser_download_url | match("server(.*?)android-'${PARCH}'*\\.xz")).browser_download_url' \ +| xargs wget -q --show-progress $1 \ +&& unxz frida-server* \ +&& adb root \ +&& adb push frida-server* /data/local/tmp/frida-server \ +&& adb shell "chmod 755 /data/local/tmp/frida-server" \ +&& adb shell "/data/local/tmp/frida-server &"