Can't create file: Read-only file systemHow do I remount a filesystem as read/write?Why does Ubuntu refuse to execute files from an NTFS partition?External HDD mounted as read only fat32My ext HHD is READ-ONLY! Posted attempts to correct same confused me and made matters worst!Android adb no permissionUbuntu 14.04/15.10 - Android file access issueNot able to write to pendriveCreating disk images as a normal userPen drive turned read onlyCan’t delete file from shell because it’s read onlyRead/Write permission of 2nd hard drive

What is this green alien supposed to be on the American covers of the "Hitchhiker's Guide to the Galaxy"?

How do you give a date interval with diffuse dates?

How can I help our ranger feel special about her beast companion?

How would thermophilic fish survive?

In this iconic lunar orbit rendezvous photo of John Houbolt, why do arrows #5 and #6 point the "wrong" way?

When designing an adventure, how can I ensure a continuous player experience in a setting that's likely to favor TPKs?

Amira L'Akum not on Shabbat

Term “console” in game consoles

How fast does a character need to move to be effectively invisible?

Who determines when road center lines are solid or dashed?

What causes a rotating object to rotate forever without external force—inertia, or something else?

Is it ethical for a company to ask its employees to move furniture on a weekend?

Finding all possible pairs of square numbers in an array

Why are there few or no black super GMs?

Desecrating Shabbos to ask a Gadol to daven for a patient?

Difference between c++14 and c++17 using: `*p++ = *p`

Is encryption still applied if you ignore the SSL certificate warning for self signed?

Why is Google approaching my VPS machine?

Is straight-up writing someone's opinions telling?

Pauli exclusion principle - black holes

How can electric field be defined as force per charge, if the charge makes its own, singular electric field?

Why is the Intel 8086 CPU called a 16-bit CPU?

How to interpret a promising preprint that was never published?

An entire function all whose forward orbits are bounded



Can't create file: Read-only file system


How do I remount a filesystem as read/write?Why does Ubuntu refuse to execute files from an NTFS partition?External HDD mounted as read only fat32My ext HHD is READ-ONLY! Posted attempts to correct same confused me and made matters worst!Android adb no permissionUbuntu 14.04/15.10 - Android file access issueNot able to write to pendriveCreating disk images as a normal userPen drive turned read onlyCan’t delete file from shell because it’s read onlyRead/Write permission of 2nd hard drive






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















I was trying to recover files from android phone using adb shell and test disk. But I am getting a read only filesystem error, even though the permissions to write is granted to the user.



adb devices


list the device attached.
After I ran the following commands



adb shell


Inside the shell I did the following



user:/ $ su
user:/ # adb shell "stty raw; cat </dev/block/mmcblk0p56" > data.img
sh: can't create data.img: Read-only file system


How to solve this?



Update



Trying the proposed solutions:



 $ sudo adb shell "stty raw; cat /dev/block/mmcblk0p56" > /home/user/android-backup/data.img
stty: tcgetattr standard input: Not a typewriter
cat: /dev/block/mmcblk0p56: Permission denied


Mounting code:



$ sudo mount -o remount,rw /dev/block/mmcblk0p56 /tmp
mount: /tmp: mount point not mounted or bad option.









share|improve this question






























    4















    I was trying to recover files from android phone using adb shell and test disk. But I am getting a read only filesystem error, even though the permissions to write is granted to the user.



    adb devices


    list the device attached.
    After I ran the following commands



    adb shell


    Inside the shell I did the following



    user:/ $ su
    user:/ # adb shell "stty raw; cat </dev/block/mmcblk0p56" > data.img
    sh: can't create data.img: Read-only file system


    How to solve this?



    Update



    Trying the proposed solutions:



     $ sudo adb shell "stty raw; cat /dev/block/mmcblk0p56" > /home/user/android-backup/data.img
    stty: tcgetattr standard input: Not a typewriter
    cat: /dev/block/mmcblk0p56: Permission denied


    Mounting code:



    $ sudo mount -o remount,rw /dev/block/mmcblk0p56 /tmp
    mount: /tmp: mount point not mounted or bad option.









    share|improve this question


























      4












      4








      4








      I was trying to recover files from android phone using adb shell and test disk. But I am getting a read only filesystem error, even though the permissions to write is granted to the user.



      adb devices


      list the device attached.
      After I ran the following commands



      adb shell


      Inside the shell I did the following



      user:/ $ su
      user:/ # adb shell "stty raw; cat </dev/block/mmcblk0p56" > data.img
      sh: can't create data.img: Read-only file system


      How to solve this?



      Update



      Trying the proposed solutions:



       $ sudo adb shell "stty raw; cat /dev/block/mmcblk0p56" > /home/user/android-backup/data.img
      stty: tcgetattr standard input: Not a typewriter
      cat: /dev/block/mmcblk0p56: Permission denied


      Mounting code:



      $ sudo mount -o remount,rw /dev/block/mmcblk0p56 /tmp
      mount: /tmp: mount point not mounted or bad option.









      share|improve this question
















      I was trying to recover files from android phone using adb shell and test disk. But I am getting a read only filesystem error, even though the permissions to write is granted to the user.



      adb devices


      list the device attached.
      After I ran the following commands



      adb shell


      Inside the shell I did the following



      user:/ $ su
      user:/ # adb shell "stty raw; cat </dev/block/mmcblk0p56" > data.img
      sh: can't create data.img: Read-only file system


      How to solve this?



      Update



      Trying the proposed solutions:



       $ sudo adb shell "stty raw; cat /dev/block/mmcblk0p56" > /home/user/android-backup/data.img
      stty: tcgetattr standard input: Not a typewriter
      cat: /dev/block/mmcblk0p56: Permission denied


      Mounting code:



      $ sudo mount -o remount,rw /dev/block/mmcblk0p56 /tmp
      mount: /tmp: mount point not mounted or bad option.






      command-line permissions read-only adb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 8:58







      supremum

















      asked Mar 26 at 6:03









      supremumsupremum

      6182 gold badges7 silver badges17 bronze badges




      6182 gold badges7 silver badges17 bronze badges




















          2 Answers
          2






          active

          oldest

          votes


















          2














          You can try to remount the file system with read and write permissions (source):



          sudo mount -o remount,rw /partition/identifier /mount/point


          Or in your case you just can tray to redirect the output to a file located in a directory where you must be able to write:



          adb shell "stty raw; cat </dev/block/mmcblk0p56" > /tmp/data.img





          share|improve this answer























          • I would add 'writing to / is always a bad idea (not related if possible or not)'. But your suggestion to use /tmp covers the solution already.

            – LupusE
            Mar 26 at 7:53











          • Hi, @LupusE, why it is a bad idea?

            – pa4080
            Mar 26 at 8:00











          • There is something called FSH (en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) to define what data should be stored in which directory. ... It is very important if you've got different partitions for different purposes. For example: Avoid to put /var/log on a flash storage. Much read/write will kill it ... It is the same if you store everything on C: in windows. Maybe good for the moment, but don't show anyone.

            – LupusE
            Mar 26 at 8:07











          • @pa4080 Is /partition/identifier in this case /dev/block/mmcblk0p56? Also, what should be the mount point?

            – supremum
            Mar 26 at 9:02











          • @supremum, yes I think it should be /dev/block/mmcblk0p56, but can't be sure. You can list the attached drives/devices by the command sudo lsblk.

            – pa4080
            Mar 26 at 10:08


















          1














          Are you trying to copy the block device to an image file on your local computer? If so, try:




          adb shell su -c '"stty raw; cat < /dev/block/mmcblk0p56"' > data.img





          share|improve this answer

























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128734%2fcant-create-file-read-only-file-system%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            You can try to remount the file system with read and write permissions (source):



            sudo mount -o remount,rw /partition/identifier /mount/point


            Or in your case you just can tray to redirect the output to a file located in a directory where you must be able to write:



            adb shell "stty raw; cat </dev/block/mmcblk0p56" > /tmp/data.img





            share|improve this answer























            • I would add 'writing to / is always a bad idea (not related if possible or not)'. But your suggestion to use /tmp covers the solution already.

              – LupusE
              Mar 26 at 7:53











            • Hi, @LupusE, why it is a bad idea?

              – pa4080
              Mar 26 at 8:00











            • There is something called FSH (en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) to define what data should be stored in which directory. ... It is very important if you've got different partitions for different purposes. For example: Avoid to put /var/log on a flash storage. Much read/write will kill it ... It is the same if you store everything on C: in windows. Maybe good for the moment, but don't show anyone.

              – LupusE
              Mar 26 at 8:07











            • @pa4080 Is /partition/identifier in this case /dev/block/mmcblk0p56? Also, what should be the mount point?

              – supremum
              Mar 26 at 9:02











            • @supremum, yes I think it should be /dev/block/mmcblk0p56, but can't be sure. You can list the attached drives/devices by the command sudo lsblk.

              – pa4080
              Mar 26 at 10:08















            2














            You can try to remount the file system with read and write permissions (source):



            sudo mount -o remount,rw /partition/identifier /mount/point


            Or in your case you just can tray to redirect the output to a file located in a directory where you must be able to write:



            adb shell "stty raw; cat </dev/block/mmcblk0p56" > /tmp/data.img





            share|improve this answer























            • I would add 'writing to / is always a bad idea (not related if possible or not)'. But your suggestion to use /tmp covers the solution already.

              – LupusE
              Mar 26 at 7:53











            • Hi, @LupusE, why it is a bad idea?

              – pa4080
              Mar 26 at 8:00











            • There is something called FSH (en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) to define what data should be stored in which directory. ... It is very important if you've got different partitions for different purposes. For example: Avoid to put /var/log on a flash storage. Much read/write will kill it ... It is the same if you store everything on C: in windows. Maybe good for the moment, but don't show anyone.

              – LupusE
              Mar 26 at 8:07











            • @pa4080 Is /partition/identifier in this case /dev/block/mmcblk0p56? Also, what should be the mount point?

              – supremum
              Mar 26 at 9:02











            • @supremum, yes I think it should be /dev/block/mmcblk0p56, but can't be sure. You can list the attached drives/devices by the command sudo lsblk.

              – pa4080
              Mar 26 at 10:08













            2












            2








            2







            You can try to remount the file system with read and write permissions (source):



            sudo mount -o remount,rw /partition/identifier /mount/point


            Or in your case you just can tray to redirect the output to a file located in a directory where you must be able to write:



            adb shell "stty raw; cat </dev/block/mmcblk0p56" > /tmp/data.img





            share|improve this answer













            You can try to remount the file system with read and write permissions (source):



            sudo mount -o remount,rw /partition/identifier /mount/point


            Or in your case you just can tray to redirect the output to a file located in a directory where you must be able to write:



            adb shell "stty raw; cat </dev/block/mmcblk0p56" > /tmp/data.img






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 26 at 7:12









            pa4080pa4080

            15.6k7 gold badges33 silver badges80 bronze badges




            15.6k7 gold badges33 silver badges80 bronze badges












            • I would add 'writing to / is always a bad idea (not related if possible or not)'. But your suggestion to use /tmp covers the solution already.

              – LupusE
              Mar 26 at 7:53











            • Hi, @LupusE, why it is a bad idea?

              – pa4080
              Mar 26 at 8:00











            • There is something called FSH (en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) to define what data should be stored in which directory. ... It is very important if you've got different partitions for different purposes. For example: Avoid to put /var/log on a flash storage. Much read/write will kill it ... It is the same if you store everything on C: in windows. Maybe good for the moment, but don't show anyone.

              – LupusE
              Mar 26 at 8:07











            • @pa4080 Is /partition/identifier in this case /dev/block/mmcblk0p56? Also, what should be the mount point?

              – supremum
              Mar 26 at 9:02











            • @supremum, yes I think it should be /dev/block/mmcblk0p56, but can't be sure. You can list the attached drives/devices by the command sudo lsblk.

              – pa4080
              Mar 26 at 10:08

















            • I would add 'writing to / is always a bad idea (not related if possible or not)'. But your suggestion to use /tmp covers the solution already.

              – LupusE
              Mar 26 at 7:53











            • Hi, @LupusE, why it is a bad idea?

              – pa4080
              Mar 26 at 8:00











            • There is something called FSH (en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) to define what data should be stored in which directory. ... It is very important if you've got different partitions for different purposes. For example: Avoid to put /var/log on a flash storage. Much read/write will kill it ... It is the same if you store everything on C: in windows. Maybe good for the moment, but don't show anyone.

              – LupusE
              Mar 26 at 8:07











            • @pa4080 Is /partition/identifier in this case /dev/block/mmcblk0p56? Also, what should be the mount point?

              – supremum
              Mar 26 at 9:02











            • @supremum, yes I think it should be /dev/block/mmcblk0p56, but can't be sure. You can list the attached drives/devices by the command sudo lsblk.

              – pa4080
              Mar 26 at 10:08
















            I would add 'writing to / is always a bad idea (not related if possible or not)'. But your suggestion to use /tmp covers the solution already.

            – LupusE
            Mar 26 at 7:53





            I would add 'writing to / is always a bad idea (not related if possible or not)'. But your suggestion to use /tmp covers the solution already.

            – LupusE
            Mar 26 at 7:53













            Hi, @LupusE, why it is a bad idea?

            – pa4080
            Mar 26 at 8:00





            Hi, @LupusE, why it is a bad idea?

            – pa4080
            Mar 26 at 8:00













            There is something called FSH (en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) to define what data should be stored in which directory. ... It is very important if you've got different partitions for different purposes. For example: Avoid to put /var/log on a flash storage. Much read/write will kill it ... It is the same if you store everything on C: in windows. Maybe good for the moment, but don't show anyone.

            – LupusE
            Mar 26 at 8:07





            There is something called FSH (en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) to define what data should be stored in which directory. ... It is very important if you've got different partitions for different purposes. For example: Avoid to put /var/log on a flash storage. Much read/write will kill it ... It is the same if you store everything on C: in windows. Maybe good for the moment, but don't show anyone.

            – LupusE
            Mar 26 at 8:07













            @pa4080 Is /partition/identifier in this case /dev/block/mmcblk0p56? Also, what should be the mount point?

            – supremum
            Mar 26 at 9:02





            @pa4080 Is /partition/identifier in this case /dev/block/mmcblk0p56? Also, what should be the mount point?

            – supremum
            Mar 26 at 9:02













            @supremum, yes I think it should be /dev/block/mmcblk0p56, but can't be sure. You can list the attached drives/devices by the command sudo lsblk.

            – pa4080
            Mar 26 at 10:08





            @supremum, yes I think it should be /dev/block/mmcblk0p56, but can't be sure. You can list the attached drives/devices by the command sudo lsblk.

            – pa4080
            Mar 26 at 10:08













            1














            Are you trying to copy the block device to an image file on your local computer? If so, try:




            adb shell su -c '"stty raw; cat < /dev/block/mmcblk0p56"' > data.img





            share|improve this answer



























              1














              Are you trying to copy the block device to an image file on your local computer? If so, try:




              adb shell su -c '"stty raw; cat < /dev/block/mmcblk0p56"' > data.img





              share|improve this answer

























                1












                1








                1







                Are you trying to copy the block device to an image file on your local computer? If so, try:




                adb shell su -c '"stty raw; cat < /dev/block/mmcblk0p56"' > data.img





                share|improve this answer













                Are you trying to copy the block device to an image file on your local computer? If so, try:




                adb shell su -c '"stty raw; cat < /dev/block/mmcblk0p56"' > data.img






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 26 at 7:33









                EdwinEdwin

                263 bronze badges




                263 bronze badges



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128734%2fcant-create-file-read-only-file-system%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript