Update shared Gaia workflows and Sargo development tooling
Fix camera switching and Contacts/SMS activity routing across shared hosts. Integrate Marketplace installation and native standalone recovery tools, Bluetooth runtime packages and trusted certificates. Update English/French READMEs and the shared changelog with tested scope and remaining radio/audio/Bluetooth limitations. Preview17 remains the existing APK; no new native image is released. Validation: shared JavaScript and native Python tests; Android packaging and payload parity from an isolated publication checkout.
This commit is contained in:
parent
d04824ec89
commit
0041cd9660
101 changed files with 3883 additions and 335 deletions
25
tundra/tools/sparse_backup.py
Normal file
25
tundra/tools/sparse_backup.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# SPDX-License-Identifier: MPL-2.0
|
||||
"""Decode the read-only TUNRAW1 stream; reject truncation and overlapping blocks."""
|
||||
import struct
|
||||
|
||||
|
||||
def exact(stream, length):
|
||||
data=bytearray()
|
||||
while len(data)<length:
|
||||
block=stream.read(length-len(data))
|
||||
if not block:raise ValueError('Truncated backup stream')
|
||||
data.extend(block)
|
||||
return bytes(data)
|
||||
|
||||
|
||||
def receive(stream, target, expected_size):
|
||||
if exact(stream,8)!=b'TUNRAW1\0':raise ValueError('Unexpected backup protocol')
|
||||
end=0
|
||||
while True:
|
||||
offset,length=struct.unpack('<QQ',exact(stream,16))
|
||||
if not length:
|
||||
if offset!=expected_size or stream.read(1):raise ValueError('Backup size or trailer mismatch')
|
||||
target.truncate(expected_size)
|
||||
return
|
||||
if offset<end or length>65536 or offset+length>expected_size:raise ValueError('Invalid backup extent')
|
||||
target.seek(offset);target.write(exact(stream,length));end=offset+length
|
||||
Loading…
Reference in a new issue