New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Doc_cheilvenerdi.org
Old
(Last edited by Doc_cheilvenerdi.org; 3rd January 2012 at 08:56 PM.) Reason: syntax error...
#81  
Doc_cheilvenerdi.org's Avatar
Senior Member
Thanks Meter 272
Posts: 111
Join Date: Oct 2011
Location: Ferrara - Ravenna
Default My Market NOW downloads!

Quote:
Originally Posted by stepph View Post
...Seems that leaving the 3g connection open, everything works - with no data exchanged on 3G connection ...
...I'll give it a try, and report !
Following your idea, I confirm () that leaving 3G connection up, after setting usb0 network I'm able to download from Market and to send/receive gmails!

P.S. Just sniffed 3G traffic while downloading 10Mb from Market via usb and I only received a Dns request from my 3G provider but my Next didnt respond to it... great!
The Following User Says Thank You to Doc_cheilvenerdi.org For This Useful Post: [ Click to Expand ]
 
flatzki
Old
#82  
flatzki's Avatar
Senior Member
Thanks Meter 804
Posts: 481
Join Date: Apr 2011
Location: Hamburg
thx for info dude
 
Doc_cheilvenerdi.org
Old
#83  
Doc_cheilvenerdi.org's Avatar
Senior Member
Thanks Meter 272
Posts: 111
Join Date: Oct 2011
Location: Ferrara - Ravenna
Default Tethering and Adb Shell...

Once started the USB Tethering on the phone you loose the adb connection from PC...

...it seems bothering but I figured out (here on this forum) that you can easily restore it with the following commands:

Phone Side
Code:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
PC Side
Code:
adb tcpip 5555
adb connect 192.168.0.101:5555
adb shell
That's all...

P.S. Last... to revert to "adb via USB" here are the commands:
Code:
setprop service.adb.tcp.port -1
stop adbd
start adbd
The Following User Says Thank You to Doc_cheilvenerdi.org For This Useful Post: [ Click to Expand ]
 
stepph
Old
(Last edited by stepph; 10th January 2012 at 10:18 AM.)
#84  
Senior Member - OP
Thanks Meter 31
Posts: 116
Join Date: Jul 2009
I try to re-do all i wrote here, matching the attached scheme...

This time, i prepared two scripts:

/system/xbin/usbtether.sh
Code:
 
#!/system/xbin/busybox sh
echo setting if...
ifconfig usb0 192.168.0.2 netmask 255.255.255.0 up
echo deleting route...
route delete default >/dev/null
echo setting route...
route add default gw 192.168.0.1 dev usb0
echo setting dns...
setprop net.dns1 AA.BB.CC.16
setprop net.dns2 AA.BB.DD.16
setprop net.usb0.dns1 AA.BB.CC.16
setprop net.usb0.dns2 AA.BB.DD.16
echo setting proxy...
setprop "net.gprs.http-proxy" "proxy.mycompany.com:8080"
echo check and report...
sh /system/xbin/netdebug.sh
echo set ADBD via tcp
setprop service.adb.tcp.port 5555
stop adbd
start adbd
/system/xbin/netdebug.sh
Code:
 
#!/system/xbin/busybox sh
# net debug info
busybox ifconfig  > /sdcard/usbtether_debug.txt
busybox route >> /sdcard/usbtether_debug.txt
getprop | busybox grep dns >> /sdcard/usbtether_debug.txt
getprop | busybox grep proxy >> /sdcard/usbtether_debug.txt
So :
1 - activate usb tethering.
2 - call usbtether.sh
3 - call netdebug.sh,
4 - check the output log

/sdcard/usbtether_debug.txt
Code:
 
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1440 (1.4 KiB)  TX bytes:1440 (1.4 KiB)
usb0      Link encap:Ethernet  HWaddr 96:0C:D0:21:53:9F  
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::940c:d0ff:fe21:539f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:634 errors:0 dropped:0 overruns:0 frame:0
          TX packets:110 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:143252 (139.8 KiB)  TX bytes:13237 (12.9 KiB)
 
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 usb0
default         192.168.0.1     0.0.0.0         UG    0      0        0 usb0
 
[net.dns1]: [10.9.55.16]
[net.dns2]: [10.9.2.16]
[net.usb0.dns1]: [10.9.55.16]
[net.usb0.dns2]: [10.9.2.16]
 
[net.change]: [net.gprs.http-proxy]
[net.gprs.http-proxy]: [proxy.mycompany.com:8080]

On PC side, i have:


Code:
>ipconfig /all
Configurazione IP di Windows
Nome host . . . . . . . . . . . . . . : <…> Suffisso DNS primario . . . . . . . : <…> Tipo nodo . . . . . . . . . . . . . . : Ibrido Routing IP abilitato . . . . . . . . : Ś Proxy WINS abilitato . . . . . . . . : No Elenco di ricerca suffissi DNS. . . . : <…>
Scheda Ethernet Connessione alla rete locale (LAN):
Suffisso DNS specifico per connessione: <…> Descrizione . . . . . . . . . . . . . : BroadcomNetXtreme 57xx Gigabit Controller Indirizzo fisico. . . . . . . . . . . : <…> DHCP abilitato. . . . . . . . . . . . : Ś Configurazione automatica abilitata : Ś Indirizzo IP. . . . . . . . . . . . . : AA.BB.CC.62 Subnetmask . . . . . . . . .. . . . . : 255.255.255.0 Gateway predefinito . . . . . . . . . : AA.BB.CC.1 Server DHCP . . . . . . . . . . . . . : AA.BB.CC.16 Server DNS . . . . . . . . . . . . . : AA.BB.CC.16 AA.BB.DD.16
Scheda Ethernet Connessione a Samsung GT-S5570:
Suffisso DNS specifico per connessione: Descrizione . . . . . . . . . . . . . : SAMSUNG Android USB Remote NDIS Network Device Indirizzo fisico. . . . . . . . . . . : <…> DHCP abilitato. . . . . . . . . . . . : No Indirizzo IP. . . . . . . . . . . . . : 192.168.0.1 Subnetmask . . . . . . . .. . . . . . : 255.255.255.0 Gateway predefinito . . . . . . . . . : Server DNS . . . . . . . . . . . . . : AA.BB.CC.16 AA.BB.DD.16
and

Code:
 
>routeprint =========================================================================== Elenco interfacce 0x1 ............................... MS TCP Loopback interface 0x2 .......00 21 9b ed e4 be ...... <…> Ethernet Controller - Miniport dell'Utilità di pianificazione pacchetti 0x3 .......00 23 4e 7e d3 ac ...... <…> Wireless controller - Miniport dell'Utilità di pianificazione pacchetti 0x10005 ...e2 01 c1 52 05 d5 ...... SAMSUNG Android USB Remote NDIS Network Device - Miniport … =========================================================================== =========================================================================== Route attive: Indirizzo rete Mask Gateway Interfac. Metric (destination) 0.0.0.0 0.0.0.0 AA.BB.CC.1 AA.BB.CC.62 20 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
AA.BB.CC.0 255.255.255.0 AA.BB.CC.62 AA.BB.CC.62 20 AA.BB.CC.62 255.255.255.255 127.0.0.1 127.0.0.1 20 AA.255.255.255 255.255.255.255 AA.BB.CC.62 AA.BB.CC.62 20
192.168.0.0 255.255.255.0 192.168.0.1 192.168.0.1 10 192.168.0.1 255.255.255.255 127.0.0.1 127.0.0.1 10 192.168.0.255 255.255.255.255 192.168.0.1 192.168.0.1 10
169.254.0.0 255.255.0.0 AA.BB.CC.62 AA.BB.CC.62 20
224.0.0.0 240.0.0.0 AA.BB.CC.62 AA.BB.CC.62 20 224.0.0.0 240.0.0.0 192.168.0.1 192.168.0.1 10
255.255.255.255 255.255.255.255 AA.BB.CC.62 AA.BB.CC.62 1 255.255.255.255 255.255.255.255 AA.BB.CC.62 3 1 255.255.255.255 255.255.255.255 192.168.0.1 192.168.0.1 1
Gateway predefinito: AA.BB.CC.1 =========================================================================== Route permanenti: Nessuno
everything seem ok...

... but nothing !!! i cannot browse!!

i tried also - on Next:

