ax / apk.sh

apk.sh makes reverse engineering Android apps easier, automating some repetitive tasks like pulling, decoding, rebuilding and patching an APK.
GNU General Public License v3.0
3.34k stars 189 forks source link

script.js into APK #37

Closed mbakgun closed 5 months ago

mbakgun commented 5 months ago

Request : Integrate script.js into APK without adb push

Details : Hi, thank you for the script, I am currently using the following commands to patch an APK and run a script:

adb push script.js /data/local/tmp

./apk.sh patch <apk_name> --arch arm --gadget-conf <config.json>

adb install file.gadget.apk

I would like to know if it is possible to integrate script.js directly into the APK without using adb push, and then execute it. According to this link, it seems feasible. Could you please provide(if possible) guidance on how to achieve this using apk.sh?

Thank you!

ax commented 5 months ago

Hi @mbakgun. Yeah you can pass a config.json that fit your needs! From Frida docs: A supported configuration keys is path: string specifying the filesystem path to the script to load. May also be a path relative to where the Gadget binary resides. What about putting the script in $APK_DIR/lib/$ARCH_DIR/?

mbakgun commented 5 months ago

Thanks 👍