Skip to content
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

[BUG] The jar has problems after decompilation. #27

Closed
zhongqingsong opened this issue Oct 24, 2022 · 11 comments
Closed

[BUG] The jar has problems after decompilation. #27

zhongqingsong opened this issue Oct 24, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@zhongqingsong
Copy link

Decompiled an apk to get a jar. After running, it was found to crash all the time. Finally, it was found that the decompiled app jar error.
You can see "-I" changed to "_I". It's not right. Below show:
image

The origin code:
image

I know, we can change smali file to fix. But let me just mention that. It would be nice to have a tool that can fix that.

@ThexXTURBOXx
Copy link
Owner

Thanks for reporting that! Could you please share the original APK/DEX file?

@zhongqingsong
Copy link
Author

zhongqingsong commented Oct 27, 2022

dexs.zip
hello, this is dex file. APK too big, so I zip dex.

Thanks for reporting that! Could you please share the original APK/DEX file?

@ThexXTURBOXx
Copy link
Owner

Thanks for sharing. I will see what I can do about it soon

@ThexXTURBOXx ThexXTURBOXx added the bug Something isn't working label Mar 5, 2023
@Syer10
Copy link

Syer10 commented Oct 16, 2023

@ThexXTURBOXx My application has also starting receiving this issue. We have a lot of users so a fix would be appreciated.

Actual method: public static final long kotlin.time.Duration.getInWholeMilliseconds-impl(long)

Error:

java.util.concurrent.CompletionException: java.lang.NoSuchMethodError: 'long kotlin.time.Duration.getInWholeMilliseconds_impl(long)'
Caused by: java.lang.NoSuchMethodError: 'long kotlin.time.Duration.getInWholeMilliseconds_impl(long)'
	at eu.kanade.tachiyomi.extension.all.mangadex.MDConstants.<clinit>(Unknown Source)
	at eu.kanade.tachiyomi.extension.all.mangadex.MangaDex.sanitizeExistingUuidPrefs(Unknown Source)
	at eu.kanade.tachiyomi.extension.all.mangadex.MangaDex.<init>(Unknown Source)
	at eu.kanade.tachiyomi.extension.all.mangadex.MangaDex.<init>(Unknown Source)
	at eu.kanade.tachiyomi.extension.all.mangadex.MangaDexEnglish.<init>(Unknown Source)
	at eu.kanade.tachiyomi.extension.all.mangadex.MangaDexFactory.createSources(Unknown Source)
	at suwayomi.tachidesk.manga.impl.extension.Extension.installAPK(Extension.kt:161)
	at suwayomi.tachidesk.manga.impl.extension.Extension$installAPK$1.invokeSuspend(Extension.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	... 7 common frames omitted

File: tachiyomi-all.mangadex-v1.4.189.zip

Edit: Was able to workaround the issue with this one method using ASM to fix the reference, hopefully it doesn't happen with other methods.

@ThexXTURBOXx
Copy link
Owner

I thought I had fixed that already. Are you using the newest version of my fork? Also, can you share an example APK/DEX file? Perhaps if needed, you can also share it via my private email

@Syer10
Copy link

Syer10 commented Oct 16, 2023

We are on v74, someone did some testing and its happening with every version above v64, I shared the apk above. https://github.com/ThexXTURBOXx/dex2jar/files/12910973/tachiyomi-all.mangadex-v1.4.189.zip

@ThexXTURBOXx
Copy link
Owner

Oh sorry, did not see that first!
You said it does not work with every version above v64. Have you tried versions below (and including) v64? I would imagine it also does not work there either, right?

@Syer10
Copy link

Syer10 commented Oct 16, 2023

It works fine on v64, but every version after it has this issue

@ThexXTURBOXx
Copy link
Owner

I see what is the problem: The new fixName function rigorously renames functions without checking for their existence. Since the function you are referring to is built-in, we should not replace it.
Not an easy fix, but I will hopefully be able to take a look at it soon

@Syer10
Copy link

Syer10 commented Oct 17, 2023

I am going to revert to v64 for now, I'll keep watching this issue for updates

@ThexXTURBOXx
Copy link
Owner

I have deployed a temporary fix for this issue which is available as part of 2.4.10.
If you need a fix, you need to set the parameter dont sanitize names.
However, be aware that this could lead to other incorrect behaviour regarding lambda expressions.
A proper fix is probably impossible, but this will do for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants