Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - How to use Android Asset Packaging Tool?

Tags:

android

aapt

I want to use aapt.exe to stop compress my database.db file when compile my android app. I run terminal (Mac OS) and type:

aapt -0 db

It throws the error:

ERROR: Unknown command '-0'
Android Asset Packaging Tool

I am using android sdk v20.0.1. Did I make any mistake?

like image 534
Nguyen Minh Binh Avatar asked Dec 21 '22 09:12

Nguyen Minh Binh


2 Answers

AFAIK:

  • This tool allows you to view, create, and update Zip-compatible archives (zip, jar, apk). It can also compile resources into binary assets .

  • aapt that Android Asset Packaging Tool in the SDK tools / directory of the tool you can view, create, update the ZIP format document attachments (zip, jar, apk). resource files can also be compiled into a binary file.

  • Though you probably won't often use aapt directly, build scripts and IDE plugins can utilize this tool to package the apk file that constitutes an Android application.

  • Even though you may not directly use aapt tool, but the build scripts and IDE plug-in will use this tool packaged apk file constitutes an Android application.

FYI:

  • Linux or Mac OS X:

    • open a terminal, go to the tools / directory,
    • run the command. / Aapt
  • Windows:

    • open command prompt and go to to the tools / directory,
    • execute the command aapt.exe

aapt Commands:

  • click here to learn aapt commands
like image 180
Durai Amuthan.H Avatar answered Dec 22 '22 23:12

Durai Amuthan.H


aapt is a generic Android asset package tool that be used as:

"aapt list" - Listing contents of a ZIP, JAR or APK file.
"aapt dump" - Dumping specific information from an APK file.
"aapt package" - Packaging Android resources.
"aapt remove" - Removing files from a ZIP, JAR or APK file.
"aapt add" - Adding files to a ZIP, JAR or APK file.
"aapt crunch" - Crunching PNG files.

like image 44
Praveen Kumar Verma Avatar answered Dec 22 '22 21:12

Praveen Kumar Verma