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

GUYS I BRING GREAT NEWS!
WE NOW HAVE FUNCTIONAL USB-OTG SUPPORT!
[ screenshots ]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
[ 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 ]
Xperia Arc (Neo?/Play?) on FW: 4.0.A.2.368
preferably rooted + busybox installed
USB-OTG hardware cable
Terminal Emulator app
[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]
download the modules and push the modules to /system/lib/modules/
use adb shell or terminal emulator to enter following code/commands
Code:
su
cd/system/lib/modules/
busybox insmod usbhid.ko
busybox insmod usbmouse.ko
busybox insmod usbkbd.ko
busybox insmod usb-storage.ko
check if all modules are live are not:
Code:
lsmod
done the modules are LIVE!
[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]
download app: http://android.gval.biz/download/Q5_USB_Memory_Manager.apk
follow instructions: http://android.gval.biz/Q5_USB_Menory_Manager.php
the usb storage device should now be mounted to /usb_storage/
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)
now enter
Code:
ls -l /dev/block/sd*
u will get output similar to the one posted below
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 commandthis 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 ]
USB-STORAGE
USB-HID
USB-KEYBOARD
USB-MOUSE
[ known issues ]
usb mouse works but there is no cursor... but u can move around and select (left click on stuff)
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
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
enjoy!

reserved reserved

Good
can u add more
Example

Thank you very much DooMLoRD

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

<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

inteks said:
<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
Click to expand...
Click to collapse
but are the modules getting inserted properly?
wht does lsmod say?
also which kernel are u using?

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

sahha said:
Good
can u add more
Click to expand...
Click to collapse
i think that device will require a lot of power (to transmit/receive)... so it might not work...
Ambroos said:
Oh my god, it actually works Tried with my Microsoft Wireless Desktop thing with a wireless receiver. Couldn't get the keyboard to work, but the mouse works perfectly!
Click to expand...
Click to collapse
only low-power devices are supported... try using a power USB hub...
inteks said:
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
Click to expand...
Click to collapse
have u tried v6?
http://forum.xda-developers.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

DooMLoRD said:
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://forum.xda-developers.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
Click to expand...
Click to collapse
flashed the new kernel (v6) but still cant mount ntfs ubsstick. (i dont have a fat32 stick here to test)

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

inteks said:
flashed the new kernel (v6) but still cant mount ntfs ubsstick. (i dont have a fat32 stick here to test)
Click to expand...
Click to collapse
can u post the exact dmesg error?

DooMLoRD said:
can u post the exact dmesg error?
Click to expand...
Click to collapse
the same as with v5 kernel...
http://forum.xda-developers.com/showthread.php?p=16793689
Sent from my MT15i using Tapatalk
edit: i tried it just again without q5usb and it works with terminal -->> mount /dev/block/sda1 /sdcard/usbStorage

inteks said:
the same as with v5 kernel...
http://forum.xda-developers.com/showthread.php?p=16793689
Sent from my MT15i using Tapatalk
edit: i tried it just again without q5usb and it works with terminal -->> mount /dev/block/sda1 /sdcard/usbStorage
Click to expand...
Click to collapse
ya i am also having problem with that app...

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

Worked like a charm for my usb stick, thanks. I got a cheap micro usb otg adapter from dealextreme that worked great.

In the latest ROM for Xperia Pro (4.0.A.261) there is an usbotg.apk in /system/app

MoridinBG said:
In the latest ROM for Xperia Pro (4.0.A.261) there is an usbotg.apk in /system/app
Click to expand...
Click to collapse
interesting... can u post it here?

DooMLoRD said:
interesting... can u post it here?
Click to expand...
Click to collapse
It is on the Arc and Neo .368 too. Nothing special, as far as I know it is the thing that says unsupported device connected. It's only 70kb so can't be much.
Sent from my MT15i using XDA App

Does it works on X10 ? Can u pls make it also possible )

Related

[Guide]USB Host Enabled Kernel for the G1/Dream

