×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    3

    Send SMSs without user confirmation

    Hello,
    I would like to know if a digital certificate for code signing is going to solve the problem that I want to sort out before purchase the certificate. I tell you my problem:

    I need to send SMSs messages from a Java application but I don’t want the user to be asked every time that the application needs to send a message. I have given my application the permissions needed but, as it is not signed, it is installed in a non secure (untrusted) domain. I would like to know if once signed and installed in the trusted 3rd party domain, it would be able to send SMSs without user confirmation, as occurs with applications that establish http connections and are digitally signed.

    I need someone to confirm me that if I sign the midlet it will happen as I hope… and the application will send SMSs without user confirmation. I am not really sure about if it will happen in that way…

  2. #2
    Registered User
    Join Date
    Dec 2004
    Posts
    12

    Signed midlets.

    I've been trying to get the same confirmation on this issue but I haven't had much luck either.

    The Java Verified partners Relq and CapGemini assured me that this is indeed possible, but neither could supply code samples that proved it.

    If you find a answer please post it in this forum.

    Claus Christiansen.

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    67
    Hi!

    Don't know if this helps but there is a hack that works at least on the 6600:

    http://www.mobile-j.de/snipsnap/spac...r+intervention

    This way you can send SMS without confirmation even if the midlet is unsigned. (Even midlets in the trusted third party domain are not allowed to do this)

    But the installation of such a midlet is a bit tricky and I think that Symbian or Nokia will fix this in newer firmware versions. (If it's not already fixed.)

    Remember this is just a rude hack.

    Regards
    Björn

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Send SMSs without user confirmation

    Quote Originally Posted by bjoernQ View Post
    Hi!

    Don't know if this helps but there is a hack that works at least on the 6600:

    http://www.mobile-j.de/snipsnap/spac...r+intervention

    This way you can send SMS without confirmation even if the midlet is unsigned. (Even midlets in the trusted third party domain are not allowed to do this)

    But the installation of such a midlet is a bit tricky and I think that Symbian or Nokia will fix this in newer firmware versions. (If it's not already fixed.)

    Remember this is just a rude hack.

    Regards
    Björn
    Bjorn, are you the author of that trick?
    I am not able to compile tohose sources, so I need a bit of help...

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    67

    Re: Send SMSs without user confirmation

    Hi Cassioli,

    yes I'm the author of this hack.

    To compile you need to have "kmidp20.zip" from the Nokia Series_60_MIDP_SDK_2_1 (I guess an other version will do also) in your classpath.

    Don't forget that this is a very old trick and doesn't work on 3rd Edition phones or non Symbian handsets.

    What problems do you have with compiling the sources? I guess the "com.symbian.*" stuff can't be found. These classes should be available in the above mentioned "kmidp20.zip".

    It should be sufficient to use "add to classpath" from you IDE and choose the "kmidp20.zip" from the SDK. If it doesn't work try exact the mentioned version of the SDK.

    Hope this helps.

    Regards
    Björn

  6. #6
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Send SMSs without user confirmation

    Yes, buy downloading the SDK I was able to find the needed file and get rid of the "not found" errors. But a more annoying one is now bothering me:
    ERROR: native methods should not appear
    Error preverifying class com.nokia.microedition.media.control.ControlImpl
    Build failed
    I read around that this is due to same class being defined in other .zip/.jar files loaded by the compiler, but I was not able to find them.

    I have same problem both with WTK (2.2) and Netbaens (6.0.1), although my preferred method to compile midlets is Netbeans. Actually I am not able at all to compile ALL your sources using WTK: how do I "connect" them each other, so as I don't get any "not found" error?

    BTW, s60-2nd applicability is not an issue at all: I'm indeed "bringing to new life" some old s60 phones with various projects, like this one:
    http://jumpjack.wordpress.com/2007/1...efoni-symbian/

    If I succeed with sending SMS without user intervention, I can port my program to java, i.e. to a lot more phone than just those supporting Pys60, and I can "couple" it with MGMaps, which can display a GPS position on a map after receiving coordinates from a java midlet registered to its same port.

    BTW, do you think it is also possible to access internet without user permission?
    This python program allows easy storing of data on a web server by means of sending a proper URL to the server itself:
    http://www.mobilenin.com/pys60/info_networking.htm

    It would be really cool for my program to be able to continuously send data over GPRS rather than sending multiple SMSs!

  7. #7
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    67

    Re: Send SMSs without user confirmation

    Hi Cassioli,

    if I remeber it right the trick was not to run the preverifier on the jar and simply overwrite the JAR perviously installed midlet-file with the one containing the com.symbian.* stuff (un-preverified).

    So the "trick" is simply to first write a normal midlet using the "sms" protocol and then compile another version against kmidp20.zip, jar it up and replace the old jar on the phone with the new one (unverified).

    This worked since the phone only checked the JAR while installing it and never again later.

    So in the end you have the same midlet as before in the jar but then you are using the "xsms" protocol and add the two classfiles.

    Hope this helps. It's a long time since I did this little hack and I have to admit that my description isn't as complete as it should be.

    Regards
    Björn

  8. #8
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Send SMSs without user confirmation

    Yes, the matter is just about "preverification", but how can I disable it?!? (Both in WTK and Netbeans)
    And will the phone accept a not-preverified midlet?!?

  9. #9
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    67

    Re: Send SMSs without user confirmation

    Hi,

    you can simply do it as a ordinary Java project in NB and add kmidp20.zip to the classpath so all classes will compile.

    Then you only need the right MANIFEST.MF in meta-inf and the resulting JAR looks like a MIDlet (but without preverification).

    The checking if the preverifier was run on the JAR etc. is only done while installing the MIDlet. That's why you need an "unhacked" version (preverified) to be installed via the installer.

    After that you can locate the MIDlet JAR and replace it with your unpreverified JAR. The phone won't check the JAR again but run it. (Since it believes that was already checked during installation). For the replacement of the JAR I used FExplorer manually. Any other file manager application should be sufficient,too.

    Hope this clarifies things a bit.

    Regards
    Björn

  10. #10
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Send SMSs without user confirmation

    Quote Originally Posted by bjoernQ View Post
    Hope this clarifies things a bit.
    Not so much, sorry...

    Ok, I compiled Protocol.java and SMSClientConnectionImpl.java ,and I got a xsmsprotocol.jar file: is this right?!? Should this jar have a specific name? Should it contain also the midlet itself?

    Then I compile my midlet containing the String addr = "xsms://"+t.getString(); line; it compiles fine and I got a XSMS.jar file.

    Now.. what?!'
    How do I "connect" the 2 jar files?!?

  11. #11
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    67

    Re: Send SMSs without user confirmation

    Hi,

    the trick is to first install the preverified MIDlet (with "sms:" or "xsms:" doesn't matter that much). This MIDlet must not contain the Protocol and SMSClientConnectionImpl classes.

    Then you have to build the MIDlet again unpreverified. You can for example just take the MIDlet generated in step 1 (if you decided to use "xsms") and add the two classes to the JAR. (using the jar utility or any zip capable application). Then you overwrite the MIDlet JAR in the phone memory with the tampered one just created and from now on it should work.


    Regards
    Björn

  12. #12
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Send SMSs without user confirmation

    I compiled XSMS midlet and installed it.
    Then I compiled the two classes, and I copied whole "com" folder into "hello" folder of XSMS.jar. Result: confirmation asked, sending failed due to system error.

    This is what actually worked: ;-)

    (Using NetBeans 6.0.1)

    CREATE STANDARD MIDLET
    - compile a generic "helloworld" midlet containing this code:
    Code:
                try{
                    try {
                        String addr = "sms://0000000000";
                        MessageConnection conn = (MessageConnection)Connector.open(addr);
                        TextMessage msg = (TextMessage)conn.newMessage(MessageConnection.TEXT_MESSAGE);
                        msg.setPayloadText("FREGATO!!");
                        conn.send(msg);
                    } catch (Exception e) {
                        /// mhhhhh
                        getTxtOutput().setText(e.toString());
                        e.printStackTrace();
                    }
                }catch(Exception ee){
                    getTxtOutput().setText(ee.toString());
                }catch(Error ee){
                    getTxtOutput().setText(ee.toString());
                }
    - midlet must have these imports:
    Code:
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;
    import java.io.*;
    import javax.wireless.messaging.*;
    note: no need to import XSMS package or to add xsmsprotocol.jar as external library.
    - change midlet name from HelloWorld to XSMS (slowly click two times over HelloWorld.java in Netbeans window and edit name)
    - change midlet name also in Project Properties --> Application Descriptor --> MIDlets (to get midlet listed as "XSMS" in applications list)
    - compile midlet: you'll get XSMS.jar file in XSMS\dist folder
    - install this jar on phone in usual way
    - start midlet: you'll be asked for confirmation to send SMS

    CREATE HACKED MIDLET
    - in midlet source, replace line String addr = "sms://0000000000"; by line String addr = "xsms://YOURNUMBER"; (notice the additional "x")
    - compile midlet again; you0ll get a new XSMS.jar file
    - install midlet on phone
    - test midlet: it will NOT work, complaining for missing XMS protocol.

    CREATE A NEW PROTOCOL (XSMS)
    - create a new project in Netbeans, named for example "xsmsprotocol" .
    - add the two .java sources to the project
    - add kmidp20.zip to project libraries (right click on project name, ->properties, click on LIBRARIES & RESOURCES and on ADD JAR/ZIP , and choose kmidp20.zip file)
    - compile project: you'll get a xsmsprotocol.jar file in xsmsprotocol\dist folder
    - open this file with a ZIP manager such as 7zip and keep the window open; we'll call this window "Window A".
    - delete all folders but "com" from the archive
    - in "com" folder, delete all folders but this path: com/symbian/midp/io/protocol/xsms/

    MAKE NEW PROTOCOL AVAILABLE TO HACKED MIDLET
    - open XSMS.jar with a zip-manager; you'll get a window which we'll call "Window B".
    - now copy whole com folder from Window A (xsmsprotocol.jar) into this Window B (XSMS.jar), into root folder; this will rsult in having in root folder these folders:
    com
    hello
    META-INF

    - close Window B (XSMS.jar)

    REPLACE MIDLET ON PHONE
    - copy XSMS.jar to phone (do NOT install, as it wouldn't work, just COPY the file)
    - find XSMS.jar on the phone (it's in \system\midlets[random_number] folder)
    - copy hacked XSMS.jar into this folder using phone file manager (PC file manager does not allow accessing \system folder), overwriting old file

    TEST HACK!
    Now launch the midlet, which should send the message without asking for permission!


    Which others permissions can I override with this method? Network access for example?
    Last edited by cassioli; 2008-10-18 at 20:14.

  13. #13
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Send SMSs without user confirmation

    So?

    I guess there's something wrong in procedure I detailed above, as I tried doing it again from scratch...but midlet does not start at all!

    It is also important to understand if the WHOLE "com" folder is needed, or just its structure, containing the hacked protocol.

  14. #14
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Send SMSs without user confirmation

    No replies?

  15. #15
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    67

    Re: Send SMSs without user confirmation

    Sorry for the long delay in answering. I haven't had much time these days.

    Let's look at what should work:

    1) Create a standard midlet.

    There's no need to import the xsms stuff. Just use "xsms:" for the protocol.

    Build + install it. When starting it on the phone it will fail because there is no "xsms" protocol.

    2) Do what you called "CREATE A NEW PROTOCOL (XSMS)"

    3) Take the midlet JAR from (1), open up in e.g. 7zip. Copy the "com/symbian/midp/io/protocol/xsms/*.class" files from (2) into the JAR. They have to be located in that directory!

    Don't rename anything. Copy the resulting JAR over the already installed JAR on the phone. (What you described in "REPLACE MIDLET ON PHONE")


    Now when you start the MIDlet on the phone it will pick up all the classes from your manipulated jar and this time it will find the xsms protocol (since it's implementation is now included in the jar file).


    In the end it sounds a lot like what you already did but don't rename any classes between installing the "trojan" MIDlet and overwrite the MIDlet with the hacked version.

    This should do the trick. So actually it's a little bit less complicated as you described the steps.

Posting Permissions

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