1

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 ?

17
  • 4
    If you you are targeting a stock rom and you know that the requirement is that you have access to the signing keys the system was signed with (which you don't have) why do you ask here? What do you expect from us if the task is impossible?
    – Robert
    Commented Mar 22, 2020 at 17:54
  • 1
    I would consider OEM unlocking as a bootloader modification as it changes the bootloader configuration.
    – Robert
    Commented Mar 22, 2020 at 20:16
  • 3
    Usually in system settings you can only allow OEM unlocking. The actual unlocking process has to be started by certain commands sent to the bootloader afterwards.
    – Robert
    Commented Mar 22, 2020 at 20:22
  • 2
    Hello @user2284570. Please mention what kind of OTA you are targeting? Whether flashable through a recovery or via a system app (as is the case in A/B partitions supported devices)? Second, do explicitly mention whether your device has custom recovery or not, because stock recovery wouldn't permit non-OEM payload to be flashed. Third, you need to start from basics. OTA updates flashable via recovery mode are nothing more any other recovery flashable ZIP files. So start learning how to make a recovery flashable zip and then learn to modify it gradually to suit your needs.
    – Firelord
    Commented Mar 23, 2020 at 11:18
  • 1
    I guess you misunderstood my words or I didn't write clearly. Let me try again. I know what adb sideload XYZ.zip does. It sideloads a ZIP. The commans works on both stock recovery and custom recoveries. The ZIPs that can be sideloaded can be done using both custom and stock recoveries. But that wasn't my question so I am not getting why you replied that as an answer.
    – Firelord
    Commented Mar 23, 2020 at 11:42

1 Answer 1

6

You can't create or modify OTA zip without the proper OEM signing key. However, there exist holes in older devices like Samsung Galaxy Y which allow flashing unofficial zip with test keys, but these kind of hacks are outdated (source)

if you want to create OTA zip you need update-binary for your device and write updater-script in EDIFY language

you can also replace update-binary with shell script which makes things easier and device independent

learn how to sign your zip (scroll down to Zip Signing)

3
  • Doesn’t seems realistic… How does SuperSu is able to produce an ᴏᴛᴀ update which can be installed over all devices through ᴀᴅʙ sideload ? Commented Mar 23, 2020 at 11:05
  • And I suppose that leaked key isn’t public ? I mean not available for the general public to sign their own ᴏᴛᴀ ? Commented Mar 23, 2020 at 11:36
  • The problem remains on how to build such file‑based zip packages. How to get the difference file to compare with ? Commented Mar 23, 2020 at 11:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .