You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a significant difference between JVM and Android implementations of java.nio.Charset. For example, calling java.nio.Charset.forName("UTF-8") on JVM returns an object of class sun.nio.cs.UTF-8 but Android returns an object of class java.nio.charset.CharsetICU. Since sun.nio.cs.UTF-8 doesn't exist on Android, there's an error when the class manager tries to find the Smali file for it in the reference framework.
Unfortunately, encoding and decoding are handled differently between JVM and Android, and it's a lot more complex. Will need time to research and implement emulated functions. It may be possible to "shim" the emulation code to just use JVM encoding / decoding in the background, but there's still a lot of detail work to create test cases, hook all the right functions, etc.
The text was updated successfully, but these errors were encountered:
There's a significant difference between JVM and Android implementations of
java.nio.Charset
. For example, callingjava.nio.Charset.forName("UTF-8")
on JVM returns an object of classsun.nio.cs.UTF-8
but Android returns an object of classjava.nio.charset.CharsetICU
. Sincesun.nio.cs.UTF-8
doesn't exist on Android, there's an error when the class manager tries to find the Smali file for it in the reference framework.If this were the only difference, it would be easy enough to implement. All you'd need is the correct constructor arguments for
CharsetICU
, with the most "difficult" being aliases, but these are easily obtained from a table here: https://icu4c-demos.unicode.org/icu-bin/convexp?s=WINDOWS&s=JAVA&s=IANA&s=MIME Note: Windows, Java, IANA, and MIME seem to be what are used on Android (reference: https://cs.android.com/android/platform/superproject/+/master:external/icu/android_icu4j/libcore_bridge/src/native/com_android_icu_charset_NativeConverter.cpp;drc=master;bpv=1;bpt=1;l=163?q=nativeconverter)Unfortunately, encoding and decoding are handled differently between JVM and Android, and it's a lot more complex. Will need time to research and implement emulated functions. It may be possible to "shim" the emulation code to just use JVM encoding / decoding in the background, but there's still a lot of detail work to create test cases, hook all the right functions, etc.
The text was updated successfully, but these errors were encountered: