alex1491163117 / android-wifi-tether

Automatically exported from code.google.com/p/android-wifi-tether
0 stars 0 forks source link

Motorola Droid - Developing & Testing #205

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which device (manufacturer, type)?
Motorola Droid
Which firmware is installed?
2.0.1
What version of wireless tether are you using?
None yet

Can we use one of the existing versions on the Droid now that we have root?
Or will a new version have to be written? Thanks

Original issue reported on code.google.com by Love2Shred on 9 Dec 2009 at 7:23

GoogleCodeExporter commented 9 years ago
For the iptables kernel, and the supposedly working tiwlan.ko, check this out: 
http://www.sholes.info/wp-content/uploads/2009/12/2.6.29-omap1-hgb9fcbc3e35d9-di
rty-
wifi.tar.gz

Original comment by okeeff...@gmail.com on 18 Dec 2009 at 5:53

GoogleCodeExporter commented 9 years ago
Yes, that is my build of the kernel and wireless driver.

It contains most cpufreq modules, CIFS, NFS, netfilter, full nat, and some 
other 
things. config.gz support is compiled in if you need more information on that.

Original comment by mxcellm...@gmail.com on 18 Dec 2009 at 5:59

GoogleCodeExporter commented 9 years ago
So I'm a total noob for asking but how do we use this? Do I use flash_image to 
apply boot-
new.img and then copy tiwlan_drv.ko to some location?

Original comment by sonofsky...@gmail.com on 18 Dec 2009 at 6:15

GoogleCodeExporter commented 9 years ago
Honestly if you are not sure you should not, you can brick you phone. That said.
Use SirPsychoS's recovery image, perform a nandroid backup of you boot.img.
You must ensure recovery will not be automatically reflashed at every boot by 
disabling /
system/etc/install-recovery.sh and moving /system/recovery-from-boot.p
Flash the boot.img using flash_image boot boot.img and reboot.
Put the tiwlan_drv.ko in /system/lib/modules after backing up the old 
tiwlan_drv.ko.

Android Wifi Tether will not function at the moment, it locks up the phone.

PS. I am not responsible if you damage you phone.

Original comment by mxcellm...@gmail.com on 18 Dec 2009 at 6:27

GoogleCodeExporter commented 9 years ago
Thank you for the instructions. I have already backed up and restored 
successfully using 
sirpsychos recovery, so I know that's fine. I made sure to name the files as 
.old in case I 
need to reverse this. I can't get it to flash boot though, its saying error 
writing boot: 
permission denied. I'm doing this through adb. Any thoughts?

Original comment by sonofsky...@gmail.com on 18 Dec 2009 at 6:54

GoogleCodeExporter commented 9 years ago
@mxcellmike using our kernel and wifi modules I am still getting the following 
error
when running iptables. 

iptables -I FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
getsockopt for multiport failed strangely: No such file or directory
getsockopt for multiport failed strangely: No such file or directory
iptables: No chain/target/match by that name

@sonofskywlaker3 you could either remount system as rw or I find it easiest to
flash_image from sirpsychos recovery image. 

Original comment by keene...@gmail.com on 18 Dec 2009 at 6:57

GoogleCodeExporter commented 9 years ago
@mxcellmike I mean your kernel..pesky Ys do you have your .config handy? I 
would like
to diff it against harald.mue's .config

Original comment by keene...@gmail.com on 18 Dec 2009 at 7:01

GoogleCodeExporter commented 9 years ago
Sure. By the way, not _all_ netfilter targets and options are enabled. This 
kernel does 
not contain the NAND prefetching patch installed by [mbm] in the later commits, 
I 
didn't remember to update my local repo before compiling. Tonight after 7pm EST 
I 
should be available for IRC chat, progress would be much more streamlined that 
way.

Original comment by mxcellm...@gmail.com on 18 Dec 2009 at 7:24

Attachments:

GoogleCodeExporter commented 9 years ago
I am currently compiling a new kernel that will enable some additional options 
that 
will probably be necessary, eg. CONFIG_IP_ADVANCED_ROUTER. Please hold.

Original comment by mxcellm...@gmail.com on 18 Dec 2009 at 7:47

GoogleCodeExporter commented 9 years ago
Looks like at least 
# CONFIG_NETFILTER_XT_MATCH_MULTIPORT needs to be set to Y
I would suggest taking Harald's .config
http://android-wifi-tether.googlecode.com/files/adp-1_6-kernel-config.gz
and merging the netfilter area then recompiling. Unfortunately I am stuck on a 
low
bandwidth connection without my cross-compiler handy.

