-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does this tool have to be used with avbroot? #47
Comments
Custota is meant to be used with OTAs signed by a private key you have. avbroot is one option (which re-signs OTAs and optionally roots them also). Some other folks also use Custota with open-source ROMs (eg. LineageOS) that they compiled themselves. If you really want to use an unmodified stock Pixel OTA, you can use your own key to sign the |
Ok, so in my understanding, should csig be signed with the private key of ota too? Because I was looking at the tool's parameters and noticed that he can accept -c and -C as parameters when generating csig, which seems to be used for csig and ota authentication respectively, and I ran it without any problems, but I got an error when checking for updates. Maybe I should install the certificate for csig validation somewhere? Or did I make a mistake somewhere?
|
Yep, you'll have to grab the existing The easiest way to replace that zip after it has been updated is by creating a Magisk module. |
Is this part of the validation done by Custota? I was wondering if it would be possible to modify part of the source code so that it could skip validation or specify an external certificate in certain circumstances? |
If modifying the code makes it work, then I'd like to add a "load trusted 3rd party certificates" feature to the debug options to make it compatible without installing additional modules. |
Yeah, that's a good idea. I'll work on that today. EDIT: To answer your question directly, the |
This is useful when the csig is signed by a different key than the OTA and installing the certificate in `/system/etc/security/otacerts.zip` isn't desired. Fixes: #47 Signed-off-by: Andrew Gunnerson <[email protected]>
This is useful when the csig is signed by a different key than the OTA and installing the certificate in `/system/etc/security/otacerts.zip` isn't desired. Fixes: #47 Signed-off-by: Andrew Gunnerson <[email protected]>
Could you give #48 a try? |
It looks like the csig validation has been passed, but I'm facing some other problems on my device, which looks similar to what you mentioned here. This should be due to kernelSU whitelisting, which I fixed by manually extracting the apk and "updating" it. Now he's working perfectly, and I've successfully OTA'd and switched slots! It might be possible to provide the apk in the release and mention in the Usage that KernelSU should manually update the app after installing the module and restarting it, so that it works properly. Or just install a mini apk like magisk and let the user install the full apk the first time they run it, so that every rooting method can follow the same procedure! |
After dozens of tests, I realized that some of the changes in |
🎉 I want to find out why KernelSU causes that issue before adding any workarounds. It seems to happen with any module that installs a system app (not just Custota), but I haven't had the time to try and figure out why yet.
Darn. I don't try to hide root, so I'm a bit out of the loop with this stuff. If I had to guess, it's probably detecting some of the mount points. Does it work if you comment out this section of Custota/app/module/post-fs-data.sh Lines 40 to 64 in 132c23c
If that doesn't work, you're probably stuck with enabling/disabling the module when needed. The SELinux parts of |
This is useful when the csig is signed by a different key than the OTA and installing the certificate in `/system/etc/security/otacerts.zip` isn't desired. Issue: #47 Signed-off-by: Andrew Gunnerson <[email protected]>
Okay, I understand, I'll try to go to the KernelSU community to try to understand the details of this part. Then I do have the March 2024 update, but after I commented out this section, custota doesn't work properly and is still detected, so it looks like selinux is being detected. |
Since the Pixel is no longer capable of OTA updates after rooting, I wanted to try to utilize this tool to accomplish this.
But I've been trying all day and the problem always occurs with the csig signature, but it's impossible for me to get google's private key to sign the csig, which confuses me, does this tool have to be used with avbroot?
The text was updated successfully, but these errors were encountered: