Who was the head of the investigation in Portimão then?
The Policia Judiciária is the only police force that does criminal investigation under the Public Ministry (Judicial system and not the Government) and in order to keep their independence, all their commitments are ordered and supervised by the Public Ministry. That is to say that every investigation is under the control of a judge assigned for that effect. Of course there is an hierarchy within the PJ teams, and obviously someone must be assigned a responsibility to supervise the work in the field, but in the end, every little decision has to be authorized by the judge. For instance, the attribution of the arguido status, which is a right consigned in the Legal Code, may be requested or attributed by the police, but only if the judge agrees with it.
If Amaral, as you so much wish to attribute him, was with total and full responsibility over the work of his colleagues, he would have used the phone taps because they were fundamental for the investigation, but since they had to have the authorization of the judge and he decided they were against the law, they were discarded.
The responsible for Madeleine McCann's case was Judge Pedro Frias.