http://forum.soft32.com/linux/gentoo-iptables-error-ftopict333680.html

Original comment by keene...@gmail.com on 18 Dec 2009 at 7:48

GoogleCodeExporter commented 9 years ago
Kernel functions, iptables works without warning, FORWARD rule shown above 
inserts 
fine.

http://www.sholes.info/wp-content/uploads/2009/12/2.6.29-omap1-hgb9fcbc3e35d9-di
rty-
wifi.tar.gz

Original comment by mxcellm...@gmail.com on 18 Dec 2009 at 8:05

GoogleCodeExporter commented 9 years ago
Still crashes the device. Looks like TIWLAN does not handle bad data well.
Attached is a log from kmsg during the crash.
http://pastebin.com/db656ba6

And logcat
http://pastebin.com/d2b07c454

Original comment by mxcellm...@gmail.com on 18 Dec 2009 at 8:14

GoogleCodeExporter commented 9 years ago
Is that tar updated? I just tried flashing it and it said it had the same 
header data.

Original comment by keene...@gmail.com on 18 Dec 2009 at 8:16

GoogleCodeExporter commented 9 years ago
Check that your browser is not caching, but yes the tar has been deleted and 
reuploaded 
with a different one. The md5sum should be 1d6123c66cd2824617438030543d5f79.

Original comment by mxcellm...@gmail.com on 18 Dec 2009 at 8:25

GoogleCodeExporter commented 9 years ago
Hey guys. I'm sorry to say but I'm not able to update the app the next 3 weeks 
- I'm
on vacation. But I'm pretty sure we can get that thing working.

If you like to test with a "normal" script. You guys could try this one:
http://code.google.com/p/android-wifi-tether/source/browse/branches/0.9.7.1/res/
raw/tether

You have to edit some functions. For example the "startwifi()". This needs to 
load
the correct files and maybe some iwconfig-commands are missing. But a script 
can be
easily edited and it shows you how that stuff works.

If you have success on this you can be sure that there will be a new version out
within hours (after my vacation). I'm not able to test anything for droid (I 
don't
have one) but I'm willing to help whereever I can.

Original comment by harald....@gmail.com on 18 Dec 2009 at 9:05

GoogleCodeExporter commented 9 years ago
@mxcellmike It works. As of right now I am sending this message via the wireless
tether program. It is kind of a kludge right now and I am still trying to 
figure out
exactly what the process is to get this up and running. But, if you run the
application by clicking start tether and then runn the following script it 
seems to
bring up an ad-hoc network named android for about a minute. If you connect 
during
that time the tether program should give you an IP address and you should be 
good.
http://code.google.com/p/android-wifi-tether/downloads/detail?name=wireless_teth
er_1_70-alpha4_droid.apk

Original comment by keene...@gmail.com on 18 Dec 2009 at 9:17

Attachments:

GoogleCodeExporter commented 9 years ago
I too now have this working as well.  I was able to ping the outside world via 
the tether.  
Let me know how I can help further.

Original comment by afms...@gmail.com on 19 Dec 2009 at 12:58

GoogleCodeExporter commented 9 years ago
ok, so i am so close here. i've learned so much, and thank you everyone for 
your 
help. i've got the boot.img flashed (i think, is there any way to confirm?) and 
have 
alpha4 installed. i can open it and start a connection, but then when i go into 
the 
termial emulator and run:
sh /sdcard/test.sh
i get:
/sdcard/test.sh:  ./iwconfig: not found
and repeated for ./iptables. now i've learned enough to know that this means 
it's 
trying to run iwconfig and iptables from the current directory. i'm thinking 
this 
means i need to move the test.sh script to a different location, but i don't 
know 
where it should go. once again any help is much appreciated.

Original comment by sonofsky...@gmail.com on 19 Dec 2009 at 3:43

GoogleCodeExporter commented 9 years ago
just take out the ./

I think iwconfig and iptables should be in your path.. someone please correct 
me.

I intend to test this tonight too, but first White Castle and Jameson

Original comment by webacous...@gmail.com on 19 Dec 2009 at 4:08

GoogleCodeExporter commented 9 years ago
 Just attempted a test. However, after flashing to the sholes kernel I was without radio.

Original comment by osxnem...@gmail.com on 19 Dec 2009 at 10:43

GoogleCodeExporter commented 9 years ago
the full path is /data/data/android.tether/bin/

Original comment by webacous...@gmail.com on 19 Dec 2009 at 11:24

GoogleCodeExporter commented 9 years ago
put the test.sh in the above location. /data/data/android.tether/bin and run it 
from 
there.  you can check to see if the new boot.img loaded properly, by going to 
settings-
about- and looking at the kernel and build number

Original comment by afms...@gmail.com on 19 Dec 2009 at 4:03

GoogleCodeExporter commented 9 years ago
i ran the script from the above location and got the same message:
wifi tether is started and running, wifi is on, and the boot.img flash was 
successful.

# sh /data/data/android.tether/bin/test.sh
/data/data/android.tether/bin/test.sh: ./iwconfig: not found
/data/data/android.tether/bin/test.sh: ./iwconfig: not found
/data/data/android.tether/bin/test.sh: ./iwconfig: not found
/data/data/android.tether/bin/test.sh: ./iptables: not found
/data/data/android.tether/bin/test.sh: ./iptables: not found
/data/data/android.tether/bin/test.sh: ./iptables: not found
/data/data/android.tether/bin/test.sh: ./iptables: not found
#

Original comment by sonofsky...@gmail.com on 19 Dec 2009 at 5:33

GoogleCodeExporter commented 9 years ago
make sure that you have run su and you are a super user also make sure iwconfig 
and
iptables are in the /data/data/android.tether/bin/ directory and are executable 
just
run ls -l you should get back something like iptables -rwx-xr-x

Original comment by keene...@gmail.com on 19 Dec 2009 at 5:40

GoogleCodeExporter commented 9 years ago
ok, i probably don't have them in the directory, but if that's the case, where 
can i 
get them to put them there?

Original comment by sonofsky...@gmail.com on 19 Dec 2009 at 5:44

GoogleCodeExporter commented 9 years ago
Install the latest alpha of wifi tether posted on this thread

Original comment by webacous...@gmail.com on 19 Dec 2009 at 10:52

GoogleCodeExporter commented 9 years ago
I was able to use the new kernel and tiwlan_drv.ko file to bring up the 
connection as 
well. I'm currently working on a drop in replacement for the tether program in 
/data/data/android.tether/bin directory that would allow the app to work 
without shell 
commands.

Original comment by webacous...@gmail.com on 20 Dec 2009 at 5:22

GoogleCodeExporter commented 9 years ago
I changed the script around so it can run from the /sdcard directory. I also 
made it
so you don't have to bring up the wi-fi tether gui by running tether start from 
the
script. If you install gscript from Android Market and copy tether.sh into the
/sdcard/gscript folder, you can create a shortcut icon directly on your home 
screen
for one click tethering. 
@webacoustics looking forward to everything running from the bin. I downloaded 
the
source and have been playing around with the NDK to compile tether with the 
iwconfig
commands needed.

Original comment by keene...@gmail.com on 20 Dec 2009 at 6:08

Attachments:

GoogleCodeExporter commented 9 years ago
WOW, a lot of progress is being made, Thanks every one! 

Original comment by johnpete...@gmail.com on 20 Dec 2009 at 7:07

GoogleCodeExporter commented 9 years ago
Sorry guys, fell asleep.. here's a script, can anyone test this? Just push it 
to your
device's /data/data/android.tether/bin folder as "tether" (without the .sh), and
chmod it:

chmod 700 /data/data/android.tether/bin/tether

Then you should be able to run the script from the gui. I had this working for a
minute, but now the ad-hoc network isn't coming up anymore. Please let me know 
if
anyone has luck with this method.

Original comment by webacous...@gmail.com on 20 Dec 2009 at 11:31

Attachments:

GoogleCodeExporter commented 9 years ago
@keener2u I'll try your script with the vanilla install and see if that helps me
track down my ad-hoc issue. Thanks

Original comment by webacous...@gmail.com on 20 Dec 2009 at 11:33

GoogleCodeExporter commented 9 years ago
@webacoustics my script has the same issue. The device only comes up in Ad-Hoc 
mode
for a minute or two. If you connect to it with your computer it stays up. If 
not, you
have to rerun my script to bring the device back up for another minute.

Original comment by keene...@gmail.com on 21 Dec 2009 at 2:18

