I want the application that I bypass using frida to be permanent and to run in this code without running frida
Example Command:
frida -U -f com.xxxxxxx.package -l root.js
I wanted to use apk patcher tool but it doesn't work
I want the application that I bypass using frida to be permanent and to run in this code without running frida
Example Command:
frida -U -f com.xxxxxxx.package -l root.js
I wanted to use apk patcher tool but it doesn't work
Copyright © 2021 Jogjafile Inc.
In every Frida release you will find libraries called "Frida Gadget" which is effectively Frida not as executable but as a library which can be embedded into an app. Together with the frida gadget library (e.g.
frida-gadget-16.1.4-android-arm64.so) you can embed a configuration file and a Frida JavaScript file that will be executed on the app the library is running in.You can rename the frida gadget library e.g. to
libfrida-gadget.soand place it in the app directory/lib/arm64-v8a/within the APK file.Embedding Frida gadget library into an app allows to modify the app at run-time even on un-rooted devices.
For integrating frida gadget library you have to make minor modifications to the smali code of the app: at some point you have to load the frida gadget library (preferably early in the app start process). To modify the APK my recommendation is to use
apktoolwith the option to not decompile resources as resources often causes problems:apktool d --no-res apkfile.apk.The code to be added
The common points for adding this code is in the
clinitmethod of the main activity (seeAndroidManifest.xml) or the application class (the class that extendsandroid.app.Application). If there is noclinitmethod in those classes you can add it: