In a word, glue. There is medical skin glue that is more like rubber cement. I’ve tested 7 different types that are all designed to keep devices attached or connected to skin in some way. Some last only a few days while some can last up to a few weeks… but they all eventually come loose after the skin underneath grows enough to slough off the glue along with the dead skin cells. When you have a device with a 2 week lifespan, you prep the skin with disinfectant, then present the sterilized interface through the skin, with the external side fully encircled by sterile glue (like on adhesive bandages is sterile along with the gauze pad).