• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

README.mdD14-Jan-2024922 2723

media_provider_cli_wrapper.shD14-Jan-20241 KiB255

README.md

1`media_provider_cli_wrapper.sh` is a thin wrapper script that exposes MediaProvider CLI.
2It's meant to be used similarly to other on-device shell binaries that expose CLIs to Android system
3services, such as `am`, `pm`, `wm`, `ime` etc.
4
5For example:
6```shell
7adb shell media_provider version
8```
9
10On device `media_provider` binary is found in `/apex/com.android.mediaprovider/bin/media_provider`,
11which, at the moment, is NOT included in `$PATH`, so in order to run `media_provider` you need to
12provide the full path to the binary, e.g.:
13```shell
14adb shell /apex/com.android.mediaprovider/bin/media_provider version
15```
16
17If you find yourself using `media_provider` often you may consider settings up an alias, e.g.:
18```shell
19alias amp="adb shell /apex/com.android.mediaprovider/bin/media_provider"
20```
21or
22```shell
23adb root
24adb remount
25adb shell ln -s -t /system/bin /apex/com.android.mediaprovider/bin/media_provider
26```
27