DevOp - consultant - artisan

Qualité, amélioration continue, agilité, professionnalisme.

Un besoin ? Un projet ? Écrivez moi !


27 posts

How to build latest heimdall – samsung galaxy grand prime SM-G530FM – Failed to download PIT file

I have a Samsung galaxy grand prime (aka SM-G530FZ), and I want to install a new custom rom.

I want to use Heimdall to install a custom recovery, as usual I search on xda-developers (best mobile resources) and find several thread about Galaxy grand prime.

But when I want to install the recovery with the simple command :

[pastacode lang= »bash » manual= »heimdall%20flash%20–RECOVERY%20recovery.img » message= » » highlight= » » provider= »manual »/]

I had the following error:

[pastacode lang= »bash » manual= »ERROR%3A%20Failed%20to%20send%20request%20to%20end%20PIT%20file%20transfer!%0AERROR%3A%20Failed%20to%20download%20PIT%20file!%0A » message= » » highlight= » » provider= »manual »/]

Solution is to build heimdall from sources.

  1. Clone github repository
  2. Build
  3. Make
  4. profit

1. Clone heimdall repository

First create a directory for heimdall:

[pastacode lang= »bash » manual= »mkdir%20heimdallFromSources » message= » » highlight= » » provider= »manual »/]

And clone:

[pastacode lang= »bash » manual= » » message= » » highlight= » » provider= »manual »/]

2. Build it

From the linux/README

Appendix B – Installing Heimdall Suite from Source:

1. First make sure you have installed build-essential, cmake, zlib1g-dev,
qt5-default, libusb-1.0-0-dev and OpenGL (e.g libgl1-mesa-glx and

NOTE: Package names may not be absolutely identical to those above.

2. Open a terminal and navigate to the directory you downloaded,
or extracted, Heimdall to.

3. Enter the following commands to compile Heimdall Suite:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..

Make sure you have all requirements from the 1 point and follow point 3

[pastacode lang= »bash » manual= »cd%20Heimdall%0Amkdir%20build%0Acd%20Build%0Acmake%20-DCMAKE_BUILD_TYPE%3DRelease%20..%20(note%20the%20..%20are%20important)%0Amake%0A » message= » » highlight= » » provider= »manual »/]

After that

[pastacode lang= »bash » manual= »cd%20libpit%0Amake%0Acd%20..%0Acd%20heimdall%0Amake%0A » message= » » highlight= » » provider= »manual »/]

If all run without issue, you will have a bin folder, with heimdall in it.


[pastacode lang= »bash » manual= ».%2Fheimdall%20flash%20–RECOVERY%20path%2Fto%2Fyou%2Frecovery.img » message= » » highlight= » » provider= »manual »/]

That’s for heimdall !

After rebooting to the custom recovery with volume up + home + power I can’t user it, because touchscreen is not functionnal !

To save your time this is the TWRP functional for me (01/05/2017)

In this very moment I try to install the resurrection remix, I have tried 3 version so far, and no touchscreen … I let you know if I find a working release, if not, I think I will try lineageos

Resources :

Order relationships (association) between entities with symfony/doctrine

I want just share a little something today.
Sometimes, you spend time to try to achieve something, and when you finally manage to do it, you see, the best practice, the helper, the proxy class, you see the real and beautiful solution !

Today is one of this day for me, I need to order a relationship between to entities, managed by doctrine, in my Symfony project.
But instead of searching in the doc (RTFM… always) I have tried and lost my time before I search and found.
Ddoctrine is clearly an amazing solution, and *of course* my use case is already manage by an annotation :

Short (copied from doc):

[pastacode lang= »php » manual= »%2F**%20%40Entity%20**%2F%0Aclass%20User%0A%7B%0A%2F%2F%20…%0A%0A%2F**%0A*%20%40ManyToMany(targetEntity%3D%22Group%22)%0A*%20%40OrderBy(%7B%22name%22%20%3D%20%22ASC%22%7D)%0A**%2F%0Aprivate%20%24groups%3B%0A%7D%0A%0A%2F*%20With%20symfony%20%20*%2F%0Ause%20Doctrine%5CORM%5CMapping%20as%20ORM%3B%0A%0A%2F**%20%40Entity%20**%2F%0Aclass%20User%0A%7B%0A%2F%2F%20…%0A%0A%2F**%0A*%20%20*%40ORM%5CManyToMany(targetEntity%3D%22Group%22)%0A*%20%40ORM%5COrderBy(%7B%22name%22%20%3D%20%22ASC%22%7D)%0A**%2F%0Aprivate%20%24groups%3B%0A%7D%0A » message= » » highlight= » » provider= »manual »/]

Doctrine official :
Order relationship between entities

Yes ! Just like that

Symfony Ajax populated ENTITY field handle

If you use an ENTITY type field in your formType, and if you populated this field with Ajax, you can have this error :


Object(Symfony\Component\Form\Form).children[tag] = 2

Caused by:


Unable to reverse value for property path "tag": The choice "2" does not exist or is not unique

Caused by:


The choice « 2 » does not exist or is not unique

I have a user Entity with a ManyToOne relation with a Tag entity.

In my form, when I select the user, an AJAX request retrieve all the user’s tag, and add the options on the select element.

But Symfony doesn’t know about these values, and the validation fails when the form is submitted.

After lot of tests, with data transformer, listener, both, I succeed with a simple event subscriber following this symfony doc page

Basically, the event subscriber occurs on the pre_submit, take the ID of the TAG, and add an entity field with a custom query who retrieved the good tag entity.

Enough talk, more code 🙂