• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOS! How to obfiscate game jars for nokia?

 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use WTK etc. we can obfiscate our game jars easily for seimens or motorolla. However, we use Nokia API, there is no option to obfiscate the jars.
I also tried to do it myself by using retroguads, yguards, proguards. I can obfiscate it, and upload and download, but when I play it, I always get an "application error"
Can someone give me a hint, I know I must have done something very wrong. Please help!!!
Thanks!
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either I'm seriously wrong or ProGuard does not work?
I tried our other jars by using ProGuard. The compression rate of ProGuard is obvious stronger.
A 56k jar for siemens was compressed by WTK retroguard, we got 52k jar, but it works.
However, when I use ProGuard, the result is 45k. However, it does not work. The seimens phone gives more readable message. It could not find our main MIDLet class, even it is obviously in the jar. Why?
I'm totally confused.
Any hint or help will be mostly appreciated.
Thanks!
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My ProGuard config file is here, please take a look, what is wrong?
Huge thanks!
=================
-printseeds
-injar plain/BLTBowling-Siemens.jar
-outjar obf/BLTBowling-Siemens.jar
-libraryjar C:\tools\siemens\SMTK\lib\api.jar
-keep public class com.blt.BLTBowling.Bowling
-keep public class * extends javax.microedition.midlet.MIDlet
=================
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also tried the ant approach, got the same result.
Michael, please help!
Thanks!
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roseanne,
Several points to consider:
1. Do you obfuscate the class file before or after preverification? That could make a difference.
2. The one that does not work on Seimens devices: does it work on WTK?
3. I use a different postprocessor:
http://jode.sourceforge.net/
It not only obfuscates the bytecode but also gets rid of unused classses. That said, there are times I cannot get the getWidth() and getHeight() method to work on Nokia devices. It just takes some fiddling.
As a last resoort, you can have a look at your obfuscated JAR. It should have the entry point MIDlet class file with a public MIDlet class.
cheers
Michael
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael, do you see any near-future problems with JODE considering that it seems to be "dead" in terms of activity?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That said, there are times I cannot get the getWidth() and getHeight() method to work on Nokia devices.

Kind of like my problem before.
Mark
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:
Michael, do you see any near-future problems with JODE considering that it seems to be "dead" in terms of activity?

Hmm, I do not know. I have never talked with the author. But I think as a code postprocessor, JODE is pretty much mature as it is now. The Java bytecode spec has not changed much in all these years.
cheers
Michael
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works now, see detailed solutions from here!
http://discussion.forum.nokia.com/forum/showthread.php?s=&postid=86360#post86360
Thanks Michael for pointing to that forum last time!
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is why I never allow WTK (or any other IDE) to manage my build process. If a tool does not support ANT, it is out of my consideration.
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was an ANT queen in my previous job. I'm using ant here too. However, whatever works, I'll go for it! You know, the deadlines...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic