In this guide, we will show you the steps to download the Samsung stock firmware directly on your device without using a PC, via the Samloader for Android tool. There could be quite a few reasons why you would wish to manually install the firmware onto your device. In some instances, the OTA might be taking time to arrive, so you may grab hold of the update ZIP and directly flash it. Likewise, if you prefer to step into custom development, then you will need the AP file for patching it via Magisk and flashing it via Odin.
Moreover, you could also extract the PIT file from CSC to repair the partition table and hence unbrick your device. In this regard, it’s no hidden secret that the OEM uploads their firmware on the Firmware Update Server (FUS), however, there is no official way of accessing those servers. So you might have to look out for alternatives such as the Frija Tool. But the Frija Tool only has a Windows build, and does not support other OS such as Linux or macOS.
Then browsing through the repository of GitHub, I stumbled upon this excellent tool, which goes by the name Samloader. The biggest perk of this tool is its cross-device support- for Windows, Mac, Linux, and even Android! And in this guide, our focus will be on the last one. Today, we will show you how to download the Samsung stock firmware directly on your device without using a PC, via the Samloader for Android tool. Follow along.
What is Samloader Tool?
Samloader is a small Python-based script that is able to directly fetch firmware from the FUS and then download it onto the required device. After this, it would automatically decrypt the downloaded firmware (from .zip.enc4 or .zip.enc2 to .zip). The ned product will be the stock firmware for your Samsung device in a ZIP format. You could then easily extract this firmware and get the resultant BL, AP, CP, CSC, and Home CSC files. Add to it, the fact that it supports all four major platforms, and one couldn’t have asked for more.
However there is no GUI of this tool, you will have to type in the required command in the terminal. With that said, I have listed all the commands in this guide, you could directly copy-paste it with some slight modifications (such as changing the device name, CSC number, and so on). So on that note, let’s get started with the guide to download the Samsung stock firmware directly on your device without using a PC, via the Samloader for Android tool.
- How to Downgrade Samsung from Android 11 to Android 10 (OneUI 3.0 to 2.0/2.5)
- How to Boot to Recovery Mode on Samsung OneUI 3.0 Android 11
- Extract boot.img from boot.img.lz4 and Root Samsung
- How to Fix Missing OEM Unlock in Samsung Devices
How to Download Samsung Firmware without PC
- First and foremost, get hold of your device’s CSC Code as well as the Model Number. You may refer to our guide for the same: How to Check CSC and Model Number on my Samsung Device? [My device is Galaxy M20 Indian region, so the Model Number is SM-M205F and CSC in INS.]
- Now download and install the Termux app onto your device from Play Store. You will now have to give it Storage permission so that it is able to save the firmware onto your device. So go to the Permissions page on your device and select Allow under Storage.
- When that is done, launch the Termux app and update its existing package via the below command:
- After this, you will have to install Python on your device (since Samloader is a Python script based tool) via the following command:
pkg install python
- After every few steps, it will ask that you want to continue, type in yes, and hit Enter. These prompts will be related to network permission to download a few files.
- Once Python is installed, you will have to upgrade PIP as well:
pip install --upgrade pip
- Next up, you will need to install GIT so that you are able to clone Samloader directly from the Termux app itself:
pkg install git
- You could now install the Samloader app on your Android device via the following command:
pip3 install git+https://github.com/nlscc/samloader.git
- You might get a few yellow warning messages after executing this command, it’s completely normal. Leave it at this stage for a few seconds and the installation will be completed successfully on its.
- Now, let’s instruct Samloader to check for the latest available firmware for your Samsung device via the following command, replacing model_number and CSC accordingly [see example after the below command for reference].
samloader -m model_number -r CSC checkupdate
- In my case, the Model Number is SM-M205F and CSC is INS, so the above code transforms to (see below image):
samloader -m SM-M205F -r INS checkupdate
- Once the update check is complete, it will list out the firmware_version, something along the lines of (this is for my device, M20)
- Copy this entire firmware_version as it will be used across many steps.
- Now, you will have to provide this information to the Samload, including the path where this firmware file needs to be downloaded. The syntax for this command will be:
samloader -m model_number -r CSC download -v firmware_version -O storage_location
- For the sake of convenience, we will be setting your device’s Download folder as the storage location (i.e /storage/emulated/0/Download/). So entering all this information, the above command shall be something like this:
samloader -m SM-M205F -r INS download -v M205FDDS7CTL1/M205FODM7CTL1/M205FDDS7CTL1/M205FDDS7CTL1 -O /storage/emulated/0/Download/
- The download process shall now begin and could take a few minutes, depending on the size of the firmware as well as the network speed. Once downloaded, the firmware file will be placed under the Downloads folder of your device.
- So open the File Manager app on your device, go to the firmware file and copy its entire name, which we would be calling firmware_number.enc4. It would be something along the lines of [either enc4 or enc2 at the end]:
- Henceforth, the firmware_number.zip will then correspond to:
- Furthermore, as of now, the firmware file is still encrypted (enc4), hence it wouldn’t be of any use to us. So let’s proceed ahead and decrypt the firmware. The syntax for the same will be: [the below command is for enc4 file, if your’s is enc2, then replace 4 by 2 in the below commands, i.e V 4 by V 2 and firmware_number.enc4 by firmware_number.enc2]:
samloader -m model_number -r CSC decrypt -v firmware_version -V 4 -i /storage/emulated/0/Download/firmware_number.enc4 -o /storage/emulated/0/Download/firmware_number.zip
- In my case [enc4], the above command will transform to:
samloader -m SM-M205F -r INS decrypt -v M205FDDS7CTL1/M205FODM7CTL1/M205FDDS7CTL1/M205FDDS7CTL1 -V 4 -i /storage/emulated/0/Download/SM-M205F_1_20201208151334_b9bwymwxpu_fac.zip.enc4 -o /storage/emulated/0/Download/SM-M205F_1_20201208151334_b9bwymwxpu_fac.zip
- The decryption process will now start. Once done, you should the decrypted ZIP firmware file inside the Downloads folder on your device. You may now extract the firmware and get hold of the required BL, AP, CP, CSC, and Home CSC files.
So with this, we conclude the guide on how to download the Samsung stock firmware directly on your device without using a PC, via the Samloader for Android tool. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.