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

Not showing updated version even after updating to v2.5.0[BUG] #2508

Closed
A-Unix opened this issue Feb 12, 2021 · 7 comments
Closed

Not showing updated version even after updating to v2.5.0[BUG] #2508

A-Unix opened this issue Feb 12, 2021 · 7 comments

Comments

@A-Unix
Copy link

A-Unix commented Feb 12, 2021

Information

  1. Apktool Version (apktool -version) -2.5.0
  2. Operating System (Mac, Linux, Windows) -Linux
  3. APK From? (Playstore, ROM, Other) -Other

Stacktrace/Logcat

Include stacktrace here

Steps to Reproduce

  1. apktool

Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(.apks that live in /system/framework or /system/priv-app)

APK

If this APK can be freely shared, please upload/attach a link to it.

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? yes
  2. If you are trying to install a modified apk, did you resign it? no
  3. Are you using the latest apktool version? no, i installed apktool with cli and it installed v4.2.1 automatically, then i tried to upgrade it to v2.5.0 but even after following all steps as per instructions here it's still showing the version previously installed version!
    apktool
@A-Unix
Copy link
Author

A-Unix commented Feb 13, 2021

Thanks, but the issue has been resolved by rapid7... If you're also facing the same problem, please refer to this link_here.

@A-Unix A-Unix closed this as completed Feb 13, 2021
@A-Unix A-Unix reopened this Feb 13, 2021
@A-Unix
Copy link
Author

A-Unix commented Feb 13, 2021

I'm facing this new issue, please see the image below

apktool

@FoseFx
Copy link

FoseFx commented Feb 17, 2021

I stumbled upon the same error this issue helped me.

What does this error mean?
The dex format indexes methods using 16 bit unsigned integers, this means you can call methods in the range from 0-65535).
Your changes must have broken this limit.

How can I fix it?
The solution is simple. Just move the offending file to another smali_classes dir.
Example:
smali_classes3/com/acme/android/app/MainApplication.smali is causing the issue.
Simply move it to another (highest?) number, so for example to smali_classes10/com/acme/android/app/MainApplication.smali.

If this still does not work you either broke the limit again (this time in smali_classes10) or you choose the wrong file.

@iBotPeaches
Copy link
Owner

Too many things going on here.

➜  Desktop wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.5.0.jar
➜  Desktop java -jar apktool_2.5.0.jar --version
2.5.0

The latest binary is indeed the latest.


Not sure why kali/msf using dirty builds, my guess is a by-product of building themselves as part of the kali distribution mechanism. Non official builds use tags like -dirty which probably mess up naming. The parties who handle distribution would have to get in contact.


The next error is all over this tracker. You exceed amount of methods allowed in an unsigned short (65535). Use a different dex package or cut down the methods. Apktool can not automatically remap items to different packages.

@A-Unix
Copy link
Author

A-Unix commented Feb 18, 2021

@FoseFx Thanks man, i'll try this. @iBotPeaches Yeah, that's true(msf is using -dirty builds), but can you please contact the distribution parties yourself without waiting in hope that they'll contact you first to solve this problem fast? I'll reopen this issue if get any other error.

@A-Unix
Copy link
Author

A-Unix commented Feb 18, 2021

I stumbled upon the same error this issue helped me.

What does this error mean?
The dex format indexes methods using 16 bit unsigned integers, this means you can call methods in the range from 0-65535).
Your changes must have broken this limit.

How can I fix it?
The solution is simple. Just move the offending file to another smali_classes dir.
Example:
smali_classes3/com/acme/android/app/MainApplication.smali is causing the issue.
Simply move it to another (highest?) number, so for example to smali_classes10/com/acme/android/app/MainApplication.smali.

If this still does not work you either broke the limit again (this time in smali_classes10) or you choose the wrong file.

Yeah, man it worked but now, i'm facing this new issue:

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I: Using Apktool 2.5.0
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: /root/Desktop/AllTools/hackingapks/abc/AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersion' in package 'android'
W:
W: /root/Desktop/AllTools/hackingapks/abc/AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersionCodename' in package 'android'
W:
W: /root/Desktop/AllTools/hackingapks/abc/AndroidManifest.xml:43: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_128330269102555544485234835383785728219.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 10040, --version-name, 9.17.3.0, --no-version-vectors, -F, /tmp/APKTOOL5312404980335194899.tmp, -e, /tmp/APKTOOL4397052126719843409.tmp, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Desktop/AllTools/hackingapks/abc/res, -M, /root/Desktop/AllTools/hackingapks/abc/AndroidManifest.xml].

What is happening here @iBotPeaches , @FoseFx ?
Note that i've renamed the original apk's name to abc in this comment!

@A-Unix
Copy link
Author

A-Unix commented Feb 21, 2021

Yo, i got the solution... Refer this comment to all those who're facing the same problem i.e., getting errors while rebuilding the apk with apktool... So let's gets started asap...

  1. Go to this comment and see how to upgrade to latest version of apktool.

  2. Now install these packages using CLI(maybe terminal in your words xD): apt install kali-tools-reverse-engineering kali-tools-forensics -y (I found these packages here)

  3. Now follow this guide and you're good to go :)

Have fun :)

Here is my result:

apktool

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

3 participants