Rehber Linux ile Samsung cihazlara yazılım atma

Linux bir bilgisayar ile Samsung bir telefona yazılım atmak istiyorsanız iki alternatifiniz var: Odin4 ve heimdall.
Odin4'ü xda forums üzerinden yükleyebilirsiniz.
Kod:
unzip odin.zip
./odin4 -h
İsteğe bağlı olarak programı /bin klasörüne kopyalayabilirsiniz:
Kod:
sudo cp odin4 /bin

Linux'daki odin4, Windows'taki odin gibi çalışır. AP, BL, CP ve CSC dosyalarını belirterek yazdırma yaparsınız.
Cihazın görünüp görünmediğini kontrol etmek için: odin4 -l (Cihaz görünmüyorsa root olarak çalıştırın.)
?hash=956249d550feac037bdddf2683ea3790.png

Örnek olarak cihaza stock ROM atmak için:
odin4 -a AP_xyz -b BL_xyz -c CP_xyz -s CSC_xyz
?hash=956249d550feac037bdddf2683ea3790.png

IMG_20230511_191837.jpg

Ne yazık ki odin4'ün Linux sürümünde auto-reboot kapatma özelliği yok, yani TWRP kurarken dikkatli olmanız lazım.

Heimdall ise odin4'e göre biraz daha zor ve kafa karıştırıcı ama daha profosyonel bir yazılım.
Heimdall'ı dağıtımınızın paket yöneticisini kullanarak yükleyebilirsiniz.
Kod:
sudo apt install heimdall  #debian
sudo dnf install heimdall  #fedora
sudo pacman -Sy heimdall   #arch
sudo emerge heimdall       #gentoo
Kod:
Usage: heimdall <action> <action arguments>

Action: close-pc-screen
Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]
           [--usb-log-level <none/error/warning/debug>]
Description: Attempts to get rid off the "connect phone to PC" screen.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: detect
Arguments: [--verbose] [--stdout-errors]
           [--usb-log-level <none/error/warning/debug>]
Description: Indicates whether or not a download mode device can be detected.

Action: download-pit
Arguments: --output <filename> [--verbose] [--no-reboot] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>]
Description: Downloads the connected device's PIT file to the specified
    output file.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: flash
Arguments:
    [--<partition name> <filename> ...]
    [--<partition identifier> <filename> ...]
    [--pit <filename>] [--verbose] [--no-reboot] [--resume] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>]
  or:
    --repartition --pit <filename> [--<partition name> <filename> ...]
    [--<partition identifier> <filename> ...] [--verbose] [--no-reboot]
    [--resume] [--stdout-errors] [--usb-log-level <none/error/warning/debug>]
    [--tflash] [--skip-size-check]
Description: Flashes one or more firmware files to your phone. Partition names
    (or identifiers) can be obtained by executing the print-pit action.
    T-Flash mode allows to flash the inserted SD-card instead of the internal MMC.
    Use --skip-size-check to not verify that files fit in the specified partition.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.
WARNING: If you're repartitioning it's strongly recommended you specify
        all files at your disposal.

Action: help
Description: Displays this dialogue.

Action: info
Description: Displays information about Heimdall.

Action: print-pit
Arguments: [--file <filename>] [--verbose] [--no-reboot] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>]
Description: Prints the contents of a PIT file in a human readable format. If
    a filename is not provided then Heimdall retrieves the PIT file from the
    connected device.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: version
Description: Displays the version number of this binary.
Cihazın görünüp görünmediğini kontrol etmek için: heimdall detect
?hash=956249d550feac037bdddf2683ea3790.png

Heimdall'ın odin4'e göre daha zor olmasının sebebi Heimdall'In AP, BL, CP, CSC şeklinde yazdırma yapmaması. Heimdall system, bootloader, recovery, userdata şeklinde bölüm bölüm yazdırma yapar. Yani yazdıracağınız tar dosyasını ayıklamanız gerekiyor. Örnek:
Kod:
tar -xf twrp.tar
heimdall flash --recovery recovery.img
Tek satırda çoklu yazdırma da yapabilirsiniz:
Kod:
tar -xf vbmeta_patched.tar
tar -xf twrp.tar
heimdall flash --recovery twrp.img --vbmeta vbmeta.img
Heimdall'da auto-reboot'u kapatabiliyorsunuz.
heimdall flash --userdata userdata.img --no-reboot
Heimdall ile stock rom atmak biraz uğraştırıcı.
Öncelikle AP, BL, CSC ve CP arşivlerini ve içlerindeki lz4 dosyalarını ayıklamanız lazım. Bunları otomatikleştirmek için küçük bir Python script'i yazdım (lz4 komutunun yüklü olması gerekiyor):
Python:
from os import system
from os import listdir
system("tar -xf AP* && tar -xf CP* && tar -xf BL* && tar -xf CSC*")
system("mkdir img")
system("mv *.lz4 img/")
lz4 = listdir("img")
for file in lz4:
    system(f"lz4 img/{file}")
system("rm img/*.lz4")
Script'i rom dosyalarının (AP, BL, CP, CSC) olduğu klasörde oluşturun ve çalıştırın:
?hash=956249d550feac037bdddf2683ea3790.png

Script bulunduğunuz klasörde "img" adlı bir klasör oluşturdu ve ".img" dosyalarını çıkartıp kopyaladı.
?hash=956249d550feac037bdddf2683ea3790.png

Klasöre girip dosyaları heimdall ile yazdıralım. Cihazın partisyonları farklı olabileceğinden cihazın pit dosyasını bilgisayara çekip heimdall ile okumamız gerekiyor:
Kod:
heimdall print-pit  # cihaz yeniden başlayacak
?hash=956249d550feac037bdddf2683ea3790.png

Uzun bir çıktı alacaksınız. Benim cihazımda 43 entryli bir liste geldi. "Flash Filename" kısmı dolu olan bölümlere belirtilen dosyaları yazdırmanız gerekiyor.
Örnek olarak bootloader bölümüne "preloader.img" dosyasını yazdırmamız gerekiyor. (heimdall flash --bootloader preloader.img
?hash=956249d550feac037bdddf2683ea3790.png

Benim cihazımda (A107f / Galaxy A10s) komut bu şekilde:
(.img dosyalarının çıkartıldığı klasöre girmeniz gerekiyor.)
heimdall flash --bootloader preloader.img --efuse efuse.img --param param.bin --up_param up_param.bin --md1img md1img.img --spmfw spmfw.img --scp1 scp.img --sspm_1 sspm.img --lk lk.img --boot boot.img --recovery recovery.img --dtbo dtbo.img --tee1 tee.img --vendor vendor.img --product product.img --system system.img --vbmeta vbmeta.img --cache cache.img --omr omr.img --userdata userdata.img

Galaxy S9 için gerekli komut:
heimdall flash --BOOTLOADER sboot.bin --CM cm.bin --PARAM param.bin --UP_PARAM up_param.bin --KEYSTORAGE keystorage.bin --BOOT boot.img --RECOVERY recovery.img --RADIO modem.bin --DQMDBG dqmdbg.img --SYSTEM system.img --VENDOR vendor.img --ODM odm.img --CACHE cache.img --HIDDEN hidden.img --OMR omr.img --CP_DEBUG modem_debug.bin --USERDATA userdata.img

?hash=956249d550feac037bdddf2683ea3790.png

?hash=956249d550feac037bdddf2683ea3790.png

Stock ROM atılacaksa odin4 kullanmak daha mantıklı, heimdall daha profosyonel işlemler için uygun.

Rehberim bu kadardı, okuduğunuz için teşekkürler.

IMG_20230511_192121.jpg
 

Dosya Ekleri

  • IMG_20230511_191837.jpg
    IMG_20230511_191837.jpg
    23,6 KB · Görüntüleme: 52
Son düzenleme:
Linux bir bilgisayar ile Samsung bir telefona yazılım atmak istiyorsanız iki alternatifiniz var: Odin4 ve heimdall.
Odin4'ü xda forums üzerinden yükleyebilirsiniz.
Kod:
unzip odin.zip
./odin4 -h
İsteğe bağlı olarak programı /bin klasörüne kopyalayabilirsiniz:
Kod:
sudo cp odin4 /bin

Linux'daki odin4, Windows'taki odin gibi çalışır. AP, BL, CP ve CSC dosyalarını belirterek yazdırma yaparsınız.
Cihazın görünüp görünmediğini kontrol etmek için: odin4 -l (Cihaz görünmüyorsa root olarak çalıştırın.)
Eki Görüntüle 1775375
Örnek olarak cihaza stock ROM atmak için:
odin4 -a AP_xyz -b BL_xyz -c CP_xyz -s CSC_xyz
Eki Görüntüle 1775376
Eki Görüntüle 1775377
Ne yazık ki odin4'ün Linux sürümünde auto-reboot kapatma özelliği yok, yani TWRP kurarken dikkatli olmanız lazım.

Heimdall ise odin4'e göre biraz daha zor ve kafa karıştırıcı ama daha profosyonel bir yazılım.
Heimdall'ı dağıtımınızın paket yöneticisini kullanarak yükleyebilirsiniz.
Kod:
sudo apt install heimdall  #debian
sudo dnf install heimdall  #fedora
sudo pacman -Sy heimdall   #arch
sudo emerge heimdall       #gentoo
Kod:
Usage: heimdall <action> <action arguments>

Action: close-pc-screen
Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]
           [--usb-log-level <none/error/warning/debug>]
Description: Attempts to get rid off the "connect phone to PC" screen.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: detect
Arguments: [--verbose] [--stdout-errors]
           [--usb-log-level <none/error/warning/debug>]
Description: Indicates whether or not a download mode device can be detected.

Action: download-pit
Arguments: --output <filename> [--verbose] [--no-reboot] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>]
Description: Downloads the connected device's PIT file to the specified
    output file.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: flash
Arguments:
    [--<partition name> <filename> ...]
    [--<partition identifier> <filename> ...]
    [--pit <filename>] [--verbose] [--no-reboot] [--resume] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>]
  or:
    --repartition --pit <filename> [--<partition name> <filename> ...]
    [--<partition identifier> <filename> ...] [--verbose] [--no-reboot]
    [--resume] [--stdout-errors] [--usb-log-level <none/error/warning/debug>]
    [--tflash] [--skip-size-check]
Description: Flashes one or more firmware files to your phone. Partition names
    (or identifiers) can be obtained by executing the print-pit action.
    T-Flash mode allows to flash the inserted SD-card instead of the internal MMC.
    Use --skip-size-check to not verify that files fit in the specified partition.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.
WARNING: If you're repartitioning it's strongly recommended you specify
        all files at your disposal.

Action: help
Description: Displays this dialogue.

Action: info
Description: Displays information about Heimdall.

Action: print-pit
Arguments: [--file <filename>] [--verbose] [--no-reboot] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>]
Description: Prints the contents of a PIT file in a human readable format. If
    a filename is not provided then Heimdall retrieves the PIT file from the
    connected device.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: version
Description: Displays the version number of this binary.
Cihazın görünüp görünmediğini kontrol etmek için: heimdall detect
Eki Görüntüle 1775378
Heimdall'ın odin4'e göre daha zor olmasının sebebi Heimdall'In AP, BL, CP, CSC şeklinde yazdırma yapmaması. Heimdall system, bootloader, recovery, userdata şeklinde bölüm bölüm yazdırma yapar. Yani yazdıracağınız tar dosyasını ayıklamanız gerekiyor. Örnek:
Kod:
tar -xf twrp.tar
heimdall flash --recovery recovery.img
Tek satırda çoklu yazdırma da yapabilirsiniz:
Kod:
tar -xf vbmeta_patched.tar
tar -xf twrp.tar
heimdall flash --recovery twrp.img --vbmeta vbmeta.img
Heimdall'da auto-reboot'u kapatabiliyorsunuz.
heimdall flash --userdata userdata.img --no-reboot
Heimdall ile stock rom atmak biraz uğraştırıcı.
Öncelikle AP, BL, CSC ve CP arşivlerini ve içlerindeki lz4 dosyalarını ayıklamanız lazım. Bunları otomatikleştirmek için küçük bir Python script'i yazdım (lz4 komutunun yüklü olması gerekiyor):
Python:
from os import system
from os import listdir
system("tar -xf AP* && tar -xf CP* && tar -xf BL* && tar -xf CSC*")
system("mkdir img")
system("mv *.lz4 img/")
lz4 = listdir("img")
for file in lz4:
    system(f"lz4 img/{file}")