HOWTO: Compile USB Host Enabled Kernel for the G1/Dream
Hi everyone,
I've got my new HTC Dream and I love it. It's my first Android based device. Now I'm running CyanogenMod 6 Rom.
So this is what I have:
Model number: HTC Dream
Andreoid ver: 2.2
Kermel ver: 2.6.34.5-cynogenmod
Mod version: CyanodenMod-6.0.0-DS
Build number: FRF91
I followed these guides to compile usb host enabled kernel. Please thank Andrew de Quincey, Sven Killig , Michael Mitchell and Frank Sposaro for their awesome work.
Preparing Android Build Environment
mkdir ~/cm-kernel-usbhost/
cd ~/cm-kernel-usbhost/
git clone git://github.com/CyanogenMod/cm-kernel.git
cd cm-kernel
git branch -r
git checkout --track -b cm-2.6.34 origin/android-msm-2.6.34
Patch the kernel source tree
wget http://sven.killig.de/android/N1/2.2/usb_host/android-kernel_msm-bca5320_Nexus-One_usb-host.patch
patch -p1 < android-kernel_msm-bca5320_Nexus-One_usb-host.patch
open ~/cm-kernel-usbhost/ cm-kernel /drivers/usb/host/ehci-msm7201.c and delete line 313
Export a variable for the ARM cross compiler
export CCOMPILER=~/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-
Download kernel .config here and move to .config
Edit!: Use attached config file!
mv g1-cm-kern-2.6.34-usbhost.config .config
Then start the build:
make ARCH=arm CROSS_COMPILE=$CCOMPILER
At this point you should have a kernel stored in ~/cm-kernel-usbhost/cm-kernel/arch/arm/boot/zImage
Now, get the kernel on the phone:
I use fastboot to boot from RAM (not persistent)
~/android-sdk-linux_86/tools/fastboot boot arch/arm/boot/zImage
Look above at the output from the kernel build. The last thing completed is the module building (total = modpost). Notice the hierarchal structure of the compiled modules within the filesystem. Ex: /system/drivers/usb/core/usbcore.ko
Copy modules to sdcard
Now we need to load the modules into the running kernel.
Open a terminal emulator on the phone (connectbot also works, connect to local)
get root:
su
then load the usb core and ehci modules:
insmod /sdcard/usbcore.ko
insmod /sdcard/ehci-hcd.ko
You can download compiled kernel and modules here.
Hope that this guide will be helpful to newbies like me.
Regards,
Andy
NB!
This kernel currently disables USB mount and adb over USB.
usb-storage.ko module is loaded fine but when a usb flash drive is pluged-in the phone reboots itself.
You need a powered hub or Y-cable and USB A Female / A Female Adaptor to connect your usb devices.
Now wifi is working!
UPDATE: 11.12.2010
How to make an OTA package and switch between usb host and otg.
wget ww2.cs.fsu.edu/~mitchell/android/ZipBuilder.tar
tar -xvf ZipBuilder.tar
cd ZipBuilder
./builder.sh
rename update_signed.zip usbhost_signed.zip and copy it to sd card.
make a Nandorid backup and split boot.img using split_bootimg.pl
rename boot.img-kernel to zImage and copy it to ~/cm-kernel-usbhost/cm-kernel/arch/arm/boot/
than run ./builder.sh again
rename update_signed.zip to otg_signed.zip and copy it to sd card.
Now you can flash these zip from recovery.
Any luck with Sven's img?
Yes, I tried to boot Sven's zImage but without success.
So now I'm trying to compile android-msm-2.6.34 kernel pathced with Sven's patch file.
The patch was successfully applied but when I started compilling this error occured:
In file included from drivers/usb/host/ehci-hcd.c:1153:
drivers/usb/host/ehci-msm7201.c: In function 'usb_hcd_msm7201_probe':
drivers/usb/host/ehci-msm7201.c:313: error: 'struct msm_hsusb_platform_data' has no member named 'phy_shutdown'
I don't know how and where to add this member.
I'd appreciate some help.
Regards Andy
kodovoimeji said:
In file included from drivers/usb/host/ehci-hcd.c:1153:
drivers/usb/host/ehci-msm7201.c: In function 'usb_hcd_msm7201_probe':
drivers/usb/host/ehci-msm7201.c:313: error: 'struct msm_hsusb_platform_data' has no member named 'phy_shutdown'
Click to expand...
Click to collapse
This seems to be defined only in the Hero Kernel. Delete line 313.
Thank you very much for quick reply!!!
Now everything is OK!
I used fastboot to boot from RAM and then load the usb core and ehci modules.
And...yeeeeeeee now my G1 is usb host device!
I'm using Y-cable from my external HDD.
I must compile some modules like usb-storage and start testing.
My usb mouse works great with usbhid.ko.
Thank you again!
P.S. I'll update the first post soon!
That's Great~! I've found this for several months! Could you post your detailed tutorial for us? I think most G1 owner should want it. Maybe, you could make a special patch for the roms of CM 6, and everyone could update kernel more effortlessly.
Cheers!
Fox
I updated the first post and now you can download compiled kernel-2.6.34 and modules.
I tried usb-storage.ko but when I pluged my usb flash drive the phone reboot itself.
kodovoimeji said:
I tried usb-storage.ko but when I pluged my usb flash drive the phone reboot itself.
Click to expand...
Click to collapse
Is there something in /data/dontpanic directly after the reboot?
sonic74 said:
Is there something in /data/dontpanic directly after the reboot?
Click to expand...
Click to collapse
No, it's empty.
I load these modules: usbcore.ko, ehci-hcd.ko, usb-libusual.ko, usb-storage.ko.
Usb-storage.ko depends on usb-libusual.ko
I'm curious if it's possible to run my ACR122 contactless smartcard reader.
I installed Debian Leny and ACR drivers on sdcard as I do on my PC.
This is the output when I run dmesg:
[ 196.719024] msm_hsusb msm_hsusb: GetStatus port 1 status 80001803 POWER sig=j CSC CONNECT
[ 196.719573] hub 1-0:1.0: port 1: status 0101 change 0001
[ 196.819427] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
[ 196.820007] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[ 196.939056] usb 1-1: new full speed USB device using msm_hsusb and address 2
[ 197.089111] usb 1-1: ep0 maxpacket = 8
[ 197.093750] usb 1-1: skipped 1 descriptor after interface
[ 197.095733] usb 1-1: default language 0x0409
[ 197.098724] usb 1-1: udev 2, busnum 1, minor = 1
[ 197.099426] usb 1-1: New USB device found, idVendor=072f, idProduct=90cc
[ 197.100280] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 197.100769] usb 1-1: Product: CCID USB Reader
[ 197.101593] usb 1-1: Manufacturer:
[ 197.106353] usb 1-1: usb_probe_device
[ 197.106872] usb 1-1: configuration #1 chosen from 1 choice
[ 197.108795] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 197.116180] drivers/usb/core/inode.c: creating file '002'
[ 197.117492] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
Click to expand...
Click to collapse
But I can't see it when I run lsusb.
This is the output of pcscdaemon:
00000000 pcscdaemon.c:280:main() pcscd set to foreground with debug send to stderr
00000336 debuglog.c:239: DebugLogSetLevel() debug level=debug
00018596 pcscdaemon.c:498:main() pcsc-lite 1.4.102 deamon ready
01416524 hotplug_libhal.c:460:HPRegisterForHotplugEvents() error: dbus_bus_get: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused
00000244 pcscdaemon.c:517:main() SVCServiceRunLoop returned
00000091 pcscdaemon.c523:at_exit() cleaning /var/run/pcscd
Click to expand...
Click to collapse
kodovoimeji said:
Usb-storage.ko depends on usb-libusual.ko
Click to expand...
Click to collapse
Strange, I haven't seen this module yet.
kodovoimeji said:
But I can't see it when I run lsusb.
Click to expand...
Click to collapse
You have to do
Code:
mount -t usbfs none /proc/bus/usb
Hi again,
thanks for your help. It seems that usb-storage.ko depends on usb-libusual.ko only when this modul is selected. I compiled kernel with build-in usb-storage but no matter i do my phone reboots after I pluged-in a usb flash storage. /data/dontpanic is empty.
Code:
mount -t usbfs none /proc/bus/usb
Now I can use lsusb.
I looked at .config but didn't find something about smartcard reader so if I manage to sort out drivers in Debian will it start working?
Kind regards
Andy
Please reupload link to kernel and modul.
http://ifile.it/ekountp/G1-usbhost-kern-and-modul-2.6.34.rar
Hi, newbie here. I was wondering whether once you have this setup, you can read read raw data directly from the usb port like you could in linux via /dev/hidraw2 or something similar?
Hello again,
why doesn't the wifi module work with this kernel?
is there any body going well of this?
my G1 detected the keyboard and my external HDD, I input the command 'lsusb' and 'dmesg', it seems working well; but a few moment later, it gives the message like this "can't enumerate usb devices in port 1"...what's more, I'm a noob with kernel and driver, anybody who can tell me how could I access the HDD and make the keyboard working, thans
Hi again,
at first I used Michael Mitchell's config file but than I decided to make my own config file:
1.Retrieve a working kernel config from your phone:
adb pull /proc/config.gz
gunzip config.gz
mv config .config
2.Customize the kernel:
make ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig
And now with my config file wifi is working.
There are CONFIG_USB_HIDDEV and CONFIG_HIDRAW options. I have basic skills in Linux so I can't help you.
I tried to compile USB Gadget Support as a module but receive this error:
Code:
CC [M] drivers/usb/gadget/msm72k_udc.o
drivers/usb/gadget/msm72k_udc.c: In function 'usb_phy_reset':
drivers/usb/gadget/msm72k_udc.c:1017: warning: unused variable 'retries'
drivers/usb/gadget/msm72k_udc.c:1016: warning: unused variable 'ret'
drivers/usb/gadget/msm72k_udc.c:1015: warning: unused variable 'val'
drivers/usb/gadget/msm72k_udc.c: At top level:
drivers/usb/gadget/msm72k_udc.c:1299: error: redefinition of 'msm_hsusb_set_vbus_state'
arch/arm/mach-msm/include/mach/board.h:121: note: previous definition of 'msm_hsusb_set_vbus_state' was here
make[2]: *** [drivers/usb/gadget/msm72k_udc.o] Error 1
make[1]: *** [drivers/usb/gadget] Error 2
make: *** [drivers] Error 2
hello ;D
Could i get a 2708 (15mb hack kernel mod) kernel with usb host support,please?;>
thanks for work,and congratulations for great idea!
Yeah I want too 2708 kernel with USB Host
Hi guys, I'm trying to get this working on the latest version of CyanogenMod 6 but am having troubles... has anyone else done this who fancies helping me out?
thanks!

[P3110] UMS for extSdCard [12.08.: CM10 Edition]

So, I'm currently investigating UMS on Galaxy Tab 2 and I got it somewhat working (for extSdCard).
If you feel brave enough, here's how I did it (ONLY tested on GNU/Linux!):
Q: What prerequisites do I need?
A: You need:
human brain
CWM
root access (aka 'su')
some knowledge about Linux in general won't hurt
After you sucessfully booted into your newly rooted, init.d ready P3110, do this:
Code:
adb root
adb shell
su
mount -o rw,remount /
mount -o rw,remount /system
chmod 0777 /¹
¹ = only if you're on stock rom. on cyanogen this is not needed.
locally, create a file called 'ums', with the following content:
STOCK ROM
Code:
#!/system/bin/busybox sh
if [ "$1" = "enable" ]; then
/system/bin/setprop sys.usb.config mass_storage,adb
/system/bin/setprop persist.sys.usb.config mass_storage,adb
/system/bin/setprop sys.usb.state mass_storage,adb
echo 0 > /sys/devices/virtual/android_usb/android0/enable
umount /mnt/extSdCard
echo "mass_storage,adb" > /sys/class/android_usb/android0/functions
echo "/dev/block/vold/179:25" > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun1/file
echo 1 > /sys/devices/virtual/android_usb/android0/enable
fi
if [ "$1" = "disable" ]; then
/system/bin/setprop sys.usb.config mtp,adb
/system/bin/setprop persist.sys.usb.config mtp,adb
/system/bin/setprop sys.usb.state mtp,adb
echo "" > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun1/file
echo 0 > /sys/devices/virtual/android_usb/android0/enable
echo "mtp,adb" > /sys/class/android_usb/android0/functions
echo 1 > /sys/devices/virtual/android_usb/android0/enable
vold
fi
Code:
adb push ums /ums
adb shell
su
busybox mv /ums /system/bin/ums
chmod 0777 /system/bin/ums
CYANOGEN MOD 10
May work with CM9 aswell, but I didn't test it.
Code:
#!/system/xbin/busybox sh
if [ "$1" = "enable" ]; then
/system/bin/setprop sys.usb.config mass_storage,adb
/system/bin/setprop persist.sys.usb.config mass_storage,adb
/system/bin/setprop sys.usb.state mass_storage,adb
umount /storage/sdcard1
echo 0 > /sys/devices/virtual/android_usb/android0/enable
echo "mass_storage,adb" > /sys/class/android_usb/android0/functions
echo "/dev/block/vold/179:25" > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file
echo 1 > /sys/devices/virtual/android_usb/android0/enable
fi
if [ "$1" = "disable" ]; then
/system/bin/setprop sys.usb.config mtp,adb
/system/bin/setprop persist.sys.usb.config mtp,adb
/system/bin/setprop sys.usb.state mtp,adb
echo 0 > /sys/devices/virtual/android_usb/android0/enable
echo "mtp,adb" > /sys/class/android_usb/android0/functions
echo "" > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file
echo 1 > /sys/devices/virtual/android_usb/android0/enable
vold
fi
Code:
adb push ums /system/bin/ums
adb shell
su
chmod 0777 /system/bin/ums
STEP B
Install some terminal emulator from Market. Open that app and issue
su (when SuperUser asks, give it permission).
next, to enable UMS:
Code:
ums enable
to disable UMS
Code:
ums disable
NOTE: there are two different options: calling 'ums enable' prior to connecting with USB or while connected. Different ROMs behave differently, try what works best for you.
If everyhing is fine (and you're running Linux), dmesg should show something like:
Code:
[ 1680.264023] usb 1-6: new high-speed USB device number 29 using ehci_hcd
[ 1680.356086] hub 1-0:1.0: unable to enumerate USB device on port 6
[ 1680.636060] usb 1-6: new high-speed USB device number 30 using ehci_hcd
[ 1680.769829] usb 1-6: New USB device found, idVendor=04e8, idProduct=685e
[ 1680.769832] usb 1-6: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 1680.769835] usb 1-6: Product: GT-P3110
[ 1680.769837] usb 1-6: Manufacturer: samsung
[ 1680.769838] usb 1-6: SerialNumber: c1607c00051963f
[ 1680.771433] scsi26 : usb-storage 1-6:1.0
[ 1681.769047] scsi 26:0:0:0: Direct-Access SAMSUNG File-Stor Gadget 0001 PQ: 0 ANSI: 2
[ 1681.770784] scsi 26:0:0:1: Direct-Access SAMSUNG File-Stor Gadget 0001 PQ: 0 ANSI: 2
[ 1681.779155] sd 26:0:0:0: [sdc] 8052736 512-byte logical blocks: (4.12 GB/3.83 GiB)
[ 1681.782898] sd 26:0:0:0: [sdc] Write Protect is off
[ 1681.782901] sd 26:0:0:0: [sdc] Mode Sense: 0f 00 00 00
[ 1681.787146] sd 26:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1681.794399] sd 26:0:0:1: [sdd] Attached SCSI removable disk
[ 1681.804415] sdc:
[ 1681.809590] sd 26:0:0:0: [sdc] Attached SCSI removable disk
And now you can access extSdCard as ordinary UMS.
TODO:
some button/widget to easily en/disable UMS
make it work with internal storage, too
Suggestions welcome :]
Credits:
Commands for ums derived from: http://forum.xda-developers.com/showthread.php?t=1785243
Tried this on my P3113 running today's build of CM10. Changed /mnt/extSdCard/ to /storage/sdcard1/ in accordance with the ROM's setup. Got the following error:
Code:
can't create /sys/devices/virtual/android_usb/android0/f_mass_storage/lun1/file: No such file or directory
I don't use CM, only stock rom. I guess it's simply a different virtual device, you should investigate in /sys/devices/virtual/
Meanwhile I'm currently trying to improve the script, it does not always work for me, I need to check why.
Edit:
improved 'ums' script:
- better handling of returning to MTP
- better handling of entering UMS
I noticed, that it does not always work, when running 'ums enable' from within 'adb shell'.
But when doing from a terminal emulator on the tablet - disconnected from PC - it always works.
Setialpha said:
I don't use CM, only stock rom. I guess it's simply a different virtual device, you should investigate in /sys/devices/virtual/
Meanwhile I'm currently trying to improve the script, it does not always work for me, I need to check why. Next version atleast properly does returning to MTP.
Click to expand...
Click to collapse
I think it needs to run a little later during boot.
Sent from my ADR6425LVW using xda premium
See my edited post above.
Ah and it's not running from init.d (that's not called late enough, as vold is one of the last in the boot process) - it's run manually, right before you want to acces your stuff.
Setialpha said:
See my edited post above.
Ah and it's not running from init.d (that's not called late enough, as vold is one of the last in the boot process) - it's run manually, right before you want to acces your stuff.
Click to expand...
Click to collapse
Gotcha
Sent from my ADR6425LVW using xda premium
Yeah, when I was screwing around with remapping the mount points of sdcard and extSdCard, I found that vold runs really late in the boot-up process. The only easy way I found to get shell scripts to run that late is an app (like Script Manager), since apps can register an event handler and then they do stuff "at boot time", which runs after init.d, userinit.sh, and vold.
So wait, does this access for the external micro SD card from MTP over to UMS? And by 'UMS' do you mean regular-style USB mass storage device? As in "hey you can just read/write files instead of having to wait for the slow ass MTP server!"?
Because that's AWESOME!
DivinityCycle said:
Yeah, when I was screwing around with remapping the mount points of sdcard and extSdCard, I found that vold runs really late in the boot-up process. The only easy way I found to get shell scripts to run that late is an app (like Script Manager), since apps can register an event handler and then they do stuff "at boot time", which runs after init.d, userinit.sh, and vold.
So wait, does this access for the external micro SD card from MTP over to UMS? And by 'UMS' do you mean regular-style USB mass storage device? As in "hey you can just read/write files instead of having to wait for the slow ass MTP server!"?
Because that's AWESOME!
Click to expand...
Click to collapse
Yes, regular USB as in 'plug in an USB-Stick'. It's a hack so it may not always work (especially not when plugged in with ADB active) but hey - better than nothing. I will try to improve that thingy, though.
does stock rom have ums?
despine said:
does stock rom have ums?
Click to expand...
Click to collapse
No
Sent from my ADR6425LVW using xda premium
Update: additional script/steps for CM10 added - have fun
This works flawlessly on Linux, but not Windows. Any idea what the difference is (besides the obvious)?
Macadamia Daze said:
This works flawlessly on Linux, but not Windows. Any idea what the difference is (besides the obvious)?
Click to expand...
Click to collapse
I don't know. I may use my old XP installation (it's totally dusty - not used for long time) to test this week.

