Git Product home page Git Product logo

apkservinject's Introduction

ApkServInject

usage: java -jar ApkServInject.jar [-a APK] [-s SMALI]

 -a,--apk     APK file to inject smali
 -s,--smali   (smali) Service file to inject.
    _          _    ____                  ___        _           _   
   / \   _ __ | | _/ ___|  ___ _ ____   _|_ _|_ __  (_) ___  ___| |_ 
  / _ \ | '_ \| |/ \___ \ / _ | '__\ \ / /| || '_ \ | |/ _ \/ __| __|
 / ___ \| |_) |   < ___) |  __| |   \ V / | || | | || |  __| (__| |_ 
/_/   \_| .__/|_|\_|____/ \___|_|    \_/ |___|_| |__/ |\___|\___|\__|
        |_|@orhun                               |__/               

ApkServInject - a tool for injecting (smali) service to Android apk files

usage: ApkServInject
-a,--apk     APK file to inject smali
-s,--smali   (smali) Service file to inject.

For additional info, see: http://github.com/orhun/ApkServInject

Test files found. Would you like to perform a test injection? [y/n]: 
y
[16:29:08] Starting...
[16:29:08] Decompiling APK with ApkTool...
S: WARNING: Could not write to (/home/k3/.local/share/apktool/framework), using /tmp instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path 
if the default storage directory is unavailable
[16:29:15] 
I: Using Apktool 2.3.3 on test.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /tmp/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

[16:29:15] Manifest file found: AndroidManifest.xml
[16:29:15] Trying to find EntryPoint smali...
[16:29:15] EntryPoint smali: com.test.testapp.MainActivity
[16:29:15] Changing manifest file...
[16:29:15] Moving and changing smali file...
[16:29:15] Permissions found: 
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.READ_EXTERNAL_STORAGE
android.permission.INTERNET

[16:29:15] Merging permissions...
[16:29:15] Permissions added to manifest.
[16:29:15] Changing EntryPoint smali...
[16:29:15] onCreate method found!
[16:29:15] EntryPoint smali changed.
[16:29:15] Building the APK...
S: WARNING: Could not write to (/home/k3/.local/share/apktool/framework), using /tmp instead...
S: Please be aware this is a volatile directory and frameworks could go missing, 
please utilize --frame-path if the default storage directory is unavailable
[16:29:23] 
I: Using Apktool 2.3.3
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...

[16:29:24] Signing...
[16:29:25] APK signed ~ done.

[16:29:25] New APK located at "/home/k3/t3mp/ApkServInject/test_x.apk"
[16:29:25] Clearing workspace...

This software is not working stable for every Android Package. (esp. for complex applications)

TODO(s)

  • Regex pattern should be fixed for xml parsing.
  • Smali edit part must be changed depending on Android Apps SDK version.
  • Finding EP other than onCreate method feature should be added.
  • Main Thread may be seperated to functions for more readable code, but not necessary.

License

GNU General Public License v3. (see gpl)

Copyright

Copyright (c) 2018-2023, orhun

apkservinject's People

Contributors

orhun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

apkservinject's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.