Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7871477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:55:07+00:00 2026-06-03T01:55:07+00:00

I want to run hello world written on C++ and compiled with Android toolchain

  • 0

I want to run hello world written on C++ and compiled with Android toolchain 9, but I faced with issue: by default I have no permissions to launch it and I can’t change permissions using chmod`.

I used Android 2.3.3 - Api Level 10

Application was compiled by cross compiler for API level 9

Procedure:

Compile application:

~/toolchain_andr9/bin/ arm-linux-androideabi-g++ helloworld.cpp

Then send application to SDCARD on the emulator:

>adb push a.out /mnt/sdcard

then go to SHELL and try to run a.out:

>adb shell
> 
>/mnt/sdcard/a.out

And result is:

>`/mnt/sdcard/a.out: permission denied`

command ls -l shows rights for a.out:

>`----rwxr-x system   sdcard_rw   863656 2012-04-12 22:42 a.out`

I tried to change permissions:

>chmod 777 /mnt/sdcard/a.out

But rights don’t change:

>`----rwxr-x system   sdcard_rw   863656 2012-04-12 22:42 a.out`

I think I have left some important thing using android.

Could anybody help me and give me a way how to run application in `Android SHELL?

Thanks a lot.

P.S. sorry for my English =)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:55:08+00:00Added an answer on June 3, 2026 at 1:55 am

    By default, the SD card is mounted with option noexec, that disallows the execution of any file on the card, no matter what it’s permissions(even -rwxrwxrwx), so you need to move the file to another location and then execute it.

    The easiest is to move the file to /data/local/tmp/ and execute it using the full path (usual POSIX PATH semantics).

    > adb push a.out /data/local/tmp/a.out
    > adb shell
    > chmod 755 /data/local/tmp/a.out
    > /data/local/tmp/a.out
    

    This does not require root access and survives reboot.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to run a simple hello world, written in c, app. on my
I can successfully compiled and run the Hello World code. Now I want to
So I am trying to run console 64 bit Hello World program. I have
I've written a small hello world test app in Silverlight which i want to
I want to get a simple Python hello world web page script to run
I want to run a script remotely. But the system doesn't recognize the path.
Here is what I want: I have a huge legacy C/C++ codebase written for
Let's say I have the simplest single-file Sinatra app. The hello world on their
I have created a minimal RCP project with the Hello World example. I have
I've got a string: $string = Hello World!; I want to turn it into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.