I am using windows 7 and I need to Telnet to my android emulator to be able to run a location app. How would I go about doing that? The only tutorials I am finding have been for linux...
Use RAW as Connection Type and not Telnet.
Use the following parameters.
hostname: localhost
port: 5554
You 1st need to enable telnet because windows 7 has it disable by default:
http://www.itdoescompute.com/2009/10/29/how-to-enable-telnet-in-windows-7/
Alternative, download Putty # http://www.putty.org/ and connect to your Android. I believe its "localhost:5554"
You could simply connect to your Android via the ADB Shell instead of online; adb -e shell
How to use ADB Shell:
http://www.londatiga.net/it/how-to-use-android-adb-command-line-tool/
Launching an App, Answer by Cristian (view profile)
How to start an application using android ADB tools?
Related
In Linux I can call iwconfig to get the info about wifi spots. How can I obtain the same kind of information in Android?
The exact same iwconfig exists on Android too. You can connect into your Android phone using adb shell over USB and run the iwconfig command.
You can install adb shell on your PC. Here is the instruction - http://lifehacker.com/the-easiest-way-to-install-androids-adb-and-fastboot-to-1586992378
Connect your Android phone to your PC over UDB
Open Command Prompt
Run adb shell inside the Command Prompt
adb shell provides bash like shell to run command on the Android phone. Run iwconfig in the adb shell
iwconfig for Android ia also available from https://github.com/nvamelichev/wireless-tools-android
Android IS almost linux, you can install a terminal program. and run commans (I use JuiceSSH)
There is a command that is in almost all linux, and in Android too (My android have it)
IP Command
You can type ip addr, ip link, ip route and other parameters to set or get your address or other info, like routes
I know it is easy ,if I can use adb .
$ export ADBHOST=192.168.11.14(device's IP)
$ adb kill-server
$ adb start-server
in this status.I can use adb with wireless.so next,
$ adb shell am start -a android.intent.action.VIEW http://www.google.com
in this status. I can see google page in my android device .
I want to do it without adb. I want to develop a app which send a intent to one device via tcp without install any app. How can I do it?
You can't. Android doesn't wirelessly accept Intents from other devices, except via adb. It would be 100% insecure to do so- anyone could send any intent to anyone. It would be spam central. You need an app on both devices.
I would like to run automatized test on different Genymotion devices in the same time. For this I have to give seperate port numbers for each device.
Is it possible?
From the Genymotion Launcher, you are able to start multiple VMs. Although these each will have the same default port (5555), they will get different IP addresses from the VirtualBox host-only adapter. For example, I just launched two Genymotion machines and now adb devices shows:
$ adb devices
List of devices attached
192.168.56.101:5555 device
192.168.56.102:5555 device
$
Each can be addressed separately by specifying IP address and port in your TCP/IP socket program, or by using adb -s if you're doing manual command line work or writing scripts. I won't go into socket programming here, but here's a quick example of selective access using adb to see if the Location service is running on the second device:
$ adb -s 192.168.56.102:5555 shell service check location
Service location: found
$
we have android + linux m/c, we log in into linux shell and boot the machine in android GUI.
now we have the some script that is running on the same machine through linux shell. In that case when the script hangs we need to restart android machine. but it result into restarting the linux machine too. as they are on same machine. so i need the way to restart the android so it comes out of hang state and control remains on the script that is running through the linux shell.
so is there any adb or linux command that work for me?
Have you tried simply 'reboot' with adb?
adb reboot
Also you can run complete shell scripts (e.g. to reboot your emulator) via adb:
adb shell <command>
The official docs can be found here.
You can reboot the device by sending the following broadcast:
$ adb shell am broadcast -a android.intent.action.BOOT_COMPLETED
adb reboot should not reboot your linux box.
But in any case, you can redirect the command to a specific adb device using adb -s <device_id> command , where
Device ID can be obtained from the command adb devices
command in this case is reboot
I think the only way to do this is to run another machine in parallel and use that machine to issue commands to your android box similar to how you would with a phone. If you have issues with the IP changing you can reserve an ip on your router and have the machine grab that one instead of asking the routers DHCP for one. This way you can ping the machine and figure out if it's done rebooting to continue the script.
i want to learn how to mock up location in android device and develop a location based app. My problem is when I say adb shell in the command prompt it lets me go into the emulator with # symbol.
problem starts here
When I enter telnet localhost 5554 to telnet the device it says telnet: not found
what could be the problem?? am I doing something wrong?
you don't have to telnet with adb. Just use a normal command line window to type in telnet localhost 5554 - but don't enter adb before!
You don't have telnet installed.
In ubuntu install it by:
$ sudo apt-get install telnet