Originally Posted by sordna
It's possible with a rooted phone.
Actually it is, I found this thread
that describes how to do it on an optimus G phone, and based on that I was able to do in on vanilla android 4.3 as well (my rooted nexus 4).
You need to put a couple of scripts together, since you need a series of shell commands for turning this on and off, I recommend the wonderful SH Script Runner
Here is what I did on my Nexus 4. It works perfectly but note that you don't actually see the wifi icon turning on, but if you run "netcfg | grep UP" you will see that the wlan0 interface is up and running (as well as the rmnet_usb0 mobile data interface, both of them will be up and will have the expected IP addresses) and you can access your local LAN while your mobile data 3g/4g whatever provides your default route to the outside world.
# enable dual-networking:
svc wifi disable
svc data enable
netcfg wlan0 up
wpa_supplicant -B -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
ip route add x.x.x.x via x.x.x.y # add any desired local route
# disable dual-networking:
ip route del x.x.x.x/x via x.x.x.y
rm -rf /data/misc/wifi/wlan0
netcfg wlan0 down
svc wifi disable
svc data disable
Hi, Thanks for your share, I am currently developing an Internal app which need to have wifi and 3G/4G at the same time. I am using LG G2 and I have rooted it.
I try to follow the script you posted step by step here. However, it seems that right after pkill dhcpdc, svc wifi disable and svc data enable, when I execute netcfg wlan0 up,, it states that wlan0 not found.
I suspect I need to load the wifi driver first before execute netcfg wlan0 up, isn't?
(BTW, are you installing busybox on your phone so that you can have the pkill command)?
And also, by following the link you posted, the LG guy seems have loaded 2 drivers as well.
Should I also need to load these 2 files as well?