Skip to content
This repository was archived by the owner on Mar 6, 2022. It is now read-only.

Add support for Pixel 5 #178

Merged
merged 2 commits into from
Jan 13, 2021
Merged

Add support for Pixel 5 #178

merged 2 commits into from
Jan 13, 2021

Conversation

hackoder
Copy link
Contributor

@hackoder hackoder commented Jan 6, 2021

These changes should work for redfin. Tested against latest.json generated using your latest.json script and with android-prepare-vendor/android11.

Would need your fork of android-prepare-vendor updated as well. Since the extraction scripts use both python2 and python3, I had to install protobuf for both to get it to build. Let me know if you spot any issues.

@dan-v
Copy link
Owner

dan-v commented Jan 6, 2021

Thanks @hackoder! Overall the changes look good. Unfortunately because the latest upstream android-prepare-vendor has this dependency on python2 and python3 protobuf, it will be a breaking change when I merge latest to rattlesnakeos android-prepare-vendor fork and it will require existing stacks to be updated with your change in order to not fail builds. That stinks, but definitely not your issue; more of a design flaw of this project and not locking deterministically to specific commit hashes. I'll probably wait until middle of the month to let people get January builds done and then pull this change in and create a new release and update android-prepare-vendor at the same time.

@hackoder
Copy link
Contributor Author

hackoder commented Jan 6, 2021

Ah, you're right, can't update without breaking existing stacks. Makes sense to wait until the later half of the month.

@pinembour
Copy link

I couldn't get the build to finish on my end with android-prepare-vendor/android11. It failed when extracting the ota. Here's the log :

[*] Extracting '/home/ubuntu/rattlesnake-os/vendor/android-prepare-vendor/redfin/rq1a.210105.003/redfin-ota-rq1a.210105.003-9570e375.zip'
Traceback (most recent call last):
  File "/home/ubuntu/rattlesnake-os/vendor/android-prepare-vendor/scripts/extract_android_ota_payload/extract_android_ota_payload.py", line 13, in <module>
    import update_metadata_pb2
  File "/home/ubuntu/rattlesnake-os/vendor/android-prepare-vendor/scripts/extract_android_ota_payload/update_metadata_pb2.py", line 23, in <module>
    rminor_version\x18\x0c \x01(\r:\x01\x30\x12;\n\npartitions\x18\r \x03(\x0b\x32\'.chromeos_update_engine.PartitionUpdate\x12\x15\n\rmax_timestamp\x18\x0e \x01(\x03\x12T\n\x1a\x64ynamic_partition_metadata\x18\x0f \x01(\x0b\x32\x30.chromeos_update_engine.DynamicPartitionMetadataB\x02H\x03')
TypeError: __new__() got an unexpected keyword argument 'serialized_options'
[-] OTA data extract failed

My guess is that this recent commit is responsible. Reverting it lets the build proceed.

@hackoder
Copy link
Contributor Author

hackoder commented Jan 7, 2021

I think the issue is that they are using #!/usr/bin/env python at the top, which in ubuntu 18.04 ends up being python 2.x, where protobuf is an older distro version. The other script explicitly uses python3 so it doesn't run into the same issue.

So, options:

  • Explicitly have python3 in android-prepare-vendor scripts
  • Update protobuf for python2 in the build script (which might be tricky because there's no pip for python2 AFAICT; would need to install pip and then update protobuf)
  • something else?

@dan-v
Copy link
Owner

dan-v commented Jan 12, 2021

@pinembour - thanks for catching that issue! I've got the change to have it default extract_android_ota_payload.py to python3 upstream (AOSPAlliance/android-prepare-vendor#56). I'll spin up a redfin stack and do some testing with this android-prepare-vendor change and this branch.

@dan-v
Copy link
Owner

dan-v commented Jan 13, 2021

Looks good from a build perspective. I'll merge this in and cut a new release soon.

@dan-v dan-v merged commit 3f159ad into dan-v:11.0 Jan 13, 2021
@ddxor ddxor mentioned this pull request Feb 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants