Fix Android 10 resource sync and fullscreen; record Global ROM comparison

This commit is contained in:
shen
2026-09-30 19:35:52 -07:00
parent b8b0a84149
commit 1e4762ccf4
4 changed files with 84 additions and 2 deletions
@@ -214,6 +214,11 @@ public class MainActivity extends SDLActivity {
}
private void applyImmersiveMode() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
final WindowManager.LayoutParams attributes = getWindow().getAttributes();
attributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
getWindow().setAttributes(attributes);
}
final View decor = getWindow().getDecorView();
decor.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
+5 -1
View File
@@ -136,6 +136,10 @@ class Progress:
def push(files):
"""Streams {device path: local path} into files/Client as one tar."""
# Older Android tar restores ownership even when run as an unprivileged app.
# Match the app identity so extraction does not try to chown files to root.
identity = run_as("id -u && id -g", capture_output=True, check=True).stdout.split()
app_uid, app_gid = map(int, identity)
total = sum(p.stat().st_size for p in files.values())
progress = Progress(total)
proc = subprocess.Popen(run_as_command("mkdir -p files/Client && cd files/Client && tar -xf -"),
@@ -143,7 +147,7 @@ def push(files):
with tarfile.open(fileobj=proc.stdin, mode="w|", format=tarfile.GNU_FORMAT, dereference=True) as tar:
for name, path in sorted(files.items()):
info = tar.gettarinfo(str(path), arcname=name) # dereference: the zh client links the original packs
info.uid = info.gid = 0
info.uid, info.gid = app_uid, app_gid
info.uname = info.gname = ""
with open(path, "rb") as f:
tar.addfile(info, f)