问题
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:
- Completely unroot the device
- After unrooting, do a hard reset using the recovery mode
- 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