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.
Printable View
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.
[QUOTE][i]Originally posted by sheadley [/i]
[B]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??
[/B][/QUOTE]
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.
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.
[QUOTE][i]Originally posted by sheadley [/i]
when trying to retrieve data in python series 60 I did the following:
import e32db[/QUOTE]
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.
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.
OK, now I found it.. the table name is 'r'.
Try "select * from r"
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']
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.
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. ^_^