Android Enthusiasts
Q&A for enthusiasts and power users of the Android operating system
Latest Questions
0
votes
0
answers
2106
views
How do I set up TWRP on my Samsung Galaxy Tab A 8.0 (2019, SM-T295)?
I've tried almost every twrp.img I can find on the internet that supports my device Samsung Galaxy Tab A 8.0 (2019, SM-T295, Android 11). Yet, I can't seem to get it to work. Every TWRP recovery.img I try still results in the "Security check failed: RECOVERY.IMG" error. I do have an unlocked bootloa...
I've tried almost every twrp.img I can find on the internet that supports my device Samsung Galaxy Tab A 8.0 (2019, SM-T295, Android 11). Yet, I can't seem to get it to work. Every TWRP recovery.img I try still results in the "Security check failed: RECOVERY.IMG" error. I do have an unlocked bootloader though.
**I've tried:**
1. Flashing an empty vbmeta - probably disabled AVB.
2. Downgrading to a less secure Android 9 bootloader - Almost every .img was a success except the aboot.img which, after being successfully flashed, displays the error: "SW REV CHECK FAILED" and two numbers I can't quite remember.
(I use Heimdall-frontend for flashing btw)
CordCreator 182
(1 rep)
Oct 13, 2023, 08:55 AM
• Last activity: Jul 16, 2024, 02:14 PM
13
votes
5
answers
42405
views
How to flash a custom recovery with heimdall (without touching the main system)?
The first recommended step in [the installation of CyanogenMod on Samsung Galaxy S](http://wiki.cyanogenmod.org/w/Install_CM_for_galaxysmtd) is flashing a custom recovery like ClockworkMod or the one from Replicant with a command like: heimdall flash --kernel path/to/recovery.img Now I feel that the...
The first recommended step in [the installation of CyanogenMod on Samsung Galaxy S](http://wiki.cyanogenmod.org/w/Install_CM_for_galaxysmtd) is flashing a custom recovery like ClockworkMod or the one from Replicant with a command like:
heimdall flash --kernel path/to/recovery.img
Now I feel that the instructions might be misleading:
I have done the first step wanting just to have a custom recovery mode, without proceeding to replacing the main OS on the device.
It seems I have done that wrong, because the device now always boots into the recovery mode.
What would be the correct heimdall command to just install a custom recovery system without touching the main system?
imz -- Ivan Zakharyaschev
(1094 rep)
Apr 21, 2013, 08:44 PM
• Last activity: Jun 21, 2024, 06:50 PM
1
votes
0
answers
80
views
DivestOS Mobile recovery image gives error on Heimdall
My [Samsung Note 3 SM-N9005](https://wiki.lineageos.org/devices/hlte/), the first time I used [Heimdall][1] I could successfully flash the recovery image from [here][2] (particularly [this image][3]). Now in download mode is current binary: custom and system status: custom, but when I go into recove...
My [Samsung Note 3 SM-N9005](https://wiki.lineageos.org/devices/hlte/) , the first time I used Heimdall I could successfully flash the recovery image from here (particularly this image ). Now in download mode is current binary: custom and system status: custom, but when I go into recovery mode I get the standard one without install.
So I thought that the recovery partition got overwritten by the subsequent boots and I tried to flash it again to then immediately boot from recovery, but Heimdall keeps giving me **ERROR: libusb error -7** whilst receiving bulk transfer, even if I can download PIT with no problems.
I've tried this on Windows 10, 8.1 and 7 with the same result.
Also, I have tried Odin on Windows 8.1 and Windows 7, in both device get added in Odin in Download Mode, but it crashes when trying to flash recovery img.
Neggia
(11 rep)
Feb 25, 2024, 08:38 PM
• Last activity: Apr 25, 2024, 02:28 PM
1
votes
0
answers
328
views
Unpack boot.img and add "androidboot.selinux=enforcing" to boot.img-cmdline not work on Samsung
After flashing Android 13 of LineageOS to Galaxy Note 10+, I'm trying to set SELinux permissive following the steps. 1. Unpack `boot.img` and add `androidboot.selinux=permissive` to `boot.img-cmdline` 2. use Heimdall, and flash the packed boot.img: `heimdall flash --BOOT myboot.img` The phone would...
After flashing Android 13 of LineageOS to Galaxy Note 10+, I'm trying to set SELinux permissive following the steps.
1. Unpack
boot.img
and add androidboot.selinux=permissive
to boot.img-cmdline
2. use Heimdall, and flash the packed boot.img:
heimdall flash --BOOT myboot.img
The phone would auto-reboot after the flashing was complete. But adb getprop ro.boot.selinux
still returns enforcing
.
And I checked cat /proc/cmdline
, there is androidboot.selinux=enforce
.
This method works on Pixel 3XL with Android 13 LineageOS. I don't know why flash boot.img does not work on Galaxy Note 10+.
I checked boot.img with hex editor(vim), and found cmdline as there.
```
00000000: 414e 4452 4f49 4421 10e0 f602 0080 0010 ANDROID!........
00000010: 96d5 1500 0000 0011 0000 0000 0000 0000 ................
00000020: 0001 0010 0008 0000 0100 0000 8301 001a ................
00000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000040: 616e 6472 6f69 6462 6f6f 742e 7365 6c69 androidboot.seli
00000050: 6e75 783d 7065 726d 6973 7369 7665 2062 nux=permissive b
00000060: 7569 6c64 7661 7269 616e 743d 7573 6572 uildvariant=user
00000070: 6465 6275 6700 0000 0000 0000 0000 0000 debug...........
Nelson
(11 rep)
Mar 23, 2024, 04:47 PM
• Last activity: Mar 24, 2024, 09:58 AM
3
votes
1
answers
2542
views
How to install GSI on Samsung Galaxy Tab Active3
I am trying to flash an Android 12 GSI onto my Samsung Galaxy Tab Active3. Goal is to install the GSI without root / voiding the warranty. My company produces an app which is primarily used on Android on Galaxy Tab Active devices. It's expected Galaxy Tab Active3 will get Android 12 update in the ne...
I am trying to flash an Android 12 GSI onto my Samsung Galaxy Tab Active3. Goal is to install the GSI without root / voiding the warranty. My company produces an app which is primarily used on Android on Galaxy Tab Active devices. It's expected Galaxy Tab Active3 will get Android 12 update in the next few months and we wanted to do some regression testing in advance of that. Hence the need to get Android 12 GSI onto the Tab Active3.
Device is an arm64 so I downloaded the arm64+gms version of Android 12 GSI (from Google's website). I have successfully unlocked the bootloader, and enabled DSU support. The device supports Project Treble and the VNDK isolated namespace, so in theory should support GSIs.
Everything I tried so far has failed. Any ideas to get it working?
## Manual DSU
I have tried to install the GSI by manually starting the DSU via activity manager. Every time it just says "Installation failed" after reaching about 50% progress. I have tried setting different sizes for the USERDATA: 8GB (Google's recommended size), 2GB and 1GB. I get the same error every time. The device has around 40GB free space and the GSI image size is around 2GB, so it shouldn't be anything to do with the space requirements.
Logcat reports an error:
11-11 13:10:09.620 1103 3695 I DynamicSystemService: Failed to install system
11-11 13:10:09.621 16445 23403 E InstallationAsyncTask: java.io.IOException: Failed to start installation with requested size: 1257738436
This doesn't help unfortunately; it is thrown from the following file and this is just thrown if there is any error in the underlying dynamic installation:
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java
PS: Unfortunately the device does not support DSU Loader even though it's running Android 11 (searching for "dsu" in the settings returns no relevant results). Apparently none of the Samsung devices are supporting DSU Loader.
## Fastboot and FastbootD
The device can be rebooted into fastboot mode (adb reboot bootloader
) but every command just hangs forever (except for fastboot devices
, which does detect the device). I tried fastboot reboot fastboot
, but it just reboots into the standard mode of the device and does not enter a fastboot userspace mode (fastbootd mode) as some have suggested it should.
## Heimdall
At least one person has said they can patch GSIs using Heimdall: https://forum.xda-developers.com/t/can-i-flash-gsi-roms-with-odin.4029921/
That person was able to flash their GSI to the SYSTEM partition, but my device doesn't have a SYSTEM partition. The partitions are like SUPER, PRISM, etc.
I'm not able to get Heimdall working properly on Windows 10. I have tried with WinUSB, libusb0 and libusbK, but the same is true for all of them. After rebooting the device into ODIN mode, the device can be detected with heimdall detect
, but I can't do anything more including heimdall print-pit
, as I get a "Failed to access device. libusb error: -12" error.
I managed to set up Heimdall on an Ubuntu instance of WSL and map the USB using USBIPD. Inside WSL, heimdall print-pit
does work but I can't get further to flashing anything (I tried to flash the GSI to SUPER, not sure if this was a good idea but anyway it failed) as I get a "Protocol initialisation failed!" error.
## Odin
I am not sure if Odin even supports GSIs and I can't find anyone saying it supports them. I have tried flashing the GSI as an AP in Odin 3.12, 3.13, 3.14 and the patched 3.14 which removes signature checks. But every time it just fails.
## Custom recovery
Just to also note, it seems none of the custom recoveries (TWRP, SHRP, Orangefox etc) support the Tab Active3, or I could have tried to flash those using Heimdall/Odin and then use them to flash the GSI. But I feel it's likely I would have had the same issues, at least with Heimdall.
## EDIT: Heimdall on native Linux
@Robert in the comments below suggested I run Heimdall on native Linux rather than on WSL or the Windows version. This worked better and fixed the issues I was having before with Heimdall.
I then tried to flash VBMETA (the one which is bundled with the GSI) using Heimdall which worked, however my device is now soft-bricked, can only boot into Download Mode, and gives the following error:
ODIN MODE (AVB fail)
vbmeta: Public key used to sign data rejected. (5)
vbmeta: VERIFICATION_DISABLED bit is set.
CUSTOM VBMETA
VBMETA : No sign info
VBMETA ,
@alecxs in the comments had suggested flashing a VBMETA generated from avbtool instead; I tried this also, but got almost the same situation and a very slightly different error output:
ODIN MODE (AVB fail)
vbmeta: Error verifying vbmeta image: OK_NOT_SIGNED (3)
vbmeta: VERIFICATION_DISABLED bit is set.
CUSTOM VBMETA
VBMETA : No sign info
VBMETA ,
## EDIT 2: Heimdall on WSL again, VBMETA findings, and how I got DSU working
I found that both Heimdall on native Linux and Heimdall on WSL actually suffer from the same problem. You can only post one command to the device, then subsequent commands fail with "protocol initialisation failed". On WSL I was doing things like heimdall print-pit --no-reboot
and that's why I was facing issues when flashing. Basically, if you get protocol initialisation failed, just reboot the device and it should work.
Samsung devices seem to do a signature check on VBMETA and only accept official Samsung-signed ones. I found two different VBMETA images in my stock ROM - vbmeta.img
and vbmeta_samsung.img
. I happened to notice that vbmeta_samsung.img
has the same file size as the vbmeta disable images. By the time I'd got this fixed I'd flashed vbmeta_samsung.img
and then done a factory reset. I'm not sure if this was strictly necessary though, as after flashing vbmeta.img
it still worked. Not sure if re-flashing original stock vbmeta.img
will have re-enabled AVB though. Although I'd say it's unlikely, as even Google themselves say you need to disable AVB in order to use DSU.
How I got DSU fixed eventually (aside from the above) - I had made a really stupid error when running the DSU command. For KEY_SYSTEM_SIZE
I was passing the gzipped system size, not original system image size. This is why the installation always failed after 50%, because it was only installing 50% of the system image. Also another really important thing to note is that after running DSU, you have to restart the system from the DSU notification and not from the normal power menu of the device.
Kidburla
(522 rep)
Nov 11, 2021, 05:59 PM
• Last activity: Jan 23, 2024, 02:05 PM
1
votes
0
answers
59
views
YABLS? (Yet Another Boot Loop Snafu?)
So I have read through quite a few bootloop posts but still haven't managed to resolve my issue (am very close to trying oden 2 linux...). **Device**: samsung galaxy tab a (sm-t350) **what I did**: Using heimdall I sucessfully flashed twrp to my tablet. Noticed I had forgotten to dl the rom (lineage...
So I have read through quite a few bootloop posts but still haven't managed to resolve my issue (am very close to trying oden 2 linux...).
**Device**: samsung galaxy tab a (sm-t350)
**what I did**: Using heimdall I sucessfully flashed twrp to my tablet. Noticed I had forgotten to dl the rom (lineage retiredtab) so booted into stock android, downloaded the rom, then booted back into twrp and flashed the lineage retiredtab rom , then rebooted.
**What happened:** when i rebooted I am stuck in a bootloop i guess? and no matter what I do i can't seem to do anything other than reboot and boot into "odin mode". I can't boot into recovery and I can't power down.
the many of the button combinations seems to require the device be off, but as i can't power off I can't seem to use them.
**What I can do:** I can get to the odin mode "downloading" screen - and I can flash twrp (I just can't boot into twrp) and I can reboot - which just takes me to the lineage booting animation.
DrZog
(11 rep)
Jan 9, 2024, 01:17 AM
0
votes
0
answers
54
views
Does Heimdall verify compatibility?
I want to flash TWRP to my Samsung Android device. I do not know if there is a compatible version of TWRP (device model not listed). Does Heimdall verify compatibility before flashing with `sudo heimdall flash --RECOVERY twrp.img`?
I want to flash TWRP to my Samsung Android device. I do not know if there is a compatible version of TWRP (device model not listed).
Does Heimdall verify compatibility before flashing with
sudo heimdall flash --RECOVERY twrp.img
?
ecokjeonb
(71 rep)
Oct 1, 2023, 03:08 AM
1
votes
0
answers
374
views
How do I flash a custom recovery/ROM to my Galaxy Core Prime (SM-G360V)?
I've been trying to flash a custom recovery and ROM to an old Galaxy Core Prime. Based on advice I received on Reddit, I decided to try using Heimdall. I put the phone into Odin Mode and connected it to the computer. I then attempted to create a PIT file for my device, in order to flash the TWRP .TA...
I've been trying to flash a custom recovery and ROM to an old Galaxy Core Prime. Based on advice I received on Reddit, I decided to try using Heimdall. I put the phone into Odin Mode and connected it to the computer. I then attempted to create a PIT file for my device, in order to flash the TWRP .TAR file to it. The process started, before I received the following error message:
> Downloading device's PIT file...
>
> ERROR: Failed to send request to end PIT file transfer!
>
> ERROR: Failed to download PIT file!
>
> Ending session...
>
> ERROR: Failed to send end session packet!
>
> Releasing device interface...
I don't know what happened. What went wrong? How do I fix this issue? If needed, here are some clearer photos showing my situation:


shwin320
(111 rep)
Mar 8, 2023, 12:39 PM
2
votes
0
answers
704
views
Required Img files for heimdall root
Folks, I'm trying to root a phone with Heimdall (on Linux). Completed steps so far: 1. Downloaded Factory Firmware 2. patched it with Magisk 3. setup heimdall 4. downloaded PIT from phone 5. backed up phone with ```adb backup -apk -shared -all -f /backup.ab``` 6. installed twrp recovery So now I wou...
Folks, I'm trying to root a phone with Heimdall (on Linux).
Completed steps so far:
1. Downloaded Factory Firmware
2. patched it with Magisk
3. setup heimdall
4. downloaded PIT from phone
5. backed up phone with
backup -apk -shared -all -f /backup.ab
6. installed twrp recovery
So now I would go on and flash the patched images.
From the magisk patch and the firmware, i get those files:
boot.img
cache.img
cm.bin
hidden.img
modem.bin
param.bin
recovery.img
sboot.bin
system.img
userdata.img
Comparing this with the contents of my PIT, I am missing these files:
md5.img
efs.img
cpefs.img
m9kefs1.bin
m9kefs2.bin
m9kefs3.bin
carrier.img
tombstones.img
dnt.ssw
steady.bin
modem_debug.bin
nad_refer.bin
Some people only use recovery.img and cache.img, others use all of them, so now I'm confused. Hence my questions:
- What is the minimum set of files required to flash in order to root the phone?
- I.e. are the ones I have enough, respectively
- are the missing ones required?
Thank you big time!
Mat
(41 rep)
Oct 23, 2022, 02:14 PM
1
votes
0
answers
331
views
Does Heimdall have the option to boot without flashing/substituting the kernel? (like fastboot boot boot.img)
Fastboot has the option `fastboot boot Image.gz` to boot a kernel without flashing it to the phone. Is there something similar for Heimdall? I did not want to mess with my phone's kernel for now. It's a Galaxy A50. By the way, what is the "no reboot" button for?
Fastboot has the option
fastboot boot Image.gz
to boot a kernel without flashing it to the phone. Is there something similar for Heimdall? I did not want to mess with my phone's kernel for now. It's a Galaxy A50.
By the way, what is the "no reboot" button for?
Rafaelo
(71 rep)
Jun 22, 2022, 02:15 PM
1
votes
0
answers
1657
views
Failing to flash custom (Magisk-patched) boot.img to Samsung S20 FE (4G) with Heimdall
I am attempting to flash a [Magisk][1]-patched `boot.img` from Linux onto my unlocked SM-G780G. I have so far tried doing that using `fastboot flash ...` to which the device responded that it doesn't know the command. The device is a Samsung Galaxy S20 FE (SM-G780G). I then tried [Heimdall][2] v1.4....
I am attempting to flash a Magisk -patched
boot.img
from Linux onto my unlocked SM-G780G. I have so far tried doing that using fastboot flash ...
to which the device responded that it doesn't know the command.
The device is a Samsung Galaxy S20 FE (SM-G780G).
I then tried Heimdall v1.4.2 (on Ubuntu 20.4) and got this:
$ sudo heimdall download-pit --output bla.pit --verbose --stdout-errors
Heimdall v1.4.2
Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "Samsung"
Product: "SM8250"
length: 18
device class: 2
S/N: 0
VID:PID: 04E8:685D
bcdDevice: 0100
iMan:iProd:iSer: 1:2:0
nb confs: 1
interface.altsetting: num endpoints = 1
Class.SubClass.Protocol: 02.02.01
endpoint.address: 82
max packet size: 0010
polling interval: 09
interface[1] .altsetting: num endpoints = 2
Class.SubClass.Protocol: 0A.00.00
endpoint.address: 01
max packet size: 0400
polling interval: 00
endpoint[1] .address: 81
max packet size: 0400
polling interval: 00
Claiming interface...
Setting up interface...
Initialising protocol...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.ERROR: libusb error -7 whilst sending bulk transfer.
ERROR: Failed to send handshake!ERROR: Failed to send handshake!ERROR: Failed to receive handshake response. Result: -7
ERROR: Failed to receive handshake response. Result: -7
ERROR: Protocol initialisation failed!
ERROR: Protocol initialisation failed!
Releasing device interface...
I've tried both with and without superuser context (sudo
) and the result is always the same. I am also unable to retrieve the PIT file from the phone.
However, the boot loader is successfully unlocked as I can see in the freshly initialized (due to the data wipe) Android, while running, and also during boot (shows a warning regarding the unlocked state, which has to be dismissed before the boot continues).
I am successful in entering ODIN/download mode (holding both Volume keys _while_ the phone restarts, followed by Volume+), but still nothing seems to work when attempting to communicate with the phone.
I also tried using JOdin3, which detects the device and all, but already fails to retrieve the PIT file as well. I suppose it must be using Heimdall under the hood (?) ...
What part am I missing? Has the procedure somehow changed for newer Samsung phone models?
----------
NB: in order to get fastboot mode to work (which I had tried before), I had to disconnect a Yubikey that I was using on the system. After that fastboot devices
properly showed the phone, but using fastboot flash ...
was equally unsuccessful (I tried fastboot flash boot
and fastboot flash boot_a
to no avail). Prior to unplugging it (although connected to a different root hub), it failed to detect the phone in fastboot mode.
0xC0000022L
(820 rep)
May 31, 2022, 10:45 PM
0
votes
1
answers
1366
views
How do I install a custom recovery on a Note 3 from OS X?
I have a Note 3. I want to install CyanogenMod on it, so I will need a custom recovery. My computer is OS X. http://wiki.cyanogenmod.org/w/Install_CM_for_hlte says: > If you've applied the 4.4.x update to your hlte device, it is possible heimdall will have communication issues with your device. This...
I have a Note 3. I want to install CyanogenMod on it, so I will need a custom recovery. My computer is OS X.
http://wiki.cyanogenmod.org/w/Install_CM_for_hlte says:
> If you've applied the 4.4.x update to your hlte device, it is possible heimdall will have communication issues with your device. This is a filed bug already on the heimdall page and this warning will be removed when it is resolved. In the meantime, ODIN still works.
My Note 3 has had 4.4.x ever since I got it. I tried to use heimdall, but it fails as the warning suggests. It's [this issue](https://github.com/Benjamin-Dobell/Heimdall/issues/209) .
Is there any alternative to heimdall on OS X for installing a custom recovery?
user65503
Aug 30, 2014, 07:41 AM
• Last activity: Apr 1, 2022, 06:04 PM
1
votes
1
answers
1160
views
In Galaxy S7, cannot disable Samsung Reactivation Lock
# Summary I'm trying to install a custom build of LineageOS following the instructions [here](https://wiki.lineageos.org/devices/herolte/install#installing-a-custom-recovery-using-heimdall). I was attempting to load a recovery image using Heimdall when I'm told 'Recovery Check failed'. It turns out...
# Summary
I'm trying to install a custom build of LineageOS following the instructions [here](https://wiki.lineageos.org/devices/herolte/install#installing-a-custom-recovery-using-heimdall) . I was attempting to load a recovery image using Heimdall when I'm told 'Recovery Check failed'. It turns out Samsung has something called [Reactivation Lock](https://www.samsung.com/us/support/answer/ANS00040928/) , but the settings to disable it aren't present on my phone. I actually called them and they said it had been replaced by Google's Android Device Manager, but there's clearly *something* preventing me from loading a recovery image.
I can't link to it because of reputation limits, but the recovery image I was using I built from source; it's linked on the homepage of LineageOS. I did also try it with the images built by Team Win Recovery Project with no luck.
I appreciate any help you can give me.
# Steps
I rebooted into 'download mode' using
$ adb reboot-bootloader
. Heimdall recognizes the device:
$ heimdall detect
Device detected
but when I try to load the recovery image I get an error:
$ heimdall flash --no-reboot --RECOVERY out/dist/recovery.img
Uploading RECOVERY
100%
RECOVERY upload successful
Ending session...
ERROR: Failed to receive session end confirmation!
Releasing device interface...
and on my Android, it shows SECURE CHECK FAIL : recovery
in the top-left corner (in red, if that matters). Rebooting into recovery mode just reboots the phone normally.
# Specs
- Model: heroltevzw
- Model number: SM-G930V
- Android version: 7.0
- Patch level: August 1, 2017
jyn
(111 rep)
Oct 23, 2017, 12:02 AM
• Last activity: Jan 15, 2022, 12:04 AM
1
votes
1
answers
6286
views
What does the ROM files (FACTORYFS, HIDDEN, CACHE, PARAM, etc.) mean?
Flashing my Galaxy S 2 `i9100` (after breaking with CyanogenMod update `CM-13.x`) I used the following command: sudo heimdall flash \ --FACTORYFS factoryfs.img \ --CACHE cache.img \ --HIDDEN hidden.img \ --MODEM modem.bin \ --PARAM param.lfs \ --BOOT boot.bin \ --SBL1 Sbl.bin \ --no-reboot \ --KERNE...
Flashing my Galaxy S 2
i9100
(after breaking with CyanogenMod update CM-13.x
) I used the following command:
sudo heimdall flash \
--FACTORYFS factoryfs.img \
--CACHE cache.img \
--HIDDEN hidden.img \
--MODEM modem.bin \
--PARAM param.lfs \
--BOOT boot.bin \
--SBL1 Sbl.bin \
--no-reboot \
--KERNEL zImage
### Question
I'm wondering what's the role of the different files?
**update**: I encourage you to use CM-12.1
instead of CM-13
for your i9100
as the later is not officially supported.
Édouard Lopez
(200 rep)
Apr 15, 2016, 08:16 AM
• Last activity: Jul 17, 2021, 06:52 PM
1
votes
0
answers
1223
views
SAMSUNG a10s boot loop after TWRP flash
I have bought a SAMSUNG A10s phone and tried to install TWRP according to [this instruction][2]. I was able to unlock the bootloader and enter the 'Downloading' mode. I disabled time sycro and automatic updaten, set the time to a few weeks ago and connected the wifi in order to overcome [this issue]...
I have bought a SAMSUNG A10s phone and tried to install TWRP according to this instruction . I was able to unlock the bootloader and enter the 'Downloading' mode.
I disabled time sycro and automatic updaten, set the time to a few weeks ago and connected the wifi in order to overcome [this issue](https://www.xda-developers.com/fix-missing-oem-unlock-samsung-galaxy-s9-samsung-galaxy-s8-samsung-galaxy-note-8/) .
I used a Debian computer and the Heimdall tool to flash this TWRP image into the recovery partition (which replaced the existing recovery.img, I took no backup - daft, I know).
Caused by the unlocked bootloader I got a warning with every startup. The usual key-combination for the bootloader menu did not work. So, after a few boot procedures, I tried the offered option to lock the bootloader and perform a factory reset.
Unfortunately, this brought me to bootloop. I was only able to enter the 'Downloading'-mode again. Now, the bootloader is locked again but the images are invalid. I get this error message:
Partition recovery
Reason recovery: Eroor verifying vbmeta image: invalid vbmetaheader
SAMSUNG recovery, A107FXXU7BTL1, 36415554R
SAMSUNG vbmeta, A107FXXU7BTL1, 36415554R
Quitting this 'Downloading' mode brings me back to the loop which reaches the SAMSUNG logo before it boots angain.
Can anyone explain this situation? Has anyone an idea for a solution? Using Heimdall, I can still read the PIT. So, maybe I can also flash any images. I am very glad for help!

peng
(113 rep)
Feb 22, 2021, 08:06 PM
• Last activity: Feb 22, 2021, 10:03 PM
3
votes
0
answers
1136
views
How to install a post-market operating system on a Samsung Galaxy S7 with a broken screen that has "OEM unlock" still disabled?
I want to use my old Samsung Galaxy S7 (with a broken screen) as a headless device in my home network. _(Rationale - for the curious readers: Even with a broken screen it could possibly become a Bluetooth audio receiver (A2DP sink) or a CCTV-like device. And with its multiple CPU cores, I could even...
I want to use my old Samsung Galaxy S7 (with a broken screen) as a headless device in my home network.
_(Rationale - for the curious readers: Even with a broken screen it could possibly become a Bluetooth audio receiver (A2DP sink) or a CCTV-like device. And with its multiple CPU cores, I could even make it part of my home Kubernetes cluster to crunch some CPU-intensive tasks. This way it can remain of service in its afterlife.)_
To prepare the device, I would either like to install PostmarketOS or Lineage OS on it. The installation procedures for both operating systems require installing/flashing TWRP onto the recovery partition. (Installation guides: Lineage OS ; PostmarketOS )
Unfortunately, the device has most likely never been OEM unlocked before the screen broke. Based on my reading so far, this seems to be a pre-requisite for any kind of image flashing. At least, this is the most likely reason to me why all my flashing attempts failed. (See below what I've tried.)
Since the screen is broken, I cannot enable "OEM unlock" via the normal user interface-based procedure.
Now my questions are:
1. **Is "OEM unlock" being enabled a pre-requisite for flashing custom images onto my Samsung mobile device?**
2. **How do I enable "OEM unlock" without having access to the device's screen?**
Since I'm not too attached to the device, I'm really willing to go far in experimentation. Any data on the device has most likely become inaccessible in my previous flashing attempts already (I cannot check with a broken screen), so keeping data is not a concern. I'm also willing to cut an USB cable open to solder myself an USB/UART connector cable if necessary.
------
Here's what I've already tried:
### 1. Directly using PostmarketOS's
flasher
functionality (which uses Heimdall), i.e. without using TWRP
pmbootstrap init
[I cut the output of the installation wizard]
pmbootstrap install
[I cut some of the output]
[17:06:59] (native) format /dev/installp1 (boot, ext2), mount to mountpoint
[17:06:59] *** (4/4) FILL INSTALL BLOCKDEVICE ***
[17:06:59] (native) copy rootfs_samsung-herolte to /mnt/install/
[17:07:07] (native) make sparse rootfs
[17:07:13] *** FLASHING INFORMATION ***
[17:07:13] Run the following to flash your installation to the target device:
[17:07:13] * pmbootstrap flasher flash_rootfs
[17:07:13] Flashes the generated rootfs image to your device:
[17:07:13] /home/hauke/.local/var/pmbootstrap/chroot_native/home/pmos/rootfs/samsung-herolte.img
[17:07:13] (NOTE: This file has a partition table, which contains /boot and / subpartitions. That way we don't need to change the partition layout on your device.)
[17:07:13] * pmbootstrap flasher flash_kernel
[17:07:13] Flashes the kernel + initramfs to your device:
[17:07:13] /home/hauke/.local/var/pmbootstrap/chroot_rootfs_samsung-herolte/boot
[17:07:13] * If the above steps do not work, you can also create symlinks to the generated files with 'pmbootstrap export' and flash outside of pmbootstrap.
[17:07:13] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[17:07:13] Done
pmbootstrap flasher
[17:09:09] (native) flash rootfs image
[17:09:11] (native) install
Heimdall v1.4.2
Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...
Initialising protocol...
Protocol initialisation successful.
Beginning session...
Some devices may take up to 2 minutes to respond.
Please be patient!
Session begun.
Downloading device's PIT file...
PIT file download successful.
Uploading SYSTEM
11%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: SYSTEM upload failed!
Ending session...
### 2. Trying to flash TWRP using Heimdall
heimdall flash --verbose --no-reboot --RECOVERY twrp-3.5.0_9-0-herolte.img
Heimdall v1.4.1
Copyright (c) 2010-2014 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Manufacturer: "SAMSUNG"
Product: "Gadget Serial"
length: 18
device class: 2
S/N: 0
VID:PID: 04E8:685D
bcdDevice: 021B
iMan:iProd:iSer: 1:2:0
nb confs: 1
interface.altsetting: num endpoints = 1
Class.SubClass.Protocol: 02.02.01
endpoint.address: 83
max packet size: 0010
polling interval: 09
interface[1] .altsetting: num endpoints = 2
Class.SubClass.Protocol: 0A.00.00
endpoint.address: 81
max packet size: 0200
polling interval: 00
endpoint[1] .address: 02
max packet size: 0200
polling interval: 00
Claiming interface...
Setting up interface...
Initialising protocol...
Protocol initialisation successful.
Beginning session...
Some devices may take up to 2 minutes to respond.
Please be patient!
Session begun.
Downloading device's PIT file...
PIT file download successful.
Uploading RECOVERY
0%
2%
[...]
98%
100%
ERROR: Failed to unpack received packet.
ERROR: Failed to confirm end of file transfer sequence!
ERROR: RECOVERY upload failed!
Ending session...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.
ERROR: Failed to send end session packet!
Releasing device interface...
### 3. Trying to flash TWRP via Odin
Output log:
Added!!
Odin engine v(ID:3.1401)..
File analysis..
Total Binary size: 43 M
SetupConnection..
Initialzation..
Get PIT for mapping..
Firmware update start..
NAND Write Start!!
SingleDownload.
recovery.img
FAIL!
Complete(Write) operation failed.
All threads completed. (succeed 0 / failed 1)
I also tried flashing original Samsung firmware onto my device, also using Odin. That resulted in a "success" message, making me believe that my ROM is not fried (yet).
---
A similar question with a more narrow focus had already been posted back in 2016. Back then, the answer was "there's no public knowledge how to do this". Since the scope of that other question was focused on a way to enable "OEM unlock" through the modification of a file, I have created this new question with broader goal in mind.
Hauke P.
(131 rep)
Feb 17, 2021, 04:34 PM
2
votes
0
answers
1969
views
Heimdall gives ERROR: Failed to receive handshake response. Result: -7 on samsung J5 (2016)
I am trying to connect to a `Samsung J5 (2016) SM-J510FN`, using linux ubuntu `20.04` (`libusb-1.0.0`), to flash a TWRP image using heimdall `v1.4.2` (build from master `a2cfdaa`) I have set the udev based on the git repository [android-udev-rules](https://github.com/M0Rf30/android-udev-rules) Mobil...
I am trying to connect to a
Samsung J5 (2016) SM-J510FN
, using linux ubuntu 20.04
(libusb-1.0.0
), to flash a TWRP image using heimdall v1.4.2
(build from master a2cfdaa
)
I have set the udev based on the git repository [android-udev-rules](https://github.com/M0Rf30/android-udev-rules)
Mobile has USB debbuging on and OEM unlock. And using samsung cables for connection
Mobile phone is visible on lsusb either in normal OS boot or in download mode
Normal Boot:
Bus 001 Device 096: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy series, misc. (MTP mode)
Download mode / Odin mode:
Bus 001 Device 097: ID 04e8:685d Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II](Download mode)
Running heimdall print-pit
works without problems. But then:
heimdall flash --RECOVERY twrp-3.4.0-0-j5nlte.img --stdout-errors --verbose --no-reboot
Initialising protocol...
ERROR: Failed to receive handshake response. Result: -7
ERROR: Failed to receive handshake response. Result: -7
ERROR: Protocol initialisation failed!
ERROR: Protocol initialisation failed!
Releasing device interface...
My computer only has usb3.0 but also tried with a porthub for usb2.0, this looks like issue [#209](https://github.com/Benjamin-Dobell/Heimdall/issues/209)
Any ideas or tips on how to solve this problem ?!
Jorge Mendes
(121 rep)
Dec 31, 2020, 12:59 PM
2
votes
0
answers
307
views
Can we use Odin/Heimdall to emulate a fake flash (without real hardware connection)?
As my title suggests.. is there a method to flash a (samsung) firmware on a formatted sd card (fat32 I guess? And 16gb too?) instead of an actual phone (flash emulation) using pit file in heimdall/odin or changing values in heimdall/odin to make it happen? What I want to do : **Just partition and fl...
As my title suggests.. is there a method to flash a (samsung) firmware on a formatted sd card (fat32 I guess? And 16gb too?) instead of an actual phone (flash emulation) using pit file in heimdall/odin or changing values in heimdall/odin to make it happen?
What I want to do : **Just partition and flash the bootloader and kernel partitions to an sd card (it should be partitioned in a similar way as it happens after flashing them on internal memory normally through odin.. problem is .. phone is deadboot i.e can't go in download mode and I want to get the correct bootloader and primary partitions on the sd card and try to boot through it in download mode and reflash normally..)**
I have firmware but I cannot seem to get it flashed (or in other words, partitioned according to pit file) on an sd card without actual working phone sadly. I tried and researched a lot but couldn't find exact answer.
*Furthermore, repairing in a local shop or a box isn't an option. And can't afford replacing motherboard etc. Any help or guidance would be greatly appreciated. Thanks !*
Alex
(21 rep)
Dec 31, 2020, 02:09 AM
15
votes
4
answers
53142
views
Heimdall errors, "ERROR: Failed to detect compatible download-mode device."
When trying to flash a Galaxy S3 (ATT), I get > ERROR: Failed to detect compatible download-mode device. below is the log, $ sudo heimdall flash --RECOVERY recovery.img Heimdall v1.4.0 Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna http://www.glassechidna.com.au/ This software is provided f...
When trying to flash a Galaxy S3 (ATT), I get
> ERROR: Failed to detect compatible download-mode device.
below is the log,
$ sudo heimdall flash --RECOVERY recovery.img
Heimdall v1.4.0
Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
ERROR: Failed to detect compatible download-mode device.
Evan Carroll
(4661 rep)
Aug 14, 2013, 08:06 AM
• Last activity: Dec 22, 2020, 10:17 PM
2
votes
1
answers
3108
views
Can't boot into recovery mode after flashing TWRP on Samsung Galaxy S5
#Problem I can not boot my Samsung Galaxy S5 into recovery mode after flashing TWRP. #Background I am trying to install [LineageOS][1] on my [Samsung Galaxy S5][2]. #What I tried I followed the install [guide][3] on the LineageOS wiki: 1. Installing [heimdall][4], which I built from source to get v1...
#Problem
I can not boot my Samsung Galaxy S5 into recovery mode after flashing TWRP.
#Background
I am trying to install LineageOS on my Samsung Galaxy S5 .
#What I tried
I followed the install guide on the LineageOS wiki:
1. Installing heimdall , which I built from source to get v1.4.2, since the previous version could not complete the handshake with my phone (other people had the same error )
2. Checking if heimdall works by using
print-pit
, which it did
3. Flashing TWRP by using flash --RECOVERY twrp-x.x.x-x-klte.img --no-reboot
. Keeping their disclaimer in mind I tried both the current version as well as two older ones. Heimdall outputs upload successful
, and I disconnect the phone (after the device has been released).
4. Booting into recovery mode -> **FAIL**
#Error
The device boots into download mode instead (and no, I did not accidentally switch the volume buttons). There is no error message.
#Edit
I originally (and wrongfully) assumed the device to be Samsung Galaxy S5 LTE . It was, however, a Samsung Galaxy S5 Plus (at least this is how I explain the error).
nonthevisor
(171 rep)
Jul 18, 2019, 10:15 AM
• Last activity: Jul 18, 2020, 03:51 PM
Showing page 1 of 20 total questions