Motorola Droid Full Solution Updated

Italian Smile

New member
So far it's not working. I can ping wap.mycricket.com after running it but the browser fails to load webpages. I ran the script manually and it takes a while to run and then spits out a slew of errors; mostly getstockopt and FIX ME! errors. I'm running Android 2.2. Thanks for all your hard work WhiteRabbit!
 
I just updated u2nl.zip so it has a test.sh you can run manually. Instead of running iptables or u2nl, it uses echo to show what it would have run. If you can copy and paste the output of that it would be very helpful. If you use connectbot, press the menu button to do a copy and the dpad to select text. Then you can paste it with the browser here on hofo.

In case it is helpful to know this, I tested this script out on my g1 using cyanogenmod 5 on wifi and with my own home http proxy. Cyanogenmod might do things differently than the roms you guys use, and my home network will be different than Cricket.
 
working to get you some output now.

Cyanogen works fine on the eris (both 5 and 6), the only issue i had with cyanogen based roms was i had to edit my build.prop ONLY FOR MMS on the eris to have the correct MNC.

** EDIT **
test.sh hangs
also when i try to do
./test.sh > /sdcard/whiterabbit.txt
i get nothing as well
 
I added quicktest.sh which skips the loop at the beginning. If it fails to resolve wap.mycricket.com, it will never finish.

I'm wondering if you have nslookup in your rom. If not I can probably switch to using ping to get the ip addresses of hosts. The important part would be using ping successfully in the loop to know the network was working. Can you ping wap.mycricket.com and get replies?

I'm going to bed now but I'll check out your responses in the morning. Thanks for testing it, guys.
 
when i do nslookup to www.google.com i get
Code:
# nslookup www.google.com
nslookup www.google.com
Server:    0.0.0.0
Address 1: 0.0.0.0

nslookup: can't resolve 'www.google.com'
#

also i cannot ping www.google.com or wap.mycricket.com
going to try more but im heading home from work now

** EDIT **
sorry was a little busy at work while testing
i had the autostart.sh loaded when i tried the commands, which was sending the requsts to 0.0.0.0 (what it got when it tried to nslookup)
renamed the autostart.sh and rebooted (fresh start)
i am now able to ping wap.mycricket.com and www.google.com (only recieve responces from wap.mycricket.com due to the phone not knowing how to route through the proxy)
nslookup fails on both, comes back with 0.0.0.0
im assuming because i have no DNS servers set? but that doesnt explain how it is able to resolve wap.mycricket.com on the initial ping if no DNS is set.

going to tinker some more, and thanks again for all your help whiterabbit :)

** EDIT 2 **
even with the previous autostart.sh and web successfully working nslookup still returns 0.0.0.0 - cannot resolve

nameservers must be set somwhere, ill try to dig up where.

** EDIT 3 **
output from quicktest.sh:
Even though they are set to 0.0.0.0 MMS seems to be working better than ever lol !!
cant wait till this new script has the kinks worked out !!
Code:
# ./quicktest.sh
nslookup: can't resolve 'wap.mycricket.com'
nslookup: can't resolve 'mms.mycricket.com'
iptables -t nat -A OUTPUT -o rmnet0 -p tcp -d 0.0.0.0 --dport 80 -j DNAT --to-destination 0.0.0.0:80
iptables -t nat -A OUTPUT -o rmnet0 -p tcp --dport 80 -j DNAT --to-destination 0.0.0.0:8080
iptables -t nat -A OUTPUT -o rmnet0 -p tcp ! -d 0.0.0.0 ! --dport 8080 -j REDIRECT --to-port 1025
#
 
I got the new autostart.sh file to work by commenting out all the sections pertaining to MMSIP. Since my Droid has the MMS data running through APNs I didn't think it was necessary to have autostart.sh bother with it. Nice work on this file, man, I like how it assigns the IPs to the varibles. Nslookup works both on google.com and wap.mycricket.com. Everything looks good. For some reason the MMS part of the code confuses things.
 
token419: I don't understand why nsklookup isn't working for you. It should have nothing to do with u2nl, since dns is udp, and u2nl only helps programs that use tcp. Dns requests are normally needed any time you do just about anything. When autostart and u2nl are working normally, a program will do a dns request for www.google.com for example, then u2nl will connect to the http proxy and do CONNECT 1.2.3.4 or whatever google's IP is at the time. I guess I would like to see what happens when you boot up with the normal autostart.sh. Can you use "nslookup www.google.com" then? If not, can you visit www.google.com? If you can, I have no idea how that would work. Also are you setting your dns servers in QPST? I think they should be set to 0.0.0.0 so they are detected each time you connect to Cricket, but this really shouldn't be the problem if dns normally works for you.

