[REF] Backup /efs folder. IMPORTANT. - Galaxy S II Themes and Apps

This guide is based on a guide by Candanga on the i9000 forums, and some commands from supercurio
Please hit thanks on their posts and show them some love for the write up.
-----------------------------------------------------------------------------------------------------------------------
I’ve compiled a quick guide to instruct how to make a copy of the /efs folder. I’ve found in many threads suggestions about backing up this folder but the methods itself are very general. Most of the times they suggest to “root and copy the folder” with Root Explorer or similar, but usually it’s not that easy or it just doesn't work for everyone.
This guide ASUMES you have read this Excellent Guide by Darkstrikerfirst:
H E R E <-- Make sure to read the ADB Guide.
I recommend doing this with a Mobile just taken out of the box or with any Official ROM of its Service Provider. If you have already Flashed your phone with another ROM but its working fine, then you can use that /efs also.
Why the /efs folder?
This is a very sensitive system folder that contains Phone-specific information such as the IMEI (encrypted in the nv_data.bin), wireless devices MAC addresses, product code (also in the nv_data.bin), and much more. Often users trying to change product codes or trying to unlock the mobile will end up corrupting data in this location.
Why back it up?
Well, let’s resume it saying that backing-up this little folder will keep you away from Samsung service centres.
***WARNING: I take no responsibility to any damage caused by the methods cited and/or written here. Their sole purpose is to back-up data and not to alter in any way the integrity of the original files of the mobile***
What you will need:
Rooted SGS II to get permissions as a SU (Super User) and perform the backup
I would suggest learning a little about the terminal commands used (in case you are not familiar with them), as it’s better to know what you are doing rather than typing strings like a little chimp without knowing what they are; if you are a little lazy, then you have a good chance bricking your mobile. <- Busybox Commands(or Google them)
Terminal Emulator by Jack Palevich (available from the market) <-Terminal Emulator or use ADB which is included in the SDK Development Tools
The standard prompt of terminal (adb) is a $ sign. Once you enter “SU” it will become a # Sign.
***NOTE: Make sure to keep an eye on the screen of your SGS II during this process, because it may request SU permissions [currently doesn't on CF-root]; else, you will get an error (just if it’s the first time). In Terminal Emulator you will need to reset the app after granting permissions cause it usually freezes***
*Remember: to use ADB you need to enable USB DEBUGGING under Applications/Development in your SGS II.
Here are 3 methods, I recommend that you do both Clean and RAW.
Basic, unix permissions lost :
Code:
su
busybox cp -a /efs /sdcard/efs/
Clean :
Code:
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
After this, you will end up with the file efs-backup.tar.gz in your INTERNAL SDCARD in sdcard/efs/, which is a “tarball” or a ZIP of the /efs folder. That file is your backup. You can expand it with Winrar.
You can also back up the mmcblk0p1 (where /efs is stored) under /dev/block which can greatly support in recovering your IMEI in case of a screw-up:
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
Same thing, the target is the INTERNAL SDCARD in sdcard/efs/, so go ahead and copy the file.

+1 just do it....

Can this not be tasked by using a root file explorer and copying efs folder as i have always done .
jje

JJEgan said:
Can this not be tasked by using a root file explorer and copying efs folder as i have always done .
jje
Click to expand...
Click to collapse
From the thread:
I’ve found in many threads suggestions about backing up this folder but the methods itself are very general. Most of the times they suggest to “root and copy the folder” with Root Explorer or similar, but usually it’s not that easy or it just doesn't work for everyone.
Click to expand...
Click to collapse
And just copying the folder won't preserve permissions etc.

JJEgan said:
Can this not be tasked by using a root file explorer and copying efs folder as i have always done .
jje
Click to expand...
Click to collapse
As long as you don't copy it to /sdcard, because it's VFAT and you'll lose the permissions settings on the files. If you copy it to /data or something then that's fine.

bumpity bump

RyanZA said:
As long as you don't copy it to /sdcard, because it's VFAT and you'll lose the permissions settings on the files. If you copy it to /data or something then that's fine.
Click to expand...
Click to collapse
Thanks the SGS 1 EFs i copied was copied to external sd card and then copied off to PC . Did likewise on SGS 2 using Super Manager .
So according to what you are saying that was not going to back up if needed .
jje

JJEgan said:
Thanks the SGS 1 EFs i copied was copied to external sd card and then copied off to PC . Did likewise on SGS 2 using Super Manager .
So according to what you are saying that was not going to back up if needed .
jje
Click to expand...
Click to collapse
It would probably have worked, but it would have made your EFS files readable and writable by any app that tried - not the end of the world since it's unlikely that any apps would try, but you still might as well avoid it if you can. I don't think there are any executables in EFS or anything that this will actually break though.

Thanks i did lose IMEI at one flash on SGS1 but a second flash recovered it .
I do like full backup of original firmware and anything else before playing with phone .
jje

I've done all 3 forms of backup myself. . Clean, raw and basic

thanks for the info. have had close calls previously and having backups would have helped ease the stress

Updated first post

Vodafone Fimrware backup BUKE1
Guys,
Have got a new samsung from Vodafone UK , but the firmware kernel seems a bit different, BUKE1. Is this something now and is the above method correct to backup the entire firmware so that it might be useful for vodafone samsung users. Is there an easy guide to backup the firmware ?
Regards
VJ

Guys can someone give me a bit of advice pleeeease
I followed this guide but am a bit worried i might have messed it up, i'm comfortable with command prompt as i'm a software dev but haven't used linux commands much.
Anyway i used the ADB shell from the Android SDK tools and entered the first command to backup the efs directory to the internal sdcard....
Basic, unix permissions lost :
Code:
su
busybox cp -a /efs /sdcard/efs/
Click to expand...
Click to collapse
And i got a lot of
Code:
cp: can't preserve ownership of 'sdcard/efs/...' : Operation not permitted
messages flashing up?
However i checked to see if the backup had been made and it had? What does this mean?
Next i compressed it using...
Clean :
Code:
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
Click to expand...
Click to collapse
Which seemed to work as i have the file in the place i expect
When i did the next step...
You can also back up the mmcblk0p1 (where /efs is stored) under /dev/block which can support greatly to recover your IMEI in case of a screw-up:
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs_dev-block-mmcblk0p1.img
Same thing, the target is the INTERNAL SDCARD in sdcard/efs/, so go ahead and copy the file.
Click to expand...
Click to collapse
It completed really quickly, with no messages telling me it was done but when i checked root explorer i couldn't find /dev/block/mmcblk0p1?
What has it done with it? I have dev/block/ but there is no mmcblk0p1? Although i do have /sdcard/efs_dev-block-mmcblk0p1.img. Should i have both?
From what i understand cat concatenates files and prints them to standard output, so i'm assuming the > is piping the std output to the internal sdcard?
Sorry for the questions but i thought i understood what i was doing but the last step and the "can't preserve ownership of.." messages from the first step threw me
Could someone explain this to me a little ;p

These aren't steps but rather separate methods achieving different things. Don't bother about the first one - it notes unix permissions lost , which is why you are seeing the can't preserve ownership messages. The files still backup but correct r/w permissions do not. You may as well chuck the files really, since you managed the tarball (second instruction). Just grab this and backup to external storage, in case you ever need it.
The raw backup will be under sdcard as you have found - stash this away somewhere safe too. You won't find mmcblk0p1 in root explorer as it is a partition, not a folder.

Thanks for the swift reply simion_levi
These aren't steps but rather separate methods achieving different things. Don't bother about the first one - it notes unix permissions lost , which is why you are seeing the can't preserve ownership messages. The files still backup but correct r/w permissions do not. You may as well chuck the files really, since you managed the tarball (second instruction). Just grab this and backup to external storage, in case you ever need it.
Click to expand...
Click to collapse
Do if i move the tarball to the external drive i can get rid of the sdcard/efs directory i copied to the internal card? The tarball has all the correct permissions?
The raw backup will be under sdcard as you have found - stash this away somewhere safe too. You won't find mmcblk0p1 in root explorer as it is a partition, not a folder.
Click to expand...
Click to collapse
Ok i didn't realise it was a partition, so i've just created an image of the partition that the efs folder resides on? Should i copy this to my external sd card as well?
Cheers brother

No problem! Yes, you've got it - backup the tarball and the partition image to computers, external drives etc so you can recover back to the phone in case of future catastrophe. The sdcard/efs directory can be deleted as the tarball contains exactly the same files (but with correct permissions).

Awesome, will get it done later. Out of interest how do you recover the partition image in the event of a disaster occurring?
Sent from my GT-I9100 using XDA App

One question please, since i stumbled on this one almost by luck.
Is there anything else to save before departing from stock?
Thanks.

Okay, so this guide assumes I already rooted my phone, but as a newbie I am completely in the dark about what does and what does not potentially harm the /efs. I would rather backup EVERYTHING before I flash/change anything, but from what I have read so far I need at least root to do backups.
Would it be safe to flash the Lite'ning Rom v1.1, coming from stock I9100XWKE2/I9100XENKE1/I9100XXKDJ/I9100XWKE2, and then backup mmcblk0p1?
Thanks!

Related

[Q] Device filesystem access

Probably I missed this question being answered somewhere, but I am tired of searching for it, so here it goes...
I decided not to root my device for now, and I am trying to get the most of it with stock limitations. Generally it is fine, but what bothers me most is the fact that i seem to be unable to write any files on phones internal memory. Is it so, that all / filesystem is inaccessible for write, or is there a dir where i could store some files i would like my phone to be able to access while sdcard is unmounted?
I may be wrong but thats the limitations of a "stock" phone,if you want access to the files you would have to root AFAI
That's exactly the impression I have, and I don't like the idea. I'm ex WM5/WM6 user, and I simply cannot understand why can't I have let's say /tmp/ dir just for myself...
banannq said:
That's exactly the impression I have, and I don't like the idea. I'm ex WM5/WM6 user, and I simply cannot understand why can't I have let's say /tmp/ dir just for myself...
Click to expand...
Click to collapse
Any reason for not rooting then? there are plenty stock roms/alternatives out there.
I grown tired of constantly tweaking my previous htc smartphone, decided to keep this one stock at least for now. I know rooting is an open door I will not want to close
and also I think there's no rooting method for gingerbread so far, is there?
As much as I know a downgrade is involved,I know what you mean about tinkering with the phone!It gets obsessive at times
You should have access to /data/local or at the very least /data/local/tmp
That's where fiels get pushed for rooting.
-Nipqer
The problem is I cannot even open /data directory
How are you trying to access the /data folder?
Cause if its some file manager app, some of them will only read sdcard.
-Nipqer
I'm used fre3vo to get temproot on my device (Z, Android 2.3.3),
and after that called:
mount -o remount,rw -t ext3 /dev/block/mmcblk0p25 /system
i can write to /system, but after reboot or remount into readonly all my changes dissapearing. Should i need S-OFF on my device? Can i get S-OFF without rollback to v1.34 on temp rooted 2.42?
Yeah the emmc is write protected when you are s-on, so any changes to /system will dissappear on reboot.
Unfortunately you cannot get s-off without downgrading to 1.34.
-Nipqer
Nipqer said:
How are you trying to access the /data folder?
Cause if its some file manager app, some of them will only read sdcard.
-Nipqer
Click to expand...
Click to collapse
Normaly I use total commander for android, but tried also ES File explorer, Linda manager, andexplorer... all of them basicaly let me view / folders (with exception of /data, /root, /cache etc) so i think it is filesystem condition rather than file manager fault...
banannq said:
Normaly I use total commander for android, but tried also ES File explorer, Linda manager, andexplorer... all of them basicaly let me view / folders (with exception of /data, /root, /cache etc) so i think it is filesystem condition rather than file manager fault...
Click to expand...
Click to collapse
try root explorer. you can still view directories without root (the app will just tell you that it failed to request superuser access). I'm pretty sure everything under /data is r/w access by default. My phone is rooted so I can't verify whether or not you can write to that directory on stock (I'd assume you could as long as there's free space available) but I can definitely recall being able to look at all my directories on stock using root explorer.
sephiroth1439 said:
try root explorer. you can still view directories without root (the app will just tell you that it failed to request superuser access). I'm pretty sure everything under /data is r/w access by default. My phone is rooted so I can't verify whether or not you can write to that directory on stock (I'd assume you could as long as there's free space available) but I can definitely recall being able to look at all my directories on stock using root explorer.
Click to expand...
Click to collapse
I guess it doesn't matter what software i use android simply locks me out of internal phone memory. It sucks, because phone was advertised as having over 1GB of internal storage space (no mention about it being inaccessible), and i can't even store ringtones on my device (have to use sdcard, and suffer side effect of it being unmounted at times). What a shame... with all the greatness, android sucks at very simple things
banannq said:
I guess it doesn't matter what software i use android simply locks me out of internal phone memory. It sucks, because phone was advertised as having over 1GB of internal storage space (no mention about it being inaccessible), and i can't even store ringtones on my device (have to use sdcard, and suffer side effect of it being unmounted at times). What a shame... with all the greatness, android sucks at very simple things
Click to expand...
Click to collapse
Don't blame Android for your carrier locking down your device
Sent from my HTC Vision using XDA App

[Q] Backup one galaxy nexus to another?

Hi all:
I got a new galaxy nexus that i'd like to use as my main phone, but I don't want to go through the trouble of setting it up again, my current gnex is just perfectly setup. They both have the same version of android (4.0.4).
I was going to to a clockwork mod backup of the current phone, move it to the new phone and restore there, but I think I'll mess up the IMEI if I do that?
What additional steps do I need to carry out to preserve the phone's IMEI?
Thanks in advance.
pcbroch said:
Hi all:
I got a new galaxy nexus that i'd like to use as my main phone, but I don't want to go through the trouble of setting it up again, my current gnex is just perfectly setup. They both have the same version of android (4.0.4).
I was going to to a clockwork mod backup of the current phone, move it to the new phone and restore there, but I think I'll mess up the IMEI if I do that?
What additional steps do I need to carry out to preserve the phone's IMEI?
Thanks in advance.
Click to expand...
Click to collapse
If both have absolutely the same ROM, restore just the data backup, not the system backup, and you should be fine.
You can copy the IMEI on the original nexus to the other? Wouldnt that be best?
Is so follow these steps (it may look much, but i dont think it would take long if u want to keep your original imei number!
You must have:
-Root
-Root explorer for copying files to and from EFS folder
-Android SDK for the ADB tools or Terminal in your phone.
IMEI is stored in ".nv_data" file in ORIGINAL SHIPPED EFS folder too, so you just have to do these:
1) make a copy of your EFS folder to your sdcard using root explorer and then make a backup of the folder to your computer [ to have another copy if you had to format sd card sometime ]
2) delete the EFS folder (BE SURE YOU HAVE BACKED IT UP IN A SAFE PLACE AS SAID IN STEP 1) from the root of your phone using root explorer.
3) reset the phone, after that, go to the root, and you can see that the EFS folder is still there, don't make any mistake, this EFS folder is new and generated by the android OS.
4) go to EFS folder using root explorer, and delete "nv_data.bin", "nv_data.bin.md5".
5) go to your backed up EFS folder on your sdcard, copy the "imei" folder to the EFS folder at the root of your phone, then again go to the backed up EFS folder at yout sdcard and copy the " .nv_data " file to your EFS folder at the root of your phone using root explorer, NOTE: the dot in first of nv_data is not a mistake, copy the ".nv_data" file.
6) make another copy of the ".nv_data" file in EFS folder in your phone, so you would have 2 copies of ".nv_data" in EFS folder
7) rename one of ".nv_data" files to "nv_data.bin" and another one to "nv_data.bin.bak"
8) at your PC open CMD at the ADB tool path, or run Terminal at your phone enter these commands:
adb shell ( use this command of you use ADB, if you're using terminal, skip this line )
su ( ALLOW THE MESSAGE CAME AT YOUR PHONE's DISPLAY BY SUPERUSER PROGRAM )
chown 1001:radio /efs/nv_data.bin
9) reset your phone.... after that you have your original IMEI. you can check your IMEI by dialing *#06#.
Sent from my LT26i using xda premium
HinotoriBR said:
If both have absolutely the same ROM, restore just the data backup, not the system backup, and you should be fine.
Click to expand...
Click to collapse
Thanks for the suggestion. Unfortunately, it doesn't seem to work, my IMEI gets clobbered to some generic IMEI when I do this.
Off to trying try sikiduck's suggestion.
Sikiduck said:
IMEI is stored in ".nv_data" file in ORIGINAL SHIPPED EFS folder too, so you just have to do these
Click to expand...
Click to collapse
Stupid question... there is no efs folder. Do you mean /factory? There are nv_data files in /data/radio as well.
I'll play with these a bit and see.
You got root?
Sikiduck said:
You got root?
Click to expand...
Click to collapse
Yes, I do. I tried playing with the nv_data files, but I can't get the original IMEI to come back no matter what I do.

Can't delete folder - permissions [SOLVED]

Hi
I recently restored my Nexus with the toolkit but when it put the files back, I think a permissions problem has occurred. I can rename folders, but I can't delete them. I have a rather large folder that I can't get rid of. When I try in various programs, it says delete failed, or no permissions, etc.
I am rooted, and have installed Terminal emulator, but am not terribly familiar with how to use it.
Any tips would be helpful.
Thanks
warlock257 said:
Hi
I recently restored my Nexus with the toolkit but when it put the files back, I think a permissions problem has occurred. I can rename folders, but I can't delete them. I have a rather large folder that I can't get rid of. When I try in various programs, it says delete failed, or no permissions, etc.
I am rooted, and have installed Terminal emulator, but am not terribly familiar with how to use it.
Any tips would be helpful.
Thanks
Click to expand...
Click to collapse
Simple solution might just be that your file explorer app doesn't have root access. Force stop it in apps->settings, check your superuser app and clear any saved entries for it, and launch the app again. It should request root privileges.
Where are the files/folders in question located? If they're in a secure place like /system/ then it's more likely to be the above scenario. If they're just in your sdcard folder, are they user made, or at all special?
Edit: Also in the future, this sort of thing is what the Q&A forum is for.
JoeSyr said:
Simple solution might just be that your file explorer app doesn't have root access. Force stop it in apps->settings, check your superuser app and clear any saved entries for it, and launch the app again. It should request root privileges.
Where are the files/folders in question located? If they're in a secure place like /system/ then it's more likely to be the above scenario. If they're just in your sdcard folder, are they user made, or at all special?
Edit: Also in the future, this sort of thing is what the Q&A forum is for.
Click to expand...
Click to collapse
I was using Root explorer, and have granted it root access
It is in /SDcard, so it shouldn't be anything that's protected
warlock257 said:
I was using Root explorer, and have granted it root access
It is in /SDcard, so it shouldn't be anything that's protected
Click to expand...
Click to collapse
Did you check the permissions for what you're trying to delete? They're displayed right in the normal view in root explorer, and you can edit them from the long press menu.
Anything unusual about the files/folders themselves? Were they created on the phone? By you? By apps? Copied and pasted over USB from a computer? You could try deleting from your computer over USB.
As for command line options, you can try 'rm -r [path]' for a folder and just 'rm [path]' for a file. rm is the delete(remove) command, -r is the recursive flag to apply the action to all items in the directory if a directory is the target. Pretty sure that you can do that straight from terminal emulator on your phone, and from a command prompt over usb you'd need to use 'adb shell' first.
JoeSyr said:
Did you check the permissions for what you're trying to delete? They're displayed right in the normal view in root explorer, and you can edit them from the long press menu.
Anything unusual about the files/folders themselves? Were they created on the phone? By you? By apps? Copied and pasted over USB from a computer? You could try deleting from your computer over USB.
As for command line options, you can try 'rm -r [path]' for a folder and just 'rm [path]' for a file. rm is the delete(remove) command, -r is the recursive flag to apply the action to all items in the directory if a directory is the target. Pretty sure that you can do that straight from terminal emulator on your phone, and from a command prompt over usb you'd need to use 'adb shell' first.
Click to expand...
Click to collapse
In root explorer the info under the folder says
rwxrwxr -x
I'm pretty sure that the problem started when I restored from the nexus toolkit on pc. I had a similar problem with my camera in that it couldn't save pictures to a folder, but all I did was rename the folder, and the camera app created a new one.
rm -r [path] in terminal emulator says "permission denied"
EDIT
upon further googleing, the 'chmod' command might be what I want, but I'm not sure which syntax is right.
warlock257 said:
In root explorer the info under the folder says
rwxrwxr -x
I'm pretty sure that the problem started when I restored from the nexus toolkit on pc. I had a similar problem with my camera in that it couldn't save pictures to a folder, but all I did was rename the folder, and the camera app created a new one.
rm -r [path] in terminal emulator says "permission denied"
EDIT
upon further googleing, the 'chmod' command might be what I want, but I'm not sure which syntax is right.
Click to expand...
Click to collapse
For chmod you want 'chmod [number] [path]', where number is a string that's a bit complicated to explain. You can learn about it by googling chmod probably better than I could type it out here on the fly. But if you use 777, it should assign full permissions, which would display as rwxrwxrwx in root explorer.
You can achieve the exact same effect in root explorer though, long press and choose permissions and you'll get a 3x3 grid. All boxes checked= full permissions, same as chmod 777. The three lower boxes for special permissions should be unchecked (fyi, they would turn chmod's numeric component into a 4 digit number, and as far as I know, android doesn't really use them at all).
Also, did you type su in terminal first? It doesn't innately have root (just like any app) so you need to do that and confirm the popup first. You'll need to do this before using chmod, and if you didn't do it before using rm, try it again.
Worth a try but just for reference, rwxrwxr-x is the normal permissions set for folders on the sdcard, so that's not immediately looking like a problem.
at the top of root explorer, theres a button that says mount r/w. press it, now it should say mount r/o. go ahead and delete that file now
simms22 said:
at the top of root explorer, theres a button that says mount r/w. press it, now it should say mount r/o. go ahead and delete that file now
Click to expand...
Click to collapse
Found the button, but didn't work
JoeSyr said:
For chmod you want 'chmod [number] [path]', where number is a string that's a bit complicated to explain. You can learn about it by googling chmod probably better than I could type it out here on the fly. But if you use 777, it should assign full permissions, which would display as rwxrwxrwx in root explorer.
You can achieve the exact same effect in root explorer though, long press and choose permissions and you'll get a 3x3 grid. All boxes checked= full permissions, same as chmod 777. The three lower boxes for special permissions should be unchecked (fyi, they would turn chmod's numeric component into a 4 digit number, and as far as I know, android doesn't really use them at all).
Also, did you type su in terminal first? It doesn't innately have root (just like any app) so you need to do that and confirm the popup first. You'll need to do this before using chmod, and if you didn't do it before using rm, try it again.
Worth a try but just for reference, rwxrwxr-x is the normal permissions set for folders on the sdcard, so that's not immediately looking like a problem.
Click to expand...
Click to collapse
it might be the files within the folder, rather than the folder itself. going into it, some of the files have a shield on them
When I go into its permissions, some of them were unchecked. I checked the 9 at the top, and it says:
"permissions change was not successful. Please note that some files systems (e.g. SD card) do now allow permission changes."
warlock257 said:
Found the button, but didn't work
it might be the files within the folder, rather than the folder itself. going into it, some of the files have a shield on them
When I go into its permissions, some of them were unchecked. I checked the 9 at the top, and it says:
"permissions change was not successful. Please note that some files systems (e.g. SD card) do now allow permission changes."
Click to expand...
Click to collapse
Well under normal circumstances, individual files on your sdcard should have permissions rw-rw-r--, and folders have rwxrwxr-x. (For reference, this is read as read, write, execute for Root, System, and Other, with dashes indicating that a permission is denied. So rwxrwxr-x means all permissions are granted to all three groups except for write to Other). This ties into larger aspects of the OS that basically exist to stop individual apps from reading or writing whatever they want without being included in groups.
The fact that you can't do something that shouldn't require elevated permissions, and you're getting that kind of error when you try to execute commands with higher permissions, suggests to me that your sdcard partition is using the wrong filesystem. Sort of sounds like a program tried to treat it like a real sdcard and formatted it to something else, in which case I have a hunch you're going to need to back up your data and do a full reset.
You might get a simpler solution if you ask in the thread for the toolkit you used. It's not something I have any experience with so good luck.
Out of curiosity, are you on Jellybean now? Jellybean changed the address for the sdcard partition, so if the toolkit wasn't updated to reflect this, it seems like the likely place things may have gone wrong.
---------- Post added at 07:04 PM ---------- Previous post was at 06:53 PM ----------
Actually if you want to check if it's using the right filesystem, run the command 'mount' from terminal. It'll give you a bunch of information, probably towards the bottom will be a line that mentions sdcard. Mine reads as
/dev/fuse /storage/sdcard0 fuse [more info about how it's currently mounted]
Yours -should- say that if you're on JB. If you're not, it should say something instead of /storage/sdcard0 (maybe /mnt/sdcard? I forget how it was on ICS). If it says something in place of fuse that may be the problem.
..I actually think mount used to say that the sdcard block was formatted as yaffs2, while everything else was formatted as ext4. Or maybe I just looked up that it was yaffs2 online, not from terminal on my phone? I wonder if this whole thing is the reason why some people seem bootloop-prone when flashing JB roms, if the changes have cut out access to important information about the filesystem, it may be triggering a really long error scan if their sdcard partition is large.
yes, backed up in ICS, and went to Jellybean.
doing a 'mount', I believe the line reads
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,realtime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
The files that have the shield icon have permissions:
rw-rw-r--
Yeah so everything that I can think of for you to check seems to be displaying as though normal. Although I don't know what aspect of these files root explorer is reading to mark them as protected and put the little shield on them.
You've tried these methods (rm, chmod) on individual files within the folder too, right? I guess this comes more from experience deleting protected files in windows, but I've found that sometimes a folder will deny deletion as long as it contains protected files, but it's relatively easy to give yourself permission to delete the individual files one by one, after which the folder goes down too. Possibly time consuming without a batch function, but easy.
My understanding of the fuse filesystem, by the way, is that it's just a virtual layer that allows the sdcard block to be treated differently than everything else on the phone, which is important for what happens when you plug it into a computer and the device is read. And I believe that the sdcard is supposed to be formatted as yaffs2 (everything else is ext4). Not sure how to check that directly, but it's possible that it has been changed to something else. But unless you can't delete -anything- on the sdcard, this seems unlikely.
JoeSyr said:
Yeah so everything that I can think of for you to check seems to be displaying as though normal. Although I don't know what aspect of these files root explorer is reading to mark them as protected and put the little shield on them.
You've tried these methods (rm, chmod) on individual files within the folder too, right? I guess this comes more from experience deleting protected files in windows, but I've found that sometimes a folder will deny deletion as long as it contains protected files, but it's relatively easy to give yourself permission to delete the individual files one by one, after which the folder goes down too. Possibly time consuming without a batch function, but easy.
My understanding of the fuse filesystem, by the way, is that it's just a virtual layer that allows the sdcard block to be treated differently than everything else on the phone, which is important for what happens when you plug it into a computer and the device is read. And I believe that the sdcard is supposed to be formatted as yaffs2 (everything else is ext4). Not sure how to check that directly, but it's possible that it has been changed to something else. But unless you can't delete -anything- on the sdcard, this seems unlikely.
Click to expand...
Click to collapse
yeah, I tried deleting files individually on the phone, and in windows. Wont let me do anything.
I guess the only sure fire method of clearing these files at the moment is to do a factory reset.
I can back up my stuff with titanium, so not that big a deal.
Your assistance has been much appreciated
:good:
warlock257 said:
yeah, I tried deleting files individually on the phone, and in windows. Wont let me do anything.
I guess the only sure fire method of clearing these files at the moment is to do a factory reset.
I can back up my stuff with titanium, so not that big a deal.
Your assistance has been much appreciated
:good:
Click to expand...
Click to collapse
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
That worked :laugh:
It's gone from all those folders.
Thanks very much!!!!!
warlock257 said:
That worked :laugh:
It's gone from all those folders.
Thanks very much!!!!!
Click to expand...
Click to collapse
+1 This worked for me as well. Thanks for posting...:good:
Had the same problem. Deleting through the /media path worked.
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
+4 You Sir are a genius! Thanks given!
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Sorry to necro this thread almost 4 years later, but I had the exact same issue with deleting a folder on internal storage (Android Lollipop). Regardless if you're still here on XDA or not: thanks for this solution.
So.. Not really a I9250, but I guess my problem on i9100 is the same.
For some weird reason this just happened to WhatsApp directory.. But whatever.
After digging deeper and deeper in recovery, it seems like the folder wasn't own by media_rw group, but root
I just had to run
Code:
chown -R 1023:1023 <folder-path>
For some weird reason neither chown nor ls -l were correctly working when booted on normal system
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Click to expand...
Click to collapse
@Cilraaz, I have no idea if you're still on XDA but after at least a week of intense searching I found your advice which solved my problem! Thank you.
My problem was on i9500 (still) running stock Lollipop. I've been preparing to install a custom recovery, and did a TWRP (2.8.7.0) nandroid backup. Problem was I then couldn't find the TWRP backup folder. It would only show in TWRP's file manager. Root Browser didn't show it with SU privileges, nor ES File Browser and connecting it to the PC didn't help either. It's only after looking in /data/media/0 that I could find the TWRP folder.

[Q] Moving everything out of the 0 folder in 4.2

I just flashed 4.2, and it moved everything into the /0/ folder on my SD card, just like everyone said it would. Is it safe to use root explorer to move everything back out of the /0/ folder onto the root of my SD card, or will it screw something up?
im having the same problem, my nandroid is in the 0 folder, (actually its in 0/0/clockwork/ when i moved up to the root folder, made a clockwork, cwm could not find it.. ANYONE have any info on how I can get my back up?? ps i have saved it to my computer...and used the g/n toolkit to push it but doesnt show up upon recoverymode.
You should not move it to the root folder. It will cause your root partition to run out of space and screw up the phone. Move it to the sdcard partition, which is located at either:
/sdcard
/storage/sdcard0
eksasol said:
You should not move it to the root folder. It will cause your root partition to run out of space and screw up the phone. Move it to the sdcard partition, which is located at either:
/sdcard
/storage/sdcard0
Click to expand...
Click to collapse
Ok, thats what I meant to ask, I just didnt put it in the form of "/sdcard"
what is the "zero" folder for now? why is it there? why cant i get cwm to find my dman nandroid to go back to? can someone tell me wtf is going on? when i click on restore, NOTHING cwm says there is no file, but when i browse, its now in the 0/clockwork/backup folder, but /sd there is nothing, how do i move it?? when i push with the toolkit, it doenst work.. can someone PLEASE help me out?
i have tried, re lcoking the phone to erease everything.. what do i need to do? i just want my old nandroid back please.
j
why do ull want to move it out of the 0 folder if its not causing any problems ? i don get it.. if its not causing any problems why move it ? just let it go !
They changed the filesystem layout for multi-user. So no, moving it out of 0 will do harm. /storage/sdcard0 now points to /storage/emulater/legacy. You could symlink some stuff around, though. Don't blame me if you screw up.
Or just wait for your recovery to be updated for 4.2's fs layout, then all should be fine. (what else breaks because of this?)
Edit :
I found a more elegant method :
Create a shortcut (a symbolic link) in /data/media named "clockworkmod" that points to /data/media/0/clockworkmod.
Steps are here : http://forum.xda-developers.com/showthread.php?t=1991657 - this is for the nexus 7, but I can't think of any reason why it shouldn't work on the galaxy nexus.
Original post :
I noticed that if I make a backup in 4.2 using cwm, it backs up to /data/media/clockworkmod. All my old backups (the ones I made before 4.2) are now in /data/media/0/clockworkmod. Is it safe to copy the contents of /data/media/0/clockworkmod over to /data/media/clockworkmod, so that I can restore my old backups if I want to ?

Screwed up my M8, trying to remove the Carrier IQ. HELP!!

Tried to remove the tmobile Carrier IQ from my device, last week. I used Solid explorer, to do it. This is the list:
/system/app
QXDM2SD.apk
QXDM2SD.odex
HtcResetNotify.apk
HtcResetNotify.odex
Htcloglevel.apk
Htcloglevel.odex
Smith.apk
Smith.odex
Udove.apk
Udove.odex
/system/priv-app
IQ-tmobile-release-signed.apk ???????
IQ-tmobile-release-signed.odex ???????
IQToggle.signed.apk
IQToggle.signed.odex
MyBreeze.apk
MyBreeze.odex
/system/lib
system/lib/libiq_service_tmobile_2.2.so
/data/data
com.carrieriq.tmobile
com.carrieriq.tmobile.IQToggle
The two questionable files above were slightly different, on my device. They read:
IQ-tmobile-release-unsigned.signed.apk
IQ-tmobile-release-unsigned.signed.odex
Against my better judgment, I continued to delete all of those files. Now, I can't even get past the banner on the home screen. It says, "Unfortunately, System Manager Application has stopped." I went to my bootloader and did a factory reset. Then, went to TWRP and did another factory reset and wiped the cache, dalvik & data. I used Firewater to unlock, root & S-OFF from KitKat Stock 4.4.2 and would prefer to keep it if possible. I had absolutely no problems with that version. The pictures are below.
As you can see, everything seems to be perfectly unaffected. I get calls, texts, voicemails, and every notification. It won't let me go beyond the home screen. If anyone can find KitKat 4.4.2 Stock Rom for Tmobile USA, I'd greatly appreciate it.
I am guessing you didn't do a backup before hand?
bradley_e_smith said:
I am guessing you didn't do a backup before hand?
Click to expand...
Click to collapse
Actually, I did a Titanium & NAND backup. But I didn't keep a copy of the NAND, in the internal storage. I just got an OTG Adapter. Gonna see if I can push the NAND onto the internal storage. Hopefully, it'll work. If not, I could definitely use your expertise.
Well then, all you need to do is to unpack the nand backup on your PC, and find the missing files and using TRWP mount / as rw and push the files back to your phone.
bradley_e_smith said:
Well then, all you need to do is to unpack the nand backup on your PC, and find the missing files and using TRWP mount / as rw and push the files back to your phone.
Click to expand...
Click to collapse
So, how do I do that?
Take your backup. the files that end in .win000, win001, win002, etc are tar files. So the easiest way would be to get a 'tar' program (cygwin has one built into it), and looking at each file look (tar -vtf [filename] -> will list the contents of the archive) for your missing files. By using -xvf option you can extract the file(s) you need.
BTW: On my lollipop backup of my M8 phone I didn't see any file that "IQ" in the filename, so kitkat must be different than lollipop.
-brad

Categories

Resources