Android an open handset alliance project by k. Mahesh chandra


jar tf bin/MainActivity.apk



Download 276.25 Kb.
Page5/8
Date17.12.2020
Size276.25 Kb.
#55088
1   2   3   4   5   6   7   8
1 (1)
jar tf bin/MainActivity.apk

res/layout/main.xml

AndroidManifest.xml

resources.arsc

classes.dex

Where are the classes? They are in the classes.dex file. This is a special binary file format which wraps a set of ordinary Java classes.

AndroidManifest.xml seems like it would be a simple copy of the AndroidManifest.xml that's in the application source directory. It isn't. It's some binary format, which presumably contains the same information in a format which is quicker for Android to process.

With the emulator running, use the adb tool to copy the MainActivity.apk file over into the emulator's virtual memory:

adb install bin/MainActivity.apk

45 KB/s (4130 bytes in 0.088s)

adb can connect to the emulator because the emulator listens on certain TCP ports which adb knows.

Click "all" on the emulator and the activity shows up:



Click on the app to run it, and you'll see the Hello World message.

The easier way to do all this is to run the emulator, and then use the build.xml script:

ant clean install

That does it all.


Download 276.25 Kb.

Share with your friends:
1   2   3   4   5   6   7   8




The database is protected by copyright ©ininet.org 2024
send message

    Main page