I found a very specific shader error when testing a shader on android, causing it to render magenta on the device.

I tested on 3 devices: two Galaxy S8 with different GPUs (Mali-G71 and Adreno 540), and a Galaxy S7 with a Mali-T880. The shader works fine on Adreno, but doesn’t work on the Mali devices.
Here’s a test shader which you can use to reproduce the error. In order to trigger the issue, you need 3 or more TEXCOORDs in your V2F and have SV_POSITION be declared as a Half4.
Shader "Unlit/testHalf"
{
Properties
{
}
SubShader
{
Tags { "RenderType"="Opaque" }
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
half4 vertex : POSITION;
};
struct v2f
{
half2 uv : TEXCOORD0;
half2 uv1 : TEXCOORD1;
half2 uv2 : TEXCOORD2;
half4 vertex : SV_POSITION;
};
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
return o;
}
half4 frag (v2f i) : SV_Target
{
half4 col = half4(1,1,1,1);
return col;
}
ENDCG
}
}
}
Changing SV_POSITION to a float4 or having 2 or less TEXCOORDs solves the issue:

but this is boggling my mind. What could be the cause for this behaviour?