[Tool] Samloader (SamFirm / Frija replacement)

Search This thread

hinxnz

Senior Member
Jul 21, 2009
2,849
2,458
Also works with Termux!

How to:
First enable the storage permission for Termux in "Settings > Apps > Termux > Permissions > Storage".
Now set up Termux to install Samloader with commands below.
Code:
pkg upgrade
pkg install git
pkg install python
pip install --upgrade pip
Now you can install Samloader
Code:
pip3 install git+https://github.com/nlscc/samloader.git
To update Samloader
Code:
pip3 install --upgrade git+https://github.com/nlscc/samloader.git

Example:
Check update
Code:
samloader -m SM-G975F -r NZC checkupdate
Download
Code:
samloader -m SM-G975F -r NZC download -v G975FXXS9DTI8/G975FOXM9DTI8/G975FXXS9DTI8/G975FXXS9DTI8 -O /storage/emulated/0/Download/
Decrypt
Code:
samloader -m SM-G975F -r NZC decrypt -v G975FXXS9DTI8/G975FOXM9DTI8/G975FXXS9DTI8/G975FXXS9DTI8 -V 4 -i /storage/emulated/0/Download/SM-G975F_1_20200921075534_uii8oafhih_fac.zip.enc4 -o /storage/emulated/0/Download/SM-G975F_1_20200921075534_uii8oafhih_fac.zip
 
Last edited:

androidgadget

New member
Nov 1, 2020
1
0
Is problem "Forbidden 403":

Code:
samloader -m SM-A320FL -r OPV download -v A320FLXXS7CTFF/A320FLOPV7CTF1/A320FLXXS7CTG1/A320FLXXS7CTFF -o SM-A320FL_1_20200702221933_egl1xwbwrz_fac.zip.enc4
downloading SM-A320FL_1_20200702221933_egl1xwbwrz_fac.zip.enc4
Traceback (most recent call last):
  File "\Python\Python39\Scripts\samloader-script.py", line 33, in <module>
    sys.exit(load_entry_point('samloader==0.2', 'console_scripts', 'samloader')())
  File "\python\python39\lib\site-packages\samloader\main.py", line 45, in main
    r = client.downloadfile(path+filename, dloffset)
  File "\python\python39\lib\site-packages\samloader\fusclient.py", line 34, in downloadfile
    r.raise_for_status()
  File "\python\python39\lib\site-packages\requests\models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://cloud-neofussvr.sslcs.cdngc.net/NF_DownloadBinaryForMass.do?file=%2Fneofus%2F910%2FSM-A320FL_1_20200702221933_egl1xwbwrz_fac.zip.enc4
 

hanspampel

Senior Member
Dec 7, 2011
2,136
3,118
Does it works before? If so, it seems samsung changed something, tools like frija and samfirm didnt works anymore since saturday.
 

iBowToAndroid

Senior Member
Nov 9, 2010
4,349
1,351
Twin Cities MN
Does it works before? If so, it seems samsung changed something, tools like frija and samfirm didnt works anymore since saturday.
Are you also getting the "HTTPError: 403 Client Error: Forbidden" error?

checkupdate still works fine to see which version is newest for a given model and region, but can't actually download anything
 
G

GuestD4260

Guest
Decryption is not working

Hi I have downloaded the latest firmware for my device today. The firmware file is ENC4. I couldn't unzip the zip file after decrypting the firmware file. It seems Samsung is using new version of encryption which is ENC4. I did every thing from beginning twice to make sure that the firmware was not corrupted while was being downloaded. Can you please have a look on this issue?
 

hinxnz

Senior Member
Jul 21, 2009
2,849
2,458
Hi I have downloaded the latest firmware for my device today. The firmware file is ENC4. I couldn't unzip the zip file after decrypting the firmware file. It seems Samsung is using new version of encryption which is ENC4. I did every thing from beginning twice to make sure that the firmware was not corrupted while was being downloaded. Can you please have a look on this issue?

Instruction:
Code:
-V <enc-version>
Example for enc4:
Code:
-V 4
 
  • Like
Reactions: aIecxs

iBowToAndroid

Senior Member
Nov 9, 2010
4,349
1,351
Twin Cities MN
Hi I have downloaded the latest firmware for my device today. The firmware file is ENC4. I couldn't unzip the zip file after decrypting the firmware file. It seems Samsung is using new version of encryption which is ENC4. I did every thing from beginning twice to make sure that the firmware was not corrupted while was being downloaded. Can you please have a look on this issue?
It seems that everyone else is having trouble using the tool to download firmware, due to the HTTPS Forbidden URL message. Can you tell us how you successfully did the download?
 

javi_ruizs

Member
Feb 10, 2011
13
5
Madrid
Hey guys!

