Homebrew RELEASE JKSV (save manager) for Switch

  • Thread starter Thread starter JK_
  • Start date Start date
  • Views Views 202,667
  • Replies Replies 633
  • Likes Likes 27
Not a good idea! This can lead to corruption of the file system over a longer period of time, especially with tools that access the SD card's file system. Homebrew applications should always be closed via their exit function, which is usually the PLUS button. I speak from experience.

@JK_ I come from a German multi-console forum and have dedicated a topic there to the JKSV tool. There I have posted what I consider to be the most useful settings as a picture for users.
That is only true if the homebrew does not block the applet from closing. There is an API for locking the exit (ie, closing via home). You may notice this when closing certain homebrew via home when they display the spinning icon.

As long as the homebrew locks exit, there is no risk of corruption.
 
  • Like
Reactions: Muxi
That is only true if the homebrew does not block the applet from closing. There is an API for locking the exit (ie, closing via home). You may notice this when closing certain homebrew via home when they display the spinning icon.

As long as the homebrew locks exit, there is no risk of corruption.
The JKSV had been upgraded to avoid file settings corruption and even now the settings are saved on the change of config so even if you exit homebrew by pressing home button the new settings are kept
 
  • Like
Reactions: Muxi
I know how to RTFM and all (I swear), but the "edit blacklisted titles" option is not very intuitive, when everything else is. I saw the setting in the settings menu and thought "Oh, there's a few games I don't want to see", pressed A on the menu option and... nothing. No menu popping up, just nothing at all happening.

I understand that I blacklist the titles from the game selection screen (after having read the manual), and this caused some confusion. Would it be possible to add a dialogue box that says something to the effect of "No titles currently blacklisted, please select one or more titles in the game select menu" if no blacklisted titles are present? Or any other error if there's nothing currently blacklisted when a user selects the option? Otherwise someone might select the menu option wanting to blacklist titles, and get the impression that it is not working properly. It is never a good feeling selecting an option where your input goes through and there's no response from the software. I was honestly worried about closing the program because I thought it may be doing something in the background, if I close it I might break something etc.

:rolleyes: I don't know what I'm really complaining about, JKSV is among the finest pieces of homebrew made for the Switch, it never let me down. However, since everyone here is sharing feedback, ideas and thoughts I might as well get my two cents in. I did a bit of QA work over the decades, and I know that it can come off as a bit nitpicky. I hope that my feedback is received in the spirit that it was given and intended.
 
The JKSV had been upgraded to avoid file settings corruption and even now the settings are saved on the change of config so even if you exit homebrew by pressing home button the new settings are kept
That's not really what I mean. Without blocking exit, closing from the home screen immediately terminates the program - even if it's in the middle of a transfer. I couldn't see locking in the code, but I am at work atm and browsing via phone so I may have missed it. I'll send a pr when I'm home
 
  • Like
Reactions: impeeza
That's not really what I mean. Without blocking exit, closing from the home screen immediately terminates the program - even if it's in the middle of a transfer. I couldn't see locking in the code, but I am at work atm and browsing via phone so I may have missed it. I'll send a pr when I'm home
I'll look into it. It's easier to do this with the rewrite code cause you can just call the home blocking stuff when one of the task/progress states are pushed to the vector and undo it in the deconstructor.

@rave420 Don't be afraid. I normally take most stuff into consideration. The only time I will get pissed, and not at everyone, is if something isn't true or it's insulting in my opinion. Like the few times someone has literally said I am or something I did was lazy. Considering I'm taking time out of my day to write something that I don't get a single cent for... yeah, saying I'm lazy cause I don't push updates or do whatever you want when you want it does rub me the wrong way.
 
  • Love
Reactions: impeeza
Like the few times someone has literally said I am or something I did was lazy.

