To create a hard link from an application or script, you can use a zLink API. For information, see the NDK: File System Services (64-bit).
You can also use the Linux link(2) command to create hard links from applications or scripts.