[Q] OTG With Digital Cameras (using ziddey's mod) - Nexus 4 Q&A, Help & Troubleshooting

Hello,
I'm very intrested about enabling OTG on my Nexus 4 in order to plug it to my DSLR camera,so I can use apps like DSLR Controller with the Nexus and the camera.
I came across ziddey's thread (1) and CaptainMuon's thread (2)
So I bought myself some cables and now I have some questions before I begin:
1) Because I'm using a camera,a device that doesn't need any power from my Nexus,do I still need to supply any external power to the USBs?
2) In ziddey's thread he mentions that if you have a digital camera (or other devices that won't require power),you should manually enable OTG
on your device
OTG state can be manually set to host, none, or peripheral (shouldn't ever be a reason to need to set this one) via /sys/kernel/debug/msm_otg/mode. Execute the following as root (adb shell over wireless, terminal emulator, etc):
Code:
# echo host > /sys/kernel/debug/msm_otg/mode
or
# echo none > /sys/kernel/debug/msm_otg/mode
Click to expand...
Click to collapse
So my question is, do I still need the custom kernel etc to enable OTG on my device or should I just enter these commands and im all good?
Sorry if my questions are dumb,as you can probably already tell,im new to this.
Thank you!

Bump... Please help if you can

Related

[Q] Please add V4L2 support

If is possible, please add UVC driver support to this ROM. I can't find any custom ROM with v4l2 enabled kernel.
Too complicated build custom kernel for me.
Code:
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_V4L2_COMMON=y
CONFIG_VIDEO_MEDIA=y
CONFIG_USB_VIDEO_CLASS=y
CONFIG_V4L_USB_DRIVERS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
github.com/openxc/android-webcam
You should tell us the device where its missing
maxwen said:
You should tell us the device where its missing
Click to expand...
Click to collapse
OTG cable
Logitech C920
Logitech C525
Wouldn't do much without a matching camera HAL... Or are you using commandline capture utilities?
And you need to tell us which device you're using. Some devices simply don't have OTG support at all and never will because they don't have the hardware for it. (mako is one of these...)
Entropy512 said:
Wouldn't do much without a matching camera HAL... Or are you using commandline capture utilities?
And you need to tell us which device you're using. Some devices simply don't have OTG support at all and never will because they don't have the hardware for it. (mako is one of these...)
Click to expand...
Click to collapse
Thanks for reply.
I use nexus 10 tablet. USB mouse working fine so i think, OTG cable is working on my device.
My general problem: No /dev/video0 video source.
Searched by this command in terminal emulator: ls /dev | grep video0
I use ArutCam application for stream external camera picture.. i talk the developer and he say: "arutcam lets you choose camera
if your camera is detected well by android then it will be ok"
Sorry for my english
igabyka said:
Thanks for reply.
I use nexus 10 tablet. USB mouse working fine so i think, OTG cable is working on my device.
My general problem: No /dev/video0 video source.
Searched by this command in terminal emulator: ls /dev | grep video0
I use ArutCam application for stream external camera picture.. i talk the developer and he say: "arutcam lets you choose camera
if your camera is detected well by android then it will be ok"
Sorry for my english
Click to expand...
Click to collapse
I don't have a manta so I can't make this change myself.
If you're able to build Omni yourself, you can try making the change and then submitting it to gerrit for review.
http://docs.omnirom.org/Main_Page - see the items under Important Pages and Development

[HOWTO] Enable Wired Ethernet on P5110

Dear Forum,
Wired Ethernet on a tablett HOWTO.
Tested on a P5110
Get ready to build CyanogenMod for Your Device
http : / wiki.cyanogenmod.org/w/Build_for_p5110
but before you build:
cd android/system/kernel/samsung/espresso10
make menuconfig
[Navigate using arrow keys and enter]
Load an Alternate Configuration File:
./arch/arm/configs/cyanogenmod_p5110_defconfig
then
Device Drivers ->
Network device support ->
USB Network Adapters ->
Multi-Purpose USB Networking Framework ->
[PRESS y so that the module will be built into the kernel]
[*] Multi-purpose USB Networking Framework
find the Chipset Your Adapter is using
[PRESS y]
[*] ASIX AX88xxx Based USB 2.0 Ethernet Adapters
or whatever Chipset your Adapter is using
exit and save
build the ROM
Flash it
open terminal
su
netcfg
Your eth0 should now show up to get an IP Address
netcfg eth0 dhcp
The grapevine says not all apps are supported as Android has a sketchy implementation apps written in c or c++ should work
martburg said:
Dear Forum,
Wired Ethernet on a tablett HOWTO.
Tested on a P5110
.....
The grapevine says not all apps are supported as Android has a sketchy implementation apps written in c or c++ should work
Click to expand...
Click to collapse
What would ./arch/arm/configs/cyanogenmod_p5110_defconfig be on a p3110?
Easier will be to flash Agni kernel and install this app from store. Is using a little hack so every app works with the wired connection https://play.google.com/store/apps/details?id=xda.usbhost.test
I"ve been scratching my head for a while on this one. Here's what I did to get ethernet access with the help from above. Thanks iamashwin and blueseeker.
1) From TWRP v2.8.4.0 in boot recovery, flash the following:
- Recent version of OmniRom 4.4.4 nightly. I used the 2/12/15 nightly.
- Flash PA Gapps Micro for 4.4.4
- Flash SuperUser
- Flash AGNi kernel for 4.4.4
- Reboot
2) Load this android app.
2) Make sure wifi is turned off.
3) Plug in your USB-OTG adapter with USB-Ethernet adapter. I bought this USB-OTG adapter and this USB-Ethernet adapter.
4) Run ethernet app that you downloaded from 2) above. Hit "Enable".
You should be good to go from here.....
Samsung Galaxy Tab 3 10.1" P5200.
Hello I want to get a similar configuration setup on my Samsung Galaxy Tab 3. Is there any way that modifications can be made to what's been used here to support it.

[Guide][1.2.1] Mounting USB Devices

Hello, nookies!
Today I have decided to make an easy-to-follow guide on mounting USB devices (cameras, USB sticks) on your Nooks! Hooray! :good:
DISCLAIMER - I am not responsible if you brick your Nook, break your USB device, the current state of the economy, or why Obama is the president. Please do research on these topics if you would like to know more.
DISCLAIMER 2 - I did not make either of the apps attached, I have merely posted them here for easy access.
So let's get started with some prerequisites!
Prerequisites:
A rooted Nook Touch or Nook Touch Glow with software 1.2.1 installed, as well as Superuser and su binary installed
A terminal app (attached below)
Renate NST's UsbMode.apk (attached below)
A USB host-enabled kernel correctly installed and working (see my signature for a Nook Touch Glow one)
A USB OTG cable
Steps:
Make sure that your Nook is completely charged before continuing!
Make sure that your kernel is definitely working and that USB mode is properly working, too!
1. Open up Renate NST's UsbMode.apk app. Tap the "Off" button. (This will stop your Nook from trying to charge itself from the USB device by turning off the current.)
2. Plug your USB OTG cable (without anything attached to it) into your Nook's USB port.
3. Tap "Host" in the UsbMode app. (This turns on Host mode.)
If the LED beside your Nook's USB port has turned solid green at this point, you are doing well!
4a. For USB devices that have a separate cord (cameras): Turn on the USB device. Plug its cord into its USB port. Now, connect both the device's cord and the device into the open end of the OTG cable that is attached to your Nook.
4b. For USB sticks/drives: Plug the drive directly into the open end of the OTG cable that is attached to your Nook.
5. Tap "View USB" in the UsbMode app. You should see the Nook's main listing at the top, as well as the plugged-in device's listing under it. The device's listing should have a black dot next to it.
Good job! You're doing well so far! :laugh:
6. Now, open up the Terminal Emulator app I attached below. You should have installed it already. When it opens, you should see a dollar sign ($) at the far left of each line.
7. Type in
Code:
su
. Now, instead of a $, there should be a # at the far left of each line.
8. Type in
Code:
mount -o rw,remount rootfs /
. This remounts /system as read-writable.
9. Type in
Code:
mkdir /usb
. This creates a directory called /usb in the root of your Nook's filesystem; it will be used to mount your USB device in.
10a. For USB devices (cameras, etc.), first type in
Code:
mount -t vfat /dev/block/uba /usb
. You will get some sort of error message, that's okay. Now, after typing that, type in
Code:
mount -t fvat /dev/block/uba1 /usb
.
10b. For USB sticks/drives. just type in
Code:
mount -t vfat /dev/block/uba1 /usb
.
11. If the above commands worked properly, you should now be able to go into a file explorer, navigate to the /usb directory, and boom! You can now manage your USB device's filesystem straight from your Nook!
Unmounting your USB drive
It is important that you unmount your USB device/drive properly before physically taking it out of your Nook. Here's how to do that.
1. Open up your Terminal Emulator app again.
2. Type
Code:
su
.
3. Type
Code:
mount -o rw,remount rootfs /
.
4. Type
Code:
umount /usb
.
5. Type
Code:
rmdir /usb
.
6. Take the whole cord/USB drive out of your Nook with the OTG cable.
7. Open up the UsbMode app again.
8. Tap "Auto". (This turns your Nook's current back to being automatically determined, instead of being off.)
9. Tap "Peripheral". (This makes your Nook return to having the ability to charge from an AC outlet (or whatever).)
10. You have successfully unmounted your device!
Hope this helps all of you guys who want to manage your USB devices on your Nooks! :good:
Reserved
Reserved for future use/expansion.
I hate to do this, but...
Bump.
I'm sure that someone can profit from this tutorial, right?
There was a whole thread on using my modified volume daemon to do this all automatically.
I've pretty much abandoned that train of thought.
I'm not really sure that anyone really wants to mount USB drives.
It's really a pretty current-intensive way to get data.
It's better to just use a 32 GB SD card in the Nook, formatted with something better than vfat.
Renate NST said:
There was a whole thread on using my modified volume daemon to do this all automatically.
I've pretty much abandoned that train of thought.
I'm not really sure that anyone really wants to mount USB drives.
It's really a pretty current-intensive way to get data.
It's better to just use a 32 GB SD card in the Nook, formatted with something better than vfat.
Click to expand...
Click to collapse
thanks for the efforts @Renate NST in creating the USB mode app, I really envy you guys for the knowledge and understanding you have of the tech involved.
I agree with you on the practicality of the application.
At the same time and more we can never let go off the THRILL in trying the invaluable efforts you manage to put in.
Kudos.
Coming back to the thrill of it all ...
 @NoogiE ... thanks for the link to this thread ...
i am on 1.3.4 version of your 1337 ROM, assuming the USB kernel is in place, i opened @Renate NST's USBMode app and pressed Off, then i connected the OTG cable and pressed Host ... no action no led action ... if you can help ... thanks.
thanks,
aiamuzz said:
no action no led action ...
Click to expand...
Click to collapse
Hmm. You have this rooted and the UsbMode is not showing any "<errors>"?
You're sure that it's an OTG cable? (I've never seen one over 6" long. If you know of a longer molded cable, please tell me!)
You're sure that your kernel has the OTG fix?
You should get a quick flash (50 mS or so) out of the LED just pushing the host button on UsbMode even with nothing connected at all (no adapter).
With an adapter connected you should get a solid LED.
I've never gotten into writing/patching kernel drivers, but I always thought that someone would fix the buggy USB driver so that UsbMode would not be needed for regular OTG operation.
Renate NST said:
Hmm. You have this rooted and the UsbMode is not showing any "<errors>"?
You're sure that it's an OTG cable? (I've never seen one over 6" long. If you know of a longer molded cable, please tell me!)
You're sure that your kernel has the OTG fix?
You should get a quick flash (50 mS or so) out of the LED just pushing the host button on UsbMode even with nothing connected at all (no adapter).
With an adapter connected you should get a solid LED.
I've never gotten into writing/patching kernel drivers, but I always thought that someone would fix the buggy USB driver so that UsbMode would not be needed for regular OTG operation.
Click to expand...
Click to collapse
Hey thanks for looking into it @Renate NST ...
I am using the small 4-5 inch cable ... had a spare lying around.
I am not getting the quick flash you talk about while a press the Host button.
However when i open the USB Mode app the first line 'Request' shows empty, when i press the Host button it says <write error>
when i engage the buttons (off, 100mA, 500mA, 1.5A & Auto) the Max Current line blinks between <write error> and Auto ...
If that helps !!!
and the kernel part, I am running a copy of Yattaro and Nookie's 1337 ROM(the latest 1.3.4) which claims it supports USB host capability.
Is there any way i can run a command to check if the kernel supports ? Not that i doubt/question this ROM developers efforts/claims.
aiamuzz said:
Hey thanks for looking into it @Renate NST ...
I am using the small 4-5 inch cable ... had a spare lying around.
I am not getting the quick flash you talk about while a press the Host button.
However when i open the USB Mode app the first line 'Request' shows empty, when i press the Host button it says <write error>
when i engage the buttons (off, 100mA, 500mA, 1.5A & Auto) the Max Current line blinks between <write error> and Auto ...
If that helps !!!
and the kernel part, I am running a copy of Yattaro and Nookie's 1337 ROM(the latest 1.3.4) which claims it supports USB host capability.
Is there any way i can run a command to check if the kernel supports ? Not that i doubt/question this ROM developers efforts/claims.
Click to expand...
Click to collapse
You seem to be having a an su binary issue. Check and see if the su binaries are in /system/bin; if they aren't, copy them there from /system/xbin and reboot. Should work like a charm.
ИΘΘK¡€ said:
You seem to be having a an su binary issue. Check and see if the su binaries are in /system/bin; if they aren't, copy them there from /system/xbin and reboot. Should work like a charm.
Click to expand...
Click to collapse
hey Nookie ... copied the su to to /system/bin and the led came up ... but i can't see the connected device under 'View USB', could it be bcos i am using a Micro SD card on in USB adapter ?
PS: and hey i saw swapon and swapoff files(binaries?) in /system/xbin, does it mean your ROM supports SWAP ? With swap and hopefully NookKat the RAM deficit could be manageable ? My first Android Device was LG Optimus Pro, C660 which had 256 MB RAM & 140-160 MB internal storage for apps, The stock ROM used to keep popping the close any programs popups every now and then rather freqeuntly, On a custom CM7 official port ROM with swap support & dark tremors ap2sd scripts, i was able to get rid of the annoying pop up and install 60-70 user apps to SD card and still have a daily ROM. Do you think our device supports a similar setup with swap and darktremors aap2sd scripts ?
thanks
Quick N00b question- I am trying to get a GPS signal into my rooted NST. It has a micro USB. Do I need to do this in order for an app to get my serial signals?
I will paypal someone to help me get GPS signals into my NST using an app called Simple Sailor! Thx
lolokai said:
Quick N00b question- I am trying to get a GPS signal into my rooted NST. It has a micro USB. Do I need to do this in order for an app to get my serial signals?
I will paypal someone to help me get GPS signals into my NST using an app called Simple Sailor! Thx
Click to expand...
Click to collapse
Maybe. I'd have to look into your quest more to know for sure.
ИΘΘK¡€ said:
Maybe. I'd have to look into your quest more to know for sure.
Click to expand...
Click to collapse
Thx Nookie.
Is an app that can see what serial data is being provided via USB? Or, a GPS testing app that grabs data from the USB. Do apps always look for GPS data to come in via USB or is there another place that an app would look for GPS data?
lolokai said:
Thx Nookie.
Is an app that can see what serial data is being provided via USB? Or, a GPS testing app that grabs data from the USB. Do apps always look for GPS data to come in via USB or is there another place that an app would look for GPS data?
Click to expand...
Click to collapse
To tell you the truth, I don't think either of those exist. I could be wrong, though - @Renate NST has done some stuff using an old GPS puck on her Nook, so you can ask her.
ИΘΘK¡€ said:
To tell you the truth, I don't think either of those exist. I could be wrong, though - @Renate NST has done some stuff using an old GPS puck on her Nook, so you can ask her.
Click to expand...
Click to collapse
Hey thanks Nookie. I have found some info from both Top hat Soaring (glider people who needs daytime screen visibility as well as ADV riders - motorcycle navigation with again, daytime visibility) so I'll be pursuing those. Thanks again.
I looked into all this a while ago.
You should be able to go right from serial into the LocationProvider.
Strangely enough, most of the stuff I saw back then was using the mock location to handle the data.
This seemed like a detour to me.
I really should follow this up.
Using USB host mode and serial USB is not optimum due to the wackiness in the USB driver and the current draw.
This is a 1.8V GPS module: https://www.sparkfun.com/products/10890
Besides the advantage of low voltage/low power, the 1.8V serial can interface internally and directly to the Nook.
I think that I'll be ordering one of these.
I do not know anything about programming.
But I can do all the manual. ))
What am i doing wrong?
Excuse me. Forum does not post a link to the picture. I'm new here ... It is necessary to dial 10 messages.
You must manually copy the link in Internet Explorer.
http:
//i5.imageban.ru/out/2015/08/27/
1dcc71f5ed606d4e51a1c7ed10cec568.png
Nik782 said:
I do not know anything about programming.
But I can do all the manual. ))
What am i doing wrong?
Excuse me. Forum does not post a link to the picture. I'm new here ... It is necessary to dial 10 messages.
You must manually copy the link in Internet Explorer.
http:
//i5.imageban.ru/out/2015/08/27/
1dcc71f5ed606d4e51a1c7ed10cec568.png
Click to expand...
Click to collapse
It looks like your Nook is not recognizing any drives being plugged into it.
Can you give me some more details on your progress thus far?
NOOK!E said:
It looks like your Nook is not recognizing any drives being plugged into it.
Can you give me some more details on your progress thus far?
Click to expand...
Click to collapse
Here is my story in detailed illustrations.
https:
//ww
w.dropbox.com/sh/47n1bhgd3usq15q/
AAAh5uIrxWnVWbbgoXY7PQy3a?dl=0

ROM with built-in OTG

Hello,
I need a ROM with built-in OTG because my Nexus's screen is dead and I want to use a mouse with my powered usb otg hub to install debian and set a little home server.
I tried Chroma and Nitrogen without success.
Thank you!
That feature is mainly kernel related. So you gonna find a kernel with usb otg
I tried pure nexus with hellspawn N4 which has built in otg but no otg out of the box, I can't use the touch so I can't try app or settings :/
Also I have a bluetooth mouse if it easier to set it via adb but I don't know how..
Not sure how to set it via adb in hellspawn, but in Quanta, it can be set by issuing the following command...
Code:
echo "1" > /sys/module/msm_otg/parameters/otg_hack_enable
Can you tell me a good rom with ? Because pure nexus is 6.0.1 and Quanta is for 5.1 :/
PS: I tried the command but nothing
Ok so thanks to this usefull programm http://marian.schedenig.name/2014/07/03/remote-control-your-android-phone-through-adb/ I can pair my bluetooth mouse and use my phone !
Actually it is pretty simple it takes screenshot of the phone and use adb click to send touch input.
Quanta is also for marshmallow

Question for Surfer or any other Android guru.

Is adb not able to connect over even see these Joying FYT Airmont units with Oreo on it?
The head unit has a switch to allow debug over usb but when I connect a usb to my laptop I don't get the dialogue screen on the head unit asking if I want to connect to this device and the laptop cannot see the unit at all.
I figured maybe it needed device specific drivers in Windows so figuring Joying hasn't made any I found universal usb drivers for it. Nothing.
I got an app called Naptime or something that's supposed to be able to put the unit in full doze. It's designed to work on rooted devices but also says that can be worked around by using adb to give certain permissions. I can't do that if I can't even connect adb to the damn thing.
Also, is rooting these using that Magisk method result in the same type of full root the normal way on other devices? It isn't limited compared to the normal way is it?
You can't use adb over tcpip on these units.
You can use adb over usb. You have to enable the developer options (tapping it 7 times). Go out, go in, and you have the adb over usb (OTG) option which does require an OTG cable.
@rigattoni posted in one of the SC9853i threads a step-by-step approach if my one-liner doesn't give you enough info.
rooted = rooted.
It doesn't make a difference in functionality whether the boot.img is rooted (called systemless rooting) or /system.
You always need an apk to "hand out" root rights, be it SuperSU, Superuser, Magisk or another.
In general the current systemless boot.img rooting is preferred. One of the big advantages is that it allows for OTA updates. But... we know that our units do not support that.
If you want to know more, just google for "systemless root" (sometimes "system-less root").
And I don't consider myself a guru. I read a lot and I have a good memory
surfer63 said:
You can't use adb over tcpip on these units.
You can use adb over usb. You have to enable the developer options (tapping it 7 times). Go out, go in, and you have the adb over usb (OTG) option which does require an OTG cable.
@rigattoni posted in one of the SC9853i threads a step-by-step approach if my one-liner doesn't give you enough info.
rooted = rooted.
It doesn't make a difference in functionality whether the boot.img is rooted (called systemless rooting) or /system.
You always need an apk to "hand out" root rights, be it SuperSU, Superuser, Magisk or another.
In general the current systemless boot.img rooting is preferred. One of the big advantages is that it allows for OTA updates. But... we know that our units do not support that.
If you want to know more, just google for "systemless root" (sometimes "system-less root").
And I don't consider myself a guru. I read a lot and I have a good memory
Click to expand...
Click to collapse
If the USB connection does not work for any reason, you could try the following:
Some units (as mine SC9853i) ADB can be used by WiFi, if you first run some commands on the unit.
You need a shell app and run these commands:
Code:
setprop persist.adb.tcp.port 5555
setprop sys.rkadb.root 1
reboot
After that you can connect via ADB from your laptop if both are in the same network.
Unfortunately that doesn´t work with all units.
rigattoni said:
If the USB connection does not work for any reason, you could try the following:
Some units (as mine SC9853i) ADB can be used by WiFi, if you first run some commands on the unit.
You need a shell app and run these commands:
Code:
setprop persist.adb.tcp.port 5555
setprop sys.rkadb.root 1
reboot
After that you can connect via ADB from your laptop if both are in the same network.
Unfortunately that doesn´t work with all units.
Click to expand...
Click to collapse
These commands require root
surfer63 said:
You can't use adb over tcpip on these units.
You can use adb over usb. You have to enable the developer options (tapping it 7 times). Go out, go in, and you have the adb over usb (OTG) option which does require an OTG cable.
@rigattoni posted in one of the SC9853i threads a step-by-step approach if my one-liner doesn't give you enough info.
Click to expand...
Click to collapse
Maybe I'm doing something wrong then. The developer options are enabled and I have it set for unlocked bootloader but my laptop can't see it whether I'm connected through the OTG usb port or the standard one and the HU doesn't give the popup dialogue asking if I want to allow the connection like my tablet and phone did. Maybe they changed something with these particular units with the new UI?
I did notice on another thread someone that had a FYT Joying Airmont with 8.1 and they said something about the 3 dot menu on the top right for "USB Connection" that brings up two options both in Chinese an his only worked on the lower option. I did try that too but still nothing. IDK. Maybe I had something else set wrong when I tried that lower option that made it not work in all my effort yesterday to get adb to see it and connect.

Categories

Resources