_insidious Posted March 25, 2023 Posted March 25, 2023 hi im having troubles to use this: file = io.open('/sys/(path)','r') view = file:read('*a') then i print view, this code worked in my emulator (nox) but not in my phone (android 13), i dont know if is still possible but i need a fix.
XEKEX Posted March 26, 2023 Posted March 26, 2023 22 hours ago, _insidious said: hi im having troubles to use this: file = io.open('/sys/(path)','r') view = file:read('*a') then i print view, this code worked in my emulator (nox) but not in my phone (android 13), i dont know if is still possible but i need a fix. it should work fine , maybe you need to specify the extention of the file you want to open
MC874 Posted March 26, 2023 Posted March 26, 2023 Hi @_insidious, are the (path) is a variable? Just merged it instead of using f-string: io.open(f'/sys/{paths}', 'rb'):read('*a') --Fstring: x io.open('/sys/' .. paths, 'rb'):read('*a') - Can you include some Logs file? - Also check for Game Guardian permissions, both on Application and Root level - Maybe there's some interference for Game Guardian accessing /sys. Could be Samsung Knox or something. - On Newer Android (12-13) there's some Internal changes regarding permissions level and Processes. More likely is this. Try to modify some Configuration: su setenforce 0 --Permissive SELinux mount -o ro,remount /sys --/sys as Read-Only Or if you're using Magisk, try to modify the Context: mount -o rw,remount /system --/system as Read Write u:object_r:magisk_file:s0 --Duplicate any Magisk Path and add this Context along with it (in the end) on /system/sepolicy/file_contexts
_insidious Posted March 27, 2023 Author Posted March 27, 2023 21 hours ago, MC189 said: Hi @_insidious, are the (path) is a variable? Just merged it instead of using f-string: io.open(f'/sys/{paths}', 'rb'):read('*a') --Fstring: x io.open('/sys/' .. paths, 'rb'):read('*a') - Can you include some Logs file? - Also check for Game Guardian permissions, both on Application and Root level - Maybe there's some interference for Game Guardian accessing /sys. Could be Samsung Knox or something. - On Newer Android (12-13) there's some Internal changes regarding permissions level and Processes. More likely is this. Try to modify some Configuration: su setenforce 0 --Permissive SELinux mount -o ro,remount /sys --/sys as Read-Only Or if you're using Magisk, try to modify the Context: mount -o rw,remount /system --/system as Read Write u:object_r:magisk_file:s0 --Duplicate any Magisk Path and add this Context along with it (in the end) on /system/sepolicy/file_contexts the code works in my nox but not in my phone, i just need to do this without any external lib, just by running gameguardian
Question
_insidious
hi im having troubles to use this:
file = io.open('/sys/(path)','r')
view = file:read('*a')
then i print view, this code worked in my emulator (nox) but not in my phone (android 13), i dont know if is still possible but i need a fix.
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.