Guide: How To Implement native Intel x86 Support for Android Apps to boost performance

Sharing is Caring!

Share on facebook
Share on twitter
Share on pinterest
Share on linkedin
Share on vk
Share on email

My title is Antonio De Falco, and I am the creator of the sport Planet Conqueror. Having graduated from College as a Sport-Designer, I discovered myself inclined to develop video games which are simple to get into however that also ship long-lasting enjoyable whereas taking part in it.  On this submit, I shall information you on add native Intel x86 help on your Android App, for this information i’ve used my very own sport app- ‘Planet Conqueror’ for example to point out you the process for including native x86 help for an app that’s construct utilizing libGDx.

Planet Conqueror was constructed utilizing libGDX model 0.9.8 (secure launch) which didn’t have the wanted help for Intel primarily based gadgets. Fortunately the newer model of the framework did. So to start with, we have to obtain the brand new model of libGDX (ver. 0.9.9 or larger). LibGDX gives secure releases which are examined and include few to no bugs. An alternative choice is to obtain the nightly builds which have extra options however most likely extra bugs, too. If you wish to danger it, you’ll be able to obtain the nightly construct in any other case go for the secure launch. You’ll discover each downloads right here: Obtain setup App

As soon as the obtain is full, extract the zip file to a location of your selection. We’re going to overwrite some information and delete some others.

  • First copy “gdx.jar” from the extracted folder into the “libs” folder of core undertaking.

  • Than we have to change the “libgdx.so” information and the Android Backend within the Android undertaking folder. Copy the “armeabi”, “armeabi-v7a” and “x86” folders and “gdx-backend-android.jar” from the extracted folder into “…YourApp-androidlibs” folder.

  • If you are within the libs folder of your Android undertaking, go into “armeabi” and “armeabi-v7a” and delete the “libandroidgl20.so” information.

  • Lastly copy and paste “gdx-backend-lwjgl.jar”, “gdx-backend-lwjgl-natives.jar” and “gdx-natives.jar” type your extracted folder into “…YourApp-desktoplibs” folder.

Having help for x86, ARM and ARMv7 included in a single “fat build” the Android OS will kind out what information to make use of all by itself. In case you are utilizing libGDX extensions on your app, you additionally want to repeat the up to date extension information to your undertaking. Within the case of Planet Conqueror it was the Freetype extension which permits loading font information as an alternative of making bitmap fonts.

  • Similar to earlier than, copy “armeabi”, “armeabi-v7a” and “x86” folders from “libgdx extensionsgdx-freetype” to the “libs” folder of your Android undertaking.

  • Do the identical for “gdx-freetype.jar” and “gdx-freetype-natives.jar” within the core initiatives “libs” folder.

Now that step one is full, you can begin your IDE. You could discover some code errors displaying up. This is because of modifications that have been made to libGDX in between the 2 variations. Verify the documentation and alter log to resolve the errors which are particular to your app.

After that, you’re able to compile a construct with x86 help and begin testing for performance. To try this it’s worthwhile to arrange the emulator with the x86 system picture from Intel. You will see an in depth rationalization on work with the x86 system picture right here: Rushing Up the Android* Emulator on Intel® Structure

I do suggest studying the article above as a result of it accommodates quite a lot of additional info which I will skim or skip on this article. Since I am working with Home windows, I will skip the process for different working techniques. So if you don’t use Home windows, please seek advice from the hyperlink above. To start out your newly construct APK on a x86 emulator you want just a few perquisites. The Android SDK which you most likely have already put in and a pc which runs on an Intel processor with help for “…Intel VT-x, EM64T and Execute Disable(XD) Bit functionality…”. This all sounds extra difficult than it really is. I’ve managed to run an emulator with an x86 system picture on an Intel Core 2 Duo E6600 first launched round mid-2006. So, you probably have a more recent CPU, chances are high that you just acquired all of those perquisites. These functionalities have to be enabled from the BIOS, however don’t worry about it but.

Let’s begin by downloading the Intel HAXM ({Hardware} Accelerated Execution Supervisor) from right here:Intel {Hardware} Accelerated Execution Supervisor

Go to the situation of the downloaded file and extract and/or execute “intelhaxm.exe” to start out the set up wizard. Throughout set up progress you could get an error message, telling you that Intel VT-x shouldn’t be enabled within the BIOS. If that’s the case, it’s worthwhile to abort the setup restart your laptop and enter the BIOS at startup (Please seek advice from the Mainboard proprietor’s handbook on enter the BIOS) there it’s worthwhile to set “Virtualization Expertise” to “Enabled”. Save and exit the BIOS and restart the set up of Intel HAXM following the identical steps as earlier than.

Now that we now have the accelerator put in we have to create an AVD (Android Digital System) with an Intel system picture. Select an Android model you wish to use and obtain the picture right here: Android instruments (discover completely different variations on the underside of the web site). Or use the Android SDK Supervisor for comfort. After you have your system picture(s) begin the AVD Supervisor from the Android SDK Instruments “android-sdkAVD Supervisor.exe” and create a brand new AVD. Arrange the brand new AVD as you want it to be. The one factor it’s worthwhile to do in another way is to set “CPU/ABI” to “Intel Atom (x86)” and you’ve got an emulator that runs with x86 structure.

All you will have left to do is check your app in line with your testing-checklist. After all, you don’t have to check all the things should you already examined your app totally. Confine your testing-checklist to issues which are related for the CPU. Do a comparability of the 2 builds on the emulator and/or a tool to see how a lot of a distinction it makes along with your app.

The method of implementing x86 help into Planet Conqueror was pretty simple due to the libGDX framework. It was only a matter of updating the event framework, copying some information into the undertaking, and the construct for x86 gadgets was prepared. From right here it was a matter of testing it out to see if there have been any hiccups throughout runtime. Getting the x86 emulator operating was step one, and it was accomplished rapidly due to the drivers out there for Intel powered desktop machines. Getting a maintain of an precise system with x86-architecture was a bit more durable but in addition manageable. In the long run, no hiccups have been discovered, and a brand new model of Planet Conqueror was able to be uploaded to the Retailer for the x86-community to obtain.

Creator Bio

Based mostly in Krefeld (Germany), Antonio De Falco is, amongst different issues, an impartial sport developer for Android gadgets. He graduated from College, with a bachelor’s diploma in game-design. Since his research, he has labored in Cologne and Paris, the place he gained additional expertise within the environment of skilled software program improvement firms. 

Different Associated Articles and Sources

For extra such Android assets and instruments from Intel, please go to the Intel® Developer Zone

 

Leave a Reply

Login.

To Comment.

Login to follow creators & categories, to create posts, to comment on posts.

Log In

Forgot password?

Don't have an account? Register

Forgot password?

Enter your account data and we will send you a link to reset your password.

Your password reset link appears to be invalid or expired.

Log in

Privacy Policy

To use social login you have to agree with the storage and handling of your data by this website. %privacy_policy%

Add to Collection

No Collections

Here you'll find all collections you've created before.

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp
Share on email

Create Account

Create Account & Share posts like videos, audios or writings here with the world.
It's free