iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
20.33k stars 3.59k forks source link

[BUG] Bug in APK Tool 2.10.0 --- Error: Failed Processing Manifest . Can you let me know how to resolve this ? #3716

Closed krajapraveen closed 2 weeks ago

krajapraveen commented 3 weeks ago

Hi @iBotPeaches

I am getting the apktool error while I am running the apktool b instagram -o insta.apk

Steps to reproduce

I have downloaded the Apktool 2.10.0 jar and also copied the content under the Wrapper Script. I have renamed apktool 2.10.0 jar file as apktool.jar and kept it on my Kali Linux desktop and also I have copied the content under Wrapper Script and kept it as apktool file on my desktop. I have moved both apktool.jar file and apktool script file to /usr/local/bin. Then I have set permissions for both apktool.jar file and apktool script file under usr/local/bin/ by running the command chmod + x and chmod +x . Then I came out of /usr/local/bin/.

Now under my working directory I have downloaded InstagramLite.apk file from APK Mirror website (https://www.apkmirror.com/). Then I ran apktool command like below:

apktool d InstagramLite.apk
I: Using Apktool 2.10.0 on InstagramLite.apk with 4 thread(s). I: Baksmaling classes.dex... I: Loading resource table... I: Decoding file-resources... I: Loading resource table from file: /root/.local/share/apktool/framework/1.apk I: Decoding values / XMLs... I: Decoding AndroidManifest.xml with resources... I: Regular manifest package... I: Copying assets and libs... I: Copying unknown files... I: Copying original files...

The above command ran successfully.

Then I ran the next command which is as below:

apktool b InstagramLite -o Insta.apk I: Using Apktool 2.10.0 with 4 thread(s). I: Checking whether sources has changed... I: Smaling smali folder into classes.dex... I: Checking whether resources has changed... I: Building resources...

error: attribute android:allowCrossUidActivitySwitchFromBelow not found. W: error: failed processing manifest. brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_127053384057741582066709420097402037563.tmp, link, -o, /tmp/APKTOOL13433259876210877250.tmp, --package-id, 127, --min-sdk-version, 26, --target-sdk-version, 34, --version-code, 655013490, --version-name, 430.0.0.4.109, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --no-compile-sdk-metadata, --warn-manifest-validation, -e, /tmp/APKTOOL2102829795819950640.tmp, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, --manifest, /home/kaliuser/Binding_APKs/arm64-v8a nodpi/InstagramLite/AndroidManifest.xml, /home/kaliuser/Binding_APKs/arm64-v8a nodpi/InstagramLite/build/resources.zip]

I am getting the above error which says Error: Failed Processing Manifest

Can you let me know how resolve this issue ?

Regards

Katta Raja Praveen

iBotPeaches commented 3 weeks ago

allowCrossUidActivitySwitchFromBelow looks like a new Android 15 attribute. I'm fairly sure this is added in our internal framework, but I haven't checked.

krajapraveen commented 2 weeks ago

allowCrossUidActivitySwitchFromBelow looks like a new Android 15 attribute. I'm fairly sure this is added in our internal framework, but I haven't checked.

Hi @iBotPeaches : Please check and let me know. If you are sure that this has been added in your internal system, can you provide me a way on how to resolve this ?

Regards

Katta Raja Praveen.

krajapraveen commented 2 weeks ago

allowCrossUidActivitySwitchFromBelow looks like a new Android 15 attribute. I'm fairly sure this is added in our internal framework, but I haven't checked.

Hi @iBotPeaches : Please check and let me know. If you are sure that this has been added in your internal system, can you provide me a way on how to resolve this ?

Regards

Katta Raja Praveen.

Hi @iBotPeaches : Is there any update on this ?

iBotPeaches commented 2 weeks ago

I see the resource in the latest framework Apktool delivered in last release.

    resource 0x010106a1 attr/allowCrossUidActivitySwitchFromBelow PUBLIC STAGED_ID=0x01bd0019

Make sure you've ran apktool empty-framework-dir and try again.