I am trying to install the samplebrowserplugin given in the android source code. As given here (https://github.com/android/platform_development/tree/master/samples/BrowserPlugin), I am able to follow it to the second step (make SampleBrowserPlugin). I have the .apk file now but when I try to install it using adb, all I get is
Failure [INSTALL_FAILED_DEXOPT]
When I run logcat, among various messages, I see
DexOptZ: zip archive '/data/app/com.android.sampleplugin-1.apk' does not include classes.dex
Related
I am trying to run calabash-android console to run some backdoors on a project I'm working on but every time I try to run it I get this error:
$ calabash-android console app//build/outputs/apk/app-debug.apk
Starting calabash-android console...
Loading /var/lib/gems/2.3.0/gems/calabash-android-0.9.0/irbrc
Running irb...
WARN: Did not find 'adb' in any standard directory of '/media/jack/OS/Users/jackb/AppData/Local/Android/sdk'. Calabash will therefore take longer to load
WARN: Did not find 'aapt' in any standard directory of '/media/jack/OS/Users/jackb/AppData/Local/Android/sdk'. Calabash will therefore take longer to load
WARN: Did not find 'zipalign' in any standard directory of '/media/jack/OS/Users/jackb/AppData/Local/Android/sdk'. Calabash will therefore take longer to load
ERROR: Could not locate Android dependency
ERROR: You can read about how Calabash is searching for an Android SDK and how you can help here:
ERROR: https://github.com/calabash/calabash-android/blob/master/documentation/installation.md#prerequisites
However I have created environment variables for ANDROID_HOME and JAVA_HOME which I copied the path from the folder the sdk is contained in.
I wouldn't be asking but i feel I've tried everything.
I also should add i definitely have them installed I just don't understand why my path is not finding them (I've also tried making the path go more and less into directories).
I am trying to compile android system package apps using
make
but the compiled APK is missing classes.dex file.
I have setup initialized and downloaded the android build environment properly.
I am using aosp_arm-user as lunch build target.
I am compiling the system apps using command
make -j16 Mms
The apk gets generated in
/out/target/product/generic/system/priv-app/Mms.apk
on installing the generated apk using
adb install Mms.apk
the install fails with the following error
Failure [INSTALL FAILED DEXPOT]
Logcat shows the following error
DexOptZ: zip archive '/data/app/com.android.mms-1.apk' does not include classes.dex
Any hints to solve the issue would be greatly appreciated.
User builds are pre-dexopt'd, meaning that dexopt runs on the apk as part of the build process, and produces a .odex file beside the .apk, rather than a classes.dex inside the apk.
Use an eng or userdebug build to prevent that from happening automatically. e.g.
lunch aosp_arm-userdebug
There may be an environment variable you could use to control the behavior as well.
I tried using directly the sdk manager, using android studio, and using the ADT tools, whenever i try to run any of the above IDEs it gives me the following error:
Cannot run program "/home/igeeko/Downloads/android-studio/sdk/platform-
tools/adb": error=2, No such file or directory' while attempting to get adb version from '/home/igeeko/Downloads/android-studio/sdk/platform-tools/adb
how to get over it? i did not tamper with any android file, i just decompressed the compressed file and executed the executable file.
EDIT: i am using Xubuntu 13.04, I have not tried command line, i downloaded the ADT bundle from developer.android.com, extracted it and then tried to execute the executable file, i also got this error message,
i am able to create a virtual device, but not able to run it, it says that the "adb" file does not exist, it is there, and i have given read & write permissions to everyone on the file, so what might be the problem? and i am trying this since a long time
I'm new to Android and I was given some .apk files (not created by me) with malware that I'm trying to run on the Android emulator for testing purposes (trying to get app's system call data using strace).I have checked several places online, but I'm stuck trying to install the .apk file. When I run the following command :
./adb install filename.apk
I'm getting this error:
Failure [INSTALL_FAILED_DEXOPT]
Any help is greatly appreciated!
Just Drag and drop apk into your Android emulator. its automatically install by it self.
I'm attempting to use Android's updater script language (Edify?) to install an APK over-the-air to an embedded device that I have control over. Here's a link that describes the language.
My first attempt was the following:
package_extract_file("added_files/data/app/test.apk", "/data/app/test.apk");
That resulted in test.apk being automatically installed in /data/data/com.acme.test, however the directory /data/data/com.acme.test/lib is empty, whereas it should contain test.so, a shared library contained in test.apk. (If I manually install using adb install test.apk, the library is extracted.)
I then tried extracting the APK into /data instead of /data/app so the OS wouldn't automatically install it into /data/data, and I could try installing using the script:
package_extract_file("added_files/data/app/test.apk", "/data/test.apk");
run_program("/system/bin/pm", "install", "/data/test.apk");
That resulted in the following error:
about to run program [/system/bin/pm] with 3 args
run_program: execv failed: Exec format error
run_program: child exited with status 1
I'm not sure why the above error happened.
Is there a way to install an APK and have its shared libraries extracted automatically? I could install the libraries manually, but I'm hoping to avoid that.
I'm not familiar with Edify, but by looking at the documentation, package_extract_file() simply extracts the APK as the archive file that it is. Why data ends up inside /data/data is strange; are you sure that isn't just left behind from a previous installation? I'd suggest fully uninstalling the app and trying again.
It seems to me that that particular function isn't suited for installing the app. You might want to try installing it through a command:
run_program("adb", "install", "-r", "added_files/data/app/test.apk");
Edify scripts run in a recovery mode and depending on your device not all partitions are available by default. Most likely your problem is that the partition you are trying to use is not mounted yet.