Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fernflower not renaming fields/methods
#1
Bug 
Hey,

I am new to the Java Reverse Engineering scene and have started out using FernFlower.

I am currently working on a project which simply decompiles and refactors a jar. It is all going well except for one major issue: It doesnt rename the fields/methods when they are declared, it does when they are referenced but not when they are declared.

For example:
My renaming class will rename field "aa" to "String_1"
I will end up with this:
String aa;

class_13(String someString) {
String_1 = someString;
}

This is obviously not ideal.

I have tried looking through the source code of FernFlower but i cannot find the issue.

I have emailed fernflower.decompiler@gmail.com but have not recieved a reply as of yet and thought it would be worth looking for help elsewhere.

I hope you can help me out,

Thanks Smile
Reply
#2
are you using the orginal fernflower or the one jetbrains stole and claimed as their own?
edit: not changing this edit snip

[Image: 485bLTI]
Reply
#3
(05-10-2015, 09:59 PM)Bibl Wrote:  are you using the orginal fernflower or the one jetbrains stole and claimed as their own?

I am using the fernflower from https://github.com/fesh0r/fernflower. I have just cloned and built it.
Reply
#4
you could use proguard or retroguard to rename the fields or make your own field renamer (methods are a bit tricker).
Reply
#5
(05-11-2015, 03:52 AM)Bibl Wrote:  you could use proguard or retroguard to rename the fields or make your own field renamer (methods are a bit tricker).

Like, editing the bytecode?
Reply
#6
Reply
#7
asm for java
and
https://github.com/TheBiblMan/Byte-Engineer-2

although its not really full/done
Reply
#8
just tried fernflower and the same thing is happening for me, guess you should rename with proguard or retroguard.
Reply
#9
(05-15-2015, 06:51 AM)Bibl Wrote:  just tried fernflower and the same thing is happening for me, guess you should rename with proguard or retroguard.

I think I'm actually going to use asm to edit the bytecode to rename the fields/methods/classes. This is good because then I don't have to recompile the source code afterwards. Thanks for your help Smile
Reply
#10
(05-16-2015, 08:28 AM)sothatsit Wrote:  
(05-15-2015, 06:51 AM)Bibl Wrote:  just tried fernflower and the same thing is happening for me, guess you should rename with proguard or retroguard.

I think I'm actually going to use asm to edit the bytecode to rename the fields/methods/classes. This is good because then I don't have to recompile the source code afterwards. Thanks for your help Smile

nono, you can run retroguard it and the classes are renamed (still in classfile form)
i'm working on one with asm at the moment that doesnt rely on the asm visitors
http://hastebin.com/aqocujidaj.java
Reply
 


Forum Jump:


Users browsing this thread: 6 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website