GoogleCodeExporter commented 9 years ago
Ok, I finished a script that works from the GUI, and instructions.. 
unfortunately,
google isn't letting me add them (probably due to length), so I posted them 
here:

http://www.droidforums.net/forum/droid-hacks/10219-tether-capability-android-wif
i-tether-wireless-tether-root-users.html#post88136

A technical note: I added code to restart the dnsmasq service because it wasn't
recognizing the resolv.conf file correctly.

@keener2u: This script probably has the same problem. I'm sure there's some 
setting
of the driver to specify a connection timeout for ad-hoc networks. I'll keep 
looking
for that. In the mean time, I think once the first device is connected, the 
network
will stay up. I'm going to try and add support for that, and WPA, and post an 
updated
tether-1.sh.

If you've already installed the updated kernel image from this thread, skip to 
the
last section of the post. I'm attaching the script here as well

Original comment by webacous...@gmail.com on 21 Dec 2009 at 5:05

Attachments:

GoogleCodeExporter commented 9 years ago
I'm going to work through the tutorial I posted to droidforums.net from start 
to end,
please let me know if you see any errors.

Original comment by webacous...@gmail.com on 21 Dec 2009 at 5:10

GoogleCodeExporter commented 9 years ago
Sorry, update here to remove the dnsmasq change-- it looks like its working 
without it.

Original comment by webacous...@gmail.com on 21 Dec 2009 at 5:53

Attachments:

GoogleCodeExporter commented 9 years ago
freaking sweet!! it finally works! posting from wifi connection now. thank you 
so 
much for your tutorial webacoustics, i dont know what i was doing wrong, but 
after 
wiping the phone and following that i am able to use it now. thanks everyone!

Original comment by sonofsky...@gmail.com on 21 Dec 2009 at 4:23

GoogleCodeExporter commented 9 years ago
Special thanks to mxcellmike for the kernel!

Original comment by webacous...@gmail.com on 21 Dec 2009 at 5:16

GoogleCodeExporter commented 9 years ago
eh guys when im installing kernal with this command 
`flash_image boot /sdcard/boot-new.img`

its giving me a        error writing boot:permission denied

any suggestions?

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 5:58

GoogleCodeExporter commented 9 years ago
Are you in super user mode? (`su` from the shell)

Original comment by webacous...@gmail.com on 21 Dec 2009 at 6:03

GoogleCodeExporter commented 9 years ago
yep i am

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 6:07

GoogleCodeExporter commented 9 years ago
One thing that worked for me was attempting the flash while in the recovery 
console on the 
phone.

Original comment by sonofsky...@gmail.com on 21 Dec 2009 at 6:26

GoogleCodeExporter commented 9 years ago
I'm having the same problem as saifshaya

error writhing boot: permission denied

I'm definitely root - got the # prompt.

Original comment by tash.rob...@gmail.com on 21 Dec 2009 at 6:27

GoogleCodeExporter commented 9 years ago
thanks sonofskywalker3 it worked from the recovery console.

Original comment by tash.rob...@gmail.com on 21 Dec 2009 at 6:30

GoogleCodeExporter commented 9 years ago
new issue when im doing this command
`cat /sdcard/tether > /data/data/android.tether/bin/tether`
it says no such file or directory

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 6:44

GoogleCodeExporter commented 9 years ago
Did you run the wifi tether app once already? If you don't it hasn't created 
that file/folder 
yet

Original comment by sonofsky...@gmail.com on 21 Dec 2009 at 6:46

GoogleCodeExporter commented 9 years ago
ya i did

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 6:48

GoogleCodeExporter commented 9 years ago
Interesting.. I'll update the guide

Original comment by webacous...@gmail.com on 21 Dec 2009 at 6:49

GoogleCodeExporter commented 9 years ago
If you downloaded the tether script from the tutorial and copied it straight 
its actually 
named tether.txt, so you need to rename it and remove the .txt or use the 
command cat /
sdcard/tether.txt > ...

Original comment by sonofsky...@gmail.com on 21 Dec 2009 at 6:55

GoogleCodeExporter commented 9 years ago
im still getting no such file directory

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 7:08

GoogleCodeExporter commented 9 years ago
how do i flash from the recovery console? i don't see a console option anywhere 
in 
recovery mode. did i flash the wrong recovery image maybe? recovery.0.14.1.img

Original comment by crdnil...@gmail.com on 21 Dec 2009 at 7:11