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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:28:49+00:00 2026-05-26T07:28:49+00:00

The closest thing to documentation I can find having to do with file storage

  • 0

The closest thing to documentation I can find having to do with file storage is this post (see below if you can’t access it), but it leaves me with several questions.

I would really, really, really like a knowledgeable explanation of what paths map to what storage here, seeing as how we’re supposed to hard-code them, and how precisely we’re expected to access them. An actual code sample would be superlative. My best guess from messing around with this is that:

  • /sdcard-> maps to the internal eMMC slot, and access is restricted.
    Environment.getExternalStorageDirectory(); … still returns this.
  • /media -> maps to the internal 8GB memory (I can write to this)
  • /data -> ?
  • ? -> maps to the optional microSD card

How can we access the external (optional, additional, the one you can pop out) sdcard, if /sdcard maps to restricted storage instead?

Now to quote the Nook developer docs:

Background There are two different partition schemes for the NOOK
Color devices in market today, one with only 250MB available to
applications on the /data partition and one with 4GB available to
applications on the /data partition. As a result, it is imperative
that applications are designed and developed in such a way as to
manage space effectively. Applications which fail to do so will not be
accepted for distribution via the Shop.

Area Associated Technical Recommendation or Solution if your
application requires large amount of data (including but not limited
to images, audio or video content), you should download those
resources at runtime and store them in the larger partition of the
device. If your application is going to request and store more than
100MB of data or resource you MUST abide by the the following
restrictions:

Your application must clearly and explicitly state in the description
provided that a large amount of data is used/delivered by the
application. You MUST write your resources and data onto appropriate
partition. You can detect if the device has an enlarged /data
partition as follows :

StatFs stat = new StatFs("/data"); 
long bytesAvailable = (long)stat.getBlockSize() *(long)stat.getBlockCount(); 
long megAvailable = bytesAvailable / 1048576; 
if (megAvailable > 1000){   
... write your resources in /data
} else {  
... write your resources on /mnt/media ... 
} 

To write data into your application’s private space on /data

FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_WORLD_READABLE); 

Your application should NOT assume the
presence of an sdcard on device, but you can test for one via a call
to

Environment.getExternalStorageState(); If an SD Card is not found,
your application MUST exit gracefully with a notification to the user
as to the reason for the exit.

Remember, that to access the /media partition, as well as
ExternalStorage you need to declare in your manifest:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">
</uses-permission>
  • 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-26T07:28:49+00:00Added an answer on May 26, 2026 at 7:28 am

    First of all try the following methods:

    • Context.getExternalFilesDir
    • Context.getExternalCacheDir
    • Environment.getExternalStoragePublicDirectory

    If neither of those return you a directory where you can write to, check the following google-groups thread, and use the code provided in the last answer, which enumerates all current mount-points:

    I have the same issue with Galaxy S. Until now all Android devices I
    got have “mount” command available. I build a list of available volume
    parsing “mount” response. This is not perfect but cleaver than Android
    storage API.

    String cmd = "/system/bin/mount"; 
    try { 
       Runtime rt = Runtime.getRuntime(); 
       Process ps = rt.exec(cmd); 
    
       BufferedReader rd = new BufferedReader( new InputStreamReader(ps.getInputStream()) ); 
       String rs; 
       while ((rs = rd.readLine()) != null) 
       { 
           //check what you need! 
           Log.i("MOUNT_CMD", rs); 
       } 
       rd.close(); 
       ps.waitFor(); 
    } catch(Exception e) { 
    //...
    }
    

    If it is possible to insert the microSD card in the Nook device, while it is running, you could also try the following:

    mVolumeManagerReceiver = new BroadcastReceiver() { 
      public void onReceive(Context context, Intent intent) { 
        Log.i("MediaMounter", "Storage: " + intent.getData()); 
      } 
    }; 
    
    IntentFilter filter = new IntentFilter(); 
    filter.addAction(Intent.ACTION_MEDIA_MOUNTED);
    filter.addAction(Intent.ACTION_MEDIA_UNMOUNTED); 
    filter.addAction(Intent.ACTION_MEDIA_REMOVED); 
    filter.addDataScheme("file"); 
    context.registerReceiver(mVolumeManagerReceiver, filter);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The closest thing I could find was System.Net.Mime.MediaTypeNames but that doesn't seem to have
The closest thing I've found is using Activator.CreateInstance, but you can't pass it a
The closest thing I could find related to this was the following: android maps:
parentId=$(this).closest('tr').find('td:nth(6)')[0].textContent; I am trying to get ID from flexigrid column. It works fine in
I have the following jQuery: $(this).closest('div.mcoup').find('div.delcoup').slideToggle(400) .siblings().children('div.delcoup').slideUp(400); What I'm trying to do is get
ruby -n is the closest thing I found, but it repeats the whole script.
i have read a lot about what im asking, but the closest thing i
The closest thing I see to what I want is AutoResolve All. I don't
What would be the closest thing to a std::vector in Java? By this I
What is the closest you can get to a try-catch block in php4? I'm

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.