ivanmeler / SamFirm_Reborn

200 stars 35 forks source link

Migrated to .net 8.0 #17

Closed rivercory closed 8 months ago

rivercory commented 9 months ago

For reasons such as security and performance improvement, I changed SamFirm based on .net 8.0. Please review the Pull Request and report any errors.

griha41 commented 9 months ago

I can't bet, but I think that most of Linux users would be "glad" and "grateful" about this. Most of Wine's releases has troubles with .net 6 & 8 LTS versions releases.

Nevertheless I'll try to run app on wine 9.0 and then write the results...

BillAnt1 commented 9 months ago

I was stunned at Samsung's new requirement of IMEI/Serials for downloading firmware, it's crazy. Even Apple's allows iOS downloads without IMEI/Serials. Also Samsung took away the most useful feature of their Samsung account which allowed remotely unlocking the screen password in case it was forgotten or maliciously set by a malware. SMH . Unless the IMEI/Serial checks could be somehow bypassed, I would suggest starting an online database by collecting IMEI/Serials for every model/CSC out there directly from within the SamFirm app. Whoever clicks on a consent box in the app, would allow uploading their IMEI/Serial for every successfully pulled firmware model/CSC. I would gladly contribute since I work at a phone repair shop and have access to lots of phones models/CSC/IMEI's. What do you guys think about an encrypted online database?

griha41 commented 9 months ago

I was stunned at Samsung's new requirement of IMEI/Serials for downloads firmware, it's crazy. Even Apple's allows iOS downloads without IMEI/Serials. Also Samsung took away the most useful feature of their Samsung account which allowed remotely unlocking the screen password in case it was forgotten or maliciously set by a malware. SMH . Unless the IMEI/Serial checks could be somehow bypassed, I would suggest starting an online database by collecting IMEI/Serials for every model/CSC out there directly from within the SamFirm app. Whoever clicks on a consent box in the app, would allow uploading their IMEI/Serial for every successfully pulled firmware model/CSC. I would gladly contribute since I work at a phone repair shop and have access to lots of phones models/CSC/IMEI's. What do you guys think about an encrypted online database?

Idea is nice, BUT:

  1. any lock could be opened = database maybe attacked and stealed.
  2. Let's look over Samsung idea, i bet they're logging each downloading, it may cause the blocking download by IMEI.
  3. Such approach may cause ban download by IP like each service center should submit own static IP and any other IP would be blocked, are really wish such pain?

And the last idea, it's no way to download each firmware it's basically useless, so you'll download for you phone(s), or phone that in you hands and you may get the IMEI without any kind of problems, so why for shall any one create such useless database?

With my regards to your idea.

BillAnt1 commented 9 months ago

Idea is nice, BUT:

Well I was trying to suggest something that might be useful for all the users out there. Of course I understand the sensitive nature of IMEI's, but anyone can use an IMEI generator 14 digits + check-sum. I already tested several SM-G781U IMEI's incremented and decremented by a couple of digits and they all worked fine. So obfuscation is possible, even stored values don't have to be the real ones, but programmatically generated based on narrow ranges. Anyway, I will keep a local database for myself, Samsung's crap has certainly thrown a monkey wrench into the party. It's the last thing I would have expected from them, more like from Apple. :(
Just some after-thoughts....

  1. A well implemented database could be protected, otherwise every bank out there would have been hacked by now.
  2. Doubt Samsung is blocking IMEI's for downloading, and if they do just increment.decrements the last few digits.
  3. IP's can be easily spoofed with a simple/free proxy/VPN, not an issue. imo
ivanmeler commented 9 months ago

Honestly only reason i didnt do any sort of db for this is because who knows what samsung will do next if we implement it, last few weeks they tried few things to block fw downloaders from working.

.net 8 migration looks fine, will test it tomorrow and merge it in a few days

rivercory commented 9 months ago

Thank you for your reviews.

BillAnt1 commented 9 months ago

Honestly only reason i didnt do any sort of db for this is because who knows what samsung will do next if we implement it, last few weeks they tried few things to block fw downloaders from working.

.net 8 migration looks fine, will test it tomorrow and merge it in a few days

Sounds good.... hoping that the loyal SamFirm community eventually will come up with a clever solution. ;) Anyway, if you need any model/variant/CSC/IMEI samples, let me know.

After some testing, I found that most US AT&T and Tmobile IMEI's will pull "ATT/DSH" or "TMO" firmwares respectively, and also XAA "U1" carrier free firmware with the same IMEI. Not in all cases, but mostly. Pulling Verizon "VZW" is a bit trickier, the PDA/CSC/Phone fields must be filled in manually in order to work. The entered firmware version can be older than the current one, it just needs to be present in those fields.

Also, I found that ONLY the first 12 digits (maybe even less) of the IMEI needs to be saved, because the 13+14th digits can be generated randomly and the 15th check digit (CRC) has been calculated via the Luhn algorithm. I have already tested this with dozens of models/variants/IMEI's, and it's working fine with random 13+14th digits + 15th CRC. Therefore saving only the first 12 digits in an encrypted online database and generating the last 3 digits programmatically, should avoid issues with Sammy. For testing purposes, the last 2 digits can be filled in manually with random digits, and the CRC can be generated by a phone or PC web/app like below.

Speaking of which, it would be a welcome addition to save the IMEI's locally in the log file, and maybe add it as a list to the XML file like the model and CSC codes, in order to avoid having to re-enter them manually every time when checking for new firmware. Better yet, have it stored in individual profiles including the model/CSC/IMEI. Wishful thinking,... heh

Android app https://play.google.com/store/search?q=imei%20calculator&c=apps

PC/phone web app https://simplycalc.com/luhn-calculate.php

rivercory commented 9 months ago

Happy New Year everybody 🎉

rivercory commented 8 months ago

Today is my birthday🎂 Can you wish me a happy birthday?

ivanmeler commented 8 months ago

Today is my birthday🎂 Can you wish me a happy birthday?

soery for delay with this, caught flu and forgot to check it later, also happy birthday and best wishes

rivercory commented 8 months ago

@ivanmeler Thank you for your merging! I hope my commit will help this project. I will continue to contribute to this project.