[KERNEL] [4.2.2 CM10.1][m4xx3d0ut][kexec,ath9k,rtl8187,USBhost][5/2/13] - Nexus 7 Android Development

so i thought this kernel may be helpful to others so i decided to post it. its a recompiled version of the cm10.1 kernel with Tasssadar's kexec patch applied (thanks Tasssadar!), added support for ath9k, and added support for rtl8187.
this will allow you to use TWRP multirom and boot android or pwnie express's pwn pad backup in which ever order you prefer.
also you may allow them to share the kernel and use (for example) an Alfa AWUS036H or a TP-link TL-WN722N usb wifi adapter with both.
it will allow multiple radios to be used at the same time via a usb hub (pictured) and packet injection works as well.
this is the part that i say "attempting to crack the key to a wireless network on which you are not authorized to is ILLEGAL and i do not condone such actions"
i am a security researcher and only conduct tests on my own networks or ones i am authorized to do so on, i recommend you do the same.
also, if anyone has an ubertoothone or some an industrial bluetooth adapter let me know if they work. if they do not i will recompile and we can retest, i intend on purchasing one as soon as i have the extra funding.
please let me know how it works and ill keep this thread updated with any optimizations i make in the future. enjoy!
edit: NEW UPDATE!!! kernel now implements host mode charging (charges with usb devices connected, power injection cable required) thanks Timur!!!
also i have designed a new power injection cable with a toggle switch for host mode charging.
it allows for a hub, external nic's, or whatever you want to be powered 1 of 3 ways.
1.) with an external power source (in this case the usb battery pack) sending power only to the external devices, therefore not adversely affecting the battery life of the nexus 7.
2.) switch flipped to the other position, nexus 7 will power attached devices and work as a normal usb cable plugged into otg.
3.) both nexus 7 and external devices will be powered by external source
first pic is n7 with 2 wireless nic's, a 4 port hub, and a usb battery pack
second pic is the switchable host power injection cable
third pic is screenshot of second wireless device up and charging icon on
fourth pic is basic schematic for power injection cable (note mine has extra female usb for 1 device at a time)
then last few are some picks from airmon-ng and aireplay-ng in a kali chroot
edit: NEW UPDATE 12/21/13!!! V3 NOW INCLUDES RT2800 AND SYSVIPC! POSTGRESQL NOW WORKING IN KALI!!!
{
"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"
}

just recompiled today with some new features. last week i whipped up a nifty new power injection cable. enjoy!

Nice
Sent from my Nexus 7 using XDA Premium HD app

Super nice! I was going to build my extra cables tonight as well, but realized I was out of small heat shrinks. I need to order more.
"What do you tell a man with two black eyes? Nothing. He has already been told twice."

the cable is working out just as expected, gonna do some testing this week (ie- plug it in and test reaver against wps and leaving it plugged in on my network and launch some reverse shells from remote locations)

m4xx3d0ut said:
the cable is working out just as expected, gonna do some testing this week (ie- plug it in and test reaver against wps and leaving it plugged in on my network and launch some reverse shells from remote locations)
Click to expand...
Click to collapse
Looking forward to hearing some results. I still need to order my ext wifi, so it will be a bit before I can get started.
"What do you tell a man with two black eyes? Nothing. He has already been told twice."

i recommend TP-link TL-WN722N. its only $20 and it uses an atheros chip. as far as i have seen it yields the best all around results, it can also operate in master mode if you want to turn your ride into a wifi hot spot

m4xx3d0ut said:
i recommend TP-link TL-WN722N. its only $20 and it uses an atheros chip. as far as i have seen it yields the best all around results, it can also operate in master mode if you want to turn your ride into a wifi hot spot
Click to expand...
Click to collapse
Sounds good. I dont need a hotsopt though. I have an old linksys router loaded with dd-wrt in my car and set up as a wireless bridge.
Once I get the tp link, I want to add it to my small parabolic setup. I want some RANGE on the go, lol.
"What do you tell a man with two black eyes? Nothing. He has already been told twice."

funny you should say that, i was gonna set up a parabolic on my roof and a yagi for my adapters and see if i could get my network from the beach (only 1 block). they are next on my list so ill run some long range test too and post results.

For my house, I just jacked up my router tx to 210 mW, from 71. I can pick it up about 2 blocks from my house with little issue. Granted, I live in a more rural area and my "block" may very well be much smaller than yours. I have also thought about making a parabolic for here. I have a large 2 story and there is already a vacant dish network stand on the peak. I have an los of about 3 miles, so I think I could really get out there.
Btw: We talked about host mode charging on Ubuntu for N7. Looks like they released 13.10 Suacy Salamander today. Gonna see if they finally got it into thier kernel.
"What do you tell a man with two black eyes? Nothing. He has already been told twice."

Wow!
Could you please add support for the rt2800 driver? This driver allows dozens of compatible usb wifi devices based on the following ralink chipsets: rt3070 (ALFA AWUS036NH), rt5370, rt2770+rt2750(ALFA AWUS051NH/AWUS052NH), rt8070 (nano sized usb wifi superior to 8192cu-based edimax 7811).
Basically, the rt2800 driver seems to have far wider hardware support, including wifi cards with dual band, 5ghz capability.
Here are a couple of lists of compatible devices:
http://wireless.kernel.org/en/users/...800usb/devices
http://wiki.debian.org/rt2800usb
The rtl8187 is great but BG only and has a tendency to get warm (even hot). The AR9271 adds N but lacks the range and still 2GHz only. Don't get me wrong, I have both of these cards (I have four 036H Alfas, two AR9271-based cards, one is tplink 722n).

looking into it, ill pick up an adapter to test with asap

Hi all, just refered to this thread (thanks), I have the pwpad nexus 7 , community free image, it flashed ok and works as it should, I have the correct TPLink wifi, and bluetooth dongle(not ubertooth) as per pwniee site, incedentally I have it on the 16g wireless only model and it states req'd 32g and 3g, it doesnt seem to matter tho... the only think holding me back so far is lack of linux knowledge(learning fast...) as its new to me. I'm trying to have the TPlink usb wifi usable in both andriod and linux software and leave the internal chip wifi asleep forever...its range isnt good and it doesnt inject etc.So I was refered here and am delighted to see your work, Ive downloaded the kernel and will now 'swat up' on proceedures to flash it, will this do what I want?
Regards
Jay

well I flashed the kernel and it hasnt allowed the android aps to 'see' or use the ext TPLink wifi dongle, the functionality is the same as my previous custom kernel from pawnie, except I now have a few errors cropping up, more research required from me I guess and a flash back to the orig kernel to I know some more.
Regards
Jay

Hi,
could you please explain how to flash it with multirom ?
I would like to continu using my Kernel with Android Roms, and your Kernel with the Pwnpad community build
Many Thanks in advance

I don't believe you can flash it with multirom

vertab7 said:
well I flashed the kernel and it hasnt allowed the android aps to 'see' or use the ext TPLink wifi dongle, the functionality is the same as my previous custom kernel from pawnie, except I now have a few errors cropping up, more research required from me I guess and a flash back to the orig kernel to I know some more.
Regards
Jay
Click to expand...
Click to collapse
I'm not sure why you needed to flash this kernel since the Pwnie PwnPad image is supposed to support the rtl8187 and ar9271.

vertab7 said:
I don't believe you can flash it with multirom
Click to expand...
Click to collapse
I understood it should work according to the OP.
m4xx3d0ut said:
with Tasssadar's kexec patch applied (thanks Tasssadar)
this will allow you to use TWRP multirom and boot android or pwnie express's pwn pad backup in which ever order you prefer.
Click to expand...
Click to collapse
Sent from my Nexus 7 using xda premium

you can flash kernels with multirom, just use the option to inject current boot sector then select the image.
i say this kernel is usable with multirom because is was compiled to support kexec system calls (google kexec). this allows one running kernel to boot into another without shutting down. its a requirement of multirom.
as for android apps seeing your adapter i dont know of any that will, other than android pcap seeing an rtl8187. you need to manipulate your adapters from the command line. best way is with a chroot. you can use them to connect to ap's using tools like wpa supplicant, and any command line scanning tool will see them as long as you manually bring the interface up.

I mistakenly thought it may give fuctionality for the android tools to also use the ext TPLink dongle, not just the liux apps, my mistake. I have a few android tools (ie: Z-Anti, Dsploit) and want them to use wlan1 not onboard wlan0.
Learning fast...
Jay
---------- Post added at 11:06 PM ---------- Previous post was at 11:02 PM ----------
I can bring up wlan1/tplink ok in a terminal window/ssh, and scan, see ap's etc. but if I fire up an android app it says not connected .... is a little beyond me, at the moment. Not sure how android finds its device... maybe a question for an android dev forum.
regards
Jay

Related

[HOWTO] Milestone USB-Host mode & using USB devices

Motorola Milestone - USB OTG - USBHost Mode
Found on Chris Paget's blog and since there isn't anything related, I'm postin' it here for xda-devs (with some clarifications and corrections in his words).
You’ll need to make two things, a micro-dongle to enable the USBHost mode (that you'll plugin during boot time) and a cable with the right connectors on each end (for connecting your peripheral).
To do this you’ll need three cables:
- A car charging cable (off-the-shelf at the Verizon store)
- A Micro-USB cable (as above)
- A USB extender cable (the tiny ones that sometimes come free with USB keys work great)
Start with the car charging cable. Break open the micro-usb connector (it comes apart fairly easily) and look at the little PCB inside – there should be a single tiny surface-mount resistor and two wires from the charger cable. Unsolder both wires and the resistor, and then bridge the pads where the resistor used to be so that it’s completely shorted.
The end result should look something like this:
{
"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"
}
(Micro Dongle)
Next up, you need to make your connector cable. Cut the end off the USB extender cable, you want to keep the socket end and discard the plug. Cut the micro-usb cable as well, but on this one you want to keep the plug and discard the socket. You should now have a micro-usb plug that’ll fit into your droid and a usb socket that you could plug a memory stick into. Strip the wires off the ends of both cables and join them to each other, connecting like colours (and the shield) together. When it’s finished it should look something like this:
For using USB-Host mode and your USB peripherals you have to do the following:
- Turn your Milestone off
- Plug the micro-dongle into the USB port
- Turn the Milestone on
- Unplug the micro-dongle as soon as the Motorola logo disappears (when the Android bootscreen is appearing).
Once your Milestone is booted, pull up a terminal and look at dmesg – after plugging in your USB peripheral using the cable you made earlier you should see the usual kernel notifications about new USB devices being connected; they’ll also turn on (or start charging) if they’re powered by USB.
You’ll only be able to plug in one peripheral before the port reverts to peripheral mode and you’ll have to reboot with the micro-dongle if you want to go back into host mode.
Also, if you leave the micro-dongle plugged in too long it triggers another bug, the port gets stuck supplying power to devices but not actually recognising them. Hopefully the drivers are sufficiently open-source that these are easy bugs to squash, and that dynamically switching between host mode and peripheral mode won’t be too hard to add either.
USB external storage won't work, but USB Keyboards are working. Anyway, we can compile a module for making the Linux kernel to recognize all we want since we can insmod as root.
--kholk
and the same text are here
Is it possible to load a module witch allows usb memory sticks?
Sent from my Milestone using XDA App
I made a USB host cable based on Gowthamj reply on the same blog.
Anyone sell this on ebay?
rizdroid said:
I made a USB host cable based on Gowthamj reply on the same blog.
Click to expand...
Click to collapse
Hi,
Some schematics or blueprint that you can upload here?. Look great!!!
EDIT: Got it!: http://sites.google.com/a/gowthamj.com/www/
i do host cable with blueprint from post #6 and... Something work
I'dont have any classic usb keybord (only wireless), but i try with usb storage.
After reboot and pressing button red led on pendrive blink a few times, after i release button (after M logo) they turned black.
It means that cable is ok, in dmesg i saw notification of connecting USB Device. But without drivers in kernel we can put this in our... boxes with accesories... kernel is locked, host usb is IMO only a funny feature of Motorola Milestone
Cant we use the modules they use to connect usb memory sticks to their N1s?
Would this work?
Sent from my Milestone using XDA App
royalcs said:
Cant we use the modules they use to connect usb memory sticks to their N1s?
Would this work?
Sent from my Milestone using XDA App
Click to expand...
Click to collapse
No, because the N1 uses a different kernel and modules as to the Motorola Milestone.
Is there a chance for external USB sound card to work?
bump!
I'm not a linux guy so anyway - do the drivers for usb host HAVE to be compiled in kernel? As on milestone the kernel can't be modified this implies the usb host on milestone works just with - usb keyboards?
Is there any way to use other usb devices? I'm asking because if not it seems it isn't worth to make the "micro usb host + switch" cable...
there is no way untill we can put or own kernel signed by owrselves on the milestone
Live long and prosper- tapatalk
thx but we all know that.
MuF123 said:
thx but we all know that.
Click to expand...
Click to collapse
so.. we all know that the only included driver available is for keyboard, no one has ever reported anything but, and yet... there is a post asking about it, isnt it?
Live long and prosper- tapatalk
Khul said:
so.. we all know that the only included driver available is for keyboard, no one has ever reported anything but, and yet... there is a post asking about it, isnt it?
Live long and prosper- tapatalk
Click to expand...
Click to collapse
could you please read what you post?
Khul said:
there is no way untill we can put or own kernel signed by owrselves on the milestone
Live long and prosper- tapatalk
Click to expand...
Click to collapse
You said kernel is locked.
We all know that.
And if being smarta*s is the only thing you can do here I think noone is interested in your posts Bye.
Please ppl don't become offensive...Just ignore some posts and let's continue to be productive about the topic
we can try to load modules for the kernel. no need for custom kernel. just compile the module sources against the milestone kernel and present libs (for ex. the now famous kernel 2.6.32.9-ge635aa4
so it is possible, but requires better knowledge of linux stuff like compiling etc - that I as a windows user don't know... however - for a person who knows how to do that - is it possible without much effort to do that? or do you need to code your own driver or what
edit> what do we need to do that? let's say I will come to my friend to do the compiling for me - what does he need to do that? how will I then use those drivers? is it same as in linux so will some guide for linux apply to android?
MuF123 said:
if being smarta*s is the only thing you can do here I think noone is interested in your posts.
Click to expand...
Click to collapse
wow jumpi huh? no need to mate, not being smarta*, just returning your "we all know that" right back at ya. nothing more, its all good.
anyways, i didnt think you could actually add more drivers and get them to load properly... thats nice to hear.
Live long and prosper- tapatalk
Awesome!!Nice guide!!! Thank you!!!

[VIDEO] RavPower Wifi SDCard Reader / USB Reader / Portable USB Power Supply

{
"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"
}
NOTE: My wife was out of town with the iPhone 5 and Galaxy S4 at the time of this video, but I can confirm they work perfectly. As mentioned in the video, I did have to use the tablet version with my devices. At least on the LG Optimus G Pro it seemed to crash.
Gather you devices together. Your iPhone 5, Samsung Galaxy S4, HTC One, iPad, etc. It’s time they had access to a full size SDCard, USB thumb drive, or portable hard drive. At first I thought this was simply another portable USB charger. That is just the start of it. In particular I liked the pass through Internet feature.
The video below shows you just a little of what it can do. There are applications available for Android devices, iOS, and your desktop computer.
Available on Amazon for $49.99 with free shipping… It’s a good buy for a variety of people.
Click the link below to visit the product on Amazon:
RavPower Portable USB Charger / Media Reader on Amazon
​
​ Full Specifications / Summary:
Transfer photos/movies/music between iOS and Android Devices, or between mobile devices and SD Card/USB HDD
Built-in 3000 mAh power bank (5V/1A) for charging smartphones
NAS File Server (Web Interface): Can connect up to 5 devices (Laptop,Mobile Phone,Tablet/PAD,Desktop etc) at the same time
WiFi Hotspot: Can connect to your existing WiFi network so you can share files and access internet at the same time
Wireless Storage For Ipad / Iphone5,4s,4 / Samsung Galaxy S4,S3,S2,Tab2,Note2 and All Other IOS/Android Device
RAVPower® Filehub (Wireless SD Card Reader + Wireless HDD/SDD Reader + External Power Bank 3000 mah)
A WiFi disk is a revolutionary device that you can use to:
- Transfer fiels (photos, movies or videos) between your SD card/USB Portable Hard Disk Drive and your Android/iOS smartphones and tablets
- Transfer files between your iOS and android devices
- Move files (photos/Movies/Music) from your mobile device to SD card / USB HDD / Flash Disk
A built-in 3000 mah power bank that you can use to charge your mobile devices.
Portable WLAN Hot Spot – Bypass your internet access to your existing Wi-Fi router,so you may access any data in the SD or HDD while surfing the internet simultaneously. (Allow 5 maximum connections at the same time for data sharing,or connecting to the internet service.
Specifications:
CPU: Ralink RT 5350 MIPS24KEc 350 MHz
WiFi Frequency : 2.4 GHZ Speed: 72Mbps at 20Mhz / 150 Mbps at 40MHZ
External Battery Pack : 3000 mah 1.5A Max Input 1A Output
Power: SD Card Read/Write 2W HDD Sleep Mode 1.5W
SD Card Speed : Read: 3MB/S Write: 3.5MB/S
USB Interface: Micro USB 2.0
Product Notes:
- Please download AirStor app or Solid Explorer first from iOS or Android app store
- You have to connect the filehub with your existing Wi-Fi router to have internet service.
Package includes:
- 1* RAVPower Wi-Fi Disk with Power Bank (Model: RP-WD01)
- 1* USB Charging Cable
- 1* User Manual
Note: RP-WD01 only support hard drives with DOD/Windows format.
Thanks for posting this. Don't exactly need this right at the moment but going to buy one anyways. Will be pretty cool to place with. I have 2 android phones, 2 laptops, a desktop and 2 android tablets. Will be a great way to share thing between all the devices. I'm currently using a app called airdroid to share things between all my devices and this will simplify everything. Wonder how well it would work leaving it plugged in all the time to power and letting all my devices connect to this instead of my normal network. I'm sure the battery won't last long being plugged in 24/7.
blwnv8 said:
Thanks for posting this. Don't exactly need this right at the moment but going to buy one anyways. Will be pretty cool to place with. I have 2 android phones, 2 laptops, a desktop and 2 android tablets. Will be a great way to share thing between all the devices. I'm currently using a app called airdroid to share things between all my devices and this will simplify everything. Wonder how well it would work leaving it plugged in all the time to power and letting all my devices connect to this instead of my normal network. I'm sure the battery won't last long being plugged in 24/7.
Click to expand...
Click to collapse
I guess we would hope that the device would just draw from the wall adapter as long as it was supplying over the amount required to operate the WiFi. Then the battery wouldn't be constantly drained / recharged.
Many thanks for the review
Two questions:
1. Can the device and its connected storage be accessed via my own wifi network and be accessibble as a standard network attached storage in Windows 7 without any software/ftp solution?
2. I have seen this in 2 reviews but I want to be 100% certain: I can access the SD cards/Flash drive attached to the device on my PC via USB connection to the outlet which also provides power to the device. I need to know this because I can then hook the device to my Samsung TV and access the content.
tarkin889 said:
Many thanks for the review
Two questions:
1. Can the device and its connected storage be accessed via my own wifi network and be accessibble as a standard network attached storage in Windows 7 without any software/ftp solution?
2. I have seen this in 2 reviews but I want to be 100% certain: I can access the SD cards/Flash drive attached to the device on my PC via USB connection to the outlet which also provides power to the device. I need to know this because I can then hook the device to my Samsung TV and access the content.
Click to expand...
Click to collapse
1. It is supposed to be accessible this way. At the moment I can't get it to configure. You can modify the settings from your PC by accessing the device's IP from a web browser.
2. Yes... Just verified. Appears as a Generic USB Hub and the SDCard appears as a normal drive.
Wooh, looks like im buying one of these!
Can you access the files from a phone tethering the net? just curious as i would like to connect this to my phone on the go but still have internet. Either way I just ordered mine, very excited to try it out. Also thanks for the review it really helped me make a decision on this.
Isn't it too big to carry around.. May be something smaller would be nice like this one?
https://www.kickstarter.com/projects/ugodevices/expandable-sd-and-micro-sd-storage-for-android-use/messages/5696998
gamester_47 said:
Can you access the files from a phone tethering the net? just curious as i would like to connect this to my phone on the go but still have internet. Either way I just ordered mine, very excited to try it out. Also thanks for the review it really helped me make a decision on this.
Click to expand...
Click to collapse
Welcome and yes, you can connect to the device to a hotspot and it passes the Internet through to any device attached to it.
malebu said:
Isn't it too big to carry around.. May be something smaller would be nice like this one?
https://www.kickstarter.com/project...o-sd-storage-for-android-use/messages/5696998
Click to expand...
Click to collapse
I got a 404 error. I doubt that all the features this particular product packs could be placed in a smaller package.
It allows you to even connect small USB hard drives to it since it has a battery. Can also charge your device.
Sent from my SAMSUNG-SM-N900A using Tapatalk

[Q] simultaneous slimport and otg, not possible?

I had visions of building a dock that would connect the nexus 5 both to:
1. a monitor (or tv)
2. usb hub (allowing access to keyboard, mouse, ext hd, etc.)
but...
my couple of hours of research is looking like this isn't possible, as there isn't a way to run slimport and otg hosting simultaneously. (at least my poking around the nexus 4 and nexus 7 forums has yet to bear fruit). in fact one slimport paper i found describes how pins 2, 3 and 4 would toggle between the two (usb otg and slimport). I'm not confident how such switching would be happening "on the fly".
anyone know of any "successful" threads I'm missing? or is the vision screwed from the go?
Thanks!
*BUMP*
Anyone have a copy of that service manual that leaked? I would love to know what it has to say about simultaneous USB OTG and HDMI, if anything. I know GS3/4 can do this because they have a special 11 pin USB/MHL connector but I can't find anything about USB OTG & HDMI at the same time on SlimPort....
Thanks,
Kevlar
KevlarTheGreat said:
*BUMP*
Anyone have a copy of that service manual that leaked? I would love to know what it has to say about simultaneous USB OTG and HDMI, if anything. I know GS3/4 can do this because they have a special 11 pin USB/MHL connector but I can't find anything about USB OTG & HDMI at the same time on SlimPort....
Thanks,
Kevlar
Click to expand...
Click to collapse
Here's a relevant block diagram:
pau11y said:
I had visions of building a dock that would connect the nexus 5 both to:
1. a monitor (or tv)
2. usb hub (allowing access to keyboard, mouse, ext hd, etc.)
but...
my couple of hours of research is looking like this isn't possible, as there isn't a way to run slimport and otg hosting simultaneously. (at least my poking around the nexus 4 and nexus 7 forums has yet to bear fruit). in fact one slimport paper i found describes how pins 2, 3 and 4 would toggle between the two (usb otg and slimport). I'm not confident how such switching would be happening "on the fly".
anyone know of any "successful" threads I'm missing? or is the vision screwed from the go?
Thanks!
Click to expand...
Click to collapse
From my understanding this is not possible. However, it isn't necessary either since the slimport protocol allows for simultaneous transport of data, audio, and video.
The real question isn't whether we can do both USB otg and slimport at the same time, but rather, when will a slimport dock with a USB hub be released??
Checkout this article:
http://web.luxshare-ict.com/en/NewsDetail.php?ctype=1&autono=11
Edit:
Also see:
http://en.wikipedia.org/wiki/DisplayPort#SlimPort
Notice that it says "support conversion to DisplayPort." If you read up on DisplayPort you will understand more on the potential of slimport. I can't wait until the next generation of smart phones are released with USB 3.0 and the respective slimport iteration.
Hi,
I'm interested in connecting keyboard and display at the same time. You said "Next generation with USB 3.0". If I connect my Nexus 5 to my computer it sais "this supports USB 3.0, I just have to plug it in an usb3 port. I did, but maybe a special cable is neccessary. It seems like our Nexus supports USB3.
When I said USB 3 I was just referring to the fact that it theoretically could handle a higher bandwidth of data over slimport. I didn't realize the nexus 5 was USB 3.0 compatible. In any case the slimport dock would have to be designed to utilize the 3.0 spec and that won't happen unless the slim port standard supports USB 3. Whether or not it does already support it, or if plans exist to upgrade the standard is unclear.
Sent from my Nexus 5 using xda app-developers app
---------- Post added at 04:14 PM ---------- Previous post was at 04:09 PM ----------
Brom2 said:
Hi,
I'm interested in connecting keyboard and display at the same time. You said "Next generation with USB 3.0". If I connect my Nexus 5 to my computer it sais "this supports USB 3.0, I just have to plug it in an usb3 port. I did, but maybe a special cable is neccessary. It seems like our Nexus supports USB3.
Click to expand...
Click to collapse
You can currently use wireless display and USB otg simultaneously. No special docks required... In fact you could use wireless display and a Bluetooth mouse and keyboard and get the desired functionality without having to plug anything into the phone.
Sent from my Nexus 5 using xda app-developers app
I am almost positive when I faced the same problem with the nexus 4 analogix had plans of creating a adapter that covered this, I will defiantly start researching this more once I get my N5.
.....
this article echos michaelmab88's statements, basically saying simultaneous otg-slimport can't happen "now" ("now" being last May when the article was written), but that such things should be expected "next year".
Does anyone know which slimport chip version we (nexus 5 users) have? been having trouble tracking that down.
Analogix's latest Slimport chips (the ANX7808) are, for example:
DisplayPort 1.2, MyDP 1.0, HDMI 1.4a
...compliant, and refers to things like "Seamless switching between USB and MyDP 1.0", which of course may just mean "when you swap plugs".
EDIT:
It is the ANX7808.
Here's a nice breakdown of nexus 5 components.
and..... poop.
The ANX7808's detailed product info pdf states:
"The same connector on the device can be used for USB when a SlimPort® receiver is not connected."
So I guess it's looking like, unless some clever Slimport trickery is conceived, Miracast is the "out of the box" way to go get the video data to the monitor and have simultaneous otg hosting.
pau11y said:
and..... poop.
The ANX7808's detailed product info pdf states:
"The same connector on the device can be used for USB when a SlimPort® receiver is not connected."
So I guess it's looking like, unless some clever Slimport trickery is conceived, Miracast is the "out of the box" way to go get the video data to the monitor and have simultaneous otg hosting.
Click to expand...
Click to collapse
pau11y,
We now know that we can't use the USB functionality whilst using SlimPort for DisplayPort video, however, can the Nexus 5 use the USB channel that should be possible over DisplayPort?
As I've replied to farmerbb in this post, I'm very keen on a solution for the Nexus 5 where I can use a wired display, keyboard and preferably mouse for a Bring Your Own Device (BYOD) functionality where the office worker should only need their Nexus 5 (or other phone) to do all their work (with the work place only needing to supply the MyDP adapter, monitor, keyboard and mouse).
DisplayPort 1.2 even supports multiple displays (by MST) and that would be great if standard Android could grow to support multiple monitors and simultaneous apps in use (ala Samsung Galaxy Note 3).
I'll have to read up on MyDP 1.0 to see if it excludes any functionality of DisplayPort 1.2 (e.g. the USB channel).
Regards,
Matt
The padfone infinity kind of does that between the phone and tablet station wich are connected with a micro usb port.
The tablet station has a screen, a touch screen, speakers, light sensors, microphones, front camera, and all this works through a micro usb port.
I don't know what protocol it exactly uses, but I know it supports slimport, and usb host.
So I wonder what magic Asus used to managed to output fullhd video on the tablet, and still manage to redirect devices inputs and outputs to the phone.
When docked in the tablet, we can't use the tablet micro usb port for usb on the go.
Guys, would something like this work?
http://www.ebay.com/itm/For-LG-G3-G...448165?hash=item1a0294aea5:g:u~IAAOSw-vlVlj7V
It has all the ports needed, but I don't know how it behaves... My guess is that only one at a time would work, but I wonder what would happen if you plug the HDMI in and after that a USB keyboard for example.
Nice. I would like to see Ethernet and displayport too.
Today I would desire to stick to Samsung:
{
"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"
}
http://www.amazon.es/dp/B00FXSVVNE/ref=twister_B00DS4F1E0?_encoding=UTF8&psc=1

OTG + Charging using USB ACA (Accessory charging adaptor) on my Moto G (XT1032)

I was interested in getting USB OTG + Charging to work, and discovered that an "Accessory charging adaptor" was designed to serve such a purpose, the adapter is described in "Battery Charging Specification" Revision 1.2.
Here is a simple diagram of such an adapter (this design does not fully comply to the specifications):
{
"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"
}
The code in 'drivers\usb\otg\msm_otg.c' suggests that the device can operate in the following 3 modes:
ID_FLOAT: Configure device to act as peripheral and allow charging if VBUS is present, else move it to LPM (low power mode).
ID_GROUND: Configure device to act as host and supply VBUS.
ID_A: Configure device to act as host and don't supply VBUS. In this state the device can charge as well.
So I built the adapter, and compiled my XT1032 kernel with CONFIG_USB_MSM_ACA,
unfortunately, (as far as I can tell) the hardware cannot detect the 124K resistor (so it does not automatically switch to ID_A).
Plan B:
It is possible however to modify 'msm_otg.c' and force ID_A (OTG + Charging mode), I was able to find an automatic method that works for me:
If you connect the ACA cable to a power source and a peripheral device and THEN connect your phone, the adapter will be detected as USB_PROPRIETARY_CHARGER (a dedicated charging port shorts the D+ and D- pins, and a flash drive does not),
so I simply assumed that USB_PROPRIETARY_CHARGER should activate ID_A.
I tested the patch (attached) using two Moto G XT1032 phones:
One manufactured in 2013-12-19 and have BOOTLOADER = 0x3 (with fastboot 41.13)
The other was manufactured in 2015-02-13 and have BOOTLOADER = 0x2 (with fastboot 41.18).
(the latest BOOTLOADER version is 0x4 with fastboot 41.1A, you can read the BOOTLOADER fuse using 'fastboot oem read_sv')
Other than the bootloader and MF date, the phones are Identical, same kernel, same system.
oddly, each behaved differently with the modified kernel and ACA cable:
With both phones, most USB peripheral devices were able to work when connected through a cheap (unpowered) USB 2.0 hub, this is the only hub out of the 3 tested that worked properly with the ACA cable.
The newer phone (but not the older one) had connectivity issues when devices were connected directly to the ACA cable.
To sum it up: I was able to use USB devices and charge at the same time using this patch.
maybe using two power adapters would have solved some of the minor issues I encountered (e.g. I could see the USB hub LED brightness fluctuate in some cases - it's not supposed to happen)
p.s. Using this patch, the phone exits ID_A mode once the charger is disconnected, and will provide power to OTG devices, so the patch does not interfere with the regular operation of the phone (unless you happen to have a real "USB_PROPRIETARY_CHARGER").
Components for the adapter:
USB 2.0 Male To Female Extension Cable
124K Ohm resistor (optional)
Micro USB Male to Female Extension Cable
Update:
I have bought the Acasis H027 and together with my patch I can use USB peripheral devices (connected to the hub) + charge at the same time.
p.s. USB Device Info shows the connected USB devices
This is great info! I'm a complete rookie when it comes to developing but I've jumped in. I'm trying to get my XT1060 (2013 Motorola Moto X Verizon Developer Edition) to do OTG and charging at the same time. I've downloaded the source from Motorola (here) and tried to enable ACA in the menu but I couldn't get it to compile. I then tried using source from @tycoo and @army9000 and their modified kernel (here) to enable this and recompile but again, I'm getting errors. I must be doing something wrong, either not enabling other items in the menuconfig that are required or I'm missing a lot more of the actual "meat" of the mods and just enabling an item in menuconfig. I know I've got my Ubuntu and toolchain all set up right because I can successfully recompile (using msm8960_defconfig only for some reason, msm8960-perf_defconfig and full_msm8960-perf_defconfig fail compile, some error about "this error is dumb" and acpulock-krait?) the source kernels (after a lot of work!) Think you could help me out? I'd greatly appreciate it.
I have a Nexus 7 tablet running Timur's USB Host kernel and a custom made USB OTG cable with power spliced it. Works great on the Nexus 7 but need it for the Moto X!
Unrelated to this topic, also trying to enable CIFS filesystem so I can mount a Windows network share in the device. Can't get that to work either I thought just enabling it in menuconfig.
Thanks,
Mike
Hey Mike, Did you unpack an existing boot image using Android Image Kitchen and replaced the kernel binary (zImage) with the one you built? that's the way to go.
Even with the XT1032 I'm having a few compilation errors that needs fixing due to different build environment, use the official source and search for solution to the compilation issues.
You don't have to change anything in the menuconfig at all.
Yes, I'm using the zip file from @army9000 kernel and replacing the zimage and modules to flash my recompiled kernels, works well!
I'm using source, both stock from Motorola as well as the one from @army9000, to build from. I'll have to see if I can figure out a solution with the info from your patch.
Yes! I can't believe my dumb arse got this working! Thanks so much @tal.aloni for your patch. I had to tweak it and I just manually edited my msm_otg.c file because I was afraid the patch would work with fuzz because the reference lines weren't the same. Like you said, I didn't change a single thing in menuconfig, just tweaked msm_otg.c and recompiled and flashed! The one thing I noticed is that it says its charging on USB, not AC. Hopefully the device doesn't slowly drain the battery due to lack of charging current, will have to troubleshoot. Thanks so much! And thanks @army9000 and @tycoo for the source to work with!
I have no idea how to use git and repositories, but credit goes to the above XDA members. Attached is the modified msm_otg.c file that has @tal.aloni's patch in it but modified for the Verizon Wireless XT1060 Developer Edition Motorola Moto X that I used to compile @army9000's 5.1 kernel (here).
Also, no idea why, but this seems to be the "process" for me to get my Moto X to properly do OTG and charging.
1. Boot up the Moto X
2. With powered OTG cable NOT powered, plug micro-B USB into phone
3. Plug in OTG device (usb-to-ethernet)
4. Plug in ethernet cable to adapter
5. NOW plug in USB power charger for power
6. Unplug micro-B USB from phone
7. Plug in micro-B USB to phone
8. Phone should have ethernet AND be charging (USB)
FYI, I'm also trying to get CIFS support working with this same kernel in the post for that (here).
OTG+CHARGING at same time
dear
tal.aloni and Mike7143,
thanks for your post and reply,
i am trying to do the same,
I am using
Kernel: github.com/akhilnarang/whyred
it does not has /usb/otg/ folder, so where to look for "otg+charging"
i try and test otg+charging on redmi note 4 (codename:MIDO) on lineage14.1
but i did not change anything in kernel,
just using instructables.com/id/DIY-Cable-to-Use-OTG-and-Simultaneously-Charge-the/
and it works fine,
*weblink is not allowed so i remove www
please guide.
thanks and regards.
jacob19 said:
dear
tal.aloni and Mike7143,
thanks for your post and reply,
i am trying to do the same,
I am using
Kernel: github.com/akhilnarang/whyred
it does not has /usb/otg/ folder, so where to look for "otg+charging"
i try and test otg+charging on redmi note 4 (codename:MIDO) on lineage14.1
but i did not change anything in kernel,
just using instructables.com/id/DIY-Cable-to-Use-OTG-and-Simultaneously-Charge-the/
and it works fine,
*weblink is not allowed so i remove www
please guide.
thanks and regards.
Click to expand...
Click to collapse
I don't know why there's no /drivers/usb/otg folder. Paging @akhilnarang to the thread, perhaps he can help you? Heck, maybe he can help improve the hack job I did for the XT1060 so my Wifi works and maybe CIFs as well! Doesn't hurt to ask!
thanks for quick reply dear,
I try and test
github.com/LineageOS/android_kernel_xiaomi_msm8953/tree/cm-14.1
for MIDO(xiaomi redmi note 4), it also has not usb/otg folder,
i did not change anything in kernel, but still it supports charging+otg ,
but then also it works,
Dear Sir,
I am using MSM8953 and Android 9, that I could not use ACA mode to charge and USB data transfer at the same time. Is there any comment for me?
Thank you.
Hi!
Is it possible to somehow enable that ID_A mode in kernel by just passing whatever parameter to kernel via terminal command line?

USB Audio

Hi all,
Just brought a Pixel 32gb coming from the 6P. With the 6p, I'm able to use USB-audio to my cars radio no problem. However, with my pixel - it doesn't want to work. Upon connection, it cycles through the USB modes (Charging, PTP and Audio Source,) which interrupts the connection process. With the 6P, it's a constant 'audio source' USB mode.
I should mention, that the times I've got it working, I've had to wait for the connection to time out, and cause my radio to throw up an 'Android error' (unable to connect.) Then I simply went into developer options and selected 'audio source' as the default method. When this worked, I wasn't able to use the radio buttons (pause / play and seek.)
Nexus 6P - 7.1 dev preview
Pixel - 7.1
Radio: Kenwood KDC200UB.
Thoughts anyone?
Thanks in advance,
Chicken
It doesn't sound like your head unit is demanding "USB audio" and I don't believe it should.. It sounds like your 6P is connecting as a hard drive and you're able to use the head unit to control the tracks. This is how pretty much all after market head units work, I don't believe there are any head units that act like a USB DAC (straight thru USB audio controlled solely by the phone with an analog/digital output).
In my case with my DEH4800BT, my Pixel automatically mounts as storage and the head unit reads the music content and is able to play/pause/skip directly from it. This should be what happens in your case, I had to play with mine a few times in order to get it to work.
Edit: I'm going to play with the OTG adapter and a male/male USB cable to see how my head unit connects. Just as an experiment.
I can assure you, my 6p is not acting as a hard drive due to the radio not supporting MTP. It's a Kenwood KDC200UB. It's using USB-passthrough, and yes, the radio does support it and many others do too.
You may search the radio google, and you'd find a feature called 'hand mode.' This allows Google play etc to pass audio.
You are right, I should have done the research. However your head unit is using AOA and not USB audio in the traditional sense, it's allowing the head unit to be a human interface device and not (just) a DAC .
Your Kenwood head unit technically requires the use of the Kenwood Music Play app however my pioneer also states it needs an app but I don't use one. I did have to cycle my device into midi mode once before it worked you could give that a try or maybe your head unit needs a software update? Are you using the cable that came with the Pixel?
Thank you tho, I never would have fully understood AOA if you hadn't suggested that I look it up.
Last firmware update was last year, the nexus 6p wasn't on the supported device.
It did try to connect to an accessory, which I thought was strange
mine did too the first time, which is why i shuffled thru the usb modes. When i was reading about AOA i found out that its now depreciated, so there wont be anymore updates for it.
k.s.deviate said:
mine did too the first time, which is why i shuffled thru the usb modes. When i was reading about AOA i found out that its now depreciated, so there wont be anymore updates for it.
Click to expand...
Click to collapse
I'm sure AOA2 is still being worked upon, no?
Just an update: popped into a car audio Centre, and tried roughly 40 headunits. Didn't work on any of them. I'm almost positive this is a 7.1 issue
I believe you need to change the way it connects to your USB port in the car. I changed it from charging to reading files. Pull down the notification bar and click on the USB notification to select how it connects to the car. Worked for me.
pixel-painter said:
I believe you need to change the way it connects to your USB port in the car. I changed it from charging to reading files. Pull down the notification bar and click on the USB notification to select how it connects to the car. Worked for me.
Click to expand...
Click to collapse
I'm guessing your using MTP connection, which does work. However, after trying 2 pixels, and a Pixel XL - as well as having someone in America try with a similar head unit - it's definitely a pixel bug / issue.
To reiterate, MTP works fine - but using Audio out VIA USB does NOT
Suicidal Chicken said:
I'm guessing your using MTP connection, which does work. However, after trying 2 pixels, and a Pixel XL - as well as having someone in America try with a similar head unit - it's definitely a pixel bug / issue.
To reiterate, MTP works fine - but using Audio out VIA USB does NOT
Click to expand...
Click to collapse
While I understand what you mean by MPT, you might be confusing some people since it isn't listed as such on my phone and probably for others too. It is listed as "Transfer files" as in my screenshot below. Perhaps it is a brand specific issue related to proprietary software, or a mod or app installed. I bought mine directly from Google and have never had this issue once File transfer is selected, but my pixel seems to default to "Charge this device" every time even if I change the settings.
{
"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"
}
pixel-painter said:
While I understand what you mean by MPT, you might be confusing some people since it isn't listed as such on my phone and probably for others too. It is listed as "Transfer files" as in my screenshot below. Perhaps it is a brand specific issue related to proprietary software, or a mod or app installed. I bought mine directly from Google and have never had this issue once File transfer is selected, but my pixel seems to default to "Charge this device" every time even if I change the settings.
Click to expand...
Click to collapse
My phones not rooted, it's stock. Your image is relating to MTP / file transfer. My issue is related to Audio Out via USB using the AOA (Android Open Accessory) protocol.
Suicidal Chicken said:
My phones not rooted, it's stock. Your image is relating to MTP / file transfer. My issue is related to Audio Out via USB using the AOA (Android Open Accessory) protocol.
Click to expand...
Click to collapse
What is the drawback of starting using the method that works and stopping using the method that doesn't work?
A moment of nostalgic want for the old days?
If AOA is depreciated, 7.1 has forgotten it so it is not technically a bug but unsupported.
I get it is annoying if you're losing features to use the current working method of MTP / file transfer. Is that the case?
If AOA is depreciated, you may need to adapt to continue.
Sent from my sailfish using XDA Labs
nednednerb said:
What is the drawback of starting using the method that works and stopping using the method that doesn't work?
A moment of nostalgic want for the old days?
If AOA is depreciated, 7.1 has forgotten it so it is not technically a bug but unsupported.
I get it is annoying if you're losing features to use the current working method of MTP / file transfer. Is that the case?
If AOA is depreciated, you may need to adapt to continue.
Click to expand...
Click to collapse
It works on the 6p with 7.1 Dev preview.
Google's guidelines for nougat were that devices MUST be compatible with AOA. It's a bug.
Having this issue too and it sucks. I had a Nexus 5 and a Pioneer MVH-X380BT and it sounded great with the usb cable. Now with my Pixel my deck says error-19 every time I plug it in. I've tried going into the dev settings and changing the usb configuration and the app SoundAbout and it didn't make a difference. It was a pretty big difference in sound quality on the Nexus 5 between usb and bt and it's lame that the Pixel doesn't have the same audio support.
It would be amazing if Google backported aoa or someone made a mod to add it. That would be worth rootingng my phone for.
I also tried to connect my phone through USB, but it's not successful. Why google didn't provide an easy solution for such a long time?
I have a Pixel 2 and cannot get Audio out of phone to AOA device.
https://source.android.com/compatibility/android-cdd.pdf
In documentation it reads:
SHOULD NOT implement AOAv2 audio documented in the Android Open Accessory
Protocol 2.0 documentation. AOAv2 audio is deprecated as of Android version 8.0
(API
level 26). (page 102)
WHY must you do this Google!!!! :crying::crying::crying:

Categories

Resources