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

apktool 2.0.3 breaks HTC One M8 marshmallow framework.style #1123

Closed
lyapota opened this Issue Jan 4, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@lyapota

lyapota commented Jan 4, 2016

Recompiled with apktool 2.0.3 framework-res lost null pointed lines and AlertDialog get black background with black text.
correct styles decompiled with apktool 2.0.2

<style name="AlertDialog.Material" parent="@style/AlertDialog">
    <item name="fullDark">@null</item>
    <item name="topDark">@null</item>
    <item name="centerDark">@null</item>
    <item name="bottomDark">@null</item>
    <item name="fullBright">@null</item>
    <item name="topBright">@null</item>
    <item name="centerBright">@null</item>
    <item name="bottomBright">@null</item>
    <item name="bottomMedium">@null</item>
    <item name="centerMedium">@null</item>
    <item name="layout">@layout/alert_dialog_material</item>
    <item name="listLayout">@layout/select_dialog_material</item>
    <item name="multiChoiceItemLayout">@layout/select_dialog_multichoice_material</item>
    <item name="singleChoiceItemLayout">@layout/select_dialog_singlechoice_material</item>
    <item name="listItemLayout">@layout/select_dialog_item_material</item>
    <item name="progressLayout">@layout/progress_dialog_material</item>
    <item name="horizontalProgressLayout">@layout/alert_dialog_progress_material</item>
</style>

not correct styles decompiled with apktool 2.0.3

<style name="AlertDialog.Material" parent="@style/AlertDialog">
    <item name="layout">@layout/alert_dialog_material</item>
    <item name="listLayout">@layout/select_dialog_material</item>
    <item name="multiChoiceItemLayout">@layout/select_dialog_multichoice_material</item>
    <item name="singleChoiceItemLayout">@layout/select_dialog_singlechoice_material</item>
    <item name="listItemLayout">@layout/select_dialog_item_material</item>
    <item name="progressLayout">@layout/progress_dialog_material</item>
    <item name="horizontalProgressLayout">@layout/alert_dialog_progress_material</item>
</style>
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jan 4, 2016

Owner

Can I have the apk to investigate? I thought I patched @null correctly, but looks like I actually broke it.

Owner

iBotPeaches commented Jan 4, 2016

Can I have the apk to investigate? I thought I patched @null correctly, but looks like I actually broke it.

@lyapota

This comment has been minimized.

Show comment
Hide comment
@lyapota

lyapota Jan 5, 2016

Of course. Here original file. And after recompile it, we(HTC M8/M9 MM users) getting a litle broken new MM menu animation.Animation XML files recompiles correctly, but looks like we lost some attributies.
Anyway it other story...
framework-res.apk.zip
Thx...

lyapota commented Jan 5, 2016

Of course. Here original file. And after recompile it, we(HTC M8/M9 MM users) getting a litle broken new MM menu animation.Animation XML files recompiles correctly, but looks like we lost some attributies.
Anyway it other story...
framework-res.apk.zip
Thx...

@TeutonJon78

This comment has been minimized.

Show comment
Hide comment
@TeutonJon78

TeutonJon78 Jan 7, 2016

I had a similar problem on an iFive air. 2.0.2 unpacks/repacks correctly. 2.0.3 gives inverted dialogs.

I tested a bunch of different variants (APK Studio, apktool, 32/64-bit Java). 2.0.2 always worked, 2.0.3 always broke. Console output from the tool was the same regardless of apktool version.

Temp link with screenshot and apk: https://mega.nz/#F!VVFASDQa!jWixviqqwJMp3aiGloy98w

Edit: from styles.xml (so same problem)

2.0.2

 <style name="Widget.Material.SearchView.ActionBar" parent="@style/Widget.Material.SearchView">
        <item name="queryHint">@string/search_hint</item>
        <item name="queryBackground">@null</item>
        <item name="submitBackground">@null</item>
        <item name="searchHintIcon">@null</item>
 </style>
