How to check Android OS version of bluestacks Emulator - android

I searched a lot for this in Google, but no hope, how to check the OS version of Bluestacks emulator in Windows? There is a video in YouTube for checking bluestack version, but not the Android version used in it.
I went to settings – > Advanced settings, but there was no tab corresponding to About tab which is found in an Android emulator like in the case of Genymotion emulator.

There is an easier way of getting to know the android version without having to install any application.
There are some scripts (php/js) that can detect your android version while visiting websites:
Try; http://demo.mobiledetect.net/ Or;
http://detectmobilebrowsers.com/

Install Terminal Emulator from Play Store, open the application and type:
getprop ro.build.version.release
you will get something like: 4.4.4 for KitKat.
or
getprop ro.build.version.sdk for getting the sdk version which will return 19

Open a browser in Bluestacks and go to http://demo.mobiledetect.net
I have tested this on multiple devices of which the Android version is known, and it is accurate.
Currently responds to Bluestacks as v4.4.2 (Kitkat)

Without any installation, you could use your adb commands.
For example, for your main emulator
adb -s emulator-5554 shell getprop ro.build.version.release
adb -s emulator-5554 shell getprop ro.build.version.sdk
For your multi emulators add up by 10,
adb -s emulator-5564 shell getprop ro.build.version.release
adb -s emulator-5564 shell getprop ro.build.version.sdk
adb -s emulator-5574 shell getprop ro.build.version.release
adb -s emulator-5574 shell getprop ro.build.version.sdk
//... so on
You could also do the shell commands by their local ip,
adb -s 127.0.0.1:5555 shell getprop ro.build.version.release
adb -s 127.0.0.1:5555 shell getprop ro.build.version.sdk
adb -s 127.0.0.1:5565 shell getprop ro.build.version.release
adb -s 127.0.0.1:5565 shell getprop ro.build.version.sdk
adb -s 127.0.0.1:5575 shell getprop ro.build.version.release
adb -s 127.0.0.1:5575 shell getprop ro.build.version.sdk
//... so on

just use Droid Info .. which gives you alot of Information quite easely.

Related

Android skip chrome welcome screen using adb

I am trying to skip the chrome welcome screen when running tests. The problem is other solutions that I have found like this one don't seem to work anymore.
Commands used:
$ adb shell pm clear com.android.chrome
$ adb shell 'echo "chrome --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line'
$ adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
The solution for me was actually a combination of the question and this answer. The solution can also be found in another question/answer, though it's not entirely clear.
The following should work:
$ adb shell am set-debug-app --persistent com.android.chrome
$ adb shell 'echo "chrome --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line'
$ adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
Some notes:
In the Chromium project documentation, it's mentioned that for the command line file to be used, the user should
"Enable command line on non-rooted devices" in chrome://flags
Setting Chrome as the debug application replaces this requirement.
In older device versions, the command line file was expected in /data/local. This folder is no longer writable from adb shell in non-rooted devices, so /data/local/tmp should be used instead. This is documented in this bug
In the ChromeSwitches.java current source code, only --disable-fre still exists. The other flags might be required in older Chrome versions, but I didn't verify.
What is your OS version? It is working on Android 10. You can try the below commands:
$ adb shell pm clear com.android.chrome
$ adb shell am set-debug-app --persistent com.android.chrome
$ adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main

Check if headless android emulator is running

I am running a headless emulator (Android api 25) on a Ubuntu linux 14 server and I see the below output for the command-
$./adb devices
List of devices attached
emulator-5556 device
However, If i try to run any other command I get error
$./adb shell dumpsys deviceidle get deep
Can't find service: deviceidle
$./adb shell 'pm list packages -f'
Error: Could not access the Package Manager. Is the system running?
How can i verify that my emulator is functional?
is adb devices -l not working? it should show you the status of the device as well
try adb push, for eg
adb push foo.txt /sdcard/foo.txt
or adb install for eg
adb -s emulator-5556 install apkname.apk
these commands will work with any running emulator/device
all these commands are available on the documentation

Android mismatch in Calculator package (emulator vs. real device)

I have a physical Pixel 2 XL device. The Calculator app on it is com.google.android.calculator. However, when I use a virtual Pixel 2 XL device (created via Andrdoid Studio's virtual device manager) the Calculator on it is com.android.calculator2.
Questions:
a/ What's the reason for this discrepancy?
b/ How can I create a virtual device with a Calculator app that is identical to the one on physical devices?
Virtual device:
$ adb shell getprop ro.build.version.release
8.1.0
$ adb shell getprop ro.build.version.sdk
27
$ adb shell getprop ro.product.model
Android SDK built for x86
$ adb shell pm list packages calc
package:com.android.calculator2
Physical device:
$ adb shell getprop ro.build.version.release
8.1.0
$ adb shell getprop ro.build.version.sdk
27
$ adb shell getprop ro.product.model
Pixel 2 XL
$ adb shell pm list packages calc
package:com.google.android.calculator

Android Emulator Jenkins Plugin not working

I am trying to use the Jenkins Android Emulator with Cloudbees and I am often experiencing this kind of output:
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb disconnect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb disconnect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
$ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:44194 shell getprop dev.bootcomplete
error: device offline
$ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:44194
[android] Timed-out after waiting 720 seconds for emulator
$ /opt/android/android-sdk-linux/platform-tools/adb disconnect localhost:44194
[android] Stopping Android emulator
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
$ /opt/android/android-sdk-linux/platform-tools/adb kill-server
Finished: NOT_BUILT
I am using andoird-19 as target but I have tried several.
I have also tried to reproduce the case on my local jenkins instance and it happens the same.
This gets worse when I try to load from snapshot: if I don't start from snapshot the emulator starts in the 50% of the cases, if I use the snapshots then it would always fail.
I am using emulator-arm as executable, since I read about some bugs with the 64bit version. Not sure it applies to r19 as well though.
Any idea?
The Jenkins Android Emulator issues I have had are legion. Here is a checklist to help:
1) You need the --all flag for both android list and android update sdk, otherwise some packages will not be installed: ex for SDK 24
1a)$ANDROID_HOME/tools/android list sdk --all
1b)
(for i in {1..100}; do echo y; sleep 1; done) |
$ANDROID_HOME/tools/android update sdk --no-ui --all --filter
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,24,25,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,79,80,81,82,82,84,85,101,102,103,112,113,117,118,119,120,121,122,123,124
If you get the dreaded /home/jenkins/android-sdk-linux/platform-tools/adb -s emulator-XXXX shell getprop dev.bootcomplete error: device offline error, you are likely missing a package in step 1b
2)Ignore the dreaded Failed to Initialize backend EGL display error, it is a red herring
3)Be sure to use the Advanced Emulator options:
Emulator Options: -no-audio -gpu off
Emulator executable: emulator64-arm
Startup delay: 10 -- this *may* help
4)a pre-build script ${ANDROID_HOME}/platform-tools/adb kill-server can't hurt
Good luck!
I started having the same problem after upgrading the Android Emulator plugin to 2.11.1. Downgrading to 2.10 via the plugin manager has proved itself to be an acceptable workaround for me.
Experiencing the same issue, using the Jenkins Android Emulator Plugin v2.13 with emulators running android-19 and above.
I found an open Jenkins ticket to fix the issue here.
Looks like a fix would require an update to the Android Emulator Plugin. In the meantime one workaround is to use a pre-android-19 emulator - I have not had the issue on android-16, android-17 or android-18 emulators.
An alternative workaround is to try downgrading the Android Emulator Plugin to v2.10, as #zachgeek suggested.

running multiple android emulators

I have more than one android emulator running, along with devices connected to the same machine.
I want to to know how to connect to a single emulator/device from the command prompt.
For example: adb shell emulator-5554
But that doesn't work.
You should use -s switch:
adb -s emulator-5554 shell
with the command
adb devices
you get a list of all connected devices like:
$ adb devices
List of devices attached
emulator-5554 device
emulator-5556 device
emulator-5558 device
Then you can run all commands normally, but you have to attach the -s option
e.g.
adb -s emulator-5556 install helloWorld.apk
Take a look at the tutorial if you want to know more about adb.
adb connect xx.xx.xx.xx
adb disconnect xx.xx.xx.xx
it can be X86 Emulators ;)
http://blog.gokifu.com/2011/05/android-x86-faster-emulator/

Categories

Resources