Friday, January 01, 2016

Unable to delete files from internal storage (how to get write access to a write protected internal storage)




Hi guys,

Today I am gonna tell you guys "how to get write access to a write protected internal storage".
So, usually whenever we RESTORE our NANDROID backup, this problem occcurs and if you have a phone with a high internal storage and you haven't bought a memory card because of this, then this post is just for you.

In this case, "chmod" won't help because this is problem done by our phone's recovery(CWMR, TWRP and PHILZ).
When we restore our nandroid backup, these recoveries make that whole internal storage drive "write protected"
and don't make it normal and because of this you can't write anything on that storage(like deleting, moving, copying etc, renaming is possible though ;) ).

So for a perfect and forever(till you restore again) solution of this follow the following steps:

1. Connect your phone to PC as MTP device or USB storage.

2. Copy all  of the data from the drive you want to solve the issue with.

3.a. Now if your device connects as USB storage than just format as usual.

b. but real problem is when you have connected as MTP device then there will be no format option anywhere.but don't worry its very easy to do because your phone is already rooted :).It can be done by two mehtods:

(i): Using terminal emulator in your phone and type these commands:

# su                              -->  to get the root access
# cd ~                           -->  to get to the "/"(root) directory
# cd storage                  -->  to get to the "/storage/" directory
# rm -rf sdcrd0/            -->  to delete the data in sdcard0(internal storage of your phone)
note: if you can't find any of these folders then try to use "ls" command and get the exact name and type it as it is(because adroid is linux based and linux is case sensitive).

(ii): Using adb to get shell(using "adb shell") and type the same commands in above step.


4. now just copy your material back and now they all are r/w.



comments

0 comments