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

Error unpacking com.android.webview for Lollipop #815

Closed
iBotPeaches opened this Issue Mar 18, 2015 · 3 comments

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 706 created by JaVallet on 2014-11-18T18:16:48.000Z:

What steps will reproduce the problem?

  1. Create and launch Lollipop AVD
  2. Pull APK : adb pull /system/app/webview/webview.apk
  3. Pull FW resources : adb pull /system/framework/framework-res.apk
  4. Install FW : apktool if --frame-path ./ framework-res.apk
  5. Use apktool to decode APK : apktool d --no-src --no-res --frame-path ./ webview.apk

What is the expected output? What do you see instead?
APK should unpack.

I see exception:
I: Using Apktool 2.0.0-ce2088-SNAPSHOT on webview.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Invalid value type: 7
at brut.androlib.res.data.value.ResValueFactory.factory(ResValueFactory.java:62)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:211)
at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:199)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:169)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:157)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:125)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:606)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:75)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:67)
at brut.androlib.Androlib.getResTable(Androlib.java:61)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:206)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)

What version of the product are you using? On what operating system?
2.0.0-ce2088-SNAPSHOT (master), Ubuntu 14.04 64-bit

Please provide any additional information below.
806435d75ba2d15f8de6f78c963a93ce webview.apk

@iBotPeaches iBotPeaches self-assigned this Mar 18, 2015

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by connor.tumbleson on 2014-11-18T20:04:12.000Z:

Issue 707 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by connor.tumbleson on 2014-11-18T20:04:12.000Z:

Issue 707 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by connor.tumbleson on 2014-11-19T23:25:18.000Z:

Pretty much same as # 653 in terms of that Lollipop is involved.

There is a new enum it looks like "TYPE_DYNAMIC_REFERENCE" w/ value of 7. It looks like it holds a dynamic ResTable reference which needs to be followed then used like a regular ole TYPE_REFERENCE (0x01).

So need to follow reference. Get the table entry, then return it. That should solve it.

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by connor.tumbleson on 2014-11-19T23:25:18.000Z:

Pretty much same as # 653 in terms of that Lollipop is involved.

There is a new enum it looks like "TYPE_DYNAMIC_REFERENCE" w/ value of 7. It looks like it holds a dynamic ResTable reference which needs to be followed then used like a regular ole TYPE_REFERENCE (0x01).

So need to follow reference. Get the table entry, then return it. That should solve it.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by connor.tumbleson on 2014-11-21T17:45:49.000Z:

Fixed. 554591a

Binary to follow in weekend.

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by connor.tumbleson on 2014-11-21T17:45:49.000Z:

Fixed. 554591a

Binary to follow in weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment