Release Vulpes OS 2.7 Preview 25 for Desktop, Android and Pixel 3a

This commit is contained in:
OverSu 2026-11-28 12:20:19 +01:00
commit 3a1fba4efe

View file

@ -75,17 +75,26 @@ def main():
parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument('--package',type=Path,default=Path(__file__).resolve().parent)
parser.add_argument('--serial')
parser.add_argument('--install',action='store_true')
mode = parser.add_mutually_exclusive_group()
mode.add_argument('--install',action='store_true')
mode.add_argument('--update-from-p24-corrected', action='store_true', help='Confirm this phone runs the corrected P24 full installation; update boot_a only')
parser.add_argument('--erase-userdata',action='store_true')
parser.add_argument('--experimental',action='store_true')
parser.add_argument('--reboot',action='store_true')
args=parser.parse_args();value=package(args.package)
print('Pixel 3a / Sargo: replace userdata, dtbo_a, vbmeta_a and boot_a; activate slot A.')
print('ALL existing user data and the old OS in userdata will be lost. Bootloader remains unlocked.')
print('No existing Android or Droidian installation is required.')
if not args.install:
print('Review only; no device command sent.');return
if not args.erase_userdata:parser.error('--install requires --erase-userdata')
update = args.update_from_p24_corrected
if args.erase_userdata and not args.install:
parser.error('--erase-userdata is only valid with --install')
if update:
if value.get('preview') != '2.7-preview.25' or value.get('volumeUuid') != '4e2a0eec-cd82-4a0a-ac57-70e79b3faebb' or value.get('systemImageSha256') != 'c3017c3decc0824ed4a64124b5f7c47a7ceac5d116419bfd4fecdc4bdffd70b0':
parser.error('This package is incompatible with the corrected P24 installation')
print('Updating boot_a only. The installed data volume is preserved.')
elif args.install:
if not args.erase_userdata:
parser.error('--install requires --erase-userdata')
print('Full installation erases userdata and replaces the existing OS.')
else:
print('Review only. Choose the P24 update or the full installation.');return
if not value.get('flashQualified') and not args.experimental:
parser.error('This candidate is not qualified; private tests require --experimental')
fastboot=shutil.which('fastboot')
@ -98,6 +107,14 @@ def main():
serial=serials[0]
if serial not in serials:raise ValueError('Selected device not in Fastboot')
info=preflight(fastboot,serial,value)
if update:
if info['current-slot'] != 'a' or getvar(fastboot,serial,'slot-successful:a') != 'yes':
parser.error('The update requires a successfully booted slot A')
subprocess.run([fastboot,'-s',serial,'flash','boot_a',str((args.package/'boot.img').resolve())],check=True,timeout=150)
if args.reboot:
subprocess.run([fastboot,'-s',serial,'reboot'],check=True,timeout=30)
print('Update complete. Userdata preserved.')
return
report={'deviceSha256':hashlib.sha256(serial.encode()).hexdigest(),'preflight':info,'completed':[],'passed':False}
path=args.package/'install-report.json'
def save():path.write_text(json.dumps(report,indent=2)+'\n')