Related
Has anyone compiled tun.ko under the 2.2 stock?
Bill T
I have TUN vermagic=2.6.32.15-g746f4f0
Since nobody seemed to have it
I compiled TUN from the HTC sources, It loads,
** BUT ** looks like it is creating the TUN device as /dev/tun
vpnc seems to be looking in /dev/net/tun
I Will get vpnc working on a rooted stock 2.2 if it kills me
# ls /system/lib/modules
sequans_sdio.ko
bcm4329.ko
tun.ko
# strings /system/lib/modules/tun.ko | grep vermagic
vermagic=2.6.32.15-g746f4f0 preempt mod_unload ARMv7
# lsmod
tun 10734 0 - Live 0xbf000000
Tun is attached
how do you get the source + compile tun.ko? i am using Fresh's 3.2.0.0 rom with the new HTC stock kernel that is supposed to save batter life. The kernel # is 2.6.32.15-g3a8614e
HTC EVO Source
When I build the HTC code - it did not completely build everything but it did go get past tun so that is all I needed
I did this under fedora linux
you can download the HTC EVO source here
http://developer.htc.com/
you will need the google android build here is the instruction page
http://source.android.com/source/download.html
the google android source download included prebuilt compile binaries for the cross compile. I had to add the directories to my path so make could find them.
needed to edit Makefile change
EXTRAVERSION = .15-
== to ==
EXTRAVERSION = .15-g746f4f0
then did a make -j4 and waited
Bill
btedeski said:
When I build the HTC code - it did not completely build everything but it did go get past tun so that is all I needed
I did this under fedora linux
you can download the HTC EVO source here
http://developer.htc.com/
you will need the google android build here is the instruction page
http://source.android.com/source/download.html
the google android source download included prebuilt compile binaries for the cross compile. I had to add the directories to my path so make could find them.
needed to edit Makefile change
EXTRAVERSION = .15-
== to ==
EXTRAVERSION = .15-g746f4f0
then did a make -j4 and waited
Bill
Click to expand...
Click to collapse
yikes... i do have a linux box but this seems like a huge task, any way you can build tun.ko for my kernel?
<< yikes... i do have a linux box but this seems like a huge task, any way you can build tun.ko for my kernel?
post your Kernel string here and I will see about doing it.
btedeski said:
<< yikes... i do have a linux box but this seems like a huge task, any way you can build tun.ko for my kernel?
post your Kernel string here and I will see about doing it.
Click to expand...
Click to collapse
Kernel Version:
2.6.32.15-g3a8614e
[email protected] #7
don't worry if you don't have time.. thanks if you do!
I am able to connect from the EVO to the work Cisco 3030 VPN
concentrator (I am the concentrator admin) so I am able to see the connection on the 3030 as well.
The 3030 sees the conneciton
I have been able to connect in the following modes
IPSec/UDP 3DES-168
IPSec 3DES-168
IPSec/NAT-T 3DES-168
But the VPN concentrator is reporting 0 bytes sent or received,
seeing the following messages when I start vpnc
/data/data/org.codeandroid.vpnc_frontend/files/vpnc --natt-mode force-natt /etc/
vpnc/vpnc.conf
Usage: ip link set DEVICE { up | down |
arp { on | off } |
dynamic { on | off } |
multicast { on | off } |
allmulticast { on | off } |
promisc { on | off } |
trailers { on | off } |
txqueuelen PACKETS |
name NEWNAME |
address LLADDR | broadcast LLADDR |
mtu MTU }
ip link show [ DEVICE ]
/etc/vpnc/vpnc-script: cannot create : directory nonexistent
backing up dns and resolve.conf
/etc/vpnc/vpnc-script: cannot create /etc/vpnc/dns1.txt: read-only file system
/etc/vpnc/vpnc-script: cannot create /etc/vpnc/dns2.txt: read-only file system
cp: cannot stat '/etc/resolv.conf': No such file or directory
vpnc-script ran to completion
VPNC started in background (pid: 4079)...
#
busybox route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
63.117.98.165 174.146.29.245 255.255.255.255 UGH 0 0 0 rmnet0
174.146.29.244 * 255.255.255.252 U 0 0 0 rmnet0
198.182.130.128 * 255.255.255.128 U 0 0 0 tun0
default * 0.0.0.0 U 0 0 0 tun0
busybox ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8439 errors:0 dropped:0 overruns:0 frame:0
TX packets:8439 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:507599 (495.7 KiB) TX bytes:507599 (495.7 KiB)
rmnet0 Link encap:Ethernet HWaddr 42:9C7:E2:B3:C4
inet addr:174.146.29.246 Bcast:174.146.29.247 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1472 Metric:1
RX packets:1165 errors:0 dropped:0 overruns:0 frame:0
TX packets:1686 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:538348 (525.7 KiB) TX bytes:234465 (228.9 KiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
-00
inet addr:198.182.130.158 P-t-P:198.182.130.158 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#
Can anyone get vpn working at all?
tun vermagic=2.6.32.15-g3a8614e
vermagic=2.6.32.15-g3a8614e preempt mod_unload ARMv7
see attached zip file
btedeski said:
vermagic=2.6.32.15-g3a8614e preempt mod_unload ARMv7
see attached zip file
Click to expand...
Click to collapse
What does this do?
me too
First, thanks for the compiled tun.ko for the stock ROM. I just got my Evo yesterday and am diving into Android for the first time, and have gotten rooted and VPNC installed and connected, but I get 0 bytes transferred on my Cisco ASA and no actual connection on the Evo. So I'm in the same boat, and from looking around, it doesn't look like anybody has gotten this working on 2.2 stock. I don't know enough to solve the problem myself, but just wanted to confirm that I have the same issue.
VPNC Working
So... I have a workaround that does seem to work with 2.2 Froyo. I tried this on King's kernel, and netarchy's kernels (both worked). I then loaded the tun.ko from a few posts above, and insmod'd it to work for Fresh 3.2.0.0 (with the new HTC Kernel)
So, here's what you do...
-Connect using VPNC (should show connected, but not allow tunneling)
-Issue the following commands
3G: "ip rule del from all lookup gprs"
Wifi: "ip ru del table wifi"
I used the application GScript Lite to send the commands
Then tunneling works!
I have gotten the connection to work on my Evo running Fresh stock 3.28 ROM, using the commands above. However, when I disconnect the phone freezes and I have to pull the battery to reset. Any ideas of what would be causing this?
davidfretz said:
I have gotten the connection to work on my Evo running Fresh stock 3.28 ROM, using the commands above. However, when I disconnect the phone freezes and I have to pull the battery to reset. Any ideas of what would be causing this?
Click to expand...
Click to collapse
Mine is doing that also. Maybe the kernel. I tried to logcat it but dont see anything because that freezes also
Don't suppose you could post one for 2.6.32.15-gb7b01d1 ? Pretty please?
TUN vermagic=2.6.32.15-gb7b01d1 preempt mod_unload ARMv7
[email protected] net]$ strings tun.ko | grep magic
vermagic=2.6.32.15-gb7b01d1 preempt mod_unload ARMv7
The attached zip file contains tun.ko
This is the supersonic-2.6.32.15-g746f4f0 but with the compile string modified to be gb7b01d1
this should work as long as gb7b01d1 and g746f4f0 are close.
Bill T
VPNC Disconnect -- Phone Freezes
davidfretz said:
I have gotten the connection to work on my Evo running Fresh stock 3.28 ROM, using the commands above. However, when I disconnect the phone freezes and I have to pull the battery to reset. Any ideas of what would be causing this?
Click to expand...
Click to collapse
Hi there, did you ever figure out freezing issue while disconnects? Any work-around or help .. . much appreciated...
hits100 said:
Hi there, did you ever figure out freezing issue while disconnects? Any work-around or help .. . much appreciated...
Click to expand...
Click to collapse
I downloaded the source for VPNC and ran it on my EVO in debug mode. I can tell you that the problem is not with VPNC Android client directly, it actually relates to the VPNC process running in the background.
Basically.. when you run the Android client, it just acts as a simple GUI that starts/stops this VPNC process (native C++ code). The freeze occurs when that VPNC process tries getting killed. So when you click "Disconnect" from your phone, VPNC (Android client) issues a linux shell command for "kill" that is supposed to terminate the VPNC process.
I wasn't able to determine, because of my lack of C++ skillz, what the VPNC process is doing that is causing the freeze. Maybe it's trying to close tunnels that don't exist? I don't know.. I do know there is a stop command in the vpnc-script file that comes with VPNC, but I couldn't tell if that was ever getting called or what. I suppose the next step would be to add some sort of output to that script file to see if that is being called. I have a feeling it's closely related to the commands issued to get the VPN connection working. Maybe there are some commands to close the tunnels THEN kill VPNC process.. never got that far, but I hope this helps any other dev.
If anyone wants to know exactly where it crashes in the Android code, it's in the VpncProcessHandler.java file on line 238. In the "disconnect" fxn.
drizkol said:
I downloaded the source for VPNC and ran it on my EVO in debug mode. I can tell you that the problem is not with VPNC Android client directly, it actually relates to the VPNC process running in the background.
Basically.. when you run the Android client, it just acts as a simple GUI that starts/stops this VPNC process (native C++ code). The freeze occurs when that VPNC process tries getting killed. So when you click "Disconnect" from your phone, VPNC (Android client) issues a linux shell command for "kill" that is supposed to terminate the VPNC process.
I wasn't able to determine, because of my lack of C++ skillz, what the VPNC process is doing that is causing the freeze. Maybe it's trying to close tunnels that don't exist? I don't know.. I do know there is a stop command in the vpnc-script file that comes with VPNC, but I couldn't tell if that was ever getting called or what. I suppose the next step would be to add some sort of output to that script file to see if that is being called. I have a feeling it's closely related to the commands issued to get the VPN connection working. Maybe there are some commands to close the tunnels THEN kill VPNC process.. never got that far, but I hope this helps any other dev.
If anyone wants to know exactly where it crashes in the Android code, it's in the VpncProcessHandler.java file on line 238. In the "disconnect" fxn.
Click to expand...
Click to collapse
Yeah, It's not front-end. Front-End application only sends kill command to vpnc process. If I do that same from terminal, it still freezes the system. It's something with kernel..
Hi there
My IP adress keeps on changing on my Android (Cyanogen 6.1.1) Desire and so I keep on hopping between different IP addresses. The IP adress of the only other system on my network has not changed.
I would prefer not to use a static address but to understand and fix the cause of this. I have a laptop which does'nt hop around so frequently so
I think it must be related to a phone/Android setting but so far i've been unable to find out where this is configured.
My link speed is 54 Mbps so I have a good connection to my wireless router.
How can I fix this ? Perhaps I just need to install an extra application.
Elixir displays the lease in binary for some reason, 10101000110000000 (86400 base 10). 86400 seconds is a lease time of 1 day.
And this is confirmed on the OS itself.
Code:
# getprop dhcp.eth0.leasetime
86400
# dhcpcd --version
dhcpcd 4.0.15
Copyright (c) 2006-2008 Roy Marples
# pgrep -lf dhcpcd
1486 /system/bin/dhcpcd -ABKL -h android_dddddddddddddddd eth0
dhcpdcd options if they are the same on Android : http://roy.marples.name/cgi-bin/man-cgi?dhcpcd
-A, --noarp
Don't request or claim the address by ARP. This also disables
IPv4LL.
-B, --nobackground
Don't run in the background when we acquire a lease. This is
mainly useful for running under the control of another process,
such as a debugger or a network manager.
-K, --nolink
Don't receive link messages for carrier status. You should only
have to use this with buggy device drivers or running dhcpcd
through a network manager.
-L, --noipv4ll
Don't use IPv4LL (aka APIPA, aka Bonjour, aka ZeroConf).
Hello, this is my first dev posting, so let me know if there is anything missing...
I have a Samsung Galaxy SIII S3 SGH-I747M (Bell) with Jelly Bean 4.1.1 kernel 3.0.31 (stock rooted, root66_BMC_I747MVLDLK4.7z). I also have an Asix USB LAN adapter (from monoprice) + USB OTG cable which did not work out of the box... but i am a software engineer... so I made it work. The process below should work for other carriers / modules if you find the proper kernel source. Compiling latest drivers directly from Asix is the best method... Read that part first!
Read the README that comes with your kernel source, you may need a different compiler! https://github.com/AdiPat/Android_Toolchains is where I got mine...
Details about the Asix AX88772 USB lan RJ45 adapter chipset can be found here:
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=86;71;101
You can skip to "Usage instructions" section and download pre-compiled modules, if you have identical kernel + phone
built from SGH-I747M_BMC_JB_Opensource.zip (I747MVLDLK4, my phone) + latest Asix driver, works great!!!
https://www.dropbox.com/sh/3lrhwdf2vxe5z90/Hr3-nYX4Ff
built from SGH-I747M_BMC_JB_Opensource.zip (I747MVLDLK4, my phone) stock kernel driver, 'insmod's, but 'ping' is flaky?
https://www.dropbox.com/sh/u068760ytpsn0k1/3di6Wg44ja
built from GT-I930_JB_Opensource_Update7.zip (I9300XXELLA, requested by gingerneil), stock kernel driver, works great!!!
https://www.dropbox.com/sh/5emvafthv061fp6/BKcakiOie8
built from GT-I930_JB_Opensource_Update8.zip (EMR2, requested by gingerneil), stock kernel driver, untested
https://www.dropbox.com/sh/rmc1n4yxckg01zy/a2V5hvIp20
built from Cyanogenmod 10 for i9300, git commit 43aaedbcde478c8e032771d62a1956133b29b1d4, untested
https://www.dropbox.com/sh/n1tdiap4pi2vzm8/TKAj_lChXA
built from Android 4.1.1 for Galaxy Tab 2 (GT-P5110) kernel 3.0.31-523998, contact 'patelkes' if you have questions.
https://www.dropbox.com/sh/r0zkg5do2n3lyg3/fWWyhsz2qy
built from Android 4.? for Xperia Tablet Z ROM (10.3.1.C.0.136), contact 'kristouf666' if you have questions.
https://www.dropbox.com/sh/nxqo1ipkbojakls/eDLHXJzl5s
built from Cyanogenmod 10.1.3 for SGH-i747m, git commit ?
Work in progress
Build environment setup:
-Get root access on a Ubuntu Natty (11.04) or similar linux build machine / virtual machine
-Install standard unix compiler tools
apt-get install build-essential-Install library for menuconfig
apt-get install libncurses5-dev-Install lzop (android compression util)
apt-get install lzop-Install git
apt-get install git-Download Android toolchains using git
cd /root
git clone https://github.com/AdiPat/Android_Toolchains.git-Download samsung kernel SGH-I747M_BMC_JB_Opensource.zip (international model, etc, also available)... Or download your 3rd party Cyanogenmod,etc kernel SOURCE instead.
-Extract to /root/kernel
mkdir /root/kernel
cd /root/kernel
unzip SGH-I747M_BMC_JB_Opensource.zip-Set path so Android compiler can be found
export CROSS_COMPILE=/root/Android_Toolchains/arm-eabi-4.4.3/bin/arm-eabi-**EDIT: newer kernels, such as Cyanogenmod 10.2.1, use this
export CROSS_COMPILE=/root/Android_Toolchains/arm-eabi-4.6/bin/arm-eabi-
Compiling built-in kernel modules: (left for documentation sake, the better method is "Compiling latest drivers directly from Asix")
-Generate '.config' file in kernel folder (replace 'm2_att_defconfig' with name of file in 'arch\arm\configs\')
make arch=arm m2_att_defconfig-Modify kernel config to include Asix module and usbnet module
make menuconfig
[Navigate using arrow keys and enter]
Device Drivers ->
Network device support ->
USB Network Adapters ->
Multi-Purpose USB Networking Framework ->
[PRESS SPACEBAR until an M appears on the left]
[M] Multi-purpose USB Networking Framework
[M] ASIX AX88xxx Based USB 2.0 Ethernet Adapters
For reference here is the help info for the 2 options that are now set to 'M'
-Compile modules, where 2 is the number of CPU cores you have (speeds it up)
make -j2 && make -j2 modules-Once finished, grab your modules
/root/kernel/drivers/net/usb/usbnet.ko
/root/kernel/drivers/net/usb/asix.ko
Usage instructions:
-Use a root explorer such as ES File manager
Mount /system as rw in ES File manager root settings
copy asix.ko and usbnet.ko to /system/lib/modules/-Use a terminal emulator / adb shell to load modules (asix depends on usbnet, so load usbnet first)
su
cd /system/lib/modules
insmod usbnet.ko
insmod asix.ko-If there are errors, run 'dmesg' and see section called "Insmod errors"
-If there are no errors, you should see 'eth0' in 'netcfg'
-'lsmod' lists modules loaded
-Connect your USB ethernet adapter to an ethernet network
-netcfg should show eth0 as connected
-Setup ethernet settings, if you want static address, for typical internet router at 192.168.1.1
ifconfig eth0 192.168.1.100 netmask 255.255.255.0
route add default gw 192.168.1.1 dev eth0
setprop net.dns1 192.168.1.1
ip addr show
ip route show-Setup ethernet settings, if you want automatic dhcp address
dhcpcd eth0-If you want one-click enable of your USB, see section "usbnet widget"
Insmod errors:
exec format error : wrong compiler / wrong kernel source / wrong phone
init_module failed usbnet.ko (file exists) : module already loaded or built into kernel
no such file or directory : run dmesg immediately after attempt... you are missing module dependency
can't open usbnet.ko : are you root?
usbnet widget
Install Smanager
Download my usbnet script http://pastebin.com/zQRQ6Kdj
Use a quality notepad editor such as notepad ++ to edit, ensure line endings are "Unix"
Place in /system/lib/modules/usbnet *cannot be on sdcard, as sdcard is a windows filesystem*
In terminal emulator / adb: "chmod 777 /system/lib/modules/usbnet"
Open Smanager
-Menu -> Scripts
-Menu -> Browser -> /system/lib/modules/usbnet
-Ensure "Fav", "SU" and "is executable" are checked and give it a name 'usbnet', press save.
On homescreen, add widget, Smanager, pick your script 'usbnet'
You now have 1 click access to loading the modules, setting IP address, and testing connectivity to your router.
GT-9300 differences (thanks gingerneil)
Kernel source
GT-I930_JB_Opensource_Update7.zip
While building the kernel, the make config step is different
make arch=arm m0_00_defconfig
There is a third module built,
/root/kernel/drivers/net/mii.ko
Usage instructions, new order of operations
insmod mii.ko
insmod usbnet.ko
insmod asix.ko
/system/lib/modules is not persistent on this phone, instead store modules + usbnet script
/system/media
Compiling latest drivers directly from Asix
For some reason on my phone the stock kernel asix module did not work 100%.
I could insmod both modules, and using Wireshark, I verified my computer was receiving 'ping' packets, but the phone wasn't getting any 'ping reply' packets. This latest Asix driver works perfectly for me.
UPDATE:: http://www.asix.com.tw/FrootAttach/...0_772_178_LINUX_DRIVER_v4.13.0_Source.tar.bz2 is available, but I have not tried it!
Follow "Environment setup" above
Code:
cd kernel_src_folder
Generate kernel '.config' file (replace 'm2_att_defconfig' with name of file in 'arch\arm\configs\')
Code:
make arch=arm m2_att_defconfig
Code:
mkdir /root/asix && cd /root/asix
Code:
wget http://www.asix.com.tw/FrootAttach/driver/AX88772B_772A_760_772_178_LINUX_Driver_v4.4.1_Source.zip
Code:
unzip AX88772B_772A_760_772_178_LINUX_Driver_v4.4.1_Source.zip
Code:
rm -rf Makefile
# we are replacing the Makefile with a new one.... if you edit, ensure indents = TABS
Code:
wget [url]http://pastebin.com/raw.php?i=4xLxksX3[/url] -O Makefile
Code:
CROSS_COMPILE=/root/Android_Toolchains/arm-eabi-4.4.3/bin/arm-eabi- make
**EDIT: newer kernels, such as Cyanogenmod 10.2.1, use this
Code:
CROSS_COMPILE=/root/Android_Toolchains/arm-eabi-4.6/bin/arm-eabi- make
Follow the "usage instructions" above, but since this is an "all-in-one" module, remove references to 'usbnet'
Other informational Links
Thanks to viulian for his inspirational post here in regards to compiling external module.
If you want to compare your phone's kernel configuration to the one in the download source from Samsung, read this post:
To see the list of loadable and built-in modules, see this.
More information about compiling kernel modules / asix / other usb chipsets / other devices
Did you know that Asix now manages Moschip products? Looking for MCS7830 drivers?
Thanks to zhlvf for pointing this , there is a way to hack android to think Wifi is connected when an USB ethernet is plugged in... (solves issues in some apps, like google play / market, which ignore USB ethernet as a valid connection).
Make errors documentation
Model number and version code explanation (how to tell which samsung.opensource.com zip file to download)
https://www.kernel.org/doc/Documentation/kbuild/modules.txt
To get the active .config from a Cyanogen mod android,
Code:
adb pull /proc/config.gz
kevinf28 said:
Usage instructions:
-Use a root explorer such as ES File manager
Mount /system as rw in ES File manager root settings
copy asix.ko and usbnet.ko to /system/lib/modules/-Use a terminal emulator / adb shell to load modules (asix depends on usbnet, so load usbnet first)
su
cd /system/lib/modules
insmod usbnet.ko
insmod asix.ko-If there are errors, run 'dmesg'
-If there are no errors, you should see 'eth0' in 'netcfg'
-Connect your USB ethernet adapter to an ethernet network
-netcfg should show eth0 as connected
-Setup ethernet settings, if you want static address, for typical internet router at 192.168.1.1
ifconfig eth0 192.168.1.100 netmask 255.255.255.0
route add default gw 192.168.1.1 dev eth0
setprop net.dns1 192.168.1.1-Setup ethernet settings, if you want automatic dhcp address
dhcpd eth0
Click to expand...
Click to collapse
Hi,
I have tried to insert your modules (I have the 3.0.31 kernel on the international S3) - but I get "exec format error". This is after placing your files in right place, and running under root through terminal emulator. Any idea why I am getting this error, and how to get around it ?
gingerneil said:
Hi,
I have tried to insert your modules (I have the 3.0.31 kernel on the international S3) - but I get "exec format error". This is after placing your files in right place, and running under root through terminal emulator. Any idea why I am getting this error, and how to get around it ?
Click to expand...
Click to collapse
Unfortunately, you are not running an "identical" kernel. Linux is particularly fussy with kernel modules, it has to be a perfect match.
Android takes a generic 3.0.31 linux kernel and applies device specific patches. So my i747 3.0.31 kernel is not identical to your i9300 3.0.31.
I can build the modules for you, since I already have the environment setup. Please visit http://opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=i9300 and let me know which one sounds correct..
kevinf28 said:
I can build the modules for you, since I already have the environment setup. Please visit http://opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=i9300 and let me know which one sounds correct..
Click to expand...
Click to collapse
That would be fantastic - thanks. I am running the internation i9300 - so I would go with the top one -
GT-I9300_JB_Opensource_Update7.zip
But I'm not sure what may be different across the updates.
I assume that is doesnt matter which ROM I am running, and that a full Rom Manager backup would also backup my stock kernel ?
gingerneil said:
That would be fantastic - thanks. I am running the internation i9300 - so I would go with the top one -
GT-I9300_JB_Opensource_Update7.zip
But I'm not sure what may be different across the updates.
I assume that is doesnt matter which ROM I am running, and that a full Rom Manager backup would also backup my stock kernel ?
Click to expand...
Click to collapse
Kernel loadable modules are completely inert by themselves, so there is no need to worry about your phone bricking [but a backup never hurts].
If you build modules into the kernel itself on the other hand, its possible for the kernel to fail / panic / etc, so I don't plan on building any kernel packages.
Please see the OP for the 9300 modules. Hope they work! What is your full kernel version string and baseband version from "About Device" page?
kevinf28 said:
Kernel loadable modules are completely inert by themselves, so there is no need to worry about your phone bricking [but a backup never hurts].
If you build modules into the kernel itself on the other hand, its possible for the kernel to fail / panic / etc, so I don't plan on building any kernel packages.
Please see the OP for the 9300 modules. Hope they work! What is your full kernel version string and baseband version from "About Device" page?
Click to expand...
Click to collapse
It's giving a ' no such file or directory' error - even though the files are there and I'm running insmod from the dir as su. See terminal screen shot. thanks for the help!
Re: [Driver] Asix AX88772 kernel module
I updated the OP with insmod errors
It does look like GT-I9300_JB_Opensource_Update7.zip JB 4.1.2 matches your I9300XXELLA baseband version.
http://www.androidgalaxys.net/news-...gente-samsung-per-galaxy-s3-di-android-4-1-2/
http://www.androidgalaxys.net/appro...punto-esclamativo-rosso-come-nuovo-controllo/
kevinf28 said:
I updated the OP with insmod errors
It does look like GT-I9300_JB_Opensource_Update7.zip JB 4.1.2 matches your I9300XXELLA baseband version.
http://www.androidgalaxys.net/news-...gente-samsung-per-galaxy-s3-di-android-4-1-2/
http://www.androidgalaxys.net/appro...punto-esclamativo-rosso-come-nuovo-controllo/
Click to expand...
Click to collapse
Thanks - so it looks like I have some module dependancy issues. I'll take a look at dmesg and see whats going on. Seems strange though, if the zip does match everything...
Maybe I should go back to a stock ROM as I am currently running a de-odexed stock.
gingerneil said:
Thanks - so it looks like I have some module dependancy issues. I'll take a look at dmesg and see whats going on. Seems strange though, if the zip does match everything...
Maybe I should go back to a stock ROM as I am currently running a de-odexed stock.
Click to expand...
Click to collapse
It may be something trival, perhaps there is a third module you need for the international version.. I can't load your modules to test them, I get the exec format error . In regular linux, ldd is an amazing tool to list all the module deps, but unfortunately, it doesn't work for ARM, and arm-eabi-ldd does not exist in my toolchain.
[Edit: I have edited the OP, I rebuilt the modules and they do have some binary differences... give them a try as well]
Just curious... what are you using the USB-LAN adapter for with the USB-OTG?
CZ Eddie said:
Just curious... what are you using the USB-LAN adapter for with the USB-OTG?
Click to expand...
Click to collapse
Work does not allow wifi. I want to be able to download stuff without using data.
kevinf28 said:
It may be something trival, perhaps there is a third module you need for the international version.. I can't load your modules to test them, I get the exec format error . In regular linux, ldd is an amazing tool to list all the module deps, but unfortunately, it doesn't work for ARM, and arm-eabi-ldd does not exist in my toolchain.
[Edit: I have edited the OP, I rebuilt the modules and they do have some binary differences... give them a try as well]
Click to expand...
Click to collapse
Thanks - I'll give them a go. I went back to stock LLA ROM and it still didnt work.
---------- Post added at 03:24 PM ---------- Previous post was at 03:22 PM ----------
CZ Eddie said:
Just curious... what are you using the USB-LAN adapter for with the USB-OTG?
Click to expand...
Click to collapse
I'd like to use it for syncing files from my server without having to dig out my laptop to piggy back of its ethernet. Films can take an age to copy over wifi compared to LAN.
Having another go at getting the modules in. I am setting up the environment with the aim of compiling with the modules in and flashing the full kernel rather than adding via insmod....
gingerneil said:
Having another go at getting the modules in. I am setting up the environment with the aim of compiling with the modules in and flashing the full kernel rather than adding via insmod....
Click to expand...
Click to collapse
Cool. README_Kernel.txt is important, the make configure step is slightly different.
kevinf28 said:
Cool. README_Kernel.txt is important, the make configure step is slightly different.
Click to expand...
Click to collapse
OK - will see how I get on. Any tips would be great, as this will be my first attempt at compiling! The only linux based system I have it a raspberry pi connected to my TV running raspbmc. Currently seems to be running through the steps ok though.
Dmesg log attached - couldnt see how to attach on a pm!
gingerneil said:
Dmesg log attached - couldnt see how to attach on a pm!
Click to expand...
Click to collapse
Easy one, you are missing the 'mii' module,
<4>[ 3929.962119] c1 usbnet: Unknown symbol mii_nway_restart (err 0)
<4>[ 3929.962173] c1 usbnet: Unknown symbol mii_link_ok (err 0)
<4>[ 3929.962225] c1 usbnet: Unknown symbol mii_ethtool_sset (err 0)
<4>[ 3929.962270] c1 usbnet: Unknown symbol mii_ethtool_gset (err 0)
The pastebin link http://pastebin.com/wNaBWvZG references "Selects: MII [=m]"
On my phone, it didn't complain about mii, so i didn't think it was needed
https://www.dropbox.com/sh/5emvafthv061fp6/BKcakiOie8 has mii.ko, so load that first, then usbnet, then asix.
I also updated the OP to include a usbnet widget for one click module loading... that script would have to be modified to include insmod mii.ko
kevinf28 said:
Easy one, you are missing the 'mii' module,
<4>[ 3929.962119] c1 usbnet: Unknown symbol mii_nway_restart (err 0)
<4>[ 3929.962173] c1 usbnet: Unknown symbol mii_link_ok (err 0)
<4>[ 3929.962225] c1 usbnet: Unknown symbol mii_ethtool_sset (err 0)
<4>[ 3929.962270] c1 usbnet: Unknown symbol mii_ethtool_gset (err 0)
The pastebin link http://pastebin.com/wNaBWvZG references "Selects: MII [=m]"
On my phone, it didn't complain about mii, so i didn't think it was needed
https://www.dropbox.com/sh/5emvafthv061fp6/BKcakiOie8 has mii.ko, so load that first, then usbnet, then asix.
I also updated the OP to include a usbnet widget for one click module loading... that script would have to be modified to include insmod mii.ko
Click to expand...
Click to collapse
Fantastic - mods loaded, will test when I get home. Thanks too for the widget script!
Mods loaded and ethernet up and running - brilliant!
Only one issue now - I can't get the script to persist after a reboot unless it's somewhere like /sdcard0/download or on the extsdcard. It just gets deleted. I then can't get it to execute from there as I can't change the permission. Need to keep fiddling to find something that works. Minor issue tho!
Do the mods persist in /system/lib/modules ?
What about /data? That is your sdcard as ext4.
If all else fails...have you tried remounting /system as read only to force writes to disk? (Cache issue)
Sent from my SGH-I747M using xda app-developers app
hello,I am using tigra rom android 4.3...I can't change my dns with the usual method,both apps and manual in advanced setting ,,anyone can help me with this?
rulsfabre said:
hello,I am using tigra rom android 4.3...I can't change my dns with the usual method,both apps and manual in advanced setting ,,anyone can help me with this?
Click to expand...
Click to collapse
An article say, The Dns part of the 4.3 OS has been changed significantly, so the usual methode not working anynore
change Dns without root
ayahmayra said:
An article say, The Dns part of the 4.3 OS has been changed significantly, so the usual methode not working anynore
Click to expand...
Click to collapse
There is this app that without root change dns:
set google's dns
play.google.com/store/apps/details?id=com.dnset
pro user set dns:
play.google.com/store/apps/details?id=com.dnsetpro
adfadf89 said:
There is this app that without root change dns:
set google's dns
play.google.com/store/apps/details?id=com.dnset
pro user set dns:
play.google.com/store/apps/details?id=com.dnsetpro
Click to expand...
Click to collapse
thank bro!!!! it's working for me
Change your DNS servers in Android.
You can change the same thing on your rooted Android Device.
[email protected]:/ # ndc resolver flushif -- flushes old DNS servers
[email protected]:/ # ndc resolver flushdefaultif -- flush resolver
[email protected]:/ # ndc resolver setifdns <iface> <domains> <dns1> <dns2> ... -- Add the new servers
[email protected]:/ # ndc resolver setdefaultif -- Set as the default device
rulsfabre said:
hello,I am using tigra rom android 4.3...I can't change my dns with the usual method,both apps and manual in advanced setting ,,anyone can help me with this?
Click to expand...
Click to collapse
Change your DNS servers in Android.
You can change the same thing on your rooted Android Device.
With root privileges and a terminal app or (adb shell):
[email protected]:/ # ndc resolver flushif -- flushes old DNS servers
[email protected]:/ # ndc resolver flushdefaultif -- flush resolver
[email protected]:/ # ndc resolver setifdns <iface> <domains> <dns1> <dns2> ... -- Add the new servers
[email protected]:/ # ndc resolver setdefaultif -- Set as the default device
---
If you liked my post, then don't hesitate to hit the thanks button
I've been struggling with this issue in these days.
As you said, something is significantly changed in Android 4.3+
None of programs I tried so far worked.
This is my solution, not noob friendly!
adb shell
su
mount -o remount,rw /system
vi /etc/dhcpcd/dhcpcd-hooks/20-dns.conf
in vi editor you'll see set_dns_props() funtion which sets up dns servers when a wifi connection is established.
Code:
set_dns_props()
{
case "${new_domain_name_servers}" in
"") return 0;;
esac
count=1
for i in 1 2 3 4; do
setprop dhcp.${intf}.dns${i} ""
done
count=1
for dnsaddr in ${new_domain_name_servers}; do
setprop dhcp.${intf}.dns${count} ${dnsaddr}
count=$(($count + 1))
done
separator=" "
if [ -z "$new_domain_name" ]; then
separator=""
else
if [ -z "$new_domain_search" ]; then
separator=""
fi
fi
setprop dhcp.${interface}.domain "${new_domain_name}$separator${new_domain_search}"
}
as you see new_domain_name_servers contains dns servers array
add this line
Code:
new_domain_name_servers="8.8.4.4 8.8.8.8 $new_domain_name_servers"
function will be like below
Code:
set_dns_props()
{
new_domain_name_servers="8.8.4.4 8.8.8.8 $new_domain_name_servers"
case "${new_domain_name_servers}" in
"") return 0;;
esac
count=1
for i in 1 2 3 4; do
setprop dhcp.${intf}.dns${i} ""
done
count=1
for dnsaddr in ${new_domain_name_servers}; do
setprop dhcp.${intf}.dns${count} ${dnsaddr}
count=$(($count + 1))
done
separator=" "
if [ -z "$new_domain_name" ]; then
separator=""
else
if [ -z "$new_domain_search" ]; then
separator=""
fi
fi
setprop dhcp.${interface}.domain "${new_domain_name}$separator${new_domain_search}"
}
Edit: in vi editor
press i to edit mode. Make your changes then press esc. type :wq to write/exit
@ [email protected]:
Thank you very much, works in 4.4.2 on a LG G2, too.
(And if you use Root-Explorer, you don't need adb and vi, the File-Editor of Root-Explorer is easier IMHO.)
Needed that to use a home dnsmasq Server to access an internal owncloud Server with a router without NAT-Loopback.
PS:
A reboot is needed to make that work.
Override DNS for KitKat
bazon said:
@ [email protected]:
Thank you very much, works in 4.4.2 on a LG G2, too.
(And if you use Root-Explorer, you don't need adb and vi, the File-Editor of Root-Explorer is easier IMHO.)
Needed that to use a home dnsmasq Server to access an internal owncloud Server with a router without NAT-Loopback.
PS:
A reboot is needed to make that work.
Click to expand...
Click to collapse
Does it reliably work on 4.4.2? I'm surprised because I wrote an application which use the "ndc" command to override the DNS values.
I thought it was the only way...
P.S. My application is called "Override DNS for KitKat" and it's on the Play Store.
bazon said:
@ [email protected]:
Thank you very much, works in 4.4.2 on a LG G2, too.
(And if you use Root-Explorer, you don't need adb and vi, the File-Editor of Root-Explorer is easier IMHO.)
Needed that to use a home dnsmasq Server to access an internal owncloud Server with a router without NAT-Loopback.
PS:
A reboot is needed to make that work.
Click to expand...
Click to collapse
I am a terminal guy
Reboot is not required, just restart your wifi.
m.chinni said:
Does it reliably work on 4.4.2? I'm surprised because I wrote an application which use the "ndc" command to override the DNS values.
I thought it was the only way...
P.S. My application is called "Override DNS for KitKat" and it's on the Play Store.
Click to expand...
Click to collapse
Yes it does work on 4.4.2
Two additions:
1. IMPORTANT!
If you - as I proposed before - use Root Explorer to edit the 20-dns.conf file, Root Explorer will create a backup file called 20-dns.conf-bak. This file is parsed as well! So you have to delete that backup file if you don't want to have double definitions..
(I notices this, as my own DNSMASQ Server 192.168.2.222 was dns1 and dns2 as well...)
2. In order to avoid waiting for a timeout in another WLAN than my home WLAN, I wanted this custom DNS settings only to be applied in my own WLAN. So I wanted to include an if-condition that is only applied in my home-WLAN. As 20-dns.conf is some sort of bash file, I used the getprop function to find out how I could identify my own network. Unfortunately, there is no way to get the SSID, but something nearly as good: the Domain!
Type in a terminal on your android device:
Code:
$ getprop | grep domain
[dhcp.wlan0.domain]: [Speedport_W_921V_1_35_000]
(in my case.)
So I changed my /etc/dhcpcd/dhcpcd-hooks/20-dns.conf to only apply a custom DNS for that domain:
Code:
# Set net.<iface>.dnsN properties that contain the
# DNS server addresses given by the DHCP server.
if [[ $interface == p2p* ]]
then
intf=p2p
else
intf=$interface
fi
set_dns_props()
{
if [ "$new_domain_name" == "Speedport_W_921V_1_35_000" ]
then new_domain_name_servers="192.168.2.222 ${new_domain_name_servers}"
fi
case "${new_domain_name_servers}" in
"") return 0;;
esac
count=1
for i in 1 2 3 4; do
setprop dhcp.${intf}.dns${i} ""
done
count=1
for dnsaddr in ${new_domain_name_servers}; do
setprop dhcp.${intf}.dns${count} ${dnsaddr}
count=$(($count + 1))
done
separator=" "
if [ -z "$new_domain_name" ]; then
separator=""
else
if [ -z "$new_domain_search" ]; then
separator=""
fi
fi
setprop dhcp.${interface}.domain "${new_domain_name}$separator${new_domain_search}"
}
unset_dns_props()
{
for i in 1 2 3 4; do
setprop dhcp.${intf}.dns${i} ""
done
setprop dhcp.${interface}.domain ""
}
case "${reason}" in
BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT) set_dns_props;;
EXPIRE|FAIL|IPV4LL|RELEASE|STOP) unset_dns_props;;
esac
(you see the if-condition with the domain added...)
You can watch the settings with
Code:
$ getprop | grep dns
The settings are applied after a connection change, as [email protected] stated right.
PS: I don't use a Galaxy Note, but a LG G2, and not Android 4.3, but 4.4.
This seems to work in general, maybe the thread is better located in a general section than in a device-specific section?
Change DNS on kk 4.4.2 on 3G or 4G
Hello guys
i have been searching for a way to change my dns on kk 4.4.2 while on mobile date network but no luck is that anyone can help me to do that plz.
Thanks
Any methods that work for lollipop?
The script worked for my Samsung GS2 but my Moto XT1644 doesn't have a system/etc/dhcpcd directory. Is it OK to create the directory tree and copy a downloaded 20-dns.conf script into it? If so, would I need to set permissions for the modified script?
If you upgraded ROM in jagnm probably You have broken WiFi that cant connect to almost any hotspot. Check wifi advanced setting for mac - it's 00:00:00:00:00:00
I tried several ROMs - all except factory ROM had this issue. Going back to stock ROM on that device is bad idea, it's old and packed with bulky apps.
Finally I decided to go with unofficial lineage os 15.1 from here: https://vasy.ru/LineageOS-15/jagnm/
Rooted that with supersu, and started console (you can enable it in developer settings or use "adb shell" command from pc - that is more comfortable to write anything).
in console enter su, then bash, and check interfaces:
Code:
C:\adb>adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
jagnm:/ $ su
jagnm:/ # bash
jagnm / # ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
(...)
wlan0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 Driver bcmsdh_sdmmc
(...)
jagnm / #
in file /data/misc/wifi/config You will find that cur_etheraddr is set to all zeros,
Code:
jagnm / # cat /data/misc/wifi/config
btc_mode=1
mpc=1
roam_off=0
roam_scan_period=10
roam_delta=20
roam_trigger=-80
PM=2
cur_etheraddr=00:00:00:00:00:00
changing that line to anything restores wifi mac address on next interface restart, let's try:
Code:
jagnm / # sed -i "s/00:/11:/g" /data/misc/wifi/config
jagnm / # ifconfig wlan0 down
jagnm / # ifconfig wlan0 up
jagnm / # fconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:90:4c:c5:12:38 Driver bcmsdh_sdmmc
inet addr:192.168.1.251 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::290:4cff:fec5:1238/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:108 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20601 TX bytes:3720
Any change to that line helps to restore original mac address, You can also delete this file chmod it or directory to something unreadable, but it will be recreated to zeros on each restart and problem will come back. I needed to find a way to fix that permanently, I looked for any startup scripts but it seems that init_d is not working on lineage, I followed that guide to fix that: https://forum.xda-developers.com/lineage/general/how-to-enable-init-d-to-function-t3810355
With init_d there is script here: /etc/init.d/90userinit that looks for userscript here: /data/local/userinit.sh so let's put there same thing as above
Code:
jagnm / # echo 'ifconfig wlan0 down && sed -i "s/00:/11:/g" /data/misc/wifi/config && ifconfig wlan0 up' > /data/local/userinit.sh
jagnm / # chmod +x /data/local/userinit.sh
this will fix wifi mac on each restart. Of course You need to make all those each time You flash new rom, but it's not that frequent on so old phone with almost no updates. Probably I'll never use any sim card here, but wifi is best way to have internet on this device.
I hope that will help, it's old device and probably noone use that as main phone - with working wifi You can still find something to to for this device in home.
please report if this fixed problem on your lg g3s, what is Your ROM or if You have anyt other idea how to fix that config generating all zeros for mac address
Hi there. I know this has been a while since this post, but I have just found my old d722 today and decided to make a small multimedia centrem from it. Wanted to flash latest ROM and ended up with MAC 00... error
your solution here saved me. Thanks a lot
one question, I guess phone must be rooted to be able to run content of userinit.sh properly, right? For some reason I am unable to root my d722 and I think that is why I am not able to repair this MAC error permanently. Changing /data/misc/wifi/config via adb works perfectly but is gone after reboot as expected