Lmao you're not lazy, don't let anyone tell you different. You're a developer working on your free time for free. Absolutely anything you or anyone else does that helps the community is great, and screw the entitled people. For every user that whines and moans and makes demands, there's hundreds more who just enjoy the fruits of your (or anyone else's) labor, you just don't hear from them because they are happy and content.

I do understand the frustration however.
 
  • Like
Reactions: impeeza
I'll look into it. It's easier to do this with the rewrite code cause you can just call the home blocking stuff when one of the task/progress states are pushed to the vector and undo it in the deconstructor.

@rave420 Don't be afraid. I normally take most stuff into consideration. The only time I will get pissed, and not at everyone, is if something isn't true or it's insulting in my opinion. Like the few times someone has literally said I am or something I did was lazy. Considering I'm taking time out of my day to write something that I don't get a single cent for... yeah, saying I'm lazy cause I don't push updates or do whatever you want when you want it does rub me the wrong way.
I can send a pr with the changes, you don't have to merge, but can use it as an idea
Not really. I've noticed a lot of people never seem to venture further than the users and system type saves in the first menu with the icons.

You know those little prompts that make you hold the buttons to confirm things? Those actually drive me nuts and wouldn't be there if it weren't for people accidentally deleting their backups or overwriting their saves and coming to me to complain that there should be a better way to prevent it. Solution: Make you hold the button for 3 seconds or so to confirm. What happens then? People complain about having to hold the button and how much extra time it takes. Another solution: Dump the save automatically before restoring another. What happens then? People complain about all the extra backups. Hahaha. You really can't win or please everybody. So, I did my best. The problem is, it's sort of hidden. I'm not perfect and never claimed to be. They aren't immediately obvious or visible when you first start JKSV. They get pushed down and hidden because JKSV's first priority is being a save manager. I thought it would be best to have users and saves first. Unintended side effect: People can't see the settings option. It also doesn't help that LibNX doesn't really work the same as ctrulib in certain aspects too. The config saving being the best example. On 3DS, once aptMainLoop or the isRunning function returned false, it meant JKSM was closed either by pressing start or the home button. On Switch, this isn't true so now you have the issue of the config not saving unless JKSV is closed with the plus button and allowed to cleanup properly. Maybe I'm wrong, so someone can correct me if that isn't the case anymore.

I'm also always open to constructive criticism and suggestions too. I'm not going to get mad, throw a fit, and storm off like I'm God's gift to you all that can't be challenged. I know I'm not perfect. It's just a hobby for me that I do in my free time. Believe me when I say this, because it's 100% true: If you had any idea how many times I've looked at JKSV's old code and thought to myself, "What in the world was I thinking back then?" when I was rewriting it...
Fwiw, I am a huge fan of the holding a button to continue. It's prevented me from accidently deleting stuff or restoring the wrong save.

Also, the bit about 3ds appt main loop, the switch has exactly that. It will return false when the applet is requested to exit. However, it will only return false once, so if multiple threads / loops are polling it, those loops will get stuck.

The solution to the above is to create a wrapper function called ExitRequested(), which has a mutex to make it thread safe. The function has a static bool which is set with "var|= !appletMainLoop()". That way, as soon as appletMainLoop() returns false, the bool is set to true, and will remain true due to it being an OR.

Apologies if you already figured this out, I've just started reading back a few pages.
 

Not valid JKSV saves, what can I do?​


I would like to ask for advice because I’m a bit clueless. I reinstalled my Switch, but I didn’t back up the game saves in a valid way: I just copied the JKSV folder to my PC. Now I would like to restore them. Would that be impossible?

Thanks in advance!
 
Also, the bit about 3ds appt main loop, the switch has exactly that. It will return false when the applet is requested to exit. However, it will only return false once, so if multiple threads / loops are polling it, those loops will get stuck.
Sorry it took a bit. I looked into it after you mentioned it and the rewrite now blocks the home button and has a lock that prevents exiting when certain things are running. Now, for appletMainLoop... This is the only place in the rewrite where it's called (https://github.com/J-D-K/JKSV/blob/rewrite/source/main.cpp). As you can see, config::save() should be called after the main loop is broken by either appletMainLoop or JKSV. If I press plus, I'm good and config gets saved. Home menu, it doesn't. I'm not sure what I'm doing wrong here. There are no threads running and calling it to interfere with it. I could never figure it out, because the same thing works on 3DS no problem for me.
 

Not valid JKSV saves, what can I do?​


I would like to ask for advice because I’m a bit clueless. I reinstalled my Switch, but I didn’t back up the game saves in a valid way: I just copied the JKSV folder to my PC. Now I would like to restore them. Would that be impossible?

Thanks in advance!
Not at all copy the JKSV folder to your card and restore the savegames using the JKSV App.
 
  • Like
Reactions: Blythe93
Hello! I'm having problems with JKSV.

I keep facing this error when I run JKSV on applet mode: error code: 2168-0002 (0x4a8) (but I don't even have the atmosphere/contents/0100000000001000 folder).

I tried running JKSV through an app (non applet mode), but instead of crashing it gives me a game error, software closed.

Any idea what's wrong?

EDIT: Found a fix: https://github.com/J-D-K/JKSV/issues/177
 
Last edited by Nytrite,
Just a small update for everyone: I'm working on prototyping the rewrite's version of the remote storage code on my PC right now. After that, it should almost be drag and drop. I decided to go through and read Google's API documentation again. Originally, I was just rewriting the old code to fit my current way of doing things, but I think I'd be more comfortable getting familiar with how it actually works again. I know it seems like it's taking a long ass time, and it is, but I only have so much time to work on stuff. I will finish the rewrite even if it kills me. WebDav is probably going to take me a while too. I didn't write it to begin with, and if I had, it wouldn't work the way it does.

I do feel odd. The Switch 2 is right around the corner, but I don't want to leave JKSV in the state it's currently in. Even if the Switch 2 does get some kind of modding solution, JKSV will probably end with the Switch. It was fun when I was younger, but the older I get, the less time I have for stuff like this. When I was younger, sitting around on /vp/ writing tools to cheat at Pokemon was fun, but those days are long over.
 
Just a small update for everyone: I'm working on prototyping the rewrite's version of the remote storage code on my PC right now. After that, it should almost be drag and drop. I decided to go through and read Google's API documentation again. Originally, I was just rewriting the old code to fit my current way of doing things, but I think I'd be more comfortable getting familiar with how it actually works again. I know it seems like it's taking a long ass time, and it is, but I only have so much time to work on stuff. I will finish the rewrite even if it kills me. WebDav is probably going to take me a while too. I didn't write it to begin with, and if I had, it wouldn't work the way it does.

I do feel odd. The Switch 2 is right around the corner, but I don't want to leave JKSV in the state it's currently in. Even if the Switch 2 does get some kind of modding solution, JKSV will probably end with the Switch. It was fun when I was younger, but the older I get, the less time I have for stuff like this. When I was younger, sitting around on /vp/ writing tools to cheat at Pokemon was fun, but those days are long over.
Kudos to you for making such an amazing homebrew app. To be honest, I'm still using the latest version before the rewrite, i think, and it still works flawlessly as far as I'm concerned. Thanks for all the commitment over the years.
 
Thanks everyone. I don't know if I'll be able to pull it off yet, but I'm thinking about trying to log in differently on the Switch. I'm thinking there should be a way to do it like Android TV apps do. It would make it much less of a hassle to login. Just like input a code or something on your phone? Might be a fun thing to play around with.
 
As of today, the last post I made is confirmed happening. Rewrite JKSV will basically tell you to go to google.com/activate or whatever it is and you will just have to punch in a code on your PC or phone to log in. The only drawback is that the drive scope they allow for this method is more limited than the full scope the old way allowed. I don't see anything that would prevent JKSV from doing what it did before, though. I also had a buddy show me something they use at work that would actually make it possible to have JKSV use Drive and WebDav at the same time, but I don't want to get ahead of myself. Really fun stuff.
 
As of today, the last post I made is confirmed happening. Rewrite JKSV will basically tell you to go to google.com/activate or whatever it is and you will just have to punch in a code on your PC or phone to log in. The only drawback is that the drive scope they allow for this method is more limited than the full scope the old way allowed. I don't see anything that would prevent JKSV from doing what it did before, though. I also had a buddy show me something they use at work that would actually make it possible to have JKSV use Drive and WebDav at the same time, but I don't want to get ahead of myself. Really fun stuff.
Have fun mate!!
 
  • Like
Reactions: JK_ and Blythe93
Have fun mate!!
I am. It actually works a million times better than the old code. I managed to create 65,535 new folders and crash Google's web UI with it and delete them all again just fine, again, something Google's own UI couldn't handle. Killed two birds with one stone. I know it can successfully list and parse thousands of items and the token refreshing works fine, cause creating them all took hours. Something I'm 99% sure the old code wouldn't be able to handle correctly.

Basically, I'm better than ever. Just don't have the time to do it all. What else is new though?
 

Site & Scene News

Popular threads in this forum