amc: hardcode plugin dependency to only /etc/media_codecs.xml
The gstamc.c
have media_codecs.xml
as a plugin dependency, but expect it to always be inside /etc. I have no /etc/media_codecs.xml
inside this path, but I have /system/vendor/etc/media_codecs.xml
. My device is Motorola Z2 play.
albus:/ $ ls -l /etc/
total 5276
-rw-r--r-- 1 root root 263486 2009-01-01 13:00 NOTICE.html.gz
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 acdbdata
-rw-r--r-- 1 root root 711747 2009-01-01 13:00 apns-conf.xml
-rw-r--r-- 1 root root 2308 2009-01-01 13:00 appops_policy.xml
-rw-r--r-- 1 root root 5491 2009-01-01 13:00 audio_effects.conf
-rw-r--r-- 1 root root 8322 2009-01-01 13:00 audio_policy.conf
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 bluetooth
-rw-r--r-- 1 root root 407 2009-01-01 13:00 buffers-conf.xml
-rw-r--r-- 1 root root 1611 2009-01-01 13:00 call_matching.xml
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 camera
-rw-r--r-- 1 root root 1045 2009-01-01 13:00 clatd.conf
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 cne
-rw-r--r-- 1 root root 347782 2009-01-01 13:00 compiled-classes
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 enable-disable-packages
-rw-r--r-- 1 root root 1362 2009-01-01 13:00 ethertypes
-rw-r--r-- 1 root root 20483 2009-01-01 13:00 event-log-tags
drwxr-xr-x 3 root root 4096 2009-01-01 13:00 firmware
-rw-r--r-- 1 root root 23458 2009-01-01 13:00 fonts.xml
-r--r--r-- 1 root root 120 2009-01-01 13:00 fs_config_dirs
-r--r--r-- 1 root root 1040 2009-01-01 13:00 fs_config_files
-rw-r--r-- 1 root root 3221 2009-01-01 13:00 gamedwhitelist.xml
-rw-r--r-- 1 root root 118 2009-01-01 13:00 group
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 hostapd
-rw-r--r-- 1 root root 56 2009-01-01 13:00 hosts
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 init
-rw-r--r-- 1 root root 4023 2009-01-01 13:00 init.qcom.modem_links.sh
-rw-r--r-- 1 root root 332 2009-01-01 13:00 install-recovery.cfg
-rw-r--r-- 1 root root 486 2009-01-01 13:00 ld.config.txt
-rw-r--r-- 1 root root 25185 2009-01-01 13:00 media_profiles.xml
-rw-r--r-- 1 root root 22947 2009-01-01 13:00 media_profiles_8953_v1.xml
-rw-r--r-- 1 root root 2727 2009-01-01 13:00 media_profiles_V1_0.dtd
-rw-r--r-- 1 root root 10892 2009-01-01 13:00 media_profiles_mod0.xml
-rw-r--r-- 1 root root 8180 2009-01-01 13:00 media_profiles_mod1.xml
-rw-r--r-- 1 root root 495 2009-01-01 13:00 mkshrc
drwxr-xr-x 3 root root 4096 2009-01-01 13:00 mmi
drwxr-xr-x 10 root root 4096 2009-01-01 13:00 motorola
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 nondisable
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 notiflistenerhideordisableui
-rw-r--r-- 1 root root 140 2009-01-01 13:00 passwd
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 perf
drwxr-xr-x 2 root root 8192 2009-01-01 13:00 permissions
-rw-r--r-- 1 root root 7067 2009-01-01 13:00 powerhint.xml
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 ppp
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 preferred-apps
-rw-r--r-- 1 root root 172371 2009-01-01 13:00 preloaded-classes
-rw-r--r-- 1 root root 329 2009-01-01 13:00 public.libraries.txt
-rw-r--r-- 1 root root 3477945 2009-01-01 13:00 recovery-resource.dat
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 regulatory
-rw-r--r-- 1 root root 328 2009-01-01 13:00 rtt-conf.xml
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 seccomp_policy
drwxr-xr-x 3 root root 4096 2009-01-01 13:00 security
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 selinux
-rw-r--r-- 1 root root 1311 2009-01-01 13:00 sig-permission.xml
-rw-r--r-- 1 root root 4366 2009-01-01 13:00 sound_trigger_mixer_paths.xml
-rw-r--r-- 1 root root 5404 2009-01-01 13:00 sound_trigger_mixer_paths_wcd9306.xml
-rw-r--r-- 1 root root 3891 2009-01-01 13:00 sound_trigger_mixer_paths_wcd9330.xml
-rw-r--r-- 1 root root 4620 2009-01-01 13:00 sound_trigger_mixer_paths_wcd9335.xml
-rw-r--r-- 1 root root 4207 2009-01-01 13:00 sound_trigger_platform_info.xml
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 sysconfig
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 textclassifier
-rw-r--r-- 1 root root 2579 2009-01-01 13:00 thermal-engine-addison.conf
-rw-r--r-- 1 root root 2542 2009-01-01 13:00 thermal-engine-albus.conf
-rw-r--r-- 1 root root 3253 2009-01-01 13:00 thermal-engine-ali.conf
-rw-r--r-- 1 root root 2542 2009-01-01 13:00 thermal-engine-johnson.conf
-rw-r--r-- 1 root root 2579 2009-01-01 13:00 thermal-engine-potter.conf
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 updatecmds
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 updates
-rw-r--r-- 1 root root 8281 2009-01-01 13:00 voicemail-conf.xml
-rw-r--r-- 1 root root 1723 2009-01-01 13:00 vold.fstab
-rw-r--r-- 1 root root 3610 2009-01-01 13:00 whitelistedapps.xml
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 wifi
-rw-r--r-- 1 root root 0 2009-01-01 13:00 xtables.lock
drwxr-xr-x 2 root root 4096 2009-01-01 13:00 zaf
and
albus:/ $ ls -l /system/vendor/etc/
total 2144
drwxr-xr-x 3 root shell 4096 2009-01-01 13:00 acdbdata
-rw-r--r-- 1 root root 56971 2009-01-01 13:00 ap_gain.bin
-rw-r--r-- 1 root root 27910 2009-01-01 13:00 ap_gain_mmul.bin
-rw-r--r-- 1 root root 1057 2009-01-01 13:00 apdr.conf
-rw-r--r-- 1 root root 7214 2009-01-01 13:00 audio_effects.conf
-rw-r--r-- 1 root root 953 2009-01-01 13:00 audio_ext_spkr.conf
-rw-r--r-- 1 root root 2177 2009-01-01 13:00 audio_output_policy.conf
-rw-r--r-- 1 root root 5660 2009-01-01 13:00 audio_platform_info.xml
-rw-r--r-- 1 root root 5832 2009-01-01 13:00 audio_policy.conf
-rw-r--r-- 1 root root 30438 2009-01-01 13:00 cacert_location.pem
drwxr-xr-x 3 root shell 4096 2009-01-01 13:00 cne
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 data
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 diag_mdlog
-rw-r--r-- 1 root root 2589 2009-01-01 13:00 flp.conf
-rw-r--r-- 1 root root 1421 2009-01-01 13:00 fstab.qcom
-rw-r--r-- 1 root root 4163 2009-01-01 13:00 gps.conf
drwxr-xr-x 3 root shell 4096 2009-01-01 13:00 init
-rw-r--r-- 1 root root 7525 2009-01-01 13:00 izat.conf
-rw-r--r-- 1 root root 17957 2009-01-01 13:00 libnfc-brcm.conf
-rw-r--r-- 1 root root 29739 2009-01-01 13:00 libnfc-nxp.conf
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 lm
-rw-r--r-- 1 root root 1679 2009-01-01 13:00 lowi.conf
-rw-r--r-- 1 root root 9649 2009-01-01 13:00 media_codecs.xml
-rw-r--r-- 1 root root 19504 2009-01-01 13:00 media_codecs_8953.xml
-rw-r--r-- 1 root root 19397 2009-01-01 13:00 media_codecs_8953_v1.xml
-rw-r--r-- 1 root root 4572 2009-01-01 13:00 media_codecs_google_audio.xml
-rw-r--r-- 1 root root 973 2009-01-01 13:00 media_codecs_google_telephony.xml
-rw-r--r-- 1 root root 5703 2009-01-01 13:00 media_codecs_google_video.xml
-rw-r--r-- 1 root root 8423 2009-01-01 13:00 media_codecs_performance.xml
-rw-r--r-- 1 root root 8330 2009-01-01 13:00 media_codecs_performance_8953.xml
-rw-r--r-- 1 root root 8114 2009-01-01 13:00 media_codecs_performance_8953_v1.xml
-rw-r--r-- 1 root root 16361 2009-01-01 13:00 media_profiles.xml
-rw-r--r-- 1 root root 22947 2009-01-01 13:00 media_profiles_8953_v1.xml
-rw-r--r-- 1 root root 16331 2009-01-01 13:00 media_profiles_V1_0.xml
-rw-r--r-- 1 root root 25185 2009-01-01 13:00 media_profiles_vendor.xml
-rw-r--r-- 1 root root 43524 2009-01-01 13:00 mixer_paths.xml
-rw-r--r-- 1 root root 43481 2009-01-01 13:00 mixer_paths_marley_cardp1a.xml
-rw-r--r-- 1 root root 459 2009-01-01 13:00 mkshrc
drwxr-xr-x 3 root shell 4096 2009-01-01 13:00 motorola
-rw-r--r-- 1 root root 39 2009-01-01 13:00 msm_irqbalance.conf
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 perf
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 permissions
-rw-r--r-- 1 root root 115 2009-01-01 13:00 public.libraries.txt
-rw-r--r-- 1 root root 1533702 2009-01-01 13:00 qdcm_calib_data_mipi_mot_cmd_smd_1080p_549_alb.xml
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 qvr
-rw-r--r-- 1 root root 2369 2009-01-01 13:00 sap.conf
-rw-r--r-- 1 root root 12251 2009-01-01 13:00 sec_config
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 seccomp_policy
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 selinux
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 sensors
-rw-r--r-- 1 root root 84 2009-01-01 13:00 thermal-engine.conf
-rw-r--r-- 1 root root 37216 2009-01-01 13:00 vhw.xml
drwxr-xr-x 2 root shell 4096 2009-01-01 13:00 wifi
-rw-r--r-- 1 root root 1265 2009-01-01 13:00 xtra_root_cert.pem
-rw-r--r-- 1 root root 3296 2009-01-01 13:00 xtwifi.conf
I think gstamc.c
should analyze both of these directories. I can patch for this recursive search, but I don’t know how to do it correctly. Can someone help me?