system("rm img/*.lz4")
Script'i rom dosyalarının (AP, BL, CP, CSC) olduğu klasörde oluşturun ve çalıştırın:
Eki Görüntüle 1775379
Script bulunduğunuz klasörde "img" adlı bir klasör oluşturdu ve ".img" dosyalarını çıkartıp kopyaladı.
Eki Görüntüle 1775380
Klasöre girip dosyaları heimdall ile yazdıralım. Cihazın partisyonları farklı olabileceğinden cihazın pit dosyasını bilgisayara çekip heimdall ile okumamız gerekiyor:
Kod:
heimdall print-pit  # cihaz yeniden başlayacak
Eki Görüntüle 1775382
Uzun bir çıktı alacaksınız. Benim cihazımda 43 entryli bir liste geldi. "Flash Filename" kısmı dolu olan bölümlere belirtilen dosyaları yazdırmanız gerekiyor.
Örnek olarak bootloader bölümüne "preloader.img" dosyasını yazdırmamız gerekiyor. (heimdall flash --bootloader preloader.img
Eki Görüntüle 1775381
Benim cihazımda (A107f / Galaxy A10s) komut bu şekilde:
(.img dosyalarının çıkartıldığı klasöre girmeniz gerekiyor.)
heimdall flash --bootloader preloader.img --efuse efuse.img --param param.bin --up_param up_param.bin --md1img md1img.img --spmfw spmfw.img --scp1 scp.img --sspm_1 sspm.img --lk lk.img --boot boot.img --recovery recovery.img --dtbo dtbo.img --tee1 tee.img --vendor vendor.img --product product.img --system system.img --vbmeta vbmeta.img --cache cache.img --omr omr.img --userdata userdata.img
Eki Görüntüle 1775386
Eki Görüntüle 1775387
Stock ROM atılacaksa odin4 kullanmak daha mantıklı, heimdall daha profosyonel işlemler için uygun.

Rehberim bu kadardı, okuduğunuz için teşekkürler.

Eki Görüntüle 1775367
Ellerine sağlık hocam.
 
Linux bir bilgisayar ile Samsung bir telefona yazılım atmak istiyorsanız iki alternatifiniz var: Odin4 ve heimdall.
Odin4'ü xda forums üzerinden yükleyebilirsiniz.
Kod:
unzip odin.zip
./odin4 -h
İsteğe bağlı olarak programı /bin klasörüne kopyalayabilirsiniz:
Kod:
sudo cp odin4 /bin

Linux'daki odin4, Windows'taki odin gibi çalışır. AP, BL, CP ve CSC dosyalarını belirterek yazdırma yaparsınız.
Cihazın görünüp görünmediğini kontrol etmek için: odin4 -l (Cihaz görünmüyorsa root olarak çalıştırın.)
Eki Görüntüle 1775375
Örnek olarak cihaza stock ROM atmak için:
odin4 -a AP_xyz -b BL_xyz -c CP_xyz -s CSC_xyz
Eki Görüntüle 1775376
Eki Görüntüle 1775377
Ne yazık ki odin4'ün Linux sürümünde auto-reboot kapatma özelliği yok, yani TWRP kurarken dikkatli olmanız lazım.

Heimdall ise odin4'e göre biraz daha zor ve kafa karıştırıcı ama daha profosyonel bir yazılım.
Heimdall'ı dağıtımınızın paket yöneticisini kullanarak yükleyebilirsiniz.
Kod:
sudo apt install heimdall  #debian
sudo dnf install heimdall  #fedora
sudo pacman -Sy heimdall   #arch
sudo emerge heimdall       #gentoo
Kod:
Usage: heimdall <action> <action arguments>

Action: close-pc-screen
Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]
           [--usb-log-level <none/error/warning/debug>]
Description: Attempts to get rid off the "connect phone to PC" screen.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: detect
Arguments: [--verbose] [--stdout-errors]
           [--usb-log-level <none/error/warning/debug>]
Description: Indicates whether or not a download mode device can be detected.

Action: download-pit
Arguments: --output <filename> [--verbose] [--no-reboot] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>]
Description: Downloads the connected device's PIT file to the specified
    output file.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: flash
Arguments:
    [--<partition name> <filename> ...]
    [--<partition identifier> <filename> ...]
    [--pit <filename>] [--verbose] [--no-reboot] [--resume] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>]
  or:
    --repartition --pit <filename> [--<partition name> <filename> ...]
    [--<partition identifier> <filename> ...] [--verbose] [--no-reboot]
    [--resume] [--stdout-errors] [--usb-log-level <none/error/warning/debug>]
    [--tflash] [--skip-size-check]
Description: Flashes one or more firmware files to your phone. Partition names
    (or identifiers) can be obtained by executing the print-pit action.
    T-Flash mode allows to flash the inserted SD-card instead of the internal MMC.
    Use --skip-size-check to not verify that files fit in the specified partition.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.
