ponces/treble_aosp

Older releases have OTA broken since OTA URI changed

Closed this issue · 7 comments

Acknowledgements

  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • This is not a feature request.
  • This issue is not a duplicate of an existing issue.
  • The issue is solely related to this GSI.
  • This issue occurs with the latest available build.
  • I am not running a custom vendor on my device.
  • This issue is not kernel related.
  • This issue is not related to Magisk/KernelSU/APatch.

Info

  • Device: Motorola One Fusion (Astro)
  • GSI version: Ponces AOSP 14 10/28/2023
  • Vendor version: Motorola One Fusion (Astro)

Expected Behavior

Expected behavior is the updater that is part of the phh trebble app finding new new versions of the OS and allowing upgrade OTA.

Current Behavior

phh trebble app does not find new new versions of the OS.

Possible Solution

Possible solutions:
a) Update to newer build from scratch (not OTA)
b) There might be a way to override the OTA URI stored at ro.system.ota.json_url

Steps to Reproduce

  1. Run the phh trebble app updater under Ponces AOSP 14 10/28/2023 or older

Logs

From my investigation the source of the issue is the OTA URI stored in ro.system.ota.json_url needs to be changed from:
https://raw.githubusercontent.com/ponces/treble_build_aosp/android-14.0/ota.json
to:
https://raw.githubusercontent.com/ponces/treble_aosp/android-14.0/config/ota.json
The old OTA URI now returns 404: Not Found

Additional context

The same root issue would apply to the sample spoof json file

Since the URI https://raw.githubusercontent.com/ponces/treble_build_aosp/android-14.0/config/ota.json does work and returns the same JSON file as the new URI https://raw.githubusercontent.com/ponces/treble_aosp/android-14.0/config/ota.json I setup a network proxy that redirects /android-14.0/ota.json to /android-14.0/config/ota.json but I am baffled because while I was able to verify that the redirection works, the updater still does not offer an new update.

Is this still an issue?
Regular installation procedure can be used as a workaround right?
Sorry for the inconvenience...

Thanks for your great work and your time getting back to this.
I have tried proxies, phhusson's newest trebble.apk with updater, but no success.
The updater does not give me a new OTA to update to.
A possible work around might be to mess around with the partitions to change the vendor read only constants where the URI is baked in but I am not sure I want to go that far.
So, yes I am afraid a full reinstall with data loss might be the only workaround.

A possible temporary solution might be to make a copy or symbolic link of /config/ota.json at /ota.json
Just for some time to get devices stuck on the 10/28/2023 build to OTA to the latest.
Same for spoof /config/spoof.json at /spoof.json

I just duplicated the file so you should be able to update now with the regular TrebleApp of your version.
Can you please confirm?

The OTA update was successful.
Feel free to close this issue and remove the duplicate JSON files when you see fit.

Best Regards, nicahokie