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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:15:13+00:00 2026-05-25T14:15:13+00:00

I have a partition in Android that’s not mounted because it doesn’t have a

  • 0

I have a partition in Android that’s not mounted because it doesn’t have a file system, and I need to write a string into it. I tried three different methods, and only the first (from adb) works. I need to do this under program control, which is what the second and third methods do, but both fail. I tried adding system permissions to my app, but that didn’t help. Do I need root permission to do this from a program?

First Method –

adb shell "echo test > /cache/command"
adb shell dd if=/cache/command of=/dev/block/mmcblk3p3 bs=4096 seek=1

Second Method –

java.lang.Process p = Runtime.getRuntime().exec(
"dd if=/cache/command of=/dev/block/mmcblk3p3 bs=4096 seek=1");

Third Method –

File fileName = new File("/dev/block/mmcblk3p3");
String cmd = "test";
FileOutputStream fos = new FileOutputStream(fileName);
fos.write(cmd.getBytes(), 4096, cmd.length());
fos.flush();

The second method gives no feedback, even though it failed to work. The third method gives the following output:

W/System.err( 1014): java.io.FileNotFoundException: 
/dev/block/mmcblk3p3 (Permission denied)
  • 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-25T14:15:13+00:00Added an answer on May 25, 2026 at 2:15 pm

    I should warn you about the risks you may have enabling liberal permissions on partitions that should not be accessed by applications. Having said that and assuming you know the risks, what you can do is to change the permissions, if you want to do it permanently you can add

    chmod 0666 /dev/block/mmcblk3p3
    

    to init.rc.
    There are sections containing other chmod commands where you can put yours.

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

Sidebar

Related Questions

I have the following string: <SEM>electric</SEM> cu <SEM>hello</SEM> rent <SEM>is<I>love</I>, <PARTITION />mind I want
I have to partition a multiset into two sets who sums are equal. For
I have a some items that I want to partition in to a number
I have a table that I would like to partition, but I don't know
I have set of non-unique numbers and would like to partition those numbers into
I have a file manager application that is writed by asp.net MVC. User can
I have a query that uses a partition by over a time column, however
I have a list of names. I want to partition this list into groups
I have a shared library that I build with the Android NDK, which ends
This is my problem: I have a partition on my Ubuntu system, let's call

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.