• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[p9 lite] add OTG support (NEED TESTERS) (need root)

Search This thread
T

TheOneWhoSpeaks

Guest
I found something interesting. When i used the OTG checker, i noticed that 3 system files are disabled(they don't have full permissions).
Here's what you have to do(if the FIX button doesn't work)
1.Use a root explorer (Xplore is needed)
2.Find the files with the X from the screenshot
3. Change the permissions and check all the boxes.
4.Reboot and done!
Someone test this and comment if it does or if it doesn't work.
I didn't tried ( i didn't root yet) but i hope it will work
(Tried on my s4 mini and it worked)
 

Attachments

  • Screenshot_2016-09-15-19-32-47.png
    Screenshot_2016-09-15-19-32-47.png
    151 KB · Views: 9,953

Zeph1990

Senior Member
Mar 9, 2013
66
18
Naples
I found something interesting. When i used the OTG checker, i noticed that 3 system files are disabled(they don't have full permissions).
Here's what you have to do(if the FIX button doesn't work)
1.Use a root explorer (Xplore is needed)
2.Find the files with the X from the screenshot
3. Change the permissions and check all the boxes.
4.Reboot and done!
Someone test this and comment if it does or if it doesn't work.
I didn't tried ( i didn't root yet) but i hope it will work
(Tried on my s4 mini and it worked)
Hey, just tried. I've fixed permission for android.hardware.usb.host.xml file and now the otg checker give me only green check. Rebooted the phone but when i plug in my usb pen anything happen
 
T

TheOneWhoSpeaks

Guest
Hey, just tried. I've fixed permission for android.hardware.usb.host.xml file and now the otg checker give me only green check. Rebooted the phone but when i plug in my usb pen anything happen
You must do on the all files. Now only android.hardware.usb.host.xml
 
T

TheOneWhoSpeaks

Guest
Hey, just tried. I've fixed permission for android.hardware.usb.host.xml file and now the otg checker give me only green check. Rebooted the phone but when i plug in my usb pen anything happen
Do it for all of the files. Not only on android.hardware.usb.host.xml
 

snapdesign

Senior Member
Mar 8, 2012
887
464
Bucharest
doesn't work..
you must make changes to kernel also for otg to work
 

Attachments

  • Screenshot_2016-09-16-08-39-58.png
    Screenshot_2016-09-16-08-39-58.png
    119.3 KB · Views: 5,387
  • Screenshot_2016-09-16-08-39-43.png
    Screenshot_2016-09-16-08-39-43.png
    144.4 KB · Views: 5,433
  • Screenshot_2016-09-16-08-38-34.png
    Screenshot_2016-09-16-08-38-34.png
    69.1 KB · Views: 5,360

snapdesign

Senior Member
Mar 8, 2012
887
464
Bucharest
i make a custom kernel with host permissions but doesn't work anyway...
Possible problem its software and managed vold's...

In the RAMDISK it's pointed correct for USB OTG
/devices/hisi-usb-otg/usb1/* auto auto defaults voldmanaged=usbotg:auto
can you make a kernel with multirom support?

edit: you are the same bad wolf from htcmania?
 
Last edited:
T

TheOneWhoSpeaks

Guest
UPDATE
My phone is rooted and i am testing it. Hope it works on mine. If it doesn't, the post should be removed
 
M

Meticulus

Guest
Hiya Fellas,
I was messing around with my development build last night and I was able to turn on USB host mode and successfully plug in and use a usb flash drive. Now keep in mind that this was on CM 13 but, this might also work on a rooted stock.

Using adb or terminal app.
1. Look for a path in /sys/devices that ends with hisi_usb (e.g /sys/devices/f4000000.hisi_usb)
2. Now inside that folder there should be a file called plugusb.
3. use this command
echo hoston > /sys/devices/f4000000.hisi_usb/plugusb

Replace "f4000000" with the real value.

Now plug in your device and see if it is recognized!

EDIT: You may need to be root to do this!
ADB: "adb root"
TERMINAL APP: "su"
 

snapdesign

Senior Member
Mar 8, 2012
887
464
Bucharest
Hiya Fellas,
I was messing around with my development build last night and I was able to turn on USB host mode and successfully plug in and use a usb flash drive. Now keep in mind that this was on CM 13 but, this might also work on a rooted stock.

Using adb or terminal app.
1. Look for a path in /sys/devices that ends with hisi_usb (e.g /sys/devices/f4000000.hisi_usb)
2. Now inside that folder there should be a file called plugusb.
3. use this command
echo hoston > /sys/devices/f4000000.hisi_usb/plugusb

Replace "f4000000" with the real value.

Now plug in your device and see if it is recognized!

EDIT: You may need to be root to do this!
ADB: "adb root"
TERMINAL APP: "su"

The value changed... I forgot my USB adapter in the car... will update the in a few minutes... if it works you resolved a big thing in what..2 days from having the device? great dev... thanks!

EDIT: unfortunately it doesn't work on my device... also after reboot the value changed to OFF again... great find although
 

Attachments

  • Screenshot_2016-09-20-19-27-43.png
    Screenshot_2016-09-20-19-27-43.png
    50.9 KB · Views: 1,405
Last edited:
  • Like
Reactions: save80

tonioricciato

Senior Member
Mar 29, 2015
52
33
Hiya Fellas,
I was messing around with my development build last night and I was able to turn on USB host mode and successfully plug in and use a usb flash drive. Now keep in mind that this was on CM 13 but, this might also work on a rooted stock.

Using adb or terminal app.
1. Look for a path in /sys/devices that ends with hisi_usb (e.g /sys/devices/f4000000.hisi_usb)
2. Now inside that folder there should be a file called plugusb.
3. use this command
echo hoston > /sys/devices/f4000000.hisi_usb/plugusb

Replace "f4000000" with the real value.

Now plug in your device and see if it is recognized!

EDIT: You may need to be root to do this!
ADB: "adb root"
TERMINAL APP: "su"

WORK !!! THANK YOU !

- install from Playstore Universal Init.d
- Open Universal Init.d and activate support
- Create a generic text file Ex. usbotg in /etc/init.d folder with the following content
#!/system/bin/sh
echo hoston > /sys/devices/f4000000.hisi_usb/plugusb

!!!! Replace "f4000000" with the value found in your smartphone (my: ff100000) !!!!
- give to the file 755 permission
- reboot

I used Root Explorer to do all.
Enjoy !
 

Attachments

  • Screenshot_2016-09-20-22-40-20.png
    Screenshot_2016-09-20-22-40-20.png
    225.3 KB · Views: 2,457
  • Screenshot_2016-09-20-22-40-46.png
    Screenshot_2016-09-20-22-40-46.png
    241 KB · Views: 2,454
  • Screenshot_2016-09-20-22-41-24.png
    Screenshot_2016-09-20-22-41-24.png
    63.4 KB · Views: 2,355
  • Screenshot_2016-09-20-22-41-47.png
    Screenshot_2016-09-20-22-41-47.png
    235.2 KB · Views: 2,259
  • Screenshot_2016-09-20-21-50-07.png
    Screenshot_2016-09-20-21-50-07.png
    47.3 KB · Views: 2,209
  • Screenshot_2016-09-20-21-49-21.png
    Screenshot_2016-09-20-21-49-21.png
    104.4 KB · Views: 2,260
Last edited:

SevenSlevin

Senior Member
Aug 16, 2016
182
122
Hiya Fellas,
I was messing around with my development build last night and I was able to turn on USB host mode and successfully plug in and use a usb flash drive. Now keep in mind that this was on CM 13 but, this might also work on a rooted stock.

Using adb or terminal app.
1. Look for a path in /sys/devices that ends with hisi_usb (e.g /sys/devices/f4000000.hisi_usb)
2. Now inside that folder there should be a file called plugusb.
3. use this command
echo hoston > /sys/devices/f4000000.hisi_usb/plugusb

Replace "f4000000" with the real value.

Now plug in your device and see if it is recognized!

EDIT: You may need to be root to do this!
ADB: "adb root"
TERMINAL APP: "su"
ThankS!!!! It worked but, there are some troubles:
after using that command doesn't work the usb cable phone - PC (need reboot or to write "hostoff" instead of "hoston");
after rebbot need again to rewrite the command.

With universal Init.d it can be a little easy cause you can make 2 file ( 1 for hoston and 1 for hostoff) and just run them from app, so with 2 touch you can enable and disable otg instead of wirting everytime the command using terminal.

Edit: universal init.d doesn't work properly so I used a script runner and just run from it (with root permissions) 1 of 2 script (enable, disable).

Edit2: Look these images to see what I've done(don't need to reboot phone after):
Image 1: http://prnt.sc/ckk9hs
Image 2: http://prnt.sc/ckka26 (used this app: https://play.google.com/store/apps/details?id=com.snclabs.scriptrunner&hl=it)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Hiya Fellas,
    I was messing around with my development build last night and I was able to turn on USB host mode and successfully plug in and use a usb flash drive. Now keep in mind that this was on CM 13 but, this might also work on a rooted stock.

    Using adb or terminal app.
    1. Look for a path in /sys/devices that ends with hisi_usb (e.g /sys/devices/f4000000.hisi_usb)
    2. Now inside that folder there should be a file called plugusb.
    3. use this command
    echo hoston > /sys/devices/f4000000.hisi_usb/plugusb

    Replace "f4000000" with the real value.

    Now plug in your device and see if it is recognized!

    EDIT: You may need to be root to do this!
    ADB: "adb root"
    TERMINAL APP: "su"

    WORK !!! THANK YOU !

    - install from Playstore Universal Init.d
    - Open Universal Init.d and activate support
    - Create a generic text file Ex. usbotg in /etc/init.d folder with the following content
    #!/system/bin/sh
    echo hoston > /sys/devices/f4000000.hisi_usb/plugusb

    !!!! Replace "f4000000" with the value found in your smartphone (my: ff100000) !!!!
    - give to the file 755 permission
    - reboot

    I used Root Explorer to do all.
    Enjoy !
    5
    Hiya Fellas,
    I was messing around with my development build last night and I was able to turn on USB host mode and successfully plug in and use a usb flash drive. Now keep in mind that this was on CM 13 but, this might also work on a rooted stock.

    Using adb or terminal app.
    1. Look for a path in /sys/devices that ends with hisi_usb (e.g /sys/devices/f4000000.hisi_usb)
    2. Now inside that folder there should be a file called plugusb.
    3. use this command
    echo hoston > /sys/devices/f4000000.hisi_usb/plugusb

    Replace "f4000000" with the real value.

    Now plug in your device and see if it is recognized!

    EDIT: You may need to be root to do this!
    ADB: "adb root"
    TERMINAL APP: "su"
    ThankS!!!! It worked but, there are some troubles:
    after using that command doesn't work the usb cable phone - PC (need reboot or to write "hostoff" instead of "hoston");
    after rebbot need again to rewrite the command.

    With universal Init.d it can be a little easy cause you can make 2 file ( 1 for hoston and 1 for hostoff) and just run them from app, so with 2 touch you can enable and disable otg instead of wirting everytime the command using terminal.

    Edit: universal init.d doesn't work properly so I used a script runner and just run from it (with root permissions) 1 of 2 script (enable, disable).

    Edit2: Look these images to see what I've done(don't need to reboot phone after):
    Image 1: http://prnt.sc/ckk9hs
    Image 2: http://prnt.sc/ckka26 (used this app: https://play.google.com/store/apps/details?id=com.snclabs.scriptrunner&hl=it)
    3
    i make a custom kernel with host permissions but doesn't work anyway...
    Possible problem its software and managed vold's...

    In the RAMDISK it's pointed correct for USB OTG
    /devices/hisi-usb-otg/usb1/* auto auto defaults voldmanaged=usbotg:auto
    3
    For those who are looking for OTG,Multi Window,Eye Protection and Multi user support on EMUI 3.0+ devices here(https://forum.xda-developers.com/android/general/how-to-enable-otg-multi-window-eye-t3594001) is the guide .
    Enable Root and install Build Prop Editor app (https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor) and grant root access now open it and backup Stock Build.prop file and add the following lines (if present edit the values respectively )


    ##otg_support
    ro.config.support_otgstorage=true
    ro.config.hw_otgFeature=true

    ##Multi_User
    fw.show_multiuserui=1
    fw.max_users=5

    The OTG drive must be formatted as FAT32

    @BadWolfYe , @Johnny TDN Think it helps ;);)
    2
    You spoke about Multiwindow, Eye Protection also...
    You wrote "...Here is the guide"...

    Misunderstanding​


    Inviato dal mio HUAWEI VNS-L21 utilizzando Tapatalk


    Missed it edited it now . Here is the link https://forum.xda-developers.com/android/general/how-to-enable-otg-multi-window-eye-t3594001