Apktool: No resource identifier found for attribute 'requestLegacyExternalStorage' in package 'android' whatsapp recompilation

Created on 10 Sep 2019  路  7Comments  路  Source: iBotPeaches/Apktool

I use apktool 2.4.1 on Linux, today I tried to decompile and recompile whatsapp latest beta from apk mirror, and recompilation fails with manifest error No resource identifier found for attribute 'requestLegacyExternalStorage' in package 'android'
it maybe related to android q.

All 7 comments

Relevant information: https://developer.android.com/training/data-storage/files/external-scoped#opt-out-of-scoped-storage

This is related to Android 10.

Looks like new attribute, will investigate.

Any updates?

I fixed the problem by installing android 10 framework-res.apk from my devices.
this is how i did it:

  1. Connect your device through adb connection using usb
  2. First you need to know where your framework-res.apk is, my OnePlus7Pro framework apk is located in /system/framework-res.apk
  3. Grab the apk by typing
    adb pull /system/framework-res.apk <path_to_your_computer>
  4. then install the framework in apktool by typing
apktool_2.4.1.jar if <path_to_grabbed_framework>
  1. Try to compile

Most devices has their framework apk path differents, so you can search by your own. and yes this grabbing framework apk requires no root as long as you know the framework apk location, /system/framework itself can be accessed without root so you know research your own!

But though that some framework actually located in root-needed directory.

Here is the framework-res.apk file from Android 10 emulator in case if you want it :)

https://drive.google.com/file/d/1NVYCc-29C39XSoDOTYBjivuSQzAQhD3A/view

remove AndroidManifest android:requestLegacyExternalStorage="true"

Was this page helpful?
0 / 5 - 0 ratings