In my case, I don’t want to permanently root my own device and if possible, I want to modify the /data
partition directly.
In order to do so, I want to add a single file to the /system partition or even apply capabilities on a single executable. That means no apk ; no new apps ; no bootloader changes.
But everything I found for creating my own ota for rooting explains how to use adb to apply it, not how to build such a file myself. Or suppose that I’m building for a firmware I designed myself for which I have the signing keys (whereas the aim is to do it for stock Samsung).
So how to create my own file‑based (with the aim to modify file permissions to existing files) ota zip file which can be installed through adb sideload on all devices as SuperSu does ?