From efe045d791a9b495fb4454572b7e9619088c7cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdurrahman=20Kaan=20Dike=C3=A7?= Date: Sun, 11 Oct 2026 10:03:48 +0300 Subject: [PATCH 1/9] Panel: Wi-Fi clients with their rates and names, the DNS servers, the connection count under mainline dashboard-info, three readouts that were wrong on the home page: - Wi-Fi clients: the station row was written at the signal line, before iw prints the bitrates and the connected time, so those were always empty; a station the SC2355 driver lists without a signal was not counted; and the DHCP lookup upper-cased the MAC while dnsmasq writes it in lower case, so no client ever had a name or an address. A row is now written when its block ends, every station with a valid MAC counts once, and the lease's "*" is no name. - DNS: ubus prints the dns-server array over several lines and a one-line sed never matched it. jsonfilter reads the top-level list of both data interfaces (never inactive.dns-server), each server once. - Connections: the mainline kernel has no CONFIG_NF_CONNTRACK_PROCFS, so /proc/net/nf_conntrack is missing and the count was always 0. nf_conntrack_count first, the table as fallback, null (shown as --) when neither is readable. Based on kanoqwq/mu300-linux@373e191 (station rows, leases, conntrack) and kanoqwq/mu300-linux@5c8c2f9 (DNS). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn --- .../usr/libexec/unisoc-modem/dashboard-info | 72 +++++++--- tests/test_dashboard_info.py | 130 ++++++++++++++++++ 2 files changed, 184 insertions(+), 18 deletions(-) create mode 100644 tests/test_dashboard_info.py diff --git a/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/dashboard-info b/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/dashboard-info index de68e131..279c1dbb 100755 --- a/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/dashboard-info +++ b/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/dashboard-info @@ -76,7 +76,16 @@ LAN_DEVICE=$(safe_iface "$(cfg lan_device)" br-lan) WIFI_DEVICE=$(safe_iface "$(cfg wifi_device)" wlan0) USB_DEVICE=$(safe_iface "$(cfg usb_device)" usb0) jaddr4() { printf '%s' "$1" | sed -n 's/.*"address": *"\([^"]*\)".*/\1/p' | head -n1; } -jarr_dns() { printf '%s' "$1" | sed -n 's/.*"dns-server": *\[\([^]]*\)\].*/\1/p' | tr -d '"' ; } +# The active DNS servers of the data interfaces. ubus pretty-prints the array over several lines, so it is read with +# jsonfilter: the top-level "dns-server" only (never inactive.dns-server), IPv4 and IPv6 status alike, each server +# once. Based on kanoqwq/mu300-linux@5c8c2f9. +wan_dns_servers() { + local snapshot + for snapshot in "$@"; do + [ -n "$snapshot" ] || continue + jsonfilter -s "$snapshot" -e '@["dns-server"][*]' 2>/dev/null || : + done | awk 'NF && !seen[$0]++ { printf "%s%s", sep, $0; sep = ", " }' +} wan_up=$(jval "$WANJSON" up) [ "$wan_up" = "true" ] && wan_up=1 || wan_up=0 @@ -86,7 +95,7 @@ wan_ip4=$(jaddr4 "$WANJSON") wan6_up=$(jval "$WAN6JSON" up) [ "$wan6_up" = "true" ] && wan6_up=1 || wan6_up=0 wan6_ip=$(t2 ip -6 addr show "$DATA_DEVICE" 2>/dev/null | awk '/inet6 [23]/{split($2,s,"/"); print s[1]; exit}') -wan_dns=$(jarr_dns "$WANJSON") +wan_dns=$(wan_dns_servers "$WANJSON" "$WAN6JSON") apn=$(t3 uci -q get "network.$DATA_IFACE.apn") [ -n "$apn" ] || apn="(SIM default)" @@ -225,30 +234,42 @@ W_DIS=$(wu 'radio0.disabled') [ "$W_DIS" = "1" ] && W_UP=0 || W_UP=1 [ -d "/sys/class/net/$WIFI_DEVICE" ] || W_UP=0 [ "$W_HOSTAPD" = 1 ] || W_UP=0 -# station table: one block per client - mac, signal, tx/rx bitrate, connected time -W_CLIENTS=$(t3 iw dev "$WIFI_DEVICE" station dump 2>/dev/null | awk -F':\t*' ' - /^Station / { mac = $2; sub(/ .*/, "", mac); sig = tx = rx = ct = "" } - /^ signal:/ { sig = $2 + 0 } - /^ tx bitrate:/ { tx = $2; sub(/ .*/, "", tx); sub(/$/, " Mbit/s", tx) } - /^ rx bitrate:/ { rx = $2; sub(/ .*/, "", rx); sub(/$/, " Mbit/s", rx) } - /^ connected time:/ { ct = $2 + 0; ct = int(ct / 60) + " min" } - mac != "" && sig != "" && !seen[mac]++ { - printf "%s|%s|%s|%s|%s\n", mac, sig, tx, rx, ct; sig = "" - }') +# station table: one block per client - mac, signal, tx/rx bitrate, connected time. A row is written when its block +# ends (the signal line comes before the bitrates and the connected time), and a client the SC2355 driver reports +# without metrics still counts. dnsmasq's leases file holds the MAC in lower case and "*" for a client that sent no +# name. Based on kanoqwq/mu300-linux@373e191. +LEASES_FILE=${MU300_DHCP_LEASES:-/tmp/dhcp.leases} +station_rows() { + awk ' + function emit( a, n, i) { + n = split(mac, a, ":") + if (n != 6) return + for (i = 1; i <= n; i++) + if (a[i] !~ /^[0-9a-f][0-9a-f]$/) return + if (seen[mac]++) return + printf "%s|%s|%s|%s|%s\n", mac, sig, tx, rx, ct + } + /^Station[ \t]+/ { emit(); mac = tolower($2); sig = tx = rx = ct = ""; next } + /^[ \t]+signal:/ && $2 ~ /^-?[0-9]+([.][0-9]+)?$/ { sig = $2 + 0 } + /^[ \t]+tx bitrate:/ && $3 ~ /^[0-9]+([.][0-9]+)?$/ { tx = $3 " Mbit/s" } + /^[ \t]+rx bitrate:/ && $3 ~ /^[0-9]+([.][0-9]+)?$/ { rx = $3 " Mbit/s" } + /^[ \t]+connected time:/ && $3 ~ /^[0-9]+$/ { ct = sprintf("%d min", int($3 / 60)) } + END { emit() }' +} +W_CLIENTS=$(t3 iw dev "$WIFI_DEVICE" station dump 2>/dev/null | station_rows) W_CN=0; W_CLIST= while IFS='|' read -r mac sig txr rxr ct; do [ -n "$mac" ] || continue - umac=$(echo "$mac" | tr 'a-f' 'A-F') - line=$(awk -v m="$umac" '$2 == m { print $3 "|" $4; exit }' /tmp/dhcp.leases 2>/dev/null) + line=$(awk -v m="$mac" 'tolower($2) == m { print $3 "|" $4; exit }' "$LEASES_FILE" 2>/dev/null) ip=${line%%|*}; host=${line#*|} - [ "$host" = "$line" ] && host= + { [ "$host" = "$line" ] || [ "$host" = '*' ]; } && host= W_CLIST="$W_CLIST{\"mac\":$(qs "$mac"),\"host\":$(qs "$host"),\"ip\":$(qs "$ip"),\"signal\":$(n_or_null "$sig"),\"tx\":$(qs "$txr"),\"rx\":$(qs "$rxr"),\"conn\":$(qs "$ct")}," W_CN=$((W_CN + 1)) done </dev/null | wc -l) +LAN_LEASES=$(cat "$LEASES_FILE" 2>/dev/null | wc -l) # recent DHCP leases (host/ip/mac + remaining time) - shows devices that were # here even when nobody is associated right now NOWS=$NOW @@ -260,7 +281,7 @@ while read -r exp mac ip host _cid; do left=$(( exp - NOWS )) [ "$left" -lt 0 ] && left=0 LEASES="$LEASES{\"host\":$(qs "$host"),\"ip\":$(qs "$ip"),\"mac\":$(qs "$mac"),\"left\":$left}," -done < /tmp/dhcp.leases 2>/dev/null +done < "$LEASES_FILE" 2>/dev/null LEASES=${LEASES%,} LAN_IP=$(t2 ip -4 addr show "$LAN_DEVICE" 2>/dev/null | awk '/inet /{split($2,a,"/"); print a[1]; exit}') @@ -277,7 +298,22 @@ fi ATD_OK=0; /usr/libexec/unisoc-modem/at --available >/dev/null 2>&1 && ATD_OK=1 [ "$MODEM_ALIVE" = 1 ] || MODEM_ALIVE=$ATD_OK DATA_PAUSED=0; [ -e /run/mu300-mobile-data-down ] && DATA_PAUSED=1 -CONNS=$(cat /proc/net/nf_conntrack 2>/dev/null | wc -l) +# Tracked connections: the kernel's counter needs no CONFIG_NF_CONNTRACK_PROCFS (the mainline kernel has no +# /proc/net/nf_conntrack); the table is the fallback; neither readable is unknown (null), never a made-up 0. The +# counter is read with cat in one go: a sysctl file may answer a second short read with EOF. Based on +# kanoqwq/mu300-linux@373e191. +conntrack_count() { + local count counter=${MU300_CONNTRACK_COUNT:-/proc/sys/net/netfilter/nf_conntrack_count} + local table=${MU300_CONNTRACK_TABLE:-/proc/net/nf_conntrack} + if [ -r "$counter" ] && count=$(cat "$counter" 2>/dev/null); then + case $count in ''|*[!0-9]*) ;; *) echo "$count"; return ;; esac + fi + if [ -r "$table" ] && count=$(wc -l < "$table" 2>/dev/null); then + echo $((count + 0)); return + fi + echo null +} +CONNS=$(conntrack_count) # --------------------------------------------------------------------- VPN VPN_ENABLED=0; VPN_ENGINE=""; VPN_UP=0 diff --git a/tests/test_dashboard_info.py b/tests/test_dashboard_info.py new file mode 100644 index 00000000..fe1b8edb --- /dev/null +++ b/tests/test_dashboard_info.py @@ -0,0 +1,130 @@ +"""dashboard-info's network readouts (based on kanoqwq/mu300-linux@373e191 and @5c8c2f9, tests/test_dashboard_info.py): + +- Wi-Fi clients: every associated station is one row with its bitrates and connected time (iw prints the signal + before them), a station without metrics still counts, the DHCP name and address come from dnsmasq's lower-case + leases file and its "*" is no name. +- DNS: the active servers of both data interfaces, from ubus's multi-line JSON, each once, never inactive ones. +- Connections: the kernel's nf_conntrack_count (mainline has no /proc/net/nf_conntrack), the table as fallback, + null when neither can be read.""" +import json + +from helpers import ShellTest, TOP + +INFO = TOP / 'openwrt' / 'luci-app-mu300' / 'root' / 'usr' / 'libexec' / 'unisoc-modem' / 'dashboard-info' + +STATIONS = '''Station 3C:22:FB:00:00:01 (on wlan0) +\tinactive time:\t120 ms +\trx bytes:\t102400 +\tsignal: \t-48 [-48] dBm +\tsignal avg:\t-49 dBm +\ttx bitrate:\t866.7 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 2 +\trx bitrate:\t390.0 MBit/s VHT-MCS 8 80MHz VHT-NSS 1 +\tauthorized:\tyes +\tconnected time:\t725 seconds +Station 3c:22:fb:00:00:01 (on wlan0) +\tsignal: \t-40 dBm +Station a4:83:e7:00:00:02 (on wlan0) +\tauthorized:\tyes +Station not-a-mac (on wlan0) +\tsignal: \t-40 dBm +''' + +LEASES = '''1999999999 3c:22:fb:00:00:01 192.168.0.10 laptop 01:3c:22:fb:00:00:01 +1999999999 a4:83:e7:00:00:02 192.168.0.11 * * +''' + +# what `ubus call network.interface.wan status` prints: the array over several lines, an inactive list too +WAN = '''{ +\t"up": true, +\t"l3_device": "sipa_eth0", +\t"dns-server": [ +\t\t"10.0.0.1", +\t\t"10.0.0.2" +\t], +\t"inactive": { +\t\t"dns-server": [ +\t\t\t"9.9.9.9" +\t\t] +\t} +}''' +WAN6 = '''{ +\t"up": true, +\t"dns-server": [ +\t\t"2001:db8::53", +\t\t"10.0.0.2" +\t] +}''' + +JSONFILTER = r''' +import json, re, sys +args = sys.argv[1:] +src = args[args.index('-s') + 1] +expr = args[args.index('-e') + 1] +m = re.fullmatch(r'@\["([^"]+)"\]\[\*\]', expr) +if not m: + sys.exit(2) +v = json.loads(src).get(m.group(1)) +if not isinstance(v, list): + sys.exit(1) +for x in v: + print(x) +''' + + +class Info(ShellTest): + def setUp(self): + super().setUp() + self.stub('busybox', 'shift 4; exec "$@"') # busybox timeout -s KILL N CMD... + for name in ('ip', 'uci'): + self.stub(name, 'exit 1') + (self.tmp / 'stations').write_text(STATIONS) + self.stub('iw', 'cat "$STUBLOG/stations"') + (self.tmp / 'wan.json').write_text(WAN) + (self.tmp / 'wan6.json').write_text(WAN6) + self.stub('ubus', 'case "$*" in *interface.wan6*) cat "$STUBLOG/wan6.json" ;; ' + '*interface.wan*) cat "$STUBLOG/wan.json" ;; *) exit 1 ;; esac') + (self.stubs / 'jsonfilter.py').write_text(JSONFILTER) + self.stub('jsonfilter', f'exec python3 "{self.stubs}/jsonfilter.py" "$@"') + self.leases = self.tmp / 'dhcp.leases' + self.leases.write_text(LEASES) + + def info(self, shell, **env): + base = dict(MU300_DHCP_LEASES=self.leases, MU300_POWER_SUPPLY_DIR=self.tmp / 'psy', + MU300_CONNTRACK_COUNT=self.tmp / 'nf_conntrack_count', + MU300_CONNTRACK_TABLE=self.tmp / 'nf_conntrack') + base.update(env) + r = self.script(shell, INFO, **base) + self.assertEqual(r.returncode, 0, r.stderr) + return json.loads(r.stdout) + + def test_wifi_clients(self): + for shell in self.each_shell(): + wifi = self.info(shell)['wifi'] + self.assertEqual(wifi['clients_n'], 2) + first, second = wifi['clients'] + self.assertEqual(first, {'mac': '3c:22:fb:00:00:01', 'host': 'laptop', 'ip': '192.168.0.10', + 'signal': -48, 'tx': '866.7 Mbit/s', 'rx': '390.0 Mbit/s', 'conn': '12 min'}) + self.assertEqual(second, {'mac': 'a4:83:e7:00:00:02', 'host': None, 'ip': '192.168.0.11', + 'signal': None, 'tx': None, 'rx': None, 'conn': None}) + + def test_dns_from_multiline_status(self): + for shell in self.each_shell(): + self.assertEqual(self.info(shell)['wan']['dns'], '10.0.0.1, 10.0.0.2, 2001:db8::53') + + def test_connections(self): + count, table = self.tmp / 'nf_conntrack_count', self.tmp / 'nf_conntrack' + for shell in self.each_shell(): + count.unlink(missing_ok=True) + table.unlink(missing_ok=True) + self.assertIsNone(self.info(shell)['conns']) + table.write_text('a\nb\nc\n') + self.assertEqual(self.info(shell)['conns'], 3) + count.write_text('42\n') + self.assertEqual(self.info(shell)['conns'], 42) + count.write_text('x\n') + self.assertEqual(self.info(shell)['conns'], 3) + + +if __name__ == '__main__': + import unittest + unittest.main() From ec5f4c07719fbee22498afee52d285c5141726c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdurrahman=20Kaan=20Dike=C3=A7?= Date: Sun, 11 Oct 2026 17:28:38 +0300 Subject: [PATCH 2/9] Mainline: BTF and the eBPF hooks dae needs (6.18, 7.2) DEBUG_INFO_BTF (+ modules), BPF JIT, stream parser, ingress/egress hooks, netkit; pahole in the build image; vendor modules stripped of their DWARF. Kprobes and tracing are left out: with them 7.2 failed 2 of 36 reboots on F50-B. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn --- upstream/Dockerfile | 5 +++-- upstream/README.md | 5 ++++- upstream/build-modules.sh | 3 +++ upstream/mu300-mainline.config | 25 +++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/upstream/Dockerfile b/upstream/Dockerfile index 6ebfaf0f..8f2b7303 100644 --- a/upstream/Dockerfile +++ b/upstream/Dockerfile @@ -1,6 +1,7 @@ -# Native arm64 build environment for mainline kernels (gcc from Ubuntu 26.04) +# Native arm64 build environment for mainline kernels (gcc from Ubuntu 26.04); pahole (dwarves) turns the DWARF +# into the BTF that CONFIG_DEBUG_INFO_BTF puts into the kernel and its modules (eBPF programs such as dae need it) FROM ubuntu:26.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential bc bison flex libssl-dev libelf-dev lz4 cpio kmod python3 curl device-tree-compiler xz-utils ca-certificates \ + build-essential bc bison flex libssl-dev libelf-dev lz4 cpio kmod python3 curl device-tree-compiler xz-utils ca-certificates dwarves \ && rm -rf /var/lib/apt/lists/* diff --git a/upstream/README.md b/upstream/README.md index 8823780d..cbcb0de0 100644 --- a/upstream/README.md +++ b/upstream/README.md @@ -41,7 +41,10 @@ The config is allnoconfig plus `mu300-mainline.config`: what the board and the b KVM (`/dev/kvm`; the CPUs start at EL2); what only matters once used - netfilter extras, tunnels, IPsec, tc, filesystems, USB modems/adapters/Wi-Fi sticks, device mapper - is a module. `build-modules.sh` installs the kernel's own modules (stripped) flat into `out/modules` next to the vendor ones, and the bundle ships them all; -`mu300-update` indexes them on Ubuntu (depmod) and OpenWrt loads them by name (FINDINGS 31o). +`mu300-update` indexes them on Ubuntu (depmod) and OpenWrt loads them by name (FINDINGS 31o). Both kernels carry +BTF (`/sys/kernel/btf/vmlinux`, made by `pahole` from the build image) and the BPF JIT, tcx/clsact, cgroup and +kprobe hooks that eBPF programs such as the dae transparent proxy need (FINDINGS 31p); the DWARF it is made from +stays in `vmlinux`, and `build-modules.sh` strips it from the vendor modules. The bring-up path of old (hand-built image, `init-bringup`, `boot/flash-trial.sh`) still works for experiments: ```sh diff --git a/upstream/build-modules.sh b/upstream/build-modules.sh index b811d18b..4218a0d5 100644 --- a/upstream/build-modules.sh +++ b/upstream/build-modules.sh @@ -47,6 +47,9 @@ for m in $mods; do for ko in $(find /src/mod-build/$m -name '*.ko'); do ! echo "${ko##*/}" | tr - _ | grep -Fqx -f - $O/modules.in-tree.names || { echo "$m: ${ko##*/} has the name of an in-tree module" >&2; exit 1; } cp "$ko" $OUT/modules/ + # the kernel's own modules are stripped by modules_install; these carry the DWARF of CONFIG_DEBUG_INFO + # (several MiB each) - --strip-debug keeps their .BTF + strip --strip-debug "$OUT/modules/${ko##*/}" done done ls -la $OUT/modules/*.ko diff --git a/upstream/mu300-mainline.config b/upstream/mu300-mainline.config index f1ffe5df..09d1449d 100644 --- a/upstream/mu300-mainline.config +++ b/upstream/mu300-mainline.config @@ -407,6 +407,31 @@ CONFIG_HARDLOCKUP_DETECTOR=y # reported, not fatal: vendor threads sleep uninterruptibly for good (sipa-set-rps, slog, the Wi-Fi TX thread) CONFIG_DETECT_HUNG_TASK=y +# --- eBPF: what dae (eBPF transparent proxy, docs/en/README.md "Kernel Configurations") and other CO-RE tools need. +# BTF (/sys/kernel/btf/vmlinux) is made by pahole from the DWARF; the DWARF stays in vmlinux and the .ko files +# (build-modules.sh strips it), only the BTF lands in the Image (FINDINGS 31p). DEBUG_INFO_REDUCED must stay off: +# BTF needs the full type information +CONFIG_DEBUG_INFO_DWARF5=y +# zstd-compressed DWARF in the objects: vmlinux 157 MB instead of 312 MB, and the build trees of 6.18 and 7.2 fit +# in one docker volume next to each other (uncompressed, the second one filled the disk) +CONFIG_DEBUG_INFO_COMPRESSED_ZSTD=y +CONFIG_DEBUG_INFO_REDUCED=n +CONFIG_DEBUG_INFO_BTF=y +CONFIG_DEBUG_INFO_BTF_MODULES=y +# a module whose BTF does not match loads anyway (without its BTF) rather than not at all +CONFIG_MODULE_ALLOW_BTF_MISMATCH=y +# without the JIT dae does not load at all ("callbacks are not allowed in non-JITed programs") +CONFIG_BPF_JIT=y +CONFIG_BPF_STREAM_PARSER=y +CONFIG_NET_INGRESS=y +CONFIG_NET_EGRESS=y +# netkit: the BPF-programmable veth dae prefers for its dae0 pair (it falls back to veth without it) +CONFIG_NETKIT=y +# not taken: kprobes and the tracing they pull in (PERF_EVENTS, FTRACE, KPROBE_EVENTS, BPF_EVENTS), which dae lists +# too. With them 7.2 died in 2 of 36 reboots (page tables and the printk buffer overwritten at ~11.5 s, as the modem +# and the Wi-Fi card start), without them 41 of 41 came up (FINDINGS 31p). dae runs without: `dae trace` and its +# sockmap accounting are what need kprobes, and process names come from bpf_get_current_comm + # --- virtualization: KVM (the CPUs start at EL2; the vendor 5.4 kernel has it too) and vhost for the guests CONFIG_VIRTUALIZATION=y CONFIG_KVM=y From 35f1c18dd74aa3618b614b2281ae6b7d7b54787c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdurrahman=20Kaan=20Dike=C3=A7?= Date: Sun, 11 Oct 2026 17:34:42 +0300 Subject: [PATCH 3/9] Panel: System > Terminal, a root shell in the browser (ttyd) openwrt-luci gets ttyd and luci-app-ttyd (25.12 feed), configured by the image (luci-overlay/etc/config/ttyd): one instance on the LAN bridge's IPv4 address (@lan), port 7681, origin check, url_arg, and as its command /usr/libexec/mu300-terminal-login - a root login for a one-time token and nothing else. The token comes from rpcd's mu300term (ACL luci-app-mu300-terminal, i.e. a logged-in LuCI session): a 0600 file in a 0700 runtime directory, valid 60 s and for one connection (renamed away atomically before the shell starts), at most 16 waiting. No password prompt, so ttyd adds no place to guess the root password. The shell closes after ttyd.mu300.idle seconds (900) without terminal activity (pty mtime watchdog; OpenWrt's ash has no TMOUT). The page (mu300/terminal) frames ttyd over HTTP; a panel opened over https opens it in a tab of its own: ttyd over TLS fails in Chrome (libwebsockets offers h2 and its websocket over h2 ends in ERR_HTTP2_PROTOCOL_ERROR - tried in a container). A hotplug script restarts ttyd when lan comes up (ttyd resolves the address once). luci-app-ttyd's own Services > Terminal entry is removed; its settings page is System > Terminal > Terminal settings. Translations in all 31 catalogs. Tested in an OpenWrt 25.12.5 container with LuCI/rpcd/uhttpd and headless Chromium: login, the page, the framed shell (uid 0), en/tr/zh-cn; reused, missing and forged tokens refused; idle close; the token call refused without a session. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn --- README.md | 6 + openwrt/build-rootfs.sh | 12 + openwrt/luci-app-mu300/Makefile | 1 + openwrt/luci-app-mu300/README.md | 7 + .../luci-static/resources/mu300/common.js | 3 + .../resources/view/mu300/terminal.js | 121 +++++++ openwrt/luci-app-mu300/po/ar/mu300.po | 39 +++ openwrt/luci-app-mu300/po/az/mu300.po | 39 +++ openwrt/luci-app-mu300/po/bg/mu300.po | 39 +++ openwrt/luci-app-mu300/po/cs/mu300.po | 39 +++ openwrt/luci-app-mu300/po/da/mu300.po | 39 +++ openwrt/luci-app-mu300/po/de/mu300.po | 39 +++ openwrt/luci-app-mu300/po/el/mu300.po | 39 +++ openwrt/luci-app-mu300/po/es/mu300.po | 39 +++ openwrt/luci-app-mu300/po/fa/mu300.po | 39 +++ openwrt/luci-app-mu300/po/fi/mu300.po | 39 +++ openwrt/luci-app-mu300/po/fr/mu300.po | 39 +++ openwrt/luci-app-mu300/po/he/mu300.po | 39 +++ openwrt/luci-app-mu300/po/hi/mu300.po | 39 +++ openwrt/luci-app-mu300/po/hu/mu300.po | 39 +++ openwrt/luci-app-mu300/po/id/mu300.po | 39 +++ openwrt/luci-app-mu300/po/it/mu300.po | 39 +++ openwrt/luci-app-mu300/po/ja/mu300.po | 39 +++ openwrt/luci-app-mu300/po/kk/mu300.po | 39 +++ openwrt/luci-app-mu300/po/ko/mu300.po | 39 +++ openwrt/luci-app-mu300/po/nl/mu300.po | 39 +++ openwrt/luci-app-mu300/po/pl/mu300.po | 39 +++ openwrt/luci-app-mu300/po/pt_BR/mu300.po | 39 +++ openwrt/luci-app-mu300/po/ro/mu300.po | 39 +++ openwrt/luci-app-mu300/po/ru/mu300.po | 39 +++ openwrt/luci-app-mu300/po/sk/mu300.po | 39 +++ openwrt/luci-app-mu300/po/sv/mu300.po | 39 +++ openwrt/luci-app-mu300/po/tr/mu300.po | 39 +++ openwrt/luci-app-mu300/po/uk/mu300.po | 39 +++ openwrt/luci-app-mu300/po/vi/mu300.po | 39 +++ openwrt/luci-app-mu300/po/zh_Hans/mu300.po | 39 +++ openwrt/luci-app-mu300/po/zh_Hant/mu300.po | 39 +++ .../etc/hotplug.d/iface/95-mu300-terminal | 6 + .../root/usr/libexec/mu300-terminal-login | 63 ++++ .../root/usr/libexec/rpcd/mu300term | 62 ++++ .../usr/share/luci/menu.d/luci-app-mu300.json | 18 ++ .../usr/share/rpcd/acl.d/luci-app-mu300.json | 11 + openwrt/luci-overlay/etc/config/ttyd | 23 ++ tests/README.md | 1 + tests/test_luci_i18n.py | 38 ++- tests/test_terminal.py | 302 ++++++++++++++++++ 46 files changed, 1882 insertions(+), 1 deletion(-) create mode 100644 openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/terminal.js create mode 100755 openwrt/luci-app-mu300/root/etc/hotplug.d/iface/95-mu300-terminal create mode 100755 openwrt/luci-app-mu300/root/usr/libexec/mu300-terminal-login create mode 100755 openwrt/luci-app-mu300/root/usr/libexec/rpcd/mu300term create mode 100644 openwrt/luci-overlay/etc/config/ttyd create mode 100644 tests/test_terminal.py diff --git a/README.md b/README.md index df04b945..d1eeb70c 100644 --- a/README.md +++ b/README.md @@ -273,6 +273,12 @@ whenever OpenWrt is chosen (`MU300_OPENWRT=plain|luci` answers without asking), * **Cellular > Adapter settings:** how the panel reaches the modem (AT backend, serial port, custom AT adapter). * **System > Languages:** the language of the interface, and the lang extra: download it, or upload the file. * **System > Power:** the active power profile and why, the battery and the power source, the idle knobs of the three profiles (Wi-Fi idle minutes, radio idle keep/lte/off, LEDs, CPU), the saver threshold and the charge limit (100 or 80 %). +* **System > Terminal:** a root shell in the browser ([ttyd](https://github.com/tsl0922/ttyd)). It listens on the LAN + address only (port 7681; the cellular side never reaches it), and opens a shell only for a one-time token the page + gets for a logged-in panel session: there is no second password to guess. It closes after 15 minutes without + activity (`uci set ttyd.mu300.idle=`, 0 never). A panel opened over https opens it in a tab of its own + (ttyd serves HTTP: its websocket over TLS fails in Chrome). **Terminal settings** is ttyd's own page; turning the + instance off (`enable`) removes the terminal. IPv6 on this system is relayed from the carrier (router advertisements and NAT66) instead of the prefix extension plain OpenWrt uses. Aurora is the default theme, Bootstrap stays installed. Its boot timings, measured on an F50 diff --git a/openwrt/build-rootfs.sh b/openwrt/build-rootfs.sh index 9e89eeb1..94154a6e 100755 --- a/openwrt/build-rootfs.sh +++ b/openwrt/build-rootfs.sh @@ -147,6 +147,9 @@ apk add wireguard-tools luci-proto-wireguard ppp-mod-pptp xl2tpd 6in4 6rd ds-lit [ -d /in/luci-plugin ] && apk add --allow-untrusted /in/luci-theme-aurora.apk >/dev/null # relay mode (panel system only): ra-deprecate sends its router advertisement through a raw ICMPv6 socket (#87) [ -d /in/luci-plugin ] && apk add ucode-mod-socket >/dev/null +# System > Terminal (panel system only): ttyd, and luci-app-ttyd for its settings page and translations; the image +# configures it (luci-overlay/etc/config/ttyd: LAN address only, a root shell only for a token of a LuCI session) +[ -d /in/luci-plugin ] && apk add ttyd luci-app-ttyd >/dev/null # ujail drops CAP_PERFMON (38), which this 5.4 kernel does not know: jailed services (dnsmasq, ntpd) crash-loop apk del procd-ujail procd-seccomp >/dev/null 2>&1 || true # online firmware upgrades flash whole-disk armsr images: that would overwrite the eMMC, so remove them @@ -199,6 +202,13 @@ if [ -d /in/luci-plugin ]; then cp -a /in/luci-plugin/root/. $R/ cp -a /in/luci-plugin/htdocs/. $R/www/ chmod 0755 $R/etc/init.d/unisoc-modem-ui $R/etc/hotplug.d/net/90-unisoc-usb-host $R/etc/hotplug.d/iface/90-unisoc-usb-host $R/usr/libexec/rpcd/mu300dash $R/usr/libexec/unisoc-modem/* + chmod 0755 $R/usr/libexec/rpcd/mu300term $R/usr/libexec/mu300-terminal-login $R/etc/hotplug.d/iface/95-mu300-terminal + # the terminal is System > Terminal (the panel menu: the page, and the settings page of luci-app-ttyd); its own Services > + # Terminal frames ttyd without a token, which mu300-terminal-login refuses + rm -f $R/usr/share/luci/menu.d/luci-app-ttyd.json + # ttyd as luci-overlay configures it, never the package default (/bin/login on every LAN instance, no origin check) + grep -q "^ option command ./usr/libexec/mu300-terminal-login.$" $R/etc/config/ttyd && + ! grep -q "/bin/login" $R/etc/config/ttyd || { echo "ttyd is not configured for the panel" >&2; exit 1; } # the panel catalogs, named as LuCI names the language (base.zh-cn.lmo: mu300.zh-cn.lmo) for f in /in/catalogs/mu300.*.lmo; do cp "$f" $R/usr/lib/lua/luci/i18n/; done [ -s $R/www/luci-static/aurora/main.css ] || { echo "Aurora theme assets missing" >&2; exit 1; } @@ -280,6 +290,8 @@ if [ -d /in/luci-plugin ]; then n=$(sed -n "s/^START=//p" $R/etc/init.d/mu300-ndp) ln -sf ../init.d/mu300-ndp $R/etc/rc.d/S${n}mu300-ndp ln -sf /opt/mu300/bin/mu300-sms $R/usr/bin/mu300-sms + # System > Terminal: apk enabled ttyd itself + [ -e $R/etc/rc.d/S99ttyd ] || { echo "ttyd is not enabled" >&2; exit 1; } fi # the OpenWrt button handlers (power: a tap is poweroff; wps, rfkill) are replaced: mu300-buttons owns the keys mkdir -p $R/etc/rc.button diff --git a/openwrt/luci-app-mu300/Makefile b/openwrt/luci-app-mu300/Makefile index 537be3bc..401759f5 100644 --- a/openwrt/luci-app-mu300/Makefile +++ b/openwrt/luci-app-mu300/Makefile @@ -45,6 +45,7 @@ define Package/luci-app-mu300/install $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n find $(PKG_BUILD_DIR)/lmo -name 'mu300.*.lmo' -exec $(CP) {} $(1)/usr/lib/lua/luci/i18n/ \; chmod 0755 $(1)/etc/init.d/unisoc-modem-ui $(1)/etc/hotplug.d/net/90-unisoc-usb-host $(1)/etc/hotplug.d/iface/90-unisoc-usb-host $(1)/usr/libexec/rpcd/mu300dash $(1)/usr/libexec/unisoc-modem/* + chmod 0755 $(1)/usr/libexec/rpcd/mu300term $(1)/usr/libexec/mu300-terminal-login $(1)/etc/hotplug.d/iface/95-mu300-terminal endef define Package/luci-app-mu300/postinst diff --git a/openwrt/luci-app-mu300/README.md b/openwrt/luci-app-mu300/README.md index 0ab510fb..3b754580 100644 --- a/openwrt/luci-app-mu300/README.md +++ b/openwrt/luci-app-mu300/README.md @@ -14,6 +14,13 @@ performance - which sets the CPU governor and the per-cluster frequency limits (`mu300-cpu`, through the `unisoc-modem/cpu` adapter). It stays inside the hardware frequency table and never changes voltage, so the kernel keeps throttling at its thermal limit in every profile. +The Terminal page (System) frames ttyd: `rpcd/mu300term` hands a LuCI session with +the `luci-app-mu300-terminal` ACL a one-time token (one connection, 60 s), and ttyd's +command, `/usr/libexec/mu300-terminal-login`, opens a root login for that token and +nothing else, closing it after `ttyd.mu300.idle` seconds without activity. The image +configures ttyd for it (`openwrt/luci-overlay/etc/config/ttyd`: the LAN address only, +origin check, `url_arg`); the package alone does not install ttyd, and the page then +says so. The dashboard follows LuCI's selected language. Its colors follow Aurora's existing tokens when present, or the official Bootstrap theme's light/dark tokens. diff --git a/openwrt/luci-app-mu300/htdocs/luci-static/resources/mu300/common.js b/openwrt/luci-app-mu300/htdocs/luci-static/resources/mu300/common.js index 3d2581c6..f5af3da0 100644 --- a/openwrt/luci-app-mu300/htdocs/luci-static/resources/mu300/common.js +++ b/openwrt/luci-app-mu300/htdocs/luci-static/resources/mu300/common.js @@ -46,6 +46,8 @@ var callCpuGet = rpc.declare({ object: 'mu300dash', method: 'cpu_get', expect: { var callCpuSet = rpc.declare({ object: 'mu300dash', method: 'cpu_set', params: [ 'profile' ], expect: { '': {} } }); var callTrafficGet = rpc.declare({ object: 'mu300dash', method: 'traffic_get', expect: { '': {} } }); var callTrafficSet = rpc.declare({ object: 'mu300dash', method: 'traffic_set', params: [ 'op', 'value' ], expect: { '': {} } }); +/* System > Terminal: a one-time token for ttyd (rpcd mu300term, ACL luci-app-mu300-terminal) */ +var callTermToken = rpc.declare({ object: 'mu300term', method: 'token', expect: { '': {} } }); /* The live rates' one read: the mu300rates object (rpcd's ucode plugin) returns /proc/net/dev, in rpcd itself (no * process started, no AT), every second. Sent on its own (nobatch): a declared call is batched with whatever else is * pending, and then waits for the status snapshot, which takes a few hundred milliseconds and made the rates come @@ -653,6 +655,7 @@ return baseclass.extend({ callFwdGet: callFwdGet, callFwdSet: callFwdSet, callFwdTest: callFwdTest, callCpuGet: callCpuGet, callCpuSet: callCpuSet, callTrafficGet: callTrafficGet, callTrafficSet: callTrafficSet, callNetDev: callNetDev, netDev: netDev, + callTermToken: callTermToken, carrierName: carrierName, qLevel: qLevel, qLevelLabel: qLevelLabel, qLabel: qLabel, qCol: qCol, qScore: qScore, esc: esc, fmtBytes: fmtBytes, fmtRate: fmtRate, fmtUptime: fmtUptime, PLMN_CN: PLMN_CN, injectCss: injectCss, v: v, set: set, spark: spark, neighborRows: neighborRows, diff --git a/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/terminal.js b/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/terminal.js new file mode 100644 index 00000000..c0e4f683 --- /dev/null +++ b/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/terminal.js @@ -0,0 +1,121 @@ +'use strict'; +'require view'; +'require dom'; +'require mu300.common as M'; + +/* Every value from the backend goes into E() inside an array: LuCI's E() takes a lone string as HTML, an array's + * strings as text. */ +/* System > Terminal: a root shell in the browser, ttyd (/etc/config/ttyd). The page asks rpcd's mu300term for a + * one-time token (valid for a minute and one connection) and loads ttyd with it; ttyd's command, + * mu300-terminal-login, opens the shell for that token only, so the terminal is exactly as protected as this LuCI + * login. ttyd listens on the LAN address only, over HTTP (port 7681); the cellular side never reaches it. An https + * page cannot frame it (mixed content), so there the terminal opens in a tab of its own. */ +return view.extend({ + load: function() { return L.resolveDefault(M.callTermToken(), {}); }, + + render: function(r) { + M.injectCss(); + this.root = E('div', { 'class': 'mud' }); + this.paint(r || {}); + return this.root; + }, + + /* the terminal URL of a token: the host the browser used for the panel (an IPv6 literal is replaced by the LAN's + * IPv4 address: ttyd listens on IPv4) */ + target: function(r) { + if (!r || r.ok !== 1) return null; + var host = String(window.location.hostname || ''); + if (host.indexOf(':') >= 0 || host.charAt(0) === '[') host = String(r.lan || ''); + if (!/^[A-Za-z0-9.-]+$/.test(host)) return null; + if (!/^[0-9a-f]{32}$/.test(String(r.token || ''))) return null; + var port = Number(r.port); + if (!(port > 0 && port < 65536)) return null; + return 'http://' + host + ':' + port + '/?arg=' + r.token; + }, + + reason: function(r) { + var codes = { + missing: _('ttyd is not installed.'), + off: _('The terminal is turned off (/etc/config/ttyd).'), + busy: _('Too many terminals are opening at once. Try again in a minute.') + }; + return codes[r && r.code] || _('The terminal is not available.'); + }, + + /* a fresh token into the frame (a token serves one connection: ttyd's own reconnect is refused) */ + reconnect: function(btn) { + var self = this; + M.busy(btn, true); + return L.resolveDefault(M.callTermToken(), {}).then(function(r) { + M.busy(btn, false); + self.paint(r || {}); + }); + }, + + /* the terminal in a tab of its own, with a token of its own */ + popout: function(btn) { + var self = this, w = window.open('', '_blank'); + M.busy(btn, true); + return L.resolveDefault(M.callTermToken(), {}).then(function(r) { + M.busy(btn, false); + var url = self.target(r); + if (!url) { + if (w) w.close(); + M.toast(self.reason(r), { type: 'error', timeout: 6000 }); + return; + } + if (w) { w.opener = null; w.location.href = url; } + }); + }, + + paint: function(r) { + var self = this; + var card = E('section', { 'class': 'mud-card', 'id': 'mud-term' }, [ E('h3', {}, _('Terminal')) ]); + card.appendChild(E('div', { 'class': 'mud-note', 'id': 'mud-term-root' }, [ + _('This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable.') + ])); + card.appendChild(E('div', { 'class': 'mud-note', 'id': 'mud-term-scope' }, [ + _('It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page.') + ])); + if (r && Number(r.idle) > 0) + card.appendChild(E('div', { 'class': 'mud-note', 'id': 'mud-term-idle' }, [ + _('It closes after %d minutes without activity.').format(Math.max(1, Math.round(Number(r.idle) / 60))) + ])); + var url = this.target(r); + if (!url) { + card.appendChild(E('div', { 'class': 'mud-note', 'id': 'mud-term-unavailable' }, + [ r && r.ok === 1 ? _('The terminal is not available.') : this.reason(r) ])); + dom.content(this.root, [ card ]); + return; + } + var framed = window.location.protocol !== 'https:'; + var actions = E('div', { 'style': 'display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0' }); + if (framed) { + var again = E('button', { 'class': 'mud-btn', 'id': 'mud-term-reconnect' }, [ _('Reconnect') ]); + again.addEventListener('click', function() { self.reconnect(again); }); + actions.appendChild(again); + } + var pop = E('button', { 'class': framed ? 'mud-btn' : 'mud-btn cbi-button-positive', 'id': 'mud-term-popout' }, + [ _('Open in a new tab') ]); + pop.addEventListener('click', function() { self.popout(pop); }); + actions.appendChild(pop); + card.appendChild(actions); + if (!framed) { + card.appendChild(E('div', { 'class': 'mud-note', 'id': 'mud-term-tls' }, [ + _('This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own.') + ])); + } else { + card.appendChild(E('iframe', { + 'id': 'mud-term-frame', + 'src': url, + 'referrerpolicy': 'no-referrer', + 'style': 'width:100%;min-height:520px;border:none;border-radius:6px;resize:vertical;background:#000' + })); + } + dom.content(this.root, [ card ]); + }, + + handleSaveApply: null, + handleSave: null, + handleReset: null +}); diff --git a/openwrt/luci-app-mu300/po/ar/mu300.po b/openwrt/luci-app-mu300/po/ar/mu300.po index 5979ddc9..0cc85b57 100644 --- a/openwrt/luci-app-mu300/po/ar/mu300.po +++ b/openwrt/luci-app-mu300/po/ar/mu300.po @@ -42,9 +42,18 @@ msgstr "الطاقة" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "الطرفية" + +msgid "Terminal settings" +msgstr "إعدادات الطرفية" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "مركز تحكم MU300: لوحة الحالة، أقفال الشبكة، طرفية AT وSMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "الطرفية: صدفة root على الجهاز داخل المتصفح" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "غير مكتملة: وصل %d من %d أجزاء" msgid "Delete" msgstr "حذف" +msgid "ttyd is not installed." +msgstr "ttyd غير مثبت." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "الطرفية متوقفة (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "تُفتح طرفيات كثيرة في الوقت نفسه. حاول مرة أخرى بعد دقيقة." + +msgid "The terminal is not available." +msgstr "الطرفية غير متاحة." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "هذه صدفة root على الجهاز: يعمل كل أمر بصلاحيات كاملة، وقد يجعل خطأ واحد الجهاز غير قابل للإقلاع." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "يمكن الوصول إليها من الشبكة المحلية فقط (USB ونقطة الاتصال)، ولا يمكن أبدًا من بيانات الجوال، ومن هذه الصفحة المسجّل الدخول إليها فقط." + +msgid "It closes after %d minutes without activity." +msgstr "تُغلق بعد %d دقيقة من عدم النشاط." + +msgid "Reconnect" +msgstr "إعادة الاتصال" + +msgid "Open in a new tab" +msgstr "فتح في علامة تبويب جديدة" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "فُتحت هذه الصفحة عبر HTTPS، والطرفية تُقدَّم عبر HTTP على الشبكة المحلية: لذا تُفتح في علامة تبويب خاصة بها." + msgid "The data usage could not be read" msgstr "تعذرت قراءة استهلاك البيانات" diff --git a/openwrt/luci-app-mu300/po/az/mu300.po b/openwrt/luci-app-mu300/po/az/mu300.po index 09518e76..962b6e9f 100644 --- a/openwrt/luci-app-mu300/po/az/mu300.po +++ b/openwrt/luci-app-mu300/po/az/mu300.po @@ -42,9 +42,18 @@ msgstr "Enerji" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Terminal ayarları" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300 idarəetmə mərkəzi: status paneli, şəbəkə kilidləri, AT terminalı və SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: brauzerdə cihazın root qabığı" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Natamam: %d / %d hissə çatdı" msgid "Delete" msgstr "Sil" +msgid "ttyd is not installed." +msgstr "ttyd quraşdırılmayıb." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminal söndürülüb (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Eyni anda çox terminal açılır. Bir dəqiqədən sonra yenidən cəhd edin." + +msgid "The terminal is not available." +msgstr "Terminal əlçatan deyil." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Bu, cihazda root qabığıdır: hər əmr tam hüquqlarla işləyir və bir səhv cihazın açılmamasına səbəb ola bilər." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Ona yalnız LAN-dan (USB və hotspot) çatmaq olar, heç vaxt mobil datadan yox, və yalnız bu daxil olunmuş səhifədən." + +msgid "It closes after %d minutes without activity." +msgstr "%d dəqiqə fəaliyyətsizlikdən sonra bağlanır." + +msgid "Reconnect" +msgstr "Yenidən qoşul" + +msgid "Open in a new tab" +msgstr "Yeni tabda aç" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Bu səhifə HTTPS ilə açılıb, terminal isə LAN-da HTTP ilə verilir: o, ayrıca tabda açılır." + msgid "The data usage could not be read" msgstr "Məlumat istifadəsi oxuna bilmədi" diff --git a/openwrt/luci-app-mu300/po/bg/mu300.po b/openwrt/luci-app-mu300/po/bg/mu300.po index 69d56d82..61f42b8f 100644 --- a/openwrt/luci-app-mu300/po/bg/mu300.po +++ b/openwrt/luci-app-mu300/po/bg/mu300.po @@ -42,9 +42,18 @@ msgstr "Захранване" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Терминал" + +msgid "Terminal settings" +msgstr "Настройки на терминала" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Контролен център MU300: табло за състоянието, мрежови заключвания, AT терминал и SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Терминал: root обвивка на устройството в браузъра" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Непълно: пристигнаха %d от %d части" msgid "Delete" msgstr "Изтриване" +msgid "ttyd is not installed." +msgstr "ttyd не е инсталиран." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Терминалът е изключен (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Отварят се твърде много терминали едновременно. Опитайте отново след минута." + +msgid "The terminal is not available." +msgstr "Терминалът не е достъпен." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Това е root обвивка на устройството: всяка команда се изпълнява с пълни права и една грешка може да направи устройството нестартиращо." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Достъпен е само от LAN (USB и точката за достъп), никога от мобилните данни, и само от тази страница с вход." + +msgid "It closes after %d minutes without activity." +msgstr "Затваря се след %d минути без активност." + +msgid "Reconnect" +msgstr "Свържи отново" + +msgid "Open in a new tab" +msgstr "Отвори в нов раздел" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Тази страница е отворена през HTTPS, а терминалът се предоставя през HTTP в LAN: затова се отваря в отделен раздел." + msgid "The data usage could not be read" msgstr "Използването на данни не можа да бъде прочетено" diff --git a/openwrt/luci-app-mu300/po/cs/mu300.po b/openwrt/luci-app-mu300/po/cs/mu300.po index 5a1eed1b..b700509a 100644 --- a/openwrt/luci-app-mu300/po/cs/mu300.po +++ b/openwrt/luci-app-mu300/po/cs/mu300.po @@ -42,9 +42,18 @@ msgstr "Napájení" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminál" + +msgid "Terminal settings" +msgstr "Nastavení terminálu" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Řídicí centrum MU300: přehled stavu, zámky sítě, terminál AT a SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminál: root shell zařízení v prohlížeči" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Neúplná: dorazilo %d z %d částí" msgid "Delete" msgstr "Smazat" +msgid "ttyd is not installed." +msgstr "ttyd není nainstalován." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminál je vypnutý (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Otevírá se příliš mnoho terminálů najednou. Zkuste to znovu za minutu." + +msgid "The terminal is not available." +msgstr "Terminál není k dispozici." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Toto je root shell zařízení: každý příkaz běží s plnými právy a chyba může zařízení znemožnit start." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Je dostupný pouze z LAN (USB a hotspot), nikdy z mobilních dat, a jen z této přihlášené stránky." + +msgid "It closes after %d minutes without activity." +msgstr "Zavře se po %d minutách bez aktivity." + +msgid "Reconnect" +msgstr "Znovu připojit" + +msgid "Open in a new tab" +msgstr "Otevřít na nové kartě" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Tato stránka byla otevřena přes HTTPS a terminál běží v LAN přes HTTP: otevře se proto na vlastní kartě." + msgid "The data usage could not be read" msgstr "Spotřebu dat nelze načíst" diff --git a/openwrt/luci-app-mu300/po/da/mu300.po b/openwrt/luci-app-mu300/po/da/mu300.po index 102ce301..9e823107 100644 --- a/openwrt/luci-app-mu300/po/da/mu300.po +++ b/openwrt/luci-app-mu300/po/da/mu300.po @@ -42,9 +42,18 @@ msgstr "Strøm" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Terminalindstillinger" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300-kontrolcenter: statusoversigt, netværkslåse, AT-terminal og SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: en root-shell på enheden i browseren" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Ufuldstændig: %d af %d dele ankom" msgid "Delete" msgstr "Slet" +msgid "ttyd is not installed." +msgstr "ttyd er ikke installeret." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminalen er slået fra (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "For mange terminaler åbnes på én gang. Prøv igen om et minut." + +msgid "The terminal is not available." +msgstr "Terminalen er ikke tilgængelig." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Dette er en root-shell på enheden: hver kommando kører med fulde rettigheder, og en fejl kan gøre enheden ude af stand til at starte." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Den kan kun nås fra LAN (USB og hotspot), aldrig fra mobildata, og kun fra denne side, hvor du er logget ind." + +msgid "It closes after %d minutes without activity." +msgstr "Den lukkes efter %d minutter uden aktivitet." + +msgid "Reconnect" +msgstr "Forbind igen" + +msgid "Open in a new tab" +msgstr "Åbn i en ny fane" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Denne side blev åbnet via HTTPS, og terminalen leveres via HTTP på LAN: den åbnes i sin egen fane." + msgid "The data usage could not be read" msgstr "Dataforbruget kunne ikke læses" diff --git a/openwrt/luci-app-mu300/po/de/mu300.po b/openwrt/luci-app-mu300/po/de/mu300.po index 90a4f849..46c0cd61 100644 --- a/openwrt/luci-app-mu300/po/de/mu300.po +++ b/openwrt/luci-app-mu300/po/de/mu300.po @@ -42,9 +42,18 @@ msgstr "Energie" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Terminal-Einstellungen" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300-Kontrollzentrum: Status-Dashboard, Netzsperren, AT-Terminal und SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: eine Root-Shell auf dem Gerät im Browser" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Unvollständig: %d von %d Teilen angekommen" msgid "Delete" msgstr "Löschen" +msgid "ttyd is not installed." +msgstr "ttyd ist nicht installiert." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Das Terminal ist ausgeschaltet (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Zu viele Terminals werden gleichzeitig geöffnet. Versuchen Sie es in einer Minute erneut." + +msgid "The terminal is not available." +msgstr "Das Terminal ist nicht verfügbar." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Dies ist eine Root-Shell auf dem Gerät: Jeder Befehl läuft mit vollen Rechten, und ein Fehler kann das Gerät unstartbar machen." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Es ist nur aus dem LAN erreichbar (USB und Hotspot), nie über mobile Daten, und nur von dieser angemeldeten Seite aus." + +msgid "It closes after %d minutes without activity." +msgstr "Es wird nach %d Minuten ohne Aktivität geschlossen." + +msgid "Reconnect" +msgstr "Neu verbinden" + +msgid "Open in a new tab" +msgstr "In neuem Tab öffnen" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Diese Seite wurde über HTTPS geöffnet, das Terminal läuft im LAN über HTTP: Es öffnet sich in einem eigenen Tab." + msgid "The data usage could not be read" msgstr "Der Datenverbrauch konnte nicht gelesen werden" diff --git a/openwrt/luci-app-mu300/po/el/mu300.po b/openwrt/luci-app-mu300/po/el/mu300.po index 98baf7a1..8e3656aa 100644 --- a/openwrt/luci-app-mu300/po/el/mu300.po +++ b/openwrt/luci-app-mu300/po/el/mu300.po @@ -42,9 +42,18 @@ msgstr "Ισχύς" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Τερματικό" + +msgid "Terminal settings" +msgstr "Ρυθμίσεις τερματικού" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Κέντρο ελέγχου MU300: πίνακας κατάστασης, κλειδώματα δικτύου, τερματικό AT και SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Τερματικό: ένα κέλυφος root της συσκευής στο πρόγραμμα περιήγησης" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Ελλιπές: έφτασαν %d από %d τμήματα" msgid "Delete" msgstr "Διαγραφή" +msgid "ttyd is not installed." +msgstr "Το ttyd δεν είναι εγκατεστημένο." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Το τερματικό είναι απενεργοποιημένο (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Ανοίγουν πάρα πολλά τερματικά ταυτόχρονα. Δοκιμάστε ξανά σε ένα λεπτό." + +msgid "The terminal is not available." +msgstr "Το τερματικό δεν είναι διαθέσιμο." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Αυτό είναι ένα κέλυφος root της συσκευής: κάθε εντολή εκτελείται με πλήρη δικαιώματα και ένα λάθος μπορεί να κάνει τη συσκευή να μην εκκινεί." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Είναι προσβάσιμο μόνο από το LAN (USB και hotspot), ποτέ από τα δεδομένα κινητής, και μόνο από αυτή τη σελίδα με σύνδεση." + +msgid "It closes after %d minutes without activity." +msgstr "Κλείνει μετά από %d λεπτά χωρίς δραστηριότητα." + +msgid "Reconnect" +msgstr "Επανασύνδεση" + +msgid "Open in a new tab" +msgstr "Άνοιγμα σε νέα καρτέλα" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Αυτή η σελίδα άνοιξε μέσω HTTPS και το τερματικό εξυπηρετείται μέσω HTTP στο LAN: ανοίγει σε δική του καρτέλα." + msgid "The data usage could not be read" msgstr "Η χρήση δεδομένων δεν μπόρεσε να διαβαστεί" diff --git a/openwrt/luci-app-mu300/po/es/mu300.po b/openwrt/luci-app-mu300/po/es/mu300.po index 8431ecc7..7ae9fd72 100644 --- a/openwrt/luci-app-mu300/po/es/mu300.po +++ b/openwrt/luci-app-mu300/po/es/mu300.po @@ -42,9 +42,18 @@ msgstr "Energía" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Ajustes del terminal" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Centro de control MU300: panel de estado, bloqueos de red, terminal AT y SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: un shell de root del dispositivo en el navegador" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Incompleto: llegaron %d de %d partes" msgid "Delete" msgstr "Eliminar" +msgid "ttyd is not installed." +msgstr "ttyd no está instalado." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "El terminal está desactivado (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Se están abriendo demasiados terminales a la vez. Inténtelo de nuevo en un minuto." + +msgid "The terminal is not available." +msgstr "El terminal no está disponible." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Este es un shell de root del dispositivo: cada orden se ejecuta con todos los permisos, y un error puede impedir que el dispositivo arranque." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Solo es accesible desde la LAN (USB y el punto de acceso), nunca desde los datos móviles, y solo desde esta página con sesión iniciada." + +msgid "It closes after %d minutes without activity." +msgstr "Se cierra tras %d minutos sin actividad." + +msgid "Reconnect" +msgstr "Reconectar" + +msgid "Open in a new tab" +msgstr "Abrir en una pestaña nueva" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Esta página se abrió por HTTPS y el terminal se sirve por HTTP en la LAN: se abre en una pestaña propia." + msgid "The data usage could not be read" msgstr "No se pudo leer el uso de datos" diff --git a/openwrt/luci-app-mu300/po/fa/mu300.po b/openwrt/luci-app-mu300/po/fa/mu300.po index aced87a8..d69d391a 100644 --- a/openwrt/luci-app-mu300/po/fa/mu300.po +++ b/openwrt/luci-app-mu300/po/fa/mu300.po @@ -42,9 +42,18 @@ msgstr "توان" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "ترمینال" + +msgid "Terminal settings" +msgstr "تنظیمات ترمینال" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "مرکز کنترل MU300: داشبورد وضعیت، قفل‌های شبکه، ترمینال AT و SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "ترمینال: یک پوسته root روی دستگاه در مرورگر" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "ناقص: %d از %d بخش رسید" msgid "Delete" msgstr "حذف" +msgid "ttyd is not installed." +msgstr "ttyd نصب نیست." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "ترمینال خاموش است (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "ترمینال‌های زیادی هم‌زمان باز می‌شوند. یک دقیقه دیگر دوباره امتحان کنید." + +msgid "The terminal is not available." +msgstr "ترمینال در دسترس نیست." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "این یک پوسته root روی دستگاه است: هر فرمان با دسترسی کامل اجرا می‌شود و یک اشتباه می‌تواند دستگاه را از راه‌اندازی بازدارد." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "فقط از LAN (USB و هات‌اسپات) در دسترس است، هرگز از داده همراه، و فقط از همین صفحه‌ای که با آن وارد شده‌اید." + +msgid "It closes after %d minutes without activity." +msgstr "پس از %d دقیقه بدون فعالیت بسته می‌شود." + +msgid "Reconnect" +msgstr "اتصال دوباره" + +msgid "Open in a new tab" +msgstr "باز کردن در زبانه جدید" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "این صفحه با HTTPS باز شده و ترمینال روی LAN با HTTP ارائه می‌شود: در زبانه جداگانه‌ای باز می‌شود." + msgid "The data usage could not be read" msgstr "مصرف داده خوانده نشد" diff --git a/openwrt/luci-app-mu300/po/fi/mu300.po b/openwrt/luci-app-mu300/po/fi/mu300.po index 6b97a305..658d4ed0 100644 --- a/openwrt/luci-app-mu300/po/fi/mu300.po +++ b/openwrt/luci-app-mu300/po/fi/mu300.po @@ -42,9 +42,18 @@ msgstr "Virta" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Pääte" + +msgid "Terminal settings" +msgstr "Päätteen asetukset" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300-ohjauskeskus: tilan yleiskatsaus, verkkolukitukset, AT-pääte ja SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Pääte: laitteen root-komentotulkki selaimessa" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Puutteellinen: %d / %d osaa saapui" msgid "Delete" msgstr "Poista" +msgid "ttyd is not installed." +msgstr "ttyd ei ole asennettu." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Pääte on pois päältä (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Liian monta päätettä avataan yhtä aikaa. Yritä uudelleen minuutin kuluttua." + +msgid "The terminal is not available." +msgstr "Pääte ei ole käytettävissä." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Tämä on laitteen root-komentotulkki: jokainen komento suoritetaan täysin oikeuksin, ja virhe voi estää laitetta käynnistymästä." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Se on käytettävissä vain lähiverkosta (USB ja hotspot), ei koskaan mobiilidatan kautta, ja vain tältä kirjautuneelta sivulta." + +msgid "It closes after %d minutes without activity." +msgstr "Se suljetaan %d minuutin toimettomuuden jälkeen." + +msgid "Reconnect" +msgstr "Yhdistä uudelleen" + +msgid "Open in a new tab" +msgstr "Avaa uudessa välilehdessä" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Tämä sivu avattiin HTTPS:n kautta, ja pääte toimii lähiverkossa HTTP:n kautta: se avautuu omaan välilehteensä." + msgid "The data usage could not be read" msgstr "Datan käyttöä ei voitu lukea" diff --git a/openwrt/luci-app-mu300/po/fr/mu300.po b/openwrt/luci-app-mu300/po/fr/mu300.po index f2f0d8d3..a3b5294b 100644 --- a/openwrt/luci-app-mu300/po/fr/mu300.po +++ b/openwrt/luci-app-mu300/po/fr/mu300.po @@ -42,9 +42,18 @@ msgstr "Alimentation" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Paramètres du terminal" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Centre de contrôle MU300 : tableau de bord d'état, verrouillages réseau, terminal AT et SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal : un shell root de l’appareil dans le navigateur" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Incomplet : %d parties sur %d reçues" msgid "Delete" msgstr "Supprimer" +msgid "ttyd is not installed." +msgstr "ttyd n’est pas installé." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Le terminal est désactivé (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Trop de terminaux s’ouvrent en même temps. Réessayez dans une minute." + +msgid "The terminal is not available." +msgstr "Le terminal n’est pas disponible." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Ceci est un shell root de l’appareil : chaque commande s’exécute avec tous les droits, et une erreur peut empêcher l’appareil de démarrer." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Il n’est accessible que depuis le LAN (USB et le point d’accès), jamais depuis les données mobiles, et seulement depuis cette page connectée." + +msgid "It closes after %d minutes without activity." +msgstr "Il se ferme après %d minutes d’inactivité." + +msgid "Reconnect" +msgstr "Se reconnecter" + +msgid "Open in a new tab" +msgstr "Ouvrir dans un nouvel onglet" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Cette page a été ouverte en HTTPS, et le terminal est servi en HTTP sur le LAN : il s’ouvre dans un onglet à part." + msgid "The data usage could not be read" msgstr "La consommation de données n'a pas pu être lue" diff --git a/openwrt/luci-app-mu300/po/he/mu300.po b/openwrt/luci-app-mu300/po/he/mu300.po index bd733a14..b92909cb 100644 --- a/openwrt/luci-app-mu300/po/he/mu300.po +++ b/openwrt/luci-app-mu300/po/he/mu300.po @@ -42,9 +42,18 @@ msgstr "צריכת חשמל" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "מסוף" + +msgid "Terminal settings" +msgstr "הגדרות המסוף" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "מרכז הבקרה של MU300: לוח מצב, נעילות רשת, מסוף AT ו-SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "מסוף: מעטפת root של המכשיר בדפדפן" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "לא שלמה: הגיעו %d מתוך %d חלקים" msgid "Delete" msgstr "מחיקה" +msgid "ttyd is not installed." +msgstr "ttyd אינו מותקן." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "המסוף כבוי (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "יותר מדי מסופים נפתחים בבת אחת. נסו שוב בעוד דקה." + +msgid "The terminal is not available." +msgstr "המסוף אינו זמין." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "זוהי מעטפת root של המכשיר: כל פקודה רצה עם הרשאות מלאות, וטעות אחת עלולה למנוע מהמכשיר לאתחל." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "הוא נגיש רק מה-LAN (USB ונקודת הגישה), לעולם לא מנתוני הסלולר, ורק מהדף המחובר הזה." + +msgid "It closes after %d minutes without activity." +msgstr "הוא נסגר לאחר %d דקות ללא פעילות." + +msgid "Reconnect" +msgstr "התחבר מחדש" + +msgid "Open in a new tab" +msgstr "פתח בכרטיסייה חדשה" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "הדף הזה נפתח ב-HTTPS, והמסוף מוגש ב-HTTP ברשת המקומית: הוא נפתח בכרטיסייה משלו." + msgid "The data usage could not be read" msgstr "לא ניתן לקרוא את השימוש בנתונים" diff --git a/openwrt/luci-app-mu300/po/hi/mu300.po b/openwrt/luci-app-mu300/po/hi/mu300.po index 64750a3f..b96dcc29 100644 --- a/openwrt/luci-app-mu300/po/hi/mu300.po +++ b/openwrt/luci-app-mu300/po/hi/mu300.po @@ -42,9 +42,18 @@ msgstr "पावर" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "टर्मिनल" + +msgid "Terminal settings" +msgstr "टर्मिनल सेटिंग्स" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300 नियंत्रण केंद्र: स्थिति डैशबोर्ड, नेटवर्क लॉक, AT टर्मिनल और SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "टर्मिनल: ब्राउज़र में डिवाइस का root शेल" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "अधूरा: %d / %d भाग पहुँचे" msgid "Delete" msgstr "हटाएँ" +msgid "ttyd is not installed." +msgstr "ttyd इंस्टॉल नहीं है।" + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "टर्मिनल बंद है (/etc/config/ttyd)।" + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "एक साथ बहुत सारे टर्मिनल खुल रहे हैं। एक मिनट बाद फिर कोशिश करें।" + +msgid "The terminal is not available." +msgstr "टर्मिनल उपलब्ध नहीं है।" + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "यह डिवाइस का root शेल है: हर कमांड पूरे अधिकारों के साथ चलती है, और एक गलती डिवाइस को बूट होने से रोक सकती है।" + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "यह केवल LAN (USB और हॉटस्पॉट) से पहुँच योग्य है, मोबाइल डेटा से कभी नहीं, और केवल इसी लॉग-इन पेज से।" + +msgid "It closes after %d minutes without activity." +msgstr "%d मिनट तक कोई गतिविधि न होने पर यह बंद हो जाता है।" + +msgid "Reconnect" +msgstr "फिर से कनेक्ट करें" + +msgid "Open in a new tab" +msgstr "नए टैब में खोलें" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "यह पेज HTTPS से खोला गया है, और टर्मिनल LAN पर HTTP से चलता है: इसलिए यह अपने अलग टैब में खुलता है।" + msgid "The data usage could not be read" msgstr "डेटा उपयोग पढ़ा नहीं जा सका" diff --git a/openwrt/luci-app-mu300/po/hu/mu300.po b/openwrt/luci-app-mu300/po/hu/mu300.po index 04ce8fc8..082f4a22 100644 --- a/openwrt/luci-app-mu300/po/hu/mu300.po +++ b/openwrt/luci-app-mu300/po/hu/mu300.po @@ -42,9 +42,18 @@ msgstr "Energia" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminál" + +msgid "Terminal settings" +msgstr "Terminál beállításai" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300 vezérlőközpont: állapot-irányítópult, hálózati zárolások, AT-terminál és SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminál: root shell az eszközön, a böngészőben" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Hiányos: %d / %d rész érkezett meg" msgid "Delete" msgstr "Törlés" +msgid "ttyd is not installed." +msgstr "A ttyd nincs telepítve." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "A terminál ki van kapcsolva (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Túl sok terminál nyílik meg egyszerre. Próbálja újra egy perc múlva." + +msgid "The terminal is not available." +msgstr "A terminál nem érhető el." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Ez az eszköz root shellje: minden parancs teljes jogokkal fut, és egy hiba miatt az eszköz nem fog elindulni." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Csak a LAN-ról érhető el (USB és a hotspot), mobiladatról soha, és csak erről a bejelentkezett oldalról." + +msgid "It closes after %d minutes without activity." +msgstr "%d perc tétlenség után bezárul." + +msgid "Reconnect" +msgstr "Újracsatlakozás" + +msgid "Open in a new tab" +msgstr "Megnyitás új lapon" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Ez az oldal HTTPS-en nyílt meg, a terminál pedig HTTP-n fut a LAN-on: ezért saját lapon nyílik meg." + msgid "The data usage could not be read" msgstr "Az adatforgalom nem olvasható" diff --git a/openwrt/luci-app-mu300/po/id/mu300.po b/openwrt/luci-app-mu300/po/id/mu300.po index 44ad5d11..a2448b09 100644 --- a/openwrt/luci-app-mu300/po/id/mu300.po +++ b/openwrt/luci-app-mu300/po/id/mu300.po @@ -42,9 +42,18 @@ msgstr "Daya" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Pengaturan terminal" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Pusat kontrol MU300: dasbor status, kunci jaringan, terminal AT, dan SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: shell root perangkat di peramban" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Tidak lengkap: %d dari %d bagian tiba" msgid "Delete" msgstr "Hapus" +msgid "ttyd is not installed." +msgstr "ttyd tidak terpasang." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminal dimatikan (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Terlalu banyak terminal dibuka sekaligus. Coba lagi dalam satu menit." + +msgid "The terminal is not available." +msgstr "Terminal tidak tersedia." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Ini adalah shell root perangkat: setiap perintah berjalan dengan hak penuh, dan satu kesalahan dapat membuat perangkat tidak bisa boot." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Hanya dapat dijangkau dari LAN (USB dan hotspot), tidak pernah dari data seluler, dan hanya dari halaman yang sudah login ini." + +msgid "It closes after %d minutes without activity." +msgstr "Ditutup setelah %d menit tanpa aktivitas." + +msgid "Reconnect" +msgstr "Sambung ulang" + +msgid "Open in a new tab" +msgstr "Buka di tab baru" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Halaman ini dibuka lewat HTTPS, dan terminal disajikan lewat HTTP di LAN: terminal dibuka di tab tersendiri." + msgid "The data usage could not be read" msgstr "Penggunaan data tidak dapat dibaca" diff --git a/openwrt/luci-app-mu300/po/it/mu300.po b/openwrt/luci-app-mu300/po/it/mu300.po index 47a69f57..e48338b0 100644 --- a/openwrt/luci-app-mu300/po/it/mu300.po +++ b/openwrt/luci-app-mu300/po/it/mu300.po @@ -42,9 +42,18 @@ msgstr "Alimentazione" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminale" + +msgid "Terminal settings" +msgstr "Impostazioni del terminale" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Centro di controllo MU300: pannello di stato, blocchi di rete, terminale AT e SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminale: una shell root del dispositivo nel browser" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Incompleto: arrivate %d parti su %d" msgid "Delete" msgstr "Elimina" +msgid "ttyd is not installed." +msgstr "ttyd non è installato." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Il terminale è disattivato (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Si stanno aprendo troppi terminali contemporaneamente. Riprova tra un minuto." + +msgid "The terminal is not available." +msgstr "Il terminale non è disponibile." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Questa è una shell root del dispositivo: ogni comando viene eseguito con tutti i privilegi, e un errore può impedire l’avvio del dispositivo." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "È raggiungibile solo dalla LAN (USB e hotspot), mai dai dati mobili, e solo da questa pagina con accesso effettuato." + +msgid "It closes after %d minutes without activity." +msgstr "Si chiude dopo %d minuti di inattività." + +msgid "Reconnect" +msgstr "Riconnetti" + +msgid "Open in a new tab" +msgstr "Apri in una nuova scheda" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Questa pagina è stata aperta in HTTPS e il terminale è servito in HTTP sulla LAN: si apre in una scheda a parte." + msgid "The data usage could not be read" msgstr "Impossibile leggere il consumo dati" diff --git a/openwrt/luci-app-mu300/po/ja/mu300.po b/openwrt/luci-app-mu300/po/ja/mu300.po index a2f3e2a3..8b01dad1 100644 --- a/openwrt/luci-app-mu300/po/ja/mu300.po +++ b/openwrt/luci-app-mu300/po/ja/mu300.po @@ -42,9 +42,18 @@ msgstr "電源" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "ターミナル" + +msgid "Terminal settings" +msgstr "ターミナルの設定" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300 コントロールセンター: ステータスダッシュボード、ネットワークロック、AT ターミナル、SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "ターミナル: ブラウザーで使うデバイスの root シェル" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "不完全: %d / %d 部分が届きました" msgid "Delete" msgstr "削除" +msgid "ttyd is not installed." +msgstr "ttyd がインストールされていません。" + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "ターミナルはオフです (/etc/config/ttyd)。" + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "同時に開かれているターミナルが多すぎます。1 分後にもう一度お試しください。" + +msgid "The terminal is not available." +msgstr "ターミナルは利用できません。" + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "これはデバイスの root シェルです。すべてのコマンドが完全な権限で実行され、操作を誤るとデバイスが起動しなくなることがあります。" + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "LAN (USB とホットスポット) からのみ、ログイン済みのこのページからのみ利用でき、モバイルデータ側からは決して届きません。" + +msgid "It closes after %d minutes without activity." +msgstr "%d 分間操作がないと閉じます。" + +msgid "Reconnect" +msgstr "再接続" + +msgid "Open in a new tab" +msgstr "新しいタブで開く" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "このページは HTTPS で開かれていますが、ターミナルは LAN 上の HTTP で提供されるため、別のタブで開きます。" + msgid "The data usage could not be read" msgstr "データ使用量を読み取れませんでした" diff --git a/openwrt/luci-app-mu300/po/kk/mu300.po b/openwrt/luci-app-mu300/po/kk/mu300.po index d0595a8e..bf499a01 100644 --- a/openwrt/luci-app-mu300/po/kk/mu300.po +++ b/openwrt/luci-app-mu300/po/kk/mu300.po @@ -42,9 +42,18 @@ msgstr "Қуат" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Терминал" + +msgid "Terminal settings" +msgstr "Терминал баптаулары" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300 басқару орталығы: күй тақтасы, желіні бекіту, AT терминалы және SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Терминал: браузердегі құрылғының root қабығы" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Толық емес: %d / %d бөлік келді" msgid "Delete" msgstr "Жою" +msgid "ttyd is not installed." +msgstr "ttyd орнатылмаған." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Терминал өшірулі (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Бір мезгілде тым көп терминал ашылуда. Бір минуттан кейін қайталап көріңіз." + +msgid "The terminal is not available." +msgstr "Терминал қолжетімсіз." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Бұл құрылғының root қабығы: әр команда толық құқықпен орындалады, ал бір қате құрылғыны жүктелмейтін етуі мүмкін." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Оған тек LAN арқылы (USB және хотспот) қол жеткізуге болады, мобильді деректен ешқашан, және тек осы кірілген беттен." + +msgid "It closes after %d minutes without activity." +msgstr "%d минут әрекетсіздіктен кейін жабылады." + +msgid "Reconnect" +msgstr "Қайта қосылу" + +msgid "Open in a new tab" +msgstr "Жаңа қойындыда ашу" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Бұл бет HTTPS арқылы ашылған, ал терминал LAN-да HTTP арқылы беріледі: ол жеке қойындыда ашылады." + msgid "The data usage could not be read" msgstr "Деректер шығынын оқу мүмкін болмады" diff --git a/openwrt/luci-app-mu300/po/ko/mu300.po b/openwrt/luci-app-mu300/po/ko/mu300.po index c53934f5..10b692d4 100644 --- a/openwrt/luci-app-mu300/po/ko/mu300.po +++ b/openwrt/luci-app-mu300/po/ko/mu300.po @@ -42,9 +42,18 @@ msgstr "전원" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "터미널" + +msgid "Terminal settings" +msgstr "터미널 설정" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300 제어 센터: 상태 대시보드, 네트워크 잠금, AT 터미널 및 SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "터미널: 브라우저에서 쓰는 기기의 root 셸" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "불완전: %d / %d 부분 도착" msgid "Delete" msgstr "삭제" +msgid "ttyd is not installed." +msgstr "ttyd가 설치되어 있지 않습니다." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "터미널이 꺼져 있습니다 (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "동시에 열리는 터미널이 너무 많습니다. 1분 후에 다시 시도하세요." + +msgid "The terminal is not available." +msgstr "터미널을 사용할 수 없습니다." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "기기의 root 셸입니다. 모든 명령이 전체 권한으로 실행되며, 실수하면 기기가 부팅되지 않을 수 있습니다." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "LAN(USB와 핫스팟)에서만, 그리고 로그인한 이 페이지에서만 접근할 수 있으며 모바일 데이터 쪽에서는 절대 접근할 수 없습니다." + +msgid "It closes after %d minutes without activity." +msgstr "%d분 동안 활동이 없으면 닫힙니다." + +msgid "Reconnect" +msgstr "다시 연결" + +msgid "Open in a new tab" +msgstr "새 탭에서 열기" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "이 페이지는 HTTPS로 열렸고 터미널은 LAN에서 HTTP로 제공되므로 별도의 탭에서 열립니다." + msgid "The data usage could not be read" msgstr "데이터 사용량을 읽을 수 없습니다" diff --git a/openwrt/luci-app-mu300/po/nl/mu300.po b/openwrt/luci-app-mu300/po/nl/mu300.po index a77673f1..2e212c10 100644 --- a/openwrt/luci-app-mu300/po/nl/mu300.po +++ b/openwrt/luci-app-mu300/po/nl/mu300.po @@ -42,9 +42,18 @@ msgstr "Voeding" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Terminalinstellingen" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300-controlecentrum: statusdashboard, netwerkvergrendelingen, AT-terminal en SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: een root-shell op het apparaat in de browser" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Onvolledig: %d van %d delen aangekomen" msgid "Delete" msgstr "Verwijderen" +msgid "ttyd is not installed." +msgstr "ttyd is niet geïnstalleerd." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "De terminal staat uit (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Er worden te veel terminals tegelijk geopend. Probeer het over een minuut opnieuw." + +msgid "The terminal is not available." +msgstr "De terminal is niet beschikbaar." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Dit is een root-shell op het apparaat: elke opdracht draait met volledige rechten, en een fout kan het apparaat onopstartbaar maken." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Hij is alleen bereikbaar vanaf het LAN (USB en de hotspot), nooit via mobiele data, en alleen vanaf deze ingelogde pagina." + +msgid "It closes after %d minutes without activity." +msgstr "Hij sluit na %d minuten zonder activiteit." + +msgid "Reconnect" +msgstr "Opnieuw verbinden" + +msgid "Open in a new tab" +msgstr "Openen in een nieuw tabblad" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Deze pagina is via HTTPS geopend en de terminal wordt via HTTP op het LAN aangeboden: hij opent in een eigen tabblad." + msgid "The data usage could not be read" msgstr "Het dataverbruik kon niet worden gelezen" diff --git a/openwrt/luci-app-mu300/po/pl/mu300.po b/openwrt/luci-app-mu300/po/pl/mu300.po index 3bc4937b..565d73de 100644 --- a/openwrt/luci-app-mu300/po/pl/mu300.po +++ b/openwrt/luci-app-mu300/po/pl/mu300.po @@ -42,9 +42,18 @@ msgstr "Zasilanie" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Ustawienia terminala" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Centrum sterowania MU300: panel stanu, blokady sieci, terminal AT i SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: powłoka root urządzenia w przeglądarce" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Niekompletna: dotarło %d z %d części" msgid "Delete" msgstr "Usuń" +msgid "ttyd is not installed." +msgstr "ttyd nie jest zainstalowany." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminal jest wyłączony (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Zbyt wiele terminali otwiera się jednocześnie. Spróbuj ponownie za minutę." + +msgid "The terminal is not available." +msgstr "Terminal jest niedostępny." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "To jest powłoka root urządzenia: każde polecenie działa z pełnymi uprawnieniami, a błąd może sprawić, że urządzenie się nie uruchomi." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Jest dostępny tylko z sieci LAN (USB i hotspot), nigdy z danych komórkowych, i tylko z tej zalogowanej strony." + +msgid "It closes after %d minutes without activity." +msgstr "Zamyka się po %d minutach bezczynności." + +msgid "Reconnect" +msgstr "Połącz ponownie" + +msgid "Open in a new tab" +msgstr "Otwórz w nowej karcie" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Ta strona została otwarta przez HTTPS, a terminal działa w sieci LAN przez HTTP: otwiera się w osobnej karcie." + msgid "The data usage could not be read" msgstr "Nie udało się odczytać zużycia danych" diff --git a/openwrt/luci-app-mu300/po/pt_BR/mu300.po b/openwrt/luci-app-mu300/po/pt_BR/mu300.po index 3ceb2012..24c47937 100644 --- a/openwrt/luci-app-mu300/po/pt_BR/mu300.po +++ b/openwrt/luci-app-mu300/po/pt_BR/mu300.po @@ -42,9 +42,18 @@ msgstr "Energia" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Configurações do terminal" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Central de controle MU300: painel de status, bloqueios de rede, terminal AT e SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: um shell root do dispositivo no navegador" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Incompleta: chegaram %d de %d partes" msgid "Delete" msgstr "Excluir" +msgid "ttyd is not installed." +msgstr "O ttyd não está instalado." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "O terminal está desligado (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Muitos terminais estão sendo abertos ao mesmo tempo. Tente de novo em um minuto." + +msgid "The terminal is not available." +msgstr "O terminal não está disponível." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Este é um shell root do dispositivo: cada comando roda com todos os privilégios, e um erro pode impedir o dispositivo de iniciar." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Só é acessível pela LAN (USB e o hotspot), nunca pelos dados móveis, e só a partir desta página com login." + +msgid "It closes after %d minutes without activity." +msgstr "Ele fecha após %d minutos sem atividade." + +msgid "Reconnect" +msgstr "Reconectar" + +msgid "Open in a new tab" +msgstr "Abrir em uma nova aba" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Esta página foi aberta por HTTPS, e o terminal é servido por HTTP na LAN: ele abre em uma aba própria." + msgid "The data usage could not be read" msgstr "Não foi possível ler o uso de dados" diff --git a/openwrt/luci-app-mu300/po/ro/mu300.po b/openwrt/luci-app-mu300/po/ro/mu300.po index 22993589..425e3f7d 100644 --- a/openwrt/luci-app-mu300/po/ro/mu300.po +++ b/openwrt/luci-app-mu300/po/ro/mu300.po @@ -42,9 +42,18 @@ msgstr "Alimentare" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Setările terminalului" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Centru de control MU300: panou de stare, blocări de rețea, terminal AT și SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: un shell root al dispozitivului în browser" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Incomplet: au sosit %d din %d părți" msgid "Delete" msgstr "Ștergere" +msgid "ttyd is not installed." +msgstr "ttyd nu este instalat." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminalul este oprit (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Se deschid prea multe terminale deodată. Încercați din nou peste un minut." + +msgid "The terminal is not available." +msgstr "Terminalul nu este disponibil." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Acesta este un shell root al dispozitivului: fiecare comandă rulează cu drepturi depline, iar o greșeală poate face dispozitivul să nu mai pornească." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Este accesibil doar din LAN (USB și hotspot), niciodată din datele mobile, și doar din această pagină autentificată." + +msgid "It closes after %d minutes without activity." +msgstr "Se închide după %d minute fără activitate." + +msgid "Reconnect" +msgstr "Reconectare" + +msgid "Open in a new tab" +msgstr "Deschide într-o filă nouă" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Această pagină a fost deschisă prin HTTPS, iar terminalul este servit prin HTTP în LAN: se deschide într-o filă separată." + msgid "The data usage could not be read" msgstr "Consumul de date nu a putut fi citit" diff --git a/openwrt/luci-app-mu300/po/ru/mu300.po b/openwrt/luci-app-mu300/po/ru/mu300.po index 6b9f8e63..f803d132 100644 --- a/openwrt/luci-app-mu300/po/ru/mu300.po +++ b/openwrt/luci-app-mu300/po/ru/mu300.po @@ -42,9 +42,18 @@ msgstr "Питание" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Терминал" + +msgid "Terminal settings" +msgstr "Настройки терминала" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Центр управления MU300: панель состояния, фиксация сети, AT-терминал и SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Терминал: оболочка root на устройстве в браузере" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Неполное: получено частей %d из %d" msgid "Delete" msgstr "Удалить" +msgid "ttyd is not installed." +msgstr "ttyd не установлен." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Терминал выключен (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Слишком много терминалов открывается одновременно. Повторите попытку через минуту." + +msgid "The terminal is not available." +msgstr "Терминал недоступен." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Это оболочка root на устройстве: каждая команда выполняется с полными правами, и ошибка может сделать устройство незагружаемым." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Он доступен только из LAN (USB и точка доступа), никогда из мобильной сети, и только с этой страницы после входа." + +msgid "It closes after %d minutes without activity." +msgstr "Он закрывается после %d минут бездействия." + +msgid "Reconnect" +msgstr "Переподключиться" + +msgid "Open in a new tab" +msgstr "Открыть в новой вкладке" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Эта страница открыта по HTTPS, а терминал работает в LAN по HTTP: он открывается в отдельной вкладке." + msgid "The data usage could not be read" msgstr "Не удалось прочитать расход трафика" diff --git a/openwrt/luci-app-mu300/po/sk/mu300.po b/openwrt/luci-app-mu300/po/sk/mu300.po index ad4cd2b5..e33dce6d 100644 --- a/openwrt/luci-app-mu300/po/sk/mu300.po +++ b/openwrt/luci-app-mu300/po/sk/mu300.po @@ -42,9 +42,18 @@ msgstr "Napájanie" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminál" + +msgid "Terminal settings" +msgstr "Nastavenia terminálu" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Riadiace centrum MU300: prehľad stavu, zámky siete, terminál AT a SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminál: root shell zariadenia v prehliadači" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Neúplná: prišlo %d z %d častí" msgid "Delete" msgstr "Odstrániť" +msgid "ttyd is not installed." +msgstr "ttyd nie je nainštalovaný." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminál je vypnutý (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Otvára sa príliš veľa terminálov naraz. Skúste to znova o minútu." + +msgid "The terminal is not available." +msgstr "Terminál nie je k dispozícii." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Toto je root shell zariadenia: každý príkaz beží s plnými právami a chyba môže spôsobiť, že zariadenie nenaštartuje." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Je dostupný iba z LAN (USB a hotspot), nikdy z mobilných dát, a len z tejto prihlásenej stránky." + +msgid "It closes after %d minutes without activity." +msgstr "Zatvorí sa po %d minútach bez aktivity." + +msgid "Reconnect" +msgstr "Znova pripojiť" + +msgid "Open in a new tab" +msgstr "Otvoriť na novej karte" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Táto stránka bola otvorená cez HTTPS a terminál beží v LAN cez HTTP: otvorí sa preto na vlastnej karte." + msgid "The data usage could not be read" msgstr "Spotrebu dát nemožno načítať" diff --git a/openwrt/luci-app-mu300/po/sv/mu300.po b/openwrt/luci-app-mu300/po/sv/mu300.po index 060c1a6f..1fbd1e07 100644 --- a/openwrt/luci-app-mu300/po/sv/mu300.po +++ b/openwrt/luci-app-mu300/po/sv/mu300.po @@ -42,9 +42,18 @@ msgstr "Ström" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Terminalinställningar" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300-kontrollcenter: statuspanel, nätverkslås, AT-terminal och SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: ett root-skal på enheten i webbläsaren" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Ofullständigt: %d av %d delar kom fram" msgid "Delete" msgstr "Radera" +msgid "ttyd is not installed." +msgstr "ttyd är inte installerat." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminalen är avstängd (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "För många terminaler öppnas samtidigt. Försök igen om en minut." + +msgid "The terminal is not available." +msgstr "Terminalen är inte tillgänglig." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Det här är ett root-skal på enheten: varje kommando körs med fullständiga rättigheter, och ett misstag kan göra att enheten inte startar." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Den nås bara från LAN (USB och hotspot), aldrig via mobildata, och bara från den här inloggade sidan." + +msgid "It closes after %d minutes without activity." +msgstr "Den stängs efter %d minuter utan aktivitet." + +msgid "Reconnect" +msgstr "Anslut igen" + +msgid "Open in a new tab" +msgstr "Öppna i en ny flik" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Den här sidan öppnades via HTTPS, och terminalen levereras via HTTP på LAN: den öppnas i en egen flik." + msgid "The data usage could not be read" msgstr "Dataförbrukningen kunde inte läsas" diff --git a/openwrt/luci-app-mu300/po/tr/mu300.po b/openwrt/luci-app-mu300/po/tr/mu300.po index 18bc5cdb..555cf309 100644 --- a/openwrt/luci-app-mu300/po/tr/mu300.po +++ b/openwrt/luci-app-mu300/po/tr/mu300.po @@ -42,9 +42,18 @@ msgstr "Güç" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Terminal ayarları" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300 kontrol merkezi: durum paneli, ağ kilitleri, AT terminali ve SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: tarayıcıda cihazın root kabuğu" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Eksik: %d / %d parça ulaştı" msgid "Delete" msgstr "Sil" +msgid "ttyd is not installed." +msgstr "ttyd kurulu değil." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminal kapalı (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Aynı anda çok fazla terminal açılıyor. Bir dakika sonra yeniden deneyin." + +msgid "The terminal is not available." +msgstr "Terminal kullanılamıyor." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Bu, cihazın root kabuğudur: her komut tam yetkiyle çalışır ve bir hata cihazı açılamaz hale getirebilir." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Yalnızca LAN'dan (USB ve hotspot) ve yalnızca oturum açılmış bu sayfadan erişilebilir; mobil veriden asla erişilemez." + +msgid "It closes after %d minutes without activity." +msgstr "%d dakika işlem yapılmazsa kapanır." + +msgid "Reconnect" +msgstr "Yeniden bağlan" + +msgid "Open in a new tab" +msgstr "Yeni sekmede aç" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Bu sayfa HTTPS ile açıldı, terminal ise LAN'da HTTP ile sunuluyor: bu yüzden kendi sekmesinde açılır." + msgid "The data usage could not be read" msgstr "Veri kullanımı okunamadı" diff --git a/openwrt/luci-app-mu300/po/uk/mu300.po b/openwrt/luci-app-mu300/po/uk/mu300.po index 6fe01a0f..d76cf564 100644 --- a/openwrt/luci-app-mu300/po/uk/mu300.po +++ b/openwrt/luci-app-mu300/po/uk/mu300.po @@ -42,9 +42,18 @@ msgstr "Живлення" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Термінал" + +msgid "Terminal settings" +msgstr "Налаштування термінала" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Центр керування MU300: панель стану, фіксація мережі, AT-термінал і SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Термінал: оболонка root на пристрої в браузері" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Неповне: отримано частин %d з %d" msgid "Delete" msgstr "Видалити" +msgid "ttyd is not installed." +msgstr "ttyd не встановлено." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Термінал вимкнено (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Забагато терміналів відкривається одночасно. Спробуйте ще раз за хвилину." + +msgid "The terminal is not available." +msgstr "Термінал недоступний." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Це оболонка root на пристрої: кожна команда виконується з повними правами, і помилка може зробити пристрій незавантажуваним." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Він доступний лише з LAN (USB і точка доступу), ніколи з мобільних даних, і лише з цієї сторінки після входу." + +msgid "It closes after %d minutes without activity." +msgstr "Він закривається після %d хвилин бездіяльності." + +msgid "Reconnect" +msgstr "Перепідключитися" + +msgid "Open in a new tab" +msgstr "Відкрити в новій вкладці" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Цю сторінку відкрито через HTTPS, а термінал працює в LAN через HTTP: він відкривається в окремій вкладці." + msgid "The data usage could not be read" msgstr "Не вдалося прочитати використання даних" diff --git a/openwrt/luci-app-mu300/po/vi/mu300.po b/openwrt/luci-app-mu300/po/vi/mu300.po index a2fb0937..b7753fe3 100644 --- a/openwrt/luci-app-mu300/po/vi/mu300.po +++ b/openwrt/luci-app-mu300/po/vi/mu300.po @@ -42,9 +42,18 @@ msgstr "Nguồn" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "Terminal" + +msgid "Terminal settings" +msgstr "Cài đặt terminal" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "Trung tâm điều khiển MU300: bảng trạng thái, khóa mạng, terminal AT và SMS" +msgid "Terminal: a root shell on the device in the browser" +msgstr "Terminal: shell root của thiết bị trong trình duyệt" + msgid "China Mobile" msgstr "China Mobile" @@ -1431,6 +1440,36 @@ msgstr "Không đầy đủ: đã nhận %d / %d phần" msgid "Delete" msgstr "Xóa" +msgid "ttyd is not installed." +msgstr "ttyd chưa được cài đặt." + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "Terminal đang tắt (/etc/config/ttyd)." + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "Có quá nhiều terminal đang mở cùng lúc. Hãy thử lại sau một phút." + +msgid "The terminal is not available." +msgstr "Terminal không khả dụng." + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "Đây là shell root của thiết bị: mọi lệnh chạy với toàn quyền, và một sai sót có thể khiến thiết bị không khởi động được." + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "Chỉ truy cập được từ LAN (USB và điểm phát sóng), không bao giờ từ dữ liệu di động, và chỉ từ trang đã đăng nhập này." + +msgid "It closes after %d minutes without activity." +msgstr "Tự đóng sau %d phút không hoạt động." + +msgid "Reconnect" +msgstr "Kết nối lại" + +msgid "Open in a new tab" +msgstr "Mở trong thẻ mới" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "Trang này được mở qua HTTPS, còn terminal được phục vụ qua HTTP trong LAN: nó mở trong một thẻ riêng." + msgid "The data usage could not be read" msgstr "Không đọc được lưu lượng dữ liệu" diff --git a/openwrt/luci-app-mu300/po/zh_Hans/mu300.po b/openwrt/luci-app-mu300/po/zh_Hans/mu300.po index da90eebe..0fd24242 100644 --- a/openwrt/luci-app-mu300/po/zh_Hans/mu300.po +++ b/openwrt/luci-app-mu300/po/zh_Hans/mu300.po @@ -42,9 +42,18 @@ msgstr "电源" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "终端" + +msgid "Terminal settings" +msgstr "终端设置" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300 控制中心:状态看板、网络锁定、AT 终端与短信" +msgid "Terminal: a root shell on the device in the browser" +msgstr "终端:在浏览器中使用设备的 root shell" + msgid "China Mobile" msgstr "中国移动" @@ -1431,6 +1440,36 @@ msgstr "不完整:收到 %d / %d 个分段" msgid "Delete" msgstr "删除" +msgid "ttyd is not installed." +msgstr "未安装 ttyd。" + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "终端已关闭(/etc/config/ttyd)。" + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "同时打开的终端过多,请一分钟后重试。" + +msgid "The terminal is not available." +msgstr "终端不可用。" + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "这是设备上的 root shell:每条命令都以完全权限运行,一个错误就可能导致设备无法启动。" + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "只能从局域网(USB 和热点)并且只能从这个已登录的页面访问,移动数据一侧永远无法访问。" + +msgid "It closes after %d minutes without activity." +msgstr "无操作 %d 分钟后自动关闭。" + +msgid "Reconnect" +msgstr "重新连接" + +msgid "Open in a new tab" +msgstr "在新标签页中打开" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "此页面通过 HTTPS 打开,而终端在局域网上通过 HTTP 提供,因此会在单独的标签页中打开。" + msgid "The data usage could not be read" msgstr "无法读取流量统计" diff --git a/openwrt/luci-app-mu300/po/zh_Hant/mu300.po b/openwrt/luci-app-mu300/po/zh_Hant/mu300.po index cda75a6b..64fde0de 100644 --- a/openwrt/luci-app-mu300/po/zh_Hant/mu300.po +++ b/openwrt/luci-app-mu300/po/zh_Hant/mu300.po @@ -42,9 +42,18 @@ msgstr "電源" msgid "CPU" msgstr "CPU" +msgid "Terminal" +msgstr "終端機" + +msgid "Terminal settings" +msgstr "終端機設定" + msgid "MU300 control center: status dashboard, network locks, AT terminal and SMS" msgstr "MU300 控制中心:狀態儀表板、網路鎖定、AT 終端機與簡訊" +msgid "Terminal: a root shell on the device in the browser" +msgstr "終端機:在瀏覽器中使用裝置的 root shell" + msgid "China Mobile" msgstr "中國移動" @@ -1431,6 +1440,36 @@ msgstr "不完整:收到 %d / %d 個分段" msgid "Delete" msgstr "刪除" +msgid "ttyd is not installed." +msgstr "未安裝 ttyd。" + +msgid "The terminal is turned off (/etc/config/ttyd)." +msgstr "終端機已關閉(/etc/config/ttyd)。" + +msgid "Too many terminals are opening at once. Try again in a minute." +msgstr "同時開啟的終端機過多,請一分鐘後重試。" + +msgid "The terminal is not available." +msgstr "終端機無法使用。" + +msgid "This is a root shell on the device: every command runs with full rights, and a mistake can make the device unbootable." +msgstr "這是裝置上的 root shell:每個指令都以完整權限執行,一個錯誤就可能讓裝置無法開機。" + +msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." +msgstr "只能從區域網路(USB 和熱點)並且只能從這個已登入的頁面存取,行動數據一側永遠無法存取。" + +msgid "It closes after %d minutes without activity." +msgstr "無操作 %d 分鐘後自動關閉。" + +msgid "Reconnect" +msgstr "重新連線" + +msgid "Open in a new tab" +msgstr "在新分頁中開啟" + +msgid "This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own." +msgstr "此頁面透過 HTTPS 開啟,而終端機在區域網路上透過 HTTP 提供,因此會在單獨的分頁中開啟。" + msgid "The data usage could not be read" msgstr "無法讀取流量統計" diff --git a/openwrt/luci-app-mu300/root/etc/hotplug.d/iface/95-mu300-terminal b/openwrt/luci-app-mu300/root/etc/hotplug.d/iface/95-mu300-terminal new file mode 100755 index 00000000..8d29e8db --- /dev/null +++ b/openwrt/luci-app-mu300/root/etc/hotplug.d/iface/95-mu300-terminal @@ -0,0 +1,6 @@ +#!/bin/sh +# ttyd listens on the LAN bridge's own address only (/etc/config/ttyd: interface @lan) and looks it up once, when it +# starts: a LAN that came up after it, or a changed LAN address, left System > Terminal without a listener. +[ "$ACTION" = ifup ] && [ "$INTERFACE" = lan ] || exit 0 +[ -x /etc/init.d/ttyd ] && /etc/init.d/ttyd enabled || exit 0 +/etc/init.d/ttyd restart diff --git a/openwrt/luci-app-mu300/root/usr/libexec/mu300-terminal-login b/openwrt/luci-app-mu300/root/usr/libexec/mu300-terminal-login new file mode 100755 index 00000000..f882af8b --- /dev/null +++ b/openwrt/luci-app-mu300/root/usr/libexec/mu300-terminal-login @@ -0,0 +1,63 @@ +#!/bin/sh +# mu300-terminal-login -- the command ttyd runs for each browser that opens System > Terminal (/etc/config/ttyd). +# +# A root shell, for a token the panel issued and nothing else: the page asks rpcd's mu300term for a token (only a +# LuCI session with the luci-app-mu300-terminal ACL may), and loads ttyd with ?arg=; ttyd -a hands the URL's +# arg values over as this script's arguments. The token is a 32-hex file in the runtime directory, valid for TTL +# seconds and for one connection: it is renamed away (atomic, so two connections never both win) before the shell +# starts. Anything else (no token, an old, used or forged one, more arguments) gets a message and no shell: ttyd +# never asks for a password, so it adds no new place to guess the root password. +# +# The shell is closed after IDLE seconds without terminal output or input (uci ttyd.mu300.idle, default 900, 0 = off): +# a watchdog compares the pseudo-terminal's modification time, which the kernel updates (every 8 s at most) whenever +# the shell or a program writes to it, typed characters' echo included. OpenWrt's ash has no TMOUT. +DIR=${MU300_TERM_DIR:-/var/run/mu300-terminal} +TTL=${MU300_TERM_TTL:-60} +LOGIN=${MU300_TERM_LOGIN:-/bin/login} + +deny() { + printf '\r\n%s\r\n' "$1" + # the message reaches the browser before ttyd sees the command end and closes the terminal + sleep "${MU300_TERM_DENY_WAIT:-3}" + exit 1 +} +EXPIRED='This terminal link has expired or was already used. Open System > Terminal in the control panel again.' + +[ $# -eq 1 ] || deny "$EXPIRED" +tok=$1 +case $tok in *[!0-9a-f]*|'') deny "$EXPIRED" ;; esac +[ ${#tok} -eq 32 ] || deny "$EXPIRED" +# root's own directory (rpcd mu300term makes it 0700): one someone else made or a link is not trusted +[ -d "$DIR" ] && [ ! -L "$DIR" ] && [ -O "$DIR" ] || deny "$EXPIRED" +mv "$DIR/$tok" "$DIR/$tok.used" 2>/dev/null || deny "$EXPIRED" +issued=$(date -r "$DIR/$tok.used" +%s 2>/dev/null) || issued=0 +rm -f "$DIR/$tok.used" +age=$(( $(date +%s) - issued )) +[ "$age" -ge 0 ] && [ "$age" -le "$TTL" ] || deny "$EXPIRED" + +IDLE=${MU300_TERM_IDLE:-$(uci -q get ttyd.mu300.idle 2>/dev/null)} +case $IDLE in ''|*[!0-9]*) IDLE=900 ;; esac +tty=$(readlink /proc/$$/fd/0 2>/dev/null) || tty= +case $tty in /dev/pts/[0-9]*) ;; *) tty= ;; esac +if [ "$IDLE" -gt 0 ] && [ -n "$tty" ]; then + pid=$$ + # this process's start time (field 22 of /proc/PID/stat, after the command name in parentheses): exec keeps it, + # and the watchdog stops as soon as PID is another process + st=$(sed 's/^.*) //' /proc/$pid/stat | cut -d' ' -f20) + ( + trap '' HUP + while sleep "${MU300_TERM_TICK:-30}"; do + [ "$(sed 's/^.*) //' /proc/$pid/stat 2>/dev/null | cut -d' ' -f20)" = "$st" ] || exit 0 + last=$(date -r "$tty" +%s 2>/dev/null) || exit 0 + if [ $(( $(date +%s) - last )) -ge "$IDLE" ]; then + printf '\r\n%s\r\n' "Closed after $((IDLE / 60)) minutes without activity." >"$tty" 2>/dev/null + kill -HUP "$pid" 2>/dev/null + sleep 2 + [ "$(sed 's/^.*) //' /proc/$pid/stat 2>/dev/null | cut -d' ' -f20)" = "$st" ] && kill -KILL "$pid" 2>/dev/null + exit 0 + fi + done + ) /dev/null 2>&1 & +fi +# login -f: root, already authenticated (by the token); a login shell as on the console (HOME, /etc/profile) +exec "$LOGIN" -f root diff --git a/openwrt/luci-app-mu300/root/usr/libexec/rpcd/mu300term b/openwrt/luci-app-mu300/root/usr/libexec/rpcd/mu300term new file mode 100755 index 00000000..97416b6f --- /dev/null +++ b/openwrt/luci-app-mu300/root/usr/libexec/rpcd/mu300term @@ -0,0 +1,62 @@ +#!/bin/sh +# mu300term -- the RPC object of System > Terminal (luci-app-mu300, view mu300/terminal). +# +# ubus call mu300term token (rpcd runs this script as: mu300term call token) +# +# token: a one-time token for the terminal, and where ttyd listens. The page loads ttyd with ?arg=, and ttyd's +# command, /usr/libexec/mu300-terminal-login, gives a root shell for a token from here and nothing else (one +# connection, TTL seconds). Only a LuCI session with the luci-app-mu300-terminal ACL may call it (rpcd checks the +# ACL before this script runs; root's own login has every group). No parameters: nothing from the browser is read. +# Reply: {"ok":1,"token":"<32 hex>","port":7681,"lan":"192.168.x.1","ttl":60,"idle":900}. Otherwise +# {"ok":0,"code":"..."}, a fixed code the page words itself: missing (no ttyd), off (the image's ttyd instance, lan, +# is off or gone), busy (16 tokens wait already), internal. +DIR=${MU300_TERM_DIR:-/var/run/mu300-terminal} +TTL=${MU300_TERM_TTL:-60} +TTYD=${MU300_TTYD:-/usr/bin/ttyd} + +fail() { printf '{"ok":0,"code":"%s"}\n' "$1"; exit 0; } + +token() { + [ -x "$TTYD" ] || fail missing + # the ttyd section the image sets up (/etc/config/ttyd) + [ "$(uci -q get ttyd.lan)" = ttyd ] && [ "$(uci -q get ttyd.lan.enable)" != 0 ] || fail off + [ "$(uci -q get ttyd.lan.command)" = /usr/libexec/mu300-terminal-login ] || fail off + port=$(uci -q get ttyd.lan.port) + case $port in ''|*[!0-9]*) port=7681 ;; esac + umask 077 + # root's directory: one someone else made, or a link, is replaced + if [ -L "$DIR" ] || { [ -e "$DIR" ] && [ ! -O "$DIR" ]; }; then rm -rf "$DIR"; fi + mkdir -p "$DIR" && chmod 0700 "$DIR" || fail internal + # the old tokens go (a page that never connected), and never more than 16 wait + now=$(date +%s) + for f in "$DIR"/*; do + [ -f "$f" ] || continue + t=$(date -r "$f" +%s 2>/dev/null) || t=0 + [ $((now - t)) -gt "$TTL" ] && rm -f "$f" + done + [ "$(ls "$DIR" | wc -l)" -lt 16 ] || fail busy + tok=$(hexdump -n 16 -e '16/1 "%02x"' /dev/urandom 2>/dev/null) + case $tok in *[!0-9a-f]*|'') fail internal ;; esac + [ ${#tok} -eq 32 ] || fail internal + : >"$DIR/$tok" || fail internal + lan= + if [ -f "${MU300_NETWORK_SH:-/lib/functions/network.sh}" ]; then + . "${MU300_NETWORK_SH:-/lib/functions/network.sh}" + network_get_ipaddr lan lan 2>/dev/null || lan= + fi + case $lan in *[!0-9.]*) lan= ;; esac + # the idle limit mu300-terminal-login applies (seconds, 0: none) + idle=$(uci -q get ttyd.mu300.idle) + case $idle in ''|*[!0-9]*) idle=900 ;; esac + printf '{"ok":1,"token":"%s","port":%s,"lan":"%s","ttl":%s,"idle":%s}\n' "$tok" "$port" "$lan" "$TTL" "$idle" +} + +case $1 in +list) echo '{"token":{}}' ;; +call) + case $2 in + token) token ;; + *) fail internal ;; + esac + ;; +esac diff --git a/openwrt/luci-app-mu300/root/usr/share/luci/menu.d/luci-app-mu300.json b/openwrt/luci-app-mu300/root/usr/share/luci/menu.d/luci-app-mu300.json index 8f512fdf..b136e534 100644 --- a/openwrt/luci-app-mu300/root/usr/share/luci/menu.d/luci-app-mu300.json +++ b/openwrt/luci-app-mu300/root/usr/share/luci/menu.d/luci-app-mu300.json @@ -111,5 +111,23 @@ "order": 17, "action": { "type": "view", "path": "mu300/cpu" }, "depends": { "acl": [ "luci-app-mu300" ] } + }, + "admin/system/terminal": { + "title": "Terminal", + "order": 18, + "action": { "type": "firstchild" }, + "depends": { "acl": [ "luci-app-mu300-terminal" ] } + }, + "admin/system/terminal/shell": { + "title": "Terminal", + "order": 1, + "action": { "type": "view", "path": "mu300/terminal" }, + "depends": { "acl": [ "luci-app-mu300-terminal" ] } + }, + "admin/system/terminal/config": { + "title": "Terminal settings", + "order": 2, + "action": { "type": "view", "path": "ttyd/config" }, + "depends": { "acl": [ "luci-app-ttyd" ], "uci": { "ttyd": true } } } } diff --git a/openwrt/luci-app-mu300/root/usr/share/rpcd/acl.d/luci-app-mu300.json b/openwrt/luci-app-mu300/root/usr/share/rpcd/acl.d/luci-app-mu300.json index 44e00379..4e956e74 100644 --- a/openwrt/luci-app-mu300/root/usr/share/rpcd/acl.d/luci-app-mu300.json +++ b/openwrt/luci-app-mu300/root/usr/share/rpcd/acl.d/luci-app-mu300.json @@ -22,5 +22,16 @@ "/tmp/mu300-extra-lang.tar.gz": [ "write" ] } } + }, + "luci-app-mu300-terminal": { + "description": "Terminal: a root shell on the device in the browser", + "read": { + "uci": [ "ttyd" ] + }, + "write": { + "ubus": { + "mu300term": [ "token" ] + } + } } } diff --git a/openwrt/luci-overlay/etc/config/ttyd b/openwrt/luci-overlay/etc/config/ttyd new file mode 100644 index 00000000..d5ed145f --- /dev/null +++ b/openwrt/luci-overlay/etc/config/ttyd @@ -0,0 +1,23 @@ +# System > Terminal (luci-app-mu300's mu300/terminal page): ttyd, hardened. The ttyd package's own default is +# /bin/login on the LAN without an origin check. +# - interface '@lan': the LAN bridge's IPv4 address only (no IPv6, no 0.0.0.0): never on sipa_eth0 or a Wi-Fi +# uplink, and fw4's wan zone rejects input there anyway (no rule in this image opens 7681) +# - command: mu300-terminal-login, a root shell only for a one-time token the panel hands to a logged-in LuCI +# session (rpcd mu300term, ACL luci-app-mu300-terminal); url_arg passes that token (?arg=). No password prompt. +# - check_origin: a page on another site cannot open the terminal's websocket in the user's browser +# - HTTP only, like the panel's default: ttyd over TLS fails in Chrome (libwebsockets offers HTTP/2, and its +# websocket over HTTP/2 ends in ERR_HTTP2_PROTOCOL_ERROR), so a panel opened over https opens the terminal in a +# tab of its own +# - mu300.idle: the shell is closed after that many seconds without activity (0: never) +config ttyd 'lan' + option enable '1' + option interface '@lan' + option port '7681' + option command '/usr/libexec/mu300-terminal-login' + option url_arg '1' + option check_origin '1' + option max_clients '4' + option debug '3' + +config terminal 'mu300' + option idle '900' diff --git a/tests/README.md b/tests/README.md index 8ac7a269..e53f3f1e 100644 --- a/tests/README.md +++ b/tests/README.md @@ -35,6 +35,7 @@ macOS and Windows (`.github/workflows/tests.yml`). | `test_ttl.py` | `mu300-ttl` with fake `uci`/`fw4`/`tc`/`modprobe`: the nft backend (no `act_pedit`) turns OpenWrt's flow offloading off while a TTL is set (also at boot), back on after `off`, untouched without fw4 (Ubuntu); the tc backend (`TtlTc`) puts matchall/pedit filters on every sipa_eth*, idempotently, leaves offloading alone, falls back to nft when tc fails, and `off` removes both | | `test_luci_i18n.py` | the control panel's catalogs: every `po/` complete and in the language table, CJK only in catalogs; the pages (the Languages page too) under Node | | `test_po2lmo.py` | `tools/po2lmo.py` against catalogs LuCI's own po2lmo produced (`tests/fixtures/po2lmo`) | +| `test_terminal.py` | System > Terminal on `openwrt-luci` (ttyd): `mu300term`'s one-time token (a 0600 file in a 0700 directory, at most 16, refused when ttyd runs another command), `mu300-terminal-login` (a root login for a token once and within its minute, every other argument refused), the image's ttyd config (the LAN address, origin check, no port of it opened on the cellular side, wan input never accepted), the ACL, the menu and the build | | `test_mu300dash_security.py` | the panel's rpcd backend `mu300dash` and its adapters (S1): every parameter checked against an allow-list, untrusted text only as one exact argument or on stdin, every reply JSON, the shared escaper, the ACL | | `test_sms_pool.py` | the SMS pool (K69, D11): `mu300-sms` and `mu300-smsd` keep the SIM's and the panel's messages in `/etc/mu300/sms-pool`, through a stub `mu300-at`; the panel side runs on the real `mu300-sms` | | `test_usb_management.py` | the panel's USB management (`device-usb`, K7, K8, D12): role switch, host mode, NIC reattachment, the USB network mode file `boot/init` applies on the next boot | diff --git a/tests/test_luci_i18n.py b/tests/test_luci_i18n.py index cf37c074..9c658c3f 100644 --- a/tests/test_luci_i18n.py +++ b/tests/test_luci_i18n.py @@ -411,7 +411,7 @@ if (selected !== true) throw Error('the Bootstrap token bridge must survive the VIEWS = APP / 'htdocs/luci-static/resources/view/mu300' -VIEW_NAMES = ('home', 'locks', 'sms', 'at', 'settings', 'device', 'languages', 'ttl', 'traffic') +VIEW_NAMES = ('home', 'locks', 'sms', 'at', 'settings', 'device', 'languages', 'ttl', 'traffic', 'terminal') CJK_RE = re.compile('[\u2e80-\u9fff\uf900-\ufaff\uff00-\uffef]') @@ -819,6 +819,42 @@ rpcReply = { ok: 0, error: 'Invalid value for this setting' }; await V.set(null, rpcReply = { ok: 1 }; await V.set(null, 'warn', '80'); await flush(); return notes();''' + # System > Terminal: a token framed over HTTP, a tab of its own over HTTPS, and each refusal code + TERMINAL = ''' +window.location.protocol = 'http:'; window.location.hostname = '192.168.77.1'; +const tok = { ok: 1, token: '0123456789abcdef0123456789abcdef', port: 7681, lan: '192.168.77.1', ttl: 60, idle: 900 }; +V.render(tok); +window.location.protocol = 'https:'; V.paint(tok); +[ 'missing', 'off', 'busy', 'internal' ].forEach((c) => V.paint({ ok: 0, code: c })); +return notes();''' + + def test_terminal_url_comes_from_the_token_only(self): + body = ''' +const tok = { ok: 1, token: '0123456789abcdef0123456789abcdef', port: 7681, lan: '192.168.77.1' }; +const at = (host) => { window.location.hostname = host; return V.target(tok); }; +return [ at('192.168.77.1'), at('mu300.lan'), at('[fd00::1]'), at('fd00::1'), + V.target(Object.assign({}, tok, { token: '../x' })), V.target(Object.assign({}, tok, { port: 'x' })), + V.target({ ok: 0, code: 'off' }), V.target(Object.assign({}, tok, { lan: '' })) && at('[fd00::1]') ];''' + r = self.run_view('terminal', None, body)['result'] + self.assertEqual(r[:4], ['http://192.168.77.1:7681/?arg=0123456789abcdef0123456789abcdef', + 'http://mu300.lan:7681/?arg=0123456789abcdef0123456789abcdef', + 'http://192.168.77.1:7681/?arg=0123456789abcdef0123456789abcdef', + 'http://192.168.77.1:7681/?arg=0123456789abcdef0123456789abcdef']) + self.assertEqual(r[4:7], [None, None, None]) + + def test_terminal_page_messages(self): + for lang in (None, 'tr', 'zh_Hans'): + with self.subTest(lang=lang): + out = self.run_view('terminal', lang, self.TERMINAL) + for m in ('Terminal', 'It closes after %d minutes without activity.', 'Reconnect', 'Open in a new tab', + 'This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own.', + 'ttyd is not installed.', 'The terminal is turned off (/etc/config/ttyd).', + 'Too many terminals are opening at once. Try again in a minute.', + 'The terminal is not available.'): + self.assertIn(m, out['used']) + if lang: + self.assertLessEqual(set(out['used']), set(catalog(lang))) + def test_traffic_page_messages(self): for lang, want in ((None, ['Failed: Invalid value for this setting', 'Saved']), ('tr', ['Başarısız: Bu ayar için geçersiz değer', 'Kaydedildi'])): diff --git a/tests/test_terminal.py b/tests/test_terminal.py new file mode 100644 index 00000000..2a23f17a --- /dev/null +++ b/tests/test_terminal.py @@ -0,0 +1,302 @@ +"""System > Terminal on openwrt-luci (ttyd): the one-time token of rpcd's mu300term, ttyd's command +mu300-terminal-login (a root shell for such a token and nothing else), the image's ttyd configuration (the LAN +address only, never a port on the cellular side), the ACL, the menu and the build.""" +import json +import os +import re +import time +import unittest +from pathlib import Path + +from helpers import TOP, ShellTest + +APP = TOP / 'openwrt' / 'luci-app-mu300' +LOGIN = APP / 'root' / 'usr' / 'libexec' / 'mu300-terminal-login' +RPC = APP / 'root' / 'usr' / 'libexec' / 'rpcd' / 'mu300term' +HOTPLUG = APP / 'root' / 'etc' / 'hotplug.d' / 'iface' / '95-mu300-terminal' +TTYD_CONF = TOP / 'openwrt' / 'luci-overlay' / 'etc' / 'config' / 'ttyd' +BUILD = TOP / 'openwrt' / 'build-rootfs.sh' +ACL = APP / 'root' / 'usr' / 'share' / 'rpcd' / 'acl.d' / 'luci-app-mu300.json' +MENU = APP / 'root' / 'usr' / 'share' / 'luci' / 'menu.d' / 'luci-app-mu300.json' + +# a uci that answers "uci -q get KEY" from $UCI_DB (KEY=VALUE lines), as OpenWrt's does for the ttyd config +UCI = r''' +[ "$1" = -q ] && shift +[ "$1" = get ] || exit 1 +v=$(sed -n "s/^$2=//p" "$UCI_DB" | head -n1) +[ -n "$v" ] || exit 1 +printf '%s\n' "$v" +''' +IMAGE_UCI = '''ttyd.lan=ttyd +ttyd.lan.enable=1 +ttyd.lan.port=7681 +ttyd.lan.command=/usr/libexec/mu300-terminal-login +ttyd.mu300=terminal +ttyd.mu300.idle=900 +''' + + +def uci_config(text): + """{section: (type, {option: value or [list]})} of a uci config file""" + out, cur = {}, None + for line in text.splitlines(): + line = line.strip() + if not line or line.startswith('#'): + continue + m = re.match(r"config (\S+)(?: '([^']*)')?$", line) + if m: + cur = m.group(2) or f'@{len(out)}' + out[cur] = (m.group(1), {}) + continue + m = re.match(r"(option|list) (\S+) '([^']*)'$", line) + assert m and cur, line + if m.group(1) == 'list': + out[cur][1].setdefault(m.group(2), []).append(m.group(3)) + else: + out[cur][1][m.group(2)] = m.group(3) + return out + + +class Token(ShellTest): + """rpcd mu300term token: a 32-hex one-time token file, 0600 in a 0700 directory, or a fixed code""" + + def setUp(self): + super().setUp() + self.stub('uci', UCI) + self.db = self.tmp / 'uci' + self.db.write_text(IMAGE_UCI) + self.ttyd = self.tmp / 'ttyd' + self.ttyd.write_text('#!/bin/sh\n') + self.ttyd.chmod(0o755) + self.dir = self.tmp / 'run' / 'mu300-terminal' + net = self.tmp / 'network.sh' + net.write_text('network_get_ipaddr() { eval "$1=192.168.77.1"; }\n') + self.base = dict(UCI_DB=self.db, MU300_TTYD=self.ttyd, MU300_TERM_DIR=self.dir, MU300_NETWORK_SH=net) + + def call(self, shell, **env): + r = self.script(shell, RPC, 'call', 'token', stdin='{}', **{**self.base, **env}) + self.assertEqual(r.returncode, 0, r.stderr) + return json.loads(r.stdout) + + def test_list(self): + for s in self.each_shell(): + r = self.script(s, RPC, 'list', **self.base) + self.assertEqual(json.loads(r.stdout), {'token': {}}) + + def test_token_is_a_private_file(self): + for s in self.each_shell(): + r = self.call(s) + self.assertEqual(r['ok'], 1) + self.assertRegex(r['token'], r'^[0-9a-f]{32}$') + self.assertEqual((r['port'], r['lan'], r['ttl'], r['idle']), (7681, '192.168.77.1', 60, 900)) + f = self.dir / r['token'] + self.assertTrue(f.is_file()) + self.assertEqual(f.stat().st_mode & 0o777, 0o600) + self.assertEqual(self.dir.stat().st_mode & 0o777, 0o700) + # a second call is another token + self.assertNotEqual(self.call(s)['token'], r['token']) + + def test_codes(self): + for s in self.each_shell(): + self.assertEqual(self.call(s, MU300_TTYD=self.tmp / 'none'), {'ok': 0, 'code': 'missing'}) + self.db.write_text(IMAGE_UCI.replace('ttyd.lan.enable=1', 'ttyd.lan.enable=0')) + self.assertEqual(self.call(s), {'ok': 0, 'code': 'off'}) + # an instance that runs another command (/bin/login, a shell) gets no token: the token opens nothing there + self.db.write_text(IMAGE_UCI.replace('/usr/libexec/mu300-terminal-login', '/bin/login')) + self.assertEqual(self.call(s), {'ok': 0, 'code': 'off'}) + self.db.write_text('') + self.assertEqual(self.call(s), {'ok': 0, 'code': 'off'}) + self.db.write_text(IMAGE_UCI) + + def test_old_tokens_go_and_at_most_16_wait(self): + for s in self.each_shell(): + self.dir.mkdir(parents=True, exist_ok=True) + for f in self.dir.iterdir(): + f.unlink() + old = self.dir / ('a' * 32) + old.write_text('') + os.utime(old, (time.time() - 3600, time.time() - 3600)) + toks = [self.call(s) for _ in range(17)] + self.assertFalse(old.exists()) + self.assertEqual([t['ok'] for t in toks], [1] * 16 + [0]) + self.assertEqual(toks[-1], {'ok': 0, 'code': 'busy'}) + + def test_foreign_directory_or_link_is_replaced(self): + for s in self.each_shell(): + target = self.tmp / 'elsewhere' + target.mkdir(exist_ok=True) + self.dir.parent.mkdir(parents=True, exist_ok=True) + if self.dir.exists() or self.dir.is_symlink(): + if self.dir.is_symlink(): + self.dir.unlink() + else: + for f in self.dir.iterdir(): + f.unlink() + self.dir.rmdir() + self.dir.symlink_to(target) + r = self.call(s) + self.assertEqual(r['ok'], 1) + self.assertFalse(self.dir.is_symlink()) + self.assertEqual(list(target.iterdir()), []) + + def test_unknown_method(self): + for s in self.each_shell(): + r = self.script(s, RPC, 'call', 'shell', stdin='{"cmd":"id"}', **self.base) + self.assertEqual(json.loads(r.stdout), {'ok': 0, 'code': 'internal'}) + + +class Login(ShellTest): + """mu300-terminal-login: a token from mu300term once, within its TTL, else a message and no shell""" + + def setUp(self): + super().setUp() + self.stub('uci', UCI) + self.db = self.tmp / 'uci' + self.db.write_text(IMAGE_UCI) + self.dir = self.tmp / 'run' + self.dir.mkdir(mode=0o700) + self.login = self.tmp / 'login' + self.login.write_text('#!/bin/sh\necho "LOGIN $*"\n') + self.login.chmod(0o755) + self.base = dict(UCI_DB=self.db, MU300_TERM_DIR=self.dir, MU300_TERM_LOGIN=self.login, MU300_TERM_DENY_WAIT=0, + MU300_TERM_IDLE=0) + + def token(self, age=0): + tok = os.urandom(16).hex() + f = self.dir / tok + f.write_text('') + if age: + os.utime(f, (time.time() - age, time.time() - age)) + return tok + + def run_login(self, shell, *args, **env): + return self.script(shell, LOGIN, *args, **{**self.base, **env}) + + def test_a_token_opens_a_root_login_once(self): + for s in self.each_shell(): + tok = self.token() + r = self.run_login(s, tok) + self.assertEqual(r.stdout.strip(), 'LOGIN -f root') + self.assertEqual(list(self.dir.iterdir()), []) + again = self.run_login(s, tok) + self.assertEqual(again.returncode, 1) + self.assertIn('expired or was already used', again.stdout) + self.assertNotIn('LOGIN', again.stdout) + + def test_everything_else_is_refused(self): + for s in self.each_shell(): + tok = self.token() + for args in [(), ('0' * 32,), (tok.upper(),), (tok[:31],), (tok + '0',), (tok, tok), ('../' + tok,), + ('-f',), ("$(id)",)]: + with self.subTest(args=args): + r = self.run_login(s, *args) + self.assertEqual(r.returncode, 1) + self.assertNotIn('LOGIN', r.stdout) + # the token those refusals did not use still works + self.assertIn('LOGIN -f root', self.run_login(s, tok).stdout) + + def test_an_old_token_is_refused_and_removed(self): + for s in self.each_shell(): + tok = self.token(age=120) + r = self.run_login(s, tok) + self.assertEqual(r.returncode, 1) + self.assertNotIn('LOGIN', r.stdout) + self.assertEqual(list(self.dir.iterdir()), []) + + def test_a_directory_that_is_a_link_is_not_trusted(self): + for s in self.each_shell(): + tok = self.token() + link = self.tmp / 'link' + if not link.is_symlink(): + link.symlink_to(self.dir) + r = self.run_login(s, tok, MU300_TERM_DIR=link) + self.assertNotIn('LOGIN', r.stdout) + (self.dir / tok).unlink() + + +class Image(unittest.TestCase): + """the image's ttyd: on the LAN address only, the token command, origin check; no port on the cellular side""" + + def test_ttyd_config(self): + conf = uci_config(TTYD_CONF.read_text()) + ttyd = {n: o for n, (t, o) in conf.items() if t == 'ttyd'} + self.assertEqual(set(ttyd), {'lan'}) + o = ttyd['lan'] + self.assertEqual(o['interface'], '@lan') + self.assertEqual(o['command'], '/usr/libexec/mu300-terminal-login') + self.assertEqual((o['url_arg'], o['check_origin'], o['enable']), ('1', '1', '1')) + self.assertEqual(o['port'], '7681') + self.assertNotIn('ipv6', o) + self.assertNotIn('credential', o) + self.assertNotIn('readonly', o) + self.assertEqual(conf['mu300'], ('terminal', {'idle': '900'})) + + def test_no_port_of_the_terminal_on_the_cellular_side(self): + # nothing the OpenWrt images carry opens the terminal's port in the firewall, or puts ttyd on wan + for d in ('overlay', 'luci-overlay', 'luci-app-mu300'): + for p in (TOP / 'openwrt' / d).rglob('*'): + if not p.is_file() or p.suffix in ('.po', '.md'): + continue + text = p.read_text(errors='replace') + with self.subTest(p=str(p.relative_to(TOP))): + self.assertNotRegex(text, r"(dest_port|src_dport|dport)\D{0,8}768[12]") + self.assertNotRegex(text, r"firewall\.[^\n]*768[12]") + self.assertNotRegex(text, r"ttyd\.[^\n]*interface=.?@?wan") + # the wan zone keeps OpenWrt's input REJECT: no default the images set opens it + for p in list((TOP / 'openwrt' / 'overlay' / 'etc' / 'uci-defaults').iterdir()) + \ + list((TOP / 'openwrt' / 'luci-overlay' / 'etc' / 'uci-defaults').iterdir()): + text = p.read_text() + with self.subTest(p=p.name): + self.assertNotRegex(text, r"\$zone\.input='?ACCEPT") + for m in re.finditer(r"name='wan'.*?(?:\n\n|$)", text, re.S): + self.assertNotIn("input='ACCEPT'", m.group(0)) + + def test_hotplug_restarts_ttyd_when_the_lan_comes_up(self): + text = HOTPLUG.read_text() + self.assertIn('[ "$ACTION" = ifup ] && [ "$INTERFACE" = lan ] || exit 0', text) + self.assertIn('/etc/init.d/ttyd restart', text) + + def test_build_installs_and_configures_ttyd_for_the_panel_only(self): + b = BUILD.read_text() + self.assertIn('[ -d /in/luci-plugin ] && apk add ttyd luci-app-ttyd >/dev/null', b) + self.assertEqual(b.count('apk add ttyd'), 1) + # before the translation loop, which adds luci-i18n-ttyd-tr/zh-cn for the installed luci-app-ttyd + self.assertLess(b.index('apk add ttyd luci-app-ttyd'), b.index('for c in base $(apk list --installed')) + block = b[b.index('if [ -d /in/luci-plugin ]; then\n [ -d /in/luci-overlay ]'):] + self.assertIn('rm -f $R/usr/share/luci/menu.d/luci-app-ttyd.json', block) + self.assertIn('/usr/libexec/rpcd/mu300term', block) + self.assertIn('ttyd is not configured for the panel', block) + self.assertIn('[ -e $R/etc/rc.d/S99ttyd ]', b) + + def test_programs_are_executable(self): + for p in (LOGIN, RPC, HOTPLUG): + with self.subTest(p=p.name): + self.assertTrue(p.stat().st_mode & 0o111) + + +class Panel(unittest.TestCase): + def test_acl_grants_the_token_and_nothing_else(self): + acl = json.loads(ACL.read_text()) + t = acl['luci-app-mu300-terminal'] + self.assertEqual(t['write'], {'ubus': {'mu300term': ['token']}}) + self.assertEqual(t['read'], {'uci': ['ttyd']}) + # the panel's own group does not reach the terminal + self.assertNotIn('mu300term', json.dumps(acl['luci-app-mu300'])) + + def test_menu(self): + menu = json.loads(MENU.read_text()) + self.assertEqual(menu['admin/system/terminal/shell']['action'], {'type': 'view', 'path': 'mu300/terminal'}) + self.assertEqual(menu['admin/system/terminal']['depends']['acl'], ['luci-app-mu300-terminal']) + self.assertEqual(menu['admin/system/terminal/shell']['depends']['acl'], ['luci-app-mu300-terminal']) + self.assertEqual(menu['admin/system/terminal/config']['action']['path'], 'ttyd/config') + + def test_page_takes_the_token_only_from_the_backend(self): + js = (APP / 'htdocs/luci-static/resources/view/mu300/terminal.js').read_text() + self.assertIn("/^[0-9a-f]{32}$/.test(String(r.token || ''))", js) + self.assertIn("'http://' + host + ':' + port + '/?arg=' + r.token", js) + common = (APP / 'htdocs/luci-static/resources/mu300/common.js').read_text() + self.assertIn("object: 'mu300term', method: 'token'", common) + + +if __name__ == '__main__': + unittest.main() From afbc4055b4a98c9fb4583591cf477dd60f92dc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdurrahman=20Kaan=20Dike=C3=A7?= Date: Sun, 11 Oct 2026 18:16:15 +0300 Subject: [PATCH 4/9] FINDINGS 31p: BTF and eBPF for dae, and the tracing that broke boots Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn --- docs/FINDINGS.md | 58 ++++++++++++++++++++++++++++++++++ upstream/mu300-mainline.config | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/docs/FINDINGS.md b/docs/FINDINGS.md index 9b172f91..99757939 100644 --- a/docs/FINDINGS.md +++ b/docs/FINDINGS.md @@ -78,6 +78,7 @@ what replaced it. The table below gives each section's state. | 31m | Hard hangs in the first seconds under 6.18 | open | | 31n | Wi-Fi powered off and on at the same time: an Oops in the RX interrupt | current (fixed, PR #41); remaining races open | | 31o | KVM, and the module set a router needs | current | +| 31p | BTF and eBPF for dae, and the tracing that broke boots | current; the writer at ~11.5 s is open | | 32 | Old kernels, an idle IPA, and an update that ended in Android | current | | 32a | The offset in init, replaced by every boot image update | current | | 32b | The Magisk installer on a device | partly superseded by PR #40 (passwords in update mode) | @@ -2180,6 +2181,63 @@ the whole set together (65 kmods). xl2tpd starts at boot and listens on UDP 1701 images also carry the 6.18 modules from `upstream/out` (about 20 MiB unpacked, some 6 MB more in the tarball), so the switch to 6.18 needs nothing more. Not tried on an OpenWrt device in this round. +### 31p. BTF and eBPF for dae, and the tracing that broke boots +dae (github.com/daeuniverse/dae, an eBPF transparent proxy; tested v2.1.1, linux-arm64, checksum from its +release) needs kernel 5.17 or newer, BTF and a list of BPF options. Neither mainline kernel had BTF or the BPF +JIT, and dae v2.1.1 refused to start on v2026.10.18's 7.2.9: `load eBPF objects: ... program +tproxy_lan_ingress_l2: load program: invalid argument: callbacks are not allowed in non-JITed programs`. The 5.4 +kernel is too old for dae and was not changed. + +Now in `mu300-mainline.config`, for both kernels: `DEBUG_INFO_DWARF5`, `DEBUG_INFO_BTF`, `DEBUG_INFO_BTF_MODULES`, +`MODULE_ALLOW_BTF_MISMATCH` (a module with bad BTF still loads), `BPF_JIT`, `BPF_STREAM_PARSER`, `NET_INGRESS`, +`NET_EGRESS` and `NETKIT` (dae's preferred `dae0` pair; it uses a veth pair without it). The DWARF is compressed +(`DEBUG_INFO_COMPRESSED_ZSTD`): vmlinux is 157 MB instead of 312 MB, and two build trees fit in one docker +volume again. The build image has `dwarves` (pahole 1.31 on Ubuntu 26.04), and `build-modules.sh` now runs +`strip --strip-debug` on the out-of-tree modules, which keeps their `.BTF`; without it every vendor module carries +megabytes of DWARF. + +**Not taken: kprobes and tracing.** dae's list also has `KPROBES`, `KPROBE_EVENTS` and `BPF_EVENTS` (with +`PERF_EVENTS` and `FTRACE` under them). With them, 7.2.9 came up 14 times in a row on F50-B and failed the 15th +boot, then 21 times and failed the 22nd: 2 failures in 36 reboots. Both times the same thing at the same moment, +about 11.5 s after start, as the modem's `kbc_start_cp` ran in Trusty and the Wi-Fi card's first PCIe scan +failed as usual (`Device found, but not active`): page tables and the printk buffer overwritten (`Bad page map` +with self-referencing PTEs, faults in `vfs_read`, `jbd2_write_access_granted`, `get_data`, and in both boots a +fault at the same address `ffffffffffad82a0`), a panic, and LK's watchdog dumps until the board fell back to +Android about 20 minutes later. Without the tracing group, the same kernel came up 47 of 47 times (6.18: 16 of 16); stock +v2026.10.18 7.2.9 did 100 of 100 the day before. What writes there is not known. The tracing options change where +early allocations land rather than doing anything at 11.5 s themselves, so this looks like a DMA write (modem or +Wi-Fi) into memory the kernel owns, which another kernel layout may hit too; a kernel change that moves the early +allocations needs a reboot loop of 40 or more. What dae loses without them: `dae trace`, the kprobe that accounts +for its sockmap TCP offload (the fentry variant needs the function tracer), and `bpf_get_current_task` for +process names in cgroup programs (it logs a warning and uses `bpf_get_current_comm`). + +dae on F50-B (Ubuntu 24.04, Wi-Fi client of a home network, `wan_interface: wlan0`, a shadowsocks node on the Mac +over USB LAN; the oracle-arm test server was not reachable because the Mac's tailnet was logged out): it loads in +1.2 s, creates the netkit pair `dae0`/`dae0peer` "via netlink API (performance mode)", and holds 14 `SCHED_CLS`, 4 +`CGROUP_SOCK_ADDR` (connect4/6, sendmsg4/6) and 2 `CGROUP_SOCK` programs, 21 maps, tcx links on `wlan0` (ingress, +egress) and `dae0`, and 6 cgroup links. `curl https://ifconfig.me` answered 200 and the shadowsocks server logged +`established tcp tunnel ... <-> 34.160.111.145:443` for each request; 50 MB from Cloudflare came at 16.5 MB/s +through dae and the proxy, 20.0 MB/s direct once dae was stopped (`dae0` removed with it). The same test passed on +the kernel without tracing, with the warning above. + +Measured (Image as built, before `wrap-image.py` adds 1.5 MiB; memory 20 s after boot on F50-B): + +| | 6.18.55 v2026.10.18 | 6.18.55 BTF | 7.2.9 v2026.10.18 | 7.2.9 BTF + tracing | 7.2.9 BTF | +|---|---|---|---|---|---| +| Image (bytes) | 17 512 456 | 21 649 416 | 18 069 512 | 26 925 064 | 22 337 544 | +| of it `.BTF` | - | 4 019 543 | - | 4 875 150 | 4 104 758 | +| modules in the bundle | 20.3 MiB | 23.8 MiB | 21.9 MiB | 34.6 MiB | 25.7 MiB | +| ramdisk segment (bytes) | 1 776 099 | 1 832 495 | 1 777 340 | 1 836 866 | 1 833 918 | +| MemTotal (kB) | | 1 501 344 | 1 455 776 | 1 447 840 | 1 451 616 | +| MemAvailable (kB) | | 1 312 360-1 321 424 | 1 270 356-1 274 324 | 1 249 648-1 264 200 | 1 254 696-1 288 712 | +| kernel boot (systemd-analyze) | | | 5.25 s | 5.40 s | 5.34 s | +| reboots on F50-B | 100/100 (10-10) | 16/16 | 100/100 (10-10) | 34/36 | 47/47 | + +So BTF costs about 4 MiB of RAM (it is read-only data, in `rodata`: 3028K before, 7060K after) and the boot is +0.1 s slower; the modules' own BTF is about 4.4 MB on disk. The boot image (header, wrapped 7.2 kernel 23.9 MB, +F50-B's device ramdisk 6.5 MB, generic segment 1.8 MB) is 32.3 MB: under the 48 MiB where init keeps its +persistent log in the same partition (64 MiB), with about 18 MB to spare. + ## Updating on the device ### 32. Old kernels, an idle IPA, and an update that ended in Android diff --git a/upstream/mu300-mainline.config b/upstream/mu300-mainline.config index 09d1449d..c7544011 100644 --- a/upstream/mu300-mainline.config +++ b/upstream/mu300-mainline.config @@ -429,7 +429,7 @@ CONFIG_NET_EGRESS=y CONFIG_NETKIT=y # not taken: kprobes and the tracing they pull in (PERF_EVENTS, FTRACE, KPROBE_EVENTS, BPF_EVENTS), which dae lists # too. With them 7.2 died in 2 of 36 reboots (page tables and the printk buffer overwritten at ~11.5 s, as the modem -# and the Wi-Fi card start), without them 41 of 41 came up (FINDINGS 31p). dae runs without: `dae trace` and its +# and the Wi-Fi card start), without them 47 of 47 came up (FINDINGS 31p). dae runs without: `dae trace` and its # sockmap accounting are what need kprobes, and process names come from bpf_get_current_comm # --- virtualization: KVM (the CPUs start at EL2; the vendor 5.4 kernel has it too) and vhost for the guests From 243f06700c5498858cebc37b0ffd9d7bbc771490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdurrahman=20Kaan=20Dike=C3=A7?= Date: Sun, 11 Oct 2026 18:55:06 +0300 Subject: [PATCH 5/9] The vendor daemons get their own account; no node is writable by the login user Android's system user is uid 1000, and gen-ueventd-perms.py took the number over: on Ubuntu uid 1000 is ubuntu, so the modem's calibration NV (nr_fixnv*), persist and the modem's control nodes were writable by the login user without sudo, and modem_control/refnotify ran as it. Several nodes were 0666. - mu300vnd system account: made in the images (assemble.sh, Arch) and, where missing, by android-vendor-start before the nodes are handed out; mu300-update's merge carries the image's account into updated systems - android-run starts modem_control and refnotify as mu300vnd via setpriv, with only the capabilities they keep on Android: their hardcoded setuid(1000) fails, logged and harmless; cp_diskserver stays root - the generator maps system/radio to the account, graphics to video, the rest to root; no bits for others on /dev, nothing world-writable; input, ttyGS and the firmware path left as Linux has them; the RTC root: - the generator's inputs are in android-vendor/ueventd/; a test checks the output Measured on F50-B (Ubuntu 24.04, 7.2.9): FINDINGS 40. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn --- android-vendor/gen-ueventd-perms.py | 86 +- android-vendor/ueventd-perms.sh | 1110 +++++++++-------- android-vendor/ueventd/init-perms.rc | 478 +++++++ android-vendor/ueventd/ueventd.rc | 118 ++ arch/build-rootfs.sh | 3 + docs/FINDINGS.md | 52 +- rootfs/assemble.sh | 5 + rootfs/overlay/opt/mu300/bin/android-run | 19 +- .../opt/mu300/bin/android-vendor-start | 20 +- rootfs/overlay/opt/mu300/bin/ueventd-perms.sh | 1110 +++++++++-------- tests/README.md | 1 + tests/test_emmc_lookup.py | 2 +- tests/test_vendor_ids.py | 268 ++++ 13 files changed, 2145 insertions(+), 1127 deletions(-) create mode 100644 android-vendor/ueventd/init-perms.rc create mode 100644 android-vendor/ueventd/ueventd.rc create mode 100644 tests/test_vendor_ids.py diff --git a/android-vendor/gen-ueventd-perms.py b/android-vendor/gen-ueventd-perms.py index f5d679ea..277947f8 100755 --- a/android-vendor/gen-ueventd-perms.py +++ b/android-vendor/gen-ueventd-perms.py @@ -1,16 +1,39 @@ #!/usr/bin/env python3 """Generate ueventd-perms.sh: apply Android device node ownership (ueventd.rc + init *.rc chown/chmod) -on plain Linux, because modem_control drops to uid system(1000) before opening /dev/modem etc. -usage: gen-ueventd-perms.py vendor/etc/ueventd.rc vendor-init/*.rc > ueventd-perms.sh""" +on plain Linux, because modem_control and refnotify open /dev/modem etc. as Android's system user, not as root. +usage: gen-ueventd-perms.py vendor/etc/ueventd.rc vendor-init/*.rc > ueventd-perms.sh +(android-vendor/ueventd/ holds the lines of this device's files the generator reads: + gen-ueventd-perms.py android-vendor/ueventd/ueventd.rc android-vendor/ueventd/init-perms.rc) + +Android's ids are not taken over as numbers. Android's system user is uid 1000, and on a distribution uid 1000 is +the first human account (ubuntu; alarm on Arch): the modem's calibration partitions (nr_fixnv*), persist and the +modem's control nodes were that account's, writable without sudo (FINDINGS: "The vendor daemons' own account"). +What each Android id becomes on Linux (MAP below): + system, radio -> the vendor account mu300vnd ($V, group $VG): the ids the vendor daemons run as. Where there is no + such account (OpenWrt, the initramfs) that is uid/gid 1000, which they switch to themselves. + graphics -> the video group ($GPU): the GPU (mali0, ion, dma_heap, ...) for its users, not for everyone + root and every other Android id (audio, camera, bluetooth, nfc, media, ...: services that do not run here) + -> root +Modes: nothing is left writable by everyone, and a /dev node gets no bits at all for others (a 0666 Android node is +0660 here); a node that is root's alone keeps no group bits either (0600). +""" import sys + AID = {'root': 0, 'system': 1000, 'radio': 1001, 'bluetooth': 1002, 'graphics': 1003, 'input': 1004, 'audio': 1005, 'camera': 1006, 'log': 1007, 'wifi': 1010, 'media': 1013, 'dhcp': 1014, 'gps': 1021, 'nfc': 1027, 'audioserver': 1041, 'cameraserver': 1047, 'shell': 2000, 'net_bt_admin': 3001, 'net_bt': 3002, 'inet': 3003, 'net_raw': 3004} -# Nodes that stay as Linux sets them up. Android's "system" (uid 1000) is the first user on Linux: an RTC that -# belonged to it could not be opened by systemd-timedated (root, but without CAP_DAC_OVERRIDE), and with systemd 259 -# (Ubuntu 26.04) timedatectl failed as a whole ("Failed to read RTC: Permission denied"). -KEEP = ('/dev/rtc',) +# Android id -> (Linux owner, Linux group) as the script writes them; ids not here are root's +MAP = {'system': ('$V', '$VG'), 'radio': ('$V', '$VG'), 'graphics': ('0', '$GPU')} +# Nodes that stay root's, in the vendor group: the RTC. One that belonged to Android's system could not be opened by +# systemd-timedated (root, but without CAP_DAC_OVERRIDE), and with systemd 259 (Ubuntu 26.04) timedatectl failed as a +# whole ("Failed to read RTC"); refnotify opens it too (as uid 1000 with gid 0 it did so through Linux's root:root +# 0660, as mu300vnd it needs the group). +ROOT_OWNED = ('/dev/rtc',) +# Nodes that stay as Linux sets them up: +# - input events (udev: root:input) and the USB serial console ttyGS* (getty hands it to whoever logs in) +# - the firmware search path: whoever can write it chooses the firmware the kernel loads (root's, 0644) +KEEP = ('/dev/input/', '/dev/ttyGS', '/sys/module/firmware_class/') # Block devices by mmcblk number: the number follows probe order and is not always the eMMC's (FINDINGS 31l). The # card's partitions (Android's mmcblk1p*, for vold) are left alone - no vendor daemon run here opens the card, and a # system-group card would be the first user's on Linux (where the root filesystem may be on it). The vendor daemons @@ -18,6 +41,24 @@ KEEP = ('/dev/rtc',) # none), so mmcblk0rpmb becomes any number's. BY_NUMBER = ('/dev/block/mmcblk', '/dev/mmcblk') +# The Linux ids, looked up when the script runs: in /etc itself (no getent: the initramfs and OpenWrt have no NSS, +# and the accounts here are local system accounts). +HEADER = r'''# The vendor daemons' account (android-run starts them as it); without one (OpenWrt, the initramfs) the uid and gid +# 1000 they switch to themselves. The GPU's group: video, else root. +id_of() { # id_of NAME FILE: the id (third field) of NAME in FILE (passwd or group format), nothing if none + [ -r "$2" ] || return 0 + while IFS=: read -r n _ i _ || [ -n "$n" ]; do [ "$n" = "$1" ] && { echo "$i"; return 0; }; done < "$2" + return 0 +} +E=${MU300_ETC:-/etc} +V=$(id_of mu300vnd "$E/passwd"); V=${V:-1000} +VG=$(id_of mu300vnd "$E/group"); VG=${VG:-1000} +GPU=$(id_of video "$E/group"); GPU=${GPU:-0}''' + + +def kept(path): + return path.startswith(KEEP) + def node(path): if path.startswith(BY_NUMBER): @@ -25,24 +66,41 @@ def node(path): return path -out = ['#!/bin/sh', '# generated by gen-ueventd-perms.py'] +def ids(user, group): + g = MAP.get(group, ('0', '0'))[1] + return ('0' if g == '$GPU' else MAP.get(user, ('0', '0'))[0]), g # the GPU's nodes: root:video + + +def mode(m, path, owner=None, group=None): + m = int(m, 8) & 0o7777 + m &= ~0o007 if path.startswith('/dev/') else ~0o002 # nothing for others on a node; never written by anyone + if owner == '0' and group == '0': + m &= ~0o070 # root's alone: no group bits for the root group + return f'{m:04o}' + + +out = ['#!/bin/sh', '# generated by gen-ueventd-perms.py: Android device node ownership on plain Linux', HEADER] ueventd, rcs = sys.argv[1], sys.argv[2:] for line in open(ueventd): f = line.split('#')[0].split() - if len(f) >= 4 and f[0].startswith('/dev/') and not f[0].startswith(KEEP) and f[2] in AID and f[3] in AID: - if node(f[0]): - out.append(f'for n in {node(f[0])}; do [ -e "$n" ] && chown {AID[f[2]]}:{AID[f[3]]} "$n" && chmod {f[1]} "$n"; done') + if len(f) >= 4 and f[0].startswith('/dev/') and not kept(f[0]) and f[2] in AID and f[3] in AID and node(f[0]): + u, g = ids(f[2], f[3]) + u = '0' if f[0].startswith(ROOT_OWNED) else u + out.append(f'for n in {node(f[0])}; do [ -e "$n" ] && chown {u}:{g} "$n" && chmod {mode(f[1], f[0], u, g)} "$n"; done') +out.append('# chown/chmod from vendor init *.rc (Android init applies these after ueventd)') for rc in rcs: for line in open(rc): f = line.split('#')[0].split() if len(f) < 3 or f[0] not in ('chown', 'chmod') or not f[-1].startswith(('/dev/', '/sys/', '/proc/')): continue + if kept(f[-1]): + continue if f[0] == 'chmod': - out.append(f'for n in {f[-1]}; do [ -e "$n" ] && chmod {f[1]} "$n"; done') + out.append(f'for n in {f[-1]}; do [ -e "$n" ] && chmod {mode(f[1], f[-1])} "$n"; done') elif f[1] in AID and (len(f) == 3 or f[2] in AID): - g = AID[f[2]] if len(f) == 4 else AID[f[1]] - out.append(f'for n in {f[-1]}; do [ -e "$n" ] && chown {AID[f[1]]}:{g} "$n"; done') + u, g = ids(f[1], f[2] if len(f) == 4 else f[1]) + out.append(f'for n in {f[-1]}; do [ -e "$n" ] && chown {u}:{g} "$n"; done') out.append('# from Android system init.rc: wakelocks are written by uid system') -out.append('for n in /sys/power/wake_lock /sys/power/wake_unlock; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done') +out.append('for n in /sys/power/wake_lock /sys/power/wake_unlock; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done') out.append('true') print('\n'.join(out)) diff --git a/android-vendor/ueventd-perms.sh b/android-vendor/ueventd-perms.sh index 12070fff..1b5cd433 100755 --- a/android-vendor/ueventd-perms.sh +++ b/android-vendor/ueventd-perms.sh @@ -1,150 +1,160 @@ #!/bin/sh -# generated from vendor/etc/ueventd.rc: apply Android device node ownership on plain Linux -for n in /dev/apipe-pcm; do [ -e "$n" ] && chown 1000:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/apipe-cmd-in; do [ -e "$n" ] && chown 1000:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/apipe-cmd-out; do [ -e "$n" ] && chown 1000:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/vbc_turning; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/vbc_turning*; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/l_agdsp_a; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/l_agdsp_b; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/audio_dsp*; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 666 "$n"; done -for n in /dev/audio_pipe*; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 660 "$n"; done -for n in /dev/audio_dsp_call_info; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/logo; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/nr_*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/calinv; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/pm_sys*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/ch_sys*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/vdsp*; do [ -e "$n" ] && chown 1047:1000 "$n" && chmod 660 "$n"; done -for n in /dev/iio:device*; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/data0_gnss; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0666 "$n"; done -for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/gnssmodem_b; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/sttygnss0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_gnss0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_gnss1; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/stime_pm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/stime_ch; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/wcn_gnss_dump; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_gnss; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_wcn0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyS3; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyS4; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyS0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/gnss_pmnotify_ctl; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/power_ctl; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/gnss_dbg; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/fm; do [ -e "$n" ] && chown 1013:1013 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyM0; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyM1; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done -for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/tshm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/tui_dev; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/madev0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sttybt0; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyBT0; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done -for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/stty_lte*; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_lte; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_pm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_ch; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sctl_pm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sctl_ch; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sdiag_lte; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_ldsp; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_time_sync; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte5; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte4; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte6; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte9; do [ -e "$n" ] && chown 1001:1001 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte14; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_pm*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0666 "$n"; done -for n in /dev/spipe_ch*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/snv_lte; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/stty_nr*; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_nr; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_phy; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sdiag_nr; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr5; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr4; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr6; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr9; do [ -e "$n" ] && chown 1001:1001 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr14; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/snv_nr; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/vser; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyGS*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ion; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/sprd_ion; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/sprd_dmabuf; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/dma_heap/uncached_carveout_mm; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/dma_heap/uncached_carveout_oem; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/dma_heap/carveout_fd; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/gsp; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0660 "$n"; done -for n in /dev/mali0; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/pvr_sync; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/sprd_jpg; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0666 "$n"; done -for n in /dev/sprd_jpg1; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_vsp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/vdma; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/vpu_enc0; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/vpu_enc1; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_vpp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_vsp_enc; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_image; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_isp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_sensor; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_cpp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/input/event*; do [ -e "$n" ] && chown 1000:1004 "$n" && chmod 0660 "$n"; done -for n in /dev/map_user; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/iio:device*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/gnssmodem; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/rpmb0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/tmc_etb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/pn553; do [ -e "$n" ] && chown 1027:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/st21nfc; do [ -e "$n" ] && chown 1027:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/st54spi; do [ -e "$n" ] && chown 1027:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/miscdata; do [ -e "$n" ] && chown 0:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/persist; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/sysdumpdb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/fulldumpdb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/mmcblk*rpmb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/mmcblk*rpmb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/memdisk0p1; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0770 "$n"; done -for n in /dev/block/pmem0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0770 "$n"; done +# generated by gen-ueventd-perms.py: Android device node ownership on plain Linux +# The vendor daemons' account (android-run starts them as it); without one (OpenWrt, the initramfs) the uid and gid +# 1000 they switch to themselves. The GPU's group: video, else root. +id_of() { # id_of NAME FILE: the id (third field) of NAME in FILE (passwd or group format), nothing if none + [ -r "$2" ] || return 0 + while IFS=: read -r n _ i _ || [ -n "$n" ]; do [ "$n" = "$1" ] && { echo "$i"; return 0; }; done < "$2" + return 0 +} +E=${MU300_ETC:-/etc} +V=$(id_of mu300vnd "$E/passwd"); V=${V:-1000} +VG=$(id_of mu300vnd "$E/group"); VG=${VG:-1000} +GPU=$(id_of video "$E/group"); GPU=${GPU:-0} +for n in /dev/apipe-pcm; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/apipe-cmd-in; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/apipe-cmd-out; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/vbc_turning; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/vbc_turning*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/block/by-name/l_agdsp_a; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/block/by-name/l_agdsp_b; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/audio_dsp*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/audio_pipe*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/audio_dsp_call_info; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/block/by-name/logo; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/nr_*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/calinv; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/pm_sys*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/ch_sys*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/vdsp*; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/iio:device*; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/data0_gnss; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem_b; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sttygnss0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_gnss0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_gnss1; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/stime_pm; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/stime_ch; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/wcn_gnss_dump; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_gnss; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_wcn0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ttyS3; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ttyS4; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ttyS0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/gnss_pmnotify_ctl; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/power_ctl; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/gnss_dbg; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/fm; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/ttyM0; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/ttyM1; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/tshm; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/tui_dev; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/madev0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sttybt0; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/ttyBT0; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/stty_lte*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_lte; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_pm; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_ch; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sctl_pm; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sctl_ch; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sdiag_lte; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_ldsp; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_time_sync; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte5; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte4; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_lte6; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_lte9; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte14; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_pm*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_ch*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/snv_lte; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/stty_nr*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_nr; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_phy; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sdiag_nr; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr5; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr4; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_nr6; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_nr9; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr14; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/snv_nr; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/vser; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ion; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_ion; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_dmabuf; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/dma_heap/uncached_carveout_mm; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/dma_heap/uncached_carveout_oem; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/dma_heap/carveout_fd; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/gsp; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/mali0; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/pvr_sync; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_jpg; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_jpg1; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_vsp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/vdma; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/vpu_enc0; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/vpu_enc1; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_vpp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_vsp_enc; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_image; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_isp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_sensor; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_cpp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/map_user; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/iio:device*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/rtc*; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/rpmb0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/tmc_etb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/pn553; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/st21nfc; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/st54spi; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/miscdata; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/persist; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/sysdumpdb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/fulldumpdb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/mmcblk*rpmb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/mmcblk*rpmb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/memdisk0p1; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0770 "$n"; done +for n in /dev/block/pmem0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0770 "$n"; done # chown/chmod from vendor init *.rc (Android init applies these after ueventd) -for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0666 "$n"; done -for n in /sys/power/wakeup_count; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/module/zte_misc/parameters/cc_connect; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/devices/platform/soc/soc:aon/64400000.spi/spi_master/spi4/spi4.0/sc27xx-7sreset/hard_mode; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chown 1041:1005 "$n"; done -for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/power/wakeup_count; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/module/zte_misc/parameters/cc_connect; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/platform/soc/soc:aon/64400000.spi/spi_master/spi4/spi4.0/sc27xx-7sreset/hard_mode; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chown 0:0 "$n"; done +for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chmod 0660 "$n"; done @@ -153,444 +163,440 @@ for n in /sys/class/display/dispc0/irq_register; do [ -e "$n" ] && chmod 0664 "$ for n in /sys/class/display/dispc0/irq_unregister; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/display/panel0/esd_check_enable; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chmod 666 "$n"; done -for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/panel0/esd_check_enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chown 1003:1000 "$n"; done -for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/dpu_version; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/irq_register; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/irq_unregister; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1003:1000 "$n"; done -for n in /sys/class/display/dispc0/low_res_simu; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/backlight/max_brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/frame_count; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/panel0/esd_check_enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/dpu_version; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/irq_register; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/irq_unregister; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/low_res_simu; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/backlight/max_brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/frame_count; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/class/display/dispc0/frame_count; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/graphics/fb0; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/fb0; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/adf0; do [ -e "$n" ] && chmod 666 "$n"; done -for n in /dev/adf-interface0.0; do [ -e "$n" ] && chmod 666 "$n"; done -for n in /dev/adf-overlay-engine0.0; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /dev/graphics/fb0; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/fb0; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/adf0; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/adf-interface0.0; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/adf-overlay-engine0.0; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1003:1000 "$n"; done -for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/iq_mem; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/sprd-adf/dispc0/dynamic_pclk; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/sprd-adf/dispc0/dynamic_mipi_clk; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/sprd_bm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/dmc_mpu; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/stop; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/start; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/modem; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/deltanv; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/gdsp; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/ldsp; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/cdsp; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/fixnv; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/runnv; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/modemassert; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/cptl/mem; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/cptl/modemassert; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/stop; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/start; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/modem; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/deltanv; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/ldsp; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/gdsp; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/cdsp; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/fixnv; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/runnv; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/cptl/mem; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/modem; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/phycp; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/pmsys; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/chsys; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/mdm_ctrl; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/sctl_ch; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done -for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done -for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done -for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done -for n in /dev/modem; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/phycp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/pmsys; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/chsys; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/mdm_ctrl; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sctl_ch; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cp_dump; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/cp_dump; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/iq_mem; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/sprd-adf/dispc0/dynamic_pclk; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/sprd-adf/dispc0/dynamic_mipi_clk; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/sprd_bm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/dmc_mpu; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/stop; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/start; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/modem; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/deltanv; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/gdsp; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/ldsp; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/cdsp; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/fixnv; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/runnv; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/modemassert; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/cptl/mem; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/cptl/modemassert; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/stop; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/start; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/modem; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/deltanv; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/ldsp; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/gdsp; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/cdsp; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/fixnv; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/runnv; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/cptl/mem; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/modem; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/phycp; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/pmsys; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/chsys; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/mdm_ctrl; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/sctl_ch; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chmod 0444 "$n"; done +for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chmod 0444 "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chmod 0444 "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chmod 0444 "$n"; done +for n in /dev/modem; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/phycp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/pmsys; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/chsys; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/mdm_ctrl; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sctl_ch; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cp_dump; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cp_dump; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/class/modem/debug-log/freq; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/modem/debug-log/channel; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/class/modem/debug-log/freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/debug-log/channel; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/sctl_pm; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/iq_mem; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/iq_mem; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/sctl_pm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/mdbg; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/mdbg/assert; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/mdbg; do [ -e "$n" ] && chmod 770 "$n"; done -for n in /proc/mdbg/assert; do [ -e "$n" ] && chmod 760 "$n"; done -for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chmod 760 "$n"; done -for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chmod 760 "$n"; done -for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chmod 760 "$n"; done -for n in /dev/mbox; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipc_smsg; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipc_smem; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipc_sbuf; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipc_sblock; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipx; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/devices/platform/soc/soc:ipa-apb/soc:ipa-apb:sipa-dele/sipa_dele_reset; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/power_supply/battery/charge_control_limit; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/modem/debug-log/freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/debug-log/channel; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/sctl_pm; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/iq_mem; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/iq_mem; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/sctl_pm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/mdbg; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/mdbg/assert; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/mdbg; do [ -e "$n" ] && chmod 0770 "$n"; done +for n in /proc/mdbg/assert; do [ -e "$n" ] && chmod 0760 "$n"; done +for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chmod 0760 "$n"; done +for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chmod 0760 "$n"; done +for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chmod 0760 "$n"; done +for n in /dev/mbox; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipc_smsg; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipc_smem; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipc_sbuf; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipc_sblock; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipx; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/devices/platform/soc/soc:ipa-apb/soc:ipa-apb:sipa-dele/sipa_dele_reset; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/power_supply/battery/charge_control_limit; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chmod 0644 "$n"; done for n in /sys/class/display/backlight/max_brightness; do [ -e "$n" ] && chmod 0644 "$n"; done -for n in /sys/class/thermal/thermal_zone4/trip_point_0_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone4/trip_point_1_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone4/user_power_range; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device3/min_core_num; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device3/min_freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device3/max_ctrl_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device4/min_core_num; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device4/min_freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device4/max_ctrl_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device5/min_core_num; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device5/min_freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device5/max_ctrl_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/thermal/thermal_zone4/thm_enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone3/thm_enable; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/auto_dfs_on_off; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scaling_force_ddr_freq; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/power_supply/battery/stop_charge; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/thermal_zone4/trip_point_0_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone4/trip_point_1_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone4/user_power_range; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device3/min_core_num; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device3/min_freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device3/max_ctrl_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device4/min_core_num; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device4/min_freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device4/max_ctrl_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device5/min_core_num; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device5/min_freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device5/max_ctrl_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/thermal/thermal_zone4/thm_enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone3/thm_enable; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/auto_dfs_on_off; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scaling_force_ddr_freq; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/power_supply/battery/stop_charge; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/class/power_supply/battery/stop_charge; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/class/power_supply/battery/charger.0/stop_charge; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/power_supply/battery/charger.0/enable_power_path; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/stop_charge; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/power_supply/battery/charger.0/enable_power_path; do [ -e "$n" ] && chown 0:$VG "$n"; done for n in /sys/class/power_supply/battery/charger.0/stop_charge; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/power_supply/battery/charger.0/enable_power_path; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/class/power_supply/battery/charger.0/jeita_control; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/power_supply/battery/charger.0/keep_awake; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/power_supply/sprdfgu/cc_test_cmd; do [ -e "$n" ] && chmod 0666 "$n"; done -for n in /sys/class/power_supply/battery/input_current_limit; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/power_supply/battery/constant_charge_current; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/stop; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/start; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/mem; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/pmic/status; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/stop; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/start; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/mem; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/status; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/cali_lib; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /dev/cpuctl; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/foreground; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/background; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/top-app; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/rt; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chown 1013:1000 "$n"; done -for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chown 1013:1000 "$n"; done -for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/kernel/hmp/boostpulse_duration; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/kernel/hmp/boostpulse_duratio; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/devices/system/cpu/cpuhotplug/boostpulse; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpuhotplug/boostpulse_duration; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/jeita_control; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/keep_awake; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/power_supply/sprdfgu/cc_test_cmd; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/power_supply/battery/input_current_limit; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/power_supply/battery/constant_charge_current; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/stop; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/start; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/mem; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/pmic/status; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/stop; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/start; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/mem; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/status; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/cali_lib; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /dev/cpuctl; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/foreground; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/background; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/top-app; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/rt; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/kernel/hmp/boostpulse_duration; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/boostpulse_duratio; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/boostpulse; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/boostpulse_duration; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/devices/system/cpu/cpuhotplug/boostpulse; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/devices/system/cpu/cpuhotplug/boostpulse_duration; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_min_limit; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_min_limit; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /dev/cluster0_freq_min; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cluster0_freq_max; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cluster1_freq_min; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cluster1_freq_max; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cluster0_freq_min; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cluster0_freq_max; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cluster1_freq_min; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cluster1_freq_max; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /dev/cluster0_freq_min; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/cluster0_freq_max; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/cluster1_freq_min; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/cluster1_freq_max; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_setspeed; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /proc/sprd_sysdump; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/tmc_etb; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/tmc_etb; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_setspeed; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /proc/sprd_sysdump; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/tmc_etb; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/tmc_etb; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/sprd_bm; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/dmc_mpu; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /dev/sprd_bm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/dmc_mpu; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/rt5512; do [ -e "$n" ] && chown 1000:1005 "$n"; done -for n in /dev/rt5512; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/reserve_space/black_list; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /proc/reserve_space/white_list; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /proc/reserve_space/black_list_comm; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /proc/reserve_space/white_list_comm; do [ -e "$n" ] && chmod 640 "$n"; done -for n in /proc/reserve_space/app_guid; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/block/zram0/writeback_limit; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /dev/sprd_bm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/dmc_mpu; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/rt5512; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/rt5512; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/reserve_space/black_list; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /proc/reserve_space/white_list; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /proc/reserve_space/black_list_comm; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /proc/reserve_space/white_list_comm; do [ -e "$n" ] && chmod 0640 "$n"; done +for n in /proc/reserve_space/app_guid; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/block/zram0/writeback_limit; do [ -e "$n" ] && chown 0:$VG "$n"; done for n in /sys/block/zram0/writeback_limit; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/block/zram0/writeback_limit_enable; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/block/zram0/writeback_limit_enable; do [ -e "$n" ] && chown 0:$VG "$n"; done for n in /sys/block/zram0/writeback_limit_enable; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/leds/aw_led/groupcolor; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/class/leds/aw_led/groupcolor; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /sys/class/leds/aw_led/groupcolor; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chmod 0644 "$n"; done for n in /proc/touchscreen/screen_state_interface; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /proc/touchscreen/screen_state_interface; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/bus/platform/devices/zte_touch/uevent; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /dev/gtp_tools; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /proc/touchscreen/screen_state_interface; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/bus/platform/devices/zte_touch/uevent; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /dev/gtp_tools; do [ -e "$n" ] && chmod 0640 "$n"; done +for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chmod 0664 "$n"; done # from Android system init.rc: wakelocks are written by uid system -for n in /sys/power/wake_lock /sys/power/wake_unlock; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /sys/power/wake_lock /sys/power/wake_unlock; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done true diff --git a/android-vendor/ueventd/init-perms.rc b/android-vendor/ueventd/init-perms.rc new file mode 100644 index 00000000..3e2eca8a --- /dev/null +++ b/android-vendor/ueventd/init-perms.rc @@ -0,0 +1,478 @@ +# The chown/chmod lines of the F50's vendor init *.rc (the lines gen-ueventd-perms.py reads), in their order. +# Android's init applies them after ueventd; the files themselves are on the vendor partition only. + chown root system /sys/class/typec/port0/power_role + chown root system /sys/class/typec/port0/data_role + chown root system /sys/class/typec/port0/port_type + chmod 664 /sys/class/typec/port0/power_role + chmod 664 /sys/class/typec/port0/data_role + chmod 664 /sys/class/typec/port0/port_type + chown root system /sys/class/usb_notify/usb_control/usb_data_enabled + chmod 664 /sys/class/usb_notify/usb_control/usb_data_enabled + chmod 0666 /sys/class/backlight/sprd_backlight/brightness + chmod 664 /sys/power/wakeup_count + chown system system /sys/module/zte_misc/parameters/cc_connect + chmod 644 /sys/devices/soc0/soc_manufacturer + chmod 644 /sys/devices/soc0/soc_model + chown root system /sys/devices/soc0/soc_manufacturer + chown root system /sys/devices/soc0/soc_model + chown system system /sys/devices/platform/soc/soc:aon/64400000.spi/spi_master/spi4/spi4.0/sc27xx-7sreset/hard_mode + chown audioserver audio /proc/asound/sprdphonesc2730/asoc-sprd-debug + chmod 660 /proc/asound/sprdphonesc2730/asoc-sprd-debug + chmod 660 /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name + chown cameraserver system /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name + chown cameraserver system /sys/devices/virtual/misc/sprd_flash/test + chmod 660 /sys/devices/virtual/misc/sprd_flash/test + chmod 660 /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq + chown cameraserver system /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq + chown cameraserver system /sys/devices/virtual/misc/sprd_flash/test + chmod 660 /sys/devices/virtual/misc/sprd_flash/test + chmod 0660 /sys/class/display/dphy0/hop + chmod 0660 /sys/class/display/dphy0/ssc + chmod 0660 /sys/class/display/panel0/name + chmod 666 /sys/class/display/dispc0/vsync_rate_report + chmod 0660 /sys/class/display/dispc0/disable_flip + chmod 0660 /sys/class/display/dispc0/bg_color + chmod 0660 /sys/class/display/dispc0/refresh + chmod 0660 /sys/class/display/dispc0/disable_flip + chmod 0664 /sys/class/display/dispc0/irq_register + chmod 0664 /sys/class/display/dispc0/irq_unregister + chmod 0664 /sys/class/display/panel0/esd_check_enable + chmod 0664 /sys/class/backlight/sprd_backlight/brightness + chmod 666 /sys/class/display/dsi/dpms_mode + chown cameraserver system /sys/class/display/dispc0/bg_color + chown cameraserver system /sys/class/display/dispc0/refresh + chown cameraserver system /sys/class/display/dispc0/disable_flip + chown system system /sys/class/backlight/sprd_backlight/brightness + chown system system /sys/class/display/dphy0/hop + chown system system /sys/class/display/dphy0/ssc + chown system system /sys/class/display/panel0/name + chown system system /sys/class/display/panel0/resolution + chown system system /sys/class/display/panel0/esd_check_enable + chown system system /sys/class/display/dispc0/vsync_rate_report + chown graphics system /sys/class/display/dsi/dpms_mode + chown system system /sys/class/display/dispc0/disable_flip + chown system system /sys/class/display/dispc0/dpu_version + chown system system /sys/class/display/dispc0/irq_register + chown system system /sys/class/display/dispc0/irq_unregister + chown graphics system /sys/class/display/dispc0/vsync_rate_report + chown system system /sys/class/display/dispc0/low_res_simu + chmod 664 /sys/class/display/dispc0/PQ/slp + chmod 664 /sys/class/display/dispc0/PQ/cm + chmod 664 /sys/class/display/dispc0/PQ/gamma + chmod 664 /sys/class/display/dispc0/PQ/hsv + chmod 664 /sys/class/display/dispc0/PQ/epf + chmod 664 /sys/class/display/dispc0/PQ/scl + chmod 664 /sys/class/display/dispc0/PQ/enable + chmod 664 /sys/class/display/dispc0/PQ/disable + chown system system /sys/class/display/dispc0/PQ/slp + chown system system /sys/class/display/dispc0/PQ/cm + chown system system /sys/class/display/dispc0/PQ/gamma + chown system system /sys/class/display/dispc0/PQ/hsv + chown system system /sys/class/display/dispc0/PQ/epf + chown system system /sys/class/display/dispc0/PQ/scl + chown system system /sys/class/display/dispc0/PQ/enable + chown system system /sys/class/display/dispc0/PQ/disable + chown system system /sys/class/backlight/sprd_backlight/brightness + chown system system /sys/class/backlight/sprd_backlight/max_brightness + chown system system /sys/class/display/backlight/max_brightness + chown cameraserver system /sys/class/display/dispc0/disable_flip + chown system system /sys/class/display/dispc0/frame_count + chmod 0664 /sys/class/display/dispc0/frame_count + chmod 660 /dev/graphics/fb0 + chmod 660 /dev/fb0 + chmod 666 /dev/adf0 + chmod 666 /dev/adf-interface0.0 + chmod 666 /dev/adf-overlay-engine0.0 + chmod 0660 /sys/class/display/dphy0/hop + chmod 0660 /sys/class/display/dphy0/ssc + chmod 0660 /sys/class/display/panel0/name + chmod 666 /sys/class/display/dispc0/vsync_rate_report + chmod 0660 /sys/class/display/dispc0/bg_color + chmod 0660 /sys/class/display/dispc0/refresh + chmod 0660 /sys/class/display/dispc0/disable_flip + chmod 0664 /sys/class/backlight/sprd_backlight/brightness + chown system system /sys/class/display/dphy0/hop + chown system system /sys/class/display/dphy0/ssc + chown system system /sys/class/display/panel0/name + chown system system /sys/class/display/dispc0/vsync_rate_report + chown graphics system /sys/class/display/dispc0/vsync_rate_report + chown cameraserver system /sys/class/display/dispc0/bg_color + chown cameraserver system /sys/class/display/dispc0/refresh + chown cameraserver system /sys/class/display/dispc0/disable_flip + chown system system /sys/class/backlight/sprd_backlight/brightness + chown system system /sys/class/backlight/sprd_backlight/max_brightness + chown system system /dev/iq_mem + chown system system /sys/devices/sprd-adf/dispc0/dynamic_pclk + chown system system /sys/devices/sprd-adf/dispc0/dynamic_mipi_clk + chown system system /dev/sprd_bm + chown system system /dev/dmc_mpu + chmod 664 /sys/class/display/dispc0/PQ/enable + chmod 664 /sys/class/display/dispc0/PQ/sr_epf + chmod 664 /sys/class/display/dispc0/PQ/cm + chmod 664 /sys/class/display/dispc0/PQ/ltm + chmod 664 /sys/class/display/dispc0/PQ/lut3d + chmod 664 /sys/class/display/dispc0/PQ/status + chmod 664 /sys/class/display/dispc0/PQ/cabc_mode + chmod 664 /sys/class/display/dispc0/PQ/cabc_hist + chmod 664 /sys/class/display/dispc0/PQ/cabc_hist_v2 + chmod 664 /sys/class/display/dispc0/PQ/cabc_gain + chmod 664 /sys/class/display/dispc0/PQ/cabc_bl_fix + chmod 664 /sys/class/display/dispc0/PQ/cabc_cur_bl + chmod 664 /sys/class/display/dispc0/PQ/vsync_count + chmod 664 /sys/class/display/dispc0/PQ/frame_no + chmod 664 /sys/class/display/dispc0/PQ/cabc_run + chmod 664 /sys/class/display/dispc0/PQ/cabc_state + chmod 664 /sys/class/display/dispc0/PQ/cabc_param + chmod 664 /sys/class/display/dispc0/PQ/slp_lut + chmod 664 /sys/class/display/dispc0/PQ/luts_print + chmod 664 /sys/class/display/dispc0/PQ/update_luts + chmod 664 /sys/class/display/dispc0/PQ/ud + chmod 664 /sys/class/display/panel0/resolution + chown system system /sys/class/display/dispc0/PQ/enable + chown system system /sys/class/display/dispc0/PQ/sr_epf + chown system system /sys/class/display/dispc0/PQ/cm + chown system system /sys/class/display/dispc0/PQ/ltm + chown system system /sys/class/display/dispc0/PQ/lut3d + chown system system /sys/class/display/dispc0/PQ/status + chown system system /sys/class/display/dispc0/PQ/cabc_mode + chown system system /sys/class/display/dispc0/PQ/cabc_hist + chown system system /sys/class/display/dispc0/PQ/cabc_hist_v2 + chown system system /sys/class/display/dispc0/PQ/cabc_gain + chown system system /sys/class/display/dispc0/PQ/cabc_bl_fix + chown system system /sys/class/display/dispc0/PQ/cabc_cur_bl + chown system system /sys/class/display/dispc0/PQ/cabc_run + chown system system /sys/class/display/dispc0/PQ/vsync_count + chown system system /sys/class/display/dispc0/PQ/frame_no + chown system system /sys/class/display/dispc0/PQ/cabc_state + chown system system /sys/class/display/dispc0/PQ/cabc_param + chown system system /sys/class/display/dispc0/PQ/slp_lut + chown system system /sys/class/display/dispc0/PQ/luts_print + chown system system /sys/class/display/dispc0/PQ/update_luts + chown system system /sys/class/display/dispc0/PQ/ud + chmod 660 /proc/cptl/wdtirq + chmod 660 /proc/cptl/stop + chmod 660 /proc/cptl/start + chmod 660 /proc/cptl/modem + chmod 660 /proc/cptl/deltanv + chmod 660 /proc/cptl/gdsp + chmod 660 /proc/cptl/ldsp + chmod 660 /proc/cptl/cdsp + chmod 660 /proc/cptl/fixnv + chmod 660 /proc/cptl/runnv + chmod 660 /proc/cptl/cpcmdline + chmod 660 /proc/cptl/modemassert + chmod 440 /proc/cptl/ddr_smem + chmod 440 /proc/pmic/aon_iram + chmod 440 /proc/cptl/ldinfo + chmod 440 /proc/cptl/mini_dump + chmod 440 /proc/cptl/mem + chown system root /proc/cptl/modemassert + chown system root /proc/cptl/ddr_smem + chown system root /proc/pmic/aon_iram + chown system root /proc/cptl/wdtirq + chown system root /proc/cptl/stop + chown system root /proc/cptl/start + chown system root /proc/cptl/modem + chown system root /proc/cptl/deltanv + chown system root /proc/cptl/ldsp + chown system root /proc/cptl/gdsp + chown system root /proc/cptl/cdsp + chown system root /proc/cptl/fixnv + chown system root /proc/cptl/runnv + chown system root /proc/cptl/cpcmdline + chown system root /proc/cptl/ldinfo + chown system system /proc/cptl/mini_dump + chown system system /proc/cptl/mem + chmod 660 /dev/modem + chmod 660 /dev/phycp + chmod 660 /dev/pmsys + chmod 660 /dev/chsys + chmod 660 /dev/mdm_ctrl + chmod 664 /dev/sctl_ch + chmod 444 /sys/devices/platform/spool@0/base_addr + chmod 444 /sys/devices/platform/spool@1/base_addr + chmod 444 /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr + chmod 444 /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr + chown system system /dev/modem + chown system system /dev/phycp + chown system system /dev/pmsys + chown system system /dev/chsys + chown system root /dev/mdm_ctrl + chown system system /dev/sctl_ch + chown system system /sys/devices/platform/spool@0/base_addr + chown system system /sys/devices/platform/spool@1/base_addr + chown system system /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr + chown system system /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr + chmod 660 /dev/cp_dump + chown system system /dev/cp_dump + chmod 0660 /sys/class/modem/debug-log/freq + chmod 0660 /sys/class/modem/debug-log/channel + chown system system /sys/class/modem/debug-log/freq + chown system system /sys/class/modem/debug-log/channel + chmod 0664 /dev/sctl_pm + chmod 0664 /dev/iq_mem + chown system system /dev/iq_mem + chown system system /dev/sctl_pm + chown system system /proc/mdbg + chown system root /proc/mdbg/assert + chown system root /proc/mdbg/wdtirq + chown system system /proc/mdbg/at_cmd + chown system root /proc/mdbg/loopcheck + chmod 770 /proc/mdbg + chmod 760 /proc/mdbg/assert + chmod 760 /proc/mdbg/wdtirq + chmod 760 /proc/mdbg/at_cmd + chmod 760 /proc/mdbg/loopcheck + chown system root /dev/mbox + chown system root /dev/sipc_smsg + chown system root /dev/sipc_smem + chown system root /dev/sipc_sbuf + chown system root /dev/sipc_sblock + chown system root /dev/sipx + chown system system /sys/devices/platform/soc/soc:ipa-apb/soc:ipa-apb:sipa-dele/sipa_dele_reset + chown system system /sys/class/power_supply/battery/charge_control_limit + chmod 0644 /sys/class/backlight/sprd_backlight/max_brightness + chmod 0644 /sys/class/display/backlight/max_brightness + chown system system /sys/class/thermal/thermal_zone4/trip_point_0_temp + chown system system /sys/class/thermal/thermal_zone4/trip_point_1_temp + chown system system /sys/class/thermal/thermal_zone4/user_power_range + chown system system /sys/class/thermal/cooling_device3/min_core_num + chown system system /sys/class/thermal/cooling_device3/min_freq + chown system system /sys/class/thermal/cooling_device3/max_ctrl_temp + chown system system /sys/class/thermal/cooling_device4/min_core_num + chown system system /sys/class/thermal/cooling_device4/min_freq + chown system system /sys/class/thermal/cooling_device4/max_ctrl_temp + chown system system /sys/class/thermal/cooling_device5/min_core_num + chown system system /sys/class/thermal/cooling_device5/min_freq + chown system system /sys/class/thermal/cooling_device5/max_ctrl_temp + chown system system /sys/class/thermal/thermal_zone4/policy + chmod 660 /sys/class/thermal/thermal_zone4/policy + chown system system /sys/class/thermal/thermal_zone4/thm_enable + chmod 660 /sys/class/thermal/thermal_zone3/thm_enable + chmod 660 /sys/class/devfreq/scene-frequency/sprd-governor/auto_dfs_on_off + chmod 660 /sys/class/devfreq/scene-frequency/sprd-governor/scaling_force_ddr_freq + chmod 220 /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs + chown cameraserver system /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs + chmod 220 /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene + chown cameraserver system /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene + chmod 220 /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs + chown cameraserver system /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs + chmod 220 /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set + chown cameraserver system /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set + chown system system /sys/class/power_supply/battery/stop_charge + chmod 0664 /sys/class/power_supply/battery/stop_charge + chown root system /sys/class/power_supply/battery/charger.0/stop_charge + chown root system /sys/class/power_supply/battery/charger.0/enable_power_path + chmod 0664 /sys/class/power_supply/battery/charger.0/stop_charge + chmod 0664 /sys/class/power_supply/battery/charger.0/enable_power_path + chmod 660 /sys/class/power_supply/battery/charger.0/jeita_control + chmod 660 /sys/class/power_supply/battery/charger.0/keep_awake + chmod 0666 /sys/class/power_supply/sprdfgu/cc_test_cmd + chmod 660 /sys/class/power_supply/battery/input_current_limit + chmod 660 /sys/class/power_supply/battery/constant_charge_current + chmod 660 /proc/pmic/stop + chmod 660 /proc/pmic/start + chmod 660 /proc/pmic/pm_sys + chmod 440 /proc/pmic/mem + chmod 660 /proc/pmic/status + chmod 660 /proc/pmic/wdtirq + chmod 660 /proc/pmic/ldinfo + chown system root /proc/pmic/stop + chown system root /proc/pmic/start + chown system root /proc/pmic/pm_sys + chown system root /proc/pmic/mem + chown system root /proc/pmic/status + chown system root /proc/pmic/wdtirq + chown system root /proc/pmic/cali_lib + chown system root /proc/pmic/ldinfo + chown system root /sys/bus/iio/devices/trigger0/name + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/buffer + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger + chmod 660 /sys/bus/iio/devices/trigger0/name + chmod 660 /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length + chmod 660 /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable + chmod 660 /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/name + chmod 660 /sys/class/sprd_sensorhub/sensor_hub/iio/name + chown system root /sys/module/sensorhub/parameters/gryo_firms + chown system root /sys/module/sensorhub/parameters/acc_firms + chown system root /sys/module/sensorhub/parameters/mag_firms + chown system root /sys/module/sensorhub/parameters/pressure_firms + chown system root /sys/module/sensorhub/parameters/light_firms + chown system root /sys/module/sensorhub/parameters/prox_firms + chown system root /sys/module/sensorhub/parameters/color_temp_firms + chown system root /sys/module/firmware_class/parameters/path + chmod 660 /sys/module/sensorhub/parameters/gryo_firms + chmod 660 /sys/module/sensorhub/parameters/acc_firms + chmod 660 /sys/module/sensorhub/parameters/mag_firms + chmod 660 /sys/module/sensorhub/parameters/pressure_firms + chmod 660 /sys/module/sensorhub/parameters/light_firms + chmod 660 /sys/module/sensorhub/parameters/prox_firms + chmod 660 /sys/module/sensorhub/parameters/color_temp_firms + chmod 660 /sys/module/firmware_class/parameters/path + chown system root /sys/bus/iio/devices/trigger0/name + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/buffer + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger + chmod 660 /sys/bus/iio/devices/trigger0/name + chmod 660 /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length + chmod 660 /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable + chmod 660 /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger + chown system root /sys/class/sprd_sensorhub/sensor_hub/iio/name + chmod 660 /sys/class/sprd_sensorhub/sensor_hub/iio/name + chown system root /sys/module/sensorhub/parameters/gryo_firms + chown system root /sys/module/sensorhub/parameters/acc_firms + chown system root /sys/module/sensorhub/parameters/mag_firms + chown system root /sys/module/sensorhub/parameters/pressure_firms + chown system root /sys/module/sensorhub/parameters/light_firms + chown system root /sys/module/sensorhub/parameters/prox_firms + chown system root /sys/module/sensorhub/parameters/color_temp_firms + chown system root /sys/module/firmware_class/parameters/path + chmod 660 /sys/module/sensorhub/parameters/gryo_firms + chmod 660 /sys/module/sensorhub/parameters/acc_firms + chmod 660 /sys/module/sensorhub/parameters/mag_firms + chmod 660 /sys/module/sensorhub/parameters/pressure_firms + chmod 660 /sys/module/sensorhub/parameters/light_firms + chmod 660 /sys/module/sensorhub/parameters/prox_firms + chmod 660 /sys/module/sensorhub/parameters/color_temp_firms + chmod 660 /sys/module/firmware_class/parameters/path + chmod 664 /sys/class/leds/sc27xx:red/brightness + chmod 664 /sys/class/leds/sc27xx:green/brightness + chmod 664 /sys/class/leds/sc27xx:blue/brightness + chmod 664 /sys/class/leds/sc27xx:red/trigger + chmod 664 /sys/class/leds/sc27xx:green/trigger + chmod 664 /sys/class/leds/sc27xx:blue/trigger + chown root system /sys/class/leds/sc27xx:red/brightness + chown root system /sys/class/leds/sc27xx:green/brightness + chown root system /sys/class/leds/sc27xx:blue/brightness + chown root system /sys/class/leds/sc27xx:red/trigger + chown root system /sys/class/leds/sc27xx:green/trigger + chown root system /sys/class/leds/sc27xx:blue/trigger + chmod 220 /sys/class/misc/gnss_common_ctl/gnss_power_enable + chmod 660 /sys/class/misc/gnss_common_ctl/gnss_dump + chmod 660 /sys/class/misc/gnss_common_ctl/gnss_subsys + chown system system /sys/class/misc/gnss_common_ctl/gnss_power_enable + chown system system /sys/class/misc/gnss_common_ctl/gnss_dump + chown system system /sys/class/misc/gnss_common_ctl/gnss_subsys + chmod 664 /sys/touchscreen/ts_suspend + chown root system /sys/touchscreen/ts_suspend + chown system system /dev/cpuctl + chown system system /dev/cpuctl/foreground + chown system system /dev/cpuctl/background + chown system system /dev/cpuctl/top-app + chown system system /dev/cpuctl/rt + chown system system /dev/cpuctl/tasks + chown system system /dev/cpuctl/foreground/tasks + chown system system /dev/cpuctl/background/tasks + chown system system /dev/cpuctl/top-app/tasks + chown system system /dev/cpuctl/rt/tasks + chmod 0664 /dev/cpuctl/tasks + chmod 0664 /dev/cpuctl/foreground/tasks + chmod 0664 /dev/cpuctl/background/tasks + chmod 0664 /dev/cpuctl/top-app/tasks + chmod 0664 /dev/cpuctl/rt/tasks + chown media system /sys/kernel/hmp/boost + chown system system /sys/kernel/hmp/boostpulse + chown media system /sys/kernel/hmp/packing_boost + chown system system /sys/kernel/hmp/packing_boostpulse + chown system system /sys/kernel/hmp/boostpulse_duration + chmod 660 /sys/kernel/hmp/boost + chmod 660 /sys/kernel/hmp/boostpulse + chmod 660 /sys/kernel/hmp/packing_boost + chmod 660 /sys/kernel/hmp/packing_boostpulse + chmod 660 /sys/kernel/hmp/boostpulse_duratio + chown system system /sys/devices/system/cpu/cpuhotplug/boostpulse + chown system system /sys/devices/system/cpu/cpuhotplug/boostpulse_duration + chmod 0660 /sys/devices/system/cpu/cpuhotplug/boostpulse + chmod 0660 /sys/devices/system/cpu/cpuhotplug/boostpulse_duration + chown system system /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit + chown system system /sys/devices/system/cpu/cpuhotplug/cluster0_core_min_limit + chmod 0660 /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit + chmod 0660 /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit + chown system system /dev/cluster0_freq_min + chown system system /dev/cluster0_freq_max + chown system system /dev/cluster1_freq_min + chown system system /dev/cluster1_freq_max + chmod 0660 /dev/cluster0_freq_min + chmod 0660 /dev/cluster0_freq_max + chmod 0660 /dev/cluster1_freq_min + chmod 0660 /dev/cluster1_freq_max + chown system system /sys/devices/system/cpu/cpufreq/policy0/scaling_governor + chown system system /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed + chmod 664 /sys/devices/system/cpu/cpufreq/policy0/scaling_governor + chown system system /sys/devices/system/cpu/cpufreq/policy4/scaling_governor + chown system system /sys/devices/system/cpu/cpufreq/policy4/scaling_setspeed + chmod 664 /sys/devices/system/cpu/cpufreq/policy4/scaling_governor + chown system system /proc/sprd_sysdump + chown system system /dev/tmc_etb + chmod 660 /dev/tmc_etb + chmod 0660 /dev/sprd_bm + chmod 0660 /dev/dmc_mpu + chown system system /dev/sprd_bm + chown system system /dev/dmc_mpu + chmod 664 /sys/class/modem/serdes0/channel + chmod 664 /sys/class/modem/serdes1/channel + chown system system /sys/class/modem/serdes0/channel + chown system system /sys/class/modem/serdes1/channel + chmod 664 /sys/class/modem/serdes0/freq + chmod 664 /sys/class/modem/serdes1/freq + chown system system /sys/class/modem/serdes0/freq + chown system system /sys/class/modem/serdes1/freq + chown system audio /dev/rt5512 + chmod 660 /dev/rt5512 + chmod 644 /proc/reserve_space/black_list + chmod 644 /proc/reserve_space/white_list + chmod 644 /proc/reserve_space/black_list_comm + chmod 640 /proc/reserve_space/white_list_comm + chmod 644 /proc/reserve_space/app_guid + chown system system /sys/class/leds/skey0/mode_operation + chown system system /sys/class/leds/skey0/sensy_config + chown system system /sys/class/leds/skey0/aot_cali + chown system system /sys/class/leds/skey1/mode_operation + chown system system /sys/class/leds/skey1/sensy_config + chown system system /sys/class/leds/skey1/aot_cali + chmod 660 /sys/class/leds/skey0/mode_operation + chmod 660 /sys/class/leds/skey0/sensy_config + chmod 660 /sys/class/leds/skey0/aot_cali + chmod 660 /sys/class/leds/skey1/mode_operation + chmod 660 /sys/class/leds/skey1/sensy_config + chmod 660 /sys/class/leds/skey1/aot_cali + chown root system /sys/block/zram0/writeback_limit + chmod 0664 /sys/block/zram0/writeback_limit + chown root system /sys/block/zram0/writeback_limit_enable + chmod 0664 /sys/block/zram0/writeback_limit_enable + chmod 0660 /sys/class/leds/aw_led/groupcolor + chown system system /sys/class/leds/aw_led/groupcolor + chown system system /proc/touchscreen/wake_gesture + chmod 644 /proc/touchscreen/wake_gesture + chown system system /proc/touchscreen/smart_cover + chmod 644 /proc/touchscreen/smart_cover + chmod 0664 /proc/touchscreen/screen_state_interface + chown system system /proc/touchscreen/screen_state_interface + chown system system /sys/bus/platform/devices/zte_touch/uevent + chown system system /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd + chown system system /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename + chown system system /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path + chown system system /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path + chown system system /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name + chown system system /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration + chown system system /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start + chmod 0646 /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd + chmod 0646 /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename + chmod 0646 /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path + chmod 0646 /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path + chmod 0646 /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name + chmod 0646 /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration + chmod 0646 /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start + chmod 0646 /dev/gtp_tools + chown system system /sys/class/tp_ps/enable + chown system system /sys/class/tp_ps/delay + chown system system /sys/class/tp_ps/batch + chown system system /sys/class/tp_ps/flush + chmod 664 /sys/class/tp_ps/enable + chmod 664 /sys/class/tp_ps/delay + chmod 664 /sys/class/tp_ps/batch + chmod 664 /sys/class/tp_ps/flush diff --git a/android-vendor/ueventd/ueventd.rc b/android-vendor/ueventd/ueventd.rc new file mode 100644 index 00000000..50580464 --- /dev/null +++ b/android-vendor/ueventd/ueventd.rc @@ -0,0 +1,118 @@ +# The /dev rules of the F50's /vendor/etc/ueventd.rc (the lines gen-ueventd-perms.py reads), in their order. +# Taken from the device's own file (android-vendor/extract-subset.sh puts it in android-subset/vendor/etc). +/dev/apipe-pcm 0660 system audio +/dev/apipe-cmd-in 0660 system audio +/dev/apipe-cmd-out 0660 system audio +/dev/vbc_turning 0660 audioserver audio +/dev/vbc_turning* 0660 audioserver audio +/dev/block/by-name/l_agdsp_a 0660 audioserver audio +/dev/block/by-name/l_agdsp_b 0660 audioserver audio +/dev/audio_dsp* 666 audioserver audio +/dev/audio_pipe* 660 audioserver audio +/dev/audio_dsp_call_info 0660 audioserver audio +/dev/block/by-name/logo 0660 system system +/dev/block/by-name/nr_* 0660 system system +/dev/block/by-name/calinv 0660 system system +/dev/block/by-name/pm_sys* 0660 system system +/dev/block/by-name/ch_sys* 0660 system system +/dev/vdsp* 660 cameraserver system +/dev/iio:device* 0660 system root +/dev/data0_gnss 0666 system system +/dev/block/by-name/gnssmodem_a 0660 system root +/dev/block/by-name/gnssmodem_b 0660 system root +/dev/sttygnss0 0660 system system +/dev/spipe_gnss0 0660 system system +/dev/spipe_gnss1 0660 system system +/dev/stime_pm 0660 system system +/dev/stime_ch 0660 system system +/dev/wcn_gnss_dump 0660 system system +/dev/slog_gnss 0660 system system +/dev/slog_wcn0 0660 system system +/dev/ttyS3 0660 system system +/dev/ttyS4 0660 system system +/dev/ttyS0 0660 system system +/dev/gnss_pmnotify_ctl 0660 system system +/dev/power_ctl 0660 system system +/dev/gnss_dbg 0660 system system +/dev/fm 0660 media media +/dev/ttyM0 0660 bluetooth net_bt_admin +/dev/ttyM1 0660 bluetooth net_bt_admin +/dev/trusty-ipc-dev0 0660 system system +/dev/tshm 0660 system system +/dev/tui_dev 0660 system system +/dev/madev0 0660 system system +/dev/sttybt0 0660 bluetooth net_bt_admin +/dev/ttyBT0 0660 bluetooth net_bt_admin +/dev/trusty-ipc-dev0 0660 system system +/dev/stty_lte* 0660 radio system +/dev/slog_lte 0660 system system +/dev/slog_pm 0660 system system +/dev/slog_ch 0660 system system +/dev/sctl_pm 0660 system system +/dev/sctl_ch 0660 system system +/dev/sdiag_lte 0660 system system +/dev/slog_ldsp 0660 system system +/dev/spipe_lte* 0660 system system +/dev/sprd_time_sync 0660 system system +/dev/spipe_lte5 0660 radio system +/dev/spipe_lte4 0660 media audio +/dev/spipe_lte6 0660 media audio +/dev/spipe_lte9 0660 radio radio +/dev/spipe_lte14 0660 audioserver audio +/dev/spipe_pm* 0666 system system +/dev/spipe_ch* 0660 system system +/dev/snv_lte 0660 system system +/dev/stty_nr* 0660 radio system +/dev/slog_nr 0660 system system +/dev/slog_phy 0660 system system +/dev/sdiag_nr 0660 system system +/dev/spipe_nr* 0660 system system +/dev/spipe_nr5 0660 radio system +/dev/spipe_nr4 0660 media audio +/dev/spipe_nr6 0660 media audio +/dev/spipe_nr9 0660 radio radio +/dev/spipe_nr14 0660 media audio +/dev/snv_nr 0660 system system +/dev/vser 0660 system system +/dev/ttyGS* 0660 system system +/dev/ion 0666 system graphics +/dev/sprd_ion 0666 system graphics +/dev/sprd_dmabuf 0666 system graphics +/dev/dma_heap/uncached_carveout_mm 0666 system graphics +/dev/dma_heap/uncached_carveout_oem 0666 system graphics +/dev/dma_heap/carveout_fd 0666 system graphics +/dev/gsp 0660 system graphics +/dev/mali0 0666 system graphics +/dev/pvr_sync 0666 system graphics +/dev/sprd_jpg 0666 system camera +/dev/sprd_jpg1 0660 system camera +/dev/sprd_vsp 0660 system camera +/dev/vdma 0660 system camera +/dev/vpu_enc0 0660 system camera +/dev/vpu_enc1 0660 system camera +/dev/sprd_vpp 0660 system camera +/dev/sprd_vsp_enc 0660 system camera +/dev/sprd_image 0660 system camera +/dev/sprd_isp 0660 system camera +/dev/sprd_sensor 0660 system camera +/dev/sprd_cpp 0660 system camera +/dev/input/event* 0660 system input +/dev/map_user 0660 system system +/dev/iio:device* 0660 system system +/dev/rtc* 0660 system system +/dev/block/by-name/gnssmodem 0660 system root +/dev/block/by-name/gnssmodem_a 0660 system root +/dev/rpmb0 0660 system system +/dev/tmc_etb 0660 system system +/dev/pn553 0660 nfc system +/dev/st21nfc 0660 nfc system +/dev/st54spi 0660 nfc system +/dev/block/by-name/miscdata 0660 root system +/dev/block/by-name/persist 0660 system system +/dev/block/by-name/sysdumpdb 0660 system system +/dev/block/by-name/fulldumpdb 0660 system system +/dev/block/mmcblk1p* 0660 root system +/dev/block/mmcblk0rpmb 0660 system system +/dev/mmcblk0rpmb 0660 system system +/dev/block/memdisk0p1 0770 system system +/dev/block/pmem0 0770 system system diff --git a/arch/build-rootfs.sh b/arch/build-rootfs.sh index 3b6fbc7e..0f551404 100755 --- a/arch/build-rootfs.sh +++ b/arch/build-rootfs.sh @@ -94,6 +94,9 @@ ln -sfn /run/systemd/resolve/stub-resolv.conf $R/etc/resolv.conf id -u ubuntu >/dev/null 2>&1 || true chroot $R /usr/bin/useradd -m -s /bin/bash -G wheel ubuntu 2>/dev/null || true echo "%wheel ALL=(ALL:ALL) ALL" > $R/etc/sudoers.d/wheel; chmod 440 $R/etc/sudoers.d/wheel +# the Android vendor daemons own system account (android-run): uid 1000 is alarm here +chroot $R /usr/bin/useradd --system --user-group --no-create-home --home-dir /nonexistent --shell /usr/bin/nologin \ + --comment "MU300 Android vendor daemons" mu300vnd 2>/dev/null || true # services: same set the Ubuntu image enables for u in mu300-vendor.service:sysinit.target mu300-lan.service:multi-user.target mu300-ssh-hostkeys.service:sysinit.target \ diff --git a/docs/FINDINGS.md b/docs/FINDINGS.md index 9b172f91..b4ea9dd9 100644 --- a/docs/FINDINGS.md +++ b/docs/FINDINGS.md @@ -178,7 +178,8 @@ The UDC only appears when the whole chain probes, in this order: libraries. Requirements that were each discovered by failure: 1. Copy `/dev/__properties__` from a running Android so property reads work. 2. Create `/dev/block/by-name` links and apply Android's node ownership (`ueventd.rc` plus `chown`/`chmod` - from vendor `init*.rc`), because `modem_control` drops to uid `system` (1000). + from vendor `init*.rc`), because `modem_control` drops to uid `system` (1000). (On a distribution it starts as + the account `mu300vnd` instead and the nodes are that account's: 40.) 3. Bind-mount a copy of `/proc/cmdline` with `androidboot.slot_suffix=_a` so it loads the `_a` modem images (LK passes `_b` when booting the trial slot). 4. **Exec the binary directly.** `sprd_modem_loader` rejects every ioctl/write unless `current->comm` is @@ -781,7 +782,8 @@ buffers to the bus and leave when there is no tx context yet. * `docker export` leaves an empty `/etc/resolv.conf`: `resolvectl query` works but glibc programs cannot resolve names. Link it to `../run/systemd/resolve/stub-resolv.conf`. * busybox/toybox tar drop xattrs, so `ping` loses `cap_net_raw`; `mu300-fixups.service` restores it. -* Android's uid `system` (1000) is also Ubuntu's first user, so modem device nodes show up as owned by `ubuntu`. +* Android's uid `system` (1000) is also Ubuntu's first user, so modem device nodes showed up as owned by `ubuntu` - + writable by it, the modem's calibration among them. Fixed in 40: they are the vendor account's (`mu300vnd`) now. ### 26b. The tunnel needs sing-box's gvisor stack on this kernel **2026-10-09: the VPN moved to its own repository.** `mu300-vpn`, its drivers and engines are the module of @@ -3246,3 +3248,49 @@ brings it back for a while. Read in the code, not measured on a device: (`ndp -p`: pltime 0, vltime 7200) while the live /64 stayed preferred and the default router stayed; a WAN restart that got the same /64 back withdrew nothing. Not measured: a real carrier renumber (the carrier here kept its /64 across WAN restarts), and a second relay behind the device, which forwards the RA like any other. + +## Security + +### 40. The vendor daemons' own account + +Found on an F50 (Ubuntu 24.04, kernel 7.2.9): `/dev/disk/by-partlabel/nr_fixnv1_a` (the modem's calibration NV, which +nothing can restore) and `persist` were `ubuntu:ubuntu 0660`, so any process of the login user could overwrite them +without sudo; `/dev/data0_gnss` and `/dev/mali0` were `0666`, and so were `spipe_pm*`, `ion`, `dma_heap/*`, ... +where the kernel has them. `modem_control` and `refnotify` ran as `ubuntu` too: the login user could ptrace them +(`modem_control` keeps `CAP_CHOWN` and `CAP_BLOCK_SUSPEND`, `refnotify` `CAP_SYS_TIME`). + +* Cause: `gen-ueventd-perms.py` translated Android's ids as numbers. Android's `system` is uid 1000, and uid 1000 is + the first human account on a distribution (`ubuntu`; `alarm` on Arch). Modes were taken over as they were, `0666` + included. +* The number is in the binaries. Both daemons begin `main` with `switchUserToSystem`: `setgroups` (1000 1001 2000 + 3010), `prctl(PR_SET_KEEPCAPS)`, `setuid(0x3e8)` (an immediate in the code, `mov w0, #0x3e8`), then `capset` down to + what they keep. They never call `setgid` (they ran with gid 0) and nothing else checks the uid (`getuid` is not + even imported). A failed `setgroups` or `setuid` is logged (`setgroups failed`, `uidset failed`) and they carry on. +* Fix: a system account `mu300vnd` (the images: `rootfs/assemble.sh`, `arch/build-rootfs.sh`; a system without it: + `android-vendor-start` makes it before anything else uses it). `android-run` starts the two daemons as it with + `setpriv`: no other groups, no new privileges, and only the capabilities they keep on Android plus `CAP_SYS_CHROOT` + for `chroot`, which their own `capset` drops - their `setuid(1000)` then fails, harmlessly. `android-vendor-start` + starts `modem_control` through `android-run` (still an exec, so the task name stays `modem_control`). + `cp_diskserver` never switches users on Android either and stays root. +* `ueventd-perms.sh`: `system` and `radio` become `mu300vnd` (owner `$V`, group `$VG`), `graphics` the `video` group + (the GPU's nodes `root:video 0660`), every other Android id root. No node is left with bits for others, nothing is + writable by everyone, a node that is root's alone is `0600`. Left as Linux has them: input events, the USB serial + console `ttyGS*`, and `firmware_class`'s path (whoever writes it chooses the firmware the kernel loads). The RTC + stays root's but is the vendor group's: `refnotify` opens `/dev/rtc0` (`root:root 0660`), which it reached through + gid 0 before ("RefNotify open /dev/rtc0 failed, error: Permission denied" until it was). The ids are looked up when + the script runs, in `/etc/passwd` and `/etc/group`; without the account (OpenWrt, the initramfs: no account at + 1000 there) it is uid/gid 1000, which the daemons switch to themselves, and the GPU's group is root. +* The generator's inputs are in `android-vendor/ueventd/` now (the `/dev` rules of the device's `ueventd.rc` and the + `chown`/`chmod` lines of its vendor init `*.rc`), and a test checks the committed script is the generator's. +* Updates: `mu300-update` takes the new image's `/etc/passwd` and adds the old system's human accounts, so an updated + system has the image's `mu300vnd`; the nodes are handed out by name at every boot, so its uid does not matter. +* Measured on F50-B (Ubuntu 24.04, 7.2.9, no SIM), the three files replaced on a v2026.10.18 system: the account + made at boot (`mu300vnd` 999/991); `modem_control` and `refnotify` Uid 999, Gid 991, no groups, NoNewPrivs 1, + CapEff `0x1000000001` and `0x2000000` (as on Android); `cp_diskserver` root; the modem booted (`modem@0..2 start + over`), `AT` OK, `+CFUN: 1`, `+CPIN` `+CME ERROR: 10` (no SIM, as before), `AT+CGMR` answers; `nr_fixnv1_a` and + `persist` `mu300vnd:mu300vnd 0660` and `head` on them as `ubuntu` "Permission denied"; no world-writable node in + `/dev` besides the standard ones, nothing in `/dev` or `/sys` owned by uid 1000; `mali0` `root:video 0660` and + `cltest` (OpenCL) passes; Wi-Fi client still connected; `timedatectl` reads the RTC; up past the PM watchdog's + ~290 s. The vendor log has the same errors as before the change (no `/dev/cp_dump`, no `/proc/bootconfig`, no + property service) plus the two logged failed switches. Not measured: the 5.4 kernel, OpenWrt (unchanged there but + for the modes), the modem with a SIM. diff --git a/rootfs/assemble.sh b/rootfs/assemble.sh index 806862b9..3222b83e 100755 --- a/rootfs/assemble.sh +++ b/rootfs/assemble.sh @@ -30,6 +30,11 @@ done rm -rf $R && mkdir -p $R tar -xf /w/base.tar -C $R cp -a /w/overlay/. $R/ +# the Android vendor daemons' own system account (android-run, ueventd-perms.sh): Android's system user is uid 1000, +# which here is ubuntu's. mu300-update carries the image's system accounts into an updated system, so updated +# systems have it too (android-vendor-start makes it on one that does not). +grep -q '^mu300vnd:' $R/etc/passwd || useradd --root $R --system --user-group --no-create-home --home-dir /nonexistent \ + --shell /usr/sbin/nologin --comment 'MU300 Android vendor daemons' mu300vnd # /lib is a symlink to usr/lib on Ubuntu; always write through usr/lib mkdir -p $R/usr/lib/modules/$KREL/extra cp /kmods/*.ko $R/usr/lib/modules/$KREL/extra/ diff --git a/rootfs/overlay/opt/mu300/bin/android-run b/rootfs/overlay/opt/mu300/bin/android-run index b50ca160..63d2bc66 100755 --- a/rootfs/overlay/opt/mu300/bin/android-run +++ b/rootfs/overlay/opt/mu300/bin/android-run @@ -2,9 +2,26 @@ # Run an Android vendor daemon inside the chroot prepared by android-vendor-start (mu300-vendor.service). # The binary is exec'd directly so its task name (comm) matches what vendor drivers expect. set -e -A=/opt/mu300/android +A=${MU300_ANDROID:-/opt/mu300/android} for n in $(seq 1 60); do mountpoint -q $A/dev && break; sleep 1; done # OpenWrt's procd preloads /lib/libsetlbf.so into services; the bionic linker in the chroot cannot load it unset LD_PRELOAD export LD_LIBRARY_PATH=/apex/com.android.runtime/lib64/bionic:/system/lib64:/vendor/lib64 +# modem_control and refnotify switch to Android's system user themselves, right at the start: setgroups, then +# setuid(1000) - the number is in the binaries - then capset down to what they keep. On a distribution uid 1000 is +# the first human account (ubuntu; alarm on Arch), which then owned the daemons and every node they use, the modem's +# calibration partitions among them (FINDINGS: "The vendor daemons' own account"). Where the system has the vendor +# account (mu300vnd, see android-vendor-start) they start as it instead, with no other groups and only the +# capabilities they keep on Android (plus chroot's, which their capset drops): their setgroups and setuid(1000) +# then fail - they log it and carry on, as mu300vnd. cp_diskserver never switches: it stays root. +case $1 in + modem_control) caps=chown,block_suspend ;; + refnotify) caps=sys_time ;; + *) caps= ;; +esac +if [ -n "$caps" ] && grep -q '^mu300vnd:' "${MU300_ETC:-/etc}/passwd" 2>/dev/null && command -v setpriv >/dev/null 2>&1; then + c=-all,+sys_chroot,+$(echo "$caps" | sed 's/,/,+/g') + exec setpriv --reuid=mu300vnd --regid=mu300vnd --clear-groups --no-new-privs \ + --inh-caps="$c" --ambient-caps="$c" --bounding-set="$c" chroot $A /vendor/bin/"$1" +fi exec chroot $A /vendor/bin/"$1" diff --git a/rootfs/overlay/opt/mu300/bin/android-vendor-start b/rootfs/overlay/opt/mu300/bin/android-vendor-start index 57e2d162..f79ec76d 100755 --- a/rootfs/overlay/opt/mu300/bin/android-vendor-start +++ b/rootfs/overlay/opt/mu300/bin/android-vendor-start @@ -55,6 +55,18 @@ for b in "$SYS"/block/mmcblk*; do done # --- emmc end [ -z "$E" ] || link_partitions /sys/class/block /dev "$E" +# The vendor daemons' own account, before the nodes are handed to it (ueventd-perms.sh) and the daemons start as it +# (android-run): Android's system user is uid 1000, and that is the first human account on a distribution. The image +# has it; this makes it on a system that does not (an image from before it, or useradd's run in the build failed). +# Only where useradd is (not OpenWrt, which has no account at 1000); a failure leaves the daemons at uid 1000. +# --- account begin +if ! grep -q '^mu300vnd:' "${MU300_ETC:-/etc}/passwd" 2>/dev/null && command -v useradd >/dev/null 2>&1; then + nologin=/usr/sbin/nologin; [ -x $nologin ] || nologin=/usr/bin/nologin + useradd --system --user-group --no-create-home --home-dir /nonexistent --shell $nologin \ + --comment 'MU300 Android vendor daemons' mu300vnd || + echo "android-vendor-start: could not create the mu300vnd account; the vendor daemons run as uid 1000" >&2 +fi +# --- account end sh /opt/mu300/bin/ueventd-perms.sh mark vendor-perms for m in dev proc sys; do mkdir -p $A/$m; done @@ -78,9 +90,7 @@ case $L in a) AS=b ;; *) L=b; AS=a ;; esac # --- slot end tr -d '\000' < $src | sed "s/androidboot.slot_suffix=_$L/androidboot.slot_suffix=_$AS/" > /run/mu300-cmdline.android mount --bind /run/mu300-cmdline.android $A/proc/cmdline -# sprd_modem_loader only accepts a task whose comm is exactly "modem_control": exec it directly -# OpenWrt's procd preloads /lib/libsetlbf.so into services; the bionic linker in the chroot cannot load it -unset LD_PRELOAD -export LD_LIBRARY_PATH=/apex/com.android.runtime/lib64/bionic:/system/lib64:/vendor/lib64 mark vendor-chroot-ready -exec chroot $A /vendor/bin/modem_control +# sprd_modem_loader only accepts a task whose comm is exactly "modem_control": android-run execs it directly, as the +# vendor account where there is one +exec /opt/mu300/bin/android-run modem_control diff --git a/rootfs/overlay/opt/mu300/bin/ueventd-perms.sh b/rootfs/overlay/opt/mu300/bin/ueventd-perms.sh index 12070fff..1b5cd433 100755 --- a/rootfs/overlay/opt/mu300/bin/ueventd-perms.sh +++ b/rootfs/overlay/opt/mu300/bin/ueventd-perms.sh @@ -1,150 +1,160 @@ #!/bin/sh -# generated from vendor/etc/ueventd.rc: apply Android device node ownership on plain Linux -for n in /dev/apipe-pcm; do [ -e "$n" ] && chown 1000:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/apipe-cmd-in; do [ -e "$n" ] && chown 1000:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/apipe-cmd-out; do [ -e "$n" ] && chown 1000:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/vbc_turning; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/vbc_turning*; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/l_agdsp_a; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/l_agdsp_b; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/audio_dsp*; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 666 "$n"; done -for n in /dev/audio_pipe*; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 660 "$n"; done -for n in /dev/audio_dsp_call_info; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/logo; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/nr_*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/calinv; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/pm_sys*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/ch_sys*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/vdsp*; do [ -e "$n" ] && chown 1047:1000 "$n" && chmod 660 "$n"; done -for n in /dev/iio:device*; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/data0_gnss; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0666 "$n"; done -for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/gnssmodem_b; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/sttygnss0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_gnss0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_gnss1; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/stime_pm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/stime_ch; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/wcn_gnss_dump; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_gnss; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_wcn0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyS3; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyS4; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyS0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/gnss_pmnotify_ctl; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/power_ctl; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/gnss_dbg; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/fm; do [ -e "$n" ] && chown 1013:1013 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyM0; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyM1; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done -for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/tshm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/tui_dev; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/madev0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sttybt0; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyBT0; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done -for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/stty_lte*; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_lte; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_pm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_ch; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sctl_pm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sctl_ch; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sdiag_lte; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_ldsp; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_time_sync; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte5; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte4; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte6; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte9; do [ -e "$n" ] && chown 1001:1001 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_lte14; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_pm*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0666 "$n"; done -for n in /dev/spipe_ch*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/snv_lte; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/stty_nr*; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_nr; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/slog_phy; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/sdiag_nr; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr5; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr4; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr6; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr9; do [ -e "$n" ] && chown 1001:1001 "$n" && chmod 0660 "$n"; done -for n in /dev/spipe_nr14; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done -for n in /dev/snv_nr; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/vser; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ttyGS*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/ion; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/sprd_ion; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/sprd_dmabuf; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/dma_heap/uncached_carveout_mm; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/dma_heap/uncached_carveout_oem; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/dma_heap/carveout_fd; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/gsp; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0660 "$n"; done -for n in /dev/mali0; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/pvr_sync; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done -for n in /dev/sprd_jpg; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0666 "$n"; done -for n in /dev/sprd_jpg1; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_vsp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/vdma; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/vpu_enc0; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/vpu_enc1; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_vpp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_vsp_enc; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_image; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_isp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_sensor; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/sprd_cpp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done -for n in /dev/input/event*; do [ -e "$n" ] && chown 1000:1004 "$n" && chmod 0660 "$n"; done -for n in /dev/map_user; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/iio:device*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/gnssmodem; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done -for n in /dev/rpmb0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/tmc_etb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/pn553; do [ -e "$n" ] && chown 1027:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/st21nfc; do [ -e "$n" ] && chown 1027:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/st54spi; do [ -e "$n" ] && chown 1027:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/miscdata; do [ -e "$n" ] && chown 0:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/persist; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/sysdumpdb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/by-name/fulldumpdb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/mmcblk*rpmb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/mmcblk*rpmb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done -for n in /dev/block/memdisk0p1; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0770 "$n"; done -for n in /dev/block/pmem0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0770 "$n"; done +# generated by gen-ueventd-perms.py: Android device node ownership on plain Linux +# The vendor daemons' account (android-run starts them as it); without one (OpenWrt, the initramfs) the uid and gid +# 1000 they switch to themselves. The GPU's group: video, else root. +id_of() { # id_of NAME FILE: the id (third field) of NAME in FILE (passwd or group format), nothing if none + [ -r "$2" ] || return 0 + while IFS=: read -r n _ i _ || [ -n "$n" ]; do [ "$n" = "$1" ] && { echo "$i"; return 0; }; done < "$2" + return 0 +} +E=${MU300_ETC:-/etc} +V=$(id_of mu300vnd "$E/passwd"); V=${V:-1000} +VG=$(id_of mu300vnd "$E/group"); VG=${VG:-1000} +GPU=$(id_of video "$E/group"); GPU=${GPU:-0} +for n in /dev/apipe-pcm; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/apipe-cmd-in; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/apipe-cmd-out; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/vbc_turning; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/vbc_turning*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/block/by-name/l_agdsp_a; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/block/by-name/l_agdsp_b; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/audio_dsp*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/audio_pipe*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/audio_dsp_call_info; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/block/by-name/logo; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/nr_*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/calinv; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/pm_sys*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/ch_sys*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/vdsp*; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/iio:device*; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/data0_gnss; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem_b; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sttygnss0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_gnss0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_gnss1; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/stime_pm; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/stime_ch; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/wcn_gnss_dump; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_gnss; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_wcn0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ttyS3; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ttyS4; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ttyS0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/gnss_pmnotify_ctl; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/power_ctl; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/gnss_dbg; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/fm; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/ttyM0; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/ttyM1; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/tshm; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/tui_dev; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/madev0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sttybt0; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/ttyBT0; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/stty_lte*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_lte; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_pm; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_ch; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sctl_pm; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sctl_ch; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sdiag_lte; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_ldsp; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_time_sync; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte5; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte4; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_lte6; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_lte9; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte14; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_pm*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_ch*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/snv_lte; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/stty_nr*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_nr; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/slog_phy; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/sdiag_nr; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr5; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr4; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_nr6; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/spipe_nr9; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr14; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done +for n in /dev/snv_nr; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/vser; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ion; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_ion; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_dmabuf; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/dma_heap/uncached_carveout_mm; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/dma_heap/uncached_carveout_oem; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/dma_heap/carveout_fd; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/gsp; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/mali0; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/pvr_sync; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_jpg; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_jpg1; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_vsp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/vdma; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/vpu_enc0; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/vpu_enc1; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_vpp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_vsp_enc; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_image; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_isp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_sensor; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_cpp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/map_user; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/iio:device*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/rtc*; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/rpmb0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/tmc_etb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/pn553; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/st21nfc; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/st54spi; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/miscdata; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/persist; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/sysdumpdb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/fulldumpdb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/mmcblk*rpmb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/mmcblk*rpmb; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/block/memdisk0p1; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0770 "$n"; done +for n in /dev/block/pmem0; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0770 "$n"; done # chown/chmod from vendor init *.rc (Android init applies these after ueventd) -for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0666 "$n"; done -for n in /sys/power/wakeup_count; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/module/zte_misc/parameters/cc_connect; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/devices/platform/soc/soc:aon/64400000.spi/spi_master/spi4/spi4.0/sc27xx-7sreset/hard_mode; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chown 1041:1005 "$n"; done -for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/power/wakeup_count; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/module/zte_misc/parameters/cc_connect; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/platform/soc/soc:aon/64400000.spi/spi_master/spi4/spi4.0/sc27xx-7sreset/hard_mode; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chown 0:0 "$n"; done +for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chmod 0660 "$n"; done @@ -153,444 +163,440 @@ for n in /sys/class/display/dispc0/irq_register; do [ -e "$n" ] && chmod 0664 "$ for n in /sys/class/display/dispc0/irq_unregister; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/display/panel0/esd_check_enable; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chmod 666 "$n"; done -for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/panel0/esd_check_enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chown 1003:1000 "$n"; done -for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/dpu_version; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/irq_register; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/irq_unregister; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1003:1000 "$n"; done -for n in /sys/class/display/dispc0/low_res_simu; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/backlight/max_brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/frame_count; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/panel0/esd_check_enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/dpu_version; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/irq_register; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/irq_unregister; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/low_res_simu; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/backlight/max_brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/frame_count; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/class/display/dispc0/frame_count; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/graphics/fb0; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/fb0; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/adf0; do [ -e "$n" ] && chmod 666 "$n"; done -for n in /dev/adf-interface0.0; do [ -e "$n" ] && chmod 666 "$n"; done -for n in /dev/adf-overlay-engine0.0; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /dev/graphics/fb0; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/fb0; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/adf0; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/adf-interface0.0; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/adf-overlay-engine0.0; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1003:1000 "$n"; done -for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/iq_mem; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/sprd-adf/dispc0/dynamic_pclk; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/sprd-adf/dispc0/dynamic_mipi_clk; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/sprd_bm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/dmc_mpu; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/stop; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/start; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/modem; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/deltanv; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/gdsp; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/ldsp; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/cdsp; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/fixnv; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/runnv; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/modemassert; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/cptl/mem; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/cptl/modemassert; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/stop; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/start; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/modem; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/deltanv; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/ldsp; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/gdsp; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/cdsp; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/fixnv; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/runnv; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/cptl/mem; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/modem; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/phycp; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/pmsys; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/chsys; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/mdm_ctrl; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/sctl_ch; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done -for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done -for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done -for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done -for n in /dev/modem; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/phycp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/pmsys; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/chsys; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/mdm_ctrl; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sctl_ch; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cp_dump; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /dev/cp_dump; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/iq_mem; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/sprd-adf/dispc0/dynamic_pclk; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/sprd-adf/dispc0/dynamic_mipi_clk; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/sprd_bm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/dmc_mpu; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/stop; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/start; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/modem; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/deltanv; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/gdsp; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/ldsp; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/cdsp; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/fixnv; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/runnv; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/modemassert; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/cptl/mem; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/cptl/modemassert; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/stop; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/start; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/modem; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/deltanv; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/ldsp; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/gdsp; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/cdsp; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/fixnv; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/runnv; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/cptl/mem; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/modem; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/phycp; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/pmsys; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/chsys; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/mdm_ctrl; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/sctl_ch; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chmod 0444 "$n"; done +for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chmod 0444 "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chmod 0444 "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chmod 0444 "$n"; done +for n in /dev/modem; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/phycp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/pmsys; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/chsys; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/mdm_ctrl; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sctl_ch; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cp_dump; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cp_dump; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/class/modem/debug-log/freq; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/class/modem/debug-log/channel; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/class/modem/debug-log/freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/debug-log/channel; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/sctl_pm; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/iq_mem; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/iq_mem; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/sctl_pm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/mdbg; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/mdbg/assert; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/mdbg; do [ -e "$n" ] && chmod 770 "$n"; done -for n in /proc/mdbg/assert; do [ -e "$n" ] && chmod 760 "$n"; done -for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chmod 760 "$n"; done -for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chmod 760 "$n"; done -for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chmod 760 "$n"; done -for n in /dev/mbox; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipc_smsg; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipc_smem; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipc_sbuf; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipc_sblock; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /dev/sipx; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/devices/platform/soc/soc:ipa-apb/soc:ipa-apb:sipa-dele/sipa_dele_reset; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/power_supply/battery/charge_control_limit; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/modem/debug-log/freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/debug-log/channel; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/sctl_pm; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/iq_mem; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/iq_mem; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/sctl_pm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/mdbg; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/mdbg/assert; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/mdbg; do [ -e "$n" ] && chmod 0770 "$n"; done +for n in /proc/mdbg/assert; do [ -e "$n" ] && chmod 0760 "$n"; done +for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chmod 0760 "$n"; done +for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chmod 0760 "$n"; done +for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chmod 0760 "$n"; done +for n in /dev/mbox; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipc_smsg; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipc_smem; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipc_sbuf; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipc_sblock; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/sipx; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/devices/platform/soc/soc:ipa-apb/soc:ipa-apb:sipa-dele/sipa_dele_reset; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/power_supply/battery/charge_control_limit; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chmod 0644 "$n"; done for n in /sys/class/display/backlight/max_brightness; do [ -e "$n" ] && chmod 0644 "$n"; done -for n in /sys/class/thermal/thermal_zone4/trip_point_0_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone4/trip_point_1_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone4/user_power_range; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device3/min_core_num; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device3/min_freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device3/max_ctrl_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device4/min_core_num; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device4/min_freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device4/max_ctrl_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device5/min_core_num; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device5/min_freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/cooling_device5/max_ctrl_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/thermal/thermal_zone4/thm_enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/thermal/thermal_zone3/thm_enable; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/auto_dfs_on_off; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scaling_force_ddr_freq; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chown 1047:1000 "$n"; done -for n in /sys/class/power_supply/battery/stop_charge; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/thermal_zone4/trip_point_0_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone4/trip_point_1_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone4/user_power_range; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device3/min_core_num; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device3/min_freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device3/max_ctrl_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device4/min_core_num; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device4/min_freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device4/max_ctrl_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device5/min_core_num; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device5/min_freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/cooling_device5/max_ctrl_temp; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/thermal/thermal_zone4/thm_enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/thermal/thermal_zone3/thm_enable; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/auto_dfs_on_off; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scaling_force_ddr_freq; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/power_supply/battery/stop_charge; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/class/power_supply/battery/stop_charge; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/class/power_supply/battery/charger.0/stop_charge; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/power_supply/battery/charger.0/enable_power_path; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/stop_charge; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/power_supply/battery/charger.0/enable_power_path; do [ -e "$n" ] && chown 0:$VG "$n"; done for n in /sys/class/power_supply/battery/charger.0/stop_charge; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/power_supply/battery/charger.0/enable_power_path; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/class/power_supply/battery/charger.0/jeita_control; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/power_supply/battery/charger.0/keep_awake; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/power_supply/sprdfgu/cc_test_cmd; do [ -e "$n" ] && chmod 0666 "$n"; done -for n in /sys/class/power_supply/battery/input_current_limit; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/power_supply/battery/constant_charge_current; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/stop; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/start; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/mem; do [ -e "$n" ] && chmod 440 "$n"; done -for n in /proc/pmic/status; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/pmic/stop; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/start; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/mem; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/status; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/cali_lib; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 1000:0 "$n"; done -for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chmod 220 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chown 0:1000 "$n"; done -for n in /dev/cpuctl; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/foreground; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/background; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/top-app; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/rt; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chown 1013:1000 "$n"; done -for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chown 1013:1000 "$n"; done -for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/kernel/hmp/boostpulse_duration; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/kernel/hmp/boostpulse_duratio; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/devices/system/cpu/cpuhotplug/boostpulse; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpuhotplug/boostpulse_duration; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/jeita_control; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/keep_awake; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/power_supply/sprdfgu/cc_test_cmd; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/power_supply/battery/input_current_limit; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/power_supply/battery/constant_charge_current; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/stop; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/start; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/mem; do [ -e "$n" ] && chmod 0440 "$n"; done +for n in /proc/pmic/status; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/pmic/stop; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/start; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/mem; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/status; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/cali_lib; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chmod 0220 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /dev/cpuctl; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/foreground; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/background; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/top-app; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/rt; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chown 0:$VG "$n"; done +for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/kernel/hmp/boostpulse_duration; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/kernel/hmp/boostpulse_duratio; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/boostpulse; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/boostpulse_duration; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/devices/system/cpu/cpuhotplug/boostpulse; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/devices/system/cpu/cpuhotplug/boostpulse_duration; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_min_limit; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_min_limit; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /dev/cluster0_freq_min; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cluster0_freq_max; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cluster1_freq_min; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/cluster1_freq_max; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cluster0_freq_min; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cluster0_freq_max; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cluster1_freq_min; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/cluster1_freq_max; do [ -e "$n" ] && chown $V:$VG "$n"; done for n in /dev/cluster0_freq_min; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/cluster0_freq_max; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/cluster1_freq_min; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/cluster1_freq_max; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_setspeed; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /proc/sprd_sysdump; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/tmc_etb; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/tmc_etb; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_setspeed; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /proc/sprd_sysdump; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/tmc_etb; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/tmc_etb; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/sprd_bm; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /dev/dmc_mpu; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /dev/sprd_bm; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/dmc_mpu; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /dev/rt5512; do [ -e "$n" ] && chown 1000:1005 "$n"; done -for n in /dev/rt5512; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /proc/reserve_space/black_list; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /proc/reserve_space/white_list; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /proc/reserve_space/black_list_comm; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /proc/reserve_space/white_list_comm; do [ -e "$n" ] && chmod 640 "$n"; done -for n in /proc/reserve_space/app_guid; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chmod 660 "$n"; done -for n in /sys/block/zram0/writeback_limit; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /dev/sprd_bm; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/dmc_mpu; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /dev/rt5512; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /dev/rt5512; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /proc/reserve_space/black_list; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /proc/reserve_space/white_list; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /proc/reserve_space/black_list_comm; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /proc/reserve_space/white_list_comm; do [ -e "$n" ] && chmod 0640 "$n"; done +for n in /proc/reserve_space/app_guid; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/block/zram0/writeback_limit; do [ -e "$n" ] && chown 0:$VG "$n"; done for n in /sys/block/zram0/writeback_limit; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /sys/block/zram0/writeback_limit_enable; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/block/zram0/writeback_limit_enable; do [ -e "$n" ] && chown 0:$VG "$n"; done for n in /sys/block/zram0/writeback_limit_enable; do [ -e "$n" ] && chmod 0664 "$n"; done for n in /sys/class/leds/aw_led/groupcolor; do [ -e "$n" ] && chmod 0660 "$n"; done -for n in /sys/class/leds/aw_led/groupcolor; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chmod 644 "$n"; done -for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /sys/class/leds/aw_led/groupcolor; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chmod 0644 "$n"; done for n in /proc/touchscreen/screen_state_interface; do [ -e "$n" ] && chmod 0664 "$n"; done -for n in /proc/touchscreen/screen_state_interface; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/bus/platform/devices/zte_touch/uevent; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /dev/gtp_tools; do [ -e "$n" ] && chmod 0646 "$n"; done -for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chown 1000:1000 "$n"; done -for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chmod 664 "$n"; done -for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /proc/touchscreen/screen_state_interface; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/bus/platform/devices/zte_touch/uevent; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /dev/gtp_tools; do [ -e "$n" ] && chmod 0640 "$n"; done +for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chown $V:$VG "$n"; done +for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chmod 0664 "$n"; done # from Android system init.rc: wakelocks are written by uid system -for n in /sys/power/wake_lock /sys/power/wake_unlock; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /sys/power/wake_lock /sys/power/wake_unlock; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done true diff --git a/tests/README.md b/tests/README.md index 8ac7a269..dda81757 100644 --- a/tests/README.md +++ b/tests/README.md @@ -20,6 +20,7 @@ macOS and Windows (`.github/workflows/tests.yml`). | `test_extra.py` | extras: `mu300-update`'s install and update of extras, `mu300-extra` install/remove/link against a fake release server; the VPN module of dikeckaan/mu300-linux-vpn (a fake module tarball: online from `MU300_VPN_URL` against its SHA256SUMS, offline `--from FILE|DIR`, a bad hash or a `requires` newer than the system refused, `hooks/link` and `hooks/unlink` for every installed system, `link` at boot), `mu300-update apply` with the VPN in use (`UpdateWithTheVpn`: refused before anything changes without the module, a staged or downloaded module installed and linked into the new systems, an older engines-only vpn extra replaced); the lang extra (`LangExtra`: catalogs linked into LuCI and registered in `luci.languages`, enable/disable, Ubuntu refused, hostile archives refused) | | `test_update.py` | `mu300-update`: release files per system and kernel, boot image byte helpers, whether a kernel bundle may go onto this device, the Linux slot it works on, and the boot image it builds from a device's own stock image (`FromStock`) | | `test_boot_init.py` | `boot/init`: the card is looked for before the internal region, under any `mmcblkN`; a foreign or empty card falls back; the 300 s timer and the conditional wait; the slot init takes (`Slot`: command line, device tree, image, a mismatch) and the block it restores | +| `test_vendor_ids.py` | the vendor daemons' account (FINDINGS 40): `ueventd-perms.sh` is the generator's output, no world-writable mode, no numeric id, the calibration partitions the vendor account's, the GPU `root:video`, the id mapping, the ids at run time (Ubuntu, OpenWrt, the initramfs); `android-run` starts `modem_control`/`refnotify` as `mu300vnd` with their capabilities only; the account made at boot (a failure never stops the modem), in the images, and kept by `mu300-update`'s merge | | `test_emmc_lookup.py` | every Linux-side lookup by partition name (init, `early-recorder`, `mu300-update`, `android-vendor-start`) takes the eMMC's partition, never a card's with the same GPT names, whichever of `mmcblk0`/`mmcblk1` the card is; `emmc_dev` never falls back to a card; `ueventd-perms.sh` touches no block device by number | | `test_android_mount.py` | `tools/android-mount-mu300root.sh -u`: an unmount whose loop Android's umount already freed succeeds, a loop left attached is detached, a failed umount or detach fails | | `test_android_install.py` | `tools/android-install.sh` on the SD card: a blank card is formatted, a foreign ext4 and an adopted or busy card are refused; the marker of an internal installation; pushed extras (the VPN module), and the warning when a VPN in use has no module on update | diff --git a/tests/test_emmc_lookup.py b/tests/test_emmc_lookup.py index 4907e8c7..946311d0 100644 --- a/tests/test_emmc_lookup.py +++ b/tests/test_emmc_lookup.py @@ -137,4 +137,4 @@ class UeventdPerms(ShellTest): self.assertNotIn('mmcblk1p', out) self.assertIn('for n in /dev/block/mmcblk*rpmb; do', out) self.assertIn('for n in /dev/mmcblk*rpmb; do', out) - self.assertIn('for n in /dev/modem; do [ -e "$n" ] && chown 1000:1001', out) + self.assertIn('for n in /dev/modem; do [ -e "$n" ] && chown $V:$VG', out) diff --git a/tests/test_vendor_ids.py b/tests/test_vendor_ids.py new file mode 100644 index 00000000..4db4deed --- /dev/null +++ b/tests/test_vendor_ids.py @@ -0,0 +1,268 @@ +"""The Android vendor daemons' own account (FINDINGS: "The vendor daemons' own account"). + +Android's system user is uid 1000, the first human account on a distribution: ueventd-perms.sh gave that account the +modem's calibration partitions, and modem_control/refnotify ran as it. Now: the nodes go to the vendor account +mu300vnd (uid 1000 only where there is no account at all), nothing is writable by everyone, the GPU is the video +group's, the daemons start as mu300vnd, and the images (and updated systems) have the account. +""" +import re +import subprocess +import sys + +from helpers import BIN, TOP, ShellTest + +GEN = TOP / 'android-vendor' / 'gen-ueventd-perms.py' +INPUTS = [TOP / 'android-vendor' / 'ueventd' / 'ueventd.rc', TOP / 'android-vendor' / 'ueventd' / 'init-perms.rc'] +OUTPUTS = [TOP / 'android-vendor' / 'ueventd-perms.sh', BIN / 'ueventd-perms.sh'] +LINE = re.compile(r'for n in (.+?); do \[ -e "\$n" \] && (?:chown (\S+):(\S+) "\$n"(?: && chmod ([0-7]+) "\$n")?' + r'|chmod ([0-7]+) "\$n"); done') + + +def generate(*files): + return subprocess.run([sys.executable, str(GEN)] + [str(f) for f in files], + capture_output=True, text=True, check=True).stdout + + +def rules(text): + """[(path, owner, group, mode), ...] of every node line (owner/group None for a chmod alone)""" + out = [] + for line in text.splitlines(): + m = LINE.fullmatch(line) + if m: + out.append((m.group(1), m.group(2), m.group(3), m.group(4) or m.group(5))) + return out + + +class Generated(ShellTest): + def test_the_committed_script_is_the_generators(self): + want = generate(*INPUTS) + for f in OUTPUTS: + self.assertEqual(f.read_text(), want, f'{f}: run gen-ueventd-perms.py again') + + def test_every_line_is_understood(self): + text = OUTPUTS[0].read_text() + lines = [x for x in text.splitlines() if x.startswith('for n in ')] + self.assertEqual(len(rules(text)), len(lines)) + self.assertGreater(len(lines), 500) + + def test_nothing_writable_by_everyone(self): + for path, _, _, mode in rules(OUTPUTS[0].read_text()): + if mode is None: + continue + m = int(mode, 8) + self.assertEqual(m & 0o002, 0, (path, mode)) + if path.startswith('/dev/'): + self.assertEqual(m & 0o007, 0, (path, mode)) # 0666/0646 nodes are 0660 here + + def test_no_numeric_account(self): + # no Android number reaches chown: 1000 (ubuntu, alarm on Arch), 1001 (the next human), 1003, ... + for path, owner, group, _ in rules(OUTPUTS[0].read_text()): + if owner is None: + continue + self.assertIn(owner, ('0', '$V'), path) + self.assertIn(group, ('0', '$VG', '$GPU'), path) + + def test_partitions(self): + r = {p: (o, g, m) for p, o, g, m in rules(OUTPUTS[0].read_text()) if p.startswith('/dev/block/')} + # the modem's calibration NV and persist: the vendor account's, never a login account's + for p in ('/dev/block/by-name/nr_*', '/dev/block/by-name/persist', '/dev/block/by-name/calinv'): + self.assertEqual(r[p], ('$V', '$VG', '0660'), p) + for p, (o, g, m) in r.items(): + self.assertIn(o, ('0', '$V'), p) + self.assertNotEqual(g, '$GPU', p) + + def test_gpu_is_the_video_groups(self): + r = {p: (o, g, m) for p, o, g, m in rules(OUTPUTS[0].read_text()) if o is not None} + for p in ('/dev/mali0', '/dev/ion', '/dev/sprd_dmabuf', '/dev/dma_heap/carveout_fd'): + self.assertEqual(r[p], ('0', '$GPU', '0660'), p) + + def test_kept_as_linux_has_them(self): + text = OUTPUTS[0].read_text() + for p in ('/sys/module/firmware_class/', '/dev/input/', '/dev/ttyGS'): + self.assertNotIn(f'for n in {p}', text) + # the RTC stays root's (systemd-timedated has no CAP_DAC_OVERRIDE); refnotify reaches it through the group + r = {p: (o, g, m) for p, o, g, m in rules(text) if o is not None} + self.assertEqual(r['/dev/rtc*'], ('0', '$VG', '0660')) + + def test_mapping(self): + rc = self.tmp / 'ueventd.rc' + rc.write_text('/dev/modem 0660 system radio\n/dev/spipe_pm* 0666 system system\n' + '/dev/mali0 0666 system graphics\n/dev/audio_dsp* 666 audioserver audio\n' + '/dev/stty_nr* 0660 radio system\n/dev/block/by-name/miscdata 0660 root system\n' + '/dev/ttyM0 0660 bluetooth net_bt_admin\n/dev/input/event* 0660 system input\n' + '/dev/x 0646 system system # a comment\n/dev/unknown 0660 nosuch system\n') + init = self.tmp / 'init.rc' + init.write_text(' chown system system /sys/power/a\n chmod 0666 /sys/class/b\n' + ' chmod 0646 /dev/c\n chown graphics system /sys/d\n chown system /sys/e\n' + ' chown system system /sys/module/firmware_class/parameters/path\n' + ' chmod 660 /sys/module/firmware_class/parameters/path\n write /dev/f 1\n') + r = {p: (o, g, m) for p, o, g, m in rules(generate(rc, init)) if o is not None} + self.assertEqual(r['/dev/modem'], ('$V', '$VG', '0660')) + self.assertEqual(r['/dev/spipe_pm*'], ('$V', '$VG', '0660')) + self.assertEqual(r['/dev/mali0'], ('0', '$GPU', '0660')) + self.assertEqual(r['/dev/audio_dsp*'], ('0', '0', '0600')) # root's alone: no group bits + self.assertEqual(r['/dev/stty_nr*'], ('$V', '$VG', '0660')) + self.assertEqual(r['/dev/block/by-name/miscdata'], ('0', '$VG', '0660')) + self.assertEqual(r['/dev/ttyM0'], ('0', '0', '0600')) + self.assertEqual(r['/dev/x'], ('$V', '$VG', '0640')) + self.assertNotIn('/dev/input/event*', r) + self.assertNotIn('/dev/unknown', r) + out = generate(rc, init) + self.assertIn('chown $V:$VG "$n"; done', out.splitlines()[[i for i, x in enumerate(out.splitlines()) + if '/sys/power/a' in x][0]]) + c = {p: m for p, o, g, m in rules(out) if o is None} + self.assertEqual(c['/sys/class/b'], '0664') # readable stays readable, written by nobody else + self.assertEqual(c['/dev/c'], '0640') + r2 = {p: (o, g) for p, o, g, m in rules(out) if o is not None} + self.assertEqual(r2['/sys/d'], ('0', '$VG')) + self.assertEqual(r2['/sys/e'], ('$V', '$VG')) + self.assertNotIn('firmware_class', out) + self.assertNotIn('/dev/f', out) + + def ids(self, shell, passwd, group): + etc = self.tmp / 'etc' + etc.mkdir(exist_ok=True) + for name, text in (('passwd', passwd), ('group', group)): + if text is None: + (etc / name).unlink(missing_ok=True) + else: + (etc / name).write_text(text) + text = OUTPUTS[1].read_text() + header = text[:text.index('\nfor n in ')] + r = self.sh(shell, header + '\necho "$V $VG $GPU"', MU300_ETC=etc) + self.assertEqual(r.returncode, 0, r.stderr) + return r.stdout.strip() + + def test_ids_at_run_time(self): + for shell in self.each_shell(): + # Ubuntu: the vendor account, the video group; ubuntu at 1000 owns nothing + self.assertEqual(self.ids(shell, 'root:x:0:0::/root:/bin/bash\nubuntu:x:1000:1000::/home/ubuntu:/bin/bash\n' + 'mu300vnd:x:991:988:MU300:/nonexistent:/usr/sbin/nologin\n', + 'root:x:0:\nvideo:x:44:ubuntu\nubuntu:x:1000:\nmu300vnd:x:988:'), '991 988 44') + # OpenWrt: no such account, no video group: the uid the daemons switch to themselves; the GPU root's + self.assertEqual(self.ids(shell, 'root:x:0:0:root:/root:/bin/ash\nnetwork:x:101:101::/var:/bin/false\n', + 'root:x:0:\nnetwork:x:101:\n'), '1000 1000 0') + # the initramfs: no /etc/passwd at all + self.assertEqual(self.ids(shell, None, None), '1000 1000 0') + # a name that only starts like it is not it + self.assertEqual(self.ids(shell, 'mu300vndx:x:5:5::/:/bin/false\n', 'mu300vndx:x:5:\n'), '1000 1000 0') + + +class DaemonsStartAsTheAccount(ShellTest): + def setUp(self): + super().setUp() + self.stub('mountpoint', 'exit 0') + self.stub('setpriv', 'echo "setpriv $*" >> "$STUBLOG/calls"') + self.stub('chroot', 'echo "chroot $*" >> "$STUBLOG/calls"') + self.etc = self.tmp / 'etc' + self.etc.mkdir() + + def run_daemon(self, shell, name): + calls = self.tmp / 'calls' + calls.unlink(missing_ok=True) + r = self.script(shell, BIN / 'android-run', name, MU300_ETC=self.etc, MU300_ANDROID=self.tmp / 'a') + self.assertEqual(r.returncode, 0, r.stderr) + return calls.read_text().strip() + + def test_with_the_account(self): + (self.etc / 'passwd').write_text('ubuntu:x:1000:1000::/home/ubuntu:/bin/bash\nmu300vnd:x:991:988::/:/x\n') + a = self.tmp / 'a' + for shell in self.each_shell(): + c = '-all,+sys_chroot,+chown,+block_suspend' + self.assertEqual(self.run_daemon(shell, 'modem_control'), + f'setpriv --reuid=mu300vnd --regid=mu300vnd --clear-groups --no-new-privs --inh-caps={c} ' + f'--ambient-caps={c} --bounding-set={c} chroot {a} /vendor/bin/modem_control') + c = '-all,+sys_chroot,+sys_time' + self.assertIn(f'--inh-caps={c} --ambient-caps={c} --bounding-set={c} chroot {a} /vendor/bin/refnotify', + self.run_daemon(shell, 'refnotify')) + # the NV server never switches to system on Android either: root, as before + self.assertEqual(self.run_daemon(shell, 'cp_diskserver'), f'chroot {a} /vendor/bin/cp_diskserver') + + def test_without_the_account(self): + # OpenWrt: no account at all - the daemons switch to uid 1000 themselves, as they always did + (self.etc / 'passwd').write_text('root:x:0:0:root:/root:/bin/ash\n') + for shell in self.each_shell(): + self.assertEqual(self.run_daemon(shell, 'modem_control'), + f'chroot {self.tmp / "a"} /vendor/bin/modem_control') + + def test_vendor_start_execs_android_run(self): + text = (BIN / 'android-vendor-start').read_text() + self.assertTrue(text.rstrip().endswith('exec /opt/mu300/bin/android-run modem_control')) + self.assertNotIn('exec chroot', text) + # the account is there before the nodes are handed out + self.assertLess(text.index('# --- account end'), text.index('sh /opt/mu300/bin/ueventd-perms.sh')) + + +class Account(ShellTest): + def block(self): + text = (BIN / 'android-vendor-start').read_text() + return re.search(r'# --- account begin\n(.*?)# --- account end', text, re.S).group(1) + + def test_made_where_it_is_missing(self): + self.stub('useradd', 'echo "useradd $*" >> "$STUBLOG/calls"') + etc = self.tmp / 'etc' + etc.mkdir() + calls = self.tmp / 'calls' + for shell in self.each_shell(): + calls.unlink(missing_ok=True) + (etc / 'passwd').write_text('ubuntu:x:1000:1000::/home/ubuntu:/bin/bash\n') + r = self.sh(shell, 'set -e\n' + self.block(), MU300_ETC=etc) + self.assertEqual(r.returncode, 0, r.stderr) + call = calls.read_text() + for opt in ('--system', '--user-group', '--no-create-home', '--home-dir /nonexistent', 'mu300vnd\n'): + self.assertIn(opt, call) + self.assertRegex(call, r'--shell /usr/s?bin/nologin') + # there already: nothing + calls.unlink() + (etc / 'passwd').write_text('mu300vnd:x:991:988::/nonexistent:/usr/sbin/nologin\n') + self.assertEqual(self.sh(shell, 'set -e\n' + self.block(), MU300_ETC=etc).returncode, 0) + self.assertFalse(calls.exists()) + + def test_a_failed_useradd_does_not_stop_the_modem(self): + self.stub('useradd', 'exit 1') + etc = self.tmp / 'etc' + etc.mkdir() + (etc / 'passwd').write_text('ubuntu:x:1000:1000::/home/ubuntu:/bin/bash\n') + for shell in self.each_shell(): + r = self.sh(shell, 'set -e\n' + self.block() + 'echo went-on', MU300_ETC=etc) + self.assertEqual(r.stdout.strip(), 'went-on', (shell, r.stderr)) + self.assertIn('uid 1000', r.stderr) + + def test_the_images_have_it(self): + for f, rx in ((TOP / 'rootfs' / 'assemble.sh', r'useradd --root \$R --system --user-group [^\n]*\\\n[^\n]*mu300vnd'), + (TOP / 'arch' / 'build-rootfs.sh', r'useradd --system --user-group [^\n]*\\\n[^\n]*mu300vnd')): + self.assertRegex(f.read_text(), rx, f.name) + # the account line goes in before the image is packed + a = (TOP / 'rootfs' / 'assemble.sh').read_text() + self.assertLess(a.index('mu300vnd'), a.index('tar --numeric-owner')) + + def test_an_update_brings_it(self): + # mu300-update's merge: the new image's passwd with the old system's human accounts - the image's mu300vnd + # is in the updated system, at the image's uid, next to the device's ubuntu + upd = (BIN / 'mu300-update').read_text() + fn = re.search(r'^merge_accounts\(\) \{.*?^\}\n', upd, re.S | re.M).group(0) + old, new = self.tmp / 'old', self.tmp / 'new' + for d, pw, gr in ((old, 'root:x:0:0::/root:/bin/bash\nubuntu:x:1000:1000::/home/ubuntu:/bin/bash\n' + 'kaan:x:1001:1001::/home/kaan:/bin/bash\n', + 'root:x:0:\nvideo:x:44:ubuntu,kaan\nubuntu:x:1000:\nkaan:x:1001:\n'), + (new, 'root:x:0:0::/root:/bin/bash\nubuntu:x:1000:1000::/home/ubuntu:/bin/bash\n' + 'mu300vnd:x:991:988:MU300 Android vendor daemons:/nonexistent:/usr/sbin/nologin\n', + 'root:x:0:\nvideo:x:44:ubuntu\nubuntu:x:1000:\nmu300vnd:x:988:\n')): + (d / 'etc').mkdir(parents=True) + (d / 'etc' / 'passwd').write_text(pw) + (d / 'etc' / 'group').write_text(gr) + (d / 'etc' / 'shadow').write_text(''.join(f'{x.split(":")[0]}:!:19000::::::\n' for x in pw.splitlines())) + (d / 'etc' / 'gshadow').write_text(''.join(f'{x.split(":")[0]}:!::\n' for x in gr.splitlines())) + for shell in self.each_shell(): + for f in ('passwd', 'group', 'shadow', 'gshadow'): + (self.tmp / f).write_text((new / 'etc' / f).read_text()) + r = self.sh(shell, f'ACCOUNTS_MARK=/x\n{fn}\nmerge_accounts {old} {new}') + self.assertEqual(r.returncode, 0, r.stderr) + pw = (new / 'etc' / 'passwd').read_text() + self.assertIn('mu300vnd:x:991:988:', pw) + self.assertIn('ubuntu:x:1000:1000:', pw) + self.assertIn('kaan:x:1001:1001:', pw) + self.assertIn('mu300vnd:x:988:', (new / 'etc' / 'group').read_text()) + self.assertIn('mu300vnd:', (new / 'etc' / 'shadow').read_text()) + for f in ('passwd', 'group', 'shadow', 'gshadow'): + (new / 'etc' / f).write_text((self.tmp / f).read_text()) From 646dccf62e90b22cd16de9bb179263c55f910f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdurrahman=20Kaan=20Dike=C3=A7?= Date: Sun, 11 Oct 2026 18:55:17 +0300 Subject: [PATCH 6/9] BUILD: regenerating ueventd-perms.sh from the kept inputs Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn --- docs/BUILD.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/BUILD.md b/docs/BUILD.md index c3e80134..77d576bb 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -76,6 +76,9 @@ and the vendor-init tool: `docker run --rm -v "$PWD/tools/bt-init":/w mu300-kbui ```sh android-vendor/extract-subset.sh android-subset python3 android-vendor/gen-ueventd-perms.py android-subset/vendor/etc/ueventd.rc > android-vendor/ueventd-perms.sh +# the F50's inputs are kept in android-vendor/ueventd/: regenerate after changing the generator with +# python3 android-vendor/gen-ueventd-perms.py android-vendor/ueventd/ueventd.rc android-vendor/ueventd/init-perms.rc > android-vendor/ueventd-perms.sh +# (and copy it to rootfs/overlay/opt/mu300/bin/ueventd-perms.sh; tests/test_vendor_ids.py checks both) ``` ### 3. Boot image From 6500b77034ba3d3bb407706ee3433151f4d9fcc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdurrahman=20Kaan=20Dike=C3=A7?= Date: Sun, 11 Oct 2026 19:06:53 +0300 Subject: [PATCH 7/9] ueventd-perms: no node more open than before, for anyone but the vendor account - graphics goes to video only on the nodes Android gives everyone (0666); a 0660 graphics node (gsp) is no group's, so no video member gains it - input events, ttyGS* and the firmware search path root:root 0600 instead of left to Linux (root:input, root:dialout, 0644): each was ubuntu's before, and Linux's defaults opened them to other groups or to everyone - test: the v2026.10.18 script and the new one applied to every node they name; fails if ubuntu, a second login user or others gain any bit on any node Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn --- android-vendor/gen-ueventd-perms.py | 39 +- android-vendor/ueventd-perms.sh | 6 +- docs/FINDINGS.md | 17 +- rootfs/overlay/opt/mu300/bin/ueventd-perms.sh | 6 +- tests/README.md | 2 +- tests/fixtures/ueventd-perms-v2026.10.18.sh | 596 ++++++++++++++++++ tests/test_vendor_ids.py | 77 ++- 7 files changed, 713 insertions(+), 30 deletions(-) create mode 100644 tests/fixtures/ueventd-perms-v2026.10.18.sh diff --git a/android-vendor/gen-ueventd-perms.py b/android-vendor/gen-ueventd-perms.py index 277947f8..baa45b01 100755 --- a/android-vendor/gen-ueventd-perms.py +++ b/android-vendor/gen-ueventd-perms.py @@ -11,11 +11,14 @@ modem's control nodes were that account's, writable without sudo (FINDINGS: "The What each Android id becomes on Linux (MAP below): system, radio -> the vendor account mu300vnd ($V, group $VG): the ids the vendor daemons run as. Where there is no such account (OpenWrt, the initramfs) that is uid/gid 1000, which they switch to themselves. - graphics -> the video group ($GPU): the GPU (mali0, ion, dma_heap, ...) for its users, not for everyone + graphics -> on a node Android gives everyone (mali0, ion, dma_heap: 0666) the video group ($GPU), so the GPU + is its users' and no longer everyone's; anywhere else root, as no Linux account is in it root and every other Android id (audio, camera, bluetooth, nfc, media, ...: services that do not run here) -> root Modes: nothing is left writable by everyone, and a /dev node gets no bits at all for others (a 0666 Android node is 0660 here); a node that is root's alone keeps no group bits either (0600). +Nothing is more open than with the numbers taken over (tests/test_vendor_ids.py compares every node with the script +of v2026.10.18) but for the vendor account itself, which is new, and the RTC, below. """ import sys @@ -24,16 +27,17 @@ AID = {'root': 0, 'system': 1000, 'radio': 1001, 'bluetooth': 1002, 'graphics': 'audioserver': 1041, 'cameraserver': 1047, 'shell': 2000, 'net_bt_admin': 3001, 'net_bt': 3002, 'inet': 3003, 'net_raw': 3004} # Android id -> (Linux owner, Linux group) as the script writes them; ids not here are root's -MAP = {'system': ('$V', '$VG'), 'radio': ('$V', '$VG'), 'graphics': ('0', '$GPU')} +MAP = {'system': ('$V', '$VG'), 'radio': ('$V', '$VG')} # Nodes that stay root's, in the vendor group: the RTC. One that belonged to Android's system could not be opened by # systemd-timedated (root, but without CAP_DAC_OVERRIDE), and with systemd 259 (Ubuntu 26.04) timedatectl failed as a # whole ("Failed to read RTC"); refnotify opens it too (as uid 1000 with gid 0 it did so through Linux's root:root # 0660, as mu300vnd it needs the group). ROOT_OWNED = ('/dev/rtc',) -# Nodes that stay as Linux sets them up: -# - input events (udev: root:input) and the USB serial console ttyGS* (getty hands it to whoever logs in) -# - the firmware search path: whoever can write it chooses the firmware the kernel loads (root's, 0644) -KEEP = ('/dev/input/', '/dev/ttyGS', '/sys/module/firmware_class/') +# Nodes Android gives its system user that no vendor daemon run here uses, and that were the first human's on Linux: +# root's alone (0600). Input events (every key pressed), the USB serial console ttyGS* (getty and login hand it to +# whoever logs in, as on any Linux), and the firmware search path (whoever writes it chooses the firmware the kernel +# loads). +ROOT_ONLY = ('/dev/input/', '/dev/ttyGS', '/sys/module/firmware_class/') # Block devices by mmcblk number: the number follows probe order and is not always the eMMC's (FINDINGS 31l). The # card's partitions (Android's mmcblk1p*, for vold) are left alone - no vendor daemon run here opens the card, and a # system-group card would be the first user's on Linux (where the root filesystem may be on it). The vendor daemons @@ -56,8 +60,8 @@ VG=$(id_of mu300vnd "$E/group"); VG=${VG:-1000} GPU=$(id_of video "$E/group"); GPU=${GPU:-0}''' -def kept(path): - return path.startswith(KEEP) +def root_only(path): + return path.startswith(ROOT_ONLY) def node(path): @@ -66,9 +70,11 @@ def node(path): return path -def ids(user, group): - g = MAP.get(group, ('0', '0'))[1] - return ('0' if g == '$GPU' else MAP.get(user, ('0', '0'))[0]), g # the GPU's nodes: root:video +def ids(user, group, m=None): + """(owner, group) on Linux of Android's USER:GROUP; M the node's Android mode (ueventd), None for a chown alone""" + if group == 'graphics' and m is not None and int(m, 8) & 0o006: + return '0', '$GPU' # the GPU's nodes: root:video, not everyone's + return MAP.get(user, ('0', '0'))[0], MAP.get(group, ('0', '0'))[1] def mode(m, path, owner=None, group=None): @@ -83,8 +89,11 @@ out = ['#!/bin/sh', '# generated by gen-ueventd-perms.py: Android device node ow ueventd, rcs = sys.argv[1], sys.argv[2:] for line in open(ueventd): f = line.split('#')[0].split() - if len(f) >= 4 and f[0].startswith('/dev/') and not kept(f[0]) and f[2] in AID and f[3] in AID and node(f[0]): - u, g = ids(f[2], f[3]) + if len(f) >= 4 and f[0].startswith('/dev/') and f[2] in AID and f[3] in AID and node(f[0]): + if root_only(f[0]): + out.append(f'for n in {node(f[0])}; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done') + continue + u, g = ids(f[2], f[3], f[1]) u = '0' if f[0].startswith(ROOT_OWNED) else u out.append(f'for n in {node(f[0])}; do [ -e "$n" ] && chown {u}:{g} "$n" && chmod {mode(f[1], f[0], u, g)} "$n"; done') out.append('# chown/chmod from vendor init *.rc (Android init applies these after ueventd)') @@ -93,7 +102,9 @@ for rc in rcs: f = line.split('#')[0].split() if len(f) < 3 or f[0] not in ('chown', 'chmod') or not f[-1].startswith(('/dev/', '/sys/', '/proc/')): continue - if kept(f[-1]): + if root_only(f[-1]): + if f[0] == 'chown': + out.append(f'for n in {f[-1]}; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done') continue if f[0] == 'chmod': out.append(f'for n in {f[-1]}; do [ -e "$n" ] && chmod {mode(f[1], f[-1])} "$n"; done') diff --git a/android-vendor/ueventd-perms.sh b/android-vendor/ueventd-perms.sh index 1b5cd433..bf775f06 100755 --- a/android-vendor/ueventd-perms.sh +++ b/android-vendor/ueventd-perms.sh @@ -85,13 +85,14 @@ for n in /dev/spipe_nr9; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; for n in /dev/spipe_nr14; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /dev/snv_nr; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done for n in /dev/vser; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ttyGS*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /dev/ion; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/sprd_ion; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/sprd_dmabuf; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/dma_heap/uncached_carveout_mm; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/dma_heap/uncached_carveout_oem; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/dma_heap/carveout_fd; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done -for n in /dev/gsp; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/gsp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done for n in /dev/mali0; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/pvr_sync; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/sprd_jpg; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done @@ -106,6 +107,7 @@ for n in /dev/sprd_image; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; for n in /dev/sprd_isp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done for n in /dev/sprd_sensor; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done for n in /dev/sprd_cpp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/input/event*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /dev/map_user; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done for n in /dev/iio:device*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done for n in /dev/rtc*; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done @@ -428,6 +430,7 @@ for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chow for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown $V:0 "$n"; done for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown $V:0 "$n"; done for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 0660 "$n"; done @@ -453,6 +456,7 @@ for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chow for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown $V:0 "$n"; done for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown $V:0 "$n"; done for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 0660 "$n"; done diff --git a/docs/FINDINGS.md b/docs/FINDINGS.md index b4ea9dd9..15624501 100644 --- a/docs/FINDINGS.md +++ b/docs/FINDINGS.md @@ -3272,14 +3272,20 @@ where the kernel has them. `modem_control` and `refnotify` ran as `ubuntu` too: for `chroot`, which their own `capset` drops - their `setuid(1000)` then fails, harmlessly. `android-vendor-start` starts `modem_control` through `android-run` (still an exec, so the task name stays `modem_control`). `cp_diskserver` never switches users on Android either and stays root. -* `ueventd-perms.sh`: `system` and `radio` become `mu300vnd` (owner `$V`, group `$VG`), `graphics` the `video` group - (the GPU's nodes `root:video 0660`), every other Android id root. No node is left with bits for others, nothing is - writable by everyone, a node that is root's alone is `0600`. Left as Linux has them: input events, the USB serial - console `ttyGS*`, and `firmware_class`'s path (whoever writes it chooses the firmware the kernel loads). The RTC +* `ueventd-perms.sh`: `system` and `radio` become `mu300vnd` (owner `$V`, group `$VG`), `graphics` on a node Android + gives everyone (`mali0`, `ion`, `dma_heap/*`, `sprd_dmabuf`, `pvr_sync`: `0666`) the `video` group (`root:video + 0660`), anywhere else root, as is every other Android id and every id the generator does not know. No node is left + with bits for others, nothing is writable by everyone, a node that is root's alone is `0600`. Root's alone: input + events, the USB serial console `ttyGS*` (getty and login hand it out as on any Linux: a serial login still works) and + `firmware_class`'s path (whoever writes it chooses the firmware the kernel loads) - all three were `ubuntu`'s. The RTC stays root's but is the vendor group's: `refnotify` opens `/dev/rtc0` (`root:root 0660`), which it reached through gid 0 before ("RefNotify open /dev/rtc0 failed, error: Permission denied" until it was). The ids are looked up when the script runs, in `/etc/passwd` and `/etc/group`; without the account (OpenWrt, the initramfs: no account at 1000 there) it is uid/gid 1000, which the daemons switch to themselves, and the GPU's group is root. +* Nobody gains anything: `tests/test_vendor_ids.py` applies the script of v2026.10.18 and the new one to every node + they name (a glob as one name) and fails if `ubuntu`, a second login user in the usual groups (`video`, `render`, + `input`, `dialout`, ...) or everyone else can do anything with a node they could not before. 333 of 349 nodes + changed; the only one more open is the RTC, for the vendor group (it was not touched before). * The generator's inputs are in `android-vendor/ueventd/` now (the `/dev` rules of the device's `ueventd.rc` and the `chown`/`chmod` lines of its vendor init `*.rc`), and a test checks the committed script is the generator's. * Updates: `mu300-update` takes the new image's `/etc/passwd` and adds the old system's human accounts, so an updated @@ -3290,7 +3296,8 @@ where the kernel has them. `modem_control` and `refnotify` ran as `ubuntu` too: over`), `AT` OK, `+CFUN: 1`, `+CPIN` `+CME ERROR: 10` (no SIM, as before), `AT+CGMR` answers; `nr_fixnv1_a` and `persist` `mu300vnd:mu300vnd 0660` and `head` on them as `ubuntu` "Permission denied"; no world-writable node in `/dev` besides the standard ones, nothing in `/dev` or `/sys` owned by uid 1000; `mali0` `root:video 0660` and - `cltest` (OpenCL) passes; Wi-Fi client still connected; `timedatectl` reads the RTC; up past the PM watchdog's + `cltest` (OpenCL) passes; Wi-Fi client still connected; `ttyGS0`, `input/event0` and the firmware path `root:root +0600`, and a login on the serial console works (login gives `ttyGS0` to the user, getty takes it back); `timedatectl` reads the RTC; up past the PM watchdog's ~290 s. The vendor log has the same errors as before the change (no `/dev/cp_dump`, no `/proc/bootconfig`, no property service) plus the two logged failed switches. Not measured: the 5.4 kernel, OpenWrt (unchanged there but for the modes), the modem with a SIM. diff --git a/rootfs/overlay/opt/mu300/bin/ueventd-perms.sh b/rootfs/overlay/opt/mu300/bin/ueventd-perms.sh index 1b5cd433..bf775f06 100755 --- a/rootfs/overlay/opt/mu300/bin/ueventd-perms.sh +++ b/rootfs/overlay/opt/mu300/bin/ueventd-perms.sh @@ -85,13 +85,14 @@ for n in /dev/spipe_nr9; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; for n in /dev/spipe_nr14; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /dev/snv_nr; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done for n in /dev/vser; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done +for n in /dev/ttyGS*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /dev/ion; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/sprd_ion; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/sprd_dmabuf; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/dma_heap/uncached_carveout_mm; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/dma_heap/uncached_carveout_oem; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/dma_heap/carveout_fd; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done -for n in /dev/gsp; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done +for n in /dev/gsp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done for n in /dev/mali0; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/pvr_sync; do [ -e "$n" ] && chown 0:$GPU "$n" && chmod 0660 "$n"; done for n in /dev/sprd_jpg; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done @@ -106,6 +107,7 @@ for n in /dev/sprd_image; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; for n in /dev/sprd_isp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done for n in /dev/sprd_sensor; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done for n in /dev/sprd_cpp; do [ -e "$n" ] && chown $V:0 "$n" && chmod 0660 "$n"; done +for n in /dev/input/event*; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /dev/map_user; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done for n in /dev/iio:device*; do [ -e "$n" ] && chown $V:$VG "$n" && chmod 0660 "$n"; done for n in /dev/rtc*; do [ -e "$n" ] && chown 0:$VG "$n" && chmod 0660 "$n"; done @@ -428,6 +430,7 @@ for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chow for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown $V:0 "$n"; done for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown $V:0 "$n"; done for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 0660 "$n"; done @@ -453,6 +456,7 @@ for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chow for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown $V:0 "$n"; done for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown $V:0 "$n"; done for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown $V:0 "$n"; done +for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600 "$n"; done for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 0660 "$n"; done for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 0660 "$n"; done diff --git a/tests/README.md b/tests/README.md index dda81757..28a12783 100644 --- a/tests/README.md +++ b/tests/README.md @@ -20,7 +20,7 @@ macOS and Windows (`.github/workflows/tests.yml`). | `test_extra.py` | extras: `mu300-update`'s install and update of extras, `mu300-extra` install/remove/link against a fake release server; the VPN module of dikeckaan/mu300-linux-vpn (a fake module tarball: online from `MU300_VPN_URL` against its SHA256SUMS, offline `--from FILE|DIR`, a bad hash or a `requires` newer than the system refused, `hooks/link` and `hooks/unlink` for every installed system, `link` at boot), `mu300-update apply` with the VPN in use (`UpdateWithTheVpn`: refused before anything changes without the module, a staged or downloaded module installed and linked into the new systems, an older engines-only vpn extra replaced); the lang extra (`LangExtra`: catalogs linked into LuCI and registered in `luci.languages`, enable/disable, Ubuntu refused, hostile archives refused) | | `test_update.py` | `mu300-update`: release files per system and kernel, boot image byte helpers, whether a kernel bundle may go onto this device, the Linux slot it works on, and the boot image it builds from a device's own stock image (`FromStock`) | | `test_boot_init.py` | `boot/init`: the card is looked for before the internal region, under any `mmcblkN`; a foreign or empty card falls back; the 300 s timer and the conditional wait; the slot init takes (`Slot`: command line, device tree, image, a mismatch) and the block it restores | -| `test_vendor_ids.py` | the vendor daemons' account (FINDINGS 40): `ueventd-perms.sh` is the generator's output, no world-writable mode, no numeric id, the calibration partitions the vendor account's, the GPU `root:video`, the id mapping, the ids at run time (Ubuntu, OpenWrt, the initramfs); `android-run` starts `modem_control`/`refnotify` as `mu300vnd` with their capabilities only; the account made at boot (a failure never stops the modem), in the images, and kept by `mu300-update`'s merge | +| `test_vendor_ids.py` | the vendor daemons' account (FINDINGS 40): `ueventd-perms.sh` is the generator's output, no node more open for any login user or for others than with v2026.10.18's script (`tests/fixtures/ueventd-perms-v2026.10.18.sh`), no world-writable mode, no numeric id, the calibration partitions the vendor account's, the GPU `root:video`, the id mapping, the ids at run time (Ubuntu, OpenWrt, the initramfs); `android-run` starts `modem_control`/`refnotify` as `mu300vnd` with their capabilities only; the account made at boot (a failure never stops the modem), in the images, and kept by `mu300-update`'s merge | | `test_emmc_lookup.py` | every Linux-side lookup by partition name (init, `early-recorder`, `mu300-update`, `android-vendor-start`) takes the eMMC's partition, never a card's with the same GPT names, whichever of `mmcblk0`/`mmcblk1` the card is; `emmc_dev` never falls back to a card; `ueventd-perms.sh` touches no block device by number | | `test_android_mount.py` | `tools/android-mount-mu300root.sh -u`: an unmount whose loop Android's umount already freed succeeds, a loop left attached is detached, a failed umount or detach fails | | `test_android_install.py` | `tools/android-install.sh` on the SD card: a blank card is formatted, a foreign ext4 and an adopted or busy card are refused; the marker of an internal installation; pushed extras (the VPN module), and the warning when a VPN in use has no module on update | diff --git a/tests/fixtures/ueventd-perms-v2026.10.18.sh b/tests/fixtures/ueventd-perms-v2026.10.18.sh new file mode 100644 index 00000000..12070fff --- /dev/null +++ b/tests/fixtures/ueventd-perms-v2026.10.18.sh @@ -0,0 +1,596 @@ +#!/bin/sh +# generated from vendor/etc/ueventd.rc: apply Android device node ownership on plain Linux +for n in /dev/apipe-pcm; do [ -e "$n" ] && chown 1000:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/apipe-cmd-in; do [ -e "$n" ] && chown 1000:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/apipe-cmd-out; do [ -e "$n" ] && chown 1000:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/vbc_turning; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/vbc_turning*; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/l_agdsp_a; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/l_agdsp_b; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/audio_dsp*; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 666 "$n"; done +for n in /dev/audio_pipe*; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 660 "$n"; done +for n in /dev/audio_dsp_call_info; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/logo; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/nr_*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/calinv; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/pm_sys*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/ch_sys*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/vdsp*; do [ -e "$n" ] && chown 1047:1000 "$n" && chmod 660 "$n"; done +for n in /dev/iio:device*; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done +for n in /dev/data0_gnss; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0666 "$n"; done +for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem_b; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done +for n in /dev/sttygnss0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_gnss0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_gnss1; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/stime_pm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/stime_ch; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/wcn_gnss_dump; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/slog_gnss; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/slog_wcn0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/ttyS3; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/ttyS4; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/ttyS0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/gnss_pmnotify_ctl; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/power_ctl; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/gnss_dbg; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/fm; do [ -e "$n" ] && chown 1013:1013 "$n" && chmod 0660 "$n"; done +for n in /dev/ttyM0; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done +for n in /dev/ttyM1; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done +for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/tshm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/tui_dev; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/madev0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/sttybt0; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done +for n in /dev/ttyBT0; do [ -e "$n" ] && chown 1002:3001 "$n" && chmod 0660 "$n"; done +for n in /dev/trusty-ipc-dev0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/stty_lte*; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/slog_lte; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/slog_pm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/slog_ch; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/sctl_pm; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/sctl_ch; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/sdiag_lte; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/slog_ldsp; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_time_sync; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte5; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte4; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte6; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte9; do [ -e "$n" ] && chown 1001:1001 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_lte14; do [ -e "$n" ] && chown 1041:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_pm*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0666 "$n"; done +for n in /dev/spipe_ch*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/snv_lte; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/stty_nr*; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/slog_nr; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/slog_phy; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/sdiag_nr; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr5; do [ -e "$n" ] && chown 1001:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr4; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr6; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr9; do [ -e "$n" ] && chown 1001:1001 "$n" && chmod 0660 "$n"; done +for n in /dev/spipe_nr14; do [ -e "$n" ] && chown 1013:1005 "$n" && chmod 0660 "$n"; done +for n in /dev/snv_nr; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/vser; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/ttyGS*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/ion; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done +for n in /dev/sprd_ion; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done +for n in /dev/sprd_dmabuf; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done +for n in /dev/dma_heap/uncached_carveout_mm; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done +for n in /dev/dma_heap/uncached_carveout_oem; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done +for n in /dev/dma_heap/carveout_fd; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done +for n in /dev/gsp; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0660 "$n"; done +for n in /dev/mali0; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done +for n in /dev/pvr_sync; do [ -e "$n" ] && chown 1000:1003 "$n" && chmod 0666 "$n"; done +for n in /dev/sprd_jpg; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0666 "$n"; done +for n in /dev/sprd_jpg1; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_vsp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/vdma; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/vpu_enc0; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/vpu_enc1; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_vpp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_vsp_enc; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_image; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_isp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_sensor; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/sprd_cpp; do [ -e "$n" ] && chown 1000:1006 "$n" && chmod 0660 "$n"; done +for n in /dev/input/event*; do [ -e "$n" ] && chown 1000:1004 "$n" && chmod 0660 "$n"; done +for n in /dev/map_user; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/iio:device*; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/gnssmodem_a; do [ -e "$n" ] && chown 1000:0 "$n" && chmod 0660 "$n"; done +for n in /dev/rpmb0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/tmc_etb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/pn553; do [ -e "$n" ] && chown 1027:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/st21nfc; do [ -e "$n" ] && chown 1027:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/st54spi; do [ -e "$n" ] && chown 1027:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/miscdata; do [ -e "$n" ] && chown 0:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/persist; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/sysdumpdb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/by-name/fulldumpdb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/mmcblk*rpmb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/mmcblk*rpmb; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +for n in /dev/block/memdisk0p1; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0770 "$n"; done +for n in /dev/block/pmem0; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0770 "$n"; done +# chown/chmod from vendor init *.rc (Android init applies these after ueventd) +for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/typec/port0/power_role; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/typec/port0/data_role; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/typec/port0/port_type; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/usb_notify/usb_control/usb_data_enabled; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0666 "$n"; done +for n in /sys/power/wakeup_count; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/module/zte_misc/parameters/cc_connect; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /sys/devices/soc0/soc_manufacturer; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/devices/soc0/soc_model; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/devices/platform/soc/soc:aon/64400000.spi/spi_master/spi4/spi4.0/sc27xx-7sreset/hard_mode; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chown 1041:1005 "$n"; done +for n in /proc/asound/sprdphonesc2730/asoc-sprd-debug; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/devices/virtual/misc/sprd_sensor/camera_sensor_name; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/devfreq/isp-dvfs/isp_governor/set_work_freq; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/devices/virtual/misc/sprd_flash/test; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dispc0/irq_register; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dispc0/irq_unregister; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/panel0/esd_check_enable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/panel0/esd_check_enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dsi/dpms_mode; do [ -e "$n" ] && chown 1003:1000 "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/dpu_version; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/irq_register; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/irq_unregister; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1003:1000 "$n"; done +for n in /sys/class/display/dispc0/low_res_simu; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/slp; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/gamma; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/hsv; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/epf; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/scl; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/disable; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/backlight/max_brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/display/dispc0/frame_count; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/frame_count; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /dev/graphics/fb0; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /dev/fb0; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /dev/adf0; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /dev/adf-interface0.0; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /dev/adf-overlay-engine0.0; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chmod 666 "$n"; done +for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/display/dphy0/hop; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dphy0/ssc; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/panel0/name; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/vsync_rate_report; do [ -e "$n" ] && chown 1003:1000 "$n"; done +for n in /sys/class/display/dispc0/bg_color; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/display/dispc0/refresh; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/display/dispc0/disable_flip; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/backlight/sprd_backlight/brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/iq_mem; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/sprd-adf/dispc0/dynamic_pclk; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/sprd-adf/dispc0/dynamic_mipi_clk; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/sprd_bm; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/dmc_mpu; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/panel0/resolution; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/display/dispc0/PQ/enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/sr_epf; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cm; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/ltm; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/lut3d; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/status; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_mode; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_hist_v2; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_gain; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_bl_fix; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_cur_bl; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_run; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/vsync_count; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/frame_no; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_state; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/cabc_param; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/slp_lut; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/luts_print; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/update_luts; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/display/dispc0/PQ/ud; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/stop; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/start; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/modem; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/deltanv; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/gdsp; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/ldsp; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/cdsp; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/fixnv; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/runnv; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/modemassert; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chmod 440 "$n"; done +for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chmod 440 "$n"; done +for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chmod 440 "$n"; done +for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chmod 440 "$n"; done +for n in /proc/cptl/mem; do [ -e "$n" ] && chmod 440 "$n"; done +for n in /proc/cptl/modemassert; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/ddr_smem; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/pmic/aon_iram; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/wdtirq; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/stop; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/start; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/modem; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/deltanv; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/ldsp; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/gdsp; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/cdsp; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/fixnv; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/runnv; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/cpcmdline; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/ldinfo; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/cptl/mini_dump; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /proc/cptl/mem; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/modem; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /dev/phycp; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /dev/pmsys; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /dev/chsys; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /dev/mdm_ctrl; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /dev/sctl_ch; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done +for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chmod 444 "$n"; done +for n in /dev/modem; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/phycp; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/pmsys; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/chsys; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/mdm_ctrl; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /dev/sctl_ch; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/platform/spool@0/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/platform/spool@1/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@5/sipc-virt:core@5:channel@5/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/platform/sipc-virt/sipc-virt:core@7/sipc-virt:core@7:channel@5/base_addr; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cp_dump; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /dev/cp_dump; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/modem/debug-log/freq; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/modem/debug-log/channel; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/modem/debug-log/freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/modem/debug-log/channel; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/sctl_pm; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /dev/iq_mem; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /dev/iq_mem; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/sctl_pm; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /proc/mdbg; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /proc/mdbg/assert; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/mdbg; do [ -e "$n" ] && chmod 770 "$n"; done +for n in /proc/mdbg/assert; do [ -e "$n" ] && chmod 760 "$n"; done +for n in /proc/mdbg/wdtirq; do [ -e "$n" ] && chmod 760 "$n"; done +for n in /proc/mdbg/at_cmd; do [ -e "$n" ] && chmod 760 "$n"; done +for n in /proc/mdbg/loopcheck; do [ -e "$n" ] && chmod 760 "$n"; done +for n in /dev/mbox; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /dev/sipc_smsg; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /dev/sipc_smem; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /dev/sipc_sbuf; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /dev/sipc_sblock; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /dev/sipx; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/devices/platform/soc/soc:ipa-apb/soc:ipa-apb:sipa-dele/sipa_dele_reset; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/power_supply/battery/charge_control_limit; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/backlight/sprd_backlight/max_brightness; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/class/display/backlight/max_brightness; do [ -e "$n" ] && chmod 0644 "$n"; done +for n in /sys/class/thermal/thermal_zone4/trip_point_0_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/thermal_zone4/trip_point_1_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/thermal_zone4/user_power_range; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/cooling_device3/min_core_num; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/cooling_device3/min_freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/cooling_device3/max_ctrl_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/cooling_device4/min_core_num; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/cooling_device4/min_freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/cooling_device4/max_ctrl_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/cooling_device5/min_core_num; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/cooling_device5/min_freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/cooling_device5/max_ctrl_temp; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/thermal_zone4/policy; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/thermal/thermal_zone4/thm_enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/thermal/thermal_zone3/thm_enable; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/auto_dfs_on_off; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scaling_force_ddr_freq; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chmod 220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scenario_dfs; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chmod 220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/exit_scene; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chmod 220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_boost_dfs; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chmod 220 "$n"; done +for n in /sys/class/devfreq/scene-frequency/sprd-governor/scene_freq_set; do [ -e "$n" ] && chown 1047:1000 "$n"; done +for n in /sys/class/power_supply/battery/stop_charge; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/power_supply/battery/stop_charge; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/stop_charge; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/enable_power_path; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/stop_charge; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/enable_power_path; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/jeita_control; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/power_supply/battery/charger.0/keep_awake; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/power_supply/sprdfgu/cc_test_cmd; do [ -e "$n" ] && chmod 0666 "$n"; done +for n in /sys/class/power_supply/battery/input_current_limit; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/power_supply/battery/constant_charge_current; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/pmic/stop; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/pmic/start; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/pmic/mem; do [ -e "$n" ] && chmod 440 "$n"; done +for n in /proc/pmic/status; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/pmic/stop; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/pmic/start; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/pmic/pm_sys; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/pmic/mem; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/pmic/status; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/pmic/wdtirq; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/pmic/cali_lib; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /proc/pmic/ldinfo; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/bus/iio/devices/trigger0/name; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/length; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/buffer/enable; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/trigger/current_trigger; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/class/sprd_sensorhub/sensor_hub/iio/name; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 1000:0 "$n"; done +for n in /sys/module/sensorhub/parameters/gryo_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/acc_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/mag_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/pressure_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/light_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/prox_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/sensorhub/parameters/color_temp_firms; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/leds/sc27xx:red/brightness; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/leds/sc27xx:green/brightness; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/leds/sc27xx:blue/brightness; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/leds/sc27xx:red/trigger; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/leds/sc27xx:green/trigger; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/leds/sc27xx:blue/trigger; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chmod 220 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_power_enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_dump; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/misc/gnss_common_ctl/gnss_subsys; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/touchscreen/ts_suspend; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /dev/cpuctl; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/foreground; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/background; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/top-app; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/rt; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cpuctl/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /dev/cpuctl/foreground/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /dev/cpuctl/background/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /dev/cpuctl/top-app/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /dev/cpuctl/rt/tasks; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chown 1013:1000 "$n"; done +for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chown 1013:1000 "$n"; done +for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/kernel/hmp/boostpulse_duration; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/kernel/hmp/boost; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/kernel/hmp/boostpulse; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/kernel/hmp/packing_boost; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/kernel/hmp/packing_boostpulse; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/kernel/hmp/boostpulse_duratio; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/boostpulse; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/boostpulse_duration; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/boostpulse; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/boostpulse_duration; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_min_limit; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/system/cpu/cpuhotplug/cluster0_core_max_limit; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cluster0_freq_min; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cluster0_freq_max; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cluster1_freq_min; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cluster1_freq_max; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/cluster0_freq_min; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cluster0_freq_max; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cluster1_freq_min; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/cluster1_freq_max; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_setspeed; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/system/cpu/cpufreq/policy4/scaling_governor; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /proc/sprd_sysdump; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/tmc_etb; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/tmc_etb; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /dev/sprd_bm; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/dmc_mpu; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /dev/sprd_bm; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/dmc_mpu; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/modem/serdes0/channel; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/modem/serdes1/channel; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/modem/serdes0/freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/modem/serdes1/freq; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /dev/rt5512; do [ -e "$n" ] && chown 1000:1005 "$n"; done +for n in /dev/rt5512; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /proc/reserve_space/black_list; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /proc/reserve_space/white_list; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /proc/reserve_space/black_list_comm; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /proc/reserve_space/white_list_comm; do [ -e "$n" ] && chmod 640 "$n"; done +for n in /proc/reserve_space/app_guid; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/leds/skey0/mode_operation; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/leds/skey0/sensy_config; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/leds/skey0/aot_cali; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/leds/skey1/mode_operation; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/leds/skey1/sensy_config; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/class/leds/skey1/aot_cali; do [ -e "$n" ] && chmod 660 "$n"; done +for n in /sys/block/zram0/writeback_limit; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/block/zram0/writeback_limit; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/block/zram0/writeback_limit_enable; do [ -e "$n" ] && chown 0:1000 "$n"; done +for n in /sys/block/zram0/writeback_limit_enable; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /sys/class/leds/aw_led/groupcolor; do [ -e "$n" ] && chmod 0660 "$n"; done +for n in /sys/class/leds/aw_led/groupcolor; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /proc/touchscreen/wake_gesture; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /proc/touchscreen/smart_cover; do [ -e "$n" ] && chmod 644 "$n"; done +for n in /proc/touchscreen/screen_state_interface; do [ -e "$n" ] && chmod 0664 "$n"; done +for n in /proc/touchscreen/screen_state_interface; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/bus/platform/devices/zte_touch/uevent; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_cmd; do [ -e "$n" ] && chmod 0646 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_filename; do [ -e "$n" ] && chmod 0646 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_ini_file_path; do [ -e "$n" ] && chmod 0646 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_path; do [ -e "$n" ] && chmod 0646 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_save_file_name; do [ -e "$n" ] && chmod 0646 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration; do [ -e "$n" ] && chmod 0646 "$n"; done +for n in /sys/devices/virtual/tsp_fw/touchscreen/tpd_test_bsc_calibration_start; do [ -e "$n" ] && chmod 0646 "$n"; done +for n in /dev/gtp_tools; do [ -e "$n" ] && chmod 0646 "$n"; done +for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chown 1000:1000 "$n"; done +for n in /sys/class/tp_ps/enable; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/tp_ps/delay; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/tp_ps/batch; do [ -e "$n" ] && chmod 664 "$n"; done +for n in /sys/class/tp_ps/flush; do [ -e "$n" ] && chmod 664 "$n"; done +# from Android system init.rc: wakelocks are written by uid system +for n in /sys/power/wake_lock /sys/power/wake_unlock; do [ -e "$n" ] && chown 1000:1000 "$n" && chmod 0660 "$n"; done +true diff --git a/tests/test_vendor_ids.py b/tests/test_vendor_ids.py index 4db4deed..05626b73 100644 --- a/tests/test_vendor_ids.py +++ b/tests/test_vendor_ids.py @@ -5,6 +5,7 @@ modem's calibration partitions, and modem_control/refnotify ran as it. Now: the mu300vnd (uid 1000 only where there is no account at all), nothing is writable by everyone, the GPU is the video group's, the daemons start as mu300vnd, and the images (and updated systems) have the account. """ +import fnmatch import re import subprocess import sys @@ -14,6 +15,17 @@ from helpers import BIN, TOP, ShellTest GEN = TOP / 'android-vendor' / 'gen-ueventd-perms.py' INPUTS = [TOP / 'android-vendor' / 'ueventd' / 'ueventd.rc', TOP / 'android-vendor' / 'ueventd' / 'init-perms.rc'] OUTPUTS = [TOP / 'android-vendor' / 'ueventd-perms.sh', BIN / 'ueventd-perms.sh'] +# the script as it was until v2026.10.18: Android's numbers taken over +BEFORE = TOP / 'tests' / 'fixtures' / 'ueventd-perms-v2026.10.18.sh' +# Ubuntu's accounts as on an F50 (v2026.10.18 with the vendor account made at boot) +IDS = {'$V': 999, '$VG': 991, '$GPU': 44} +# who must not gain anything: the login user (uid 1000, its groups on the image), a second login user in the usual +# groups and everyone else; the vendor account itself is new and is not compared +PEOPLE = {'ubuntu': (1000, {1000, 4, 20, 24, 25, 27, 29, 30, 44, 46}), + 'a second user': (1001, {1001, 100, 44, 20, 29, 46, 993, 996}), + 'others': (65534, {65534})} +# what Linux starts a node with that neither script names (the RTC: root:root 0660, as udev leaves it here) +LINUX = (0, 0, 0o660) LINE = re.compile(r'for n in (.+?); do \[ -e "\$n" \] && (?:chown (\S+):(\S+) "\$n"(?: && chmod ([0-7]+) "\$n")?' r'|chmod ([0-7]+) "\$n"); done') @@ -33,7 +45,52 @@ def rules(text): return out +def final_states(text): + """{node: (owner, group, mode)}: every node a line of TEXT names (a glob as one concrete name), after all lines""" + lines = rules(text) + names = set() + for paths, _, _, _ in lines: + for p in paths.split(): + names.add(p.replace('*', 'X0')) + out = {} + for n in names: + o, g, m = LINUX + for paths, owner, group, mode in lines: + if any(fnmatch.fnmatchcase(n, p) for p in paths.split()): + if owner is not None: + o, g = int(IDS.get(owner, owner)), int(IDS.get(group, group)) + if mode is not None: + m = int(mode, 8) + out[n] = (o, g, m) + return out + + +def access(state, uid, groups): + """the rwx bits STATE gives a process of UID in GROUPS""" + o, g, m = state + if uid == o: + return (m >> 6) & 7 + if g in groups: + return (m >> 3) & 7 + return m & 7 + + class Generated(ShellTest): + def test_nobody_gains_anything(self): + before, after = final_states(BEFORE.read_text()), final_states(OUTPUTS[0].read_text()) + for n in sorted(set(before) | set(after)): + for who, (uid, groups) in PEOPLE.items(): + was = access(before.get(n, LINUX), uid, groups) + now = access(after.get(n, LINUX), uid, groups) + self.assertEqual(now & ~was, 0, f'{n}: {who} gains {now & ~was:o} ({before.get(n)} -> {after.get(n)})') + + def test_the_modem_calibration_was_the_login_users_and_is_not(self): + before, after = final_states(BEFORE.read_text()), final_states(OUTPUTS[0].read_text()) + for n in ('/dev/block/by-name/nr_X0', '/dev/block/by-name/persist'): + self.assertEqual(access(before[n], *PEOPLE['ubuntu']), 6) + self.assertEqual(access(after[n], *PEOPLE['ubuntu']), 0) + + def test_the_committed_script_is_the_generators(self): want = generate(*INPUTS) for f in OUTPUTS: @@ -76,18 +133,20 @@ class Generated(ShellTest): for p in ('/dev/mali0', '/dev/ion', '/dev/sprd_dmabuf', '/dev/dma_heap/carveout_fd'): self.assertEqual(r[p], ('0', '$GPU', '0660'), p) - def test_kept_as_linux_has_them(self): - text = OUTPUTS[0].read_text() - for p in ('/sys/module/firmware_class/', '/dev/input/', '/dev/ttyGS'): - self.assertNotIn(f'for n in {p}', text) + def test_root_only(self): + # keys pressed, the serial console and the firmware search path were the first human's: root's alone now + r = {p: (o, g, m) for p, o, g, m in rules(OUTPUTS[0].read_text()) if o is not None} + for p in ('/sys/module/firmware_class/parameters/path', '/dev/input/event*', '/dev/ttyGS*'): + self.assertEqual(r[p], ('0', '0', '0600'), p) + self.assertNotIn('chmod 660 /sys/module/firmware_class', OUTPUTS[0].read_text()) # the RTC stays root's (systemd-timedated has no CAP_DAC_OVERRIDE); refnotify reaches it through the group - r = {p: (o, g, m) for p, o, g, m in rules(text) if o is not None} + r = {p: (o, g, m) for p, o, g, m in rules(OUTPUTS[0].read_text()) if o is not None} self.assertEqual(r['/dev/rtc*'], ('0', '$VG', '0660')) def test_mapping(self): rc = self.tmp / 'ueventd.rc' rc.write_text('/dev/modem 0660 system radio\n/dev/spipe_pm* 0666 system system\n' - '/dev/mali0 0666 system graphics\n/dev/audio_dsp* 666 audioserver audio\n' + '/dev/mali0 0666 system graphics\n/dev/gsp 0660 system graphics\n/dev/audio_dsp* 666 audioserver audio\n' '/dev/stty_nr* 0660 radio system\n/dev/block/by-name/miscdata 0660 root system\n' '/dev/ttyM0 0660 bluetooth net_bt_admin\n/dev/input/event* 0660 system input\n' '/dev/x 0646 system system # a comment\n/dev/unknown 0660 nosuch system\n') @@ -100,12 +159,13 @@ class Generated(ShellTest): self.assertEqual(r['/dev/modem'], ('$V', '$VG', '0660')) self.assertEqual(r['/dev/spipe_pm*'], ('$V', '$VG', '0660')) self.assertEqual(r['/dev/mali0'], ('0', '$GPU', '0660')) + self.assertEqual(r['/dev/gsp'], ('$V', '0', '0660')) # only everyone's GPU nodes go to video self.assertEqual(r['/dev/audio_dsp*'], ('0', '0', '0600')) # root's alone: no group bits self.assertEqual(r['/dev/stty_nr*'], ('$V', '$VG', '0660')) self.assertEqual(r['/dev/block/by-name/miscdata'], ('0', '$VG', '0660')) self.assertEqual(r['/dev/ttyM0'], ('0', '0', '0600')) self.assertEqual(r['/dev/x'], ('$V', '$VG', '0640')) - self.assertNotIn('/dev/input/event*', r) + self.assertEqual(r['/dev/input/event*'], ('0', '0', '0600')) self.assertNotIn('/dev/unknown', r) out = generate(rc, init) self.assertIn('chown $V:$VG "$n"; done', out.splitlines()[[i for i, x in enumerate(out.splitlines()) @@ -116,7 +176,8 @@ class Generated(ShellTest): r2 = {p: (o, g) for p, o, g, m in rules(out) if o is not None} self.assertEqual(r2['/sys/d'], ('0', '$VG')) self.assertEqual(r2['/sys/e'], ('$V', '$VG')) - self.assertNotIn('firmware_class', out) + self.assertIn('for n in /sys/module/firmware_class/parameters/path; do [ -e "$n" ] && chown 0:0 "$n" && chmod 0600', out) + self.assertEqual(out.count('firmware_class'), 1) # its chmod 660 is not taken over self.assertNotIn('/dev/f', out) def ids(self, shell, passwd, group): From 0edbb8861c5bc4d276b4d6eb95110868302e4e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdurrahman=20Kaan=20Dike=C3=A7?= Date: Sun, 11 Oct 2026 20:49:21 +0300 Subject: [PATCH 8/9] Terminal: the idle notice reaches the browser; one minute is singular From the U30 device test: the watchdog hung up the shell right after writing "Closed after ...", and ttyd closed the websocket before the line reached the browser; it now waits 3 s between the two. The notice says "1 minute" / "N seconds" / "N minutes", and the page has its own message for a minute or less (the panel's catalogs have no plural forms: po2lmo and luci-i18n refuse N_()), in all 31 catalogs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn --- .../luci-static/resources/view/mu300/terminal.js | 5 ++++- openwrt/luci-app-mu300/po/ar/mu300.po | 3 +++ openwrt/luci-app-mu300/po/az/mu300.po | 3 +++ openwrt/luci-app-mu300/po/bg/mu300.po | 3 +++ openwrt/luci-app-mu300/po/cs/mu300.po | 3 +++ openwrt/luci-app-mu300/po/da/mu300.po | 3 +++ openwrt/luci-app-mu300/po/de/mu300.po | 3 +++ openwrt/luci-app-mu300/po/el/mu300.po | 3 +++ openwrt/luci-app-mu300/po/es/mu300.po | 3 +++ openwrt/luci-app-mu300/po/fa/mu300.po | 3 +++ openwrt/luci-app-mu300/po/fi/mu300.po | 3 +++ openwrt/luci-app-mu300/po/fr/mu300.po | 3 +++ openwrt/luci-app-mu300/po/he/mu300.po | 3 +++ openwrt/luci-app-mu300/po/hi/mu300.po | 3 +++ openwrt/luci-app-mu300/po/hu/mu300.po | 3 +++ openwrt/luci-app-mu300/po/id/mu300.po | 3 +++ openwrt/luci-app-mu300/po/it/mu300.po | 3 +++ openwrt/luci-app-mu300/po/ja/mu300.po | 3 +++ openwrt/luci-app-mu300/po/kk/mu300.po | 3 +++ openwrt/luci-app-mu300/po/ko/mu300.po | 3 +++ openwrt/luci-app-mu300/po/nl/mu300.po | 3 +++ openwrt/luci-app-mu300/po/pl/mu300.po | 3 +++ openwrt/luci-app-mu300/po/pt_BR/mu300.po | 3 +++ openwrt/luci-app-mu300/po/ro/mu300.po | 3 +++ openwrt/luci-app-mu300/po/ru/mu300.po | 3 +++ openwrt/luci-app-mu300/po/sk/mu300.po | 3 +++ openwrt/luci-app-mu300/po/sv/mu300.po | 3 +++ openwrt/luci-app-mu300/po/tr/mu300.po | 3 +++ openwrt/luci-app-mu300/po/uk/mu300.po | 3 +++ openwrt/luci-app-mu300/po/vi/mu300.po | 3 +++ openwrt/luci-app-mu300/po/zh_Hans/mu300.po | 3 +++ openwrt/luci-app-mu300/po/zh_Hant/mu300.po | 3 +++ .../root/usr/libexec/mu300-terminal-login | 6 +++++- tests/test_luci_i18n.py | 5 +++-- tests/test_terminal.py | 13 +++++++++++++ 35 files changed, 118 insertions(+), 4 deletions(-) diff --git a/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/terminal.js b/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/terminal.js index c0e4f683..bf563ba6 100644 --- a/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/terminal.js +++ b/openwrt/luci-app-mu300/htdocs/luci-static/resources/view/mu300/terminal.js @@ -77,9 +77,12 @@ return view.extend({ card.appendChild(E('div', { 'class': 'mud-note', 'id': 'mud-term-scope' }, [ _('It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page.') ])); + /* a minute or less has a message of its own: the panel's catalogs have no plural forms (po2lmo, luci-i18n) */ + var mins = Math.round(Number(r && r.idle) / 60); if (r && Number(r.idle) > 0) card.appendChild(E('div', { 'class': 'mud-note', 'id': 'mud-term-idle' }, [ - _('It closes after %d minutes without activity.').format(Math.max(1, Math.round(Number(r.idle) / 60))) + mins <= 1 ? _('It closes after a minute without activity.') + : _('It closes after %d minutes without activity.').format(mins) ])); var url = this.target(r); if (!url) { diff --git a/openwrt/luci-app-mu300/po/ar/mu300.po b/openwrt/luci-app-mu300/po/ar/mu300.po index 7639b1f1..d0ba7aeb 100644 --- a/openwrt/luci-app-mu300/po/ar/mu300.po +++ b/openwrt/luci-app-mu300/po/ar/mu300.po @@ -1530,6 +1530,9 @@ msgstr "هذه صدفة root على الجهاز: يعمل كل أمر بصلا msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "يمكن الوصول إليها من الشبكة المحلية فقط (USB ونقطة الاتصال)، ولا يمكن أبدًا من بيانات الجوال، ومن هذه الصفحة المسجّل الدخول إليها فقط." +msgid "It closes after a minute without activity." +msgstr "تُغلق بعد دقيقة من عدم النشاط." + msgid "It closes after %d minutes without activity." msgstr "تُغلق بعد %d دقيقة من عدم النشاط." diff --git a/openwrt/luci-app-mu300/po/az/mu300.po b/openwrt/luci-app-mu300/po/az/mu300.po index 957cc3c9..10e4f475 100644 --- a/openwrt/luci-app-mu300/po/az/mu300.po +++ b/openwrt/luci-app-mu300/po/az/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Bu, cihazda root qabığıdır: hər əmr tam hüquqlarla işləyir və msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Ona yalnız LAN-dan (USB və hotspot) çatmaq olar, heç vaxt mobil datadan yox, və yalnız bu daxil olunmuş səhifədən." +msgid "It closes after a minute without activity." +msgstr "Bir dəqiqə fəaliyyətsizlikdən sonra bağlanır." + msgid "It closes after %d minutes without activity." msgstr "%d dəqiqə fəaliyyətsizlikdən sonra bağlanır." diff --git a/openwrt/luci-app-mu300/po/bg/mu300.po b/openwrt/luci-app-mu300/po/bg/mu300.po index 59ff85b3..ccd690cf 100644 --- a/openwrt/luci-app-mu300/po/bg/mu300.po +++ b/openwrt/luci-app-mu300/po/bg/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Това е root обвивка на устройството: всяк msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Достъпен е само от LAN (USB и точката за достъп), никога от мобилните данни, и само от тази страница с вход." +msgid "It closes after a minute without activity." +msgstr "Затваря се след минута без активност." + msgid "It closes after %d minutes without activity." msgstr "Затваря се след %d минути без активност." diff --git a/openwrt/luci-app-mu300/po/cs/mu300.po b/openwrt/luci-app-mu300/po/cs/mu300.po index fedd23c2..8c8dd219 100644 --- a/openwrt/luci-app-mu300/po/cs/mu300.po +++ b/openwrt/luci-app-mu300/po/cs/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Toto je root shell zařízení: každý příkaz běží s plnými práv msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Je dostupný pouze z LAN (USB a hotspot), nikdy z mobilních dat, a jen z této přihlášené stránky." +msgid "It closes after a minute without activity." +msgstr "Zavře se po minutě bez aktivity." + msgid "It closes after %d minutes without activity." msgstr "Zavře se po %d minutách bez aktivity." diff --git a/openwrt/luci-app-mu300/po/da/mu300.po b/openwrt/luci-app-mu300/po/da/mu300.po index 9c036d13..bc853ba3 100644 --- a/openwrt/luci-app-mu300/po/da/mu300.po +++ b/openwrt/luci-app-mu300/po/da/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Dette er en root-shell på enheden: hver kommando kører med fulde retti msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Den kan kun nås fra LAN (USB og hotspot), aldrig fra mobildata, og kun fra denne side, hvor du er logget ind." +msgid "It closes after a minute without activity." +msgstr "Den lukkes efter et minut uden aktivitet." + msgid "It closes after %d minutes without activity." msgstr "Den lukkes efter %d minutter uden aktivitet." diff --git a/openwrt/luci-app-mu300/po/de/mu300.po b/openwrt/luci-app-mu300/po/de/mu300.po index c0e841e6..0fc31beb 100644 --- a/openwrt/luci-app-mu300/po/de/mu300.po +++ b/openwrt/luci-app-mu300/po/de/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Dies ist eine Root-Shell auf dem Gerät: Jeder Befehl läuft mit vollen msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Es ist nur aus dem LAN erreichbar (USB und Hotspot), nie über mobile Daten, und nur von dieser angemeldeten Seite aus." +msgid "It closes after a minute without activity." +msgstr "Es wird nach einer Minute ohne Aktivität geschlossen." + msgid "It closes after %d minutes without activity." msgstr "Es wird nach %d Minuten ohne Aktivität geschlossen." diff --git a/openwrt/luci-app-mu300/po/el/mu300.po b/openwrt/luci-app-mu300/po/el/mu300.po index e0e81df4..4918c0b1 100644 --- a/openwrt/luci-app-mu300/po/el/mu300.po +++ b/openwrt/luci-app-mu300/po/el/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Αυτό είναι ένα κέλυφος root της συσκευής: msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Είναι προσβάσιμο μόνο από το LAN (USB και hotspot), ποτέ από τα δεδομένα κινητής, και μόνο από αυτή τη σελίδα με σύνδεση." +msgid "It closes after a minute without activity." +msgstr "Κλείνει μετά από ένα λεπτό χωρίς δραστηριότητα." + msgid "It closes after %d minutes without activity." msgstr "Κλείνει μετά από %d λεπτά χωρίς δραστηριότητα." diff --git a/openwrt/luci-app-mu300/po/es/mu300.po b/openwrt/luci-app-mu300/po/es/mu300.po index eff02062..2a4ebdac 100644 --- a/openwrt/luci-app-mu300/po/es/mu300.po +++ b/openwrt/luci-app-mu300/po/es/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Este es un shell de root del dispositivo: cada orden se ejecuta con todo msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Solo es accesible desde la LAN (USB y el punto de acceso), nunca desde los datos móviles, y solo desde esta página con sesión iniciada." +msgid "It closes after a minute without activity." +msgstr "Se cierra tras un minuto sin actividad." + msgid "It closes after %d minutes without activity." msgstr "Se cierra tras %d minutos sin actividad." diff --git a/openwrt/luci-app-mu300/po/fa/mu300.po b/openwrt/luci-app-mu300/po/fa/mu300.po index 46dcfea7..5135e747 100644 --- a/openwrt/luci-app-mu300/po/fa/mu300.po +++ b/openwrt/luci-app-mu300/po/fa/mu300.po @@ -1530,6 +1530,9 @@ msgstr "این یک پوسته root روی دستگاه است: هر فرمان msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "فقط از LAN (USB و هات‌اسپات) در دسترس است، هرگز از داده همراه، و فقط از همین صفحه‌ای که با آن وارد شده‌اید." +msgid "It closes after a minute without activity." +msgstr "پس از یک دقیقه بدون فعالیت بسته می‌شود." + msgid "It closes after %d minutes without activity." msgstr "پس از %d دقیقه بدون فعالیت بسته می‌شود." diff --git a/openwrt/luci-app-mu300/po/fi/mu300.po b/openwrt/luci-app-mu300/po/fi/mu300.po index 4e747c12..4fa096a4 100644 --- a/openwrt/luci-app-mu300/po/fi/mu300.po +++ b/openwrt/luci-app-mu300/po/fi/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Tämä on laitteen root-komentotulkki: jokainen komento suoritetaan täy msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Se on käytettävissä vain lähiverkosta (USB ja hotspot), ei koskaan mobiilidatan kautta, ja vain tältä kirjautuneelta sivulta." +msgid "It closes after a minute without activity." +msgstr "Se suljetaan minuutin toimettomuuden jälkeen." + msgid "It closes after %d minutes without activity." msgstr "Se suljetaan %d minuutin toimettomuuden jälkeen." diff --git a/openwrt/luci-app-mu300/po/fr/mu300.po b/openwrt/luci-app-mu300/po/fr/mu300.po index fe3005ea..5eb48a99 100644 --- a/openwrt/luci-app-mu300/po/fr/mu300.po +++ b/openwrt/luci-app-mu300/po/fr/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Ceci est un shell root de l’appareil : chaque commande s’exécute av msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Il n’est accessible que depuis le LAN (USB et le point d’accès), jamais depuis les données mobiles, et seulement depuis cette page connectée." +msgid "It closes after a minute without activity." +msgstr "Il se ferme après une minute d’inactivité." + msgid "It closes after %d minutes without activity." msgstr "Il se ferme après %d minutes d’inactivité." diff --git a/openwrt/luci-app-mu300/po/he/mu300.po b/openwrt/luci-app-mu300/po/he/mu300.po index e04da00a..4dc542c6 100644 --- a/openwrt/luci-app-mu300/po/he/mu300.po +++ b/openwrt/luci-app-mu300/po/he/mu300.po @@ -1530,6 +1530,9 @@ msgstr "זוהי מעטפת root של המכשיר: כל פקודה רצה עם msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "הוא נגיש רק מה-LAN (USB ונקודת הגישה), לעולם לא מנתוני הסלולר, ורק מהדף המחובר הזה." +msgid "It closes after a minute without activity." +msgstr "הוא נסגר לאחר דקה ללא פעילות." + msgid "It closes after %d minutes without activity." msgstr "הוא נסגר לאחר %d דקות ללא פעילות." diff --git a/openwrt/luci-app-mu300/po/hi/mu300.po b/openwrt/luci-app-mu300/po/hi/mu300.po index 9a7873db..f80ab782 100644 --- a/openwrt/luci-app-mu300/po/hi/mu300.po +++ b/openwrt/luci-app-mu300/po/hi/mu300.po @@ -1530,6 +1530,9 @@ msgstr "यह डिवाइस का root शेल है: हर कमा msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "यह केवल LAN (USB और हॉटस्पॉट) से पहुँच योग्य है, मोबाइल डेटा से कभी नहीं, और केवल इसी लॉग-इन पेज से।" +msgid "It closes after a minute without activity." +msgstr "एक मिनट तक कोई गतिविधि न होने पर यह बंद हो जाता है।" + msgid "It closes after %d minutes without activity." msgstr "%d मिनट तक कोई गतिविधि न होने पर यह बंद हो जाता है।" diff --git a/openwrt/luci-app-mu300/po/hu/mu300.po b/openwrt/luci-app-mu300/po/hu/mu300.po index e24a2077..4b7c1ddf 100644 --- a/openwrt/luci-app-mu300/po/hu/mu300.po +++ b/openwrt/luci-app-mu300/po/hu/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Ez az eszköz root shellje: minden parancs teljes jogokkal fut, és egy msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Csak a LAN-ról érhető el (USB és a hotspot), mobiladatról soha, és csak erről a bejelentkezett oldalról." +msgid "It closes after a minute without activity." +msgstr "Egy perc tétlenség után bezárul." + msgid "It closes after %d minutes without activity." msgstr "%d perc tétlenség után bezárul." diff --git a/openwrt/luci-app-mu300/po/id/mu300.po b/openwrt/luci-app-mu300/po/id/mu300.po index 088b20b3..2ee61c07 100644 --- a/openwrt/luci-app-mu300/po/id/mu300.po +++ b/openwrt/luci-app-mu300/po/id/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Ini adalah shell root perangkat: setiap perintah berjalan dengan hak pen msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Hanya dapat dijangkau dari LAN (USB dan hotspot), tidak pernah dari data seluler, dan hanya dari halaman yang sudah login ini." +msgid "It closes after a minute without activity." +msgstr "Ditutup setelah satu menit tanpa aktivitas." + msgid "It closes after %d minutes without activity." msgstr "Ditutup setelah %d menit tanpa aktivitas." diff --git a/openwrt/luci-app-mu300/po/it/mu300.po b/openwrt/luci-app-mu300/po/it/mu300.po index 5f4de239..be3ef62e 100644 --- a/openwrt/luci-app-mu300/po/it/mu300.po +++ b/openwrt/luci-app-mu300/po/it/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Questa è una shell root del dispositivo: ogni comando viene eseguito co msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "È raggiungibile solo dalla LAN (USB e hotspot), mai dai dati mobili, e solo da questa pagina con accesso effettuato." +msgid "It closes after a minute without activity." +msgstr "Si chiude dopo un minuto di inattività." + msgid "It closes after %d minutes without activity." msgstr "Si chiude dopo %d minuti di inattività." diff --git a/openwrt/luci-app-mu300/po/ja/mu300.po b/openwrt/luci-app-mu300/po/ja/mu300.po index 3cd63928..daeb84de 100644 --- a/openwrt/luci-app-mu300/po/ja/mu300.po +++ b/openwrt/luci-app-mu300/po/ja/mu300.po @@ -1530,6 +1530,9 @@ msgstr "これはデバイスの root シェルです。すべてのコマンド msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "LAN (USB とホットスポット) からのみ、ログイン済みのこのページからのみ利用でき、モバイルデータ側からは決して届きません。" +msgid "It closes after a minute without activity." +msgstr "1 分間操作がないと閉じます。" + msgid "It closes after %d minutes without activity." msgstr "%d 分間操作がないと閉じます。" diff --git a/openwrt/luci-app-mu300/po/kk/mu300.po b/openwrt/luci-app-mu300/po/kk/mu300.po index 7efef101..bb8eb168 100644 --- a/openwrt/luci-app-mu300/po/kk/mu300.po +++ b/openwrt/luci-app-mu300/po/kk/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Бұл құрылғының root қабығы: әр команда то msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Оған тек LAN арқылы (USB және хотспот) қол жеткізуге болады, мобильді деректен ешқашан, және тек осы кірілген беттен." +msgid "It closes after a minute without activity." +msgstr "Бір минут әрекетсіздіктен кейін жабылады." + msgid "It closes after %d minutes without activity." msgstr "%d минут әрекетсіздіктен кейін жабылады." diff --git a/openwrt/luci-app-mu300/po/ko/mu300.po b/openwrt/luci-app-mu300/po/ko/mu300.po index 84a920cd..cad7b0cb 100644 --- a/openwrt/luci-app-mu300/po/ko/mu300.po +++ b/openwrt/luci-app-mu300/po/ko/mu300.po @@ -1530,6 +1530,9 @@ msgstr "기기의 root 셸입니다. 모든 명령이 전체 권한으로 실행 msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "LAN(USB와 핫스팟)에서만, 그리고 로그인한 이 페이지에서만 접근할 수 있으며 모바일 데이터 쪽에서는 절대 접근할 수 없습니다." +msgid "It closes after a minute without activity." +msgstr "1분 동안 활동이 없으면 닫힙니다." + msgid "It closes after %d minutes without activity." msgstr "%d분 동안 활동이 없으면 닫힙니다." diff --git a/openwrt/luci-app-mu300/po/nl/mu300.po b/openwrt/luci-app-mu300/po/nl/mu300.po index ac44aa37..1af694dc 100644 --- a/openwrt/luci-app-mu300/po/nl/mu300.po +++ b/openwrt/luci-app-mu300/po/nl/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Dit is een root-shell op het apparaat: elke opdracht draait met volledig msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Hij is alleen bereikbaar vanaf het LAN (USB en de hotspot), nooit via mobiele data, en alleen vanaf deze ingelogde pagina." +msgid "It closes after a minute without activity." +msgstr "Hij sluit na een minuut zonder activiteit." + msgid "It closes after %d minutes without activity." msgstr "Hij sluit na %d minuten zonder activiteit." diff --git a/openwrt/luci-app-mu300/po/pl/mu300.po b/openwrt/luci-app-mu300/po/pl/mu300.po index c1a09af0..5421e57a 100644 --- a/openwrt/luci-app-mu300/po/pl/mu300.po +++ b/openwrt/luci-app-mu300/po/pl/mu300.po @@ -1530,6 +1530,9 @@ msgstr "To jest powłoka root urządzenia: każde polecenie działa z pełnymi u msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Jest dostępny tylko z sieci LAN (USB i hotspot), nigdy z danych komórkowych, i tylko z tej zalogowanej strony." +msgid "It closes after a minute without activity." +msgstr "Zamyka się po minucie bezczynności." + msgid "It closes after %d minutes without activity." msgstr "Zamyka się po %d minutach bezczynności." diff --git a/openwrt/luci-app-mu300/po/pt_BR/mu300.po b/openwrt/luci-app-mu300/po/pt_BR/mu300.po index 75ac69a5..a69d6919 100644 --- a/openwrt/luci-app-mu300/po/pt_BR/mu300.po +++ b/openwrt/luci-app-mu300/po/pt_BR/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Este é um shell root do dispositivo: cada comando roda com todos os pri msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Só é acessível pela LAN (USB e o hotspot), nunca pelos dados móveis, e só a partir desta página com login." +msgid "It closes after a minute without activity." +msgstr "Ele fecha após um minuto sem atividade." + msgid "It closes after %d minutes without activity." msgstr "Ele fecha após %d minutos sem atividade." diff --git a/openwrt/luci-app-mu300/po/ro/mu300.po b/openwrt/luci-app-mu300/po/ro/mu300.po index 1d7d2f94..3fa15b86 100644 --- a/openwrt/luci-app-mu300/po/ro/mu300.po +++ b/openwrt/luci-app-mu300/po/ro/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Acesta este un shell root al dispozitivului: fiecare comandă rulează c msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Este accesibil doar din LAN (USB și hotspot), niciodată din datele mobile, și doar din această pagină autentificată." +msgid "It closes after a minute without activity." +msgstr "Se închide după un minut fără activitate." + msgid "It closes after %d minutes without activity." msgstr "Se închide după %d minute fără activitate." diff --git a/openwrt/luci-app-mu300/po/ru/mu300.po b/openwrt/luci-app-mu300/po/ru/mu300.po index 58916af3..ea626a8a 100644 --- a/openwrt/luci-app-mu300/po/ru/mu300.po +++ b/openwrt/luci-app-mu300/po/ru/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Это оболочка root на устройстве: каждая к msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Он доступен только из LAN (USB и точка доступа), никогда из мобильной сети, и только с этой страницы после входа." +msgid "It closes after a minute without activity." +msgstr "Он закрывается после минуты бездействия." + msgid "It closes after %d minutes without activity." msgstr "Он закрывается после %d минут бездействия." diff --git a/openwrt/luci-app-mu300/po/sk/mu300.po b/openwrt/luci-app-mu300/po/sk/mu300.po index 0fc77084..80183750 100644 --- a/openwrt/luci-app-mu300/po/sk/mu300.po +++ b/openwrt/luci-app-mu300/po/sk/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Toto je root shell zariadenia: každý príkaz beží s plnými právami msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Je dostupný iba z LAN (USB a hotspot), nikdy z mobilných dát, a len z tejto prihlásenej stránky." +msgid "It closes after a minute without activity." +msgstr "Zatvorí sa po minúte bez aktivity." + msgid "It closes after %d minutes without activity." msgstr "Zatvorí sa po %d minútach bez aktivity." diff --git a/openwrt/luci-app-mu300/po/sv/mu300.po b/openwrt/luci-app-mu300/po/sv/mu300.po index e14d3eaa..7202d31f 100644 --- a/openwrt/luci-app-mu300/po/sv/mu300.po +++ b/openwrt/luci-app-mu300/po/sv/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Det här är ett root-skal på enheten: varje kommando körs med fullst msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Den nås bara från LAN (USB och hotspot), aldrig via mobildata, och bara från den här inloggade sidan." +msgid "It closes after a minute without activity." +msgstr "Den stängs efter en minut utan aktivitet." + msgid "It closes after %d minutes without activity." msgstr "Den stängs efter %d minuter utan aktivitet." diff --git a/openwrt/luci-app-mu300/po/tr/mu300.po b/openwrt/luci-app-mu300/po/tr/mu300.po index 3d0e09a4..512ae732 100644 --- a/openwrt/luci-app-mu300/po/tr/mu300.po +++ b/openwrt/luci-app-mu300/po/tr/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Bu, cihazın root kabuğudur: her komut tam yetkiyle çalışır ve bir msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Yalnızca LAN'dan (USB ve hotspot) ve yalnızca oturum açılmış bu sayfadan erişilebilir; mobil veriden asla erişilemez." +msgid "It closes after a minute without activity." +msgstr "1 dakika işlem yapılmazsa kapanır." + msgid "It closes after %d minutes without activity." msgstr "%d dakika işlem yapılmazsa kapanır." diff --git a/openwrt/luci-app-mu300/po/uk/mu300.po b/openwrt/luci-app-mu300/po/uk/mu300.po index aad59b53..aa54210f 100644 --- a/openwrt/luci-app-mu300/po/uk/mu300.po +++ b/openwrt/luci-app-mu300/po/uk/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Це оболонка root на пристрої: кожна коман msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Він доступний лише з LAN (USB і точка доступу), ніколи з мобільних даних, і лише з цієї сторінки після входу." +msgid "It closes after a minute without activity." +msgstr "Він закривається після хвилини бездіяльності." + msgid "It closes after %d minutes without activity." msgstr "Він закривається після %d хвилин бездіяльності." diff --git a/openwrt/luci-app-mu300/po/vi/mu300.po b/openwrt/luci-app-mu300/po/vi/mu300.po index df8c1e99..57cd019e 100644 --- a/openwrt/luci-app-mu300/po/vi/mu300.po +++ b/openwrt/luci-app-mu300/po/vi/mu300.po @@ -1530,6 +1530,9 @@ msgstr "Đây là shell root của thiết bị: mọi lệnh chạy với toàn msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "Chỉ truy cập được từ LAN (USB và điểm phát sóng), không bao giờ từ dữ liệu di động, và chỉ từ trang đã đăng nhập này." +msgid "It closes after a minute without activity." +msgstr "Tự đóng sau một phút không hoạt động." + msgid "It closes after %d minutes without activity." msgstr "Tự đóng sau %d phút không hoạt động." diff --git a/openwrt/luci-app-mu300/po/zh_Hans/mu300.po b/openwrt/luci-app-mu300/po/zh_Hans/mu300.po index 2d09ea63..374b87c8 100644 --- a/openwrt/luci-app-mu300/po/zh_Hans/mu300.po +++ b/openwrt/luci-app-mu300/po/zh_Hans/mu300.po @@ -1530,6 +1530,9 @@ msgstr "这是设备上的 root shell:每条命令都以完全权限运行, msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "只能从局域网(USB 和热点)并且只能从这个已登录的页面访问,移动数据一侧永远无法访问。" +msgid "It closes after a minute without activity." +msgstr "无操作 1 分钟后自动关闭。" + msgid "It closes after %d minutes without activity." msgstr "无操作 %d 分钟后自动关闭。" diff --git a/openwrt/luci-app-mu300/po/zh_Hant/mu300.po b/openwrt/luci-app-mu300/po/zh_Hant/mu300.po index a7ecc0b3..f0a0510f 100644 --- a/openwrt/luci-app-mu300/po/zh_Hant/mu300.po +++ b/openwrt/luci-app-mu300/po/zh_Hant/mu300.po @@ -1530,6 +1530,9 @@ msgstr "這是裝置上的 root shell:每個指令都以完整權限執行, msgid "It is reachable from the LAN only (USB and the hotspot), never from mobile data, and only from this logged-in page." msgstr "只能從區域網路(USB 和熱點)並且只能從這個已登入的頁面存取,行動數據一側永遠無法存取。" +msgid "It closes after a minute without activity." +msgstr "無操作 1 分鐘後自動關閉。" + msgid "It closes after %d minutes without activity." msgstr "無操作 %d 分鐘後自動關閉。" diff --git a/openwrt/luci-app-mu300/root/usr/libexec/mu300-terminal-login b/openwrt/luci-app-mu300/root/usr/libexec/mu300-terminal-login index f882af8b..2a3e3070 100755 --- a/openwrt/luci-app-mu300/root/usr/libexec/mu300-terminal-login +++ b/openwrt/luci-app-mu300/root/usr/libexec/mu300-terminal-login @@ -50,7 +50,11 @@ if [ "$IDLE" -gt 0 ] && [ -n "$tty" ]; then [ "$(sed 's/^.*) //' /proc/$pid/stat 2>/dev/null | cut -d' ' -f20)" = "$st" ] || exit 0 last=$(date -r "$tty" +%s 2>/dev/null) || exit 0 if [ $(( $(date +%s) - last )) -ge "$IDLE" ]; then - printf '\r\n%s\r\n' "Closed after $((IDLE / 60)) minutes without activity." >"$tty" 2>/dev/null + case $IDLE in [0-9]|[1-5][0-9]) took="$IDLE seconds" ;; 6[0-9]|[7-9][0-9]|1[01][0-9]) took="1 minute" ;; + *) took="$((IDLE / 60)) minutes" ;; esac + printf '\r\n%s\r\n' "Closed after $took without activity." >"$tty" 2>/dev/null + # time for ttyd to carry the line to the browser: it closes the websocket as soon as the shell ends + sleep "${MU300_TERM_NOTICE_WAIT:-3}" kill -HUP "$pid" 2>/dev/null sleep 2 [ "$(sed 's/^.*) //' /proc/$pid/stat 2>/dev/null | cut -d' ' -f20)" = "$st" ] && kill -KILL "$pid" 2>/dev/null diff --git a/tests/test_luci_i18n.py b/tests/test_luci_i18n.py index 9c658c3f..6364ec82 100644 --- a/tests/test_luci_i18n.py +++ b/tests/test_luci_i18n.py @@ -824,7 +824,7 @@ return notes();''' window.location.protocol = 'http:'; window.location.hostname = '192.168.77.1'; const tok = { ok: 1, token: '0123456789abcdef0123456789abcdef', port: 7681, lan: '192.168.77.1', ttl: 60, idle: 900 }; V.render(tok); -window.location.protocol = 'https:'; V.paint(tok); +window.location.protocol = 'https:'; V.paint(tok); V.paint(Object.assign({}, tok, { idle: 60 })); [ 'missing', 'off', 'busy', 'internal' ].forEach((c) => V.paint({ ok: 0, code: c })); return notes();''' @@ -846,7 +846,8 @@ return [ at('192.168.77.1'), at('mu300.lan'), at('[fd00::1]'), at('fd00::1'), for lang in (None, 'tr', 'zh_Hans'): with self.subTest(lang=lang): out = self.run_view('terminal', lang, self.TERMINAL) - for m in ('Terminal', 'It closes after %d minutes without activity.', 'Reconnect', 'Open in a new tab', + for m in ('Terminal', 'It closes after %d minutes without activity.', + 'It closes after a minute without activity.', 'Reconnect', 'Open in a new tab', 'This page was opened over HTTPS, and the terminal is served over HTTP on the LAN: it opens in a tab of its own.', 'ttyd is not installed.', 'The terminal is turned off (/etc/config/ttyd).', 'Too many terminals are opening at once. Try again in a minute.', diff --git a/tests/test_terminal.py b/tests/test_terminal.py index 2a23f17a..84048770 100644 --- a/tests/test_terminal.py +++ b/tests/test_terminal.py @@ -4,6 +4,7 @@ address only, never a port on the cellular side), the ACL, the menu and the buil import json import os import re +import subprocess import time import unittest from pathlib import Path @@ -251,6 +252,18 @@ class Image(unittest.TestCase): for m in re.finditer(r"name='wan'.*?(?:\n\n|$)", text, re.S): self.assertNotIn("input='ACCEPT'", m.group(0)) + def test_idle_notice_reaches_the_browser_before_the_shell_ends(self): + # ttyd closes the websocket as soon as the shell ends: the line first, a pause, then the hangup + text = LOGIN.read_text() + notice = text.index('"Closed after $took without activity."') + self.assertLess(notice, text.index('sleep "${MU300_TERM_NOTICE_WAIT:-3}"')) + self.assertLess(text.index('sleep "${MU300_TERM_NOTICE_WAIT:-3}"'), text.index('kill -HUP "$pid"')) + # one minute is singular, under a minute in seconds + case = text[text.index('case $IDLE in [0-9]'):text.index('esac', text.index('case $IDLE in [0-9]')) + 4] + for idle, want in ((30, '30 seconds'), (60, '1 minute'), (119, '1 minute'), (120, '2 minutes'), (900, '15 minutes')): + r = subprocess.run(['sh', '-c', f'IDLE={idle}; {case}; printf %s "$took"'], capture_output=True, text=True) + self.assertEqual(r.stdout, want, idle) + def test_hotplug_restarts_ttyd_when_the_lan_comes_up(self): text = HOTPLUG.read_text() self.assertIn('[ "$ACTION" = ifup ] && [ "$INTERFACE" = lan ] || exit 0', text) From 2e0fe025ff8ad9ed92e2d6afb64129a5b248f93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdurrahman=20Kaan=20Dike=C3=A7?= Date: Sun, 11 Oct 2026 20:52:20 +0300 Subject: [PATCH 9/9] Panel: Wi-Fi client metrics from "station get" on SC2355, unknown values shown as unknown Device test of the previous commit on the U30 Air: clients, names and addresses were right, but rate, signal and connected time stayed empty. SC2355's `iw dev wlan0 station dump` prints only each MAC and the current time; `iw dev wlan0 station get MAC` has the metrics ("rx bitrate: 144.4 MBit/s", "signal: 0 dBm", "tx bitrate: (unknown)"). A row the dump left without metrics now asks station get for that MAC (only listed clients, at most 16 per round, 2 s each; the MAC is already checked to be six hex pairs). Signal 0 dBm is the driver's "unknown" and is null, like "(unknown)" and a missing connected time; the page shows nothing or "--" for them, never 0 dBm. Tests with the captured outputs of both commands, and the 16-call bound. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn --- .../usr/libexec/unisoc-modem/dashboard-info | 23 ++++++++++- tests/test_dashboard_info.py | 41 ++++++++++++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/dashboard-info b/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/dashboard-info index 279c1dbb..36e7d67b 100755 --- a/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/dashboard-info +++ b/openwrt/luci-app-mu300/root/usr/libexec/unisoc-modem/dashboard-info @@ -250,13 +250,34 @@ station_rows() { printf "%s|%s|%s|%s|%s\n", mac, sig, tx, rx, ct } /^Station[ \t]+/ { emit(); mac = tolower($2); sig = tx = rx = ct = ""; next } - /^[ \t]+signal:/ && $2 ~ /^-?[0-9]+([.][0-9]+)?$/ { sig = $2 + 0 } + /^[ \t]+signal:/ && $2 ~ /^-?[0-9]+([.][0-9]+)?$/ && $2 + 0 != 0 { sig = $2 + 0 } /^[ \t]+tx bitrate:/ && $3 ~ /^[0-9]+([.][0-9]+)?$/ { tx = $3 " Mbit/s" } /^[ \t]+rx bitrate:/ && $3 ~ /^[0-9]+([.][0-9]+)?$/ { rx = $3 " Mbit/s" } /^[ \t]+connected time:/ && $3 ~ /^[0-9]+$/ { ct = sprintf("%d min", int($3 / 60)) } END { emit() }' } W_CLIENTS=$(t3 iw dev "$WIFI_DEVICE" station dump 2>/dev/null | station_rows) +# SC2355's "station dump" lists only each MAC (and the time); "station get MAC" has the metrics (measured on the U30 +# Air: "rx bitrate: 144.4 MBit/s", "signal: 0 dBm", "tx bitrate: (unknown)"). So a row without them asks once per +# listed client, at most 16, 2 s each; a field that stays unknown (signal 0, "(unknown)", no connected time) is null. +# The MAC was checked to be six hex pairs by station_rows, so it reaches iw as one plain argument. +station_fill() { + local mac sig tx rx ct g asked=0 + while IFS='|' read -r mac sig tx rx ct; do + [ -n "$mac" ] || continue + if { [ -z "$sig" ] || [ -z "$tx" ] || [ -z "$rx" ] || [ -z "$ct" ]; } && [ "$asked" -lt 16 ]; then + asked=$((asked + 1)) + g=$(t2 iw dev "$WIFI_DEVICE" station get "$mac" 2>/dev/null | station_rows | head -n 1) + if [ "${g%%|*}" = "$mac" ]; then + set -f; local IFS='|'; set -- $g; IFS=' +'; set +f + sig=${sig:-${2:-}}; tx=${tx:-${3:-}}; rx=${rx:-${4:-}}; ct=${ct:-${5:-}} + fi + fi + printf '%s|%s|%s|%s|%s\n' "$mac" "$sig" "$tx" "$rx" "$ct" + done +} +W_CLIENTS=$(printf '%s\n' "$W_CLIENTS" | station_fill) W_CN=0; W_CLIST= while IFS='|' read -r mac sig txr rxr ct; do [ -n "$mac" ] || continue diff --git a/tests/test_dashboard_info.py b/tests/test_dashboard_info.py index fe1b8edb..d9d60e32 100644 --- a/tests/test_dashboard_info.py +++ b/tests/test_dashboard_info.py @@ -29,6 +29,19 @@ Station not-a-mac (on wlan0) \tsignal: \t-40 dBm ''' +# U30 Air (SC2355), `iw dev wlan0 station dump` and `iw dev wlan0 station get 3c:22:fb:00:00:01` +SC2355_DUMP = '''Station 3c:22:fb:00:00:01 (on wlan0) +\tcurrent time:\t1760178000123 ms +Station a4:83:e7:00:00:02 (on wlan0) +\tcurrent time:\t1760178000123 ms +''' +SC2355_GET = '''Station 3c:22:fb:00:00:01 (on wlan0) +\tsignal: \t0 dBm +\ttx bitrate:\t(unknown) +\trx bitrate:\t144.4 MBit/s +\tcurrent time:\t1760178000125 ms +''' + LEASES = '''1999999999 3c:22:fb:00:00:01 192.168.0.10 laptop 01:3c:22:fb:00:00:01 1999999999 a4:83:e7:00:00:02 192.168.0.11 * * ''' @@ -78,7 +91,9 @@ class Info(ShellTest): for name in ('ip', 'uci'): self.stub(name, 'exit 1') (self.tmp / 'stations').write_text(STATIONS) - self.stub('iw', 'cat "$STUBLOG/stations"') + # iw dev IF station dump | iw dev IF station get MAC (a file per MAC; none: the station is unknown) + self.stub('iw', 'case "$4" in dump) cat "$STUBLOG/stations" ;; ' + 'get) echo "$5" >> "$STUBLOG/gets"; cat "$STUBLOG/get.$5" 2>/dev/null || exit 237 ;; esac') (self.tmp / 'wan.json').write_text(WAN) (self.tmp / 'wan6.json').write_text(WAN6) self.stub('ubus', 'case "$*" in *interface.wan6*) cat "$STUBLOG/wan6.json" ;; ' @@ -107,6 +122,30 @@ class Info(ShellTest): self.assertEqual(second, {'mac': 'a4:83:e7:00:00:02', 'host': None, 'ip': '192.168.0.11', 'signal': None, 'tx': None, 'rx': None, 'conn': None}) + def test_sc2355_metrics_come_from_station_get(self): + """Captured on the U30 Air (SC2355): the dump has only the MAC and the time, station get has the rx rate and a + signal of 0 (unknown), tx is "(unknown)" and there is no connected time: those are null, never 0 dBm.""" + (self.tmp / 'stations').write_text(SC2355_DUMP) + (self.tmp / 'get.3c:22:fb:00:00:01').write_text(SC2355_GET) + for shell in self.each_shell(): + (self.tmp / 'gets').unlink(missing_ok=True) + wifi = self.info(shell)['wifi'] + self.assertEqual(wifi['clients_n'], 2) + first, second = wifi['clients'] + self.assertEqual(first, {'mac': '3c:22:fb:00:00:01', 'host': 'laptop', 'ip': '192.168.0.10', + 'signal': None, 'tx': None, 'rx': '144.4 Mbit/s', 'conn': None}) + self.assertEqual(second['mac'], 'a4:83:e7:00:00:02') + self.assertEqual((second['signal'], second['rx']), (None, None)) + self.assertEqual((self.tmp / 'gets').read_text().split(), ['3c:22:fb:00:00:01', 'a4:83:e7:00:00:02']) + + def test_station_get_is_bounded(self): + """At most 16 station get calls per round, however many clients the dump lists.""" + (self.tmp / 'stations').write_text(''.join(f'Station 02:00:00:00:00:{i:02x} (on wlan0)\n' for i in range(40))) + for shell in self.each_shell(): + (self.tmp / 'gets').unlink(missing_ok=True) + self.assertEqual(self.info(shell)['wifi']['clients_n'], 40) + self.assertEqual(len((self.tmp / 'gets').read_text().split()), 16) + def test_dns_from_multiline_status(self): for shell in self.each_shell(): self.assertEqual(self.info(shell)['wan']['dns'], '10.0.0.1, 10.0.0.2, 2001:db8::53')