download / backup / sync (big) files

Posted on
Page
of 2
/ 2
Next
  • maybe it's a stupid question but do we have apps available to backup or sync files from our smartwatch via bluetooth?

    Or is the only way at the moment to go through the ide?

    I can't download files that I guess are too big (banglerun trace) how can I get it?

    Thanks!

  • Generally to download data from apps I'd go to https://banglejs.com/apps/, connect, click My Apps and then the app in question should have a download button next to it, which will allow you to pull the files off in more useful formats (no need to use the IDE).

    I haven't heard of there being issues pulling large files off the Bangle with the app loader recently. I think the Web IDE could still have a timeout for large files. If you're having issues I can look into it though.

    There's no app with background sync or anything like that though - but it's an interesting thought.

  • I hadn't tried switching from https://banglejs.com/apps/, I confirm it worked the first time with no problems.

    Thanks!

  • I think, it´s very good idea to provide a backup/restore functionality in the IDE or in the app loader, which could restore all apps and all settings after a total crash of the watch.

    Why do I think, that this a good idea: Yesterday my Bangle2 was stuck, error message "Storage corrupted", then booted with a default set of apps, my apps all gone, all settings back to default. I had to repeat the app installation and settings process for all my apps and than upload my modified source code - tedious task! It would have been much easier to restore the last backup.

  • I had been wondering about implementing something like this - but I wonder if many people would actually perform a backup?

    I guess even if not, being able to download every file into a Zip would be a pretty neat addition

  • I wonder if many people would actually perform a backup?

    I've gone through the whole "reinstall my apps, reconfigure settings" a few times now, so I definitely would.
    Downloading every file into a zip (and restoring) would be good enough, even better would be a minimal backup: only data files and a list of installed apps, with some way to restore from that.

  • I wonder if many people would actually perform a backup?

    I have already done that multiple times by downloading (and later restoring) every file (or at least the data / config files) one by one which is cumbersome.
    An easier way to backup / restore would be great.

  • I would use that backup to duplicate all apps/settings to a second bangle when debugging or reproducing behaviour on different firmwares.

  • I wonder if many people would actually perform a backup?

    I had to do a complete reinstallation three times already, and even if it allowed me to sort out and reinstall only the apps I really needed, I would have liked to find more easily the few code modifications and the created data.
    Since then, I've got into the habit of bookmarking in the app store the applications I want to find each time I re-install, and not only the indispensable ones (which unfortunately doesn't include those with the "three bars" sub-menu) and to take a screenshot of the list of apps from the "more..." tab.
    I also sometimes try to save the json of the alarms, the pattern launcher and some others.

    So, I am for the possibility of making a general Backup :)

  • I wonder if many people would actually perform a backup?

    I've wanted this feature for a long time! And it's nice that others need it too!

  • I've just added Backup/Restore functions to the 'More...' tab of the development app loader - let me know how it goes!

    To make it work nicely I had to tweak the app upload code, so please keep an eye on that and let me know if you see any issues

  • Perfect, thanks @Gordon!

    Edited: I get this error: "Backup failed, Uncaught Error: Can't get pointer to data to write"

  • "Backup failed, Uncaught Error: Can't get pointer to data to write"

    Wow, that's odd. And that's backing up? I wonder whether you have a watch face that's causing the error and it gets picked up by the backup tool. I've just made some changes so the Bangle is reset before the backup starts, so that should fix it for you

  • Had the same problem on backup, the reset seems to fix it. The resulting zip file however is empty. Changing line 48 in backup.js to

    return zip.generateAsync({type:"binarystring"})­;
    

    fixes that as Espruino.Core.Utils.fileSaveDialog seems to expect data in (binary) string form.

    Edit: Browser is Chromium 98.0.4758.102 (Offizieller Build) Arch Linux (64-Bit)

  • Hello @Gordon,

    Since this update I am not able to upload apps with the development app loader. The stable app loader works well.

    Greetings
    Minnten

  • Changing line 68 in comms.js from

          function uploadCmd(resolve, reject) {
    

    to

          function uploadCmd() {
    

    seems to fix that. No idea if that has other side effect though.

  • Ahh, thanks! Just fixed - that was my fault. Tried to fix a lint error and inadvertantly broke it :)

    And thanks for spotting the binarystring - just fixed that too. Again, had it working before and then tried to use fileSaveDialog and must not have tested it :)

  • now works!

  • Awesome!
    I got backup to work, but ran into two minor issues:

    At some point last week I abandoned a firmware update, and the download choked on .firmware (I'm guessing because it was huge?) After properly updating my firmware, that file was gone, and it completed.

    >Execution Interrupted
    Interpreter error: [
       "LOW_MEMORY",
       "MEMORY"
     ]
    

    And after every single file, the IDE console shows a SyntaxError:

    >"eyJjdXN0b20iOnsid2VhdGhlciI6eyJzb3J0b3­JkZXIiOjE1fSwid2RjbGsiOnsic29ydG9yZGVyIj­otMTB9LCJtZXNzYWdlcyI6eyJzb3J0b3JkZXIiOj­V9LCJjYWwiOnsic29ydG9yZGVyIjo1fX19"
    Uncaught SyntaxError: Got ')' expected EOF
     at line 1 col 102
    ...ponent("wid_edit.json"))))))
                                  ^
    

    Edit: the caret points at the final closing parenthesis.
    All downloaded files look fine though.

  • wow, bravo, you have once again fulfilled one of our wishes, and in record time! you are really fantastic

    my first attempt unfortunately ended three quarters of the way through with a "backup failed, execution interrupted", but I'll try again :-)


    1 Attachment

    • 2E3F9EA0-A475-408D-B45E-73AFA66A1C99.jpeg
  • Yes, I think this is very useful. Somehow my Bangle.JS2 had to be reset 9 or 10 times now since I received it in december due to "storage corrupt". Sometimes 2 times in one week..
    This would be a nice help. I just begon developing a settings-customizer myself because that was the most cumbersome job, to reset the settings every time after I reinstalled the favorite apps (this was my saviour before, but then I lose all settings).

  • Somehow my Bangle.JS2 had to be reset 9 or 10 times now since I received it in december due to "storage corrupt"

    Have you updated your main Bangle.js firmware version? I know before 2v12 there were issues but I believe this is pretty much sorted now.

    At some point last week I abandoned a firmware update, and the download choked on .firmware

    I've just made it ignore this file. There was an issue with the built-in readFile function if the file wouldn't fit in RAM - so I think that's what was being hit here. I'm trying to get a fix in now.

  • Ok, hopefully fixed now

  • Have you updated your main Bangle.js firmware version? I know before
    2v12 there were issues but I believe this is pretty much sorted now.

    Hey Gordon, yes I did, it seems pretty stable since the last firmware update. I think it 'crashed' 1 time since that, so I am optimistic, but still very happy with the backup/restore button!!

  • I think it 'crashed' 1 time since that, so I am optimistic

    Ahh - that could actually have been because of corrupted data left over from the previous firmware, so it's not entirely unexpected. Hopefully that'll have been the last time you see it!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

download / backup / sync (big) files

Posted by Avatar for uname @uname

Actions