ysfchn / SamFetch

A web API to download Samsung firmware easily without headers, authorization or anything that you don't want.
GNU Affero General Public License v3.0
46 stars 17 forks source link

[Bug] `/api/binary` endpoint returns the same response body regardless of request params #6

Open grwthomps opened 3 years ago

grwthomps commented 3 years ago

Not sure if I'm missing something but it seems like the /api/binary endpoint returns the same response body regardless of the params sent with the request.

Request: /api/binary?region=XAA&model=SM-G986U1&firmware=G986U1UEU1DUB7%2FG986U1OYM1DUB7%2FG986U1UEU1DUB7%2FG986U1UEU1DUB7

Response:

{
  "display_name": "SSP",
  "size": 5991219840,
  "filename": "SM-G986U1_1_20210416234737_q8wahqy67m_fac.zip.enc4",
  "path": "/neofus/910/",
  "version": "R (Android 11)",
  "encrypt_version": 4,
  "size_readable": "5.58 GB",
  "decrypt_key": "60813b9c940b3e286de84bff7baaf403"
}

The 20210416 date of the firmware is what tipped me off because I'm trying to download a firmware from 2-28. So I also tried a couple of other firmwares (all pulled from the /api/list endpoint) and they all returned the same response as above. I'm guessing it's just returning info for the latest firmware every time but I'm not sure.

ysfchn commented 3 years ago

I just tried to display raw data from Kies's servers, and looks like it got the device firmware code correctly as expected.

image

And when I look at the https://doc.samsungmobile.com/SM-G986U1/XAA/doc.html I can clearly see the release date.

image

But I don't know the exact reason why it returns that response to you.

I will research more about this problem and let you know if it is related to Kies / Samsung's servers itself or SamFetch.

grwthomps commented 3 years ago

Hmm that is strange. I just tried again with some different firmwares and got the same response. I even tried using Postman to send the request since I was using the openapi web interface before but that didn't change anything. Let me know if there's anything I need to try or test. Thanks for your help!

ysfchn commented 3 years ago

Probably this is the reason:

https://github.com/zacharee/SamloaderKotlin/issues/10#issuecomment-827292128

grwthomps commented 3 years ago

Yes, I think you're right. I just tested another tool on Windows 10 (SamFirm_Reborn) and it did the same thing so it seems like it's a change on Samsung's end.

zacharee commented 3 years ago

@ysfchn if you find any way around this, let me know.

Martyn911 commented 8 months ago

Are you affiliated with the site SamFirm ?