schnatterer / rooted-graphene

GrapheneOS rooted and served via its own OTA server on GitHub pages
https://schnatterer.github.io/rooted-graphene/
MIT License
7 stars 4 forks source link

Also build unrooted image #1

Closed schnatterer closed 6 months ago

schnatterer commented 7 months ago

This would allow for enabling/disabling root via sideload while preserving AVB.

Use subfolders in Github page, so switching is possible by changing URL in custota?

pascallj commented 7 months ago

Please be aware that Custota doesn't work on an unrooted image by default. Unless you somehow modify the system image to include the Custota stuff into the rom, but it doesn't seem like that's what you are trying to do from an initial glance at the repo.

So once you go unrooted, you can't update anymore with Custota. You can by flashing with ADB however.

schnatterer commented 7 months ago

Thanks @pascallj, I aware of this. I just like the idea of being able to simply unroot. Even if it's just to try out if you're banking app is crashing due to root detection or some other reason :roll_eyes: Yes, for rooting again later and for OTA updates, you'll have to adb sideload first.

xabolcs commented 6 months ago

... Custota doesn't work on an unrooted image by default. Unless you somehow modify the system image to include the Custota stuff into the rom ...

For the record: an ext4 formatted system.img could be easily modified with mount, resize2fs and e2fsck tools. More details in the avbroot discussions.

I thought about adding Custota to (a rootless) system already. :slightly_smiling_face: The missing part was this rooted-graphene functionality!

So thanks @schnatterer for sharing! :pray:

schnatterer commented 6 months ago

@xabolcs you're welcome 😊!

So with these simple commands plus adding the custota apk to the system apps, custota could be added to the rootless OTA without breaking AVB?

Thanks for pointing this out! Did you try if this theory holds in practice? Do you happen to have a snippet at hand? 😁

xabolcs commented 6 months ago

... custota could be added to the rootless OTA without breaking AVB? Did you try if this theory holds in practice?

I never tried adding Custota. But had success with adding GApps! :muscle: Just read that discussion from the beginning!

Do you happen to have a snippet at hand? 😁

Nay! I was too lazy to cook a script from my command history. But that discussion have some! :ok_hand:

xabolcs commented 6 months ago

While adding apps to system.img isn't a big deal, but all the *.sh in Custota-release.zip make me worry. :confused:

schnatterer commented 6 months ago

In theory we could just run those on the mounted system img. In practice, they surely have some dependencies to magisk. Probably should all Andrew for the best way to include custota into an ota.