I became aware that
I don't know if he is friendly should not be translated into
Mi ne scias se* li estas amika
Mi ne scias ĉu li estas amika
But why? Se means "if", so why it is wrong in this case?
Simple rule of thumb - if you are able to substitute "whether" (I don't know whether he's friendly) then use "ĉu".
The words following se provide the condition under which the other clause becomes relevant.
So, Mi ne scias se li estas amika means "If it is the case that he is friendly, then I do not know."
You need ĉu to express the fact that scias controls the other clause in the manner of ke.
(Note that amika is slightly stronger than the English friendly, which often just means afabla.)
se - under the condition (that)
ĉu - whether (or not)
In your case it is a question of whether or not a person is friendly, and therefore the word to use is ĉu
The other phrase may be used, I suppose, in a very unusual context meaning something like "If he is friendly, then I don't know*.
"Kiu estas la malamiko en la libro?"
"Mi ne scias se li estas amika"
They are both correct sentences, but the meaning is very different. But maybe it's a bit clearer with a different example.
Ni scios morgaŭ, ĉu ŝi venos. = We don't know whether she will come or not, but tomorrow we will know.
"Ĉu Lidia estas alta?" "Ni scios morgaŭ, se ŝi venos." = If she comes, we will know tomorrow whether she is tall. If she doesn't come, we will not know whether she is tall.
An easy way to check: If you can switch "if" out for "whether" in the English sentence without it changing its meaning, you should use "ĉu" in Esperanto.
It's also worth noting that using "ĉu" is consistent with sentences like "Mi scias, kiel mi povas fari tion", "Mi ne scias, kie estas la necesejo", "Mi komprenas, kial tio estas malbona ideo", "Mi volas scii, kiom manĝas elefanto", etc.
In Esperanto the second parts of the sentences all start with a question word, and are in fact usually perfectly fine questions if you just add a question mark. (Kiel mi povas fari tion? Kie estas la necesejo? etc.) So why should that be any different with "Mi ne scias, ĉu ŝi ŝatas min"?
We don't do that in English with "ĉu" (unlike e.g. "I don't know where the toilet is"), but I think that's just because, unlike Esperanto, English doesn't have a question word for yes/no questions. So instead we use "whether" or "if". But if English had one, we'd probably use it for this too. I do know that Japanese also uses its question particle in these cases, for example.