-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Player checking in Android via pm list packages
#1416
Comments
Hmm try |
Interesting, it works now, earlier it used to not work. The same binary path u mentioned. |
I have Android 14 btw |
Android 14 is a bit weird on some case like this |
Ye, the first pm is from termux. And this one is from system. |
That calling via termux's pm is not working properly. |
Ye |
@CoolnsX wanna do sth with this or should we omit this? |
We need more devices to confirm this, we can implement it but it should not be blocking |
@CoolnsX I think you're right, after some research Google have been restrict Since this was working on some ROMs, I recommend to disables the player checking only if the androidPlayerCheck() {
package_list="$(/system/bin/pm list packages)"
if echo "$package_list" | grep -q Failure; then
echo "Checking of players is disabled due to selinux restriction"
return 1
fi
if echo "$package_list" | grep -q is.xyz.mpv; then
echo "MPV Android installed"
return 0
fi
if echo "$package_list" | grep -q org.videolan.vlc; then
echo "VLC Android installed"
return 0
fi
}
androidPlayerCheck But yeah we probably need to think twice to implement this, it's up to you. |
I think the reason why It really only works if there is a workaround to get around the SELinux restriction, or by setting the SELinux to Permissive (which is a security flaw that is not recommended to do, and requires root) |
Is your feature request related to a problem? Please describe.
There is a way to check players in Android, we can retrieve package list from command
pm list packages
and then check if MPV or VLC is installed.Describe the solution you'd like
Example of checking installed player in Android:
Additional context
Instead of completely disabling the player checking on Android, this is much more better solution.
The text was updated successfully, but these errors were encountered: