Skip to content

[Bug] issue in checkroot.internal_sh fails to detect root #990

@steadfasterX

Description

@steadfasterX

Guidelines

  • I have read the FAQ and it doesn't cover the issue.
  • I have searched the issue tracker for open and closed issues that are similar to the feature request I want to file, without success.
  • I'm on the latest version.
  • I'm not using a test build (alpha/beta/release-candidate).
  • This issue contains only one bug.

Describe the bug

  1. wipe your device
  2. do NOT install any app other than Neo Backup
  3. start NB
  4. 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

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions