×

Discussion Board

Results 1 to 9 of 9

Hybrid View

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    3

    How can I read RMS files??

    Is it possible to read a RMS file written by a Midlet application? Also, how can I determine where the record store will be saved??

    TIA,

    Steven H.

  2. #2
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Finland
    Posts
    209

    Re: How can I read RMS files??

    Originally posted by sheadley
    Is it possible to read a RMS file written by a Midlet application? Also, how can I determine where the record store will be saved??
    Midlet "launch pads" are located under directory "[drive]/system/apps/[app-uid]/" in Series 60 phones. The jar-files etc. seem to go under "[drive]/system/midlets/[app-uid]". The record store is probably located under one of those directories (I guess there is only one store per midlet).

    If the above is true and since the access to these directories is not restricted (yet) you should be able to read/modify RMS files with Python for Series 60.

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    3
    I was able to find the database as per your previous post, but am having problems reading data usin python.

    I saved off the data with the followinf J2ME code:
    RecordStore rs = null;
    try {
    rs = RecordStore.openRecordStore("Preferences", false);
    }

    and to save data:
    try {
    byte[] userBytes = mUser.getBytes();
    byte[] passwordBytes = mPassword.getBytes();
    int n = rs.getNumRecords();
    if(n == 0) {
    rs.addRecord(userBytes, 0, userBytes.length);
    rs.addRecord(passwordBytes, 0, passwordBytes.length);
    }
    else {
    rs.setRecord(1, userBytes, 0, userBytes.length);
    rs.setRecord(2, passwordBytes, 0, passwordBytes.length);
    }

    when trying to retrieve data in python series 60 I did the following:

    import e32db
    db = e32db.Dbms()
    db.open(u'e:\\...)
    dbv = e32db.Db_view()
    dbv.prepare(db, u"select * from Preferences")


    this gives an exception in python complaining that the table can't be found. Does anyone know how I can successfully read this data??

    thanx,


    Steven H.

  4. #4
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Finland
    Posts
    209
    Originally posted by sheadley
    when trying to retrieve data in python series 60 I did the following:

    import e32db
    Notice that the J2ME RMS implementation on Series 60 might not be implemented on top of Symbian DBMS. If this is so, then you can't use extension "e32db" for reading it.

  5. #5
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Bangkok, Thailand
    Posts
    148
    I think it's implemented on Dbms.
    When I backup the data, and see the file with
    notepad, I see both begin with the same string.

    The problem is now to guess the table name. In the case of
    contact database, I am lucky to find string inside.
    Now I don't know.. must guess more.

  6. #6
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Bangkok, Thailand
    Posts
    148
    OK, now I found it.. the table name is 'r'.
    Try "select * from r"

  7. #7
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Bangkok, Thailand
    Posts
    148
    Ok and the field is t,s,v,x,a,n
    This should represent what's in java RMS.

    Here 's my testing query.
    >> t('r')
    1 int 0
    2 time 1112999703.92188
    3 int 72
    4 int 2
    5 int 0
    6 vchar settings
    ->> select_row('select t,s,v,x,a,n from r')
    [0, 1112999703.92188, 72, 2, 0, u'settings']

  8. #8
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Bangkok, Thailand
    Posts
    148
    I deleted most my midlet games some months ago. So, no more data to test.
    (That one has only one row)

    Hope this get you start anyway.

  9. #9
    Regular Contributor
    Join Date
    Jan 2005
    Location
    Bangkok, Thailand
    Posts
    148
    After wondering why the file is so big, with very little data. Here are more table:
    t0, t1, t2, ...

    Better stop now... I forget that I have some work to do. ^_^

Posting Permissions

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