Android ART - Usage of .oat file in /dalvik-cache/? - android

while playing around with Android ART and the "native" code file .oat/.elf which is created at the app installation process, I did notice something odd.
For my understanding, if the device is using ART (Android >= 5.0), the app will start with the compiled oat file (/data/dalvik-cache/arm64/).
Thats why I was kinda surprised when checking the used fd's of an app and did not find the file there. Only the normal apk (/data/app//base.apk) is listed there.
Check this output of my "ls -l /proc/PID/fd"
So I thought maybe it's just not listed there. So I did exchange the oat file of that app by myself by compiling another classes.dex with the dex2oat tool.
So even after changing the file, the app starts normally without any strange messages or errors (also in logcat).
What is the explanation for this? What is the detailed process Android does when starting an app under ART?
I hope someone can clear that up for me. Thanks a lot.

Based on #Paschalis comment, I investigated here and the oat file is indeed memory mapped on Android 5.0 devices (emulator):
a6af4000-a6af9000 r--p 00000000 1f:01 7366 /data/dalvik-cache/x86/data#app#my.app.works-1#base.apk#classes.dex
Check via:
cat /proc/<PID>/maps | grep dex
Sadly this isn't true anymore for Android 6.0 devices (Nexus 5 & arm-Emulator).
The odex file is within the /data/app/<APP>/oat/<ARCHITECTURE>/ folder as 'base.odex`
/data/app/app.app.works-1/oat/arm/base.odex
I still haven't found a valid reference for this, it is based on experiments and observations

Related

LogCat error: Error opening trace file: No such file or directory (2) [duplicate]

I am getting the above error:
error opening trace file: No such file or directory (2)
when I run my android application on the emulator. Can someone tell me what could be the possible reason for this?
I am using android-sdk-20 and below lines are added to AndroidManifest.xml
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15" />
I have also added the line:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
since I thought that there may be some issue with writing to the sd card.
It happens because you have not installed the minSdkVersion or targetSdkVersion in you’re computer. I've tested it right now.
For example, if you have those lines in your Manifest.xml:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
And you have installed only the API17 in your computer, it will report you an error. If you want to test it, try installing the other API version (in this case, API 8).
Even so, it's not an important error. It doesn't mean that your app is wrong.
Sorry about my expression. English is not my language.
Bye!
I think this is the problem
A little background
Traceview is a graphical viewer for execution logs that you create by using the Debug class to log tracing information in your code. Traceview can help you debug your application and profile its performance. Enabling it creates a .trace file in the sdcard root folder which can then be extracted by ADB and processed by traceview bat file for processing. It also can get added by the DDMS.
It is a system used internally by the logger. In general unless you are using traceview to extract the trace file this error shouldnt bother you. You should look at error/logs directly related to your application
How do I enable it:
There are two ways to generate trace logs:
Include the Debug class in your code and call its methods such as startMethodTracing() and stopMethodTracing(), to start and stop
logging of trace information to disk. This option is very precise
because you can specify exactly where to start and stop logging trace
data in your code.
Use the method profiling feature of DDMS to generate trace logs. This option is less precise because you do not modify code, but rather
specify when to start and stop logging with DDMS. Although you have
less control on exactly where logging starts and stops, this option is
useful if you don't have access to the application's code, or if you
do not need precise log timing.
But the following restrictions exist for the above
If you are using the Debug class, your application must have
permission to write to external storage (WRITE_EXTERNAL_STORAGE).
If you are using DDMS: Android 2.1 and earlier devices must have an SD
card present and your application must have permission to write to the
SD card. Android 2.2 and later devices do not need an SD card. The
trace log files are streamed directly to your development machine.
So in essence the traceFile access requires two things
1.) Permission to write a trace log file i.e. WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE for good measure
2.) An emulator with an SDCard attached with sufficient space. The doc doesnt say if this is only for DDMS but also for debug, so I am assuming this is also true for debugging via the application.
What do I do with this error:
Now the error is essentially a fall out of either not having the sdcard path to create a tracefile or not having permission to access it. This is an old thread, but the dev behind the bounty, check if are meeting the two prerequisites. You can then go search for the .trace file in the sdcard folder in your emulator. If it exists it shouldn't be giving you this problem, if it doesnt try creating it by adding the startMethodTracing to your app.
I'm not sure why it automatically looks for this file when the logger kicks in. I think when an error/log event occurs , the logger internally tries to write to trace file and does not find it, in which case it throws the error.Having scoured through the docs, I don't find too many references to why this is automatically on.
But in general this doesn't affect you directly, you should check direct application logs/errors.
Also as an aside Android 2.2 and later devices do not need an SD card for DDMS trace logging. The trace log files are streamed directly to your development machine.
Additional information on Traceview:
Copying Trace Files to a Host Machine
After your application has run
and the system has created your trace files .trace on
a device or emulator, you must copy those files to your development
computer. You can use adb pull to copy the files. Here's an example
that shows how to copy an example file, calc.trace, from the default
location on the emulator to the /tmp directory on the emulator host
machine:
adb pull /sdcard/calc.trace /tmp Viewing Trace Files in Traceview To
run Traceview and view the trace files, enter traceview
. For example, to run Traceview on the example files
copied in the previous section, use:
traceview /tmp/calc Note: If you are trying to view the trace logs of
an application that is built with ProGuard enabled (release mode
build), some method and member names might be obfuscated. You can use
the Proguard mapping.txt file to figure out the original unobfuscated
names. For more information on this file, see the Proguard
documentation.
I think any other answer regarding positioning of oncreate statements or removing uses-sdk are not related, but this is Android and I could be wrong. Would be useful to redirect this question to an android engineer or post it as a bug
More in the docs
Try removing the uses-sdk part form AndroidManifest.xml file. it worked for me!
Don't use the Android Virtual Device with too low configuration. Let it be medium.
Write all your code below this 2 lines:-
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
It worked for me without re-installing again.
I didn't want to reinstall everything because I have so many SDK versions installed and my development environment is set up just right. Getting it set up again takes way too long.
What worked for me was deleting, then re-creating the Android Virtual Device, being certain to put in a value for SD Card Size (I used 200 MiB).
Additional information:
while the above does fix the problem temporarily, it is recurring. I just tried my application within Android Studio and saw this in the output log which I did not notice before in Eclipse:
"/Applications/Android Studio.app/sdk/tools/emulator" -avd AVD_for_Nexus_S_by_Google -netspeed full -netdelay none
WARNING: Data partition already in use. Changes will not persist!
WARNING: SD Card image already in use: /Users/[user]/.android/avd/AVD_for_Nexus_S_by_Google.avd/sdcard.img
ko:Snapshot storage already in use: /Users/[user]/.android/avd/AVD_for_Nexus_S_by_Google.avd/snapshots.img
I suspect that changes to the log are not saving to the SD Card, so when LogCat tries to access the logs, they aren't there, causing the error message. The act of deleting the AVD and re-creating it removes the files, and the next launch is a fresh launch, allowing LogCat to access the virtual SD Card.
You will not have access to your real sd card in emulator. You will have to follow the steps in this tutorial to direct your emulator to a directory on your development environment acting as your SD card.
Actually, the problem is that either /sys/kernel/debug is not mounted, or that the running kernel has no ftrace tracers compiled in so that /sys/kernel/debug/tracing is unavailable. This is the code throwing the error (platform_frameworks_native/libs/utils/Trace.cpp):
void Tracer::init() {
Mutex::Autolock lock(sMutex);
if (!sIsReady) {
add_sysprop_change_callback(changeCallback, 0);
const char* const traceFileName =
"/sys/kernel/debug/tracing/trace_marker";
sTraceFD = open(traceFileName, O_WRONLY);
if (sTraceFD == -1) {
ALOGE("error opening trace file: %s (%d)", strerror(errno), errno);
sEnabledTags = 0; // no tracing can occur
} else {
loadSystemProperty();
}
android_atomic_release_store(1, &sIsReady);
}
}
The log message could definitely be a bit more informative.

Android - Eclipse: Trace Files

I have two issues--but first thing's first:
Dell Inspiron M5030: AMD Athlon II P360
Windows 7 Ultimate 32bit SP 1
Android ADT 21.0.1-543035
org.eclipse.platform.ide 3.8.0-I20120608-1200
EMULATOR:
4.0" WVGA (480x800:hdpi)
Android 4.2 (API 17)
armeabi-v7a
RAM:512, VM Heap:16
Internal Storage: 600MB
SDCard Size 128MB, Use Host GPU
In the onCreate of my activity i have these lines:
super.onCreate(savedInstanceState);
if (BuildConfig.DEBUG) {
Log.i(Constants.TAG_ACTSPLASH, "onCreate() Method called.");
Debug.startMethodTracing("actsplash");
}
In the onDestroy of my activity i have these lines:
super.onDestroy();
if (BuildConfig.DEBUG) {
Log.i(Constants.TAG_ACTSPLASH, "onDestroy()");
Debug.stopMethodTracing();
}
PROBLEM NUMBER ONE: In debug mode, after onCreate is called, Logcat says:
davlikvm: Unable to open trace file '/mnt/sdcard/actsplash.trace': Permission denied
NOTE: when running the apk on my Epic4G (Android 4.2) the trace file is created.
PROBLEM NUMBER TWO: The tracefile extracted from the Epic4G can't be processed.
(1) When running traceview I get the error:
The standalone version of traceview is deprecated. Please use Android Device Monitor (tools/monitor) instead. trace file './actsplash.trace' not found
(2) When running ADM ('%SDK%/tools/monitor.bat') and loading the trace file i get:
Failed to read the stack trace.
This article says something about a key file...is that what's missing? Any help would be appreciated!
The first problem can be fixed by adding the WRITE_EXTERNAL_STORAGE permission to your app, so that it can write to /sdcard. Alternatively, explicitly specify a filename for the trace file in your private app data storage area, and pull the file from there.
The second problem is "trace file not found", which is a direct result of the first. The third problem appears to be a variation of the second.
The trace file itself used to be split into "key" and "data" files, but those were combined into a single .trace file a long time ago.
The problem seems to be with the 4.2 emulator; the 4.1 emulator processed the trace file and (unlike the 4.2 emulator) allowed me to pull the file and load it in ADM (Android Debug Monitor).
For problem number 2:
Traceview can't resolve relative paths. I had to specify the full path to the tracefile (still using only the basename) starting with "C:/"
http://www.talkandroid.com/android-forums/android-games-applications/509-traceview-cant-find-trace-file.html

Error opening trace file: No such file or directory (2) in logcat [duplicate]