XSYLUS: Things are looking a lot better on your end right now. My script isn't actually setting up MMS, it is just making an exception to MMS so that it is ignored by iptables rules that would have either sent it to u2nl, or directly to the Cricket proxy. I'm not even sure if it should connect to mms.mycricket.com on port 80 or 8080, or maybe something else.

The MMS stuff was the most experimental and least necessary. If the script works when you comment it out, that is pretty good news. It should work though if we give it the right hostname and port, and I'd like to figure out what is wrong there, but it isn't a high priority right now. I think I might actually take it out later on today and consider that an experiment for the future and just leave the rest of it for now. Have you done any speed tests for before and after? I think anything using http (like the browser/market/most music streaming/google maps) will be faster and more responsive now that they bypass u2nl.
 
insane66 did some digging and found that some roms ship a broken nslookup.

I have modified my scripts so that they use ping to find ip addresses. This should cause broken roms to work correctly, and unbroken roms like cyanogenmod to keep working the same.

My u2nl.zip now has updated scripts in place of the old ones, and the old ones are in beta/old in case anyone wants to look at those still. I don't plan on throwing anything out until everything works.

If autostart.sh doesn't work, I recommend using connectbot or a terminal emulator to run quicktest.sh. If quicktest.sh works, see if test.sh works the same or if it hangs. Both of the test scripts are modified to print iptables and u2nl command lines (with dynamic environment variables swapped in) rather than run them, so we can see what autostart.sh is actually doing.

EDIT: Please say what rom you are using when reporting results.
EDIT: I had to change everything to use ping instead of nslookup. At least in bugless beast, nslookup won't work even when told what the real nameservers are. The scripts are all new again.

EDIT: One last update. If autostart.sh works for you and you want to test more, you can try mmstest1.sh and mmstest2.sh. You just have to rename them to autostart.sh, reboot the phone, and then try to send and receive MMS messages. I need to know which one breaks MMS. Of course if MMS isn't working for you already, you can't test this. Once I know which one breaks MMS, I will know for sure if MMS needs to use port 80 or 8080 on mms.mycricket.com.
 
the latest autostart.sh runs and shows a few FIX ME! errors but browsing fails. Just out of curiosity with the original autostart.sh file instead of using tcp we used 6 and I also noticed ppp0 is no longer included. I'm not clear on everything is new file is doing but are we sure that the browser doesn't need to go through u2nl?
 
using the newest version i get:
Code:
Quicktest.sh results
# ./quicktest.sh
./quicktest.sh
iptables -t nat -A OUTPUT -o rmnet0 -p tcp -d 172.29.100.15 --dport 80 -j DNAT -
-to-destination 172.29.100.15:80
iptables -t nat -A OUTPUT -o rmnet0 -p tcp --dport 80 -j DNAT --to-destination 1
0.132.25.254:8080
iptables -t nat -A OUTPUT -o rmnet0 -p tcp ! -d 10.132.25.254 ! --dport 8080 -j
REDIRECT --to-port 1025
#

autostart.sh results
Code:
# ./betaautostart.sh
./betaautostart.sh
FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:372
FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:372
FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:372
#
both were done after a fresh reboot with no autostart.sh file present, i ran these scripts by hand after boot.

im wondering if my iptables is not supporting the variables, we see the echo command properly outputs the variable information, but for some reason when running the live command it seems to fail with the fixme stuff.

i am currently using ivanmmj's "Eris_Official 1.0 Alpha With Controllable Overclocking!"
http://forum.xda-developers.com/showthread.php?t=652044

going to try with a cyanogen based rom in a moment will update in a few.
 
Can you paste the results from test.sh?

Everything on Cricket needs to go through the Cricket http proxy. The new iptables rules forward http traffic directly to Cricket's http proxy, and non-http traffic gets forwarded to u2nl which turns it into fake https traffic.

Before these changes, everything went to the Cricket http proxy as fake https traffic from u2nl, which was overkill.
 
The fixme stuff is completely harmless. They are warnings, not errors. Like XSYLUS said, we used to use -p 6 instead of -p tcp, but in the end all that did was change the warning messages.

EDIT: Also, this actually works for you doesn't it? I use cyanogenmod on my g1 and get the same warnings. I should have said that earlier. It is normal.
 
Back
Top