-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[BUG] apktool d xx.apk generate minSdkVersion and targetSdkVersion as empty '', but aapt not #3592
Comments
May you run |
It look like it has value but is "" as string type, strange...
|
Interesting. So I guess if its broken to the point that aapt cannot understand it, then its either actually empty or aapt can't handle it. You can repeat that test with aapt2, I think its the same parameters. You just might need to do |
Well thats an interesting find. I don't actually know what AOSP reads by default, but that chunk you are looking at is the So struct ResXMLTree_attribute
{
// Namespace of this attribute.
struct ResStringPool_ref ns;
// Name of this attribute.
struct ResStringPool_ref name;
// The original raw string value of this attribute.
struct ResStringPool_ref rawValue;
// Processesd typed value of this attribute.
struct Res_value typedValue;
}; If raw value is empty - it must mean AOSP only reads the typed value (data). I'll have to revisit that logic there, but it would really help to share the application so I can debug it directly. You can work with me in private and I won't share it anywhere if thats something you are open to. |
🆗, already send by twitter. |
Obtained thanks. |
Yeah this doesn't make any sense. I confirmed
The next item is also misspelled.
I don't know what is occurring here yet, but it almost seems like some resources are densely packed and others are not. |
Thank you for your time. Maybe it's not a normal apk. And I tried something like this: huhuang03@cdf6751 as a temporary workaround. I'm not familar to |
I believe its a new form of obfuscation Apktool needs to support. Apktool has a flaw presently that it reads AXML by knowing the amount attributes and taking the assumed size of each attribute and spreading into an array set. Then based on the shift/index we know how to read them. What I believe is happening here is smaller packed attributes are included. This causes everything to shift from what we expect and leads to some attributes disassembly improperly. Been traveling so haven't had as much time to dig into this. |
Information
apktool -version
) - 2.9.3java --version
) - 17.0.4Stacktrace/Logcat
Steps to Reproduce
apktool
apktool d xxx.apk, generate
apktool.yml
like this:But us
aapt dump badging xxx.apk |grep Version
can see the versionsFrameworks
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
)No
APK
If this APK can be freely shared, please upload/attach a link to it.
No
Questions to ask before submission
apktool d
,apktool b
without changing anything? Yes, still erorThe text was updated successfully, but these errors were encountered: