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

ResFileDecoder is incorrectly parsing attributes for some APKs #27

Open
Fuzion24 opened this issue May 30, 2014 · 1 comment
Open

ResFileDecoder is incorrectly parsing attributes for some APKs #27

Fuzion24 opened this issue May 30, 2014 · 1 comment

Comments

@Fuzion24
Copy link

As you can see below some of the attribute names are missing:

    <application ="@android:style/Theme.NoTitleBar" ="@com.margenelampson85.MusicBillboardTop100:string/app_name" ="@com.margenelampson85.MusicBillboardTop100:drawable/icon" ="orientation" ="true" ="true">
        <activity ="ZyAlUlOyFBtFPeJaoSTaHxcbnjdosjFs" />
        <activity ="gDCrrbXTuDJymJMfDNMaQOnZRCsaiKIo" />
        <activity ="kGFmEzGhiftSSyvFlwvZJvQmNRuxAJLL" />
        <activity ="rXTQEaZJuSBTnheKCdtXUGLMajnKUYZm" />
        <activity ="TdzUdjoVKhjRmTuqnslTeYUnlEijDufx" />
        <activity ="FrBOGwzNGrazMqMfBGjzAwLeFVIZafxG" />
        <activity ="YvdvVRbmRBZhneJTnjuKUypPhpQnNwKM" />

The above is the result of this decoding the following apk:
00fc1fb656155bde989ae0391041de5a41185e27 (I just named it as a .png, so github will let me upload it; it's a .zip)

This is a valid APK that installs.

Jeb also seems to handle it properly (although the attributes are not namespaced properly):

    <application allowBackup="true" configChanges="orientation" hardwareAccelerated="true" icon="@drawable/icon" label="@string/app_name" theme="@android:style/Theme.NoTitleBar">
        <activity name="ZyAlUlOyFBtFPeJaoSTaHxcbnjdosjFs" />
        <activity name="gDCrrbXTuDJymJMfDNMaQOnZRCsaiKIo" />
        <activity name="kGFmEzGhiftSSyvFlwvZJvQmNRuxAJLL" />
        <activity name="rXTQEaZJuSBTnheKCdtXUGLMajnKUYZm" />
        <activity name="TdzUdjoVKhjRmTuqnslTeYUnlEijDufx" />
        <activity name="FrBOGwzNGrazMqMfBGjzAwLeFVIZafxG" />
        <activity name="YvdvVRbmRBZhneJTnjuKUypPhpQnNwKM" />
        <activity name="NhNEjZvKZDYdnSrwmcrLsgSHXgvuQhmE" />
        <activity name="ZiyZEjYiicvauSnwjZPqSwnYSHOZUspT" />
        <activity name="OSgXRpfTKgoDuKMtzclWqjOYYOSrdMTR" />
        <activity name="aPwpVqZbECwppPPsbLIlAGjpzBtlvlQv" />
@iBotPeaches
Copy link
Contributor

I believe its a duplicate of this: http://code.google.com/p/android-apktool/issues/detail?id=512

I wonder if JEB still uses Apktool internally, or if its modified so much that it doesn't match upstream apktool anymore.

Point being, I started investigating this. When it pulls the length from the next attribute it gets 0. The length it wants is +- 4 bytes from the location it is currently reading at. This only happens on certain APKs so not sure where the mistake is occurring, but I'm getting closer to fixing this.

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

No branches or pull requests

2 participants