Jeff Ward
Mobile, Web, Linux, and other cool Tech
find me at
Simbulus Consulting Stack Overflow Hacker Rank GitHub LinkedIn Twitter Google Plus

Adobe AIR Mobile Development On Linux

Aug 15, 2013 #Actionscript#Mobile#Linux#AIR

While Linux isn't an officilaly supported development platform for the Adobe AIR SDK, mobile development is possible from Linux targetting both Android and iOS. I use Ubuntu 12.04, Wine 1.4 (though 1.5 should work fine), AIR SDK 3.6 (though again, later versions should work fine), and Flex SDK 4.6. Here's a quick list of the commands I use for this:

Environment Setup

You need the AIR SDK, Wine, and java installed, as well as evironment variables such as $AIR_HOME and $JAVA_HOME. See my Setup AIR 3.9 SDK On Ubuntu 12.04 post for complete details on setting up your environment in Ubuntu (though it's fairly generic and should be easily extensible to other distros.)

Useful Commands

Compile with Flex compiler (FCSH support via fcshd.py -- update use ascshd instead):
$FLEX_SDK/bin/mxmlc Main.as -static-link-runtime-shared-libraries
Compile with ASC2 compiler (required for inlining, annoyingly, no FCSH support -- update, see my ASCSHD compiler post - no need to use Flex SDK anymore):
$AIR_HOME/bin/mxmlc Main.as -compress=false -static-link-runtime-shared-libraries
Simulate (ADL) via Wine:
wine $AIR_HOME/bin/adl.exe -screensize iPad -profile extendedMobileDevice app.xml
Note that to successfully simulate some networking code, I had to enable it in wine via:
winetricks.sh wininet
You can optionally package for Android natively, because the Win/Mac restriction is for the AOT compiler (iOS):
java -jar $AIR_HOME/lib/adt.jar -package -target apk-captive-runtime -storetype pkcs12 -keystore example.p12 -storepass example Main.apk app.xml Main.swf assets
But you can package for iOS or Android via Wine:
wine java -jar 'Z:\opt\air_sdk_3.6\lib\adt.jar' -package -target apk-captive-runtime  -storetype pkcs12 -keystore example.p12 -storepass *** Main.apk app.xml Main.swf assets
wine java -jar 'Z:\opt\air_sdk_3.6\lib\adt.jar' -package -target ipa-test -storetype pkcs12 -storepass *** -keystore certificates.p12 -provisioning-profile profiles.mobileprovision Main.ipa app.xml Main.swf assets
You can install directly on Android via USB:
$ANDROID_SDK/platform-tools/adb install -r Main.apk
Sadly, you must use Win, Mac, or Testflight to install via USB onto iOS devices like so:
adt.bat -installApp -platform ios -package Main.ipa (doesn't work from linux)
Update 2013-08-28: It turns out you can install apps from Linux onto USB-attached iOS devices using ideviceinstaller (it's available in the Ubuntu apt-get repos). Then I simply install my app like so:
ideviceinstaller -i Main.ipa
You can also upload to testflight via CURL for iOS installation:
curl http://testflightapp.com/api/builds.json -F file=@Main.ipa -F api_token=*** -F team_token=***

Example Linux AIR Project

I've added a github repo of a sample project for Linux app development. It works out of the box for Android, and you could get it to work for iOS though you'd need a developer program membership, certificates, etc, and that's beyond the scope of this post. Check out my BaseAIRAppLinux on github.

Let me know in the comments if these work for you, if you'd like clarification, and if you have any additional tips.

comments powered by Disqus