[Q] Adding a USB Ethernet adapter kernel module - Android Software/Hacking General [Developers Only]

I'm currently working to add support for the DM9620 USB network adapter to the Android 4 kernel, specifically for the Samsung GT-I9100 (Galaxy S2) running CyanogenMod 9.
The driver can be found here: code.google.com/p/dm962x/source/browse/dm9620.c
I have added and compiled the driver into the kernel, along with enabling USB host mode. However, plugging the adapter into the phone does not cause a new device to appear (both `lsusb` and `ip link` show nothing new, and dmesg has no relevant messages).
I'm guessing that I didn't actually enable USB host mode correctly. Or maybe it's something else. But I don't really know enough to debug this on my own. Any insight provided would be very helpful.

Hey, go into the General section of Samsung Galaxy Nexus, there is a thread for "aircrack-ng", the original post show a couple of links + on page 2 there is another post from the same guy explaining on how to compile for Android.
Hope it could help.
Sent from my Galaxy Nexus using xda premium

This turned out to be a pretty stupid hardware issue, unrelated to the kernel or the driver. I was lead to believe that the adapter was a 5 pin USB OTG cable, when it was actually a standard 4 pin. A quick hardware hack later and the device is recognized just fine.

Mind making a tutorial of this? Im interested in testing it out myself. Also, can you tell me how to add support for the Galaxy S III? Id be happy to, myself, but I dont know how right now. Thanks

CJJohnson said:
Mind making a tutorial of this? Im interested in testing it out myself. Also, can you tell me how to add support for the Galaxy S III? Id be happy to, myself, but I dont know how right now. Thanks
Click to expand...
Click to collapse
I second the request for a tutorial of how to do this. Thanks!

Related

3G Usb modem on the Xoom?

Hello
I know this has been asked before, but no conclusion was presented.
I have an Huawei E173 3G usb modem i primarily use for my car stereo(Parrot Asteroid, this runs Android 1.5/1.6 this has support for a lot of usb dongles)
I want to to use this with my Wifi Xoom via an usb OTG cable.
As of now i doesn't work.
This because the lack of drivers and APN settings on the Xoom.
I have read the thread over at the XDA acer iconica tab forum about this, and they got it to work. ( http://forum.xda-developers.com/showthread.php?p=14603952 )
The android drivers for a lot of usb dongles exist, but how to get them to work on the xoom?
Tiamat kernel has the needed modules (usb_wwan.ko), so, you need just the script to set up connection. You can try with this one, maybe you need to change something...
http://forum.xda-developers.com/showthread.php?t=1058846
I dont have, the otg cable, but as soon as i can get one i'm trying to get this work...
I'll check it out.
For the moment i don't have an OTG cable either. Waiting for a new one from ebay.
lhurtado said:
Tiamat kernel has the needed modules (usb_wwan.ko), so, you need just the script to set up connection. You can try with this one, maybe you need to change something...
http://forum.xda-developers.com/showthread.php?t=1058846
I dont have, the otg cable, but as soon as i can get one i'm trying to get this work...
Click to expand...
Click to collapse
Hi, I have got a Tiamat 2.1 rom, and I have a uk wifi only version XOOM. However, I can not find any setting about APN. How can I make a 3G USB model work on my wifi only XOOM?
Thank you
I'm totally curious too. I have a WIFI XOOM and I just got a nice USB HSPA+ stick from Videotron and I wanna see if I can get it to work via OTG - I checked OS Monitor (Tiamat ROM) and it seems the stick is detected, with a dead IP 169.254 etc...
so I just need a dialer! Any news at all?
Thanks in advance!
any solution yet?i have tried everything possible, bricked my device couple of time, its teasing me :'(
I also wanna to try. But two problems here:
(1)"/etc/ppp/peers" is Read Only file system, so it is impossible to put dialing scripts there.
(2)I don't have proper drivers.
Can anyone help?
About the question (1) above, I've got done with it from http://forum.xda-developers.com/showthread.php?t=1341585.
Any solution with dialers yet? Really need this to work

USB OTG

Has anyone been able to hook up a flash drive yet with USB OTG? Been waiting for my cable to arrive to test out. Just wondering since I didn't order a powered hub with it, since half the forums I have searched require it to work. If anyone has had any luck please let me know.
Sent from my HTC One S
Simco80 said:
Has anyone been able to hook up a flash drive yet with USB OTG? Been waiting for my cable to arrive to test out. Just wondering since I didn't order a powered hub with it, since half the forums I have searched require it to work. If anyone has had any luck please let me know.
Sent from my HTC One S
Click to expand...
Click to collapse
Nevermind figured it out myself. Need the powered hub.
On another note I am starting to really hate Samsung after seeing this. SamSung
Yep, we have a guide posted in the General section. http://forum.xda-developers.com/showthread.php?t=1629134
official RUU is neccessary?
Will there ever be a chance that REAL usb otg is enabled? Which means without connecting external power? (I dont consider using an y cable and then externally powering usb to be "on the go")
While most modern phones made by samsung and some other manufacturers enable it by default but htc doesn't is beyond me.
soulcrusher said:
Will there ever be a chance that REAL usb otg is enabled? Which means without connecting external power?
Click to expand...
Click to collapse
I really want this too... i could control my dslr. and with power connection needed, it gets so worthless, because there isnt always a socket around...
Apparently Qualcomm does but HTC removes that feature.
in the leaked one x jb update you can use usb otg without external power, hopefully they will do the same for our phone.

USB Host on ICS/Jelly Bean

Can anyone help me out? Everything I've read up on seems to indicate that only 2.2 and 2.3 usb host kernels exist. I need a working kernel (preferably BravoC) because my broken digitizer is a pain to the wallet to replace, and using a mouse and keyboard would be just as fine. Thanks.
Since you are asking a question, please post in Q/A section..
Greetz
dwegiel said:
Can anyone help me out? Everything I've read up on seems to indicate that only 2.2 and 2.3 usb host kernels exist. I need a working kernel (preferably BravoC) because my broken digitizer is a pain to the wallet to replace, and using a mouse and keyboard would be just as fine. Thanks.
Click to expand...
Click to collapse
http://www.ebay.co.uk/itm/HTC-Desire-G7-A8181-Genuine-Fascia-Touch-Screen-Lens-Digitizer-Glass-Housing-UK-/220871890701?pt=UK_Mobiles_Accessories_RL&hash=item336cfd970d
VERY CHEAP DIGITIZERS next time please use Q/A thanks
Sorry I assumed the qa section is for general qa. Though that in development section some dev would help me right away or give me the facts. Also my budget for this phone is minimal as I have no PayPal funds and a galaxy s as replacement. I was planning to make a cloud print server out of this phone.
I am going to undertake this challenge on the Eternity kernel, provided that it will run on my HTC Desire CDMA bravoc.
Appears like by default the fork causes my device to hang at the HTC logo... no dice. Will mod the support package.
Still no go, turns out NO usb host kernel exists for BravoC... back to LM I go to try and mod cm-kernel or possibly tiamat.

Kali for Magisk question

Hey folks,
I was just wondering if any kernel exists for the Pixel 2 that allows packet injection with a compatible WiFi dongle. I had one for my Nexus 6. Just can't find one for this phone. Thanks!
After more research I realize how stupid that post sounded. I now realize I just need to figure out how to rebuild my kernel with the TP-LINK WN722N V1. Drivers baked in.
The lsusb command in Kali shows the adaptor when it's connected to the phone via OTG, so I assume this is all I have to do now.
I found a really great thread that explains how to do it for an older CyanogenMod kernel and a different WiFi chipset.
https://forum.xda-developers.com/showthread.php?t=2338179
On my next day off I'll play around with it.
If anyone has any input or advice I'd really appreciate it.
I may be a noob but I love to learn.
Edit:

[ROM][N920V][5.1.1][ENG Bootloaders] NOBLE ROM AOJ3 V1.0[June 17, 2019]

Welcome to the NOBLE ROM!
Disclaimer1: Your warranty is now void!
I am not responsible if you brick your phone. or kill your sd card!
I cannot be held responsible for smoke, fire, water, or other natural disasters.
So please READ the entire OP!
Disclaimer2: Always make a backup first!! Flash at your own risk!
Clean install is always recommended, but at minimum make sure you wipe!
ROM FEATURES
- Based on N920VVRU2AOJ3
- Fixed to work over combo firmware..
- Rooted.
- BusyBox.
Installation:
1. Download file and push to sdcard.
2. Reboot to Safestrap recovery.
4. Flash it.
5. Wipe data.
6. Reboot.
Downloads:
Android File Host
Thanks to:
@SuperR. for SuperR's Kitchen
@Chainfire For SuperSU.
@Stericson For BusyBox.
Samsung for the locked bootloader.
me.
Root your device
If you are on Rev 1 or 2 bootloader and you are on 5.1.1.
- Go to http://mobilego.wondershare.com/
- Install it on your PC.
- Press on One-Click Root.
- Follow instruction.
If you are on Rev 3 bootloader
Flash Cobo firmware then folow the previous instructions.
Long story short: can we flash normal system.img over ENG bootloaders? I got "SYSTEM REV. CHECK FAIL DEVICE:1, BINARY:0" after reboot, so instead we can flash it as flashable zip. yes this work but we end up with bootloop. so what to do to pass this situation.
digging in ENG boot.img ramdisk I can see "export LD_PRELOAD libsigchain.so:liblptcp.so" and system/lib/liblptcp.so nor system/lib64/liblptcp.so is not there in stock 5.1.1, So take them from ENG firmware you will get fully working system over combo bootloader.
I knew there was a way! Thanks for sharing this information. I've been saying it for years, there was a way that did involve safestrap and booting a normal system over the factory binary firmware, I just didn't know where to go next. My hat is off to you, as this can open many doors.
Delgoth said:
I knew there was a way! Thanks for sharing this information. I've been saying it for years, there was a way that did involve safestrap and booting a normal system over the factory binary firmware, I just didn't know where to go next. My hat is off to you, as this can open many doors.
Click to expand...
Click to collapse
Thanks, hope it work over N920A.
afaneh92 said:
Thanks, hope it work over N920A.
Click to expand...
Click to collapse
So is what you had to do was copy "liblptcp.so" from the combination /system/lib folder and paste it into the stock system lib folder?
Did you have to copy "libsigchain.so" from combination to stock as well? All you have to do was put them in the same spot on the stock system as they were in the combination system? I wonder how device specific it is going to be. I'm looking at multiple devices pulling the common denominators.
Where did you did you find "export LD_PRELOAD" exactly?
Please and thanks.
Delgoth said:
So is what you had to do was copy "liblptcp.so" from the combination /system/lib folder and paste it into the stock system lib folder?
Did you have to copy "libsigchain.so" from combination to stock as well? All you have to do was put them in the same spot on the stock system as they were in the combination system? I wonder how device specific it is going to be. I'm looking at multiple devices pulling the common denominators.
Where did you did you find "export LD_PRELOAD" exactly?
Please and thanks.
Click to expand...
Click to collapse
libsigchain.so is there in stock 5.1.1
I think the "export LD_PRELOAD" is in init.rc
Hey, I got safestrap and this ROM flashed. It actually works pretty slick. Is there any hope of further ROM development for safestrap?
Hello. Is it possible to make rom like this, which will work over combo firmware for N920C ?
Myneamc said:
Hello. Is it possible to make rom like this, which will work over combo firmware for N920C ?
Click to expand...
Click to collapse
Why would you want to do that? The c can be fully unlocked and has ROMs up to 7.0 at least
Reverse-anastomosis said:
Hey, I got safestrap and this ROM flashed. It actually works pretty slick. Is there any hope of further ROM development for safestrap?
Click to expand...
Click to collapse
Not sure if you want to flash any other 5.1.1 roms from other note 5 or s6 threads, just push the files mentioned in the third post.
Or give me link to any compatible rom and will test it.
afaneh92 said:
Not sure if you want to flash any other 5.1.1 roms from other note 5 or s6 threads, just push the files mentioned in the third post.
Or give me link to any compatible rom and will test it.
Click to expand...
Click to collapse
Guys it's probably a stupid question and I'm pretty sure it's not possible but figured it can't hurt to double check. My USB port on my N920A is toast, luckily it has wireless charging capabilities but that doesn't help me with adb.. or am I wrong? Is there a way I can use oden via WiFi adb (or any way at all) w out the USB connector?
PS: @Delgoth, I'm sorry I ducked out on you like I did when u were trying to help. I thank you and appreciate and admire you and all the contributions you have made in the attempts to root n920a (even when you didn't own the device anymore) and have pretty much read all your available literature out there about this (which was impressive imo). Haha. Just sayin..
bonzeno85 said:
Guys it's probably a stupid question and I'm pretty sure it's not possible but figured it can't hurt to double check. My USB port on my N920A is toast, luckily it has wireless charging capabilities but that doesn't help me with adb.. or am I wrong? Is there a way I can use oden via WiFi adb (or any way at all) w out the USB connector?
PS: @Delgoth, I'm sorry I ducked out on you like I did when u were trying to help. I thank you and appreciate and admire you and all the contributions you have made in the attempts to root n920a (even when you didn't own the device anymore) and have pretty much read all your available literature out there about this (which was impressive imo). Haha. Just sayin..
Click to expand...
Click to collapse
I think no. If you are rooted use flashfire or fix your usb port.
bonzeno85 said:
Guys it's probably a stupid question and I'm pretty sure it's not possible but figured it can't hurt to double check. My USB port on my N920A is toast, luckily it has wireless charging capabilities but that doesn't help me with adb.. or am I wrong? Is there a way I can use oden via WiFi adb (or any way at all) w out the USB connector?
PS: @Delgoth, I'm sorry I ducked out on you like I did when u were trying to help. I thank you and appreciate and admire you and all the contributions you have made in the attempts to root n920a (even when you didn't own the device anymore) and have pretty much read all your available literature out there about this (which was impressive imo). Haha. Just sayin..
Click to expand...
Click to collapse
Yeah Flashfire would work well, or Safestrap would be the best option really. But I just had the USB issue with my Note8 last night actually.
Are you sure it doesn't work, or is it intermittent? "USB DEVICE NOT RECOGNIZED" because of a bad device descriptor? What happened to me was the tongue/pin in the device port was slight bent, but plugging in the cord slowly and in the direction that would straighten out the pin made the ODIN Connection work again.
In my case it wasn't the PC port, or the cable (it was still kinda beat up though), or my drivers. I just need to plug the cord in a certain way. I was in the same boat as you last night trying to flash my N950U.
What I explained fixed my problem.
P.S. EDIT: I'm still trying to flesh out those two threads. But I haven't gotten it written well enough to post yet. I'm trying to have more done before I post this time haha. I'm learning more now, but haven't quite polished the words enough yet to reorganize the Main Posts. Because I feel like with the GHR Console, we might have enough root on 6.0.1 even to use WiFi ADB through Android Studio or something.
The Great Thing about the console is, it still works on 5.1 too, and on 5.1 we do have full root. So, the console technically has even more power, that's why we needed Safestrap. Realistically using a rooted 5.1 build on Rev 4 should still be exploitable and better able to debug improvements to The Console. Having Root Access gives you the details specifically why the Console couldn't carry out the command. So we could tweak the code for 6.0.1 operations based on the results from 5.1
The methods used on the Note 7 and Note 8 are very very similar to what we'd need on the Note 5 variants. Unless we can port this method here to the N920A Firmware. The same kind of System Root because we cannot patch the boot.img
P.S.S: I've seen the line he refers to before. But I was on a Revision 3 Combo BL/CP Build using the revision 1 OGG AP/CSC build later on. I've seen the reference to LD_PRELOAD. I've only ever looked at the Rev 4 and 5 firmware from the PC OS. My device never went past revision 3 bl's on the N920A. The N920V's never even made it as far as AT&T did. IDK why either.
@Delgoth, do you still have a note 5? Are you still interested in the device? I have a n920v that I have been playing with. I just bought stuff to try to get an sboot UART console. I have no idea what I will do when/if I get there. I just can't find that anyone has tried it on the note5. Thoughts?
Reverse-anastomosis said:
@Delgoth, do you still have a note 5? Are you still interested in the device? I have a n920v that I have been playing with. I just bought stuff to try to get an sboot UART console. I have no idea what I will do when/if I get there. I just can't find that anyone has tried it on the note5. Thoughts?
Click to expand...
Click to collapse
REALLY!? Please talk to me when you get that hardware. I mean yes, I'm still highly interested in the Exynos7420 board. It's my favorite piece of hardware to come out of Samsung still.
I will help in any way I can. Just hit me up.
I've read about UART connectivity on that platform. It might be a little difficult but I got some schematics still I think that should still be, at the least, partially applicable.
I did a lot of tests on the board a few years back and had more than one device with that platform. Realistically it's what I know the most.
I don't have the device anymore but I've been more and more wanting to get a used one in decent working condition. I still have my data & knowledge. Hit me up.
Delgoth said:
REALLY!? Please talk to me when you get that hardware. I mean yes, I'm still highly interested in the Exynos7420 board. It's my favorite piece of hardware to come out of Samsung still.
I will help in any way I can. Just hit me up.
I've read about UART connectivity on that platform. It might be a little difficult but I got some schematics still I think that should still be, at the least, partially applicable.
I did a lot of tests on the board a few years back and had more than one device with that platform. Realistically it's what I know the most.
I don't have the device anymore but I've been more and more wanting to get a used one in decent working condition. I still have my data & knowledge. Hit me up.
Click to expand...
Click to collapse
OK! I built my UART jig tonight. It seems to be functional. I get some output when I connect in forced upload mode. I am still waiting on the resistor. There are so many modes available for the s7 I decided to get a variable resistor and see what we can get in to. I could not find any documentation of anyone exploring UART on these devices. I have read a lot of stuff, but nothing specific to the note 5. I have an n920V and a g925v. I plan on trying 620k ohm resistor to get the UART console, and just see what is going on in there. I read this article, and scoured the net for part 2, and it seems that it doesn't exist....hhhmmmm. If you have any info specific to UART on this platform I'd love it. Otherwise I am just going to see what happens. I am totally over my head here, but the devices were free and I am curious. I am not a programmer, just an android enthusiast. To be honest, I wouldn't probably even know if I find something exploitable. I just didn't see any discussion about UART when these devices were hot, so I figure it is worth exploring. Seeing the rediscovery of an open console on the s7 gave me hope.
Reverse-anastomosis said:
OK! I built my UART jig tonight. It seems to be functional. I get some output when I connect in forced upload mode. I am still waiting on the resistor. There are so many modes available for the s7 I decided to get a variable resistor and see what we can get in to. I could not find any documentation of anyone exploring UART on these devices. I have read a lot of stuff, but nothing specific to the note 5. I have an n920V and a g925v. I plan on trying 620k ohm resistor to get the UART console, and just see what is going on in there. I read this article, and scoured the net for part 2, and it seems that it doesn't exist....hhhmmmm. If you have any info specific to UART on this platform I'd love it. Otherwise I am just going to see what happens. I am totally over my head here, but the devices were free and I am curious. I am not a programmer, just an android enthusiast. To be honest, I wouldn't probably even know if I find something exploitable. I just didn't see any discussion about UART when these devices were hot, so I figure it is worth exploring. Seeing the rediscovery of an open console on the s7 gave me hope.
Click to expand...
Click to collapse
Most of what I've read applied to the "F" variant of the S6. Having specific resistance values is a big key, as different resistances allows different communications. That's why the Anyway Jig does what it does, it has variable resistances. I will see about going back to some old bookmarks if I can find them then, I didn't expect it to be so soon haha.
People were trying to say before that they disabled UART comms on the Exynos7420 chip at the hardware level. But I don't think they really did all the way. Most people are weirded out that the Exynos7420 still has the QC 9008 emergency mode still because of their modems. The S6 line uses QC modems that I've read were installed to the board first before Samsung applied the rest of the firmware.
But those devices wouldn't be able to boot to 9008 mode if there was not QC hardware I believe.
The S6, S6 Edge, and Note 5 variants all use the same base chipset and each variant tends to use its own modem chip. It wasn't until the S7 that they started using more universal firmware. But as far as the G925 and N920 goes, they should have different modems for each carrier basically. But the US S7 devices used QC SoC's completely. They didn't use Exynos Processors for the US models like they did with the S6 line.
But mind you, the Exynos7420 saw some of the highest number of exploits in one year than almost all years previous together. Something like almost 700 issues by the time the dirtycow craze was over. It was a huge spike.
The biggest hurdle for the G925v is going to be its SELinux policy. Even project Zero stated that Verizon did do a decent job at setting that policy up. It still wasn't perfect, just required a very tailored approach.
We will have to get more familiar with AT commands for sure. Remember the Radio group has a lot power to it. There should be some documentation on the G925F floating around unless someone got it taken down. When I first started posting files and such related to the S6 Edge there were a few people that reported my G925v folder in Google drive and got a few of my things deleted.
So let me look into it again and we will talk some more this weekend. At one point I did have the schematics for the G925F. That should help if I can find that, as the Note 5 and the S6 Edge used the same code base compared to the S6 flat.
Delgoth said:
Yeah Flashfire would work well, or Safestrap would be the best option really. But I just had the USB issue with my Note8 last night actually.
Are you sure it doesn't work, or is it intermittent? "USB DEVICE NOT RECOGNIZED" because of a bad device descriptor? What happened to me was the tongue/pin in the device port was slight bent, but plugging in the cord slowly and in the direction that would straighten out the pin made the ODIN Connection work again.
In my case it wasn't the PC port, or the cable (it was still kinda beat up though), or my drivers. I just need to plug the cord in a certain way. I was in the same boat as you last night trying to flash my N950U.
What I explained fixed my problem.
P.S. EDIT: I'm still trying to flesh out those two threads. But I haven't gotten it written well enough to post yet. I'm trying to have more done before I post this time haha. I'm learning more now, but haven't quite polished the words enough yet to reorganize the Main Posts. Because I feel like with the GHR Console, we might have enough root on 6.0.1 even to use WiFi ADB through Android Studio or something.
The Great Thing about the console is, it still works on 5.1 too, and on 5.1 we do have full root. So, the console technically has even more power, that's why we needed Safestrap. Realistically using a rooted 5.1 build on Rev 4 should still be exploitable and better able to debug improvements to The Console. Having Root Access gives you the details specifically why the Console couldn't carry out the command. So we could tweak the code for 6.0.1 operations based on the results from 5.1
The methods used on the Note 7 and Note 8 are very very similar to what we'd need on the Note 5 variants. Unless we can port this method here to the N920A Firmware. The same kind of System Root because we cannot patch the boot.img
P.S.S: I've seen the line he refers to before. But I was on a Revision 3 Combo BL/CP Build using the revision 1 OGG AP/CSC build later on. I've seen the reference to LD_PRELOAD. I've only ever looked at the Rev 4 and 5 firmware from the PC OS. My device never went past revision 3 bl's on the N920A. The N920V's never even made it as far as AT&T did. IDK why either.
Click to expand...
Click to collapse
This very thing happened on my note 5 n920a. i was stuck out, no adb or mtp all week. USB not recognized, Bad device descriptor, after flashing the safestrap. Odin picking up my device was my only choice. so i flashed back to the rev 4 MM. I tried diff PC's along with diff OS's and diff cords. I just got it to pick up adm and mtp in linux literally just now as i was reading through this. I been creeping around looking for rev 4 stuff. this is actually my first post lmao. But for real, good work guys, i admire whats going on here. Im totally ok to guinea pig my note 5 btw. its what ive been doing the passed couple weeks on free time.
Delgoth said:
Most of what I've read applied to the "F" variant of the S6. Having specific resistance values is a big key, as different resistances allows different communications. That's why the Anyway Jig does what it does, it has variable resistances. I will see about going back to some old bookmarks if I can find them then, I didn't expect it to be so soon haha.
Click to expand...
Click to collapse
Ok, so parts have been a pain for my jig-finally got it up and running. at 619/620K ohm this is what I get for output. I do not know a whole lot about mincom, or serial communication in general. When I have some more time I will read through it, and see what my next step should be. If you have any input based on what you see here let me know. I tried finding resistance values based on the MUIC driver(max77833) as outlined here but I can't find the values. I can find all of the different modes, but not the values associated with them. I'll keep posting what I find, and thanks for your input.

Categories

Resources