WARNING: If you're repartitioning it's strongly recommended you specify
        all files at your disposal.

Action: help
Description: Displays this dialogue.

Action: info
Description: Displays information about Heimdall.

Action: print-pit
Arguments: [--file <filename>] [--verbose] [--no-reboot] [--stdout-errors]
    [--usb-log-level <none/error/warning/debug>]
Description: Prints the contents of a PIT file in a human readable format. If
    a filename is not provided then Heimdall retrieves the PIT file from the
    connected device.
Note: --no-reboot causes the device to remain in download mode after the action
      is completed. If you wish to perform another action whilst remaining in
      download mode, then the following action must specify the --resume flag.

Action: version
Description: Displays the version number of this binary.
Cihazın görünüp görünmediğini kontrol etmek için: heimdall detect
Eki Görüntüle 1775378
Heimdall'ın odin4'e göre daha zor olmasının sebebi Heimdall'In AP, BL, CP, CSC şeklinde yazdırma yapmaması. Heimdall system, bootloader, recovery, userdata şeklinde bölüm bölüm yazdırma yapar. Yani yazdıracağınız tar dosyasını ayıklamanız gerekiyor. Örnek:
Kod:
tar -xf twrp.tar
heimdall flash --recovery recovery.img
Tek satırda çoklu yazdırma da yapabilirsiniz:
Kod:
tar -xf vbmeta_patched.tar
tar -xf twrp.tar
heimdall flash --recovery twrp.img --vbmeta vbmeta.img
Heimdall'da auto-reboot'u kapatabiliyorsunuz.
heimdall flash --userdata userdata.img --no-reboot
Heimdall ile stock rom atmak biraz uğraştırıcı.
Öncelikle AP, BL, CSC ve CP arşivlerini ve içlerindeki lz4 dosyalarını ayıklamanız lazım. Bunları otomatikleştirmek için küçük bir Python script'i yazdım (lz4 komutunun yüklü olması gerekiyor):
Python:
from os import system
from os import listdir
system("tar -xf AP* && tar -xf CP* && tar -xf BL* && tar -xf CSC*")
system("mkdir img")
system("mv *.lz4 img/")
lz4 = listdir("img")
for file in lz4:
    system(f"lz4 img/{file}")
system("rm img/*.lz4")
Script'i rom dosyalarının (AP, BL, CP, CSC) olduğu klasörde oluşturun ve çalıştırın:
Eki Görüntüle 1775379
Script bulunduğunuz klasörde "img" adlı bir klasör oluşturdu ve ".img" dosyalarını çıkartıp kopyaladı.
Eki Görüntüle 1775380
Klasöre girip dosyaları heimdall ile yazdıralım. Cihazın partisyonları farklı olabileceğinden cihazın pit dosyasını bilgisayara çekip heimdall ile okumamız gerekiyor:
Kod:
heimdall print-pit  # cihaz yeniden başlayacak
Eki Görüntüle 1775382
Uzun bir çıktı alacaksınız. Benim cihazımda 43 entryli bir liste geldi. "Flash Filename" kısmı dolu olan bölümlere belirtilen dosyaları yazdırmanız gerekiyor.
Örnek olarak bootloader bölümüne "preloader.img" dosyasını yazdırmamız gerekiyor. (heimdall flash --bootloader preloader.img
Eki Görüntüle 1775381
Benim cihazımda (A107f / Galaxy A10s) komut bu şekilde:
(.img dosyalarının çıkartıldığı klasöre girmeniz gerekiyor.)
heimdall flash --bootloader preloader.img --efuse efuse.img --param param.bin --up_param up_param.bin --md1img md1img.img --spmfw spmfw.img --scp1 scp.img --sspm_1 sspm.img --lk lk.img --boot boot.img --recovery recovery.img --dtbo dtbo.img --tee1 tee.img --vendor vendor.img --product product.img --system system.img --vbmeta vbmeta.img --cache cache.img --omr omr.img --userdata userdata.img
Eki Görüntüle 1775386
Eki Görüntüle 1775387
Stock ROM atılacaksa odin4 kullanmak daha mantıklı, heimdall daha profosyonel işlemler için uygun.

Rehberim bu kadardı, okuduğunuz için teşekkürler.

Eki Görüntüle 1775367
Ellerinize sağlık.
 

Geri
Yukarı