[Guide] USB OTG (USB host mode) - HTC Desire S

I got my usb otg wotking a year ago and then totally forgot about it. I tried it again after some time and it didn't work for me. Now I rediscovered it and made this little guide.
1. You need to power your usb port. Either Y-cable or USB hub with uplink power supply. link
2. Latest PATCHED KERNEL and supported rom link
3. Download and extract otg_scripts.zip attachment to your SD card.
4. To run scripts you will need SManager from play store.
5. Run SManager. Grant Super user permissions. Open otg_host.sh in SManager. Check SU. RUN it.
6. Your phone will now disconnect from computer and you can attach devices to your Desire S.
If otg_host.sh throws errors then run otg_mount_fs.sh and then otg_host.sh.
When you want to connect your phone to computer run otg_peripheral.sh. This disable otg host.
As a bonus you don't need a special usb cable with a shortened pin.

Related

[Q] ADB (again)

I have installed the moto drivers and then connect my Xoom to the B port. I have debugging turned on.
Here's what I get:
E:\xoom>adb devices
List of devices attached
161c110242c015d7 offline
E:\xoom>adb shell
error: device offline
I have run clean and reinstall on the installer without any change.
Any advice?
You need to be in the folder on your computer with adb in it.
Sent from my Xoom using Tapatalk
I am in that folder.
Is your device locked? As in, do you have a lock password/PIN that you need to input first?
Try a different cable.
Different cable no help. Any other ideas?
Just an idea... are you using a USB hub or one of the USB ports from the front of your PC? Sometimes these ports don't provide enough power to communicate with certain devices. Try one of the ports on the back of the PC.
Other than that, reboot your PC and the Xoom and try again
I'll be darned! I plugged it into the back (USB port on motherboard) instead of the front and voila!
You are the man!
Now that you have answered that question so well, please answer this one!
I am trying to run adb install xxxx.apk but it just hangs. I have the Xoom set to allow installation of non-market applications.
Any ideas?
Never mind - a reboot all around fixed that. Thanks for everyone's help.

[Tip] Use this trick if you're unable to connect phone to PC via MTP.

I'll directly jump to the matter :
If you are unable connect your phone to PC with MTP even after trying all the usual methods, use this trick:
Simply reboot into recovery and connect phone via USB cable. Phone will be connected as MTP device and you can browse files in File Explorer.
Click to expand...
Click to collapse
​
Disadvantages:
1. Phone will be in recovery mode. Can't use your phone in the normal way.
2. Suffer through the boot process(well, it depends on your ROM)
Advantages:
1. Serves as emergency file access.
2. All the things you can do in recovery simultaneously.
Note: This trick works flawlessly with TWRP(and Windows PC). Not sure about other recoveries/OS. Try and share your result
I hope this helped you and was worth your time.
Credits: Me.

[Guide] Recover MTP setting when connect via usb cable

In this post I will describe a simple method that I followed to recover the option of choose MTP connection when using a usb cable to the PC.
After root with SuperSU I noticed that when I plugged my phone to the PC using the usb cable, I did not have the option to "mount" as MTP anymore.
Therefore I could not transfer files from my PC to the phone in a easy way. If you want to continue with latest SuperSU you have to do that:
1. Edit your build.prop file adding those 2 lines at the end:
persist.service.adb.enable=1
persist.sys.usb.config=mtp,adb
Click to expand...
Click to collapse
2. Close and save it
3. Enable USB debugging in developer options
4. Select MTP in USB Configuration
5. Profit
All the information got from the MIUI Official Forum

Android file transfer using a USB cable

Hi,
For some reason I can no longer transfer files from my Android device to my Linux PC using Android File Transfer.
I can list the device:
sudo adb devices -l
List of devices attached
????????? device usb:1-4 product:OnePlus5T model:ONEPLUS_A5010 device:OnePlus5T transport_id:2
Click to expand...
Click to collapse
but Andorid File Transfer (version 4.2) wouldn't start with this phone. When I attach an older phone (Nexus 4) all is fine and I can transfer files without problem.
USB Debugging is enabled on the device.
On USB Preferences File Transfer is selected. Other options are USB tethering, MIDI, PTP, No data transfer.
Any help will be appreciated.
Update: problem solved - had to use root privilidges
Try another cable. Cliché but it's often the culprit. When you get the USB mode popup just cancel it and it'll decide on its own. Disable USB debugging as it doesn't need to be on. Try other USB ports, or the last one it was known working on. Failing that see if there's a proprietary software. Microsoft Your Phone Companion might help..

Asking about wifi ftp file transfer server to pc without asking for permission

Hello everyone
now i have mi9 with broken screen touch is dead too , my files on the mi9 is very important for me and unfortunately usb debugging is off
so i was thinking if i can install wifi ftp server from play store using my google account so i can get my files back through wifi
but the problem is every wifi ftp server is asking for permission to start and ofc i cant do this because touch isnt working
so i want to install app via google play using my google account that allow me to access my phone files without permission
any ideas ??
It doesn't need Internet to transfer data like pictures or PDF files from phone to PC:
If phone is USB-OTG-enabled then all you need is an USB-OTG-adapter cable to access the files from PC: the phone then acts like a USB-stick ( USB host ).
Of course PC must support USB-OTG, too, and phone should be fully charged.
How-To ( Windows PC ):
Unlock your device.
With a USB-OTG cable, connect your device to your computer.
On your device, tap the "Charging this device via USB" notification.
Under "Use USB for," select File Transfer.
A file transfer window will open on your computer. Use it to drag files.
When you're done, eject your device from Windows.
Unplug the USB-OTG cable.
download scrcpy and extract it: https://github.com/Genymobile/scrcpy
connect your phone to pc via usb
go to extract folder, hold Shift key and right click -> choose run powershell -> input command:
scrcpy --otg

Categories

Resources