Skip to main content

J2ME RecordStore

4 replies [Last post]
prithwi
Offline
Joined: 2008-08-23
Points: 0

Specifically where the recordstores are saved in mobile? phone memory or external memory, or in application folder or gallery folder? Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sfitzjava
Offline
Joined: 2003-06-15
Points: 0

the RMS is in a secured part of the phone chipset that you can not get to and is encrypted so that the MIDlet is the only thing that can get to this data.

For PIM/FileConnection you can put it and read from it. It can be anywhere phone/external etc..

If you want others to get to your data you use FileConnections, if you have secured data you do not want anyone to get to you place it in RMS.

-Shawn

jaywayjohan
Offline
Joined: 2008-06-18
Points: 0

Hi,

the record store in MIDP 2.0 is not encrypted, you need MIDP 3.0 for that. AFAIK this is not available on any phones on the market today.

The MIDP specification does not say anything about where the RMS is stored. On many phones it is stored as a file where it is not reachable by a normal user. However this is not guaranteed. So if somebody hacks your phones file system, it is very easy to read the information from your RMS.

Best Regards
Johan

sfitzjava
Offline
Joined: 2003-06-15
Points: 0

Good point. It is an implementation detail (sadly). I was thinking of the implementations I have looked at on feature phones where they intelligently placed the RMS on the SIM card. By virtue of the SIM card you will get the data security.

The implementations are to keep the data separated from access by other midlets.
Native apps could in fact get to the RMS information, as well as backup applications depending on the design of the phone.

You could use BouncyCastle's encryption APIs to add some security to your data if needed or the SATSA (JSR177) crypto api to encrypt your data buffers before storing into the RMS. (might be faster if your phone supported it).

-Shawn

jaywayjohan
Offline
Joined: 2008-06-18
Points: 0

I agree with Shawn, BouncyCastle is a good alternative for encryption. In fact I have tried it a couple of years ago to encrypt the RMS data. As far as I remember the performance was good (enough). The biggest problem was actually the bad performance of RMS on some platforms.

Regards
Johan