I got one problem with my VZW SM-G977U. I can't download any firmware, even with Firja. When I check the latest update, I get a "No latest firmware found" message.
Would you know why is this happening?

Thanks a lot in advance!
 

iBowToAndroid

Senior Member
Nov 9, 2010
4,349
1,351
Twin Cities MN
In that case, could you tell me how th input to the -v option would look like here? Something like PDA/CSC/.../...?
Regarding to Frija, how can I find the "Phone" value for the manual entry?
I was referring to Frija. There doesn't appear to be any way to use SamLoader to download Verizon firmware.

I would recommend finding firmware files for an older version on something like Android File Host, and then punching in those values. You don't have to enter in the exact values for whatever the current/most recent version is. It will automatically populate the latest version for you, if you enter in the correct values for any version that has ever been released
 

robertozombie

Member
Sep 4, 2018
14
0
I tried downloading a older firmware but it downloaded the latest. is it possible to download an older firmware?

I want to download the BTFN firmware (2nd latest) for Samsung SM-T510, but it downloaded the BTH4.

thanks

Sent from my SM-G970F using Tapatalk
 

iBowToAndroid

Senior Member
Nov 9, 2010
4,349
1,351
Twin Cities MN
I tried downloading a older firmware but it downloaded the latest. is it possible to download an older firmware?

I want to download the BTFN firmware (2nd latest) for Samsung SM-T510, but it downloaded the BTH4.

thanks

Sent from my SM-G970F using Tapatalk
No. Samsung only stores the latest/newest version on their servers, for each model. For any older versions, you'll need to consult a site like Android File Host or SamMobile
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    Hello,
    I recently wanted to download some firmware for my Samsung device, but I realized that there is no 100% open source program to do so. In fact, all the tools that claim to do so require a library that is packed by Themida (so it is difficult to check what this might be doing), in order to authenticate to the server. This is a native DLL, meaning that it is only compatible with Windows x86. Additionally, many of these tools are actually using stolen decompiled code from SamFirm, which, apart from being possibly illegal, means they would be difficult to maintain and run slowly.
    So, I decided to reverse engineer Smart Switch to figure out exactly how the download is taking place, and wrote a cross-platform tool that does this without using the Windows DLL that the other tools have, making it compatible with Linux and MacOS. I also realized that the newer versions are actually using a new version of the authentication algorithm, meaning possibly at some point the old tools might stop working as Samsung drops support for it.
    You can find it at:
    Code:
    https://github.com/nlscc/samloader
    To install, go to the downloaded repository and run:
    Code:
    pip3 install .
    See the README or look at the code for usage. You might want to know that my old github account, nm111, was unfortunately deleted, and I lost access to my old XDA account. You can see the verified email is the same however.
    Feel free to use the algorithms I figured out in your own code, so long as you don't use it in proprietary programs. It is licensed under GNU GPLv3 or later.
    This works for all phones, not just S10+, but I couldn't find a better forum and this is where Frija posted.
    2
    I made a bash script to use with Termux which automates everything directly on your device.

    It even offers to install samloader and its dependencies if they are not already installed.

    You can check it out here:
    https://github.com/lekron42/samloader_termux
    2
    Also works with Termux!

    How to:
    First enable the storage permission for Termux in "Settings > Apps > Termux > Permissions > Storage".
    Now set up Termux to install Samloader with commands below.
    Code:
    pkg upgrade
    pkg install git
    pkg install python
    pip install --upgrade pip
    Now you can install Samloader
    Code:
    pip3 install git+https://github.com/nlscc/samloader.git
    To update Samloader
    Code:
    pip3 install --upgrade git+https://github.com/nlscc/samloader.git

    Example:
    Check update
    Code:
    samloader -m SM-G975F -r NZC checkupdate
    Download
    Code:
    samloader -m SM-G975F -r NZC download -v G975FXXS9DTI8/G975FOXM9DTI8/G975FXXS9DTI8/G975FXXS9DTI8 -O /storage/emulated/0/Download/
    Decrypt
    Code:
    samloader -m SM-G975F -r NZC decrypt -v G975FXXS9DTI8/G975FOXM9DTI8/G975FXXS9DTI8/G975FXXS9DTI8 -V 4 -i /storage/emulated/0/Download/SM-G975F_1_20200921075534_uii8oafhih_fac.zip.enc4 -o /storage/emulated/0/Download/SM-G975F_1_20200921075534_uii8oafhih_fac.zip
    1
    Thank you. This is pretty cool. I downloaded it now and will check it out later tonight.
    1
    FKN AWESOMEEEEE :cool: :cool: :cool: working on mint GENIUS WORK!!!!!
    Captura de pantalla de 2021-02-09 19-59-26.png
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone