Can't Create Nexus 7 AVD - android

I am trying to create a Nexus 7 AVD. Regardless of the choices I make, I can not seem to actually create it since the OK button is greyed out.
The Choices I made:
AVD Name: Nexus7AVD
Device: Nexus 7
Target: Android 4.2 - API Level 17
Keyboard: Not present
Skin: Display
Front Camera: Emulated
Memory: RAM 1024, VM Heap: 32
Internal Storage: 200 MiB
SD Card: No selection
Emulation Options: Use Host GPU
What is wrong with the choices I made?
Thanks
Eric

Look at my picture, this worked for me.

I think you don't have system image installed in your IDE. Install System image by selecting Android SDK manager option and checked the system images for the targeted device you want.

You need the following:
AVD name - must exist and mustn't have any spaces (which is dumb cos you cant have 'Nexus 7')
Device
Target - API level, which you must have installed via Android SDK Manager
CPU/ABI - again needs to be installed via SDK manager (under your chosen API level you will have various system images eg ARM EABI v7a System image - these relate to CPU types. You need to install the one chosen i the dropdown, though I think if its not installed you dont get the option)
Skin - needed (choose WSVGA as the simplest, I think - but havent experimented with this)
The rest is optional I think. Have heard a suggestion that SDcard should be 'binary multiples' - eg 256, 1024 etc, but havent verified that (just added that as FYI - isnt needed to get the OK button visible).
With all that the OK button should be clickable.

Related

Android Studio: Ice Cream Sandwich (API Level 15) Device Configuration not showing up even though system image is installed

I am attempting to test an app on an ice cream sandwich device. To achieve this, I was hoping to run an emulator in android studio running API Level 15.
I have made sure to install the system image through the sdk manager and it correctly displays as installed in the manager as seen below:
Unfortunately, when I try to select the system image from the list in the Virtual Device Configuration menu, the option is not shown.
I've tried to look this up online, but the solutions seem rather unorthodox. Has anyone had this issue and found a solution for it?
I think this is a bug. Here is a workaround. After downloading API Level 15 Intel x86 Atom System Image, do the following.
Go to Standalone SDK Manager.
Select menu item Tools-> Manage AVDs...
Click "Create..." button.
Select "Android 4.0.3 - API Level 15" as Target.
Fill in other fields as appropriate, and click OK.
Now, you can go back to regular AVD Manager and start the AVD with API Level 15 image you just created. When you try to edit configuration, you may see error message "The specified SD image file must be a valid image file". If you do, just click Show Advanced Settings and go to "Memory and Storage section", find "SD card", and select "Studio-managed". Somehow, this selection won't stay, and you have to do this every time you modify configuration.

How to create Android-M Preview emulator?

I think I have installed all the system images required for android m preview, but still my emulator is showing nothing, its always blank. Please help me
After Suggestion i have downloaded the other requirements, but still its not working
You have sufficient files to create the emulator might be you are editing the existing emulator, i suggest try to create a new emulator, and try to keep the Ram consumption lower to get better performance.
Refer from the above link you can create your new emulator by following below steps
Step-1: Go to Android SDK folder and run AVD Manager. Click on Create
Note: Use default value for Max VM application heap. As Android supports variety of displays, you can explore with different devices by selecting in Device: dropdown
Step-2: Select the virtual device which you just now created and click Start
Step-3: Do not make any change under Launch Options and click on Launch button
Step-4: Emulator will start a few Command Prompt windows flicker. You should now see the following screen, with the Android device booting up, which will take about five minutes
Step-5: You should now see a screen saying Emulator has been successfully installed
Your Windows/Mac PC should now be ready to get started with the Developer Preview.
Go to Android SDK manager you need to download the Android m preview section.Then follow these steps
Step 1: Run AVD Manager and click on Create.
Note : Select a small resolution screen if your RAM is low.It will be a plus in case of performance part.
Step 2:Enter the Ram value to 1Gb if your system(Computer)RAM is about 4gb or RAM value as 2gb your system(Computer)RAM is about 6gb or 8gb.
Step 3:Select the device which you created now, press Start and select Launch Button.
Step 4:You should get a alert box showing that Successfully installed.
Step 5:An android device with android device booting up screen will be appeared and it will take time depending upon the RAM you allocated at the time of creating the Android Device in AVD.
NOTEmake sure not to run too many another programs while you trying to launch or using the emulator.(make sure the IDE is uptodate)
Happy Android M Preview....
If you want to create MNC(Android M Preview) emulators, you could follow these steps:
1, Of course, downloads MNC System images. Open SDK Manager, select images like Android TV Intel x86 Atom System Image, ARM 64 v8a System Image, ARM EABI v7a System Image and something like that.
2, open AVD Manager by clicking the button on the top of Android Studio. Then you will see "Your Virtual Devices" window.
3, Click the button of "Create Virtual Device" at the left bottom of the window. Then you will see "Select Hardware" window.
4, then select the category and name of the emulator you want, and then "Next".
5, if you have succeeded downloading MNC System Images, you will see them from the "API Level"
6, and then click "Next", you will see "Android Virtual Device(AVD)" window, you can change settings if you want to.
7, click "Finish" and wait, util emulators are prepared.
I had the same problem,
I copied the system image from the default directory:
C:\Users\eli\Downloads\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\system-images\android-MNC\default\arm64-v8a
to the image root dir:
C:\Users\eli\Downloads\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\system-images\android-MNC\arm64-v8a
I restarted eclise, and now, I could see the android M and the arm64 system image.

How to test Android lock-screen widgets in an emulator?

It doesn't seem to work. I looked at the solution proposed here: Android emulator 4.2.2 not showing add widget option in lock screen but without success. Using the rev1 image (as the rev2 has a bug, filed here: http://code.google.com/p/android/issues/detail?id=58548)
No way that I get that '+' sign... Ideas?
Of course, the project is using Android 17.
Use power button but set some lock screen (swipe for example) in Android settings before.
With the following combination, it's now working for me.
Install: Run Android SDK Manager. In the "Android 2.2.2 (API 17)" section, install Intel x86 Atom System Image. It offers Rev. 1. Also download, install, then finish installing Intel HAXM, if you haven't done that already. You might need to allocate more RAM to HAXM. IIRC, I have it set to 2 GB.
(Android SDK Manager has Rev. 2 of ARM EABI v7a System Image. According to Android emulator 4.2.2 not showing add widget option in lock screen, lock screen widgets work in Rev. 1 but not Rev. 2. I didn't test the ARM system images.)
Create an AVD with these settings:
Device: Galaxy Nexus (4.65", 720 x 1280: xhdpi)
Target: Android 4.2.2 - API Level 17
CPU/ABI: Intel Atom (x86)
Skin: Skin with dynamic hardware controls
Memory options: RAM: 768, VM Heap: 64
Internal Storage: 200 MiB
SD Card: Size: 100 MiB
Emulation Options: [x] Use Host CPU
Add a lock screen widget:
Launch this emulator AVD.
Run your app in this emulator.
If you need to get to the lock screen, press the simulated power button twice (off, on).
On the lock screen, swipe down on the clock widget. It should grow a large rectangle. Release the mouse.
Swipe to the right until you get to the "+" screen.
Tap the "+" then pick your widget from the list.
NOTE: Android L does not support lock screen widgets. The feature is gone.
I hope this works for y'all. There may be more independent variables, and the above configuration is surely not the only one that works.
To reach the lock screen of Android Emulator, in recent emulators (using Android Studio 2.3) just click the "power" button in the Emulator. You'll get a black screen. Click it again and there it is, your lock screen.
Press(rather click :) ) the power button twice on the emulator. This will make it go into lock mode.After that , click on lock button again, the phone lights up with you asking to provide pin/finger print/pattern in case you had put them in your unlocking. Hope this helps..
Yes it does not seem to work with my AVD. But it works with genymotion. Maybe you can try it. Download it from http://www.genymotion.com/.

Samsung Galaxy S II AVD (Android Virtual Device) Basic Settings?

I would like to create an AVD of the Samsung Galaxy S II. The sole purpose is to test websites with it's default web browser to see how they look in both portrait and landscape mode.
As it's now the most popular Android smartphone, I'd like to test it with my websites.
I would just like to know the most basic settings so I can get at least a rough idea. I'm using the Andriod SDK with the GUI frontend.
I'm looking for those settings that come up after you click "New" in the Andriod Virtual Device Manager.
For example:
Target:
SD Card:
Skin:
Hardware:
Abstracted LCD Density
Max VM application heap size
Device RAM size
Etc.
I tried Samsung's online remote test lab but I've found that too restrictive (can't seem to use it at Internet hotspots that have certain ports closed), slow to start and I just end up with blank black screens anyway. So, I'd really prefer to just run my own version as an AVD.
The interface to the AVD manager has changed. So there are changes needed to the process. Rather than a single file, there's now both a device definition and a virtual device definition. Unfortunately, the UI doesn't give full control over the contents of either.
These instructions work with the Android SDK Tools revision 21. They make reference to Windows 7 paths. If you're using a different OS, you'll need to figure out where the files live.
Follow the steps from mwalter up to step 6 (to get the appropriate skins). Then do the following:
Within the Android Virtual Device Manager, click on the Device Definitions tab and press "New Device"
Type the name "Samsung Galaxy SII" (the name must be exact for the following files to work. If you change it, be sure to make the equivalent changes to the names in the following files.)
Fill in the screen size, resolution and RAM. We're going to override the contents, so values don't really matter, but correct ones are:
Screen Size: 4.3
Resolution: 480 x 800
RAM: 1024
Density: hdpi
Buttons: Hardware
Hit Create Device, then close the AVD Manager
Open the file C:\Users\[user name]\.android\devices.xml in your favorite XML editor
Replace the <d:device>...</d:device> element having the name "Samsung Galaxy SII" with the following:
<d:device>
<d:name>Samsung Galaxy SII</d:name>
<d:manufacturer>Samsung</d:manufacturer>
<d:meta/>
<d:hardware>
<d:screen>
<d:screen-size>normal</d:screen-size>
<d:diagonal-length>4.30</d:diagonal-length>
<d:pixel-density>hdpi</d:pixel-density>
<d:screen-ratio>long</d:screen-ratio>
<d:dimensions>
<d:x-dimension>480</d:x-dimension>
<d:y-dimension>800</d:y-dimension>
</d:dimensions>
<d:xdpi>216.97</d:xdpi>
<d:ydpi>216.97</d:ydpi>
<d:touch>
<d:multitouch>jazz-hands</d:multitouch>
<d:mechanism>finger</d:mechanism>
<d:screen-type>capacitive</d:screen-type>
</d:touch>
</d:screen>
<d:networking>
Bluetooth
<!--NFC (put this back in if you have an S2 model that supports NFC-->
Wifi
</d:networking>
<d:sensors>
Compass
Accelerometer
GPS
ProximitySensor
LightSensor
Gyroscope
</d:sensors>
<d:mic>true</d:mic>
<d:camera>
<d:location>back</d:location>
<d:autofocus>true</d:autofocus>
<d:flash>true</d:flash>
</d:camera>
<d:keyboard>nokeys</d:keyboard>
<d:nav>nonav</d:nav>
<d:ram unit="GiB">1</d:ram>
<d:buttons>hard</d:buttons>
<d:internal-storage unit="GiB">16</d:internal-storage>
<d:removable-storage unit="GiB">32</d:removable-storage>
<d:cpu>Generic CPU</d:cpu>
<d:gpu>Generic GPU</d:gpu>
<d:abi>
armeabi-v7a
armeabi
</d:abi>
<d:dock/>
<d:power-type>battery</d:power-type>
</d:hardware>
<d:software>
<d:api-level>10-</d:api-level>
<d:live-wallpaper-support>true</d:live-wallpaper-support>
<d:bluetooth-profiles>
HSP
HFP
A2DP
AVRCP
OPP
PBAP
HID
</d:bluetooth-profiles>
<d:gl-version>2.0</d:gl-version>
<d:gl-extensions>
<!-- No clue why the tool is unhappy declaring these, but it is. (Doesn't complain about their presence in the 'official' devices.) Comment them out for now.
GL_OES_rgb8_rgba8
GL_OES_depth24
GL_OES_vertex_half_float
GL_OES_texture_float
GL_OES_texture_half_float
GL_OES_element_index_uint
GL_OES_mapbuffer
GL_OES_fragment_precision_high
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_EGL_image
GL_OES_EGL_image_external
GL_OES_required_internalformat
GL_OES_depth_texture
GL_OES_get_program_binary
GL_OES_packed_depth_stencil
GL_OES_standard_derivatives
GL_OES_vertex_array_object
GL_OES_egl_sync
GL_EXT_multi_draw_arrays
GL_EXT_texture_format_BGRA8888
GL_EXT_discard_framebuffer
GL_EXT_shader_texture_lod
GL_IMG_shader_binary
GL_IMG_texture_compression_pvrtc
GL_IMG_texture_npot
GL_IMG_texture_format_BGRA8888
GL_IMG_read_format
GL_IMG_program_binary
GL_IMG_multisampled_render_to_texture
-->
</d:gl-extensions>
<d:status-bar>true</d:status-bar>
</d:software>
<d:state default="true" name="Portrait">
<d:description>The device in portrait orientation</d:description>
<d:screen-orientation>port</d:screen-orientation>
<d:keyboard-state>keyssoft</d:keyboard-state>
<d:nav-state>nonav</d:nav-state>
</d:state>
<d:state name="Landscape">
<d:description>The device in landscape orientation</d:description>
<d:screen-orientation>land</d:screen-orientation>
<d:keyboard-state>keyssoft</d:keyboard-state>
<d:nav-state>nonav</d:nav-state>
</d:state>
</d:device>
Re-open the AVD Manager and go back to the Device Definitions tab, select the Samsung Galaxy SII device and select Create AVD. Name it as you see fit and hit "ok". (Again, we're going to override this, so don't worry about the settings too much.)
Close the AVD Manager and open the file C:\Users\[user name]\.android\avd\[avd name]\config.ini in your favorite text editor
Replace the contents of the file with the following:
avd.ini.encoding=ISO-8859-1
abi.type=armeabi
hw.accelerometer=yes
hw.audioInput=yes
hw.battery=yes
hw.cpu.arch=arm
hw.device.hash=-1902399403
hw.device.manufacturer=Samsung
hw.device.name=Samsung Galaxy SII
hw.dPad=no
hw.gps=yes
hw.gsmModem=yes
hw.keyboard=no
hw.lcd.density=240
hw.mainKeys=yes
hw.ramSize=1024M
hw.sdCard=yes
hw.sensors.orientation=yes
hw.sensors.proximity=yes
hw.touchScreen=yes
hw.trackBall=no
image.sysdir.1=platforms\android-10\images\
skin.dynamic=yes
skin.name=galaxy_s2
skin.path=platforms\android-10\skins\GALAXY_S2
vm.heapSize=32
disk.dataPartition.size=2G
hw.camera.back=webcam0
sdcard.size=200M
You may want to edit the last 3 entries to change how much storage is available and how/whether the camera is changed. I've found that if I make the disk.dataPartition.size as big as it ought to be (16G), the simulator doesn't start properly. The same for sdcard.size, which can be as big as 32G. The hw.camera.back can be set to "None" or "Emulated" if you prefer. As well, check that the hw.device.hash value is the same as in the original file. If it's different, the file won't work.
Good luck.
Do the following to create the Samsung Galaxy S2 skin:
Download the skin from the Samsung page (follow the link posted by anshumans)
Go to directory [Android-SDK directory]/platforms/android-10/skins
Create a new directory named GALAXY_S2
Extract all files from the downloaded ZIP file to the new directory
Edit the file manifest.ini and change the line api=9 to api=10
Start the AVD and click "New..."
Under Target select "Android 2.3.3 - API Level 10"
Under Skin choose "GALAXY_S2" from the dropdown list
Click "Create AVD"
As you may have noticed the AVD will be based upon the Android API 10 level. So the Galaxy S2 skin won't show up if you choose the target Android API level 16 for example.
Samsung has the S II skin on their developer site here
You can download and add the s2 emulator from Samsung's dev site, http://developer.samsung.com/technical-doc/view.do?v=T000000075&pi=1&ps=10&pb=Y&ct=CT350000&sc=
there is also a detailed instruction on how to use them - http://developer.samsung.com/technical-doc/view.do?v=T000000095
While the top-voted answer is correct, you'll most likely end up having a resolution display problem which will hurt almost any App you'll want to test/develop.
In order to solve that specific issue you also need to change this settings:
hw.lcd.density
which is located in the hardware.ini of your AVD skin. You can find it here:
<ANDROID_SDK_PATH>\sdk\platforms\android-<APIversion>\skins\<YourSkin>\hardware.ini
from 300 to 218.
I'm not a big fan of blind copy-and-paste; also, the top answer references a 2nd which, in turn, references a 3rd; finally, there are some new changes in SDK Tools v24.1.2 which mean that absolutely no file editing is required if you are not testing BlueTooth. Hence, I thought I'd post an updated and consolidated solution. Full credit to anshumans, mwalter, Lloyd and the commenters
Paths use Windows conventions. OS X/Linux users can often just switch backslashes (\) to forward slashes (/), except for install folders. These environment variables may or may not be set on your system:
<ADT_HOME> is the location of AVD Manager.exe (and defaults to C:\Program Files (x86)\Android\android-sdk)
<ANDROID_SDK_HOME> is the location of the .android folder that AVD uses to store device definitions (and defaults to HOMEPATH [and is unrelated to your SDK's location :)])
Samsung skins
Samsung's developer's site contains links to a number of skins including the S2; it also has instructions for installing them using Eclipse with the ADT Plugin, which is unnecessary and superseded by Android Studio. To just get the S2 skin, use the link on the Samsung page and then click on the Zip file with a floppy disk symbol (or just click here).
If you didn't use Samsung's instructions for installing with Eclipse, the procedure is:
Decide which version of Android you are targeting. Note that the S2 was released on API level 9 (Gingerbread) and the skin reflects this. Later releases and updates included API levels 10, 15 and 16. (as per Wikipedia).
Where ?? is the target you selected in step 1 above, extract the contents of the downloaded zip file to a new folder (e.g. Galaxy_S2) under
<ADT_HOME>\platforms\android-??\skins
Edit the extracted manifest.ini, changing the line api=9 to reflect it's current location (e.g. api=15). (This doesn't actually seem to be necessary, but left in until I can confirm.)
Repeat steps 1-3 for each release you wish to test against.
Device Definition
Select the Device Definitions tab on the AVD Manager and then click Create Device... button. On the Create New Device screen,
Accept all defaults except where noted
Name: Samsung Galaxy SII (or whatever)
Screen Size: 4.3 (or 4.5 for I9210 model)
Resolution: 480x800
RAM: 1024 MiB (or 1 GiB)
Density: hdpi
Buttons: Hardware
Click on Create Device
<ANDROID_SDK_HOME>\.android\devices.xml will get updated with your new device definition.
As a general rule, unless you are creating a lot of AVDs based on it, you don't ever have to manually edit entries in devices.xml. Note also that many of edits proposed to match the SII's hardware actually have no net result. If you do wish to edit, first close the AVD Manager (and the Eclipse IDE if applicable).
Find the node for the d:device you just created with <d:name>Samsung Galaxy SII</d:name>
d:manufacturer (optional) change value from User to Samsung
d:networking (optional) delete/comment out NFC (e.g. <!-- NFC -->) unless you want to test against the rare models that included it
d:sensors delete Barometer line
d:internal-storage (optional) change value from 4 to 16 (or 32), but it is ignored anyways when creating the AVD
d:removable-storage no need to add this, as it is ignored
d:abi no need to pare this, as it is ignored
d:bluetooth-profiles replace self-closing tag with
<d:bluetooth-profiles>
HSP
HFP
A2DP
AVRCP
OPP
PBAP
HID
</d:bluetooth-profiles>
d:status-bar change value to true
d:nav-state change both entries (under Portrait and Landscape) to 'nonav'
Android Virtual Device (AVD) definition (finally)
Relaunch the AVD Manager
Select the Device Definition you just created
Click Create AVD...
or
Click Create... on the Virtual Devices tab
Select the definition you created under Device
then
Accept all defaults unless noted otherwise
AVD Name: AVD_for_Samsung_Galaxy_SII (or whatever)
Device: already set to your device definition's name
Target: choose the appropriate API level- I usually append this to the AVD Name at this point too
CPU/ABI: ARM
Keyboard: Uncheck/Disable 'Hardware keyboard present'
Skin: Galaxy_S2 (if you extracted skin under the chosen target API)
Back Camera: Webcam0 (or whatever; are you interacting with it?)
RAM: Consider lowering to 768 if on Windows
Internal Storage: Although the SII came in 16GB and 32GB varieties, consider leaving at 200MiB.
SD Card Size: leave blank unless it's part of your testing. The larger it is, the more resources required. (Consider 200MiB)
For faster emulation on Windows consider disabling HyperV in Windows Features and enabling HAXM. If you do, change the following:
CPU/ABI: Choose any Intel
Emulation: Check/Enable 'Use Host GPU'
Click OK.
<ANDROID_SDK_HOME>\avd\<AVD_NAME>.avd\config.ini reflects all of your settings above (where AVD_NAME is what you set in 4.). The example given by lloyd only shows one difference where skin.dynamic=yes - I cannot see a difference when running though.

Need help correctly emulating the Samsung Galaxy Nexus with AVD

I'm working to ensure my app is getting tested on ICS properly using the popular Galaxy Nexus as a basis. I'd like to emulate it as faithfully as possible.
I've created an AVD with the following parameters (from config.ini). This was mostly created using the GUI (disk.dataPartition.size is a hand-edited param based on other articles I've read). The memory values may be on the low side but that's not causing a problem for me at the moment.
Since the device had no external sdcard I've said "no" for hw.sdCard, but I'm clearly not seeing anything in the /mnt/scdcard (same as /sdcard) and cannot write to it (remounting isn't the issue AFAIK: that mount doesn't exist at all).
I've tested this a few different ways, including from the adb shell. And, yes, I've searched for an answer here... much of this setup is based on answers to this related question, which eventually led me to use disk.dataPartition.size as the equivalent to the command line option (per this site).
Edit: if I set hw.sdcard to yes it gives me an sdcard to work with, but I wonder if this is the correct way to go about this (assuming there IS a correct way within this version of the emulator). Plus, this doesn't really help when emulating an ICS device with an actual external sdcard...
So (since I don't actually have a Galaxy Nexus to work with):
What would I see for the internal "sdcard" area and mount point
(/mnt/sdcard, /sdcard, both, or something else?)
What might I do to emulate that "sdcard" correctly (since it's not really an sdcard per se)?
Bonus: What would I also see on a device with a physical sdcard? /Removable (like in Honeycomb)? Something else?
abi.type=armeabi-v7a
disk.dataPartition.size=512
hw.cpu.arch=arm
hw.cpu.model=cortex-a8
hw.keyboard.lid=no
hw.lcd.density=320
hw.mainKeys=no
hw.ramSize=512
hw.sdCard=no
image.sysdir.1=add-ons\addon-google_apis-google_inc_-15\images\armeabi-v7a\
image.sysdir.2=system-images\android-15\armeabi-v7a\
sdcard.size=64M
skin.name=WXGA720
skin.path=platforms\android-15\skins\WXGA720
snapshot.present=true
vm.heapSize=48
Here are the parameters:
Resolution : 720 x 1280
Abstracted LCD density : 316
Max VM application heap size : 48
Device ram size : 1024
When creating my AVD I put:
Name: Nexus_480x800HDPI
Target: Android 4.0.3 - API Level 15
SD Card - Size: 256 MiB
Snapshot: x Enabled
Skin: x Built-in: WVGA800
For me it is just working nicely.
Here you may also find some further info:
http://mobile.tutsplus.com/tutorials/android/common-android-virtual-device-configurations
I hope this help you.
You might want to have ram 768MB . Ram greater than that can cause problems on windows environment.

Categories

Resources