Main » 2012»April»4 » Android 4.0 (Ice Cream Sandwich) on Virtualbox
9.47.55 AM
Android 4.0 (Ice Cream Sandwich) on Virtualbox
Yesterday to my utter delight I realized that the Ice Cream Sandwich
version of Android (4.0) can run in Virtualbox. I've been contemplating
programming an Android app for the tablet form factor but don't quite
have the resources to purchase a spanking new ICS tablet, and a
virtually free virtual machine fits the pocketbook much better.
For Android ports, I normally turned to the venerable Android-x86 project.
Indeed, they have just released an ICS port designed for the AMD Brazos
platform, but the build apparently does not support internet
connectivity or use of a mouse, which of course makes use within a
virtual machine on a laptop rather challenging. Fortunately, I found
another blog posting that referenced a Japanese site
whose developer has provided a .vdi virtual hard disk file for loading
directly within Virtualbox. Best of all, this not only includes mouse
support and networking, but also hooks up with ADB for Android app
development.
To set up the Virtualbox environment, I followed these steps:
Download the pre-made .vdi file with Android 4.0.
Create a new virtual machine with the following settings:
OS Type Linux 2.6
512MB RAM
Acceleration: VT-x/AMD-V (which is apparently required for ICS at least on this build), nested paging, and PAE/NX
Bridged network adapter (but see below)
2GB hard drive (not required)
Hard disk pointing to the .vdi file. Note that the disk will be
attached by default to a SATA controller, but the disk should be removed
from there and attached to the IDE Controller instead.
The virtual machine booted and worked out of the box! Next, I needed to
connect the virtual machine to ADB so that I could load up my app for
testing:
Open a command-prompt in the directory of adb.exe (ie Shift-right-click in android-sdk-windows\platform-tools and choose the "Open command window here" item).
Enter adb connect [ip-address].
This turns out to be the most difficult step because unlike using
netcfg in the Android-x86 builds, I haven't found an easy way to
determine the local IP address. One method is to log into your router
and check the DHCP client list. The list usually shows IP addresses for
the various MAC addresses of devices connected to the router. You can
find the MAC address of your device by right-clicking on the networking
icon in the Virtualbox status bar, choosing "Network adapters...", and
then opening the "Advanced" section.
One of the challenges I've faced while on the road is the inability to
connect while completely disconnected from the internet or any router.
In this case, I need a way to make a solely local network connection
from ADB to the virtual machine. Fortunately, this posting describes a simple method to make that connection:
In the same network adapters page from within Virtualbox, change the "Attached to" selection to "NAT".
Choose "Port forwarding", and in the "Host Port" and "Guest Port"
sections, type "5555". If you have multiple virtual machines and want to
connect to each of them, you could increment the host port for each of
the forwarding rules while keeping the same guest port for each device
(eg host port 5556, guest port 5555 on a second virtual machine).
From the command-prompt in the directory of adb.exe, enter adb connect localhost.
The Android 4.0.1 device should pop up in the DDMS devices listing from
within the Eclipse development environment, and packages should transfer
to ICS with glee.
Suck: Suck "Under Construction" Icons For your consuming and site-building pleasure are three sets of the Suck "Under Construction" Icons... The first set is dithered to a white background; the second set is dithered to a black background; the third set is transparent, for use on a boring grey or mind-shattering "custom" pattern background. To save these images...well, hell, you know. suck.
-- HTTP Error 403 Error 403 We're sorry, but we could not fulfill your request for /blog/2010/08/10/restore-files-and-dir-from-previous-commits-in-git/ on this server. An invalid request was received from your browser. This may be caused by a malfunctioning proxy server or browser privacy software. Your technical support key is: 58c6-c612-1756-6707 You can use this key to fix this problem yourself. If you are unable to fix the problem yourself, please contact fran.dieguez at mabishu.com and be sure to provide the technical support key shown above.
free source code ,download source code ,Javascript ,Ext JS , Action , Disable action to disable a button Javascript SourceCode3s Speed, Source & Solution home about search interview FAQ contact Categories ASP.NetC# / C SharpVB.NetC / ANSI-CC++JavaPHPJavascriptSQL Server / T-SQLHTML / CSSFlash / Flex / ActionScript Javascript - Ext JS - Action Disable action to disable a button <!-- /*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * extjs.com/license */ --> <html> <head> <title>Hello World Window</title> <link rel="stylesheet" type="text/css" href="ext-3.0.0/resources/css/ext-all.css" /> <script type="text/javascript" src="ext-3.0.0/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="ext-3.0.0/ext-all.js"></script> </head> <!-- Revised from demo code in ext3.0.0 --> <body> <script type="text/javascript"> /*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * extjs.com/license */ Ext.onReady(function() // The action var action = new Ext.Action( text: 'Action 1', handler: function() Ext.example.msg('Click','You clicked on "Action 1".'); , iconCls: 'blist' ); var panel = new Ext.Panel( title: 'Actions', width:600, height:300, bodyStyle: 'padding:10px;', // lazy inline style tbar: <> action, // <-- Add the action directly to a toolbar text: 'Action Menu', menu: <action> // <-- Add the action directly to a menu
], items: <> new Ext.Button(action) // <-- Add the action as a button ], renderTo: Ext.getBody() ); var tb = panel.getTopToolbar(); // Buttons added to the toolbar of the Panel above // to test/demo doing group operations with an action tb.add('->', text: 'Disable', handler: function() action.setDisabled(!action.isDisabled()); this.setText(action.isDisabled() ? 'Enable' : 'Disable');
, text: 'Change Text', handler: function() Ext.Msg.prompt('Enter Text', 'Enter new text for Action 1:', function(btn, text) if(btn == 'ok' $$ text) action.setText(text); action.setHandler(function() Ext.example.msg('Click','You clicked on "'+text+'".'); );