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

Apk crashes after rebuilding #333

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

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 222 created by mrjavum on 2011-10-03T02:50:46.000Z:

What steps will reproduce the problem?

  1. Decompress LenovoClock.apk (apktool.bat d LenovoClock.apk)
  2. Do nothing and compress it back (apktool.bat b LenovoClock)
  3. Replace resources.arsc in original apk
  4. Install on phone

What is the expected output? What do you see instead?
Expected working app, but it crashes when it tries to show popup.
I tried "adb logcat" and there is such error:
FATAL EXCEPTION: main
java.util.UnknownFormatConversionException: Conversion: $
at java.util.Formatter$FormatToken.unknownFormatConversionException(Formatter.java:1461)
at java.util.Formatter$FormatToken.checkFlags(Formatter.java:1398)
at java.util.Formatter.transform(Formatter.java:1504)
at java.util.Formatter.doFormat(Formatter.java:1132)
at java.util.Formatter.format(Formatter.java:1093)
at java.util.Formatter.format(Formatter.java:1062)
at java.lang.String.format(String.java:2208)
at java.lang.String.format(String.java:2182)
at com.lenovomobile.deskclock.SetAlarm.formatToast(SetAlarm.java:442)
at com.lenovomobile.deskclock.SetAlarm.popAlarmSetToast(SetAlarm.java:404)
at com.lenovomobile.deskclock.SetAlarm.popAlarmSetToast(SetAlarm.java:392)
at com.lenovomobile.deskclock.AlarmClock.updateIndicatorAndAlarm(AlarmClock.java:112)
at com.lenovomobile.deskclock.AlarmClock.access$100(AlarmClock.java:89)
at com.lenovomobile.deskclock.AlarmClock$AlarmTimeAdapter$1.onClick(AlarmClock.java:151)
at android.view.View.performClick(SourceFile:2535)
at android.view.View$PerformClick.run(SourceFile:9130)
at android.os.Handler.handleCallback(SourceFile:618)
at android.os.Handler.dispatchMessage(SourceFile:123)
at android.os.Looper.loop(SourceFile:329)
at android.app.ActivityThread.main(SourceFile:3820)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:538)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(SourceFile:901)
at com.android.internal.os.ZygoteInit.main(SourceFile:659)
at dalvik.system.NativeStart.main(Native Method)
Force finishing activity com.lenovomobile.deskclock/com.lenovomobile.clock.Clock

What version of the product are you using? On what operating system?
1.4.2 (SNAPSHOT 17/05/2011), Windows 7 64bit

Please provide any additional information below.
I rebuild about 50 apks for this phone, and everything was ok, except LenovoClock.apk.
Thanks in advance!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by mrjavum on 2011-10-03T04:32:31.000Z:

I tried v.1.3.3 from this thread: http://forum.xda-developers.com/showthread.php?t=1063055
and it works!
The problem is that 1.4.2 (and 1.4.1) decompiles the wrong parameters in /res/values/arrays.xml
the right string are:

This alarm is set for less than 1 minute from now.
This alarm is set for %1$s from now.
This alarm is set for %2$s from now.
This alarm is set for %1$s and %2$s from now.
This alarm is set for %3$s from now.
This alarm is set for %1$s and %3$s from now.
This alarm is set for %2$s and %3$s from now.
This alarm is set for %1$s, %2$s, and %3$s from now.

wrong strings:

This alarm is set for less than 1 minute from now.
This alarm is set for %1$s from now.
This alarm is set for %2$s from now.
This alarm is set for %1$1$s and %2$2$s from now.
This alarm is set for %3$s from now.
This alarm is set for %1$1$s and %2$3$s from now.
This alarm is set for %1$2$s and %2$3$s from now.
This alarm is set for %1$1$s, %2$2$s, and %3$3$s from now.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by mrjavum on 2011-10-03T04:32:31.000Z:

I tried v.1.3.3 from this thread: http://forum.xda-developers.com/showthread.php?t=1063055
and it works!
The problem is that 1.4.2 (and 1.4.1) decompiles the wrong parameters in /res/values/arrays.xml
the right string are:

This alarm is set for less than 1 minute from now.
This alarm is set for %1$s from now.
This alarm is set for %2$s from now.
This alarm is set for %1$s and %2$s from now.
This alarm is set for %3$s from now.
This alarm is set for %1$s and %3$s from now.
This alarm is set for %2$s and %3$s from now.
This alarm is set for %1$s, %2$s, and %3$s from now.

wrong strings:

This alarm is set for less than 1 minute from now.
This alarm is set for %1$s from now.
This alarm is set for %2$s from now.
This alarm is set for %1$1$s and %2$2$s from now.
This alarm is set for %3$s from now.
This alarm is set for %1$1$s and %2$3$s from now.
This alarm is set for %1$2$s and %2$3$s from now.
This alarm is set for %1$1$s, %2$2$s, and %3$3$s from now.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by shauli.bracha on 2011-11-18T20:56:12.000Z:

can confirm this issue with sevral APKs.
this happens with values in arrays.xml and plurals.xml.

noticeable apks:
clockpackage.apk
mms.apk

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by shauli.bracha on 2011-11-18T20:56:12.000Z:

can confirm this issue with sevral APKs.
this happens with values in arrays.xml and plurals.xml.

noticeable apks:
clockpackage.apk
mms.apk

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by Brut.alll on 2011-12-02T02:40:26.000Z:

<empty>

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by Brut.alll on 2011-12-02T02:40:26.000Z:

<empty>

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