Code:
ping 192.168.0.1 => ok.. ping AA.BB.CC.1 => ok.. so i see my gateway ping www.google.it => name resolved (so my DNS is working) but NOK !!
since there is a proxy server, tracert on pc side does not work...

What is happening ? why some days ago it works ?

I installed - and then disintalled - apks like "ad block' and 'proxy masquerade'... may they have left some wrong configurations ?

someone can help ? some advice ?
Attached Thumbnails
Click image for larger version

Name:	rev_teth_scheme.jpg
Views:	74
Size:	56.6 KB
ID:	849007  
 
stepph
Old
(Last edited by stepph; 10th January 2012 at 10:20 AM.)
#85  
Senior Member - OP
Thanks Meter 31
Posts: 116
Join Date: Jul 2009
edited scripts in above post to insert adb shell via tcp/ip, according to Doc's instructions...

Also, added this scrip to revert back to normal adb

/system/xbin/resetadb.sh
Code:
 
#!/system/xbin/busybox sh
setprop service.adb.tcp.port -1
stop adbd
start adbd
ADB working now !

Thank you Doc !! - for private support too - i'm investigating... -
 
stepph
Old
#86  
Senior Member - OP
Thanks Meter 31
Posts: 116
Join Date: Jul 2009
Default Andorid VS Ubuntu

- Updates on my network configurations -

I tried to configure a network conection between my Ubuntu on Virtual Machine and the Host WinXP PC, in order to use Internt on Ubuntu...

Installed the Virtual Network Driver - act as eth cable between host and VM, i get a new eth interface on WinXP (IP 192.168.56.1, subnetmask 255.255.255.0, no gateway) and

Code:
 
stepph@Ubuntu-VBox:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:08:12:5b  
          inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe08:125b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:897 errors:0 dropped:0 overruns:0 frame:0
          TX packets:412 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:897977 (897.9 KB)  TX bytes:48459 (48.4 KB)
          Interrupt:10 Base address:0xd000 
 
stepph@Ubuntu-VBox:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.56.0    *               255.255.255.0   U     1      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
default         192.168.56.1    0.0.0.0         UG    0      0        0 eth0
on Ubuntu_VM, configured almost automaticaly by its tools...
Now, the VM is correctly browsing the web !!!

So I understand that forcing IP 192,168.0.1 for ICS is not needed ...

As DOC alredy suggested - i changed the usbtether.sh script, by removing the ifconfig line, , and after enabling tethering, and running the script (that set route, set dns, set proxy, enable adbd on eth) i have:

Code:
 
usb0      Link encap:Ethernet  HWaddr F2:B0:31:31:03:72
          inet addr:192.168.42.129  Bcast:192.168.42.255  Mask:255.255.255.0
          inet6 addr: fe80::f0b0:31ff:fe31:372/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:244 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:22871 (22.3 KiB)  TX bytes:1826 (1.7 KiB)
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.42.0    *               255.255.255.0   U     0      0        0 usb0
default         192.168.42.1    0.0.0.0         UG    0      0        0 usb0
Next side.

-> on pc-side, changing the IP configuartion of PC-to-Next eth IF
Code:
 
Scheda Ethernet Connessione a Samsung GT-S5570:
        Suffisso DNS specifico per connessione:
        Indirizzo IP. . . . . . . . . . . . . : 192.168.42.1
        Subnet mask . . . . . . . . . . . . . : 255.255.255.0
        Gateway predefinito . . . . . . . . . :
A scheme of configuration is reported in attached figure...
The routing table on the PC is - without any manual configuration :

Code:
 
