Closed auermich93 closed 1 year ago
Do you have an older framework by chance?
➜ 3401 apktool d F-Droid.apk -f -s
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I: Using Apktool v2.9.0-8-34a69708-SNAPSHOT on F-Droid.apk
I: Loading resource table...
I: Decoding file-resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Decoding values */* XMLs...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Copying raw classes.dex file...
I: Copying raw classes2.dex file...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory
➜ 3401 apktool b F-Droid
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
I: Using Apktool v2.9.0-8-34a69708-SNAPSHOT
I: Copying F-Droid classes.dex file...
I: Copying F-Droid classes2.dex file...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/kotlin)
I: Copying libs... (/META-INF/services)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk into: F-Droid/dist/F-Droid.apk
➜ 3401
Perhaps what I need to build is detection of the internal framework in use to detect when one doesn't match the internal one we use.
Guess I missed that you did clear your framework, but so did I and I don't replicate. I don't even have the shared frameworks, so not sure what is going on here.
I confirmed I downloaded the file you listed. Closing as not replicating.
@iBotPeaches I am pretty sure you downloaded the 'FDroid' application itself not the app I supposed to, the correct link is a few lines below. Here is the direct download link to the latest version that still exposes the same behaviour: https://f-droid.org/repo/org.totschnig.myexpenses_655.apk Sorry for the inconvenience!
Okay now I see - this is an existing issue we have. The resource is not on 0x7F which we expect for all internal/private resources. This is because it points to a split.
I imagine when the manifest is being parsed on device - the split is there to resolve. I wrote about this in detail in this ticket: https://github.com/iBotPeaches/Apktool/issues/2514#issuecomment-787460352
Its the same root cause - we'll have adjust parser to support many packages to read and reference.
➜ 3401 aapt2 d resources org.totschnig.myexpenses_655.apk| grep -i '79040000'
resource 0x79040000 xml/splits0
However, since this example is much easier to investigate than the other issue (Twitter). I've copied this application into my folder for issue 2514.
So I'll close for that ticket, but I'm using this APK for it.
But why apktool 2.7.0 succeeds?
Something odd with the android:value
vs android:resource
. Unsure how that would have changed at the moment. I'll take another look.
Looks like Apktool is correct now (in my eyes) now. We corrected attribute resolution (https://github.com/iBotPeaches/Apktool/pull/3123/files) to prefer the res map over the string block, which lead to the resource/value mismatch.
Now that is correct (resource) that property is more strict and since we generated an invalid reference it failed. Prior as value it was treated as the scalar it was.
So it does look like my original comment was right - a duplicate now of an existing issue #2514
Information
apktool -version
) - 2.9.0java --version
) - 15.0.2Steps to Reproduce
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. https://f-droid.org/de/packages/org.totschnig.myexpenses/
Questions to ask before submission
apktool d
,apktool b
without changing anything? YESYou can re-assemble the APK using apktool 2.9.0 as long as you decoded it with apktool 2.7.0. The latest version seems to struggle with this entry:
<meta-data android:name="com.android.vending.splits" android:value="@2063859712"/>
Side note: The app remains functional when being re-assembled with apktool 2.7.0.