Hei,
thanks for your answer. settings says: CONFIG_NET_KEY=y
but anyways - i got it running by now.
Just for all who are interessted in this:
Once i setup my strongswan server as mentioned above i once got it running using the android settings UI.
(but did only work with a screen lock like pin or pattern - and dhcp active on eth0)
But it did not work with the binary via shell - i still do not know why SAD dump error.
However i found out that the android VPN service is using a socket to communicate with the ipsec tools (dev/socket/racoon)
so i build myself a log to see what the UI is sending via the socket. (for this, see main.c android_get_control_and_arguments)
Sadly the build-in netcat binary does not support sending data to a UNIX socket - so you have to build the /external/netcat/ project to get the nc binary urself.
Copy the nc to /system/xbin/nc and use it with the -U flag to connect to racoon socket.
so finally start the racoon socket with
setprop ctl.start racoon
now u can send commands like this:
echo -e "\\x00\\x04\\x65\\x74\\x68\\x30" | /system/xbin/nc -U /dev/socket/racoon
which means "04eth0" (first two bytes are the length of the following argument)
translate all arguments either with ascii table or use a bash script which is easier,
Another thing was that the socket was closed by the racoon binary (shutdown) which killed my connection each time.
so i removed the shutdown call in here:
#ifdef ANDROID_CHANGES
do_plog(LLV_INFO, "Setting AID VPN .. \n");
shutdown(control, SHUT_WR);
setuid(AID_VPN);
#endif
Furthermore there is an issue with the netcat nc binary aswell, because it uses 50% CPU while it is open.
So i changed the while loop in readwrite to have a sleep at the end, now it is not noticeable anymore.
PLEASE NOTE: I do not completely unterstand what's going on and "fixed" this using try and error.
Also this does not really have to do something with Android x86 and the changes could be an security issue aswell.
Greets.