I am getting the above error:
error opening trace file: No such file or directory (2)
when I run my android application on the emulator. Can someone tell me what could be the possible reason for this?
I am using android-sdk-20 and below lines are added to AndroidManifest.xml
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15" />
I have also added the line:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
since I thought that there may be some issue with writing to the sd card.
It happens because you have not installed the minSdkVersion or targetSdkVersion in you’re computer. I've tested it right now.
For example, if you have those lines in your Manifest.xml:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
And you have installed only the API17 in your computer, it will report you an error. If you want to test it, try installing the other API version (in this case, API 8).
Even so, it's not an important error. It doesn't mean that your app is wrong.
Sorry about my expression. English is not my language.
Bye!
I think this is the problem
A little background
Traceview is a graphical viewer for execution logs that you create by using the Debug class to log tracing information in your code. Traceview can help you debug your application and profile its performance. Enabling it creates a .trace file in the sdcard root folder which can then be extracted by ADB and processed by traceview bat file for processing. It also can get added by the DDMS.
It is a system used internally by the logger. In general unless you are using traceview to extract the trace file this error shouldnt bother you. You should look at error/logs directly related to your application
How do I enable it:
There are two ways to generate trace logs:
Include the Debug class in your code and call its methods such as startMethodTracing() and stopMethodTracing(), to start and stop
logging of trace information to disk. This option is very precise
because you can specify exactly where to start and stop logging trace
data in your code.
Use the method profiling feature of DDMS to generate trace logs. This option is less precise because you do not modify code, but rather
specify when to start and stop logging with DDMS. Although you have
less control on exactly where logging starts and stops, this option is
useful if you don't have access to the application's code, or if you
do not need precise log timing.
But the following restrictions exist for the above
If you are using the Debug class, your application must have
permission to write to external storage (WRITE_EXTERNAL_STORAGE).
If you are using DDMS: Android 2.1 and earlier devices must have an SD
card present and your application must have permission to write to the
SD card. Android 2.2 and later devices do not need an SD card. The
trace log files are streamed directly to your development machine.
So in essence the traceFile access requires two things
1.) Permission to write a trace log file i.e. WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE for good measure
2.) An emulator with an SDCard attached with sufficient space. The doc doesnt say if this is only for DDMS but also for debug, so I am assuming this is also true for debugging via the application.
What do I do with this error:
Now the error is essentially a fall out of either not having the sdcard path to create a tracefile or not having permission to access it. This is an old thread, but the dev behind the bounty, check if are meeting the two prerequisites. You can then go search for the .trace file in the sdcard folder in your emulator. If it exists it shouldn't be giving you this problem, if it doesnt try creating it by adding the startMethodTracing to your app.
I'm not sure why it automatically looks for this file when the logger kicks in. I think when an error/log event occurs , the logger internally tries to write to trace file and does not find it, in which case it throws the error.Having scoured through the docs, I don't find too many references to why this is automatically on.
But in general this doesn't affect you directly, you should check direct application logs/errors.
Also as an aside Android 2.2 and later devices do not need an SD card for DDMS trace logging. The trace log files are streamed directly to your development machine.
Additional information on Traceview:
Copying Trace Files to a Host Machine
After your application has run
and the system has created your trace files .trace on
a device or emulator, you must copy those files to your development
computer. You can use adb pull to copy the files. Here's an example
that shows how to copy an example file, calc.trace, from the default
location on the emulator to the /tmp directory on the emulator host
machine:
adb pull /sdcard/calc.trace /tmp Viewing Trace Files in Traceview To
run Traceview and view the trace files, enter traceview
. For example, to run Traceview on the example files
copied in the previous section, use:
traceview /tmp/calc Note: If you are trying to view the trace logs of
an application that is built with ProGuard enabled (release mode
build), some method and member names might be obfuscated. You can use
the Proguard mapping.txt file to figure out the original unobfuscated
names. For more information on this file, see the Proguard
documentation.
I think any other answer regarding positioning of oncreate statements or removing uses-sdk are not related, but this is Android and I could be wrong. Would be useful to redirect this question to an android engineer or post it as a bug
More in the docs
Try removing the uses-sdk part form AndroidManifest.xml file. it worked for me!
Don't use the Android Virtual Device with too low configuration. Let it be medium.
Write all your code below this 2 lines:-
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
It worked for me without re-installing again.
I didn't want to reinstall everything because I have so many SDK versions installed and my development environment is set up just right. Getting it set up again takes way too long.
What worked for me was deleting, then re-creating the Android Virtual Device, being certain to put in a value for SD Card Size (I used 200 MiB).
Additional information:
while the above does fix the problem temporarily, it is recurring. I just tried my application within Android Studio and saw this in the output log which I did not notice before in Eclipse:
"/Applications/Android Studio.app/sdk/tools/emulator" -avd AVD_for_Nexus_S_by_Google -netspeed full -netdelay none
WARNING: Data partition already in use. Changes will not persist!
WARNING: SD Card image already in use: /Users/[user]/.android/avd/AVD_for_Nexus_S_by_Google.avd/sdcard.img
ko:Snapshot storage already in use: /Users/[user]/.android/avd/AVD_for_Nexus_S_by_Google.avd/snapshots.img
I suspect that changes to the log are not saving to the SD Card, so when LogCat tries to access the logs, they aren't there, causing the error message. The act of deleting the AVD and re-creating it removes the files, and the next launch is a fresh launch, allowing LogCat to access the virtual SD Card.
You will not have access to your real sd card in emulator. You will have to follow the steps in this tutorial to direct your emulator to a directory on your development environment acting as your SD card.
Actually, the problem is that either /sys/kernel/debug is not mounted, or that the running kernel has no ftrace tracers compiled in so that /sys/kernel/debug/tracing is unavailable. This is the code throwing the error (platform_frameworks_native/libs/utils/Trace.cpp):
void Tracer::init() {
Mutex::Autolock lock(sMutex);
if (!sIsReady) {
add_sysprop_change_callback(changeCallback, 0);
const char* const traceFileName =
"/sys/kernel/debug/tracing/trace_marker";
sTraceFD = open(traceFileName, O_WRONLY);
if (sTraceFD == -1) {
ALOGE("error opening trace file: %s (%d)", strerror(errno), errno);
sEnabledTags = 0; // no tracing can occur
} else {
loadSystemProperty();
}
android_atomic_release_store(1, &sIsReady);
}
}
The log message could definitely be a bit more informative.

error opening trace file: No such file or directory (2)

I am getting the above error:
error opening trace file: No such file or directory (2)
when I run my android application on the emulator. Can someone tell me what could be the possible reason for this?
I am using android-sdk-20 and below lines are added to AndroidManifest.xml
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15" />
I have also added the line:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
since I thought that there may be some issue with writing to the sd card.
It happens because you have not installed the minSdkVersion or targetSdkVersion in you’re computer. I've tested it right now.
For example, if you have those lines in your Manifest.xml:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
And you have installed only the API17 in your computer, it will report you an error. If you want to test it, try installing the other API version (in this case, API 8).
Even so, it's not an important error. It doesn't mean that your app is wrong.
Sorry about my expression. English is not my language.
Bye!
I think this is the problem
A little background
Traceview is a graphical viewer for execution logs that you create by using the Debug class to log tracing information in your code. Traceview can help you debug your application and profile its performance. Enabling it creates a .trace file in the sdcard root folder which can then be extracted by ADB and processed by traceview bat file for processing. It also can get added by the DDMS.
It is a system used internally by the logger. In general unless you are using traceview to extract the trace file this error shouldnt bother you. You should look at error/logs directly related to your application
How do I enable it:
There are two ways to generate trace logs:
Include the Debug class in your code and call its methods such as startMethodTracing() and stopMethodTracing(), to start and stop
logging of trace information to disk. This option is very precise
because you can specify exactly where to start and stop logging trace
data in your code.
Use the method profiling feature of DDMS to generate trace logs. This option is less precise because you do not modify code, but rather
specify when to start and stop logging with DDMS. Although you have
less control on exactly where logging starts and stops, this option is
useful if you don't have access to the application's code, or if you
do not need precise log timing.
But the following restrictions exist for the above
If you are using the Debug class, your application must have
permission to write to external storage (WRITE_EXTERNAL_STORAGE).
If you are using DDMS: Android 2.1 and earlier devices must have an SD
card present and your application must have permission to write to the
SD card. Android 2.2 and later devices do not need an SD card. The
trace log files are streamed directly to your development machine.
So in essence the traceFile access requires two things
1.) Permission to write a trace log file i.e. WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE for good measure
2.) An emulator with an SDCard attached with sufficient space. The doc doesnt say if this is only for DDMS but also for debug, so I am assuming this is also true for debugging via the application.
What do I do with this error:
Now the error is essentially a fall out of either not having the sdcard path to create a tracefile or not having permission to access it. This is an old thread, but the dev behind the bounty, check if are meeting the two prerequisites. You can then go search for the .trace file in the sdcard folder in your emulator. If it exists it shouldn't be giving you this problem, if it doesnt try creating it by adding the startMethodTracing to your app.
I'm not sure why it automatically looks for this file when the logger kicks in. I think when an error/log event occurs , the logger internally tries to write to trace file and does not find it, in which case it throws the error.Having scoured through the docs, I don't find too many references to why this is automatically on.
But in general this doesn't affect you directly, you should check direct application logs/errors.
Also as an aside Android 2.2 and later devices do not need an SD card for DDMS trace logging. The trace log files are streamed directly to your development machine.
Additional information on Traceview:
Copying Trace Files to a Host Machine
After your application has run
and the system has created your trace files .trace on
a device or emulator, you must copy those files to your development
computer. You can use adb pull to copy the files. Here's an example
that shows how to copy an example file, calc.trace, from the default
location on the emulator to the /tmp directory on the emulator host
machine:
adb pull /sdcard/calc.trace /tmp Viewing Trace Files in Traceview To
run Traceview and view the trace files, enter traceview
. For example, to run Traceview on the example files
copied in the previous section, use:
traceview /tmp/calc Note: If you are trying to view the trace logs of
an application that is built with ProGuard enabled (release mode
build), some method and member names might be obfuscated. You can use
the Proguard mapping.txt file to figure out the original unobfuscated
names. For more information on this file, see the Proguard
documentation.
I think any other answer regarding positioning of oncreate statements or removing uses-sdk are not related, but this is Android and I could be wrong. Would be useful to redirect this question to an android engineer or post it as a bug
More in the docs
Try removing the uses-sdk part form AndroidManifest.xml file. it worked for me!
Don't use the Android Virtual Device with too low configuration. Let it be medium.
Write all your code below this 2 lines:-
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
It worked for me without re-installing again.
I didn't want to reinstall everything because I have so many SDK versions installed and my development environment is set up just right. Getting it set up again takes way too long.
What worked for me was deleting, then re-creating the Android Virtual Device, being certain to put in a value for SD Card Size (I used 200 MiB).
Additional information:
while the above does fix the problem temporarily, it is recurring. I just tried my application within Android Studio and saw this in the output log which I did not notice before in Eclipse:
"/Applications/Android Studio.app/sdk/tools/emulator" -avd AVD_for_Nexus_S_by_Google -netspeed full -netdelay none
WARNING: Data partition already in use. Changes will not persist!
WARNING: SD Card image already in use: /Users/[user]/.android/avd/AVD_for_Nexus_S_by_Google.avd/sdcard.img
ko:Snapshot storage already in use: /Users/[user]/.android/avd/AVD_for_Nexus_S_by_Google.avd/snapshots.img
I suspect that changes to the log are not saving to the SD Card, so when LogCat tries to access the logs, they aren't there, causing the error message. The act of deleting the AVD and re-creating it removes the files, and the next launch is a fresh launch, allowing LogCat to access the virtual SD Card.
You will not have access to your real sd card in emulator. You will have to follow the steps in this tutorial to direct your emulator to a directory on your development environment acting as your SD card.
Actually, the problem is that either /sys/kernel/debug is not mounted, or that the running kernel has no ftrace tracers compiled in so that /sys/kernel/debug/tracing is unavailable. This is the code throwing the error (platform_frameworks_native/libs/utils/Trace.cpp):
void Tracer::init() {
Mutex::Autolock lock(sMutex);
if (!sIsReady) {
add_sysprop_change_callback(changeCallback, 0);
const char* const traceFileName =
"/sys/kernel/debug/tracing/trace_marker";
sTraceFD = open(traceFileName, O_WRONLY);
if (sTraceFD == -1) {
ALOGE("error opening trace file: %s (%d)", strerror(errno), errno);
sEnabledTags = 0; // no tracing can occur
} else {
loadSystemProperty();
}
android_atomic_release_store(1, &sIsReady);
}
}
The log message could definitely be a bit more informative.

Can't upload APK due to "The file is invalid: ERROR: dump failed because no AndroidManifest.xml found"

First: I'm not help vampire) I'm fighting with this issue for two days and I'm desperate to find solution. I've googled for the solution all over the inet and none is my case - this is the final stage and it feels hopeless.
To be clear: messing with AndroidManifest.xml doesn't help (no empty or unclosed tags etc). Nor app size issue (official limit is 4GB). Nor browser\system cause tried in FF, Chrome, IE 9 , Win 7, MacOSX SL 10.6.4, from my PC and from remote Server with Win2008 - same error.
Second - I extracted the AndroidManifest.xml from the APK file I submitted successfully (one with 13MB size) and extracted AndroidManifest.xml from the APK I'm trying to submit (yes, it's there! the size of this APK is 50MB) both with same apktool v 1.4.1. I compared the AndroidManifest.xml files with tortoise Diff - and the only difference between them is presence of android:targetSdkVersion="8" attribute in unuploadable APK and of course package name (diff only in .sub of com.mycompany.app.vers.sub - so i guess not a reason for this googlemare I'm having on ).
No way to give up on android:targetSdkVersion="8" - cause it can't be a reason for the error too.
Both APK were created with File -> Export -> Android -> Export Android Application with same keystore and key. I uploaded another app - third one with same AndroidManifest.xml as first one (without android:targetSdkVersion="8") but also of small size - 9MB, nothing bigger works((!
Help - I hate google and android now, almost :)
If you ran into the same problem I did with apktool, then please make sure you download the .jar file along with aapt.exe, that fixed it for me. I was running aapt.exe on an apk and got your above error, but it turns out I should have been running the apktool.bat file. The apktool.bat won't work if the .jar is not in the same directory. Get the jar file here: Android-APKTool
The maximum size of an Android app to be uploaded to Android Market is 50MB. If you're even one byte over this, I believe that the upload will fail. See this blog post for reference.

Categories

Resources