Missing attribute in string-array Tag #786

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

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 677 created by rohitrao666 on 2014-09-15T05:58:27.000Z:

Hello,
Can any one please confirm if this is a issue on the latest apk tool

What steps will reproduce the problem?

  1. ./apktool d ApkTool_Testapp.apk
  2. ./apktool b ApkTool_Testapp -o test.apk
  3. ApkTool_Testapp\res\values\arrays.xml does not have translatable="false" attribute

What is the expected output? What do you see instead?
expected arrays.xml -> <string-array name="problem" translatable="false">
Output arrays.xml -> <string-array name="problem">

What version of the product are you using? On what operating system?
Os: Linux
Installed: https://code.google.com/p/android-apktool/downloads/list
used: apktool_2.0.0rc1.jar

Thank you :)

@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-09-18T16:53:47.000Z:

I was under the impression that translatable="false" was stripped by AAPT during compile, so it wouldn't even be available to find during decode.

I believe this still stands. I will double check.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by connor.tumbleson on 2014-09-18T16:53:47.000Z:

I was under the impression that translatable="false" was stripped by AAPT during compile, so it wouldn't even be available to find during decode.

I believe this still stands. I will double check.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by rohitrao666 on 2014-09-19T04:07:39.000Z:

Thanks for the information,

The content of the apk is something like this

category=temp%temp%arbit

if i try to rebuild the apk after decoding this error comes up:

ApkTool_Testapp/res/values/arrays.xml:4:
error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?

after manually adding translatable="false" attribute in xml file, i am able to rebuild the apk from the decoded apk.

http://stackoverflow.com/questions/4414389/android-xml-percent-symbol

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by rohitrao666 on 2014-09-19T04:07:39.000Z:

Thanks for the information,

The content of the apk is something like this

category=temp%temp%arbit

if i try to rebuild the apk after decoding this error comes up:

ApkTool_Testapp/res/values/arrays.xml:4:
error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?

after manually adding translatable="false" attribute in xml file, i am able to rebuild the apk from the decoded apk.

http://stackoverflow.com/questions/4414389/android-xml-percent-symbol

@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-09-19T11:56:59.000Z:

That error has nothing to do with translatable. Its because the % sign isn't escaped which means it thinks its a variable substitution instead of a literal % sign.

formatted="false" would fix this as well. Or double %%.

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by connor.tumbleson on 2014-09-19T11:56:59.000Z:

That error has nothing to do with translatable. Its because the % sign isn't escaped which means it thinks its a variable substitution instead of a literal % sign.

formatted="false" would fix this as well. Or double %%.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by rohitrao666 on 2014-09-20T13:39:45.000Z:

I understand,

such apks cannot be recompiled without manually modifying the xml files,
problem is, i cannot modify the xmls manually.

would you recommend that i modify my local apktool to add % in this usecase.

Thanks for your help :)

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by rohitrao666 on 2014-09-20T13:39:45.000Z:

I understand,

such apks cannot be recompiled without manually modifying the xml files,
problem is, i cannot modify the xmls manually.

would you recommend that i modify my local apktool to add % in this usecase.

Thanks for your help :)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by connor.tumbleson on 2014-09-22T23:29:42.000Z:

#91

I believe that fixes it. Passed it off to someone to double check. Will merge into mainline tomorrow if all checks out.

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by connor.tumbleson on 2014-09-22T23:29:42.000Z:

#91

I believe that fixes it. Passed it off to someone to double check. Will merge into mainline tomorrow if all checks out.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by connor.tumbleson on 2014-09-23T12:50:23.000Z:

cf443b1

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by connor.tumbleson on 2014-09-23T12:50:23.000Z:

cf443b1

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