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 4619332
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:24:36+00:00 2026-05-22T02:24:36+00:00

I need to send some data to a C program from my app in

  • 0

I need to send some data to a C program from my app in Android, and I think about using pipes. I read that Java can access to existing pipes (and open them as if it’s a normal file), but I’m unable to do such a thing in my application. When I try, the app just block until the message wait close appears, without writing anything special on logcat.

I found a thread on android mailing lists about this subject, but it was not very clear, and it refers to a folder that does not exist on my phone.

Furthermore, I know it’s not possible to make pipes on the sdcard, but when I try to do so in/data, I think I have root issues… Do you know if it is possible to access to that pipe (I try in and out of the app folder without success)?

I made the pipe with mkfifo, and the permissions seems OK to be open by any user.

prw-rw-rw- root     root              2010-11-18 04:53 video_pipe

I tried to add the X permission (who knows…) Here is what I have back:

# chmod u+x video_pipe 
Bad mode

The code that blocks is the camera initialisation (PATH is just the path to the pipe):

recorder.setOutputFile(PATH);

Here is the whole source : https://github.com/rbochet/Simple-Camera-App/commits/piped (commit 22dba257f6)

  • 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-05-22T02:24:37+00:00Added an answer on May 22, 2026 at 2:24 am

    Ok, I tried to fix the problem with the most stupid app that exists. You can find this one as a gist on github.

    So far, I discover this :

    • The only place where the pipe works is the app folder (ie /data/data/package.full.name/)
    • If you want to pass data to another program, you had better to launch it as a child of your app to ensure they are in the same group and thus have the same authorisation for the folder. If you can’t, you might be able to play with the groups (do ls -l -a on /data/data/ and have a look to the group name).

    DO NOT FORGET : You can’t actually write in the pipe until someone is listening at the other side. So if you test the file I posted on github, you will have that kind of logcat result.

    I/ActivityManager(  220): Start proc fr.stackr.android.upt for activity fr.stackr.android.upt/.UnixPipeActivity: pid=1359 uid=10048 gids={}
    I/UPIPE   ( 1359): Attempt started
    W/ActivityManager(  220): Launch timeout has expired, giving up wake lock!
    W/ActivityManager(  220): Activity idle timeout for HistoryRecord{4643c8b8 fr.stackr.android.upt/.UnixPipeActivity}
    

    Here, the system pause because nothing happens… Then I run cat v_pipe on the phone.

    V/UPIPE   ( 1359): SEND :: Try to write the first paragraph ....
    V/UPIPE   ( 1359): SEND :: Bip
    V/UPIPE   ( 1359): Flushing...
    V/UPIPE   ( 1359): SEND :: Bip post flush
    V/UPIPE   ( 1359): Closing…
    I/UPIPE   ( 1359): Attempt ended
    

    That’s done.

    closing : when I close the OutputStreamWriter, the listening side (ie cat) ends.
    If I commment the line, cat will still wait for input.

    flushing : seems to be important if you intent to get something without calling close.

    Carriage Return : Use \n.

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

Sidebar

Related Questions

I'm building a fairly simple PHP script that will need to send some emails
i have a program that receives data from a wireless device over bluetooth...i now
As the title says, I need to write a small program to read data
I need to send and receive data over serial connections (RS-232 and RS-422). How
I need to send emails to a list of IDs from the contact application,
We need to send uploaded files from our CMS website to any antivirus product
I want to send some data to a user after they log in to
I am basically trying to retrieve some data from a MySql server, and display
I want to display some data on table, let's call it TabeView app. So
every time i am writing some data to my server i first send a

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.