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 declaring public resource [...] for included package miui #719

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

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 609 created by dconnolly.au on 2014-03-05T03:46:00.000Z:

What steps will reproduce the problem?

  1. Build MIUI using PatchROM
  2. Decompile AntiSpam.apk (resources only)
  3. Attempt to recompile without any modification

What is the expected output? What do you see instead?
Expected a built APK, get this error log instead:
E:\XtreamerMIUI\Xtreamer_Q-MIUI_4.2.28.14064\system\app\AntiSpam.\res\values\public.xml:148: error: Error declaring public resource id/number for included package miui
E:\Xtreamer
MIUI\Xtreamer_Q-MIUI_4.2.28.14064\system\app\AntiSpam.\res\values\public.xml:152: error: Error declaring public resource id/root for included package miui
E:\XtreamerMIUI\Xtreamer_Q-MIUI_4.2.28.14064\system\app\AntiSpam.\res\values\public.xml:165: error: Error declaring public resource id/subtitle for included package miui
E:\Xtreamer
MIUI\Xtreamer_Q-MIUI_4.2.28.14064\system\app\AntiSpam.\res\values\public.xml:176: error: Public entry identifier 0x7f0b001c entry index is larger than available symbols (index 28, total symbols 28).
E:\XtreamerMIUI\Xtreamer_Q-MIUI_4.2.28.14064\system\app\AntiSpam.\res\values\public.xml:176: error: Public symbol id/edit_mode_delete declared here is not defined.
E:\Xtreamer
MIUI\Xtreamer_Q-MIUI_4.2.28.14064\system\app\AntiSpam.\res\values\public.xml:178: error: Public entry identifier 0x7f0b001e entry index is larger than available symbols (index 30, total symbols 28).
E:\XtreamerMIUI\Xtreamer_Q-MIUI_4.2.28.14064\system\app\AntiSpam.\res\values\public.xml:178: error: Public symbol id/keyword_edit_mode_delete declared here is not defined.
E:\Xtreamer
MIUI\Xtreamer_Q-MIUI_4.2.28.14064\system\app\AntiSpam.\res\values\public.xml:177: error: Public entry identifier 0x7f0b001d entry index is larger than available symbols (index 29, total symbols 28).
E:\Xtreamer~MIUI\Xtreamer_Q-MIUI_4.2.28.14064\system\app\AntiSpam.\res\values\public.xml:177: error: Public symbol id/keyword_edit_mode_edit declared here is not defined.

What version of the product are you using? On what operating system?
APKTool 2.0 Beta 9 on Windows (with JRE 1.7)

Please provide any additional information below.
All relevant frameworks are correctly installed. Antispam.apk is a renamed package labelled "miui". Just incase you can't reproduce I've attached the APK. Thanks for your review.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by dconnolly.au on 2014-03-05T03:52:56.000Z:

Forgot to mention that Linux has the same result.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by dconnolly.au on 2014-03-05T03:52:56.000Z:

Forgot to mention that Linux has the same result.

@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-03-05T15:59:15.000Z:

Is this from the v6 (4.4) miui rom?

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by connor.tumbleson on 2014-03-05T15:59:15.000Z:

Is this from the v6 (4.4) miui rom?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by dconnolly.au on 2014-03-05T23:09:07.000Z:

Nah, just the latest v5 ROM. MTK (4.2) branch so maybe it's different to the others. The previous AntiSpam MIUI's could recompile fine though, seems it was recently turned into a stub-like app.

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by dconnolly.au on 2014-03-05T23:09:07.000Z:

Nah, just the latest v5 ROM. MTK (4.2) branch so maybe it's different to the others. The previous AntiSpam MIUI's could recompile fine though, seems it was recently turned into a stub-like app.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by dconnolly.au on 2014-03-05T23:20:51.000Z:

It had changed to this new APK in 4.2.21 it seems, see https://github.com/MiCode/patchrom_miui/tree/jellybean42-mtk/XHDPI/system/app

Looking at the AAPT sources, I guessed it's to do with the renamed manifest (looking at status_t ResourceTable::addPublic) - but I've no idea how to deal with it. I confirmed it by changing the package name from "miui" to "com.miui.antispam" in manifest, it compiled fine then but obviously that's dirty.

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by dconnolly.au on 2014-03-05T23:20:51.000Z:

It had changed to this new APK in 4.2.21 it seems, see https://github.com/MiCode/patchrom_miui/tree/jellybean42-mtk/XHDPI/system/app

Looking at the AAPT sources, I guessed it's to do with the renamed manifest (looking at status_t ResourceTable::addPublic) - but I've no idea how to deal with it. I confirmed it by changing the package name from "miui" to "com.miui.antispam" in manifest, it compiled fine then but obviously that's dirty.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by dconnolly.au on 2014-03-06T01:13:39.000Z:

