WN722N v2/v3 driver for Nethunter - OnePlus 7 & 7 Pro Cross Device Development

Storytime ;D
So many people asking for WN722N v2/v3 in the web including myself. I actually bought one extra for nethunter. So because the driver is not included from stock, i compiled it myself.
Here is the driver src link: https://github.com/aircrack-ng/rtl8188eus/
(Compiled driver uploaded below)
Requirements
4.14.83-Re4son-OOS Kernel (is included in 2020.1 Nethunter package) (https://images.offensive-security.com/nethunter/nethunter-oneplus7-oos-pie-kalifs-full-2020.1.zip)
onto OOS 9.5.8 (https://forum.xda-developers.com/oneplus-7/how-to/oneplus-7-repo-oxygen-os-builds-t3937152)
-> I recommend using Pie, since i could not get Q working with Nethunter.
Restore, Unbrick, Downgrade, Upgrade
MSM tool (only OOS): https://forum.xda-developers.com/oneplus-7/how-to/op7-unbrick-tool-to-restore-device-to-t3954325
Repo of OOS Builds: https://forum.xda-developers.com/oneplus-7/how-to/oneplus-7-repo-oxygen-os-builds-t3937152
Downgrade package: https://www.getdroidtips.com/how-to...pro/#Download_OnePlus_77_Pro_rollback_package
Warning
Use it at your own risk. This was my first time compiling anything like this... I am not responsible for any kind of damage. Only tested on GM1903!
Installation
Actually i don't know... normally it would get loaded into /system/lib/modules but this folder does not exist for OP7?
I ended up just putting into /storage/emulated/0/ and then loading it with
insmod /storage/emulated/0/8188eu.ko
(/unload) rmmod /storage/emulated/0/8188eu.ko
Activating monitor mode:
airmon check kill
ip link set wlan1 down
iw dev wlan1 set type monitor
If error "No such device -19" simply unload and reload the driver.
Some screenshots (I have a v3)

This is awesome and your work is much appreciated! the guide was clear but I didn't really get the installation part. Could you please clear it up for me, I'm using the global oneplus 7 pro 12 gb ram. do I just place the file into /system/lib/modules or do I have to run an additional command?

danielqf45 said:
This is awesome and your work is much appreciated! the guide was clear but I didn't really get the installation part. Could you please clear it up for me, I'm using the global oneplus 7 pro 12 gb ram. do I just place the file into /system/lib/modules or do I have to run an additional command?
Click to expand...
Click to collapse
In my research i found out, that most are putting it into /system/lib/modules. However this folder does not exist on OP7. I've ended up putting it into /storage/emulated/0/ and then loading the driver with the command already descriped in the tutorial.

If I do that, and have the adapter connected my phone reboots.

What does it do?

Related

[GUIDE] N00bs Guide to Upgrading Webtop for Lapdocks

I am by no means an expert, i just dove into this project 4 days ago, and since then, I've had to reformat my SD card about 8 times before I figured out how to get it stable. But now I have it running pretty stable, there are some issues still, but it at least runs linux pretty well. I'm mainly posting this because this would have saved me a lot of digging 4 days ago, and I figured I would help out any n00bs that just got a lapdock and just started playing with webtop.
*Disclaimer* I am not an expert, if you have a problem with any of these steps, please do not post them here, but in their respective threads. I take no credit for developing any of this, im just posting a list of steps from multiple sources. Also, if you break something, its not my fault*
The Guide
By the end of this guide, you will have a more functional linux as your webtop, with the XFCE4 interface. This uses webtop2sd, so if you break anything, you should be able to start over.
You will need a rooted Atrix, a lapdock (or other external device for using webtop on), and a microSD card, I suggest 2GB or bigger. I have a 32GB PNY class 10 card, for example.
1. Lets format/partition the SD card. Sogarth explains here how to do that. I highly suggest NOT doing this on your phone,and use a PC instead.
http://forum.xda-developers.com/showpost.php?p=15109152&postcount=5
2. Here, he explains how to install it after you partition your SD card. The app you need is in the bottom of the first post.
http://forum.xda-developers.com/showpost.php?p=15109140&postcount=4
3. Now plug it in to your lapdock, and it should boot up into the new webtop. You should see 2 icons in the middle, the awn-dock config tool, and the webtop config tool. We just need to focus on the latter one. Open that up, click on Administration on the left,and click on Install by lxterminal. Try clicking on the terminal icon on the dock, if it comes up, you are gold. If it acts funky, like your screen goes black but doesn't open the terminal, open up the webtop config tool again, and the button to install it should be lit up again. You know its installed if you click install,close out the config tool, and reopen it to see Install grayed out.
4. If all goes well, you should be at a terminal. The first thing we want to do, is fix a really annoying and OS breaking bug, regarding the tzdata package. It seems to be corrupted, so we want to make sure it doesn't get in the way of installing other packages. This issue was the bane of my existence for 3 days.
following these steps, we will fix it
http://forum.xda-developers.com/showpost.php?p=18465066&postcount=3
type this into the terminal to bring up the said file so you can edit it
Code:
sudo leafpad /var/lib/dpkg/info/tzdata.postinst
then put exit 0 on the 3rd empty line
I would reboot your phone after doing this, just for good measure
5. When you get back into the webtop, lets run the Webtop Scripts, the files and instructions are here for that. This will fix many broken dependencies. Arvati did a great job with these fixes!
http://forum.xda-developers.com/showthread.php?t=1192488
just put that file in your downloads folder, then run the commands from that first code box, and I just said yes everytime it asked you what you wanted to do. I would reboot your phone again after this.
6. Now lets start installing stuff! Lets start with synaptic, which works a lot better if you install via command line instead of the webtop config tool.
So run this from the terminal:
Code:
sudo aptitude install synaptic
7. Open up synaptic by typing 'sudo synaptic' into the terminal. Lets install XFCE4 now, just search for that there,and install the XFCE4 package, it should install all of the other required packages to run the new interface.
8. Once it is installed,we need to disable the webtop interface,and enable xfce4. I referenced this thread to do that:
http://forum.xda-developers.com/showthread.php?t=1054213
Type this into the terminal to edit the right file
Code:
sudo leafpad /osh/usr/local/bin/start-oshwt-2.sh
put a # in front of
sfalv -i "awm-autostart"
sfalv -i "webtop-wallpaper"
so it looks like
#sfalv -i "awm-autostart"
#sfalv -i "webtop-wallpaper"
then add these 2 lines
sfalv -i "xfce4-session"
sfalv -i "xfce4-panel"
save it then reboot your phone. Hopefully you should be in XFCE4 now!
OPTIONAL:
*To fix an issue with mounting USB storage devices:
I had the same problem, got it to work by adding this to /etc/PolicyKit/PolicyKit.conf
Code:
<config version="0.1">
<match action="org.freedesktop.hal.storage.mount-removable">
<match user="myaccountnamehere">
<return result="yes"/>
</match>
</match>
</config>
Click to expand...
Click to collapse
http://www.linuxquestions.org/quest...b-storages-debian-squeeze-723251/#post3537149
* To Fix mounting Windows network shares
Chimpdaddy has posted a way to get Samba file shares to work, this requires having a custom kernel though:
http://forum.xda-developers.com/showpost.php?p=22018703&postcount=67
Chimpdaddy said:
Firstly you need to have a kernal, like Faux's, that supports CIFS.
Then install Samba4, via synaptic package manager if you like.
Probably an idea to reboot.
Then create a folder (using terminal) where you want yr share, 'sudo mkdir /media/SHARE' for eg..
then run this;
sudo mount -t cifs -o username=guest //YOURSHAREIP/SHARE /media/SHARE
if you get no errors yr golden
If you want it to mount on startup edit /etc/fstab to include
//YOURSHAREIP/SHARE /media/SHARE cifs username=guest,_netdev 0 0
check this with 'mount -a'
That should do you.
Click to expand...
Click to collapse
OR
You could use an app like ESFileExplorer on your phone to drag and drop files, this is what I have been using,and it works pretty well for both direct windows shares and FTP. The Mobile View is great for having a window open for secondary tasks like this.
EXPERIMENTAL:
This can be buggy,so use at your own risk!
To install chromium browser, follow these steps. This is said to have better performance than the built in firefox, but for me, it crashed a lot, I went back to firefox
http://forum.xda-developers.com/showthread.php?t=1374567
ISSUES STILL PENDING:
*currently no major issues*
LIST OF SUGGESTED APPS:
OpenOffice.org
Qalculator
XChat IRC
This looks good. I just got my lapdock on Thursday and I have been putting togther all of the Docs to get it the way I want, but this is pretty much the results I wanted. I will try your instructions and get back with you.
Thanks.
Which ROM are you running on?
stock ROM.....
Thanks for the guide.
There is one link that appears to be broken though,
On step 5, the thread goes nowhere. That's where I'm stuck right now
my bad,fixed
i actually managed to do all this on my own, but just recently came into a unexpected problem. i'm kind of a linux noob, and it seems like the file manager button on xfce4-panel doesn't lead to the stock file manager i was using before (doesn't lead to anything), does anyone have any suggestions for a good file manager to replace it with?
Thanks for the fix, I've completed all steps and it was working for about an hour. Until I installed chromium.
I have a weird problem where the lapdock doesn't detect webtop and says no hdmi input detected. Not sure if you know anything about that, but just wanted to let you guys know (might be a defect on my lapdock). I'm trying to figure out a fix for that now.
I would suggest starting over if that happened,sounds like something broke
as for an XFCE4 file manager, it should install Thunar by default
teeth_03 said:
I would suggest starting over if that happened,sounds like something broke
as for an XFCE4 file manager, it should install Thunar by default
Click to expand...
Click to collapse
sudo apt-get thunar fixed the problem for me, thanks though
followed your steps and it works great ,i've been messing with this for over a week trying to get this to work ,that ztdata bug fix did the job.. THANK YOU.....
toe451 said:
followed your steps and it works great ,i've been messing with this for over a week trying to get this to work ,that ztdata bug fix did the job.. THANK YOU.....
Click to expand...
Click to collapse
dont thank me, thank the guy who figured out how to fix it
webtop2sd app crashes on first run...any ideas?
Here's the answer
http://forum.xda-developers.com/showpost.php?p=19993891&postcount=671
bigworm50 said:
webtop2sd app crashes on first run...any ideas?
Click to expand...
Click to collapse
To the point of installing XFCE4, and synaptic just sits on preparing packages forever... I let it sit for 30+ minutes last night and going on almost 60 minutes currently...is something wrong or does it take that long?
you might want to cancel that, reboot your phone and try again, it should not take that long
can you do one on how to install Chrome instead of Firefox for a noob like myself. Thank you.
there is already a link to the chromium browser thread in the OT
I would caution that its kind of experimental, I installed it and it kept on crashing for me, so when I re-did my webtop after that,I just decided to use firefox
For step 1, can we partition this as ext4 as faux kernels support it?
added info on fixing an issue with mounting USB drives, and a note about chrome

[How To] Activate Wifi

After many hours of research and trial and error we finally have a working Wifi setup on CM7!
This is what we learned:
-There are specific wifi drivers that must be compiled alongside the kernel (twilan_drv.ko)
-The .ini file are developed when building the drivers that also must be used
-The stock firmware.bin file can be used
-The wifi drivers must be calibrated to work properly and efficiently. This can be done by referencing the WifiBackupConfiguration file found on the /Rom partition
-This device uses the Ti wl1273 wifi/Bluetooth card but is compiled using the wl1283 drivers (The Kindle Fire drivers worked perfectly! Boo you B&N for the no-show)
Here are some simple steps to get it working on your device:
1. Build a kernel (there are several other threads that talk to this like: http://www.nooktabletdev.org/index.php/Making_a_Boot_Image)
2. Get the Kindle Fire Source: http://kindle-src.s3.amazonaws.com/Kindle_src_6.2.2_user_3205220.tar.gz
3. Build the drivers:
Code:
cd <path to KF source>/Source/mydroid/hardware/ti/wlan/wl1283/platforms/os/linux/
make ARCH=arm CROSS_COMPILE=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- KERNEL_DIR=<path to NT source>kernel/android-2.6.35 TNETW=1273
cd ../../../..
cd wl1283_softAP/platforms/os/linux/
make ARCH=arm CROSS_COMPILE=/opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- KERNEL_DIR=<path to NT source>kernel/android-2.6.35 TNETW=1273
NOTE: You can use whatever Cross Compiler you want. I found the most success using CodeSourcery Lite (2009 or 2010) for Ubuntu 11.10. Another common path is
Code:
~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
If you are getting build errors it is probably because your kernel path is wrong or you need to try another set of CROSS-COMPILER files.
Note the line 'TNETW=1273' when building. That is the key to building the correct driver version.
4. Copy the drivers and ini files to your /system/etc/wifi folder:
Grab the twlan_drv.ko from the wl1283/platforms/os/linux folder. Also grab the tiwlan.ini file from wl1283/platforms/os/linux folder. Push both of these to your /system/etc/wifi folder.
Next grab the tiap_drv.ko and tiwlan_ap.ini from the wl1283_softAP/platforms/os/linux/ and wl1283_softAP/config folders. Push these to the /system/etc/wifi/softap folder.
5. Ensure your init.omap4430.rc has access to WifiBackupConfiguration
6. Build and install your boot.img using the kernel from step 1
Done! Enjoy the internet again
So, now all that needs to be fixed is SOD? Good news, thank you all for your hard work.
Mephikun said:
So, now all that needs to be fixed is SOD? Good news, thank you all for your hard work.
Click to expand...
Click to collapse
Fixing SoD should be usable enough for first Alpha. Then it is tweaking small things, having everyone find bugs, and fixing them!
Goncezilla said:
Fixing SoD should be usable enough for first Alpha. Then it is tweaking small things, having everyone find bugs, and fixing them!
Click to expand...
Click to collapse
Can't wait to start testing and finally help with the development
If bluetooth is on the same chip as wifi, will this also make bluetioth function?
travisn000 said:
If bluetooth is on the same chip as wifi, will this also make bluetioth function?
Click to expand...
Click to collapse
As of right now bluetooth does not function with these drivers (even though it is turned on in the kernel).
There are however some init.omap4430.rc services that look like they could be enabled to activate blutooth. We are going to try this out soon but are currently working some higher priority functionality issues.
I'll be sure to ammend this thread if we get blutooth working

[GUIDE] Using external USB wifi

I got fed up with crappy wireless reception in a hotel and decided to use my RTL8187 based Alfa USB wireless adapter with my Prime. Here's how it works, pretty rough and open to improvement but it works.
Set up a chroot (ubuntu/debian will work); everything is done within that chroot
Compile and install the drivers for your usb adapter (see the Kernel modules thread for instructions)
apt-get install wicd-curses (or wicd-cli if you prefer), wpasupplicant and dbus plus any of its dependancies
Turn off the broadcom wifi that's controlled by android
insmod your modules (in my case eeprom_93cx6.ko, mac80211.ko, rtl8187)
start dbus and wicd (/etc/init.d/dbus start; /etc/init.d/wicd start)
run wicd-curses (or wicd-cli), refresh the network list and connect to your network
configure dns for android to your dns or to googles (setprop net.dns1 8.8.8.8)
???
Profit
To stop using external usb wifi, reverse the steps; basically:
stop wicd and dbus (/etc/init.d/wicd stop; /etc/init.d/dbus stop)
kill any running dhcp clients (killall dhclient)
rmmod your modules (in my case eeprom_93cx6.ko, mac80211.ko, rtl8187)
To be able to insert mac80211 without it complaining about missing symbols for ewma_init and ewma_add, I had to add lib/average.c to the mac80211 module; it's pretty simple, here's how i did that:
Go to your prime kernel source tree (e.g. /usr/src/linux)
cp lib/average.c net/mac80211/
Edit net/mac80211/Makefile and add average.o to the list of objects for mac80211-y (don't miss the trailing backslash if you add it halfway)
For simplicity sake I've added the modules for an rtl8187 based usb nic to this post. These are built against the 9.4.2.7 kernel source, and work fine for the 9.4.2.11 release (current ICS release as of Feb 07 2012).
Oh and I don't recommend doing this with androids wifi turned on, it kind of breaks it until you reboot your tab. So if you're smart you'll script the above and spit out a nice warning that your broadcom module is still loaded and then exit. I had no problems switching between external USB wifi and built-in wifi as long as I only turned one of them on exclusively.
Enjoy solid wifi on your prime
,can you show screenshots of how much of an improvement it was using a USB wifi device vs. Stock wifi. You should relay this info in the kernel modules thread n SaturnDe can probably clean it up or simplify more or make it easier to implement. He could add it to his driver packs and make a new ATP tweaks version. For quick app enabling of this USB wifi method. This is very cool. I really would like to see how much of an improvement in reception thisngives.
You can't use the external wifi together with the android wifi control, it isn't compatible. So screenshots make no sense. This is why you need the chroot and wicd-curses; that's where you configure your wifi connection, not in android.
As for the increase in reception, it depends on your usb adapter. If you have one with an external antenna that is 6 feet long, you can figure out how much of an improvement that would be. Nothing is stopping you from connecting an even bigger wifi antenna if you want. So, reception increase could be anywhere from a few dB up to long range 5km wifi using powerful long range antennas.
infernix said:
You can't use the external wifi together with the android wifi control, it isn't compatible. So screenshots make no sense. This is why you need the chroot and wicd-curses; that's where you configure your wifi connection, not in android.
As for the increase in reception, it depends on your usb adapter. If you have one with an external antenna that is 6 feet long, you can figure out how much of an improvement that would be. Nothing is stopping you from connecting an even bigger wifi antenna if you want. So, reception increase could be anywhere from a few dB up to long range 5km wifi using powerful long range antennas.
Click to expand...
Click to collapse
Lol, I believe you're being told to do it yourself 'darin. I have a nice little wifi usb adapter, I'll give this all a whirl later on after work.
Certainly not a solution for myself, but a simple workaround for those uncomfortable with modding and who don't mind annoying sticks coming from their tablets/laptops. Not saying anything against this, I just always hated using older laptops with usb adapters and don't see me liking it more on a smaller, more stream-lined device.
buxtahuda said:
Certainly not a solution for myself, but a simple workaround for those uncomfortable with modding and who don't mind annoying sticks coming from their tablets/laptops. Not saying anything against this, I just always hated using older laptops with usb adapters and don't see me liking it more on a smaller, more stream-lined device.
Click to expand...
Click to collapse
FWIW, this can also be used to run aircrack or other wifi security analysis tools with, which aren't able to ever run with the builtin broadcom adapter. So it has other uses too
infernix said:
FWIW, this can also be used to run aircrack or other wifi security analysis tools with, which aren't able to ever run with the builtin broadcom adapter. So it has other uses too
Click to expand...
Click to collapse
Has anyone tried doing so with their ATP? I'd be very interested to know. I've had a bunch of problems with the build-in card in terms of using the bt5 pentest suite so this might potentially solve some of those problems
Yeap, done with BT5 for arm and ALFA AWUS036H (Rtl8187), apt-get the aircrack tool and bang! : monitoring mode enables
Thanks a lot to the OP for the modules !
what version of linux are you guys using? I was trying to install wicd-cli and wicd-curses through my bt5 and had no success. wicd-curses just can't install on arm bt5 for some reason stating that some dependant libraries are incompatible. wicd-cli gives me an fopen error during install and then craps out when I try to run it.
Thanks for the info, one question tho.
Did you have to do anything special to get the wicd client to run, I get the error 'cannot connect to dbus socket' or something to that effect..
I have tried wicd-cli, -curses, and -gtk
Any help would be appreciated.
Dear Sirs,
This may be newbish, but where can I get the source for the kernel modules the op mentioned. I have obtained my kernel source for my phone, but can't seem to find the source I actually need to compile, rtl8187, etc.
Update:
Alright, I found them, they are part of the compat-wireless package. http://www.aircrack-ng.org/doku.php?id=compat-wireless
I still can get it to compile, but I guess I need to learn a little about cross compiling.
I did find a kernel for my device with the modules already built in, used and voila. Cracked a wep key in about 5-10 minutes. I was happy, happy, happy. Then, a ruinous moment occurred. Almost the very second aircrack-ng finished cracking the key, my phone came up with a low battery warning, I was using a awus036h wifi adapter and it was draining my battery fast, I had about 50% to begin and had the 14% warning hit me about 10 minutes in, funny thing is the warning is usually 14%, but this time was 13%, go figure? Anyway seconds after the warning my phone just blanks, turns off. I plug it in and reboot and the battery is at 0% and stuck there, so a word of warning:
An external wifi adapter my require more usb host juice then the battery can safely supply. I have seen people using powered hubs to circumvent draining the phone battery, I would defintiely recommend the practice.
Ok, if the last poster was noobish then i dont even know where i would be because i need help just deciphering wtf OP said.
I realize the drivers for each wireless adapter are going to be a little different... because each wireless adapter is different, but can someone translate this into non geek? I dont even know where to begin.
Can this work using the ubuntu/backtrack/linux installers from the market? Ive muddled my way through that and got linux working that way, or is this completely different?
I just wanted to say THANKS! I now have my Alpha card working in Monitor mode on my TF300T Transformer PAD and man it feels good! I have never been able to get this to work and have been trying to use an external card in backtrack for a loooong time! Thank you 1 million times!
Hi! Thanks for instructions. I got compile and install driver for my G-Sky (rtl8187) on AllWinner A10 (Ainol Aurora II) with android 4.0.4 and 3.0.8 kernel. All network settings were done with tablet's terminal (without PC). Only one problem remains - I can't undestant connecting to wpa networks - it's too difficult. Here: http_://nuzhen-sovet.ru/content/podklyuchenie-vneshnego-wi-fi-adaptera-k-planshetu-na-android-4 you can read my manual with connection to nonWPA networks on russian (read with google translate).
I am wondering if something like this could be used for the folks concerned with bt\wifi fallout. There are plenty of bluetooth dongles out there that are small enough to leave in the dock full time. I have the fallout I just dont use bluetooth enough to care.
BlackUbuntu 12.04 V4: http://kat.ph/blackubuntu-12-04v4-for-android-s3-tested-t7252750.html
So how would I go about this on the galaxy s3 l710.
My alfa card reads on pcap app.
Hi everyone.
I plan on using the Bolse adapter : http://www.mybolse.com/products_more.asp?id=96 that has an Android driver with my Galaxy Note2.
Do I have to go through all these steps with it considering it has an Android driver?
Thanks
infernix said:
I got fed up with crappy wireless reception in a hotel and decided to use my RTL8187 based Alfa USB wireless adapter with my Prime. Here's how it works, pretty rough and open to improvement but it works.
Set up a chroot (ubuntu/debian will work); everything is done within that chroot
Compile and install the drivers for your usb adapter (see the Kernel modules thread for instructions)
apt-get install wicd-curses (or wicd-cli if you prefer), wpasupplicant and dbus plus any of its dependancies
Turn off the broadcom wifi that's controlled by android
insmod your modules (in my case eeprom_93cx6.ko, mac80211.ko, rtl8187)
start dbus and wicd (/etc/init.d/dbus start; /etc/init.d/wicd start)
run wicd-curses (or wicd-cli), refresh the network list and connect to your network
configure dns for android to your dns or to googles (setprop net.dns1 8.8.8.8)
???
Profit
To stop using external usb wifi, reverse the steps; basically:
stop wicd and dbus (/etc/init.d/wicd stop; /etc/init.d/dbus stop)
kill any running dhcp clients (killall dhclient)
rmmod your modules (in my case eeprom_93cx6.ko, mac80211.ko, rtl8187)
To be able to insert mac80211 without it complaining about missing symbols for ewma_init and ewma_add, I had to add lib/average.c to the mac80211 module; it's pretty simple, here's how i did that:
Go to your prime kernel source tree (e.g. /usr/src/linux)
cp lib/average.c net/mac80211/
Edit net/mac80211/Makefile and add average.o to the list of objects for mac80211-y (don't miss the trailing backslash if you add it halfway)
For simplicity sake I've added the modules for an rtl8187 based usb nic to this post. These are built against the 9.4.2.7 kernel source, and work fine for the 9.4.2.11 release (current ICS release as of Feb 07 2012).
Oh and I don't recommend doing this with androids wifi turned on, it kind of breaks it until you reboot your tab. So if you're smart you'll script the above and spit out a nice warning that your broadcom module is still loaded and then exit. I had no problems switching between external USB wifi and built-in wifi as long as I only turned one of them on exclusively.
Enjoy solid wifi on your prime
Click to expand...
Click to collapse
Well, after i read most replies, most don't understand how to get things set up, please describe it a bit more, organize things, like section for requirements, etc.
Explain to Kernel and Kernel Modules and how to build them
For everyone who didn't Understand Step 2, I Will explain and tell you how to do that, Please read it all to Understand:highfive::
What is Kernel?
A Kernel is Simply a Bridge Between Software and Hardware.
So The Drivers are Inside the Kernel itself?
For Short, Yes. In Linux Overall (Android, Ubuntu, etc.), Drivers are Included Inside the Kernel it self, Some say for Performance Improvements.
Your Phone's Android Kernel Include all the Drivers required for your phone to function, And for the Devices that Support USB-OTG there are a Plenty of Drivers Included, However, Drivers like the one's for the RTL8187 Most likely won't be included.
What are Kernel Modules?
Kernel Modules are Files that have *KO Extension That can be loaded Through insmod and Unloaded through rmmod Command-Line Commands, These files is to Extend the Functionality of the Kernel Without Touching/Editing it at all,It Just does some effect Until the Modules are Unloaded/Device Rebooted, Kernel Modules useful Either by Adding a Driver or by adding other things..[/B]
What are the Disadvantages of Kernel Modules?
Well, There's no Difference Expect you need to reload the Kernel Modules after a Reboot or Module Unload, Some Tutorials Show you how can you add a command to load these Modules after each boot up
So A Kernel Module is the Solution for adding a driver without modifying the kernel?
Yes, Kernel Modules is the Solution here, Each USB Device needs it's own Kernel Modules, so you can't Download a Module and Use it, You need to Compile yours.
What is the Requirements to build a Kernel Modules?
1.You need Linux Environment, Use either the Chrooted Linux On you phone, or, better use Ubuntu or any linux Distro on a Computer, Build the Module, and load it on the Chrooted Linux on your phone,
2.You need an Internet Connection in the Linux Environment.
3.You need the Driver Source code for your USB Device. Get them from the Manufacturer if he offer them, if he doesn't, You need to Look in the internet until you find one, if you were unable to find the Source code for you Device but found similar Devices Driver source code, see if the Other Device Driver is Compatible with yours usually a Single Driver work on many Devices, you need to look by your own way
4.You Also need some Programs to install in Order to be able to Compile the Kernel Module, Enter these Commands in a Terminal, Pressing Enter after each Line, and make sure you have the Internet Connection:
HTML:
sudo apt-get install fakeroot
sudo apt-get install build-essential
sudo apt-get install dpkg-dev
sudo apt-get install linux-headers-$(uname -r)
For the most Important Part, make the Kernel Module?
1.Unpack the Kernel source code, if it's Extension is bz2 then use:
HTML:
tar jxvf <package-name>
Where <package-name> is the Compressed File name, and make sure you put it in the Home Folder, if it's Extension is gz or tgz the Unpack it with:
HTML:
tar zxvf <package-name>
2. Second, Find config.mk and Open it with gedit or whatever Text editor you like, at first, there is two lines about WPA Support, make sure they end with y rather than n, Save and close.
3.Third, and last, is to Compile the Kernel Module, Open Terminal and use cd command to get inside the folder that contains the Source code, and Simply Execute:
HTML:
sudo make
And now you own the Kernel module, Now copy the Kernel Module to the root of your Internal Storage, Open up a Terminal and Type:
HTML:
cd /mnt/sdcard
insmod <kernel-module-name>.ko
And make sure Internal Wi-Fi is OFF and now your Kernel Module works, Follow the Guys steps to get it working on Chrooted distro
Troubleshooting:
If you find a similar Device Driver Source Code and after Compiling it doesn't work plug the Device in, Open a Terminal and type:
HTML:
sudo lsusb
and Find your Device in the Output and you should find Numbers for it Looks Like 0x148F,0x2070 or whatever, Write them down.
After Step 2 Follow These Steps:
Find usb_main_dev.c and Under #ifdef Section add the Following Line:
HTML:
{USB_DEVICE(0x148F,0x2070)}, /* Your Device name, this is just a Comment. */
Where You should replace 0x148F,0x2070 with the String you just wrote down.
And then Continue Other Steps and it should work.
Please Click "Thanks" Button if i Helped you
Also, if you had any Problems and fixed them Just tell me so i can add them to Troubleshooting Section.
Hi! Im going on vacation in 2 weeks and I want this to work on my Nexus 5. I run CM12. I think I can manage the kernel part myself (there are a lot of nexus 5 kernels which include the driver of my wifi dongle: TP-Link WN722N). but I don't know how to do the next steps (for example step 4 and 5). Can someone give me a detailed tutorial with command lines? I am familiar with terminal.
My step again:
Nexus 5 running CM12
Wifi dongle: TP-Link WN722N
thanks in advance!
Sorry for the extremely noob question, but will this make the wifi adapter work in the chroot or on the entire device?

Are Tablet S ICS DVB-T Modules (.ko files) available ?

I'm trying to get together all the files I need to have a go at getting a DVB-T tuner working with the Tablet S - I have all the DVB-T modules, but for a lower kernel revision, and from what I've read they probably wont work with this kernel.
I'm really not looking forward to compiling these myself as I use Windows 7 and am aware that there are issues with compiling Linux on a Windows system and being new to Android/Linux cross compiling I could cause myself more problems than I solve.
So the question is, has anyone got info on a repository for these modules compiled for ICS at our kernel revision?
Have you seen this?
http://forum.xda-developers.com/showthread.php?t=1870077
TUN, NTFS, CIFS, usbserial, fuse kernel modules for 2.6.39.4, attached
You could post your request there. And if you manage to get it working could youshare a solution please?
Sent from my Sony Tablet S using xda app-developers app
could you please explain what is needed to make this work?
post some links perhaps.
Hi there,
I've uploaded a bunch of dvb files to forum.xda-developers.com/showthread.php?t=1870077 for you.
I'm not sure if those are the ones you need, but if you post there what you are trying to do and what specific modules you need, then perhaps I can help further.
A
praed0r said:
I'm trying to get together all the files I need to have a go at getting a DVB-T tuner working with the Tablet S - I have all the DVB-T modules, but for a lower kernel revision, and from what I've read they probably wont work with this kernel.
I'm really not looking forward to compiling these myself as I use Windows 7 and am aware that there are issues with compiling Linux on a Windows system and being new to Android/Linux cross compiling I could cause myself more problems than I solve.
So the question is, has anyone got info on a repository for these modules compiled for ICS at our kernel revision?
Click to expand...
Click to collapse
@abactor_xda: your link directs to general section of tablet s forum. I guess you should put a link to your modules post.
could you, please provide more information about those files you uploaded.
where did you get them from? what software is used with? do I insmod them the same way as other kernel modules?
this is what I find promising, but development seems to be stopped: https://github.com/chrulri/droidtv
when I install this app it says something about needing kernel modules and drivers or something like that. are this those modules and drivers. how do I chose which of them I need?
I have this usb tuner: http://www.avermedia.com/avertv/Support/Download.aspx?Type=Software&id=31&tab=APDriver
Can somebody please help me or point me in right direction
thank you
Hi Kulen,
Thanks, I'll fix that link. The files i uploaded are just more compiled kernel modules, you'll need to use the tar -xvzf flag to unzip them as it was a bigger tar file than xda would allow. They're compiled from the kernel sources available from Sony...I don't have the link to the sources at the moment, but if you search the forums you'll be able to find it. The modules are loaded with insmod, the same way as before, yes. I have no idea how one would go about putting these to use but it seems like in addition to the kernel module you'll need a driver and perhaps more kernel modules for an ARM architecture that will work with the 2.6.39.4 kernel version. Looking at the avermedia's website, the support they give is for an x86 architecture so you may be out of luck unless somebody can help you out over here:
linuxtv.org/wiki/index.php/AVerMedia_A828
Have you ever gotten this usb tuner to work with a real linux box?
Good luck,
a
kulen said:
@abactor_xda: your link directs to general section of tablet s forum. I guess you should put a link to your modules post.
could you, please provide more information about those files you uploaded.
where did you get them from? what software is used with? do I insmod them the same way as other kernel modules?
this is what I find promising, but development seems to be stopped: https://github.com/chrulri/droidtv
when I install this app it says something about needing kernel modules and drivers or something like that. are this those modules and drivers. how do I chose which of them I need?
I have this usb tuner: http://www.avermedia.com/avertv/Support/Download.aspx?Type=Software&id=31&tab=APDriver
Can somebody please help me or point me in right direction
thank you
Click to expand...
Click to collapse
Sent from my Sony Tablet S using xda app-developers app
Well, thank you.
You are really fast and willing to help.
I did make this tuner work with linux mint on x86. Actually my friend Google did it mostly, so I'm not sure what I did any more. It was a long time before and I'm not very familiar with linux.
This is what Avermedia site says for both x86 and x64 driver:
"The following distributions, with their stock kernel, are officially tested and supported:
1. Open SuSE Linux 10.3
2. Mandriva Linux 2008
3. Fedora Core Release 6
4. Fedora Core Release 7
5. Ubuntu 7.10
6. Ubuntu 8.10
7. Ubuntu 9.04
8. Ubuntu 9.10
9. Mandriva Linux 2009
Sent from my Sony Tablet S using xda app-developers app"
I guess I should find some generic ARM driver that works with my tuner?
Is there a way to batch insmod (all at once) all this modules? something like insmod *.ko?
Do I need all those modules? How do I find that out?
Hi there,
You're welcome, I'm happy to help.
In order to load all modules within a directory (and its respective sub-directories), try:
Code:
su
cd /data/local/kmods
find . -name "*.ko" -exec insmod {} \;
[\CODE]
Or just
[CODE]
su
find /data/local/kmods/ -name "*.ko" -exec insmod {} \;
[\CODE]
I'm not sure what kernel modules you'll need, but I would look at the #include files in the driver and/or ask the people over in the forum that you listed who work on these tuners specifically. Perhaps some people from the arm-based rasperry pi community might be working on this type of thing too.
Good luck,
A
Sent from my Sony Tablet S using xda app-developers app
Thanks for answer, again!
I already solved problem "insmoding" them all at once by making a script for them all as you showed me in your kernel modules thread.
At first it seems not all of them are insmoded. "no such file or directory" error. But at second script run it seems they are insmoded. I guess they are dependent on each other and need to be insmoded at right order? I also guess "file exists" means it's already insmoded?
Some of them return "exec format error" which, Google suggests, mean they are not for ARM?
anyhow nothing happens when I plug in my tuner.
I'll have to do a research starting where you sugessted but I'm setting my expectations low.
Terminal transcript of running script 3 times is in attachment. (I'll upload it later, can't do it from xda app - DONE)
Sent from my Sony Tablet S using xda app-developers app
Hey there,
maybe we can get DVB-T-Sticks working on Tablet S. Some devs got the "WinTV Nova-T"-stick working on Odys Loox. Kernel modules they used were:
dib0070.ko
dib3000.ko
dib7000m.ko
dib7000p.ko
dib8000.ko
dibx000_common.ko
dvb-core.ko
dvb-usb.ko
dvb-usb-dib0700.ko
If abactor can provide us these files we're maybe able to get it working. But I don't know if other sticks are working, too.
kulen said:
Thanks for answer, again!
I already solved problem "insmoding" them all at once by making a script for them all as you showed me in your kernel modules thread.
At first it seems not all of them are insmoded. "no such file or directory" error. But at second script run it seems they are insmoded. I guess they are dependent on each other and need to be insmoded at right order? I also guess "file exists" means it's already insmoded?
Some of them return "exec format error" which, Google suggests, mean they are not for ARM?
anyhow nothing happens when I plug in my tuner.
I'll have to do a research starting where you sugessted but I'm setting my expectations low.
Terminal transcript of running script 3 times is in attachment. (I'll upload it later, can't do it from xda app - DONE)
Sent from my Sony Tablet S using xda app-developers app
Click to expand...
Click to collapse
some of them have dependencies and others may not be compatible with our hardware even if we can build them. all of the modules are built in the same way but there may be issues due to some modules being built-in to the kernel - I don't know how those sorts of conflicts are resolved. another way to go would be to build the whole kernel again.
I would keep loading the modules until the output from insmod stops changing as you've done...or look up the dependency tree and load them in order. your way is easier.
---------- Post added at 12:56 PM ---------- Previous post was at 12:25 PM ----------
djlars said:
Hey there,
maybe we can get DVB-T-Sticks working on Tablet S. Some devs got the "WinTV Nova-T"-stick working on Odys Loox. Kernel modules they used were:
dib0070.ko
dib3000.ko
dib7000m.ko
dib7000p.ko
dib8000.ko
dibx000_common.ko
dvb-core.ko
dvb-usb.ko
dvb-usb-dib0700.ko
If abactor can provide us these files we're maybe able to get it working. But I don't know if other sticks are working, too.
Click to expand...
Click to collapse
I finally managed to get the dvb-usb.ko built with some manual editing. I'm going to post them to the other thread with all the other kernel modules. The link is posted above. let me know if this does or does not work for you guys.
If you guys are having trouble loading the dvb-usb.ko module, it may be contained within the dvb-core.ko module it seems...
kulen said:
could you please explain what is needed to make this work?
post some links perhaps.
Click to expand...
Click to collapse
Hi Kulen,
I managed to get my dongle working in Ubuntu with the correct kernel revision after a lot of hair pulling - when i tried to cross compile the modules for ARM, the compiler crashed and trashed my Linux installation, after trying for days to restore my system, i had to resort to a re-install and have not attempted anything since.
I got all my info here :-
http://linuxtv.org/wiki/index.php/Main_Page
Sorry I can not be more helpful, but I see a lot of guys on here chipping in with very useful information - hopefully you'll succeed where I failed.
PS - I might just get back into this again.
I can't say thanks enough for all help I got here.
@abactor_xda
I tried all modules you posted. since some of them are in both archives I tried first those from one archive, then from another. I extracted all and then I copied ones and other over them, and then the other way. I wanted to be sure they all are there. And then I used commands you taught me. I insmoded them 5-6 times to be sure, but some modules were not insmoded. some with that exec error and some with no file error.
and nothing happened in any case.
but here we come to another problem. I'm not sure how to check it. I use Droid TV app and it says:
" Sorry, no device found or device acces denied. This application NEEDS a working DVB device, plugged into your Android device and set up with drivers, firmware and correct permissions. Make sure that these prerequirements are met and try again."
I also get some massage from android system that connected USB device is unsupported or unreckognized or something like that.
any idea how could I see which modules are/are not activated when I plug DVB tuner?
and thanks for your help again.
@praed0r
which DVB tuner do you have?
compiling and all the other programming stuff is, unfortunately, way too much for me, so I have to rely to help from good people.
Hey Kulen,
I'm sorry to hear that didn't work. Though I had a feeling that would be the case as I also had issues trying to load those modules.
I have a feeling the modules need to be adapted somewhat before being compiled or a special driver written.
Otherwise run "dmesg" from the terminal after you plug in the device. Maybe this info would be useful to someone who knows about this stuff (unfortunately that's not me
If you do find out how to adapt these modules, I can try to compile them.
A
Sent from my Sony Tablet S using xda app-developers app
well thanks again.
I can make dmesg by help of google. but that's about maximum of my developing competence.
I guess I have to give up on this, unless some "good soul" shows up here and give us a solution.
I will post dmesg in cca. 10 days, cause I don't have tablet with me now and wait...
it'll be a pity if all abactor_xda's unselfish work was for nothing

TP-LINK WN722N (ath9k driver) install on Ubuntu touch 15.04 (Nexus 10- Manta)

I've been through all the relevant threads on AskUbuntu and they are either outdated, conflicting and/or dont work.
My Nexus10 sees the atheros AR9271 device on Bus 001 USB but does not create an additional WLAN for it.(wlan0 is the normal integrated wifi) I assume I need the ath9k or ath9k_htc driver? I installed backports 4.4.2-1 and unzipped it. If I try to do a 'make' or 'make clean' I get:'your kernel headers are incomplete/not installed'. I've already got the latest version of build-essential. If I try to install 'firmware-atheros', it cannot find the package. I've been through several other things to no avail.
I've read the driver is installed with 15.x+ anyway, true? and if so how to install it? If someone could do a step-by-step wifi driver install for a U-touch or at least Ubuntu 15.x I'd be very very grateful.
I do not want to bridge the 722n, I want to use it instead of the integrated card. Not even there yet, but just in case it matters.
Thanks!
roninisc said:
I've been through all the relevant threads on AskUbuntu and they are either outdated, conflicting and/or dont work.
My Nexus10 sees the atheros AR9271 device on Bus 001 USB but does not create an additional WLAN for it.(wlan0 is the normal integrated wifi) I assume I need the ath9k or ath9k_htc driver? I installed backports 4.4.2-1 and unzipped it. If I try to do a 'make' or 'make clean' I get:'your kernel headers are incomplete/not installed'. I've already got the latest version of build-essential. If I try to install 'firmware-atheros', it cannot find the package. I've been through several other things to no avail.
I've read the driver is installed with 15.x+ anyway, true? and if so how to install it? If someone could do a step-by-step wifi driver install for a U-touch or at least Ubuntu 15.x I'd be very very grateful.
I do not want to bridge the 722n, I want to use it instead of the integrated card. Not even there yet, but just in case it matters.
Thanks!
Click to expand...
Click to collapse
anyone anyone, Beuller...
Hey, saw this was unanswered and figured I could help. First off, you will not be able to compile or install headers in the Ubuntu Touch system, as /lib/modules/<kernel version> is a bind-mount into the read-only LXC system image, one way to work around this issue on device is to mount the LXC container's system image read-write somewhere, move out the lib/modules directory to someplace else, umount, reboot and then link your moved lib/modules back into /lib/modules. You will need to do this compilation outside of your Nexus 10 in a cross-compilation environment or in an armhf chroot (imho, a chroot running the ARM build of Ubuntu works very well for this).
Once you have that, you can install the kernel package for your device (which I believe are labeled linux-headers-manta and linux-image-manta respectively) and build the driver you seek. However the kernel already comes with backports 4.4.2 in it's tree, so you may be able to apt-get source linux-image-manta and build the driver and/or the kernel itself if you wish. (I believe building the kernel builds the firmware needed for the drivers as well, but I have no way of knowing as I haven't actually rebuilt any drivers with firmware yet in my foray into linux-image-flo's source.)
One piece of advice: Make sure to join together the config.*.ubuntu files under the debian.flo and debian.master folders to get the working .config for your device. The defconfig from arch/arm/configs doesn't have all the needed options for uTouch and won't boot it.
Your 'thanks meter' improved, and big thanks for answering, but this is beyond my level. Was hoping I could run an external wifi stick on a tablet with some flavor of linux, but looks like a no go for mortal users.
roninisc said:
Your 'thanks meter' improved, and big thanks for answering, but this is beyond my level. Was hoping I could run an external wifi stick on a tablet with some flavor of linux, but looks like a no go for mortal users.
Click to expand...
Click to collapse
Sadly at this time, it definitely seems to be. The normal linux way of building drivers doesn't work on here because the modules directory (/lib/modules/3.4.0-5-flo) is read-only, also due to this kernel headers cannot be installed, this can be worked around, but it is definitely not something that the casual user can do easily. I hope this will change so I could start compiling modules and NOT need to rebuild the entire kernel for it.
Glad I could be of help and I love answering questions, I am currently using Ubuntu Touch as my main OS on my Nexus 7 as I'm trying to make it into my own portable workstation. So I'm constantly digging into the system and learning what I can, and I love to share.

Categories

Resources