[Bug] issue in checkroot.internal_sh fails to detect root
Guidelines
- [x] I have read the FAQ and it doesn't cover the issue.
- [x] I have searched the issue tracker for open and closed issues that are similar to the feature request I want to file, without success.
- [x] I'm on the latest version.
- [x] I'm not using a test build (alpha/beta/release-candidate).
- [x] This issue contains only one bug.
Describe the bug
- wipe your device
- do NOT install any app other than Neo Backup
- start NB
- it cannot detect root, even though the log shows "su" is OK
Expected Behavior
detecting root should not rely on installed application count or gt 2 should become ge 2 in
https://github.com/NeoApplications/Neo-Backup/blob/60fde4e21fa71fdc71961a06947d46e966e1024c/src/main/assets/files/plugin/checkroot.internal_sh#L12
it would also be helpful if the error would be more precise like it is on the CLI:
checkroot: access to /system/app/ -> 36 -> OK
checkroot: NO full access to /data/app/ -> 2
Neo Backup's Version
8.3.14
Installation Source
IzzyOnDroid's repo
Last Known Working Version
No response
Relevant information
- Device: any
- Android Version: any
- ROM: any
The reason for not detecting root in that case can be found here:
https://github.com/NeoApplications/Neo-Backup/blob/main/src/main/assets/files/plugin/checkroot.internal_sh#L7-L8
in the case of a complete fresh device this contains just:
ls -la /data/app
total 32
drwxrwx--x 4 system system 4096 2025-11-03 12:53 .
drwxrwx--x 50 system system 4096 2025-11-03 12:57 ..
drwxrwxr-x 4 system system 4096 2025-11-03 12:53 com.machiav3lli.backup-IDAu90oITzhMbkoPCYyuDg==
drwxrwxr-x 4 system system 4096 2025-11-03 12:49 com.topjohnwu.magisk-ttvBb0oYDvKGkdFjuzSLbw==
which results in:
sh /data/user/0/com.machiav3lli.backup/files/assets/plugin/checkroot.internal_sh
checkroot: access to /system/app/ -> 36 -> OK
checkroot: NO full access to /data/app/ -> 2
after installing any app the count will be gt 2 https://github.com/NeoApplications/Neo-Backup/blob/60fde4e21fa71fdc71961a06947d46e966e1024c/src/main/assets/files/plugin/checkroot.internal_sh#L12 and so:
sh /data/user/0/com.machiav3lli.backup/files/assets/plugin/checkroot.internal_sh
checkroot: access to /system/app/ -> 36 -> OK
checkroot: access to /data/app/ -> 3 -> OK
checkroot: access to /data/user/0/ -> 153 -> OK
checkroot: id = 0 = root -> OK
NB starts after that and does not error with "missing root" anymore of course.
might be related: #747, #973