×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    How to protect j2me app from installing in multiple devices ?

    Hi as I cannot get IMEI for all the sets using j2me as i dont have enough time for signing the app how it is possible to protect app from installing in multiple devices ?

    Thnx

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to protect j2me app from installing in multiple devices ?

    Signing would not help you - it's not a form of copy protection.

    Ultimately, you cannot. The best you can do is make it more difficult. How difficult depends on the application. Is it a connected application (is it a client for some server app)? How is the app being deployed? How will users pay for it?

    Graham.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: How to protect j2me app from installing in multiple devices ?

    Yes its a client server app . User will buy a cd and enter serial number to install the app.

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to protect j2me app from installing in multiple devices ?

    The app connects to your server, or to server software on the customer's server? More detail would help.

    You can't install from a CD onto a phone, so how will they install the app onto the device? What models of phone are supported?

    The only mechanism to restrict installation is to use some kind of activation key issued from your server, which is calculated from some kind of customer number and/or a random number generated by the application on the device.

    Graham.

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: How to protect j2me app from installing in multiple devices ?

    "Thank you for your reply.
    We will install the jar using blue tooth . Sorry for not being detail in explaining what we have done.
    Here is what we have done for the symbian version:
    On first time launch, users enters a serial key which is supplied in the cd box.
    Then the app connects to our server with the serial key along with the IMEI number to our server.
    We enters that in our database.
    From now on every launch, we check the imei number and serial key with our stored data.
    If it does not match, a notification is given to the user and the application exists.

    Now for the S40 version, since we cannot get the IMEI number, we are stuck. Getting certification is a good option I think, but the problem
    is that we do not have that much time.

    Any idea is highly welcomed. We are really stucked."

  6. #6
    Regular Contributor
    Join Date
    Sep 2008
    Location
    Ahmedabad
    Posts
    254

    Re: How to protect j2me app from installing in multiple devices ?

    Hi,

    Getting certification also won't help you out in S40 devices, since it requires Operator or manufacturer level signing.

    You can do one thing though that when the application launches for the first time generate a random number of the same length as IMEI number and store that in RMS. This random number will work as IMEI for that particulat device.

    Hope this helps you out.
    Sunil
    Mobile Application Developer

  7. #7
    Registered User
    Join Date
    Aug 2003
    Location
    South Africa
    Posts
    189

    Re: How to protect j2me app from installing in multiple devices ?

    hi
    If you want a unique id and all devices you are installing the app on have bluetooth why not use the bluetooth address as the id.
    Steve

  8. #8
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: How to protect j2me app from installing in multiple devices ?

    Thanx sunil for your reply
    Ya that is a good option

  9. #9
    Registered User
    Join Date
    Oct 2008
    Posts
    5

    Re: How to protect j2me app from installing in multiple devices ?

    Thanx Steve for your reply but will all sets allow me to get their blue tooth id using j2me ?

  10. #10
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to protect j2me app from installing in multiple devices ?

    You can just create a random number, and use that.

    PHP Code:
    private static long getIdentifier() throws Exception {
        
    long id;
        try {
            
    RecordStore rs RecordStore.openRecordStore(ID_RECORD_STOREtrue);
            try {
                if (
    rs.getNumRecords() == 1) {
                    
    // read existing ID
                    
    byte[] rs.getRecord(1);
                    
    id 0;
                    for (
    int i 0b.lengthi++) {
                        
    id <<= 8;
                        
    id |= (b[i] & 0xff);
                    }
                } else {
                    
    // first execution: create ID
                    
    id = new Random().nextLong();
                    
    long temp id;
                    
    byte[] = new byte[8];
                    for (
    int i 0b.lengthi++) {
                        
    b[i] = (byte) (temp >> 56);
                        
    temp <<= 8;
                    }
                    
    rs.addRecord(b0b.length);
                }
            } 
    finally {
                
    rs.closeRecordStore();
            }
        } catch (
    Exception e) {
            throw new 
    Exception("cannot get identifier: " e);
        }
        return 
    id;

    Since many devices will not allow access to RMS files, it is very difficult to lift the application from one phone, put it on another, and still have the same ID number. Effectively, the random number becomes a unique ID for that device.

    Graham.

  11. #11
    Registered User
    Join Date
    Aug 2003
    Location
    South Africa
    Posts
    189

    Re: How to protect j2me app from installing in multiple devices ?

    Quote Originally Posted by waleemamun View Post
    Thanx Steve for your reply but will all sets allow me to get their blue tooth id using j2me ?
    You should be able to get the BT Address from any device that supports jsr-82. See getLocalDevice().

    Steve

Similar Threads

  1. Testing J2ME app on S60 "device"
    By sparshpolly in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2009-09-04, 09:54
  2. Start C++ app from J2ME app
    By grijandemor in forum Mobile Java General
    Replies: 3
    Last Post: 2009-08-14, 22:35
  3. Can we call a j2me app from Native C++ app
    By inguvaseshu in forum Symbian
    Replies: 3
    Last Post: 2009-01-13, 16:42
  4. How to get device no. from a j2me app.?
    By shreyasbellary in forum Mobile Java General
    Replies: 16
    Last Post: 2008-06-03, 11:13
  5. how to access/show missed calls while j2me app is running on 6230
    By hansprueller in forum Mobile Java General
    Replies: 0
    Last Post: 2006-01-12, 06:22

Posting Permissions

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