Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject-apk.sh not working on linux #9

Closed
brij2001 opened this issue Oct 13, 2020 · 2 comments
Closed

Inject-apk.sh not working on linux #9

brij2001 opened this issue Oct 13, 2020 · 2 comments

Comments

@brij2001
Copy link

I have downloaded a clean game .apk and the .apk from release section.
The script runs using bash but no output apk is found. I have tried changing directories but the output apk is nowhere to be found.
Terminal LOG:

br@ubuntu:~/Downloads/ImpostorModmenu-main$ bash inject-apk.sh 
APK=/home/br/Downloads/ImpostorModmenu-main/amongus.apk
MOD_APK=/home/br/Downloads/ImpostorModmenu-main/Impostorv1.2-devilx86.apk
OUTPUT=/home/br/Downloads/ImpostorModmenu-main/trail.apk
KEYSTORE=/home/br/keystore/ImpostorMenu.keystore
WDIR=/tmp/tmp.WjfoP8dJHZ


[+] Copying files

[+] Decompiling Impostorv1.2-devilx86.apk file
I: Using Apktool 2.4.1 on Impostorv1.2-devilx86.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/br/.local/share/apktool/framework/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...

[+] Decompiling amongus.apk file
I: Using Apktool 2.4.1 on amongus.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/br/.local/share/apktool/framework/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...

[+] Copying libraries
[+] Copying assets
[+] Copying smali files
[+] Injecting startup code
[+] Diffing code modifications:
116a117,118
>     invoke-static \{p0\}, Lcom\/devilx86\/modmenu\/MenuMain;->initModMenu(Landroid\/content\/Context;)V
> 

[+] Updating Manifest
[+] Diffing Manifest modifications:
10a11
>     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"\/>
14a16
>         <service android:name="com.devilx86.modmenu.MenuService" android:enabled="true" android:exported="false"\/>
38c40
< </manifest>
\ No newline at end of file
---
> </manifest>

[+] Baksmaling apk to /home/br/Downloads/ImpostorModmenu-main/trail.apk
I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,18] Error for input '\': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,22] Error for input '\': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,30] Error for input '\': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,31] Error for input '/': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,40] Error for input '\': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,41] Error for input '/': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,32] mismatched input 'devilx86' expecting OPEN_PAREN
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,49] Error for input '\': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,50] Error for input '/': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,59] Error for input ';': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,82] Error for input '\': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,83] Error for input '/': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,91] Error for input '\': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,92] Error for input '/': Invalid text
amongus/smali/com/unity3d/player/UnityPlayerActivity.smali[117,100] Error for input ';': Invalid text
Could not smali file: com/unity3d/player/UnityPlayerActivity.smali

[+] Unsigned APK Created: /home/br/Downloads/ImpostorModmenu-main/trail.apk
[+] Removed /tmp/tmp.WjfoP8dJHZ
@Devilx86
Copy link
Owner

Devilx86 commented Oct 13, 2020

Looks like you are running from linux and a couple of unnecessary \ were injected in UnityPlayerActivity.smali. Find and replace all \/ in the inject-apk.sh script with just /. Then try running the script again.

@brij2001
Copy link
Author

Looks like you are running from linux and a couple of unnecessary \ were injected in UnityPlayerActivity.smali. Find and replace all \/ in the inject-apk.sh script with just /. Then try running the script again.

done. Thanks for the reply.

@Devilx86 Devilx86 changed the title No output apk. Inject-apk.sh not working on linux Oct 13, 2020
@Devilx86 Devilx86 mentioned this issue Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants