Exporting Importing the File System on FxOS - mozilla/pluotsorbet GitHub Wiki
Exporting
-
Connect WebIDE and start dev tools
-
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);
});
- Take the
adb pull ...
command the above logs(takes a few seconds) and run it in a real terminal.
Importing
-
Move your json filesystem dump into the j2me.js directory.
-
Install and run the app in WebIDE and start dev tools
-
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"); });
});