REAndroid / APKEditor

Powerful android apk editor - aapt/aapt2 independent
Apache License 2.0
645 stars 95 forks source link

Repacking error (xml mode) #2 #62

Closed kiber-io closed 9 months ago

kiber-io commented 10 months ago

It may be related to https://github.com/REAndroid/APKEditor/issues/60 and will close with it.

Describe the bug After a simple repacking, part of the functionality of the application does not work. Namely, in the registration window, when selecting a date from the datepicker, a crash occurs. I am not sure that you will be able to check it, because there you need a phone number and receive an sms to it.

To Reproduce Steps to reproduce the behavior:

  1. Used version: APKEditor - 1.2.8, ARSCLib - 1.2.3
  2. Operating system: WSL Ubuntu 22.04
  3. Command: java -jar apkeditor.jar d -i app.apk and java -jar apkeditor.jar b -i app_decompiled_xml

Log/Stacktrace

input-mask-android:
input-mask-android:                     WARNING! Your text field is not configured for the MaskedTextChangedListener!
input-mask-android:                     For more information please refer to
input-mask-android:
input-mask-android:                     InputMask vs. android:inputType and IndexOutOfBoundsException
input-mask-android:                     https://github.com/RedMadRobot/input-mask-android#inputmask-vs-androidinputtype-and-indexoutofboundsexception
input-mask-android:
FATAL EXCEPTION: main
Process: com.icemobile.lenta.prod, PID: 27468
java.lang.IndexOutOfBoundsException: setSpan (10 ... 10) ends beyond length 6
       at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1326)
       at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:685)
       at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:677)
       at androidx.emoji2.text.n.setSpan(SpannableBuilder.java:4)
       at android.text.Selection.setSelection(Selection.java:94)
       at android.text.Selection.setSelection(Selection.java:78)
       at android.text.Selection.setSelection(Selection.java:153)
       at android.widget.EditText.setSelection(EditText.java:136)
       at com.a65apps.lentamain.ui.f.e(InputEx.kt:4)
       at com.a65apps.lentamain.ui.f.f(InputEx.kt:1)
       at com.a65apps.registration.update.user.g$b.a(UpdateUserFragment.kt:3)
       at com.a65apps.registration.update.user.g$b.d(UpdateUserFragment.kt:15)
       at com.a65apps.registration.update.user.g$k.a(UpdateUserFragment.kt:1)
       at com.a65apps.registration.update.user.g$k.invoke(UpdateUserFragment.kt:1)
       at com.a65apps.registration.update.user.g$m.d(Unknown Source:2)
       at androidx.lifecycle.LiveData.d(LiveData.java:6)
       at androidx.lifecycle.LiveData.e(LiveData.java:8)
       at androidx.lifecycle.LiveData.q(LiveData.java:4)
       at androidx.lifecycle.c0.q(MutableLiveData.java:1)
       at androidx.lifecycle.LiveData$a.run(LiveData.java:5)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at android.app.ActivityThread.main(ActivityThread.java:7918)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
C_LOG]AGConnectCrashHandler: exception catch:'java.lang.IndexOutOfBoundsException: setSpan (10 ... 10) ends beyond length 6' from thread main

Used apk file Attach/share your apk

REAndroid commented 10 months ago

Can't test your apk on device because it's x86 libs, do you have arm ?

kiber-io commented 10 months ago

Can't test your apk on device because it's x86 libs, do you have arm ?

Yes, here is for arm64: https://mega.nz/file/Q1MmAL7Z#y3CQFC58Ub_o3DMVI3tv2mzgI7LcPNytyaOlm29oKUk

kiber-io commented 10 months ago

version 1.3.0 fixed this situation