Skip to content
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

[feature] Add support for Android App Bundle #1129

Closed
bagipro opened this issue Mar 5, 2021 · 3 comments
Closed

[feature] Add support for Android App Bundle #1129

bagipro opened this issue Mar 5, 2021 · 3 comments

Comments

@bagipro
Copy link
Collaborator

bagipro commented Mar 5, 2021

Describe your idea:
Android App Bundle (.aab) is an official formal for Android apps. It's a container with default contents + configs for different devices (such as screen resolution)
image

Decompiler works well for sources, but not for resources (that are not decompiled at all)
image
image

@bagipro
Copy link
Collaborator Author

bagipro commented Mar 5, 2021

@bagipro
Copy link
Collaborator Author

bagipro commented Mar 6, 2021

I've discovered that all data can be deserialized using com.android.aapt.Resources.XmlNode.parseFrom(byte[]) method. Looking for a better way to convert it to raw XML and integrate it into Jadx

skylot added a commit that referenced this issue Mar 8, 2021
* Implement proto parse
* fix code formatting
* fix tests with empty input
* revert not needed code style changes
* Implement parse of resources.pb for AAB

Co-authored-by: bagipro <bugi@MacBook-Pro-2.local>
Co-authored-by: Skylot <skylot@gmail.com>
@bagipro bagipro closed this as completed Mar 8, 2021
@jpstotz
Copy link
Collaborator

jpstotz commented Mar 9, 2021

When I use the latest version from master and open the Android app bundle linked in this issue I am getting in the log the following Exception:

ERROR - Failed to parse '.arsc' file
jadx.core.utils.exceptions.JadxException: Error decode: base/resources.pb
	at jadx.api.ResourcesLoader.decodeStream(ResourcesLoader.java:78)
	at jadx.core.dex.nodes.RootNode.loadResources(RootNode.java:153)
	at jadx.api.JadxDecompiler.load(JadxDecompiler.java:107)
	at jadx.gui.JadxWrapper.openFile(JadxWrapper.java:49)
	at jadx.gui.ui.MainWindow.lambda$open$0(MainWindow.java:384)
	at jadx.gui.jobs.BackgroundExecutor$TaskWorker.doInBackground(BackgroundExecutor.java:100)
	at jadx.gui.jobs.BackgroundExecutor$TaskWorker.doInBackground(BackgroundExecutor.java:77)
	at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
	at jadx.gui.jobs.BackgroundExecutor.lambda$execute$0(BackgroundExecutor.java:41)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.IOException: Not a table chunk, expected: 0x2, actual: 0xe612, offset: 0x2
	at jadx.core.xmlgen.ParserStream.throwException(ParserStream.java:118)
	at jadx.core.xmlgen.ParserStream.checkInt16(ParserStream.java:110)
	at jadx.core.xmlgen.ResTableParser.decodeTableChunk(ResTableParser.java:105)
	at jadx.core.xmlgen.ResTableParser.decode(ResTableParser.java:81)
	at jadx.core.dex.nodes.RootNode.lambda$loadResources$4(RootNode.java:155)
	at jadx.api.ResourcesLoader.decodeStream(ResourcesLoader.java:73)
	... 13 common frames omitted

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

No branches or pull requests

2 participants