<style name="AlertDialog.Material" parent="@style/AlertDialog">
        <item name="fullDark">@null</item>
        <item name="topDark">@null</item>
        <item name="centerDark">@null</item>
        <item name="bottomDark">@null</item>
        <item name="fullBright">@null</item>
        <item name="topBright">@null</item>
        <item name="centerBright">@null</item>
        <item name="bottomBright">@null</item>
        <item name="bottomMedium">@null</item>
        <item name="centerMedium">@null</item>
        <item name="layout">@layout/alert_dialog_material</item>
        <item name="listLayout">@layout/select_dialog_material</item>
        <item name="multiChoiceItemLayout">@layout/select_dialog_multichoice_material</item>
        <item name="singleChoiceItemLayout">@layout/select_dialog_singlechoice_material</item>
        <item name="listItemLayout">@layout/select_dialog_item_material</item>
        <item name="progressLayout">@layout/progress_dialog_material</item>
        <item name="horizontalProgressLayout">@layout/alert_dialog_progress_material</item>
    </style>

2.0.3

<style name="Widget.Material.SearchView.ActionBar" parent="@style/Widget.Material.SearchView">
        <item name="queryHint">@string/search_hint</item>
</style>
...
<style name="AlertDialog.Material" parent="@style/AlertDialog">
        <item name="layout">@layout/alert_dialog_material</item>
        <item name="listLayout">@layout/select_dialog_material</item>
        <item name="multiChoiceItemLayout">@layout/select_dialog_multichoice_material</item>
        <item name="singleChoiceItemLayout">@layout/select_dialog_singlechoice_material</item>
        <item name="listItemLayout">@layout/select_dialog_item_material</item>
        <item name="progressLayout">@layout/progress_dialog_material</item>
        <item name="horizontalProgressLayout">@layout/alert_dialog_progress_material</item>
    </style>

TeutonJon78 commented Jan 7, 2016

I had a similar problem on an iFive air. 2.0.2 unpacks/repacks correctly. 2.0.3 gives inverted dialogs.

I tested a bunch of different variants (APK Studio, apktool, 32/64-bit Java). 2.0.2 always worked, 2.0.3 always broke. Console output from the tool was the same regardless of apktool version.

Temp link with screenshot and apk: https://mega.nz/#F!VVFASDQa!jWixviqqwJMp3aiGloy98w

Edit: from styles.xml (so same problem)

2.0.2

 <style name="Widget.Material.SearchView.ActionBar" parent="@style/Widget.Material.SearchView">
        <item name="queryHint">@string/search_hint</item>
        <item name="queryBackground">@null</item>
        <item name="submitBackground">@null</item>
        <item name="searchHintIcon">@null</item>
 </style>
<style name="AlertDialog.Material" parent="@style/AlertDialog">
        <item name="fullDark">@null</item>
        <item name="topDark">@null</item>
        <item name="centerDark">@null</item>
        <item name="bottomDark">@null</item>
        <item name="fullBright">@null</item>
        <item name="topBright">@null</item>
        <item name="centerBright">@null</item>
        <item name="bottomBright">@null</item>
        <item name="bottomMedium">@null</item>
        <item name="centerMedium">@null</item>
        <item name="layout">@layout/alert_dialog_material</item>
        <item name="listLayout">@layout/select_dialog_material</item>
        <item name="multiChoiceItemLayout">@layout/select_dialog_multichoice_material</item>
        <item name="singleChoiceItemLayout">@layout/select_dialog_singlechoice_material</item>
        <item name="listItemLayout">@layout/select_dialog_item_material</item>
        <item name="progressLayout">@layout/progress_dialog_material</item>
        <item name="horizontalProgressLayout">@layout/alert_dialog_progress_material</item>
    </style>

2.0.3

<style name="Widget.Material.SearchView.ActionBar" parent="@style/Widget.Material.SearchView">
        <item name="queryHint">@string/search_hint</item>
</style>
...
<style name="AlertDialog.Material" parent="@style/AlertDialog">
        <item name="layout">@layout/alert_dialog_material</item>
        <item name="listLayout">@layout/select_dialog_material</item>
        <item name="multiChoiceItemLayout">@layout/select_dialog_multichoice_material</item>
        <item name="singleChoiceItemLayout">@layout/select_dialog_singlechoice_material</item>
        <item name="listItemLayout">@layout/select_dialog_item_material</item>
        <item name="progressLayout">@layout/progress_dialog_material</item>
        <item name="horizontalProgressLayout">@layout/alert_dialog_progress_material</item>
    </style>
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jan 7, 2016

Owner

test

left = 2.0.3
right = dev

It looks like its fixed, all the @null values are back (which for this apk) was only one.

Owner

iBotPeaches commented Jan 7, 2016

test

left = 2.0.3
right = dev

It looks like its fixed, all the @null values are back (which for this apk) was only one.

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