09-14-2008 10:20 PM
Does anyone know how to transfer file to and from simulator? (I don't mean loading java program... I want to debug file generated by a program.) I did some searching on the forum but no luck. (I guess most people here are developing with actual devices?)
Solved! Go to Solution.
09-15-2008 12:57 AM
In the Java Development Environment folder there is folder "simulator" - it is simulator "file system" folder.
Copy your cod file(s) to this folder and restart the simulator.
To clean the simulator file system - run clean.bat file, located in the same folder.
If you wish to only clean persistent store of the simulator - do not run clean.bat, but delete manually all *.dmp files in this directory and restart the simulator.
09-15-2008 01:35 AM
Check here an example to access file on media card.
In case you have written some files on mediacard in simulator - all files (along with other information, like persistent objects) will be written inside of the one of simulator *.dmp file. *.dmp files are device memory image files.
09-15-2008 11:41 AM
Right. I know about the input stream, file connection, etc., it's just the matter of varifying the output is correct. Are there utilities out there that would allow me to extract information from the *.dmp files? Does it follow some kind of standards?
(Thanks btw, you have been very helpful.)
09-15-2008 02:39 PM
As far as I know there is no standard on dmp file format. It is a RIM proprietary format. And there is no tool to extract data from a dmp file.
I would recommend you to create additional simple application, that reads file from SDCard.
And run this application after your text file has been saved. Run this application and read all contents of file and show it into screen.
I think it would be a good and reliable verification.
09-15-2008 02:41 PM
To be 100% sure that the file saved correctly - use hashCode() method of the loaded string data.
If hashCode() of written and loaded text are equal - your file has been saved properly.
09-15-2008 04:41 PM
The SD card dmp file appears to be FAT12 - at least that's what it calls itself (0x36 - 0x3A in the boot sector). I've entertained the idea of creating a file explorer for SD card dmp files but just don't have quite the amount of Copious Free Time needed to do it.
09-15-2008 11:24 PM
09-19-2008 06:10 PM - edited 09-19-2008 06:59 PM
So Mark, or Peter, or some other Blackberry folks, why does the simulator not support Mass Storage Mode like the real devices do? Seems like a logical thing to support, and it would allow placing files on the disk image for testing.
By the way, using the Desktop Software 18.104.22.168 I am able to transfer files to and from the simulator's internal (not SDCard) memory. After upgrading to Desktop Software 4.6 that capability went away, so I downgraded again.