I'm using samsung galaxy fit (GT-S5670) with Android 2.3.4. Please tell me how to configure my phone to access internet through PC using USB cable connection. I'm using Broadband connection in PC.
How to get internet on your phone via USB
You may also call this reversed USB tether.
This might come in handy if you're near a computer (Win XP/Win7) and there's no Wifi to connect to etc..
So after some research and trying I've found some information on how to do this.
Requirements:
* Android 2.2 (or an older version with a root tethering app)
* ADB from Android SDK, or a rooted Android 2.2 with terminal in root mode
STEP 1:
Install USB drivers from Android SDK.
STEP 2:
Connect USB cable and activate USB Tethering.
You should see a new network interface. (On XP you might need to install the RNDIS driver manually, see below)
If you're also missing RNDIS driver on Win7, look here.
Win XP manual driver install Android USB Ethernet/RNDIS: (You can skip this if you're on Win 7)
1. Download the following configuration file inside the *.zip attached to this post (tetherxp.inf) to your Windows XP computer.
2. Use the USB cable that came with your phone to connect your phone to your computer.
3. On the Android phone, press Home > Menu > Settings to open the Settings application.
4. Press Wireless & networks > Tethering & portable hotspot.
5. Check USB tethering.
6. When Windows XP’s New Hardware Wizard opens, select No, not at this time and click Next.
7. Select Install from a list or specific location and click Next.
8. Click Browse to browse to the directory where you installed the configuration file you downloaded in Step 1 and click Next. Windows XP uses the configuration file to configure itself to support USB tethering with the Android phone. (This might take a while)
9. When Windows XP finishes installing the software for Android USB Ethernet/RNDIS, click Finish.
STEP 3:
Bridge the 2 network interfaces.
STEP 4:
Setup usb0 interface of your phone. You have to options:
1. From your computer, execute:
./adb shell netcfg usb0 dhcp
2. Or in a root terminal on your phone, type:
su
netcfg usb0 dhcp
You should now be able to connect to Internet on your phone using your computer's Internet connection.
Try to do a ping www.google.com to be sure.
STEP 5:
To shut down the reverse-tethering, first unbridge interfaces on your computer:
sudo ifconfig eth0 down
sudo ifconfig usb0 down
sudo ifconfig br0 down
sudo brctl delbr br0
sudo ifconfig eth0 up
sudo dhclient eth0
Then on your phone, uncheck the USB Tethering option.
Quote...
It is working now. After setting up ICS type in console emulator on your phone:
ifconfig usb1 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1 dev usb0
iptables -F
iptables -F -t nat
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
Hope this helps some one who wants this to the right direction.
And maybe we're able to create an app to do this all automated.
Known issues but does not apply to all users:
1. Internet in browser application does not work.
2. Can't ping domain name.
For a little more info check out the sources, this includes the Linux version too.
Please provide source OmarHasan76....
http://blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Related
Hi,
My name is Joe aka AndroidSamurai..
I have recently made some business acquisitions and will be starting up a new Android Learning series.. Stay tuned for updates..
Thanks again,
AndroidSamurai
Android4D Inc
I thought some people might appreciate the instructions to get adb working over WiFi too and this seems like a good place to put it:
Type this in your terminal emulator on your Android device:
Code:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
Then check it with this:
Code:
getprop service.adb.tcp.port
If it doesn't return "5555" and you're rooted, then do a "su" command and try again. You shouldn't need to be rooted for adb over wifi to work, but I haven't tried every device:
Code:
su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
Then check it:
Code:
getprop service.adb.tcp.port
When it returns "5555" then run this command in the terminal (or command prompt) on your computer:
Code:
adb connect 192.168.0.151
(Obviously enter your device's IP address. You must be on the same network as the computer that has the Android SDK installed.)
And you should be connected!
To tell the Android device to listen for adb on the USB port instead of TCP again, enter this into the terminal emulator:
Code:
setprop service.adb.tcp.port -1
stop adbd
start adbd
(again, might need "su" on your device)
Or just reboot the Android device.
And to tell your computer to use USB for adb instead of TCP:
Code:
adb usb
Now, keep in mind, when your Android device is listening for adb via WiFi, it's wide open... anybody that that the Android SDK installed and knows your device's IP address can access it without a password.
HTH,
Billy
PS - Your
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
are appreciated!
Updating Soon!
Pleased to announce that I will be updating my Full guide within the next few business days along with an E-book version and a Video Guide...
If my guide has helped you please help fund my college, donate.
Thanks for your help guys...
Moved My Guide!
Hey All,
I am pleased to announce that an updated version of my guide and soon to be All in one android E-book is on my website...
Link is in the first post, thanks to all at XDA over the yrs that have used my guide...
Cool, thanks. I plan on using this pretty soon. I really need to get better.
Sent from my SAMSUNG-SGH-I897 using XDA App
Moved my guide!
Hey All,
Sorry to inform you, but my guide has been moved to another site... I can not advertise because it is just not moral...
Click the link to take you to my new guide...
had a question
hi i was wondering if u could help with with a problem im having...i flashed my Tp2 over to boost and it was working fine..except for the web..so i changed the ppp cong and it rebooted..now i have a blue circle with a line through it..and when i try to connect i get a message that says" The process com.android phone has stopped unexpectedly. Please try again"....and theres no longer a connection for the usb in my contron planel......just tossing it out there to see if u had any ideas..thanks S
Updated..
My guide is now even more userfriendly...
Had to make a few revision changes to simplify the process...
I always connecting my phone through vpn using openvpn settings .
Before this it was just fine and working perfectly.
But today , this error turns out when I am connecting to the openvpn settings ...
Code:
reconnecting (caused by tls-error)
and it keeps reconnecting and reconnecting and again and again
I have tried reinstall tun.ko and openvpn binary and this error still turns out ..
I also have tried to wipe data , wipe cache , clear dalvik . and still error !
I hope any of you could help me
Proof it was just fine before
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
And now it turns out into an error and keep reconnecting
The tun.ko is taken at this thread
http://forum.xda-developers.com/showthread.php?t=1434300
THIS IS THE .OVPN CONFIGURATION
Code:
client
dev tun0
fragment 0
tun-mtu 9000
tun-mtu-extra 32
proto udp
cipher aes-256-cbc
engine dynamic
remote-random
remote 146.185.24.221
remote 146.185.24.251
remote 146.185.24.222
remote 146.185.24.197
comp-lzo
resolv-retry infinite
nobind
persist-key
ca mytunnel.crt
route-method exe
ping 10
port 137
reneg-sec 3600000
explicit-exit-notify 2
auth-user-pass auth.txt
verb 3
mute 20
Sent from U20i (x10 mini pro)
nAa kernel
minicm7 2.2.0
I followed this guide here for installing openvpn on android. unfortunately, i already had installed the 'wrong' openvpn client, so i need a way to run some post-connection scripts. i tried to do this, but it doesnt seem to want to run the script for whatever reason.
steps i took:
1. made sure the connection preferences allow for Built-in + scripts
2. wrote the post-connection script:
Code:
#!/system/bin/sh
netcfg tap0 dhcp
busybox route add -net 0.0.0.0 netmask 0.0.0.0 gw 10.0.0.1
3. added this line to end of my ovpn profile:
Code:
up /sdcard/openvpn/blah-up.sh
4. attempted to chmod blah-up.sh, but for whatever reason, it wouldnt flip the executable bit (no +x)
When I try to connect, the logs tell me the blah-up.sh script cannot run:
Code:
Thu Jun 20 15:39:42 2013 /sdcard/openvpn/blah-up.sh tap0 1500 1579 init
Thu Jun 20 15:39:42 2013 script failed: could not execute external program
I guess I'm assuming I can even use the up directive to do my dhcp request?
I tried it with 'su' and also tried with the absolute pathnames to netcfg and busybox, but nothing seems to work. Anyone have any ideas what I'm doing wrong? FWIW, running 'netcfg tap0 dhcp' as root from the terminal works fine.
Seems some of the user unable to get the ADB working on Android 4.2.2 as the command prompt always stated that the device is offline so now I open my first thread after I found out the solution
What is ADB?
ADB, or the Android Debug Bridge, is a development tool included with the Android SDK (Software Developer Kit), which allows for communication from an Android device (such as a phone or tablet) to a personal computer, and vice-versa. This communication can be made over a wifi connection. However more commonly, it is made via a USB cable. adb can also be used by developers for communicating from a computer to a virtual android machine that is also running on the computer.
Click to expand...
Click to collapse
Android 4.2.2 now enforces RSA authentication via ADB and this is only supported in the latest versions of ADB.
In Android 4.2.2 (which corresponds to CyanogenMod 10.1), Google implemented some new security features for using ADB. The new "secure debugging" feature requires that you manually approve your computer for an ADB connection. This approval must be done from within the device, and only after any screen lock has been bypassed.
To access your 4.2.2 or higher device via ADB, you MUST ensure you are using a recently-updated Android SDK. Once the SDK (and therefore ADB) has been updated, you must ADB kill-server and ADB start-server any existing ADB daemon running on your computer. The first time you try to connect via ADB, you should receive a prompt on your device to Allow USB debugging? for this device (along with an RSA fingerprint identifying the computer). You may select the Always allow from this computer check box if you want the device to remember this computer, in which case you will not be prompted again when connecting your device to that specific PC.
Click to expand...
Click to collapse
Information from GitHub
ADB with version of 1.0.31 or later will works for Android 4.2.2
In order to use ADB :
Go to the ADB directory. Example C:\android-sdk-windows\platform-tools
Shift + Right click and then click "Open command window here"
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
OR use the command in command prompt
Code:
cd C:\android-sdk-windows\platform-tools
NOTE : You can change the directory based on where you placed the ADB files in your computer by simply changing the command to :
Code:
cd <your directory>
To check for ADB version :
Code:
adb version
There are two ways of upgrading your ADB version
Upgrade through Android SDK Manager
Extract the ZIP file that I attached below to the directory you want (example C:\ drive) and redirect your command prompt to the specific directory using "Shift + Right click" or by using the command in command prompt :
Code:
cd <your directory>
Before upgrading your ADB :
After upgraded ADB :
If your ADB is working correctly, you will see this when you plug in for the first time.
NOTE : Cyanogenmod (based) ROMs require the following setting to export kernel logs via adb: Settings >> Developer Options >> Root access >> select "Apps and ADB"
NOTE : The RSA key for the host computer is stored in directory /data/misc/adb/adb_keys
After you press the OK button, in command prompt :
Code:
adb devices
NOTE : Some user reported that the ADB over network doesn't works if the option "Always allow from this computer" is not checked. So make sure you select the option if you want to use ADB over network
now you will get something like this and you are done...ENJOY
Some useful ADB command
Code:
adb shell
Code:
adb logcat
To get a normal logcat
Code:
adb logcat -v long > logcat.txt
OR
Code:
adb logcat -v time -d > logcat.txt
OR
Code:
adb logcat > logcat.txt
To get a radio logcat
Code:
adb logcat -b radio -v time -d > logcat_radio.txt
To get a kernel log
Code:
adb shell su -c dmesg > dmesg.txt
To get a last_kmsg
Code:
adb shell su -c "cat /proc/last_kmsg" > last_kmsg.txt
Reserved
ADB over network
Thank you for this great tutorial.
I've got ADB saying device is offline with ADB over network even with the latest version of ADB. See my post
In fact, if you try to connect over network for the first time, you won't get the popup.
So, make sure you connect with USB and check "Always allow from this computer" before connecting over network.
And if you are using Ubuntu you can get the latest adb via:
Code:
sudo apt-get install android-tools-adb
My adb drivers are installed and work but I can't connect through mtp. I know adb push works too but I was just wondering if there was a way to get it working? I have the option checked off in settings as well and I also tried disabling adb on my phone. MTP connects fine on windows however so it might be a ubuntu related issue...
jukiewalsh said:
My adb drivers are installed and work but I can't connect through mtp. I know adb push works too but I was just wondering if there was a way to get it working? I have the option checked off in settings as well and I also tried disabling adb on my phone. MTP connects fine on windows however so it might be a ubuntu related issue...
Click to expand...
Click to collapse
Check this:
edit
/lib/udev/rules.d/69-libmtp.rules
Adding the following entries did the trick:
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6765", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
Restart udev:
sudo service udev restart
That worked for me!
I cannot past links so, I pasted the solution. The source is GW TechBlog ( gazsiweb dot blosgpot dot com ) and askubuntu dot com "Ubuntu 14.04 MTP error"
Worked! Thank you
sidd3500 said:
Check this:
edit
/lib/udev/rules.d/69-libmtp.rules
Adding the following entries did the trick:
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6765", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
Restart udev:
sudo service udev restart
That worked for me!
I cannot past links so, I pasted the solution. The source is GW TechBlog ( gazsiweb dot blosgpot dot com ) and askubuntu dot com "Ubuntu 14.04 MTP error"
Click to expand...
Click to collapse
WOW...
Thank you man.. this helped me as well... already happily transfering files from my OPO
AweSome
Thanks sidd3500 that worked great.
:good::good:
Hey, I'm new to ubuntu, so I was getting a problem editting the .rules. The editor didnt allow me to save the editted file. Please help.
shrey1992 said:
Hey, I'm new to ubuntu, so I was getting a problem editting the .rules. The editor didnt allow me to save the editted file. Please help.
Click to expand...
Click to collapse
From the terminal type gksu gedit "whatever the file path is".rules
Is it feasible for ubuntu 12.04 ?
I am having version 12.04 Ubuntu , will this command work the same ?
Unnamed Device A0001
Hello, I am trying to connect the OnePlus One to a laptop (Acer Aspire S3) running Ubuntu, and I followed the steps provided (to add the two lines to 69-libmtp.rules and then restart udev).
Now indeed a file explorer window opens automatically after I connect the phone to the laptop via USB, but the title of the window is "Unnamed Device - A0001", and no files are displayed inside the window (not even after about 5-10 seconds of "spinning wait").
Do I need to enable something in my Android on the OnePlus One in order to be able to see and download the pictures from the phone?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hi,
I have edited the file as suggested in previous posts, also restarted udev and enabled usb debugging on device. still no luck reading phone content.
Please go through attached screenshot, any help will be appreciated.
Is this method works on OnePlus 3T in UBUNTU 17.04?
Should I have to use the same codes?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
NFO:
Code:
• Split APK Installer to install APK Bundles/Split APKs
• Portable
• Android Debug Bridge v1.0.41 (Version 33.0.2-8557947, May 2022)
• Full functional ADB (Android Debug Bridge) & Fastboot
• Double click the CMD.bat to easily open a Command Prompt
• Only 7.47MB (compressed 3.45MB)
Requirements:
Code:
• Windows OS
• PowerShell
• USB Driver for your Device or Universal ADB Driver - https://www.androidfilehost.com/?fid=2188818919693784734
Enable Developer Options & USB Debugging:
Code:
1. Install the USB Driver for your Phone or Universal Adb Driver.
2. On your Phone, go to Settings > About Phone. Find the Build Number and tap on it 7 times to enable Developer Options.
3. Now enter System > Developer Options and find "USB debugging" and enable it.
4. Plug your Phone into the Computer and change it from "Charge only" to "File Transfer" Mode.
5. On your Computer, browse to the Directory where you extracted the APK Bundle Installer Zip.
6. Launch a Command Prompt with Open CMD.bat.
7. Once you’re in the Command Prompt, enter the following Command: adb devices
8. System is starting the ADB Daemon (If this is your first Time running ADB, you will see a Prompt on your Phone asking you to authorize a Connection with the Computer. Click OK.).
9. Succesful enabled USB Debugging.
Usage:
Code:
1. Download APK-Bundle-Installer_vXXX.zip
2. Extract the Zip Archive
3. Place the APKs in the APKs Folder
3. Double click on APK Bundle Installer.bat
4. Type: y and hit Enter to start Streamed Install
5. You shoud see Success after Installation
————————————————————————————————
Downloads:
• GitHub
Unable to connect to ADB:
Code:
1. AMD Bug? - https://forum.xda-developers.com/t/fix-fastboot-issues-on-ryzen-based-pcs.4186321/
2. Switch Device from "Charging" to "File Transfer" Mode
3. Install the latest Device Driver or Universal USB Driver
4. Try another USB Cable
5. Use another USB Port (USB 3.0 Port to USB 2.0)
6. Try to execute Fastboot Command without connecting your Phone,
and once it says "waiting for device" plug in your USB Cable
7. Windows: Click "Change advanced power setting" on your chosen Plan and expand "USB Settings". Under "USB Settings" Section, expand "USB selective suspend setting" and change it to "Disabled" for On Battery and Plugged In.
8. Try another PC
Changelog v1.0.1:
• Updated Platform-Tools v33.0.2
• Few Thread Changes
Thanks for this