Introducing MPGH's AIGA. The latest advancement in artificial intelligence. Click here now to learn more!
Results 1 to 10 of 10
  1. #1
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed

    Best Option for Emulating Android OS & other Options.

    Best Option for Emulating Android OS & other Options

    The purpose of this article is to talk about Android Emulation / Debugging options.

    Android SDK offers a few ways to debug your application, and there are a few other alternatives you may find handy as well, so let's talk about the good, the bad and the very ugly of each option (including some "bonus options that usually get overlooked)

    Androids' AVD Manager

    This option is the option chosen for developers who would like to test and debug applications without having a device, or without having a device that uses the current API platform they are developing for. This option is (honestly) one of my least favorite options, but has some benefits.

    Here is what is good about the AVD Option?

    Ability to test any framework.
    Ability to test at any resolution (Tablets included)
    Ability to test with / without SD Card.
    Here is what is bad about the AVD Manager?

    Slow Start Up
    Slow Framerate
    Slow Everything
    Android AVDs are generally slow, there are some options that may help speed things along (which I will discuss a little bit below) but overall, speed of the AVD is too slow to be practical and useful, granted it is one of the most versatile options, it could use some work.

    Why is it so slow?

    Emulation! , Some (most) developers question why Iphone simulator is so much faster then Androids Emulator, and some pros still say " Really simulator and Emulator can be interchanged", the truth is, it can't. The reason Iphones simulator is so much faster is because it is a simulator, it doesn't have to worry about emulating CPU and True resolution, where Androids Emulator does, by truly emulating the CPU and device target, you will lose a lot of speed.

    How can you speed it up?

    While there is no real way to "speed up" the emulator, Running the emulator at a small resolution and giving the device more memory during it's setup (which we will talk about) does add a small speed boost (though not much)

    How to set up a AVD.

    Taking into consideration my last Article: https://www.mpgh.net/forum/511-androi...endations.html , We will set up a AVD (Android Virtual Device) for Android OS 2.1 (API7).

    First, Start your AVD Manager (located at program files\android\andorid-sdk\ by default). You should see a screen that looks similar to this.



    (If you are doing this for the first time, you won't see any created AVD's inside the GridView)

    First thing to do is click the "New" button located on the top (upper right) corner, This will bring up the next screen.



    On this screen you will need to fill in some information, and I will have you select some non-required features as well, which I will explain below.

    Name - This will be the name (solely for recognition) that you will call this particular AVD, You can call it the name of the application you will be debugging, or call it by it's SDK, either way is fine, this is just so you can know (if you have more then one AVD) which is used for which (which will come in handy in future articles. (I called this one, MPGH_Article_2) {Note: Spaces are not allowed}

    Target - This will be the target OS Version and API Version, In this case (again) we will be developing on 2.1 (for all the following articles) unless stated otherwise in the article. (Choose 2.1 Api7).

    CPU/ABI will automatically be set, in 99% of all cases it will be set to ARM, as most mobile devices use ARM Processors.

    SD Card - This option will let you set the size of the SDcard to mount to the device, just like a regular Android Device, You will want to insert a SD Card for debugging purposes, it isn't necessary but I recommend it. I set this to about 256 MB, there is usually no reason to go higher unless developing a application then will Download / Save alot of content to the SD Card.

    Snapshot - I recommend you enable this, this will help speed up one of the most annoying slow parts of the emulator, and that's load time, some developers have complained about 15 mins load time from start to OS Load, by using snapshot, the Emulator will load the snapshot taken from your IDE on load, though you will (may) see a load screen, the time will be almost instantaneous compared to normal load times.

    Skin: This will allow you to choose which (skin) device type you will be running on. I recommend you use Built In and from there choose from the pull down options, (screen dimensions, appearance, etc).

    Properties: (note if you see something in the following screenshot that you don't see on yours, it is because I added the option by clicking add next to this set of properties) What you should focus on here (leaving everything else default, unless you need or want to change it is the device ram size. By default it is set to 256, however, I recommend you set it to 1024 (1GB) this will help speed up the emulation a little as well.

    Here is a screen shot of my completed settings.



    With all the settings set and your virtual device setup, you should (for test) go ahead and load the device for the first time.

    Click on the device name in the list, then click Start....When the next box opens, click launch, you can (for now) ignore the extra settings.

    {note: You may notice a dialog box appear asking which camera you will like to use, considering this is a emulator, if you add camera support, it will use your webcam as a camera for your device, just hit apply and/or ok}

    You should be greeted by a starting android device soon after a few batches run (if everything has gone ok)



    Once it has loaded, you can take a look around and see how fast/slow it is, also get used to the android enviroment.

    Other Options

    Device Running Android OS -
    If you have a device running Android OS , and plan to develop for that specific OS/Api version, then this method is really the best one.

    Here is what is good about the Direct Connection method.

    Super Fast, Deploy & Test Applications to/from your android almost instantly.

    Whats bad about the Direct Connection Method?
    You have to be developing for that devices Android Version, So if your device is Android 2.2, You cannot develop a 2.3 Application.

    How to Set up?

    First thing you have to do is connect your device to your computer VIA Cable.

    After that, you will need to change a setting on your device (if it is not already enable)

    Enable Debug under Development in application settings.

    Navigate to settings, then applications, then Development, then enable USB Debug Mode.



    After you have enabled USB Debug mode, you need to install the device drivers for your computer (if they are not already installed).

    If your device does not have drivers, or you cannot locate the drivers, you can try the Google USB Drivers (installed from last article in extras)

    If you have note installed them yet, go ahead and install them now.

    Go ahead and reopen your SDK Manager (discussed in last article, reference further up this article) and click to install the Google USB Drivers.



    once installed, Remove your device, reconnect your device, and the drivers should install, if they don't manually select the driver from windows driver install.

    Testing Device (You can also use this method to test your AVDs as well)

    After you have finished adding your device, go ahead and open up Eclipse (for this example as it is highly recommended by myself) Once in Eclipse, Create a New Android Application.



    You should be greeted by this screen.



    {We will discuss the settings more in depth in the next article, I will quickly run through them for you in order to test your device}

    Project Name: This will be the name of your project, In this case, we will choose the same name used for our AVD MPGH_article_2.

    The next option that should be selected in this case (and in most new projects and import situations) is Create New Project in Workspace
    {Note: In the next article, I will discuss these options further}

    Next Option to choose is Use Default Location (Eclipse Default location is /Workspace/)
    {Note: In the next article, I will discuss these options further}

    Click Next after you have finished.

    The Next screen should look like this.



    This screen will allow you to select your Build Target, You want to choose the build target for your device, so if your device is version 2.3.4 then choose 2.3.3 (or 2.3).
    In this case, we will use 2.1 (to be consist)

    ~ Again, Click Next.

    On to the Next Screen.



    Again, I will run through the settings with a brief explanation, but I will explain everything in much greater detail in the next article.

    Application Name - The Application Name should be Generated from the first page setting. (No need to edit or modify)

    Package Name - The package name has many purposes, but the main purpose is "individuality" , It will allow google to distingush your app (on the market) from another developers App, Example , On Android Google Market, you may find two applications with the same name, from a user standpoint they can determine who's is who's by reading a description, however from Androids Back end perspective they will use your package name.

    Your package name can be anything (really) as long as it follows a certain guideline.
    Android has the same guidelines as Java and others, the package name should be

    com.mydomain.myapp

    So to give an example, If @Dave84311 was creating a MPGH application, he would prob. do .

    net.mpgh.chatter

    For me I would do

    com.innovatorsworldwide.Mpgharticle

    {Note: To avoid confusion, You do not need to have a domain to create a package}
    {
    You can do something like ,
    Code:
    me.@Hassan.MJ
    }

    MIN. SDK version should be set (automatically) to the API Version you are using (in this case) 7
    If you want to change it here, you can, however there may be issues if you mixmatch API version and Android OS Version, So I suggest (Unless needed) you keep it at default.

    Click Finish, and Eclipse will generate some standard code for you.



    At this point, we can check that your device for debugging is working (there is no need to change any settings, in the next step Eclipse will start your device as the default debugger (and deployment) , It will only start a AVD if no device is connected.

    In your package explorer, right click on the project by name and look down until you see Run As > while hovering over it you should see Android Application, go ahead & click it.

    Your device should not automatically install your debug.application.apk and start it for you.

    You should see this on your screen (of you don't have a device attached, you should still run through this process, except, allow your AVD to load)

    You should see this on your screen.



    {By default Androids' SDK will create a standard hello world application, which we will utilize to build an app in a future article , however we will not be building a hello world application, as I feel those applications lack in a actual learning experience}

    as long as you see the above screen on either your device or AVD, everything is setup correctly.

    Android X86
    ------------

    Another Option is AndroidX86 which is a PC Port of Android OS 2.2 (can be found here) Android-x86 - Porting Android to x86

    This is a project to port Android open source project to x86 platform, formerly known as "patch hosting for android x86 support". The original plan is to host different patches for android x86 support from open source community. A few months after we created the project, we found out that we could do much more than just hosting patches. So we decide to create our code base to provide support on different x86 platforms, and set up a git server to host it.

    The good of Android X86

    Much Much Quicker, Android X86 can run at 100% speed if loaded as a stand alone OS.

    The Bad o9f Android X86

    To be practicable, you should use it in a Virtual Machine (like VMBOX) which will (again) slow down the port significantly

    Suggestions:
    If you have a laptop around, Go ahead and install Android X86 directly to a partition on the harddrive, then when you would like to test an app (if you don't have a device , and don't like/want to use the AVD) open your bin explorer for your project in your workspace, copy the APK over to an SD card and install the app from the mounted SD in your laptop (through android)

    You can find Install instructions Here
    Installation - Android-x86 - Porting Android to x86

    Install On Vmware

    VMware

    You have to change your virtual disk type to be IDE because the default type in VMware is SCSI, and Android-x86 kernel is not configured to support SCSI. You can follow these steps:
    Create a virtual machine.
    Edit virtual machine settings after the virtual machine created.
    Choose the hard disk and remove it.
    Add a hard disk to create a new virtual disk, then you can choose IDE as your virtual disk type.
    When finished, you can install android-x86 normally.
    Final Note: There are a few other commercial options out there, like you_wave, however, I never found a good reason to pay for you_wave over using one of the free options above.

    any questions, feel free to email me or comment.

    Link Back URL
    https://innovatorsworldwide.com/optio...id-os-options/
    Last edited by NextGen1; 02-25-2012 at 02:54 PM.

  2. The Following 6 Users Say Thank You to NextGen1 For This Useful Post:

    -Hero- (02-06-2013),Delko DJ (11-29-2012),dopeysd619 (05-26-2019),Hassan (02-27-2012),Ticherhaz (12-03-2015),unspeakable (09-11-2012)

  3. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Finally Finished, after 3 random posts to save spot while taking breaks.
    Enjoy,


     


     


     



    The Most complete application MPGH will ever offer - 68%




  4. #3
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,132
    My Mood
    Dead
    GOD DAMN ! You have so much free time in your hands. NAICE =D

  5. The Following User Says Thank You to Hassan For This Useful Post:

    NextGen1 (02-27-2012)

  6. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by Hassan View Post
    GOD DAMN ! You have so much free time in your hands. NAICE =D
    Not at all LOL, I took 3 breaks, it took me a very long time to write these, I kept posting "Taking a break , brb" but I just learned there is an Autosave so now I start writing these in the morning then save and go back to it during the course of he day.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  7. #5
    unspeakable's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Location
    WorldWide
    Posts
    73
    Reputation
    21
    Thanks
    7
    My Mood
    Dead
    hi there nextgen1,

    now, ive got this very fkin stessful problem of not being able to locate the eclipse application after downloading it a gazillion times- even though im definitely sure its somewhere, i found it earlier today through the search function but i cannot find it now- i created a project too.
    i hope you can find some solution to this.

    thanks,

    M3Gamer
    "out out , brief candle" life is a matter of seconds.

  8. #6
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    the workspace (projects) should be at Your documents by default.

    Also.. You dont know where you save your download of eclipse? wth..
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  9. #7
    unspeakable's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Location
    WorldWide
    Posts
    73
    Reputation
    21
    Thanks
    7
    My Mood
    Dead
    yes finally, i have it sorted, i did know where my eclipse files were(had about 5or 6) i just had to extract it and give it a correct location for it to be stored in which i didnt do before so i couldnt find it.
    "out out , brief candle" life is a matter of seconds.

  10. #8
    amrit0965's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Ottawa, ON
    Posts
    3,951
    Reputation
    261
    Thanks
    19,598
    My Mood
    Bored
    nice man....



    Member Level 1 25.07.2012 - 27.04.2013
    CockSucker 12.22.2013 - 01.26.2013
    NFS World Minion 01.26.2013 - 04.17.2013
    NFS World Wiki Manager 04.14.2013 - 06.10.2013
    CockSucker 04.17.2013 - 09.22.2013
    Member Level 2 27.04.2013 - Current



    MPGH Knight: 4500




  11. #9
    -Hero-'s Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    15
    Reputation
    10
    Thanks
    0
    My Mood
    Fine
    nice hard working

  12. #10
    clawscl71's Avatar
    Join Date
    Mar 2021
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    1

    Help

    Can you tell me how I can bypass vpn detection? from phone or PC? when I go to the application it says turn off vpn how can I bypass this so that the application does not see vpn? application: gcskins

Similar Threads

  1. All the best hacks for gunz...
    By trip.. in forum Gunz Hacks
    Replies: 21
    Last Post: 10-06-2009, 10:44 PM
  2. best program for making hacks?
    By sev3n in forum WarRock - International Hacks
    Replies: 6
    Last Post: 03-06-2008, 12:43 AM
  3. Best Mice For Computer?
    By Synns in forum Spammers Corner
    Replies: 1
    Last Post: 09-03-2007, 07:09 PM
  4. Trading best trainer for bypass
    By llvengancell in forum Trade Accounts/Keys/Items
    Replies: 4
    Last Post: 05-23-2007, 11:19 AM
  5. Trading best trainer for bypass
    By llvengancell in forum WarRock - International Hacks
    Replies: 3
    Last Post: 05-22-2007, 05:31 PM