Hello,
I tried to copy all data from an old phone to a new phone by using TWRP -> backup "/system" and "/data" partitions, then restore them in TWRP on a new phone, and then I found out that only applications were copied, but not my personal files (contents from folders "DCIM", "Documents", "Downloads", etc).
So then I did a "adb pull /sdcard/" from an old phone and uploaded it "adb push /sdcard/" to a new phone. But now most applications do not have write permissions over these folders, e.g. document viewer ("org.sufficientlysecure.viewer") and file manager ("org.joa.zipperplus7") could not delete files and folders, and even system application (LineageOS Updater) could not export update file. They have only read permissions (can open documents, etc). However some applications have write permissions - e.g. "Gallery" could delete old photos from "DCIM" directory.
I have checked simple Linux permissions and for /sdcard/* on both phones and they are same: 771 (drwxrwx--x) root:sdcard_rw for directories and 660 (-rw-rw----) root:sdcard for files. lsattr shows same attributes too. But apps on old phone have write permissions to /sdcard and apps on new phone have no permissions. Am I missing something?
Any ideas on how to fix this?
help
I checked 'ps' and saw that F-Droid app is running under user "u0_a75". I have verified the chmod of the path to cache, and all dirs from /sdcard/Android/data/org.fdroid.fdroid to /sdcard/Android/data/org.fdroid.fdroid/cache/apks/f-droid.org--1/ belong to "u0_a75" and have chmod drwxrwx--x u0_a75:sdcard_rw. But F-Droid could not download any app into that directory - it reports "permission denied". I have tried to chmod 777 for the whole path above but it did not help.
Then I thought it may be a SELinux problem, so I disabled it with "setenforce 0". Still no luck - most apps could not write to their storage.
What's going on?
P.S. I found out that Camera app writes files as a root user!
well, I gave up and reinstalled everything from scratch, wiping all partitions in advance.
Related
I changed from cwm to amon_RA and now I cannot delete my previous backups? Not through root explorer... Straight of SD or change owner / permissions... I'm s-off and tried mounting rw but nothing makes a difference.. any tips??
I tried
rm -rf /etc etc etc
in adb but still nothing? No idea why I cannot delete these files / folders .... nothing will let me
You can delete the files with your computer. Just go to your sd-card \clockworkmod\backup and delete the folders. That should work
Edit:
Get access with windows:
1. Open Windows Explorer, and then locate the file or folder you want to take ownership of.
2. Right-click the file or folder, click Properties, and then click the Security tab.
3. Click Advanced, and then click the Owner tab.
4. In the Change owner to box, click the new owner
5.(Optional) To change the owner of all subcontainers and objects within the tree, select the Replace owner on subcontainers and objects check box.
No access with windows: You can boot a linux system (bootable cd,...) go to the terminal and change the owner with chown or chmod. Just use google to get more information about it.
PC wont let me that's why I posted... Can't edit anything - owners / permissions ... Ill try booting Linux or if not reformat my SD...
Thanks
I'm not sure what broke this, but I have been getting weird errors with some of my apps that write to hidden folders (with . prefixes) on the sdcard. Might have been the OTA update to 4.2 from 4.1.
I've a rooted Galaxy Nexus mostly stock.
Logcat kept showing that permission was denied, MTP would freeze when I tried to create a file or folder, and rooted adb would show permission denied.
Turns out that the permissions to the folders was set such that it was owned by root:root instead of media_rw:media_rw like everything else.
I fixed this by running 'chown -R media_rw:media_rw * .*' from /sdcard/0/ in my rooted recovery.
I'm at bit of a loss here. Been rooting and all that for quite a long time.
Anyway, my freind has a mobile network not found error, upon investigation, it appeared he has *4999* IMEI problem. Fortuately, it appears he has EFS folder back up. I'm trying to restore it etc, but just am unable to create any folders in the internal memory of the phone, I'm rooted and on latest omnirom.
Create on your Phone Memory(Not Extrenal sd!!) a folder called "efsbackup"(without quotes)
Copy all files & folders from the EFS backup into "efsbackup" folder(The files are like in the picture)
Using root explorer, go to "efsbackup folder, select all files & folders there, and click Copy.
Still in root explorer, go to "efs" folder of your device(It is located where all main folders like data, system, etc.).
In "efs" folder, click paste. It will ask you if you want to replace your files, select replace to all files(So all your files from "efsbackup" folder will be in "efs" folder)
Now open terminal emulator
Write the following:
Code:
su
Then click enter. It will ask for super user permission, give it permissions.
Now write:
Code:
busybox chown 1001:1001 /efs/nv_data.bin
Then click enter.
Now write:
Code:
busybox chmod 06755 /efs/nv_data.bin
Then click enter.
Reboot device. Now everything should work.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2389426
Please help
[SOLVED]
Just tried another program from playstore called 'Root Browser'
phrozenflame said:
[SOLVED]
Just tried another program from playstore called 'Root Browser'
Click to expand...
Click to collapse
Ok apparentely it copies the files but not the folders or i cant see the original folders and it copies them with 'folderame-copy' affix :|
So here's the thing i've been exploring the possibilities of USBHost and decided to try an usb stick so i installed Paragon https://play.google.com/store/apps/details?id=com.paragon.mounter
It took me a while to get the hang of things. At first my usbstick was formatted in fat32. I specified in paragon i would like the default mount point to be USBStorage instead of /paragonNTFS. I made a small typo at first and named the folder usbStorage
now here comes the problem.
for some reason the app created 2 subfolders called sdb1 and sdb2 and i cannot remove them
Things i've tried:
cyanogenmod file manager in root access mode
-- delete directory > "This operation needs elevated permissions. Try switching to root access mode" (translated from dutch so wording may be a bit off
-- modifying permissions of folders > denied > changing permissions failed. for security reasons some filesystems, such as on sdcards do not allow changing permissions
Same problem for Astro file manager
Same problem when attaching the tablet to computer. parent directory (and sub dirs) get "removed" in windows but when checking the file system on the tablet, the opposite is true and the directories is still present
and now it's starting to piss me off. I want that folder "usbStorage" and it's subfolders "sdb1" and "sdb2" removed. so my guess is it'll have to be done by terminal commands but my terminal experience is ZERO.
in preperation of you guys helping me installed https://play.google.com/store/apps/details?id=jackpal.androidterm the same one used in cyanogenmod roms. I tried a bit of tinkering myself but prob doing something wrong
what i've tried (in sequence, --ok behind the command means it was succesfully executed)
su --ok
cd sdcard --ok
*rm -rf /usbStorage >> *rm: not found
rm -rf /usbstorage --ok, but folder was still present
rm -rf usbstorage --rm failed for usbStorage, Directory not empty
cd usbStorage --ok
rm -rf sdb1 --ok, rm failed for sdb1, Permission denied
at that point i gave up. I hope you guys can help me out
I do have paragon configured properly now and my USBstick in NTFS is getting recognised. Upon mounting of the usbstick, it now creates a folder called "USBStorage" where the contents of the usb stick is properly displayed.
so where are those android terminal / linux masters to help me out
only thing i can add is that when opening paragon with the stick attached but unmounted i do see a line above it /dev/block/sda1 but that doesn't seem to affect mounting in the specified directory
Bump, anyone? I want and need this folder removed
Verstuurd vanaf mijn Nexus 7 met Tapatalk
From my understanding of your post.
You are rooted and using cyanogenmod?
Did you try going into the app information and clear data?
In the app drawer hold the app and then drag it to App Info
Clear data.
Did that solve it? If not continue below.
Make sure you don't have the USB stick mounted and or plugged in.
Then go into terminal and type
su
Then type.
mount
The mount command shows all listed mount points. If you don't see the usbStorage or whatever mounted.
Then type.
busybox rm -rf usbStorage
Or whatever the main directory is...
For example directory is at.
/sdcard/usbStorage
cd /sdcard
rm -rf usbStorage
Let me know how you make out.
Sent from my Galaxy Nexus using xda app-developers app
nope, my phone is running CM 10.2 (not relevant to the question) this is the nexus section and its my nexus 7 2013 running stock rom but rooted yes that needs the folders removed.
The folders i need to delete according to the Nexus 7 mount main mount path SD content
main path: /storage/emulated/0 or /storage/emulated/legacy (both are the same according according to ParagonNTFS as a folder the mount path /sdcard/USBStorage = /storage/emulated/0/USBStorage or /storage/emulated/legacy/USBStorage
important lines?
/dev/fuse /storage/emulated/0/ fuse rw,nosuid,nodev,realtime, user_id=1023, default_permissions,allow_other 0 0
/def/fuse /storage/emulated/legacy fuse rw,nosuid,nodev,relatimeuser,user_id=1023, group_id=1023,default_permissions,allow_other 0 0
folders to delete are
/storage/emulated/0/usbStorage
/storage/emulated/0/usbStorage/sdb1 <= can select these just fine
/storage/emulated/0/usbStorage/sdb2
/storage/emulated/0/ParagonNTFS <= simply selecting this folder prompts CM manager "this operation needs elevated priviledges. Try switching to rootmodus, even when the CM filemanager already is in root mode
so i went
Opening terminal
su
cd sdcard (command ok)
cd usbStorage (commando ok)
busybox rm -rf sdb1
rm: can't remove 'sdb1': permission denied
Then i tried
cd /sdcard
rm -rf usbStorage
rm failed for usbStorage, Directory not empty
cd usbStorage
rm -rf sdb1
rm failed for sdb1, Permisison denied
busybox rm -rf sdb1
rm: can't remove 'sdb1': Permision denied
According to Cyanogen mod file manager:
Filesysteminfo:
Status: rw
linkpath?: /storage/emulated/0
Device: /dev/fuse
Type: fuse
Options: rw,nosuid,nodev,relatime,user_id=1023,default_permissions,allow_other
Dump / Pass: 0 / 0
even with the app ParagonNTFS uninstalled it doesnt work
hmm
try
close the app ParoganNTFS and uninstall it.
then try to delete those directories.
Also when you type
mount
does it show any of the directories you are trying to delete as mounted?
if it is try
umount /sdcard/usbStorage/sdb1
rm -rf /sdcard/usbStorage/sda1
were you able to delete the dir?
I had the same problems under very similar circumstances. Stickmount rather than paragon. The only way I could delete the dir was to boot into recovery (team win recovery project v2.7.1.1) and delete it with TWRP's terminal command. Something in the OS apparently locks on to the mount and simply will not let it go ever. It has to be done before android starts. It's very annoying. I am beginning to really be disgusted with many of the decisions google is making with regard to android. Why do they hate sdcard expansion so much? its absurd.
---------- Post added at 04:22 AM ---------- Previous post was at 04:17 AM ----------
Oh and by the way, even though the OS latched on to that folder as if its very existence depended on it, I was never able to even see the files on the USB memory stick with any file explorer. Worked just fine in kit kat and before. In some ways lollipop really sucks.
Hey guys.
There has been something really annoying me lately. It's the .thumbdata3 file in /storage/emulated/0/DCIM/.thumbnail. Its always like a 200 mb + file and it just takes up wayy too much space on my internal storage. So is there anyway to permanently remove this file for good? Like somehow prevent it from forming again? By the way, i already have the latest albums app so that didn't fix the problem.
Sent from my C2004 using XDA Free mobile app
The only way I know about is deleting the folder .thumbnail and then creating an empty file named .thumbnail (this will prevent the folder being created again). However, be adivised that Album app may get laggy since it'll regenerate the thumbnails every time you open the app or use the photo widget. If you have a lot of them, your phone also may get hot and the battery will go quickly if you keep opening album app various times...
Furthermore, it's hard to know the real size of that file. Yes, it holds some space in internal memory, but it's definitely not the size shown. In my phone, for example, this file show as 870 MB, but once I delete it I get only 50-60MB of space back...
mbc07 said:
The only way I know about is deleting the folder .thumbnail and then creating an empty file named .thumbnail (this will prevent the folder being created again). However, be adivised that Album app may get laggy since it'll regenerate the thumbnails every time you open the app or use the photo widget. If you have a lot of them, your phone also may get hot and the battery will go quickly if you keep opening album app various times...
Furthermore, it's hard to know the real size of that file. Yes, it holds some space in internal memory, but it's definitely not the size shown. In my phone, for example, this file show as 870 MB, but once I delete it I get only 50-60MB of space back...
Click to expand...
Click to collapse
That worked for like an hour. Afterwards when i checked again, i actually found two .thumbnail3 files instead of one. They were both the same size. Any idea why?
Sent from my C2004 using XDA Free mobile app
This trick works only for folders (e.g. if you created empty .thumbdata3 file inside /DCIM/.thumbnails/ it won't work, that file will be replaced next time you open Album app). You need to remove the entire .thumbnails folder from DCIM and then create an empty .thumbnails file in DCIM. Next time it'll try to create the folder again to store the thumbdata3 files but it'll fail because a file with the same name already exist, doing nothing then...
Another way is opening a terminal (or adb shell) and running these two lines of code as root:
Code:
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
That way this folder will be accessible only if Album app run with root access (which never occur)
mbc07 said:
This trick works only for folders (e.g. if you created empty .thumbdata3 file inside /DCIM/.thumbnails/ it won't work, that file will be replaced next time you open Album app). You need to remove the entire .thumbnails folder from DCIM and then create an empty .thumbnails file in DCIM. Next time it'll try to create the folder again to store the thumbdata3 files but it'll fail because a file with the same name already exist, doing nothing then...
Another way is opening a terminal (or adb shell) and running these two lines of code as root:
Code:
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
That way this folder will be accessible only if Album app run with root access (which never occur)
Click to expand...
Click to collapse
I actually did both of the things you said above. And so far so good. Well done bro, you're amazing
Sent from my C2004 using XDA Free mobile app
mbc07 said:
This trick works only for folders (e.g. if you created empty .thumbdata3 file inside /DCIM/.thumbnails/ it won't work, that file will be replaced next time you open Album app). You need to remove the entire .thumbnails folder from DCIM and then create an empty .thumbnails file in DCIM. Next time it'll try to create the folder again to store the thumbdata3 files but it'll fail because a file with the same name already exist, doing nothing then...
Another way is opening a terminal (or adb shell) and running these two lines of code as root:
Code:
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
That way this folder will be accessible only if Album app run with root access (which never occur)
Click to expand...
Click to collapse
Can you please write full adb procedure for noobs please
I think this might be a very helpfull, since that problem exists in virtually all android 4.0+ devices and it is annoying as hell
It's simple. The first option is chown/chmod the .thumbnails folder but it may not work in all phones (however, it works fine in Xperia M). You have two ways to do that:
Using a computer:
1) Enable USB Debugging
2) Plug your USB cable (make sure you're in MTP mode)
3) Open adb shell from Terminal/Command Prompt and run the following commands:
Bash:
su
rm -r /data/media/0/DCIM/.thumbnails
mkdir /data/media/0/DCIM/.thumbnails
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
Using only your phone:
1) Install Terminal Emulator app if you don't have it
2) Run the same commands:
Bash:
su
rm -r /data/media/0/DCIM/.thumbnails
mkdir /data/media/0/DCIM/.thumbnails
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
If you get errors when running any of these commands, you should install busybox in your device and then try again. Also, as I said before, it may not work in all phones, and if that method failed, you can try the empty file method. In your phone, using a file manager of your preference, go inside DCIM folder and delete the entire .thumbnails folder. Then, create an empty file named .thumbnails and you're done. If this method also fails, your phone have a different filesystem layout (eg. doesn't have an emulated SD Card) and I don't know any method of archiving that in these devices.
Furthermore, be adivised that your gallery may get laggy since it'll regenerate the thumbnails every time you open the app or use a photo widget because you disabled thumbnail cache. If you have a lot of pictures, your phone also may get hot and the battery will drain faster, especially if you open your gallery frequently...