Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2003

    Failed deployment on Nokia 7650 after obfuscation [having FullCanvas]

    Appreciate any help on this:
    I've a midlet with classes extending the FullCanvas class, built & packaged (without obfuscation) under WTK104. As the built-in retroguard can't automatically recognize the Nokia API classes, I wrote a retroguard scriptfile as follows

    .class com/JwfpMidlet public
    .class com/* public
    .class java/lang/* protected
    .class java/lang/Class protected
    .class java/lang/ClassLoader protected
    .class javax/microedition/rms/* protected
    .class javax/microedition/io/* protected
    .class javax/microedition/lcdui/* protected
    .class javax/microedition/lcdui/Canvas protected
    .class javax/microedition/midlet/* protected
    .class com/nokia/mid/ui/* protected

    [tried preserving everything]

    and ran retroguard using the WTK104 packaged JAR as the input JAR.

    It successfully obfuscated, loaded onto 7650, but failed to run: no response when you click on the midlet name.
    I tried to run the obfuscated JAR on 60MIDP emulator; & it gives me a ClassNotFoundException: JwfpMidlet on the console.

    Is the failure with my scriptfile [anything I missed]; with FullCanvas [I tried the exact sequence with a test midlet without Nokia API & it worked]; with my directory structure [I placed the midlet under com/ (not Nokia API's com)]; or anything else.

    Anyone successfully deployed/ran obfuscated midlets with FullCanvas on actual phones?

  2. #2
    Registered User
    Join Date
    Mar 2003

    RE: Failed deployment on Nokia 7650 after obfuscation [having FullCanvas]

    double post. double reply. lol

    I have a midlet that extends FullCanvas too, and obfuscation doesnt work inside wtk104. But packaging with obfuscation in the command line worked for me, and it ran in the 7650.

    here's the command

    java -classpath c:\wtk104\bin\retroguard.jar;c:\wtk104\lib\midpapi.zip RetroGuard test.jar test-obf.jar script.rgs

    script.rgs' content is ".class test"

    note: midpapi.zip is nokia's ui api

    hope this helps

  3. #3
    Registered User
    Join Date
    Mar 2003

    RE: Failed deployment on Nokia 7650 after obfuscation [having FullCanvas]

    Hi guys!

    I have try with command line method including in the midpapi.zip also the Nokia Api but this is the result:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: _getFullWidth
    at com.nokia.mid.ui.FullCanvas._getFullWidth(Native Method)
    at com.nokia.mid.ui.FullCanvas.<clinit>(FullCanvas.java:108)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at a.a.a.f.a(Unknown Source)
    at a.a.a.f.a(Unknown Source)
    at a.a.a.f.j(Unknown Source)
    at a.a.a.j$4.a(Unknown Source)
    at a.a.a.j.a(Unknown Source)
    at a.a.a.j.a(Unknown Source)
    at a.a.a.j.a(Unknown Source)
    at a.a.a.j.if(Unknown Source)
    at a.a.a.s.do(Unknown Source)
    at a.a.a.s.a(Unknown Source)
    at RetroGuard.a(Unknown Source)
    at RetroGuard.a(Unknown Source)
    at RetroGuard.main(Unknown Source)

    Please Help me!

    Have a good day!

  4. #4
    Regular Contributor
    Join Date
    Mar 2003

    I got the same problem.

    Can anybody help on this?

  5. #5
    Registered User
    Join Date
    Mar 2003

    Maybe this will help

    I had same problems with FullCanvas and obfuscating for 7650.
    After some time I gave up working with retroguard so I used other obfuscators.

    1) JARG is very good, free and easy to work with. I download it and made everything work in 10 minutes.
    Find-at http://jarg.sourceforge.net.
    It has support for J2ME, so in one line it obfuscates and preverifies the .jar file.
    Obfuscated files worked both on emulator and device itself.
    JARG works with Java1.3.1
    Decrease: I got from 90K to 65K with Jarg

    2) MochaSource - is nice, but you need to spent some little time to make it work ok. It works on .java files directly and not on .jar files. Problem is that it's not aware of J2ME API so it will change (import java.util.TimerTask - to - import java.util.a999, for example).
    Another thing with mochaSource is that it doesnot decrease the .jar file for much. I got some from 90K to 88K decrease alltogether.
    Find it at: http://www.freedownloadscenter.com/W...bfuscator.html

    3) As for retroguard.
    To overcome the NativeMethod problem see
    In short
    - Decompile FullCanvas.class to FullCanvas.java using any decompiler like NMI's Java Code Viewer
    - Edit FullCanvas.java. Find for native methods. Change every native method like "public native int getWidth();" to
    "public int getWidth(){} // method with empty body"
    - Compile FullCanvas.java having set the appropriate classpath
    - Overwrite FullCanvas.class in j2me-debug.zip with your new FullCanvas.class

    This I've done and it worked, but then I got the problem that I couldnot preverify the code. So I gave up and used Jarg.

  6. #6
    Registered User
    Join Date
    Mar 2003

    problem with JARG


    I don't manage to use JARG!!!
    the website http://jarg.sourceforge.net id closed.
    I've found this website http://sourceforge.net/projects/jarg/
    but there is no documentation

    you dais that it's easy to work with...so can you help me????

    How do we use this obfuscator???



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts