-
-
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] Detection of "--no-res" fails for assembly for split apks. #3364
Comments
As you mention the icon becoming corrupted. I believe this may resolve it - #3360 I'm testing this out on another ticket and no longer seeing icon corruption - just haven't built mac binaries yet, so its not mergable. |
Same error using
|
aapt isn't invoked at that point. I'd hold till next release for the moment unless you want to really mess with bleeding edge builds and fresh aapts. |
I can test it pretty quickly so I don't see why not - if you have an |
All master commits trigger a build as an attachment https://github.com/iBotPeaches/Apktool/actions/runs/6391710817 It's bleeding edge master builds. |
Same problem:
|
Okay to the backlog it goes. Sorry! Will focus after I finish up 2.9.x, thanks for testing. |
I'm having similar issue as the OP, having installed the latest framework-res.apk (matches with compileSdkVersion) pulled from emulator and it could not build, without any changes.
|
I also tried using the build from
|
@vaibhavpandeyvpz docker container is only a few days old. Haven't worked out all the kinks with it, then Android 14 dropped. So it's on the back burner. |
I just tried taking out the
|
I wanted to replace the package name so for me a blind string replace in all files was enough. 7z x -ssc -o".\unpacked" "target.apk"
pushd ".\unpacked"
for /r %%f in (*.*) do (
rem replace ascii and utf16le of string in all files
binaryreplace -s com.android.chrome -r com.android.chr117 -f %%f
)
for /r %%f in (*.dex) do (
rem file[12..32] = sha1(file[32..])
rem file[8..12] = adler32(file[12..])
dexchecksum %%f
)
popd
7z a -tzip -ssc -mx=0 "1_unsigned.apk" ".\unpacked\*"
zipalign -p -f 4 "1_unsigned.apk" "2_zipaligned.apk"
apksigner sign --key ".\key" --cert ".\cert" --out "3_signed.apk" "2_zipaligned.apk" Note: You must have case sensitivity flag enabled for the directory you're extracting the APK to. fsutil file setCaseSensitiveInfo .\unpacked enable |
That’s clever. I’ll check this soon and let you know if it works for me too. Me too only want to change the package name. Thanks! |
Oh, these are for Command Prompt. I'm on Mac 😬 |
Took a look at this again - the warning during compilation is because there is no No good way to resolve because the flag is used during disassembly and not persisted towards assembly. Relying on the For the crash issues - I can't investigate. Don't have anything rooted at the moment to support reinstalling system apps like Chrome. So I'll place this into backlog. |
Information
apktool -version
) - 2.8.1java --version
) - openjdk 17.0.7 2023-04-18Stacktrace/Logcat
When unpacking a split APK without any resource disassembly, the packing fails:
The APK gets built and can be installed:
The app appears inside the launcher without an icon:
If you run it, it crashes with this stacktrace from logcat:
Steps to Reproduce
apktool d --no-res --no-src split_chrome.apk -f -o _unpacked
apktool b --use-aapt2 _unpacked -o _packed\1_unsigned.apk
I'm trying these steps on 3 files of a base APK and splits.
The error only happens when building an extracted split_ apk:
APK
If this APK can be freely shared, please upload/attach a link to it.
chrome_117.zip
Questions to ask before submission
apktool d
,apktool b
without changing anything? YesThe text was updated successfully, but these errors were encountered: