• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SOS! How to obfiscate game jars for nokia?

 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also tried the ant approach, got the same result.
Michael, please help!
Thanks!
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have already gone to
http://discussion.forum.nokia.com/forum/showthread.php?s=&postid=85951#post85951
and
http://www.cnjm.net/cgi-bin/lbcjm/topic.cgi?forum=7&topic=869&show=0
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
reply
    Bookmark Topic Watch Topic
  • New Topic