question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

APK crashes on (2.4.0, 2.3.4, 2.3.3, 2.3.2), works fine using 2.3.1

See original GitHub issue

Information

  1. Apktool 2.4.0
  2. Windows (x64)
  3. APK from ApkMirror/Playstore/etc. (all produce the same issue)

Stacktrace/Logcat

E/MessageQueue-JNI(3648): Exception in MessageQueue callback: handleReceiveCallback
E/MessageQueue-JNI(3648): android.content.res.Resources$NotFoundException: File res/raw/voice_note_start.wav from drawable resource ID #0x7f0f000c
E/MessageQueue-JNI(3648): 	at android.content.res.Resources.openRawResourceFd(Resources.java:1315)
E/MessageQueue-JNI(3648): 	at android.media.SoundPool.load(SoundPool.java:245)

Steps to Reproduce

  1. apktool d (with apktool 2.4.0)
  2. apktool b (with apktool 2.4.0)
  3. sign, install the apk.
  4. Open the app and try to record a voice note.

Notes:

  • I tried building using apktool versions: 2.3.2, 2.3.3, 2.3.4. ALL produce the same crash
  • The strange thing is, using version 2.3.1 to build, the app works fine and doesn’t crash.

Frameworks

Apktool default.

APK

If this APK can be freely shared, please upload/attach a link to it. https://www.apkmirror.com/apk/whatsapp-inc/whatsapp/whatsapp-2-19-34-release/whatsapp-messenger-2-19-34-2-android-apk-download/

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? Yes
  3. Are you using the latest apktool version? Yes

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
iBotPeachescommented, Mar 10, 2019

@YoBasha Reverting that commit returns aapt1 to the process during the build of applications, which if you are using an aapt2 build is not feasible. We cannot revert that, so need to identify why Apktool is not moving files to correct location.

2reactions
YoBashacommented, Mar 10, 2019

UPDATE 1

100% confirmed, the crash is caused by this commit a8bdad628a58e65313521b809d8df60f3f86d40e.

I have built 2.4.1 (snapshot) with reverting the above commit, and the app APK no longer crashes!

You can do the tests yourself. (@B88B can you confirm the fix?) apktool-cli-all-issue2036.zip

@iBotPeaches Any thoughts on why zipPackage() is causing this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native Android app crashes immediately after start
My app crashes immediately after startup in release mode but it's working fine when using it in debug mode. List of things that...
Read more >
WorkManager - Android Developers
The WorkManager API makes it easy to schedule deferrable, asynchronous tasks that must be run reliably. These APIs let you create a task...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug:1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to ... crashes with signal 10 (bus error)" status:RESOLVED resolution:OBSOLETE ...
Read more >
Emulator crashes after attempting to send fake location fix via ...
The issue seems to be fixed only for the avds created using the sdk tools. In my case, where I am using a...
Read more >
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter aacgain 1.8 AAC‑supporting version of mp3gain aalib 1.4rc5 Portable ASCII art graphics library aamath 0.3 Renders mathematical expressions as ASCII art
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found