[MOD] [HACK] To enable USB Mass Storage Mode

To enable USB Mass Storage Mode.
I tested the program on the Atrix HD JB 4.1.1 , CM11 4.4.2 , CM12
You will now be able to mount your external SD card as a removable disk on your PC
1.This app requires your phone to be rooted.
2 Enable Android USB Debugging (Settings-Developer Options-USB debugging)
3.Download app View attachment UsbMassStorageDevice.apk
To enable USB Mass Storage tap "ON"
To revert back to MTP tap "OFF"
PTP mode must be enabled to run on android 5.
Instructions from Sean961 (thanks him for it)
------------------
Although I did want to share with you how I got it to work on my rooted AtrixHD and with Windows 7 and Windows 8 (feel free to post this).
Download the latest drivers from Motorola, enable usb debugging mode (developer options), launch application and click on "On"
Enter "Device Manager" and "scan for hardware changes". This should prompt the motorola driver installer box that normally pops up when you plug your phone in MTP or PTP mode but the device is still not mounted. Right click on your device under "Portable Devices" and click on "Update Driver Software". Next click on "Browse my computer for driver software" and click on "Let me pick from a list of device drivers on my computer". Under "Model" select "USB Mass Storage Device", click Next and voila!! The microsd card is mounted!!!
Thank you so much for this application!
------------------
Please donation for my app.
Thanks You for Donating:
b0uncyfr0
Mike B.
Need help to mount the internal memory. How to do it?
Thank you!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Having a bit of trouble with this...
I have ADB drivers installed, phone is rooted, and usb debugging is on.
Still don't see the phone, any clue why?
Byakko Custom said:
Having a bit of trouble with this...
I have ADB drivers installed, phone is rooted, and usb debugging is on.
Still don't see the phone, any clue why?
Click to expand...
Click to collapse
what operating system?
If USB device not found on PC - reinstall the ADB driver.
what operating system?
on XP
delete driver from Device manager
switch to MTP (tap OFF)
F5 refresh
Oh ok thanks!
It's working now... (XP)
hey, OP, thanks much for putting this app up. I've downloaded and pushed the APK successfully, but my operating system doesn't seem to recognize or mount the device. Frustrating... I'm using a KDE version of Mint.
uname -a outputs this:
Linux [myPCname] 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
and mount puts this:
/dev/sda3 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
/dev/sda5 on /tmp type ext4 (rw)
/dev/sda1 on /media/Stock500-hp type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdc1 on /media/74C4-C826 type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)
...id est, nothing of obvious utility. Thanks!
physivic said:
hey, OP, thanks much for putting this app up. I've downloaded and pushed the APK successfully, but my operating system doesn't seem to recognize or mount the device. Frustrating... I'm using a KDE version of Mint.
...id est, nothing of obvious utility. Thanks!
Click to expand...
Click to collapse
is it done?
----
1.This app requires your phone to be rooted.
2 Enable Android USB Debugging (Settings-Developer Options-USB debugging)
-----
I tested on Ubuntu 12.04, 12.10 - it works.
Please show command output after pressing "ON"
lsusb
dmesg
dmesg
==============================
[249421.789899] usb 1-1.3: >USB disconnect, device number 36
[249422.117668] usb 1-1.3: >new high-speed USB device number 37 using ehci_hcd
[249422.211255] usb 1-1.3: >New USB device found, idVendor=22b8, idProduct=2e31
[249422.211265] usb 1-1.3: >New USB device strings: Mfr=2, Product=3, SerialNumber=4
[249422.211271] usb 1-1.3: >Product: MB886
[249422.211276] usb 1-1.3: >Manufacturer: motorola
[249422.211281] usb 1-1.3: >SerialNumber: TA30006JPY
[249434.327699] usb 1-1.3: >USB disconnect, device number 37
[249440.156381] usb 1-1.3: >new high-speed USB device number 38 using ehci_hcd
[249440.249322] usb 1-1.3: >New USB device found, idVendor=22b8, idProduct=2e31
[249440.249338] usb 1-1.3: >New USB device strings: Mfr=2, Product=3, SerialNumber=4
[249440.249347] usb 1-1.3: >Product: MB886
[249440.249355] usb 1-1.3: >Manufacturer: motorola
[249440.249363] usb 1-1.3: >SerialNumber: TA30006JPY
[249444.050615] usb 1-1.3: >USB disconnect, device number 38
[249444.378365] usb 1-1.3: >new high-speed USB device number 39 using ehci_hcd
[249444.471975] usb 1-1.3: >New USB device found, idVendor=22b8, idProduct=2e31
[249444.471981] usb 1-1.3: >New USB device strings: Mfr=2, Product=3, SerialNumber=4
[249444.471984] usb 1-1.3: >Product: MB886
[249444.471987] usb 1-1.3: >Manufacturer: motorola
[249444.471989] usb 1-1.3: >SerialNumber: TA30006JPY
[249444.473201] scsi22 : usb-storage 1-1.3:1.0
[249445.471073] scsi 22:0:0:0: >Direct-Access motorola MB886 0001 PQ: 0 ANSI: 2
[249445.472546] sd 22:0:0:0: >Attached scsi generic sg2 type 0
[249445.477842] sd 22:0:0:0: >[sdb] Attached SCSI removable disk
lsusb
=====================================
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 006: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 039: ID 22b8:2e31 Motorola PCS
Bus 002 Device 045: ID 045e:0053 Microsoft Corp. Optical Mouse
Bus 002 Device 023: ID 0bda:0119 Realtek Semiconductor Corp.
Bus 002 Device 003: ID 04f2:b230 Chicony Electronics Co., Ltd Integrated HP HD Webcam
physivic said:
dmesg
==============================
[249445.471073] scsi 22:0:0:0: >Direct-Access motorola MB886 0001 PQ: 0 ANSI: 2
[249445.472546] sd 22:0:0:0: >Attached scsi generic sg2 type 0
[249445.477842] sd 22:0:0:0: >[sdb] Attached SCSI removable disk
Click to expand...
Click to collapse
mounted, but not visible in the system...
Unfortunately I can not check now, because I have no phone: (
You can try a different operating system?
Sure I guess.. Have an SSD with Win7 x64 attached, and I think the Moto drivers are already installed there
I have a little experience with the command line, perhaps I can try to mount it...... Any assistance appreciated thx
Doesn't it work like this stock? I have access to all my storage when I plug my phone in.
adamr240 said:
Doesn't it work like this stock? I have access to all my storage when I plug my phone in.
Click to expand...
Click to collapse
No. In stock 4.1.1 no usb mode mass strorage device.
Why cant I still see the pics on my PC when I mount this?
its working ..
thanks man awesome working on atrix hd ..stock 4.1.1
xxcombat said:
No. In stock 4.1.1 no usb mode mass strorage device.
Click to expand...
Click to collapse
I guess I don't understand the difference. I plug mine in and have access to both internal and external storage. What does this change?
adamr240 said:
I guess I don't understand the difference. I plug mine in and have access to both internal and external storage. What does this change?
Click to expand...
Click to collapse
There are devices that support only USB Mass Storage device mode...TV,DVD player, some operating systems, etc...
Can it work on 4.2.2 ?
c-prodigo said:
Can it work on 4.2.2 ?
Click to expand...
Click to collapse
I'm sorry, I not tested on 4.2.2...
not working on AOKP 4.2.2
Works 412 JB xt907 on a mac. The .files get created with each file downloaded. They need to be deleted from SD. Can that be fixed?
aviwdoowks said:
Works 412 JB xt907 on a mac. The .files get created with each file downloaded. They need to be deleted from SD. Can that be fixed?
Click to expand...
Click to collapse
These files are not my program. Files created by the operating system MacOS.
Use programs that automatically delete these files -
BlueHarvest 5.1.0
Hidden-cleaner
Drivecleaner-v1-review
etc........

[KERNEL](31/7/2013) NFS & CIFS modules

Here are NFS and CIFS modules compiled for use against the STOCK KERNEL ONLY.
Works for me on my Xperia Z.
Notes:
---------
NFS: supports NFSv3 only.
CIFS: Has the known kernel bug that affected all versions after 3.3.8 until ~3.5, which requires you to manually specify the unc parameter in the mount options.
I have included lockd.ko, sunrpc.ko for use with NFS, and nls_utf8.ko (only needed for .350, .432 has it compiled in to the kernel) for use with either.
I have only tested from the command line, so I won't offer any support for use from MountManager/CIFSManager. You are welcome to try to use them from there if you prefer.
4.2 introduced a more complicated multi-user storage system. (Details here). This may make it more difficult for you to use the mounted storage in your other apps (simply appearing as an empty folder). The only known workaround (please correct me if you know a better way) is to perform the mount via adb (yes, this you can do this from a script on your local device) so that all open apps get permissions to 'see' the mount.
Usage:
----------
Code:
insmod nfs.ko/cifs.ko/whatever
mount -t nfs -o vers=3,nolock,hard,intr 1.2.3.4:/yourmount /path/to/mount/to
mount -t cifs -o username=youruser,password=yourpassword,unc=\\\\1.2.3.4\\yourshare //1.2.3.4/yourshare /path/to/mountpoint/
Current Versions:
-------------------------
10.1.A.1.350 tar zip
10.3.A.0.423 tar zip
SHA512 sums:
---------------------
10.3.A.0.423
Code:
2b6109a329ed825b358607cd0f6218e064bd368c45bbecde38fd103f30c8cb323bfa4374ee4d85a77e70f52bf81109044f9f6a2e01ea4d521cb27a274a941d1b cifs.ko
20af544d34cc83b4955503d7232e8ea575c1d35abfd5e6c5c9726990ef9f945eaea9d22c91c95f6c03e366e9837fd30e60e3a09995c4d96bb7d4d93ca96edb6c config_nfscifs
6900aa64ce563f1d1c03e91aec2cbf89a69c902bbfdc78f3dca4bba2045e7106633d920da5ca285ebab7c26097e8ecc0b29c967fa14d28f057ada39dc8c8a294 lockd.ko
4760decf2cf3828af937ed844f436133c429a6db33bbdcd7563f8e6613414850fa13245e102115811196c1714522ec1c932ee7ea99ae9d4c4041425e63cf3a91 nfs.ko
4e0cdd708973ee1a90de490b9f2d0fc345447668d05539ebb97514997733be7421efbede2c0235414a3ad6be730bc1dfe20359ac285ccb9ff4038a7d34e2d4dd sunrpc.ko
10.1.A.1.350
Code:
5d6c29f519b3b85a08b0380271a64e52d23d641f030639ff560c7966811f2ec4b782a32f52b615d57463324169e7b410f51639513c038ddcf79895bcd7ca070a cifs.ko
34b767fce2c55fe5c3eb711df2ac7e450903901cecd21c165d5a1471da91f3a27c37c1d4c0530647064c1b92eac1b11751c2a829a1dbd0efec881a60be07477f config_nfs
eff854c9b28ae50d2b305ca4e230abbe8305d609783cc1ceb6b01a6d36ea55131cca29ab64cb3acf584fefb7c7bb6292e66f441333691da113f2c81d894ddbf9 config_nfscifs
6632ffd08354ee9b5e36615e19754696e8c497a8ce3639846b929b3d7085008f0c225bece20c6c96351c4e8612fc59084db975d71f44bd76b2c96b71d4ecef23 lockd.ko
278886d1a3684e1274477617b501b75d1a0d8caafc15d195564a3ef17dedbab90aa9e22eda7ec2d50e0e23206346d60b0f7b71a241e46252fb32ab2ad9ff088f nfs.ko
42c0bd96555a6396e24ea20e35305980a13cbf08bdc02fe660da5b23a641e70a38361c769f7d722bf116a8bc586ab20d278e3e8210b008524e5566fb46b740bb nls_utf8.ko
4a4b3bf6289904a0dedd889aacbb22a1a562fbaa7b78e714f9e1739ff7809187210b1cfac5632f740f81f4bb8213589707dc298319d7affb9910a33af1cd5d8a sunrpc.ko
Cool !
I always use CIFS previously on my old samsung.
Tks a Lot !
:good:
Using script is fine for me, so that I don't need to install anything.
[KERNEL] NFS & CIFS modules
For which kernel version are these modules?
I'm looking nfs (version 2), maybe cifs for 3.0.21
thank you for making this. Can you make one for the 10.3.A.0.423 kernel? and does it work for both 6602 and 6603?
thanks
Sorry for my ignorance, but what this things are needed for?
rregn said:
For which kernel version are these modules?
I'm looking nfs (version 2), maybe cifs for 3.0.21
Click to expand...
Click to collapse
These are for the kernel included with 10.1.A.1.350 which is 3.4.0-g298631f-01992-g95474bc.
deligoz said:
thank you for making this. Can you make one for the 10.3.A.0.423 kernel? and does it work for both 6602 and 6603?
Click to expand...
Click to collapse
I will add it to my list of tasks to do... If I don't do it within a few days, feel free to bump me to do it.
I think it should work with both C6602 and C6603, but I only have a C6603 so can't test...
xNAPx said:
Sorry for my ignorance, but what this things are needed for?
Click to expand...
Click to collapse
These modules are used to access NFS/CIFS mounts from your phone, since Sony didn't compile them in by default. (If you don't know what NFS/CIFS is, you don't need this. )
modsRule said:
I will add it to my list of tasks to do... If I don't do it within a few days, feel free to bump me to do it.
I think it should work with both C6602 and C6603, but I only have a C6603 so can't test...
Click to expand...
Click to collapse
Bump?
I'm looking for these very modules for 10.3.A.0.423 kernel.
Dr_SUSE said:
Bump?
I'm looking for these very modules for 10.3.A.0.423 kernel.
Click to expand...
Click to collapse
Thanks for the bump. This task did get lost under everything else I do.
I am downloading the source package now so that I can do this.
modsRule said:
Thanks for the bump. This task did get lost under everything else I do.
I am downloading the source package now so that I can do this.
Click to expand...
Click to collapse
Done. Check the first post for downloads.
modsRule said:
Done. Check the first post for downloads.
Click to expand...
Click to collapse
Thanks for that!
Good news is that the module's loaded:
Code:
[email protected]:/ # lsmod
cifs 243687 0 - Live 0x00000000
wlan 2559132 0 - Live 0x00000000 (O)
texfat 121149 0 - Live 0x00000000 (PO)
cfg80211 128293 1 wlan, Live 0x00000000
hid_sony 1984 0 - Live 0x00000000 (O)
Code:
[email protected]:/ # modinfo /system/lib/modules/cifs.ko
filename: /system/lib/modules/cifs.ko
license: GPL
author: Steve French <[email protected]>
description: VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
version: 1.78
version: %s
srcversion: 3F86E0A9406EADE34D14793
depends:
vermagic: 3.4.0-gba62870 SMP preempt mod_unload modversions ARMv7
parm: enable_oplocks:Enable or disable oplocks (bool). Default:y/Y/1
parm: cifs_max_pending:Simultaneous requests to server. Default: 32767 Range: 2 to 32767.
parm: cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256
parm: cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64
parm: CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048
The bad news is I still can't get the share to mount.
Code:
mount -t cifs -o username=un,password=pw,unc=\\\\10.0.0.7\\Music \\10.0.0.7\Music /sdcard/Music
mount: Invalid argument
255|[email protected]:/ #
Code:
mount -t cifs -o username=un,password=pw \\10.0.0.7\Music /sdcard/Music
mount: Invalid argument
Code:
mount -t cifs -o username=un,password=pw,unc=\\\\10.0.0.7\\Music /sdcard/Music
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Code:
mount -t cifs -o username=un,password=pw unc=\\\\10.0.0.7\\Music /sdcard/Music
mount: Invalid argument
Code:
mount -t cifs -o username=un,password=pw, \\10.0.0.7\Music /sdcard/Music
mount: Invalid argument
mount -t cifs -o username=un,password=pw,\\10.0.0.7\Music /sdcard/Music
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Code:
dmesg
<3>[ 1619.729064] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1720.159484] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1880.073638] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1931.261993] CIFS VFS: Connecting to DFS root not implemented yet
<3>[ 1963.688110] CIFS VFS: Connecting to DFS root not implemented yet
I've tried every reasonable variation I can think of in the syntax. Can you help me figure out what I'm doing wrong here?
Of interest?
Busybox /CIFS Bug/Patch
When you run 'mount', is that the busybox version or the android version?
Try again using 'busybox mount [parameters]'.
modsRule said:
When you run 'mount', is that the busybox version or the android version?
Try again using 'busybox mount [parameters]'.
Click to expand...
Click to collapse
Same result. Slightly different error message:
Code:
mount: mounting \10.0.0.7Music on /mnt/Music failed: Invalid argument
but same return from dmesg.
Notice the missing "\" between 7 and Music. I'm copying your syntax letter for letter.
Dr_SUSE said:
Same result. Slightly different error message:
Code:
mount: mounting \10.0.0.7Music on /mnt/Music failed: Invalid argument
but same return from dmesg.
Notice the missing "\" between 7 and Music. I'm copying your syntax letter for letter.
Click to expand...
Click to collapse
Sounds like the syntax may have changed slightly, grr... [I will check when I am next at my dev machine].
In the meantime, you may find it easiest to use the script here, which also handles the multi-user problems I explained in the OP, for you.
modsRule said:
Sounds like the syntax may have changed slightly, grr... [I will check when I am next at my dev machine].
In the meantime, you may find it easiest to use the script here, which also handles the multi-user problems I explained in the OP, for you.
Click to expand...
Click to collapse
I checked out the script as is, with my information in the header, and I got an invalid argument error. I got the same when I changed the script to use busybox mount. Nothing even logged in dmesg after running the script.
I did notice that I do not have these two modules indicated in the script. Do I need them? Nothing (CIFS Manager, Mount Manager) seems to have installed them.
insmod /system/lib/modules/md4.ko;
insmod /system/lib/modules/nls_utf8.ko;
edit: I used the nexus modules provided with the script (md4, nls-utf8), but it wasn't useful: (Exec format error)
Dr_SUSE said:
I checked out the script as is, with my information in the header, and I got an invalid argument error. I got the same when I changed the script to use busybox mount. Nothing even logged in dmesg after running the script.
Click to expand...
Click to collapse
That is strange. What version of busybox do you have?
Dr_SUSE said:
insmod /system/lib/modules/md4.ko;
insmod /system/lib/modules/nls_utf8.ko;
Click to expand...
Click to collapse
These are not included because they are compiled into this kernel version by Sony.
Dr_SUSE said:
edit: I used the nexus modules provided with the script (md4, nls-utf8), but it wasn't useful: (Exec format error)
Click to expand...
Click to collapse
Surprise!</sarcasm>
Busybox v1.20.2-jb static 2012-11-25
Sent from my C6502 using xda app-developers app
edit: Updated to 1.21, no difference.
Code:
busybox mount -t cifs -o username=xxxxx,password=xxxxxx,unc=\\\\10.0.0.7\\Music \\\\10.0.0.7\\Music /storage/emulated/legacy/Music
mount: mounting \\10.0.0.7\Music on /storage/emulated/legacy/Music/ failed: Invalid argument
Sometimes it tells me it can't read fstab. I don't know if that means I'm getting warmer or colder.
Dr_SUSE said:
Busybox v1.20.2-jb static 2012-11-25
Click to expand...
Click to collapse
I am using this version too.
I can confirm CIFS is working here with these modules using this syntax: (Updated first post to this too)
As superuser:
Code:
busybox mount -t cifs //x.x.x.x/share /path/to/mount -o unc=\\\\x.x.x.x\\share,username=myuser,password=mypass
modsRule said:
I am using this version too.
I can confirm CIFS is working here with these modules using this syntax: (Updated first post to this too)
As superuser:
Code:
busybox mount -t cifs //x.x.x.x/share /path/to/mount -o unc=\\\\x.x.x.x\\share,username=myuser,password=mypass
Click to expand...
Click to collapse
That seems right, because now I'm getting a failure to mount on "Operation now in progress". That usually means the syntax is right, now I just have to see what I can figure out.
Does this module work with custom recoveries, such as CWM or TWRP? I'm asking because I saw another thread on XDA (OP was NUT) about how mounting and remounting /system as RO or RW was causing some devices to reboot, and one of the fixes, changing permissions on /sbin/ric, caused devices to send out dmesg's every 5 seconds complaining about denied permissions to /sbin/ric.
Well, second time I tried your new syntax to mount, my device rebooted, then I started seeing the dmesg's about /sbin/ric. Fixed that by resetting permissions.
Any relationship there?
I've been looking at a power consumption issue since.
Dr_SUSE said:
That seems right, because now I'm getting a failure to mount on "Operation now in progress". That usually means the syntax is right, now I just have to see what I can figure out.
Does this module work with custom recoveries, such as CWM or TWRP? I'm asking because I saw another thread on XDA (OP was NUT) about how mounting and remounting /system as RO or RW was causing some devices to reboot, and one of the fixes, changing permissions on /sbin/ric, caused devices to send out dmesg's every 5 seconds complaining about denied permissions to /sbin/ric.
Well, second time I tried your new syntax to mount, my device rebooted, then I started seeing the dmesg's about /sbin/ric. Fixed that by resetting permissions.
Any relationship there?
I've been looking at a power consumption issue since.
Click to expand...
Click to collapse
I am running TWRP on a locked BL here. My dmesg is also full with messages about /sbin/ric (mine has mode 0644). Yet this mounting works.
I am not sure why you would get "Operation now in progress" when trying to mount.
This stuff here also works on the Xperia Tablet Z!
On my tablet with Android 4.1.2 the first version (for 10.1.A.1.350) works. :good::good:
(But only CIFS; when trying to insmod nfs.ko, I get an error.)
Opposed to what seems the case on the Xperia Z, it's even not necessary to have the "unc:////" stuff in the mount command.
And one important addition: The mount command should always include the option "iocharset=utf8" because otherwise filenames with special characters cannot be processed correctly.
Best Wishes,
Hasenbein

