restorecon
Restores the default security contexts for the given files. toybox
On Linux
Linux
restorecon [-D] [-F] [-R] [-n] [-v] FILE...
-DApply to /data/data too-FForce reset-RRecurse into directories-nDon't make any changes; useful with -v to see what would change-vVerboseLinux
Restore SELinux security context on files/directories according to persistent rules.
View the current security context of a file or directory
ls --directory -l --context path/to/file_or_directoryIdentify-llong (show full details) toyboxRestore the security context of a file or directory
restorecon path/to/file_or_directoryIdentifyRestore the security context of a directory recursively, and show all changed labels
restorecon -R -v path/to/directoryIdentify-RRecurse into directories toybox-vVerbose toyboxRestore the security context of a directory recursively, using all available threads, and show progress
restorecon -R -T 0 -p path/to/directoryIdentify-RRecurse into directories toyboxPreview the label changes that would happen without applying them
restorecon -R -n -v path/to/directoryIdentify-RRecurse into directories toybox-nDon't make any changes; useful with -v to see what would change toybox-vVerbose toybox