Restore app data from 4.x in 6.x I have an old phone which I used for a few month when my S4 was broken. I managed to backup and restore the app data from S4 to this phone by just copying /data/data/appname - however both devices were 4.x . 

Now I have a new phone with 6.0 Marshmallow and I intended to do the same thing - and failed.

Example whatsapp: I copied the old apk, installed it to 6.0 and then (in twrp) replaced /data/data/com.whatsapp with the old one.

For testing I also set it to chmod 777. Whatsapp shows a notification (A problem with chat history) and if I start whatsapp it closes (crashes?) immediately.

Any idea how to copy the old app data to marshmallow? thanks.
Assuming that you still have the old device and it works properly, I'd advise that you use Titanium Backup to migrate your apps. Check out this answer for more details about it.

Honestly, I have never tried to restore app data between different Android OS major versions (such as 4.X to 6.X in your case), but it's worth a shot. By the way, WhatsApp has its own built-in feature to backup and restore data, in case you were wondering. And please let me know how this turned out, I'm curious to know the outcome for myself.