Where is the .config hidden on Samsung Galaxy S4? cat /proc/config.gz
  tmp-mksh: cat: /proc/config.gz: No such file or directory


Is there another place to find it?
/proc/config.gz (and consequently .config), a file containing all needed flags for the Linux kernel building process, can only be found if the kernel maker / your device manufacturer explicitly enabled config.gz availability when the Linux kernel was being built. 

So if it's not present in /proc, you'd have to either do a trial-and-error, get help from somebody else, or contact the manufacturer.