How to add android.hardware.usb.host.xml inside /system/etc/permissions in android

家住魔仙堡 提交于 2021-02-07 09:37:27

问题


I did a backup restore on my phone Cherry Mobile Infinix Pure XL (Model: X210) and I found out that USB-OTG is not working. So I take a look on the permissions folder (reference: Youtube video) and noticed that android.hardware.usb.host.xml is missing. I did a lot of research on how to add this file in that directory but nothing works.

I just did this https://superuser.com/questions/126073/chmod-to-allow-read-and-write-permissions-for-directory

this http://forum.xda-developers.com/showthread.php?t=1389728

and this Read only file system on Android

but I always end up having this error Device not found.
My phone is already rooted using iRoot. I use SuperSU for granting permissions.

Edit
I've made it.... Using Android Commander and http://forum.xda-developers.com/showthread.php?t=1687590
By these things I was able to copy and paste the xml file. YET!!! USB-OTG doesn't work still... I hate it!!!

Edit 2

Woaaaahh!!! It is solved!!
Here is what I did:

  1. Completely unroot the device
  2. After unrooting, do a hard reset using the recovery mode
  3. Then restore backup data again

So there could be a problem when you root the device and forgot to un-root it before restoring backup data. Happy now.. :)


回答1:


I struggled with this on my Samsung S9+ as well, it is rooted and stumbled across this genius site rfexplorer.com/usb-host-mode/ which explains in details that OTG is loaded during boot and if the .xml-file is not present, OTG will not work.

The easiest method I found to is to simply download the .xml and paste it to /system/etc/permissions with a root file explorer, reboot and bam, it worked. You can use ADB if you like and, which is described in detail in the link.



来源:https://stackoverflow.com/questions/30274244/how-to-add-android-hardware-usb-host-xml-inside-system-etc-permissions-in-andro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!