Frija was released as an alternative as an alternative to SamFirm. Since both the tools work only with Windows, macOS and Linux users found themselves in a no man’s land. Sam loader is a Python-based tool that can download Samsung firmware binaries (BL, AP, CP, and CSC) from the Samsung Firmware Update Server. It’s a great Frija alternative that works flawlessly on all major operating systems. Follow this Samloader tutorial to learn how to use it on macOS, Linux, and Windows.
Samloader is a Python-based tiny script (less than 50KB) and can run via Terminal on Mac, Windows, Linux, and even Android. Unlike Samfirm and Frija, Samloader has no GUI which makes it a bit complicated. The most striking feature of this minimal Samsung firmware downloader is its cross-platform compatibility. You can also use Samloader on Android via Termux to download firmware.
Features of Samloader
Samloader is a portmanteau formed by combining two words Samsung + Downloader. The utility is the result of reverse-engineering the process used by Samsung Smart Switch to authenticate the algorithms of the update server. It is an open-source project. Since it uses the latest algorithm from Smart Switch, it’s a future-proof firmware download tool.
The tool has been developed by GitHub user nlscc and it can:
- Check the latest available firmware update for your Samsung device model.
- Download the stock firmware from Samsung FUS in an encrypted format with ‘.zip.enc4‘ extension.
- Decrypt the encrypted (enc2 or enc4) firmware into flashable packages: BL, AP, CP, CSC, and Home CSC.
Steps to Use Samloader on Mac
Samloader is the only firmware download tool available for Mac. Let’s see how to install, set up, and use it on Mac to check Samsung firmware updates and download them.
- Download the latest 64-bit Python installer for macOS.
- Double-click the downloaded python-3.9.0-macosx10.9.pkg file to install it.
- Now launch the Mac Terminal. If you don’t know how to do that, navigate to Finder > Go > Utilities and click Terminal.
- Execute the following command in the Terminal window to clone the Samloader repository using Git.
pip3 install git+https://github.com/nlscc/samloader.git
- Your Mac might prompt you to download an additional program called Git Installer.
- You’ll get the “Successfully installed…” message in the Terminal. If you get a warning telling you to upgrade the version of PIP, you can ignore it. However, if you wish to upgrade PIP, copy and paste the text highlighted in green (in the screenshot above) into the Mac Terminal window and hit Enter.
- To check the latest firmware update version for your Samsung phone or Tab, run the following command in the Terminal.
samloader -m [model_number] -r [CSC] checkupdate
- For instance, if your Samsung device’s model number is SM-N986U, you should replace [model number] in the above code with SM-N986U. In the same way, you are supposed to replace [CSC] Â with the CSC code of your Samsung device. Thus, the command you execute would look like this.
samloader -m SM-N975F -r INS checkupdate
- Samloader will return the latest firmware version available for your Samsung device. In my case, the firmware version for my Galaxy Note 10+ is
N975FXXU6DTJ4/N975FOXM6DTJ4/N975FXXU6DTJ2/N975FXXU6DTJ4
- Now that you have the Samsung firmware version to download, you need to execute another command mentioning the device model number, CSC code, full firmware version you got above, and the location path on your computer where you want to save the firmware.
samloader -m [model_number] -r [CSC] download -v [firmware_version] -O [output_directory]
- Having replaced the required fields highlighted in the above command with actual information, your command should look like below.
samloader -m SM-N975F -r INS download -v N975FXXU6DTJ4/N975FOXM6DTJ4/N975FXXU6DTJ2/N975FXXU6DTJ4 -O /Users/rakeshshukla/Desktop/
- Samloader will connect and authenticate to the Samsung FUS and start the download. Depending on your network speed, it might take a while to complete.
- You’ll find the downloaded firmware file in the output location or directory.
SM-N975F_1_20201016232934_i2b0cuyqhv_fac.zip.enc4
- Since the downloaded Samsung firmware is encrypted, decrypt it to get the Odin-flashable firmware binaries with the following command.
samloader -m [model_number] -r [CSC] decrypt -v [firmware_version] -V 4 -i [encrypted_firmware_name] -o [firmware_name]
- Replace the highlighted entries in the above code appropriately and paste the edited code into the Mac Terminal. If the firmware you downloaded has .enc2 encryption, replace ‘4‘ in the above line with ‘2‘.
samloader -m SM-N975F -r INS decrypt -v N975FXXU6DTJ4/N975FOXM6DTJ4/N975FXXU6DTJ2/N975FXXU6DTJ4 -V 4 -i SM-N975F_1_20201016232934_i2b0cuyqhv_fac.zip.enc4 -o SM-N975F_1_20201016232934_i2b0cuyqhv_fac.zip
- It will now start decrypting the Samsung firmware and you’ll get a .zip file.
SM-N975F_1_20201016232934_i2b0cuyqhv_fac.zip
- Extract the firmware zip file to get all 5 binaries: BL, AP, CP, CSC, and Home_CSC.
Done! You’re all set to flash Samsung firmware on Mac using Heimdall.
How to Use Samloader on Windows
If you are a Windows user, you must have used Samfirm or Frija to download Samsung firmware. Samloader is quite a new Python-based downloader without a user interface. Let’s check out how to use it on a Windows PC.
- Download and install the stable Python release for Windows.
- Also, install Microsoft Visual C++ Tools otherwise you’ll get the following error.
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
- When it’s installed, also install Git for Windows. It’s required only if you want to install Samloader.git using the next step. You can skip this step otherwise.
- Launch the Command Prompt and execute the following command to clone the Git on your PC.
pip3 install git+https://github.com/nlscc/samloader.git
- If you can’t install Samloader this way, download the latest version from Github.
- Extract the downloaded zip and open the extracted folder. Launch a Windows Powershell window inside the folder. Type “cmd” in the ‘samloader-master‘ folder address bar and hit the Enter key to do that.
- Now issue the following command to install Samloader in the command window.
pip3 install .
- Alternatively, you can install Samloader without launching the command window and navigating to the ‘samloader-master‘ folder.
pip3 install <path-to-samloader> (such as: pip3 install C:\samloader-master)
- You can now check for the latest update for your Samsung Galaxy phone or Tab.
- Execute the following command in the command window. I’ve already attached the screenshots above.
samloader checkupdate [model_number] [CSC] or samloader -m [model_number] -r [CSC] checkupdate
- Make sure the command you issue to check the update looks like this.
samloader checkupdate SM-N975F INS or samloader -m SM-N975F -r INS checkupdate
- Samloader will give the latest firmware version available for your Samsung Galaxy device.
- Now use one of the following commands to download the Samsung firmware. The ‘.‘ in the first command means the firmware will be downloaded to the Samloader folder.
samloader download [firmware_version] [model_number] [CSC] . or samloader -m [model_number] -r [CSC] download -v [firmware_version] -O [output_directory]
- Having replaced the highlighted fields with appropriate values, the command you execute should look like this. The first command will save the firmware file to the “samloader-master” directory, while the second will save it to your selected location.
samloader download N975FXXU6DTJ4/N975FOXM6DTJ4/N975FXXU6DTJ2/N975FXXU6DTJ4 SM-N975F INS . or samloader -m SM-N975F -r INS download -v N975FXXU6DTJ4/N975FOXM6DTJ4/N975FXXU6DTJ2/N975FXXU6DTJ4 -O C:\Users\Technastic\Desktop\
- Samsung firmware download will initiate.
- Once the download is finished, you’ll have to decrypt it. While older Samsung firmware has .enc2 (decrypt2) encryption, the newer ones have .enc4 (decrypt4). To do that, you’ll have to use another command.
samloader decrypt2/decrypt4 [firmware_version] [model_number] [CSC] [encrypted_firmware_name] [firmware_name] or samloader -m [model_number] -r [CSC] decrypt -v [firmware_version] -V 2/4 -i [encrypted_firmware_name] -o [firmware_name]
- Having replaced the highlighted values, the command you issue will look as shown below.
samloader decrypt4 N975FXXU6DTJ4/N975FOXM6DTJ4/N975FXXU6DTJ2/N975FXXU6DTJ4 INS SM-N975F_1_20201016232934_i2b0cuyqhv_fac.zip.enc4 SM-N975F_1_20201016232934_i2b0cuyqhv_fac.zip or samloader -m SM-N975F -r INS decrypt -v N975FXXU6DTJ4/N975FOXM6DTJ4/N975FXXU6DTJ2/N975FXXU6DTJ4 -V 4 -i SM-N975F_1_20201016232934_i2b0cuyqhv_fac.zip.enc4 -o SM-N975F_1_20201016232934_i2b0cuyqhv_fac.zip
- Wait until Samloader decrypts the downloaded firmware. You’ll then be able to extract the firmware zip file to get the flashable firmware packages with .tar.md5 extension.
Having downloaded the firmware, you can use Odin to install the firmware on your Samsung device.
Fixing Samloader Not Recognized Error
If you have not properly set up Python and Samloader on your Windows PC, you might encounter the following error.
samloader : The term 'samloader' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + samloader -m SM-N975F -r INS checkupdate + ~~~~~~~~~ + CategoryInfo : ObjectNotFound: (samloader:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
You can easily fix the error by adding Samloader to the Windows command search path via the Environment variables setting on your PC and trying again.
Using Samloader on Linux
Since I have already described the steps to use this fantastic cross-platform Samsung firmware downloader, there’s no need to repeat them. If you’re using one of the Linux distros, you can download Samsung firmware using Samloader. You can follow the steps given above for Mac. You can find the steps to install Python on Linux in this official Python installation documentation.
Having downloaded the Samsung firmware, you should download Odin4 for Linux and install the firmware binaries using commands.
This is all about Samloader, a Samsung firmware downloader for Mac, Linux, and Windows. In case you encounter any issues while following the steps in this tutorial, please comment below.