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

  • SEARCH
  • Home
  • 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 7854819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:11:54+00:00 2026-06-02T20:11:54+00:00

see i have following code in one native call errno = 0; FILE *fp;

  • 0

see i have following code in one native call

errno = 0;

FILE *fp;
fp = fopen("jigar.txt","wb");
if(fp == NULL)
    __android_log_print(ANDROID_LOG_ERROR, APPNAME, "FOPEN FAIL with %d",errno);
else
    __android_log_print(ANDROID_LOG_ERROR, APPNAME, "FOPEN pass "); 

which gets fail and shows

FOPEN FAIL with 30

now here 30 means it shows error

#define EROFS       30  /* Read-only file system */

In MainFest file on my application i have added this line

 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >

still i am getting this error..

How to resolve this issue?


Edit

thanks by specifies folder name it works But

In my case i have one Library which has such fopen() call where file names i can not give. It takes it default filename.

And i am using this Library in my ndk application so in this case how to solve this?

  • 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-02T20:11:55+00:00Added an answer on June 2, 2026 at 8:11 pm

    yuppi finally i got that

    i have did this way

    first change the current directory of my process from "/" to "/sdcard/"

    chdir("/sdcard/");
    

    and then it find path with respect to /sdcard/

    and everything WORKING..!!!

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

Sidebar

Related Questions

I have the following recursive code and it doesn't behave as expected (see details
i have written the following code: As you can see there is a for
I have the following code in one of my classes along with checks when
hi i have write following code which prints elements in sorted order only one
I have the following code which searches a text file on my phone's sd
I have the following code, see below: $(document).ready(function(){ var prefixNumber = $('.numeric').val(); if(prefixNumber.match(????){ prefixNumber.addClass('.field-error');
I have 2 collections and i have the following code to loop through one
Hey all. I have the following code: http://jsfiddle.net/g7Cgg/ As you can see, there are
I have the following code that controls radio button options shown one level at
on one page I have the following code: $(#photolist).dragsort({ dragBetween: true, dragEnd: saveOrder, placeHolderTemplate:

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.