C:\>route print
===========================================================================
Elenco interfacce
0x1 ........................... MS TCP Loopback interface
0x2 ...00 21 9b ed e4 be ...... Broadcom NetXtreme 57xx Gigabit Controller 0x3 ...08 00 27 00 a4 b4 ...... VirtualBox Host-Only Ethernet Adapter 0x10005 ...2a 6c 1c 31 2b ba .. SAMSUNG Android USB Remote NDIS Network Device ===========================================================================
===========================================================================
Route attive:
Indirizzo rete             Mask             Gateway       Interfac.  Metric
          0.0.0.0          0.0.0.0       AA.BB.CC.1     AA.BB.CC.62       20
 
       AA.BB.CC.0    255.255.255.0      AA.BB.CC.62     AA.BB.CC.62       20
     AA.BB.CC.62  255.255.255.255        127.0.0.1       127.0.0.1       20
  AA.255.255.255  255.255.255.255      AA.BB.CC.62     AA.BB.CC.62       20
 
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
 
   192.168.42.0    255.255.255.0     192.168.42.1    192.168.42.1       10
    192.168.42.1  255.255.255.255        127.0.0.1       127.0.0.1       10
  192.168.42.255  255.255.255.255     192.168.42.1    192.168.42.1       10
 
   192.168.56.0    255.255.255.0     192.168.56.1    192.168.56.1       20
    192.168.56.1  255.255.255.255        127.0.0.1       127.0.0.1       20
  192.168.56.255  255.255.255.255     192.168.56.1    192.168.56.1       20
 
  255.255.255.255  255.255.255.255      AA.BB.CC.62     AA.BB.CC.62       1
  255.255.255.255  255.255.255.255     192.168.42.1    192.168.42.1       1
  255.255.255.255  255.255.255.255     192.168.56.1    192.168.56.1       1
 
Gateway predefinito:         AA.BB.CC.1
===========================================================================
Route permanenti:
  Nessuno

Why Ubuntu is surfing, while the next gives error ?
[note: ping www.google.com gives error in every net, since my proxy do not let ICMP packet pass...]


Sniffing packets...
Attached Thumbnails
Click image for larger version

Name:	rev_teth_scheme.jpg
Views:	53
Size:	73.5 KB
ID:	854920  
 
stepph
Old
(Last edited by stepph; 13th January 2012 at 03:42 PM.) Reason: tried 3g
#87  
Senior Member - OP
Thanks Meter 31
Posts: 116
Join Date: Jul 2009
GET IT WORKING !!!

Using a proxy apps, i start to browse from my NEXT, passing trough Win XP LAN connection !!
Market works, but no download... some apps see the connection and dowload, some other still wait for wifi or 3g connection...

I'm goig to try with 3g connection open, in order to check market, and others...

...But i'll look for another way to set up a proxy....

---- edit ----

I tried openig 3g connection before usb tethering, and now i dowload from market, use facebook, and every app i tried see the connection.
From
Code:
# busybox ifconfig

pdp0      Link encap:Point-to-Point Protocol
          inet addr:1.80.237.86  P-t-P:1.80.237.86  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1350  Metric:1
          RX packets:82 errors:0 dropped:0 overruns:0 frame:0
          TX packets:101 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:58504 (57.1 KiB)  TX bytes:9834 (9.6 KiB)
usb0      Link encap:Ethernet  HWaddr DA:07:DA:BF:B4:5B
          inet addr:192.168.42.129  Bcast:192.168.42.255  Mask:255.255.255.0
          inet6 addr: fe80::d807:daff:febf:b45b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17302 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11510 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19403356 (18.5 MiB)  TX bytes:1775724 (1.6 MiB)
i see that the 3g net is used very little - just the time to activate tethering...

...GOOD...
 
cutedrummerboy
Old
(Last edited by cutedrummerboy; 29th January 2012 at 07:28 PM.)
#88  
Member
Thanks Meter 24
Posts: 52
Join Date: Oct 2011
hey stepph, i found something interesting for this thread. as my contribution i share this link check this out: http://particle.blurringexistence.ne...rtition-layout



thanks to Doc_cheilvenerdi.org for help me to find out this thread.
 
cutedrummerboy
Old
#89  
Member
Thanks Meter 24
Posts: 52
Join Date: Oct 2011
i have successfully backed up my bml5 or /efs partition with this method http://forum.xda-developers.com/show....php?t=1335548 now my question is can i flash this image with odin??


P.S. how can i open this .img file??
 
stepph
Old
#90  
Senior Member - OP
Thanks Meter 31
Posts: 116
Join Date: Jul 2009
Quote:
Originally Posted by cutedrummerboy View Post
i have successfully backed up my bml5 or /efs partition with this method http://forum.xda-developers.com/show....php?t=1335548 now my question is can i flash this image with odin??


P.S. how can i open this .img file??
can't help with flashing or unblocking....
... about open this file, can you submit first ten bytes ?
to check if it is a know header ?

Tags
backup, firmware, recovery, s5570