zacharee / SamloaderKotlin

MIT License
949 stars 107 forks source link

[INFO REQUIRED] Bifrost able to remember the device and CSC details even after its folder is deleted #131

Closed Dusk-Golem closed 10 months ago

Dusk-Golem commented 10 months ago

Yo, as the title suggests, how is Bifrost able to recall the device model and CSC from the previous session even if its folder has been deleted at the session end? I downloaded the firmware for my device SM-A530F and then deleted the Bifrost folder. Even after restaring the PC and extracting Bifrost zip to another folder, it can still recall my device model and the CSC region. WHY? What is the logic for the program to be portable if it is going to leave traces behind once its folder is deleted? Where is the information stored?

zacharee commented 10 months ago

Bifrost uses the Java Preferences API on desktop.

On Windows, settings are stored in the registry under HKEY_CURRENT_USER\Software\JavaSoft\Prefs.

On macOS and Linux, settings are stored under ~/.java/userPrefs/.

It was a popular request to add this feature.

Dusk-Golem commented 10 months ago

Bifrost uses the Java Preferences API on desktop.

On Windows, settings are stored in the registry under HKEY_CURRENT_USER\Software\JavaSoft\Prefs.

On macOS and Linux, settings are stored under ~/.java/userPrefs/.

It was a popular request to add this feature.

I am not against the feature mate, I am just saying that the most logical way to implement it is to create, for example, a config file in the same directory as the program executeable. Or you could add a toggle in Bifrost's settings whether to preserve the aforementioned details for future use or to delete them at program exit.

Anyway, I think it would be easier to add the toggle option instead of removing the functionality altogther so I request you to kindly add it in a future release.

zacharee commented 10 months ago

The next version will have a button on the "More" page to clear saved data.

I can't easily add a way to store settings in the same directory as the executable, since the app can be installed on every platform as well, and in most cases, it isn't possible to write to the installed directory.

Dusk-Golem commented 10 months ago

Thanks a lot mate. Looking forward to it.