Install actual android device not just skin on Android Studio/Virtual Machine - android

I am trying to run some tests of an Android application I am developing. The question I have is if it is possible to create an actual android device with its settings not just skins and the device's layout using Android Studio or a Virtual Machine, in order to see how application operates on other devices.
Would really appreciate if anyone could help.

You can use AVD Manager in Android Studio. You can create Android VM with it. You can customize :
What Android Version runs on it
The device screen size
memory
camera
storage
You can send custom inputs
Physically moving the device
Custom GPS coordinates
Send sms and call
Change battery level
etc
It is more than a skin, you can access the file system with adb, navigates the settings etc.
What you can't do is having the custom software layers made by manufacturers (i.e. OneUI from Samsung). It is stock Android

The emulator seems to be a standard qemu running a complete android system, so it's not only a skin.
If you want to test on real devices, you can have a look at Firebase Test Lab, which offers actual devices for testing, for a fee. See https://firebase.google.com/docs/test-lab/android/available-testing-devices on how to get the list of devices. Another option is Browserstack, which seems free for open source projects.

Related

Android Profiler alternative for older devices

In Android Studio 3.0 Android Monitor was replaced with Android Profiler, but it can't be used for pre-Lollipop devices.
Is there a way to watch CPU and memory real time data for older devices in Android Studio 3.0? I tried Android Device Monitor (under Tools->Android) but I can't find such a tool.
actually I was havign the same problem. The solution is to use the Android Device monitor, you can find it:
AndroidStudio -> Tools -> Android -> Android Device Monitor
Procedure
Restart adb, so that android device monitor can capture the device. You should see your device listed on Devices tab
After this select the process for your app, it should have the same package name.
Initiate method profiling recording by pressing
At this point your should run the app or activity that you would like to profile, when you're finished to use the app press
After stop you should have a new tab showing the trace file for captured process.
There you have it, now all you have to do is find the heavy cpu methods and look for optimization.
More reading:
https://developer.android.com/studio/profile/traceview.html
https://www.grapecity.com/en/blogs/android-method-profiling-with-ddms/

Android Virtual Device - Can't access basic OS features / Internet

I'm new to the Android OS and I am having trouble interacting with a virtual device. I've installed the Android SDK + Java + Eclipse and I'm trying to get a virtual device running and debug an apk I have.
I create a AVD and start it up and get this basic screen below but none of the other Android OS options you'd see on a standard phone. I can't even really control this device as the buttons seem to have no effect. I can't get into settings or see default installed applications, etc..
What am I doing wrong? I'd expect to have a basic clean Android OS startup when I launch these virtual devices but I get this funky screen and can't do anything with it, controls don't seem to work.
Worth noting I am doing this from a VMWare Workstation running Windows 2012 R2, not sure if there are issues if I'm running this all in a VM.
UPDATE:
OK so it appears I was using the Android 4.4W which I think is for wearable devices and why the OS was basically empty. I changed it to Android 4.4.2 x86 by cloning a Nexus 5 and now I just get a blank screen when I try to start the emulator. Here is a screenshot, any ideas?
Update:
You are using Android Wear API target, please try with regular android API (L preview or API 19 or below). I was able to reproduce your issue if i used Android Wear Target, it works if i used non-wear target. Android wear target is for 'wear' device types.
When configuring the AVD, you can pick different "skins" , please see below highlighted in redbox
If you are using a custom (or vendor) defined device type, go into AVD Manager -> Device Definitions and double-click your device entry, it will open the below window, make sure Buttons tab says Software
You can also navigate the emulator UI with keyboard shortcuts, often quicker this way.**
A. Ashoke is right about using skins, you may choose a skin when you create or edit the emulator. Here is a screen-shot. Check the 'skin' dropdown. (It may not be available for some 'devices' you select here.
You are using VMWare, so you might be behind a proxy. You may need to provide proxy, using following steps -
Click on Menu
Click on Settings
Click on Wireless & Networks
Go to Mobile Networks
Go to Access Point Names
Here you will Telkila Internet, click on it.
In the Edit access point section, input the "proxy" and "port"
Also provide the Username and Password, rest of the fields leave them blank.
When you will load it for the first time, it may again ask for your credentials. So provide there as well.

Android AVD features

I was reading the Android documentations, the AVD topic.
I have a question.. What's this means?
An AVD consists of:
You can choose a version of the standard Android platform or
the system image packaged with an SDK add-on.
Any thoughts?
This may refer to some of the manufacturer specific images. For example some devices are dual screen or have special hardware. This can be seen in the download/addon manager where there are references to LG and Samsung to name but a few.
Overall an avd is a simulation of an android device including the hardware configuration. You can have more than one, for example I have 3 to simulate different screen densities and android versions. They are great for testing and easy to setup via the avd manager, where you can also set other settings like the default avd.
To setup an avd instance go into eclipse or access via the android SDK folder (where ever you put it) both routes lead to the same GUI.

Does Developing Android Applications require a Rooted Device?

I am looking generally in to Android development.
I keep seeing information on root however I am unclear how this relates to general android app development.
I understand that there is an emulator however when I get to actually test the software on a phone does that phone have to be a rooted device or is this only required if you wish to edit the core features of the os?
Finally are there are any development disadvantages to rooting the device such as that is no longer behaves like other android phones I may deploy too?
Thank you
You don't need root to develop for Android.
The easiest setup is to run Eclipse with the Android Development Tools installed. Then, you can debug your application in the emulator, or register your phone with the SDK and debug directly on your phone. The only thing you need to do on your phone is check the development mode under Settings -> Applications
I can understand the allure of having a rooted device, but I can't really see a reason for changing the bootloader or os binaries. You can, however, change most of the default applications (including the Home application) with other applications available on the Market. For instance, OpenHome is about $5 and allows you to replace the home app, add themes, and replace many of the core apps (e.g. clock).
Rooting is only required, if you want to play around with advanced features or update your firmware, etc.
If you develop your software using the Android SDK you will be able to use it on your phone regularly (as long as you have the corresponding version). No rooting needed.
I have never heard of any problems according to your concerns. But I cannot deny that there are none. Though I personally don't expect that there are any problems with rooted phones.
On the Nexus S running Android 2.3, the /data folder is not visible in the DDMS File Explorer or the ADB shell, but it is visible in the emulator. This occurred with debug turned on in both the manifest and on the phone. I confirmed that debug mode was properly enabled by successfully stepping through the app using breakpoints and also by receiving messages from logcat.
Not being able to see the /data folder means that you will not be able to get your application's private data.

Why not standard Android emulators?

I'm new to Android, but have published iphone and bberry apps. I see that I have to create an emulator using the SDK, before I can write and test an app. Why are there no default emulators? Why not at least a Nexus one, or HTC hero emulator shipped with the product?
Sure its supposed to be flexible, but why not make it easy to create hello world and play around with a virtual Android phone? Both blackberry and iphone come with default simulators when you download the sdk.
Thanks,
Gerry
Since you can create an emulator configuration - or Android Virtual Device (AVD) - with three mouse clicks and typing a name I don't see too much wrong with the Android Emulator that ships with the SDK.
The reason that there's no Nexus One or HTC Hero emulator is that these ship with proprietary code which can't be given away free with the emulator.
The Sense UI that comes with the Hero is written by HTC only for their handsets and some of the Google Apps, such as Google Maps, GMail and YouTube are owned by Google and are not part of the Android Open Source Project. I believe Google charge handset makers for these apps and if they included them in the SDK then anyone could have them for free.
The SDK includes emulators for all currently released devices, you just have to create and name them.
To create a "Nexus One" emulator, you would create an AVD that is using the 2.1 SDK, and has a screen size of WVGA800. It's as simple as that.
It used to be this way, but was changed to make developers think about what platform version / configuration they are developing against (and to allow multiple platform AVDs to be created).
Here is a quick way to launch an emulator running cupcake:
$ android create avd -n android1.5 -t
$ emulator -avd android1.5
What about other features.... i would love to make my app work on all android devices but, i dont own all of them, just 1. So i have to create an avd for each possible hardware configuration(phone). meaning i have to track down the exact specs for say 5-10 phones? resultion, density, aspect ratio, input types, multi touch? proccessor FPU? some do some dont. etc etc. something needs done.
I'm confused by your question. The SDK ships with an emulator. You just have to create and configure an instance of it first through the SDK and AVD manager.
You can create appropriate avd using android (android.bat) in folder /tools of sdk. Also you can choose resolution, sd card, API level. It's really easy:)
If you want to write for Nexus - why not? Choose appropriate sdk level and enjoy.

Categories

Resources