Windows ARM64 on enchilada

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
oneplus 6/6t 都可用
警告!不当操作可能会导致手机变砖!
-
20210822 updata
-
project address : https://github.com/edk2-porting
and
Tool download :https://drive.google.com/drive/folders/1GrX9JTVpKwo3WNshqIljPRc9Q6dPJDJJ?usp=sharing
boot download : https://github.com/edk2-porting/edk2-sdm845/releases
drives download : https://github.com/edk2-porting/WOA-Drivers/archive/refs/heads/main.zip
-
Installation tutorial
new tutorial!(English) https://forum.renegade-project.org/t/faq/95
-
article(Chinese) : https://forum.renegade-project.org/t/6-windows/194
-
Device support status
Device support status
Renegade Project
Renegade Project
renegade-project.org
-
The drive is gradually improving
有问题我会不定期来看的,欢迎提问。
Questions are welcome
What an amazing project . Thx again...
tp
is working phone? contact? camara? gps? etc
rom2525 said:
is working phone? contact? camara? gps? etc
Click to expand...
Click to collapse
These are currently not working
Nice to see. Thanks for your work
Is there any way to do this without the dongle?
stevegsames said:
Is there any way to do this without the dongle?
Click to expand...
Click to collapse
I don't quite understand what "dongle" means?
hehedi233 said:
I don't quite understand what "dongle" means?
Click to expand...
Click to collapse
I'm referring to the USB hub
stevegsames said:
I'm referring to the USB hub
Click to expand...
Click to collapse
If you don’t have a USB HUB, you cannot install the operating system because it requires a mouse and keyboard to operate
hehedi233 said:
If you don’t have a USB HU
hehedi233 said:
If you don’t have a USB HUB, you cannot install the operating system because it requires a mouse and keyboard to operate
View attachment 5365067
Click to expand...
Click to collapse
Is there any way to embed the touchscreen drivers and use the on screen keyboard?
Click to expand...
Click to collapse
These do not work in WINPE. After installing the system and driver, you can use touchscreen
But I don’t recommend installing it on the phone in daily use
hehedi233 said:
View attachment 5357205
oneplus 6/6t 都可用
警告!不当操作可能会导致手机变砖!
-
20210822 updata
-
project address : https://github.com/edk2-porting
and
Tool download :https://drive.google.com/drive/folders/1GrX9JTVpKwo3WNshqIljPRc9Q6dPJDJJ?usp=sharing
boot download : https://github.com/edk2-porting/edk2-sdm845/releases
drives download : https://github.com/edk2-porting/WOA-Drivers/archive/refs/heads/main.zip
-
Installation tutorial
new tutorial!(English) https://forum.renegade-project.org/t/faq/95
-
article(Chinese) : https://forum.renegade-project.org/t/6-windows/194
-
Device support status
Device support status
Renegade Project
Renegade Project
renegade-project.org
-
The drive is gradually improving
有问题我会不定期来看的,欢迎提问。
Questions are welcome
View attachment 5357197View attachment 5357199View attachment 5357201View attachment 5363283
Click to expand...
Click to collapse
I'm having some issues with your parted file in this method my computer system says it's bad it can't it can read it but it won't open it
English video tutorials are for 6T. Can I use the same commands for 6 too?
Can we get line to line English instructions? Links for the instructions in the video are all dead.
ddaggebi said:
English video tutorials are for 6T. Can I use the same commands for 6 too?
Can we get line to line English instructions? Links for the instructions in the video are all dead.
Click to expand...
Click to collapse
Hi!
Yes the same commands can be used on Oneplus 6.
Take a look here under "EFI/NTFS WIndows installation instructions".
Hope that helps you.
- Boot Phone to TWRP/recovery
- adb push parted /sdcard/
adb shell
cp /sdcard/parted /sbin/ && chmod 755 /sbin/parted
umount /data && umount /sdcard
parted /dev/block/sda
rm 17
mkpart esp fat32 6559MB 7000MB
mkpart pe fat32 7000MB 10000MB
mkpart win ntfs 10000MB 70GB
mkpart userdata ext4 70GB 125GB
set 17 esp on
quit
- in TWRP. Reboot bootloader
- Fastboot boot TWRP.img
adb shell
mkfs.fat -F32 -s1 /dev/block/sda17
mkfs.fat -F32 -s1 /dev/block/sda18
mkfs.ntfs -f /dev/block/sda19
mke2fs -t ext4 /dev/block/sda20
mount /dev/block/by-name/pe /mnt
- open Powershell on path Windows 11/Tools/WinPE folder
adb push boot /mnt
adb push efi /mnt
adb push sources /mnt
adb push bootmgr.efi /mnt
- in Recovery. File Manager check if the copied files/folders are shown in mnt folder
- in Recovery. Reboot Bootloader
- Fastboot boot Windows 11\Boot\boot-fajita.img
- Copy to USB Stick (Format to NTFS)
- Windows 11\commands.txt
- Windows 11\Windows 11 ISO\Windows ISO file
- Windows 11\Drivers\WOA-Drivers-Main
- Windows 11\Tools\Dism++
- Windows 11\Tools\TouchScreen.reg
Partition Disks in Windows 11
-----------------------------
diskpart
select disk 0
list part
select part 17
assign letter=Y
exit
Windows 11\Tools\dism++\dism++_arm64.exe
Apply Image - select Windows11.iso file from USB Stick
Install Windows on Partiton C:\
Check "add Boot"
OK
Wait until done....
Drivers - add - select WOA-Drivers from USB Stick
bcdedit /store Y:\efi\microsoft\boot\bcd /set (DEFAULT) testsigning on
bcdedit /store Y:\efi\microsoft\boot\bcd /set (DEFAULT) nointegritychecks on
Aulgreg38 said:
I'm having some issues with your parted file in this method my computer system says it's bad it can't it can read it but it won't open it
Click to expand...
Click to collapse
Hmmm......I had no issues using parted. You run that on your phone not on your Computer.
Yeah I was messing up it was me please don't laugh I was misspelling thing
Once I get a USB keyboard I'll be able to finish kinda still waiting to get one
Wishmasterflo said:
Hi!
Yes the same commands can be used on Oneplus 6.
Take a look here under "EFI/NTFS WIndows installation instructions".
Hope that helps you.
- Boot Phone to TWRP/recovery
- adb push parted /sdcard/
adb shell
cp /sdcard/parted /sbin/ && chmod 755 /sbin/parted
umount /data && umount /sdcard
parted /dev/block/sda
rm 17
mkpart esp fat32 6559MB 7000MB
mkpart pe fat32 7000MB 10000MB
mkpart win ntfs 10000MB 70GB
mkpart userdata ext4 70GB 125GB
set 17 esp on
quit
- in TWRP. Reboot bootloader
- Fastboot boot TWRP.img
adb shell
mkfs.fat -F32 -s1 /dev/block/sda17
mkfs.fat -F32 -s1 /dev/block/sda18
mkfs.ntfs -f /dev/block/sda19
mke2fs -t ext4 /dev/block/sda20
mount /dev/block/by-name/pe /mnt
- open Powershell on path Windows 11/Tools/WinPE folder
adb push boot /mnt
adb push efi /mnt
adb push sources /mnt
adb push bootmgr.efi /mnt
- in Recovery. File Manager check if the copied files/folders are shown in mnt folder
- in Recovery. Reboot Bootloader
- Fastboot boot Windows 11\Boot\boot-fajita.img
- Copy to USB Stick (Format to NTFS)
- Windows 11\commands.txt
- Windows 11\Windows 11 ISO\Windows ISO file
- Windows 11\Drivers\WOA-Drivers-Main
- Windows 11\Tools\Dism++
- Windows 11\Tools\TouchScreen.reg
Partition Disks in Windows 11
-----------------------------
diskpart
select disk 0
list part
select part 17
assign letter=Y
exit
Windows 11\Tools\dism++\dism++_arm64.exe
Apply Image - select Windows11.iso file from USB Stick
Install Windows on Partiton C:\
Check "add Boot"
OK
Wait until done....
Drivers - add - select WOA-Drivers from USB Stick
bcdedit /store Y:\efi\microsoft\boot\bcd /set (DEFAULT) testsigning on
bcdedit /store Y:\efi\microsoft\boot\bcd /set (DEFAULT) nointegrityche
[/QUOTE]
Click to expand...
Click to collapse
Thanks sir. I see you active lots of times on OP6/6T forums. Thanks for your contribution and helping people out!

Categories

Resources