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

For FernFlower, some functions can be decompiled in class view but not in exported archive #523

Open
Nambers opened this issue Nov 11, 2024 · 9 comments

Comments

@Nambers
Copy link

Nambers commented Nov 11, 2024

It has several $ inner .class files, maybe that's the cause. This happened when I decompile lib jar of AppsFlyer. I'll try to find a minimal reproducible example.

ENV:

  • FF setting: all except first one(rename ambiguous)
  • Arch with Wayland
  • bytecode viewer 2.12
@Konloch
Copy link
Owner

Konloch commented Nov 12, 2024

Hi, thanks for the report. Just to double check, this bug happens when you use File->Save as Zip - but doesn't happen when you manually open a Classfile from within BCV?

@Bl3nd
Copy link
Contributor

Bl3nd commented Nov 12, 2024

Hi, thanks for the report. Just to double check, this bug happens when you use File->Save as Zip - but doesn't happen when you manually open a Classfile from within BCV?

I was just about to respond. Right now, I believe that if you decompile a full jar with fernflower, it doesn't understand that it should merge the $ classes into its main class.

@Nambers
Copy link
Author

Nambers commented Nov 12, 2024

Hi, thanks for the report. Just to double check, this bug happens when you use File->Save as Zip - but doesn't happen when you manually open a Classfile from within BCV?

No I did decompile & save all

Hi, thanks for the report. Just to double check, this bug happens when you use File->Save as Zip - but doesn't happen when you manually open a Classfile from within BCV?

I was just about to respond. Right now, I believe that if you decompile a full jar with fernflower, it doesn't understand that it should merge the $ classes into its main class.

Gotcha. What is the recommended actions to get the best result? Do we decompile its individually at first then merge?
Also, seems either vineflower or Procyon has better output.

@Bl3nd
Copy link
Contributor

Bl3nd commented Nov 12, 2024

The only workaround I can think of is to decompile the full jar and then open whatever class has errors with BCV and copy/paste.

@Nambers
Copy link
Author

Nambers commented Nov 12, 2024

The only workaround I can think of is to decompile the full jar and then open whatever class has errors with BCV and copy/paste.

It's so annoying that FF will have some outcome like xxx.3(xxx) and the 3 is the runnable (ig lambda) in xxx$3.class but it's nowhere in output.

@Bl3nd
Copy link
Contributor

Bl3nd commented Nov 12, 2024

It's so annoying that FF will have some outcome like xxx.3(xxx) and the 3 is the runnable (ig lambda) in xxx$3.class but it's nowhere in output.

When you decompile the class with BCV or the whole jar?

Also, I've currently got a fernflower test working that correctly decompiles "$" inner classes. I will need to add the single class decompilation and actually saving it to disk part, so the fix will not be ready until I implement the rest of the functionality.

@Nambers
Copy link
Author

Nambers commented Nov 12, 2024

The only workaround I can think of is to decompile the full jar and then open whatever class has errors with BCV and copy/paste.

It's so annoying that FF will have some outcome like xxx.3(xxx) and the 3 is the runnable (ig lambda) in xxx$3.class but it's nowhere in output.

When you decompile the class with BCV or the whole jar?

Also, are you clicking on the Decompile & Save All Classes? If you are, then I've currently got a fernflower test decompiler working when you use that option that correctly decompiles "$" inner classes. I will need to add the single class decompilation and actually saving it to disk part, so the fix will not be ready until I implement the rest of the functionality.

I used decompile & save all classes but Nah. In my case there isn't any xxx$ + num .java in output(anonymous or lambda). Only xxx$ + inner class name. If u are interested I can shared the jar, it's in maven anyway.

@Bl3nd
Copy link
Contributor

Bl3nd commented Nov 12, 2024

If you have rights to it, then feel free to.

@Nambers
Copy link
Author

Nambers commented Nov 12, 2024

If you have rights to it, then feel free to.

repo1[.]maven[.]org/maven2/com/appsflyer/af-android-sdk/6.15.1/af-android-sdk-6.15.1.aar it's the classes.jar inside it and I'm talking about f1zSDK$3

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

No branches or pull requests

3 participants