I have Samsung S10 5G(Qualcomm) device. This device has unlocked bootloader but it is not rooted yet.

I am trying to learn Unpack-Modify-Pack the ROM images.

Currently, I have VZW stock ROM available for this device and I can flash it successfully using Odin3 v3.13.

After flashing this ROM, I have tried to modify system and recovery using tar, lz4, simg2img, mount, tune2fs and md5 tools available on my Ubuntu 18.

When I have tried to flash different tar files then the result is as following:

Success Attempts: If I will not modify anything and flash the Ap.tar containing any of the following file:

  1. system.img.ext4.lz4
  2. system.img.ext4
  3. recovery.img.lz4
  4. recovery.img

Fail Attempts: If I will just modify the init.rc file by writing a simple comment at the end of this file and flash the AP.tar containing any of the following file(which contain modified raw image at last level of its folder hierarchy):

  1. system.img.ext4.lz4 which contains a modified system.img.ext4.
  2. system.img.ext4
  3. recovery.img.lz4 which contains a modified system.img.
  4. recovery.img

When Odin3 v3.13 failed to flash the above modified files then it give below errors:

  1. For AP.tar containing LZ4 file: FAIL! LZ4 is invalid
    • The device has no impact of this error and it stay in download mode.
  2. For AP.tar containing ext4 or img file: FAIL! (Auth)
    • In this case the device display Only official released binaries are allowed to be flashed(recovery) or Only official released binaries are allowed to be flashed(system)

Please give your suggestions on:

  1. This device is secure by Knox from Samsung. Is it causing this error?
  2. If yes, is there any way to disable it in the VZW zip?
  3. If no, what is the actual problem and how can I resolve it?
  • All Android firmware images are protected by a cryptographic signature. Any modification will cause the cryptographic signature to become invalid and therefore your device rejects the image installation. Only devices with unlocked bootloader (not every device can be unlocked) can install firmware images that are not properly signed.
    – Robert
    Commented Oct 25, 2019 at 10:22
  • My device has unlocked bootloader. So, Is still the cryptographic signature should be valid? If yes, can we add this after modifying the image file or the only Samsung can add this? Commented Oct 25, 2019 at 10:25
  • Only Samsung can sign an image. If unsigned images are not accepted your device is not unlocked. What did you do to unlock it?
    – Robert
    Commented Oct 25, 2019 at 10:27
  • Sorry for late reply. This device is unlocked by Samsung so I don't think they will cheat me. There must be some other reason. Perhaps they just unlocked the device but not turned off the Knox. Also, the device can be rooted by patching AP file by Magisk Manager so if they can patch it, I must be able to flash a simple change. What do you think? Commented Oct 29, 2019 at 5:07
  • 1
    With lz4 -B6 --content-size system.img.ext4 system.img.ext4.lz4 the Odin v3.13 is working fine without any patch. With Magisk patch FAIL! (Auth) errors disappear. Commented Nov 21, 2019 at 6:08

1 Answer 1


For LZ4 compression: lz4 -B6 --content-size system.img.ext4 system.img.ext4.lz4 command can be used to make a valid Odin Flashable file.

To Fix "FAIL! (Auth)", we need to truncate the vbmeta.img file and remove the signature from the boot.img. The detail is mentioned on Magisk install guide under Instructions section.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .