[MODULES][ARC][NEO][FW:4.0.A.2.368] USB-OTG {Storage, Keyboard & Mouse}

Search This thread

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
GUYS I BRING GREAT NEWS!

WE NOW HAVE FUNCTIONAL USB-OTG SUPPORT!



[ screenshots ]

lsmod.png

usb-kb.png

usb-mouse.png

usb-storage.png



[ WARNING ]

do not use the connected device for a LONG time period... u may risk burning the device chip/motherboard due to the voltage supply in host mode...

u have been warned!




[ requirements ]

  1. Xperia Arc (Neo?/Play?) on FW: 4.0.A.2.368
  2. preferably rooted + busybox installed
  3. USB-OTG hardware cable
  4. Terminal Emulator app
  5. [OPTIONAL] adb Wireless app


[ tested on ]

Xperia Arc Stock FW: 4.0.A.2.368 with DooMKernel v08




[ how to ] (general instructions for modules) [u can use this app to auto-load module]

  1. download the modules and push the modules to /system/lib/modules/

  2. use adb shell or terminal emulator to enter following code/commands

  3. Code:
    su
    cd/system/lib/modules/
    busybox insmod usbhid.ko
    busybox insmod usbmouse.ko
    busybox insmod usbkbd.ko
    busybox insmod usb-storage.ko
  4. check if all modules are live are not:
    Code:
    lsmod
    lsmod.png


  5. done the modules are LIVE!
  6. [IMP] u will have to manually reload the modules on EVERY boot... unless u use start-up scripts which will take care of this!


[ how to ] (instructions for usb-storage) [simpler way]

  1. download app: http://android.gval.biz/download/Q5_USB_Memory_Manager.apk
  2. follow instructions: http://android.gval.biz/Q5_USB_Menory_Manager.php
  3. the usb storage device should now be mounted to /usb_storage/
  4. u will need to use RootExplorer for this to work



[ how to ] (instructions for usb-storage) [manual way]

  • before u begin/connect device there are few things which need to be done

  • creating necessary directory structure
    Code:
    su
    cd /sdcard/
    mkdir usbStorage
    chmod 777 usbStorage
  • now connect the usb storage device via usb-otg cable to phone
  • now enter the following command:
    Code:
    dmesg
  • at the last part u will see some info of connected device (an if it was rejected due to power issues)

    deviceinfo.png

  • now enter
    Code:
    ls -l /dev/block/sd*
  • u will get output similar to the one posted below
    devsearch.png

    note if the last part: /dev/block/sda1

  • finally mount this device (following is generic command... for NTFS specific command read this post)

    Code:
    mount /dev/block/sda1 /sdcard/usbStorage
  • if u get no error then enjoy usb storage is now mounted

  • to unmount usbstorage (following is generic command)
    Code:
    umount /dev/block/sda1

    if that doesnt work try the following command: (this will try to force unmount)

    Code:
    umount -f /dev/block/sda1

    if that doesnt work try the following command:(this will try to force unmount and remove loop) [use this as LAST resort]

    Code:
    umount -f -l /dev/block/sda1


[ donations ]

if u feel that this work has helped u OR u think that the work i put into making this is worthy of donations, then click on the following link for buying me some coffee/beer/etc ;)

PAYPAL DONATION LINK


[ download links ]

  1. USB-STORAGE
  2. USB-HID
  3. USB-KEYBOARD
  4. USB-MOUSE



[ known issues ]

  1. usb mouse works but there is no cursor... but u can move around and select (left click on stuff)
  2. when using usb-storage mode some devices will not be mountable if:
    • they require more power (u can check this in dmesg)
    • they have filesystem not supported by ur current kernel
  3. sometimes the mounted usb-storage files wont appear using some apps... i have tested it to be wrking using RootExplorer... though it will work in adb shell/terminal emulator also...


[ troubleshooting ]

when u post any error/issue please include the full output of dmesg command (adb shell dmesg > dmesg_log.txt) OR (dmesg > /sdcard/dmesg_log.txt)


P.S.: all these features will be included in next version of DooMKernel for all supported Xperia 2011 devices ;)

icon8.gif



enjoy!
 
Last edited:

Ambroos

Senior Member
Aug 11, 2010
1,397
914
Dublin / Belgium
Oh my god, it actually works :D Tried with my Microsoft Wireless Desktop thing with a wireless receiver. Couldn't get the keyboard to work, but the mouse works perfectly!
 

inteks

Senior Member
Oct 14, 2006
1,323
937
Samsung Galaxy S9+
Samsung Galaxy S10+
<3>[39396.128906] NTFS-fs error (device sda1): parse_options(): Unrecognized mount option shortname.
<3>[39396.128906] NTFS-fs warning (device sda1): parse_options(): Option utf8 is no longer supported, using option nls=utf8. Please use option nls=utf8 in the future and make sure utf8 is compiled either as a module or into the kernel.
<3>[39396.129943] NTFS-fs error (device sda1): parse_options(): NLS character set utf8 not found.
#

cant mount usbstick on neo :-(

Sent from my MT15i using Tapatalk
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
<3>[39396.128906] NTFS-fs error (device sda1): parse_options(): Unrecognized mount option shortname.
<3>[39396.128906] NTFS-fs warning (device sda1): parse_options(): Option utf8 is no longer supported, using option nls=utf8. Please use option nls=utf8 in the future and make sure utf8 is compiled either as a module or into the kernel.
<3>[39396.129943] NTFS-fs error (device sda1): parse_options(): NLS character set utf8 not found.
#

cant mount usbstick on neo :-(

Sent from my MT15i using Tapatalk

but are the modules getting inserted properly?

wht does lsmod say?

also which kernel are u using?
 

inteks

Senior Member
Oct 14, 2006
1,323
937
Samsung Galaxy S9+
Samsung Galaxy S10+
Im using your latest kernel for neo. Lsmod is ok all modules are loaded. I think it because of missing utf8 in kernel.

Btw im tzping this on an connect usb keyboard , that works so far ;o) (but kezmapping...)

Btw. My usbgamepad does NOT work with FPSE ;-)
Here the dmesg output

<6>[40873.999359] hub 1-0:1.0: USB hub found
<6>[40873.999420] hub 1-0:1.0: 1 port detected
<6>[40874.316741] usb 1-1: new low speed USB device using msm_hsusb_host and address 2
<3>[40874.475799] usb 1-1: device v0583 p2060 is not supported
<6>[40874.475921] usb 1-1: New USB device found, idVendor=0583, idProduct=2060
<6>[40874.476013] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
<6>[40874.476104] usb 1-1: Product: USB,2-axis 8-button gamepad
<6>[40874.488586] usb 1-1: configuration #1 chosen from 1 choice
<6>[40874.501922] input: USB,2-axis 8-button gamepad as /devices/platform/msm_hsusb_host.0/usb1/1-1/1-1:1.0/input/input9
<6>[40874.502075] generic-usb 0003:0583:2060.0001: input: USB HID v1.10 Joystick [USB,2-axis 8-button gamepad ] on usb-msm_hsusb_host.0-1/input0
#
#

Sent from my MT15i using Tapatalk
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune

i think that device will require a lot of power (to transmit/receive)... so it might not work...


Oh my god, it actually works :D Tried with my Microsoft Wireless Desktop thing with a wireless receiver. Couldn't get the keyboard to work, but the mouse works perfectly!

only low-power devices are supported... try using a power USB hub...


Im using your latest kernel for neo. Lsmod is ok all modules are loaded. I think it because of missing utf8 in kernel.

Btw im tzping this on an connect usb keyboard , that works so far ;o) (but kezmapping...)

Btw. My usbgamepad does NOT work with FPSE ;-)
Here the dmesg output

<6>[40873.999359] hub 1-0:1.0: USB hub found
<6>[40873.999420] hub 1-0:1.0: 1 port detected
<6>[40874.316741] usb 1-1: new low speed USB device using msm_hsusb_host and address 2
<3>[40874.475799] usb 1-1: device v0583 p2060 is not supported
<6>[40874.475921] usb 1-1: New USB device found, idVendor=0583, idProduct=2060
<6>[40874.476013] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
<6>[40874.476104] usb 1-1: Product: USB,2-axis 8-button gamepad
<6>[40874.488586] usb 1-1: configuration #1 chosen from 1 choice
<6>[40874.501922] input: USB,2-axis 8-button gamepad as /devices/platform/msm_hsusb_host.0/usb1/1-1/1-1:1.0/input/input9
<6>[40874.502075] generic-usb 0003:0583:2060.0001: input: USB HID v1.10 Joystick [USB,2-axis 8-button gamepad ] on usb-msm_hsusb_host.0-1/input0
#
#

Sent from my MT15i using Tapatalk

have u tried v6?
http://xdaforums.com/showthread.php?p=16651299&highlight=DooMKernel#post16651299

it has NLS-UTF8 support

about gamepads i dont know... will have to look into it... but neither do i have the xperia neo nor the usb gamepad ;)
 

inteks

Senior Member
Oct 14, 2006
1,323
937
Samsung Galaxy S9+
Samsung Galaxy S10+
i think that device will require a lot of power (to transmit/receive)... so it might not work...




only low-power devices are supported... try using a power USB hub...




have u tried v6?
http://xdaforums.com/showthread.php?p=16651299&highlight=DooMKernel#post16651299

it has NLS-UTF8 support

about gamepads i dont know... will have to look into it... but neither do i have the xperia neo nor the usb gamepad ;)


flashed the new kernel (v6) but still cant mount ntfs ubsstick. (i dont have a fat32 stick here to test)
 

Soheil_rf

Senior Member
Jul 7, 2009
630
1,020
Tehran
Script

You can use my simple script to load modules after each reboot

install Gscript Lite from market : https://market.android.com/details?id=nl.rogro.GScriptLite&feature=search_result
put ''Load Modules.sh'' to sdcard
in Gscript App select add script and than load file from sd card

you can load modules with one touch

for mount & umount you have to create folder as (0-USB) name manually on root of sdcard or edit scripts file with Gscript app for other folder name
 
Last edited:

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
NTFS

mount command for NTFS usb-storage devices:

Code:
chmod 777 /sdcard/usbStorage
Code:
busybox mount -t ntfs -o rw,umask=0000,uid=1000,gid=1015 /dev/block/sda1 /sdcard/usbStorage

with this command the files should now be visible under any standard file manager (not just RootExplorer)

there is still some issue with writing files to external device (NTFS) but we will figure something out soon ;)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 34
    GUYS I BRING GREAT NEWS!

    WE NOW HAVE FUNCTIONAL USB-OTG SUPPORT!



    [ screenshots ]

    lsmod.png

    usb-kb.png

    usb-mouse.png

    usb-storage.png



    [ WARNING ]

    do not use the connected device for a LONG time period... u may risk burning the device chip/motherboard due to the voltage supply in host mode...

    u have been warned!




    [ requirements ]

    1. Xperia Arc (Neo?/Play?) on FW: 4.0.A.2.368
    2. preferably rooted + busybox installed
    3. USB-OTG hardware cable
    4. Terminal Emulator app
    5. [OPTIONAL] adb Wireless app


    [ tested on ]

    Xperia Arc Stock FW: 4.0.A.2.368 with DooMKernel v08




    [ how to ] (general instructions for modules) [u can use this app to auto-load module]

    1. download the modules and push the modules to /system/lib/modules/

    2. use adb shell or terminal emulator to enter following code/commands

    3. Code:
      su
      cd/system/lib/modules/
      busybox insmod usbhid.ko
      busybox insmod usbmouse.ko
      busybox insmod usbkbd.ko
      busybox insmod usb-storage.ko
    4. check if all modules are live are not:
      Code:
      lsmod
      lsmod.png


    5. done the modules are LIVE!
    6. [IMP] u will have to manually reload the modules on EVERY boot... unless u use start-up scripts which will take care of this!


    [ how to ] (instructions for usb-storage) [simpler way]

    1. download app: http://android.gval.biz/download/Q5_USB_Memory_Manager.apk
    2. follow instructions: http://android.gval.biz/Q5_USB_Menory_Manager.php
    3. the usb storage device should now be mounted to /usb_storage/
    4. u will need to use RootExplorer for this to work



    [ how to ] (instructions for usb-storage) [manual way]

    • before u begin/connect device there are few things which need to be done

    • creating necessary directory structure
      Code:
      su
      cd /sdcard/
      mkdir usbStorage
      chmod 777 usbStorage
    • now connect the usb storage device via usb-otg cable to phone
    • now enter the following command:
      Code:
      dmesg
    • at the last part u will see some info of connected device (an if it was rejected due to power issues)

      deviceinfo.png

    • now enter
      Code:
      ls -l /dev/block/sd*
    • u will get output similar to the one posted below
      devsearch.png

      note if the last part: /dev/block/sda1

    • finally mount this device (following is generic command... for NTFS specific command read this post)

      Code:
      mount /dev/block/sda1 /sdcard/usbStorage
    • if u get no error then enjoy usb storage is now mounted

    • to unmount usbstorage (following is generic command)
      Code:
      umount /dev/block/sda1

      if that doesnt work try the following command: (this will try to force unmount)

      Code:
      umount -f /dev/block/sda1

      if that doesnt work try the following command:(this will try to force unmount and remove loop) [use this as LAST resort]

      Code:
      umount -f -l /dev/block/sda1


    [ donations ]

    if u feel that this work has helped u OR u think that the work i put into making this is worthy of donations, then click on the following link for buying me some coffee/beer/etc ;)

    PAYPAL DONATION LINK


    [ download links ]

    1. USB-STORAGE
    2. USB-HID
    3. USB-KEYBOARD
    4. USB-MOUSE



    [ known issues ]

    1. usb mouse works but there is no cursor... but u can move around and select (left click on stuff)
    2. when using usb-storage mode some devices will not be mountable if:
      • they require more power (u can check this in dmesg)
      • they have filesystem not supported by ur current kernel
    3. sometimes the mounted usb-storage files wont appear using some apps... i have tested it to be wrking using RootExplorer... though it will work in adb shell/terminal emulator also...


    [ troubleshooting ]

    when u post any error/issue please include the full output of dmesg command (adb shell dmesg > dmesg_log.txt) OR (dmesg > /sdcard/dmesg_log.txt)


    P.S.: all these features will be included in next version of DooMKernel for all supported Xperia 2011 devices ;)

    icon8.gif



    enjoy!
    5
    Thank you for these.

    I have to mention 2 things:
    - I don't like usb folders being mounted on /*, I would preffer everything below /sdcard.
    - Having another application loading modules at startup uses memory even when we do not use a usb stick. The Q5 Manager should load the required modules.

    - Having said the above I modified a Q5 USB Manager build to do the above tasks. It loads the usb-storage module from /system/lib/modules (must exists) at startup and sleeps for 10 secs for the /dev/block/ to be updated. It also creates and uses the mount point under the /sdcard/.

    Here

    In my Neo V using firmware .62 the above package was tested and working.
    usb-hid, mouse, kbd are not required for the Neo V, they are inside the kernel.

    You can also have a look, modify or use this little package I made for easy installation of the usb-storage.ko and the q5 manager with just a batch file for my Neo v
    3
    reserved reserved
    3
    Script

    You can use my simple script to load modules after each reboot

    install Gscript Lite from market : https://market.android.com/details?id=nl.rogro.GScriptLite&feature=search_result
    put ''Load Modules.sh'' to sdcard
    in Gscript App select add script and than load file from sd card

    you can load modules with one touch

    for mount & umount you have to create folder as (0-USB) name manually on root of sdcard or edit scripts file with Gscript app for other folder name
    2
    NTFS

    mount command for NTFS usb-storage devices:

    Code:
    chmod 777 /sdcard/usbStorage
    Code:
    busybox mount -t ntfs -o rw,umask=0000,uid=1000,gid=1015 /dev/block/sda1 /sdcard/usbStorage

    with this command the files should now be visible under any standard file manager (not just RootExplorer)

    there is still some issue with writing files to external device (NTFS) but we will figure something out soon ;)