Open osm0sis opened 1 year ago
what is the uid of update_engine/backuptool
?
Is the /data/
mounted at that time?
Is the
/data/
mounted at that time?
Yes, addon.d-v2 and v3 are for A/B devices and occur while the device is fully booted.
what is the uid of
update_engine/backuptool
?
Took this during a running OTA, during addon.d execution:
In case it's helpful, I think this is how Magisk first allowed update_engine's backuptool addon.d-v2+ scripts to access the su command by default:
Maybe you can add uid 1000 to allowlist? Anyway, I'll try it on LineageOS.
Maybe you can add uid 1000 to allowlist? Anyway, I'll try it on LineageOS.
Thanks! I didn't see a way to do that in the app, is there a way via command line?
Maybe you can add uid 1000 to allowlist? Anyway, I'll try it on LineageOS.
Thanks! I didn't see a way to do that in the app, is there a way via command line?
The system_server
is uid 1000, so allow it(maybe it is displayed as "Android System") would add 1000 to allowlist.
Maybe you can add uid 1000 to allowlist? Anyway, I'll try it on LineageOS.
Thanks! I didn't see a way to do that in the app, is there a way via command line?
The
system_server
is uid 1000, so allow it(maybe it is displayed as "Android System") would add 1000 to allowlist.
Ah, yeah, it's Android System/android and I'd already tried it with no effect, unfortunately.
Edit: Also, if KernelSU actually operates by UID then it would be great if the app would show the UID (name + number) associated with each allowed package somewhere. 👍
I tracked the SELinux rules in Magisk for update_engine and it gets replaced here back in May:
Could be useful to add what's needed to KSU's rules perhaps? Since whatever they added instead, su
in update_engine addon.d-v2 still works.
Could be useful to add what's needed to KSU's rules perhaps? Since whatever they added instead, update_engine addon.d-v2 still works.
Maybe. I find a device with LineageOS support, but i don't know how to reproduce it, how can i "Accept a ROM A/B OTA"?
Can you send the dmesg log?
Could be useful to add what's needed to KSU's rules perhaps? Since whatever they added instead, update_engine addon.d-v2 still works.
Maybe. I find a device with LineageOS support, but i don't know how to reproduce it, how can i "Accept a ROM A/B OTA"?
You don't install the latest build, you install a slightly older one so that an OTA is available in Settings | Updater. Then once you've got the example script set up you Download and Install the OTA. I'll try to get you a dmesg as well, but you should be able to reproduce following those steps. 🤞
Here's a filtered logcat and a complete dmesg taken directly after the backuptool scripts run. alogcat.2023-10-10-16-10-09-0300.txt dmesg.log
These are with system_server (Android System/android) on the Superuser allow list.
Can you send the dmesg log?
兄弟,我英文不是很好,现在我用电脑adb shell无法获取su权限,是不是需要在手机端给安卓系统这个软件root权限?
解决了 只要手动给shell root权限就行
Is it still necessary to add system_server to the allow list?
Is it still necessary to add system_server to the allow list?
I think we don't need to do that now.
Tested with v0.7.5 (11434) in app and kernel on my OnePlus 7T on Lineage 20 and I'm still not seeing any change in behavior with my example 97-dumpimages.sh or any other addon.d-v2+ script using su.
I tried with and without system_server on the allow list.
Was it working in your testing of the merged fix @tiann / @Ylarod ?
Describe the bug KernelSU does not seem to have a way to allow su commands to function when executed from an addon.d script.
Steps to reproduce
chmod 755
it (e.g. 97-dumpimages.sh - unzip from attached 97-dumpimages.sh.zip)Log I piped output from the su command in the script, which confirms it fails with the following:
Expected behaviour KernelSU has a com.android.shell entry in the default list to allow
adb shell
su commands, and should have something similar to allow su commands from the update_engine/backuptool so that addon.d scripts using su can function like they would with Magisk.I tried enabling root for com.android.shell, and other system packages like android, systemui, Lineage's updater, etc, with no luck, but there must be something that KernelSU can do to allow it.
Smartphone info