Samsung Galaxy S8 userdata partition problem
Created by: TimoSairiala
I think this is not actually an problem with Heimdall, but rather something around it. But as I understand here I would find many peoples who understands this area, maybe I can find some help.
So I am trying to generate and flash an userdata partition on galaxy S8 but the phone wont accept my image. I can do this without any problems for older samsung devices.
What I would do is
- make an sparse image on ubuntu (with make_ext4fs from android-tools-fsutils package) make_ext4fs -l [lenght] -s userdata.img [directory_to_my_content]
- boot the device on Download mode
- flash it with heimdall flash --userdata userdata.img
Now, on galaxy S8 the flashing goes ok for some time, but in around 40% it just stops and I have to reboot the device manually.
I checked many samsung firmware packages and usually they doesn't contain userdata image, but this one has it: https://samsung-firmware.org/download/Galaxy__S8__/4v72/NEE/G950FXXU1AQJ1/G950FOXM1AQJ1/ and this userdata image I can flash ok with heimdall. It takes hours and days to download it so I have copied the userdata image here: https://1drv.ms/u/s!AlTfydQsL14YhKIifEMOccrcobcj6A
I did simg2img it and after mounting I can see it has plenty of apps and cache and some other files in it. First I thought that the userdata image has have something like this in it or it will fail. I tried to make an new sparse image with this content included, but the flashing still fails. I tried to make it a bit smaller, but it always fails.
If I see
file userdata.img
userdata.img: Android sparse image, version: 1.0, Total of 2621440 4096-byte output blocks in 447 input chunks.
Nothing special there, but if I see
simg_dump userdata.img
simg_dump: userdata.img: The file header size was expected to be 28, but is 32.
it wont dump the file because header size is something else than expected? Maybe this is the reason why the device wont accept the file?
So I am not that sure if there is a way for me to generate flashable userdata image for this phone? Or maybe I am lost and this header mismatch is not the problem, but there is something else I should check or do? Do you have any hints or clues from where I could begin?