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.

[BUG]Unable to install Android 12 L Beta 2 framework-res.apk

See original GitHub issue

Information

  1. Apktool Version (apktool -version) - 2.4.1 or 2.6.0, I guess it doesn’t matter…
  2. Operating System (Mac, Linux, Windows) - Windows (using Power Shell)
  3. APK From? (Playstore, ROM, Other) - redfin Android 12 L Beta 2 official firmware

Stacktrace/Logcat

Exception in thread “main” brut.androlib.AndrolibException: Invalid chunk type: expected=0x00000200, got=0x00000206 at brut.androlib.res.decoder.ARSCDecoder.checkChunkType(ARSCDecoder.java:542) at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:88) at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:82) at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48) at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40) at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:872) at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:854) at brut.androlib.Androlib.installFramework(Androlib.java:707) at brut.apktool.Main.cmdInstallFramework(Main.java:269) at brut.apktool.Main.main(Main.java:82)

Steps to Reproduce

  1. ‘java -jar .\apktool_2.6.0.jar if .\framework-res.apk’

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? N/A
  2. If you are trying to install a modified apk, did you resign it? N/A
  3. Are you using the latest apktool version? Yes.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
iBotPeachescommented, Mar 28, 2022

I’ve merged updates to aapt2/aapt for these new properties. Still have:

  • Adopt those ASRC changes into viable format to re-use/re-parse during compilation

Remaining

1reaction
iBotPeachescommented, Mar 13, 2022

Need to add support for <staging-public-group-final> which will really only be in AOSP apps as they build against future SDKs, but can easily reassign resources once API stabilizes.

          <public type="attr" name="finalized_res" id="0x01010001"/>
         <public type="attr" name="staged_s_res" id="0x01010002"/>
         <public type="attr" name="staged_s2_res" id="0x01010003"/>
         <public type="string" name="staged_s_string" id="0x01020000"/>
         <!-- S staged attributes (support staged resources in the same type id) -->
         <staging-public-group-final type="attr" first-id="0x01010050">
           <public name="staged_s_res" />
         </staging-public-group-final>
         <staging-public-group-final type="string" first-id="0x01fd0080">
           <public name="staged_s_string" />
         </staging-public-group-final>
         <!-- SV2 staged attributes (support staged resources in a separate type id) -->
         <staging-public-group-final type="attr" first-id="0x01ff0049">
           <public name="staged_s2_res" />
         </staging-public-group-final>
         <!-- T staged attributes (support staged resources in multiple separate type ids) -->
         <staging-public-group type="attr" first-id="0x01fe0063">
           <public name="staged_t_res" />
         </staging-public-group>

We also have 2 new types for overlay and policy.

<overlayable>
   <!-- Any overlay on the product_services, vendor, or product partition can overlay the value of
  @string/overlayable3 -->
   <policy type="product_services|vendor|product">
       <item type="string" name="overlayable3" />
   </policy>
</overlayable>

So working on issue-2740 branch and just going to skip all data to get disassembling working again, then slowly add support for the types.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am unable to install android 12 beta 2 update [190817180]
Tried updating from Beta 1 to Beta 2 on Pixel 3a : 12 times via OTA and 2 times ... beta 2 and...
Read more >
[UTIL][NOV 24, 2022] Apktool - Tool for reverse engineering ...
Executing command: java.exe -jar "C:\APK Easy Tool v1.59.2 ... [BUG]Unable to install Android 12 L Beta 2 framework-res.apk · Issue #2740 ...
Read more >
Get 12L - Android Developers
Set up a 12L virtual device. Resizable emulator. Get 12L on a partner device; Get 12L on a Google Pixel device. Flash or...
Read more >
Android 12 Beta 2 Update - Android Developers Blog
To test your app for compatibility, install the published version from Google Play or other source onto a device or emulator running Android...
Read more >
Beta 2 update for 12L! : r/android_beta - Reddit
12L Beta 2 is available today on supported Pixel devices and the Android Emulator, and coming in the days ahead to the Lenovo...
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