Android Emulator ISO? - android

I am trying to setup a testing environment for the development of java apps.
I do not have any dedicated server right now and I am using one KVM VPS to write a code and on another one I am running Android x86 8.1 RC2 in Debug Mode to catch the contents of /data/log.txt. Everything works nice and smooth.
Yet right now I need to test the app on Android 9.0 Pie. There is no ISO images of Android x86-pie yet, only sources. So I wonder if I should try to build myself Android x86 9.0 from the sources or there is another option..?
(I tried to install Bliss OS, but failed: https://forum.xda-developers.com/showpost.php?p=80086490&postcount=1070 )
So apparently there is Android Emulator available: https://androidstudio.googleblog.com/2019/08/emulator-29110-canary-android-q-beta-6.html but it requires /dev/kvm (which means that I probably should run it on dedicated server?).
How this emulator works? Is it possible to make an ISO image and install it on VPS?
Edit:
This is the Android 28 system image that sdkmanager provides:
I wonder if it is possible to convert this one into ISO for installation on VPS.
Edit2:
Tried Android x86 9.0.0 r34... It doesn't work yet.
https://github.com/android-x86/android-x86.github.io/issues/52#issuecomment-524590033

Related

android studio times out installing the app

I have a question about running an app through the emulator on android studio.
My emulator device is able to turn on, but when running the app, install never completes so the app times out. I have tried invalidating cache and restarting, and I have installed the sdk platforms that are the same as the emulators and project, but these changes did not work. My computer cannot install emulator hypervisor driver for AMD processors or intel x86 Emulator accelerator, but I don't think it is necessary for the app to run since my emulator can turn on, right? also, any app has never successfully run on android studio.
The is no code other than the hello world that comes up automatically. This is an empty project with a minimum sdk of api: android 4.1. The device I am using is a pixel 2 with an api of 22. (size on disk 3.5 GB) for tools, I have android SDK build-tools 33, android emulator (31.3.10), and android sdk platform- tools (33.0.3) installed.
I have tried every forum that has the same issue as me but if you think there is one that can help me, please share it thanks.
Android Emulators aren't always the best so expect random failures. This is what I would try:
Make sure the app compiles properly (make sure you see BUILD SUCCESSFUL in your bottom "Build" Tab in Android Studio)
Make sure you have updated Android Studio and Android Emulator, Android Build Tools, SDKs etc.
Create and use a device with a higher API version. Ideally one with Play Store.
Depending on your development machine you might want to try a different architecture (ABI). Try x86 or x86_64 instead of what you've already tried.
In rare cases your existing emulator images get corrupted. Uninstall them in your SDK manager (Show Package Details) and install them again.
If possible try running the app on a real device (follow online instructions to enable USB debugging etc.) to verify the emulator is the problem.

What emulator does Android Studio use?

This question has many parts.
Some info about my system:
64-bit Ubuntu Linux
I am wondering what the stock emulator is that comes with Android Studio (A.Studio) (if indeed it has a name).
A helpful answer would include comparing this emulator with other emulators. A list of pros and cons of using each different emulator would also be helpful.
Perhaps there is a more fundamental ~thing~ about using different emulators; information on that is welcome if anything comes to mind.
Finally, i have never used an emulator besides the one that has come with Eclipse or A.Studio. What do I need to know in order to plug any emulator into any IDE? I have had issues with IDEs being "fragile" and breaking frequently, FYI.
You can use genymotion, for fast speed the quality, both for the eclipse and Android studio, get it here.
Also you can set up the Google play service for using Google Maps and downloading apps from Google play store.
Get the package and how it use it , please refer to here.
The emulator used by Android Studio is the exact same one used with Eclipse. It is in fact included with the Android SDK (which is in turn included in Android Studio) and used by various development environments.
The way it works depends on what kind of system image you use it with. For most recent Android versions, there are 2-4 different system images - arm, arm 64-bit, x86, and x86 64-bit (the 64-bit ones are Lollipop only, and fairly experimental at this stage of the game [early 2015]).
There are also Google API versions of these images (they include various Google apps such as Google Play Services) which can be used if these components are needed by your app.
For development purposes, the x86 system images are your best bet as performance is vastly improved by the emulator not having to emulate the ARM architecture - you need to use HAXM (by intel, also available in the Android SDK) to get any real speed benefits with x86 images though. The emulator also provides GPU acceleration (it must be manually enabled for each emulator device) which allows it to use your physical GPU for rendering instead of emulating these operations in software.
The way the development environment (Android Studio) connects to the emulator is via ADB (Android Debug Bridge). This means that it can work with virtually any emulator (such as Genymotion, which runs via VirtualBox). However, there is native support for using the Android Emulator from within Android Studio (this is configured by selecting emulator in the Run/Debug configuration)...when using another emulator (such as Genymotion) you should select USB device (in Run/Debug configuration) and make sure that the ADB instance is connected to your emulator via TCP (Genymotion does this for you automatically at startup).
This should give you enough information and I will not re-post all the various instructions on how to do any of the above as they have been posted as answers to various questions here on SO.

Installation of OS in android emulator

I am working on android emulator. I successfully upgraded the kernel of emulator. now I want to change the OS of emulator. I know we can select the appropriate APIs from the android SDK manager. But i want to install jelly beans manually or you can say i want to upgrade ICS to jelly beans in emulator.
Is there any way to do manually install source code of android 4.3 on emulator??
You can only change the API the emulator uses and then you'll probably have to restart it. I can't imagine it would simply change Operating Systems. I just create a different AVD for each API I use and run them when I need them (with an API 18 Emulator always running).
You will need to use the Android SDK to compile Android 4.3 from source. Choose the emulator as your build target. For example, to create an engineering build (full debugging capability, largest output size) for the ARM emulator:
$ lunch aosp_arm-eng
Visit the official Android page on Building the System for full details:
http://source.android.com/source/building-running.html
After the build completes (it will probably take a few hours, at least the first time) you can use the files from the out/ subdirectory of the source tree to run in the emulator. These include system.img, userdata.img, ramdisk.img, etc

Breakpoints in Android Platform source

Using Intellj-idea I'm trying to debug into the Android source API 17 but when I set breakpoints in the platform source they are being ignored when run. Looking at the breakpoint whilst debugging there is a cross in it with a message stating "no executable code found at line 15,508 in class android.view"
I've tried running against an emulator with API 17 set as well as a phone with Android 4.2.2 but both don't work. I can sort of debug into the methods but the cursor jumps around.
So I'm guessing that there is no debug info as well as some optimisations that have gone on. So my question:
Is there a way I can properly debug the Android Platform from the perspective of my application and set breakpoints that work in it? Maybe a an emulator that has been been built with debug info?
Any help would be appreciated?
Regards
Lee
It depends on what application you are trying to debug: your own application, a system application such as android.process.acore.
To debug platform source running in your own application
The main issue is the line numbers of the platform source you have downloaded on your computer must match what is running on the device. Your best bet will be to debug on Google Nexus device such as the Nexus 5 or Nexus 7 since it should be running a compiled version of the source exactly as it was released by Google which you downloaded with the Android SDK. Just add the sourcepath to the sdk in IntelliJ, attach the debugger and set the breakpoint. Make sure you choose the same API level source as is running on the device. That should do it.
To debug platform source running in a system application
You will need eng build of the Android platform to debug system processes. If you haven't built and installed the Android platform before it is quite a bit of work and requires an unlocked bootloader. Maybe there are prebuilt eng builds of cyanogenmod or something that can be downloaded but I can't find any after some trivial Googling. You may also make an eng build of AOSP yourself and run the emulator on your machine. See Running emulator after building Android from source and the "Choose a target" section on the AOSP site for info on building your own eng build if you are feeling very ambitious.

How do I configure Trigger.IO to use the Intel Atom x86 target for my Android virtual device?

When I run my Trigger.IO app in the Android emulator, Trigger.IO automatically creates an Android virtual device using the Android 2.2 target. I have learned that I can improve the speed of the Android emulator by choosing the Intel Atom x86 target (see http://software.intel.com/en-us/android). How do I configure Trigger.IO to use the Intel Atom x86 target? I have tried modifying the AVD created by Trigger.IO after it has been created, but Trigger.IO simply deletes and recreates the AVD using the Android 2.2 target the next time I run it.
As far as I know there are two ways to achieve this when working with Trigger.io:
1) As long as you don't have any devices connected and only the emulator of your choice running, you can just use forge run android to install and launch the app on this particular emulator.
In case you have multiple emulators running and/or android devices connected, you need to specify the emulator id. It can be found in the title bar of an android emulator application and is followed by the name of the AVD (see the screenshot below). Example: You got an emulator named android403 which is started and its title bar says 5554:android403. Just use forge run android --android.device emulator-5554 to run your app in this specific emulator.
2) You can package your app using forge package android and download the resulting .apk file to your emulator. Just install it the same way you'd do on a real device. Make sure to enable SD Card support on your emulator when using this method.
If you are going to mix up both methods there is one more thing: An app installed via method 2 cannot be automatically overwritten by an install process described in 1. You'd have to manually uninstall the app beforehand. However, as long as you stick to one of the two you should be fine without manually uninstalling anything.
Another thing that you should know in this context is that apps built with Trigger.io are incompatible with the Android 2.3.3 (API 10) emulator. They will work on real devices running this Android version though.

Categories

Resources