Exporting Importing the File System on FxOS - mozilla/pluotsorbet GitHub Wiki

Exporting

  1. Connect WebIDE and start dev tools

  2. In console run:

   cd(frames[0]);

and

fs.exportStore(function(blob) {
  var filename = "fs-" + Date.now() + ".json";  
  saveAs(blob, filename);
  console.log("adb pull /sdcard/downloads/" + filename);
});
  1. Take the adb pull ... command the above logs(takes a few seconds) and run it in a real terminal.

Importing

  1. Move your json filesystem dump into the j2me.js directory.

  2. Install and run the app in WebIDE and start dev tools

  3. In the console:

cd(frames[0]);

and (replace <your json file name>)

load("app://j2mejs.mozilla.org/<your json file name>", "blob").then(function(blob) {
  fs.importStore(blob, function() { console.log("imported"); });
});