I run a console app (built with NDK) on an Android phone with the following command from my Windows machine:

adb push MyApp /data/local/tmp
adb shell "cd /data/local/tmp && chmod a+x MyApp"
adb shell "cd /data/local/tmp && ./MyApp"

basically it works on most the phones, but on a specific phone the first two commands succeed, but the third command fails with exit code 15 (adb exits with code 15).

What does code 15 mean? (The app itself does not have exit code 15).

I do not have an access to that specific phone, and need an idea on what can cause this.

Where are the docs on adb exit codes?

For example, if the app simply fails to start adb exits with code 1.

  • apps are executed with am start
    – alecxs
    Oct 9 at 16:08
  • 1
    @alecxs app are installed with adb install, but not adb push Oct 9 at 17:55
  • 1
    I wonder if it's an output by ADB or by the Android shell. Can you try again by entering the Android shell first (adb shell) and then executing the rest of the commands, or alternatively using an on-device terminal app?
    – Andrew T.
    Oct 12 at 6:05
  • By "console app" do you mean a simple command line program, as you might write on any UNIX-like system, or something different? Is it in C, C++, or what? What version of Android were you compiling for? What version of Android does the phone in question have? Oct 22 at 13:36
  • @JohnDallman Yes it is a console program in C++ like int main() { return 0;}. Android NDK r20b, Android 10. Oct 25 at 9:09


You must log in to answer this question.

Browse other questions tagged .