Is it possible to get android device info (e.g. firmware version) from windows, when device is connected with PC by USB cable?
As I understand AT commands are not available. I was trying to use "adb", but I cannot see any usefull options. Maybe there is some text file with device info on the filesystem of the phone, so I could use "adb shell" to read this file?
Regards!
Use for example
adb -e shell getprop ro.build.display.id
to obtain something like
sdk-eng 2.1 ERD79 22607 test-keys
If you have more than one device or emulator, use
adb devices
to identify them and then use -s serialno in adb command line
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 found Kitkat version allow to record screen using adb commands, So i am trying to record video using adb shell command with below command.
Official Reference this
$ adb shell screenrecord/sdcard/video.mp4
i am using HTC Desire 620g , Driver is updated, USB debugging is checked, it's connected to windows system with MTP Mode.
also tried Revoke USB debugging authorisations.
but still cmd shows this strange behavior ..!
How to solve it..?
There is a space between screenrecord and the file path:
adb shell screenrecord /sdcard/recording.mp4
Then to download the file:
adb pull /sdcard/recording.mp4
Does anyone know how to make a device adb another device.
i.e
Device1 I create a folder apks and copy and paste 5 apk files.
then I use micro usb to micro usb to connect to another device.
then from device1 i adb all these 5 apk files to device2
using something like this a guess ?
adb install 1.apk & adb install 2apk & adb install 3.apk & adb install 4.apk & adb install 5.apk
I know this is possible as I know someone who does it. But their won't reveal how it is done. Thank you
AFAIK, connecting two android devices via USB is meaningless.
You can use adb over tcpip (over WiFi) in order to accomplish this.
Here is what you need to do:
Make sure both devices are on the same network. This can be done by connecting them to the same AP, by peering them together using WiFi direct or
by setting one of the devices as a hotspot and connecting the second to it.
Configure device 2 adbd to work over tcpip (this is done from your desktop shell):
adb tcpip <port number>
From device 1 shell run:
adb connect <device 2 ip>:<port number>
adb install 1.apk
adb install 2.apk2
and so forth...
I have tried the navigate to the android tool folder and entering the "adb shell" command but it doesn't seem to work. My terminal seems only to recognize the adb part of the command and gives me an error message. What am I doing wrong???
List all connected devices by typing adb devices
Check, if there are any devices listed. If not you may want to check that your device is connected and/or your emulator is running.
If it works and you have for example your emulator running and your usb-device connected use:
adb shell if you only have device connected.
adb -d shell to connect to an USB-Device.
adb -e shell to connect to an emulated device.
If you have more than one emulator or usb devices you might want to use:
adb -s <DEVICE> shell
Note:
Make sure that the path to the android-sdk is properly set-up in your environment. To quickcheck, fire up a shell and type adb version. If that command succeeds, you're set up. If not, add /path/to/android-sdk/tools and /path/to/android/platform-tools to your $PATH env variable. On windows the android sdk is typically located in C:\Users\<username>\AppData\Local\Android\sdk.
We are able to run instrumentation tests of Android from the command line on Windows by launching:
adb shell
am instrument -w <package.test>/android.test.InstrumentationTestRunner
This gives us good results.
Using the same architecture, we are unable to run the same in Kubuntu.
We have the same setup in Kubuntu.
Can someone let us know, if there are packages with same name.. Then what package will the adb shell point?
How will the emulator connect with adb shell from cmd line?
DO we need to do any changes to do so in Kubuntu ?
You need to explain what errors you are seeing.
If you have the same setup under Kubuntu, i.e. the Android SDK is installed, with tools like adb accessible in your path, then everything should work fine.
In response to your individual points (and these answers are the same on Windows, Mac or Linux):
It is not possible to have more than one Android package installed on a device or emulator with the same package name.
You can connect to the emulator — the same as for any device — by calling adb shell, e.g.:
adb -d shell if you have a single USB-attached device
adb -e shell if you have a single emulator running
adb -s emulator-5554 shell to specify a particular emulator (or device serial number)
You don't need to change anything between operating systems. The difference would be with setting up a device, as you need to modify udev rules on Linux, and install the USB driver on Windows