iBotPeaches / Apktool

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

[BUG][build failed] attribute android:requiredSplitTypes not found #3726

Open joshuachenn opened 1 week ago

joshuachenn commented 1 week ago

Information

  1. 2.9.3/2.10.0 -
  2. Mac -
  3. APKPure -
  4. java version "1.8.0_271" -

I'm using xapk-to-apk to transfer xapk to apk of Photovoltaic Calculations_2.1.2_APKPure.xapk, but also shows that repacked failed, and i dig into it, found that in step apktool b failed. xapk-to-apk tool will produce middle product in .xpaktoapk directory in current directory, and then this tool will execute apktool b command, and failed.

While I going into .xapktoapk directory, and execute apktool b command by my self, it shows errors below.

Steps to Reproduce

➜  xapk-to-apk git:(development) ✗ python xapktoapk.py Photovoltaic\ Calculations_2.1.2_APKPure.xapk
➜  xapk-to-apk git:(development) ✗ cd .xapktoapk
➜  .xapktoapk git:(development) ✗ apktool b it.ettoregallina.calcolifotovoltaici 
I: Using Apktool 2.9.3
I: Checking whether resources has changed...
I: Building resources...
W: /Users/Tools/xapk-to-apk/.xapktoapk/it.ettoregallina.calcolifotovoltaici/AndroidManifest.xml:1: error: attribute android:requiredSplitTypes not found.
W: /Users/Tools/xapk-to-apk/.xapktoapk/it.ettoregallina.calcolifotovoltaici/AndroidManifest.xml:1: error: attribute android:splitTypes not found.
W: error: failed processing manifest.

APK

Photovoltaic Calculations_2.1.2_APKPure.xapk

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?:Not modified not resign
  3. Are you using the latest apktool version?:Yes, tried already
iBotPeaches commented 6 days ago

I'm not exactly sure why those attributes cannot be found. They look like a relic of building splits. I'm not confident yet, but I believe I'll have to update apktool to remove those attributes as it finds them.

Since Apktool cannot remake splits - it seems like right call.

joshuachenn commented 4 days ago

Yeah I guess so. cause xapktoapk tool will make xapk splits into apk, then it goes to make apktool b, this build command deals with no splits but as a whole package to pack apk. Looking forward to your updates. hope this will finally solve this problem!