What is inside a .aia project file?

As you may know, you can save your App Inventor project to your local computer using the Projects | Export selected project (.aia) to my computer menu option:

ExportSelected

Use this feature to save a backup copy on your local computer or to share your code with others (email or transfer the file using DropBox – or similar – or merely copy to a USB thumb drive).

What is inside the .aia file?

Surprisingly, the .aia file is just a regular .zip file. You can verify by saving a copy to your local disk drive, and then rename the file to have a .zip file extension instead of .aia. Then use Windows Explorer, StuffIt Expander or other utility to open and decompress the .zip file.

PLEASE NOTE – DO NOT MODIFY THE CONTENT OF THESE FILES.  THIS INFORMATION IS NOT SOMETHING YOU NEED TO KNOW TO WRITE APP INVENTOR APPS AND IS PROVIDED “AS IS” “FOR YOUR INFORMATION” ONLY.

On my Mac (you can do this on Windows too), I renamed the exported ButtonChangeColor.aia file to ButtonChangeColor.zip:

ButtonChangeRenamedZipThen, I opened the .zip file to find two folders “src” and “youngandroidproject“:

InsideZip1

Open “src” and continue to open a sequence of folders stored inside one another until you get down to a folder with the name of your project. Here you will find these files:

DeepInside

The file ending in .bky contains the blockly code that describes your App Inventor blocks code. “Blockly” is separate project upon which some of the App Inventor system is based. You can open these files in a text editor program to see what is inside; depending on your computer and how it is configured, you may need to rename these files to end in .txt in order to open them in your text editing program (e.g. Windows Notepad, Mac OS X TextEdit).

Blockly code is a description of your program using the XML format (a web standard). As you look through this code snippet, you can see some of the components of your App Inventor program (or in this case, the components of ButtonChangeColor app), including variables, buttons, and the if statement, near the bottom:

BlocklyCode

The .scm file describes the screen of your app:

ScreenDescription

The youngandroidproject folder, shown up above, contains the project properties sheet:

ProjectProperties

This text file describes various attributes of the overall project.

DO NOT ATTEMPT TO MODIFY THESE TEXT FILES AND LOAD THEM BACK INTO APP INVENTOR .AIA FILES. YOUR CHANGES ARE UNLIKELY TO PRODUCE ANYTHING USEFUL AND ARE MORE LIKELY TO RESULT IN ERRORS AND WASTE YOUR TIME!

Please Share on Social Media

Please click on the buttons below this post to share with your friends on Facebook or other social media.

If you are not already following this blog, click on the following links to like on Facebook, add to your Google+ circles or follow on Twitter or in your RSS news reader. Thank you for visiting!

Advertisements

6 thoughts on “What is inside a .aia project file?

  1. Pingback: “Siri” for Android, written in App Inventor | App Inventor 2: Tutorial

    • The .apk file is not the same as the .aia file.

      .apk are Android package files containing executable code. The code file can be disassembled/decompiled into Java source code.

      The .aia file is the App Inventor “source” file, not the executable file. It is indeed stored as a .zip file with the AI source inside.

      That said, for those that wish to explore the .apk file instead, give the above link a try!

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s