Sorry for the triple post, but by "dirty" I mean the recompiled APK after renaming appears to work fine. So I guess this is just a case of the renamed-manifest fix being not quite ready.

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by dconnolly.au on 2014-03-06T01:13:39.000Z:

Sorry for the triple post, but by "dirty" I mean the recompiled APK after renaming appears to work fine. So I guess this is just a case of the renamed-manifest fix being not quite ready.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by klekanger on 2014-03-06T15:55:30.000Z:

I have the same issue with MIUI v6 SystemUI Changing package name works for that as well (but ofc you have to change package name to "com.android.systemui").

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by klekanger on 2014-03-06T15:55:30.000Z:

I have the same issue with MIUI v6 SystemUI Changing package name works for that as well (but ofc you have to change package name to "com.android.systemui").

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by connor.tumbleson on 2014-03-06T15:58:32.000Z:

I have a fix. Testing with another MIUI member.

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by connor.tumbleson on 2014-03-06T15:58:32.000Z:

I have a fix. Testing with another MIUI member.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by connor.tumbleson on 2014-03-06T16:19:03.000Z:

I need a link to a ROM that has this problem. I could not duplicate with the 4.4 flo rom I had.

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by connor.tumbleson on 2014-03-06T16:19:03.000Z:

I need a link to a ROM that has this problem. I could not duplicate with the 4.4 flo rom I had.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #9 originally posted by dconnolly.au on 2014-03-07T03:46:34.000Z:

Roger that, I'm uploading a 4.2.28 PatchROM build for one of our MT6589 devices at the moment - it'll be a few hours. About half of the packages since 4.2.21 have this new behavior, but as klekan... mentioned I just sed the package name in manifest to its original for now, no problems whatsoever.

Owner

iBotPeaches commented Mar 18, 2015

Comment #9 originally posted by dconnolly.au on 2014-03-07T03:46:34.000Z:

Roger that, I'm uploading a 4.2.28 PatchROM build for one of our MT6589 devices at the moment - it'll be a few hours. About half of the packages since 4.2.21 have this new behavior, but as klekan... mentioned I just sed the package name in manifest to its original for now, no problems whatsoever.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #10 originally posted by dconnolly.au on 2014-03-07T05:51:09.000Z:

Oh duh, the firmware I'm uploading has the packages renamed - that won't help. I'm not too keen on uploading a whole ~500MB ZIP file again so here is a smaller ZIP of just the framework APK's; along with AntiSpam.apk attached in OP this should be enough? http://www.mediafire.com/download/c3xdraenldj7dil/frameworks.zip

Owner

iBotPeaches commented Mar 18, 2015

Comment #10 originally posted by dconnolly.au on 2014-03-07T05:51:09.000Z:

Oh duh, the firmware I'm uploading has the packages renamed - that won't help. I'm not too keen on uploading a whole ~500MB ZIP file again so here is a smaller ZIP of just the framework APK's; along with AntiSpam.apk attached in OP this should be enough? http://www.mediafire.com/download/c3xdraenldj7dil/frameworks.zip

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #11 originally posted by connor.tumbleson on 2014-03-07T15:53:56.000Z:

This'll work thank you.

Owner

iBotPeaches commented Mar 18, 2015

Comment #11 originally posted by connor.tumbleson on 2014-03-07T15:53:56.000Z:

This'll work thank you.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #12 originally posted by connor.tumbleson on 2014-03-07T20:04:18.000Z:

This patch I believe fixes it, but we also moved a variable around. Which will require me to test in more details against other renamed packages (htc and android).

If it passes. This will get merged.

Owner

iBotPeaches commented Mar 18, 2015

Comment #12 originally posted by connor.tumbleson on 2014-03-07T20:04:18.000Z:

This patch I believe fixes it, but we also moved a variable around. Which will require me to test in more details against other renamed packages (htc and android).

If it passes. This will get merged.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #13 originally posted by dconnolly.au on 2014-03-08T07:40:43.000Z:

Not a problem, it's easy to work around this particular case so take your time ensuring there's no regression. Cheers!

Owner

iBotPeaches commented Mar 18, 2015

Comment #13 originally posted by dconnolly.au on 2014-03-08T07:40:43.000Z:

Not a problem, it's easy to work around this particular case so take your time ensuring there's no regression. Cheers!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #14 originally posted by connor.tumbleson on 2014-03-09T22:48:30.000Z:

1e3b66f

It worked. Should be good now.

Owner

iBotPeaches commented Mar 18, 2015

Comment #14 originally posted by connor.tumbleson on 2014-03-09T22:48:30.000Z:

1e3b66f

It worked. Should be good now.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #15 originally posted by indiant75 on 2014-05-31T17:24:53.000Z:

In lewa it is the same error on files with rename.

Owner

iBotPeaches commented Mar 18, 2015

Comment #15 originally posted by indiant75 on 2014-05-31T17:24:53.000Z:

In lewa it is the same error on files with rename.

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