[Q] Unable to write to /storage/emulated - AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin

SGH-i337m
Rooted and still on stock MK6
SuperSU and TWRP
Everything seemed ok after root and was running fine, phone restored up from google without issue.
First noticed the issue a few days later when swiftkey keyboard suddenly was unable to load language packs. Of course suspected it was a swift key problem and troubleshot from there. No solution found so gave up and switched back to default keyboard.
Tried to run Titanium, received unable to access "/storage/emulated/legacy/TitaniumBackup" error.
Used X-plore (with SU privilege) to try to access and create dir or write to directory, no success. Able to create and write in /(root) without issue.
/sdcard 777 and all subs are 775
Seems that some apps can write into /sdcard and others fail.
Assume that the Swiftkey failure was due to unable to write to the default directory (/sdcard/Android/data/com.touchtype.swiftkey/files/).
Tried factory reset and restore to backup when keyboard worked and no change.
Unless there are any ideas my next option is to roll back to factory unroot and start over or look for good custom rom and hope it fixes the problem.

Related

[RESOLVED] assistance needed - chmod /data/data/

Hi guys, I recently used the 'fix permissions' option in ROM Manager, which caused my SMS contact pictures to disappear. I then was trying to fix this by doing:
Code:
su
chmod 666 /data/data/com.android.providers.contacts/files/*
in Terminal Emulator on the device and dropped it right at :
Code:
su
chmod 666 /data/data/
anyways, long story short......./data/data/ is now 666, the device just constantly force closed eveything and is now in a constant boot loop. So any advice in the best way to fix this? I have tried booting into recovery and doing 'fix permissions' but this does not fix it.
Would fastboot allow me to connect to PC and chmod /data/data/ to the correct permissions? (and what would those be??) Or is it screwed and do I need to factory reset?
Many thanks for any hrlp guys
Have you tried re-flashing your ROM form recovery, this should reset the permissions
To be honest I'm new to Android and don't know which img that would be or how to go about doing it. Would doing this wipe any of my data? I was hoping there would be a simple way of getting a terminal through my pc and chmod from there (if I knew the correct permissions).
fubofo said:
To be honest I'm new to Android and don't know which img that would be or how to go about doing it. Would doing this wipe any of my data? I was hoping there would be a simple way of getting a terminal through my pc and chmod from there (if I knew the correct permissions).
Click to expand...
Click to collapse
fix permissions will do it for the files within the folder so if it where that simple I think it you would have fixed it 666 gives read/write permissions to everyone so I don't see that would have caused your problems, what ROM are you currently running? If it's a custom one simply reflash it, which should preserve all your Data if not you may need to run an RUU for your vendor/market which will wipe everything
ghostofcain said:
fix permissions will do it for the files within the folder so if it where that simple I think it you would have fixed it 666 gives read/write permissions to everyone so I don't see that would have caused your problems, what ROM are you currently running? If it's a custom one simply reflash it, which should preserve all your Data if not you may need to run an RUU for your vendor/market which will wipe everything
Click to expand...
Click to collapse
Thanks for the reply, I'm running stock ROM with eng hboot, recovery obviously and custom kernel. The reason I ask about fastboot chmod is because I'm not 100% 'fix permissions' is working via recovery.
Also, just for knowledge sake, what .img would be for what from my backup?
- .android_secure.img
- boot.img
- cache.img
- data.img
- nandroid.md5
- recovery.img
- system.img
Re-reading your original post, something weird is going on here as running 'fix permissions' shouldn't have caused any grief in the first place, possibly your OC is too aggressive for your CPU? (although it shouldn't be).
Plenty of people have come across the same issue when running 'fix permissions' from ROM Manager. It causes contact pictures to not display in the SMS apps in some cases.
Also, I remember running an option from recovery and it did nothing (even though reported completed) hence why I want to overrule the fix permissions from CM Recovery 2.5.1.3 and try to run commands into the device someway (via fastboot if possible or another method).
I just need to know what permissions should be for /data/data/ and how I would go about running commands to the device. And failiing that, what .img would be needed flashed to get a working device again with as little data lost as possible nd how to go about flashing it... fastboot or recovery update.zip?)
fubofo said:
Plenty of people have come across the same issue when running 'fix permissions' from ROM Manager. It causes contact pictures to not display in the SMS apps in some cases.
Also, I remember running an option from recovery and it did nothing (even though reported completed) hence why I want to overrule the fix permissions from CM Recovery 2.5.1.3 and try to run commands into the device someway (via fastboot if possible or another method).
I just need to know what permissions should be for /data/data/ and how I would go about running commands to the device. And failiing that, what .img would be needed flashed to get a working device again with as little data lost as possible nd how to go about flashing it... fastboot or recovery update.zip?)
Click to expand...
Click to collapse
assuming you are running cM 2.5.1.3 recovery?, have you a nandroid backup to fall back ON, restoring that, from recovery, would be my first step. If not Modaco has a stock ROM that you could try flashing from recovery which should retain your data
ghostofcain said:
assuming you are running cM 2.5.1.3 recovery?, have you a nandroid backup to fall back ON, restoring that, from recovery, would be my first step. If not Modaco has a stock ROM that you could try flashing from recovery which should retain your data
Click to expand...
Click to collapse
Yeah I have backups but from a while ago (first boot to be honest lol). But what should I restore and how? (system.img or data.img? as its /data/data/ that seems screwed)
fubofo said:
Yeah I have backups but from a while ago (first boot to be honest lol). But what should I restore and how? (system.img or data.img? as its /data/data/ that seems screwed)
Click to expand...
Click to collapse
Not sure how a partial restore would go, I normally do a full restore via recovery
OK so I have managed to get it working again. Ran backup form recovery which seemed to allow me to gain adb shell once the backup was completed. From there I chmod 777 /data/data/ and this allowed me to boot the device.
Everything seems to be gone, like contacts and such, but my apps are all there inc. Titanium backup. I have restored all system data from the Titanum backups and am currently running Rom Manager 'fix permissions' to see if that will add the correct permissions to /data/data/ again.
Hopefully I just now need to add my Google / exchange / etc. accounts again to be back to normal.
[UPDATE] - everything now seems to be working fine (except the original SMS contact pictures issue) and my entire device is back to the way it was last week (from Titanium backup I presume).
[UPDATE 2] - have now successfully ran chmod 666 /data/data/com.android.providers.contacts/files/* (after Rom Manager 'fix permissions' and reboot) and SMS contact pictures are all working again. Everything is syncing now so should be back to normal soon!!
on a side note, this obviously shows there is an issue with fix permissions, looks like it needs updated.
I too had the "contact picture" issue after performing the mentioned "fix permissions" command in ROM Manager. By the way, I simply fixed it by manually re-assigning the picture for each contact -- fortunately I have just a couple dozen contacts with picture so it didn't take too long.
capt_harlock77 said:
I too had the "contact picture" issue after performing the mentioned "fix permissions" command in ROM Manager. By the way, I simply fixed it by manually re-assigning the picture for each contact -- fortunately I have just a couple dozen contacts with picture so it didn't take too long.
Click to expand...
Click to collapse
Yeah I tried that too first but it didnt seem to work for me, removed image then reassigned for a number of contacts but nothing worked. It's fixed now so I'll just let this die here for future similair issues.

[Q] Can't move several Titanium Backup .gz files to PC. Permission issues?

Most of the files in my TiBU folder will copy. All the properties files, and ~half of the .gz files. Most of these are game backups for progress purposes.
Dragging and dropping using Windows explorer doesn't work (nothing will happen at all)
Using ES File Explorer from the phone doesn't work.
adb from the PC doesn't work (command line has entries saying something about permissions on the failed files)
Help? I'm aware I could try backing up to cloud, but that's a workaround vs actually solving the problem. Plus it takes a while.
deusfaux said:
Most of the files in my TiBU folder will copy. All the properties files, and ~half of the .gz files. Most of these are game backups for progress purposes.
Dragging and dropping using Windows explorer doesn't work (nothing will happen at all)
Using ES File Explorer from the phone doesn't work.
adb from the PC doesn't work (command line has entries saying something about permissions on the failed files)
Help? I'm aware I could try backing up to cloud, but that's a workaround vs actually solving the problem. Plus it takes a while.
Click to expand...
Click to collapse
I think TIBU needs a big update....I have same issue but my biggest problem is I can´t uninstall any system apps (there a some I don´t need) when I tap the uninstall button always same thing...."Cannot find the .apk file .....no problem whith my personally apk´s..?
Somebody same issue?
I ran into the same issue and solved (?) it by rebooting into recovery and doing an adb pull from there. It doesn't work from within Android like you said but once you're in the recovery partition things are different.
I think this not a problem with TiBu (or maybe it just needs an update like shivasrage said), because I can't copy my Nandroids to my PC either. I had to do a adb pull from recovery as well in that case. In fact, now that I remember, yesterday I tried to copy some backups I did in ES Explorer and some of them failed.
Android 4.3 is secure but that's messing with our old habits and making things more difficult.
Yeah but I had this problem before updating to 4.3
deusfaux said:
Yeah but I had this problem before updating to 4.3
Click to expand...
Click to collapse
Oh, that's weird. I never had this problem before 4.3.
I just went through this exact same problem with my TWRP backup files yesterday (Except in that case it was an issue with the latest 2.6 version of TWRP, not the Android OS). For Titanium Backup, I am going to have to go back today and count the files that I copied over to my PC using Windows Explorer and compare it to an adb pull under Recovery. There are so many files as part of the backup that I would never have noticed a couple of missing ones like I did on TWRP.
EDIT: Just checked and 427 files were copied over doing it each way with a full Titanium Backup (Windows Explorer or an adb pull), so it works fine for me. I am on Android version 4.2.2.
I solved the problem by installing BusyBox from Play Store (Normal install). Then, opened a command window (you can also do it using Terminal Emulator) from within my platform-tools folder in C and typed:
adb shell
su (grant permission in the phone)
busybox chown -R 1023.1023 /data/media/*
Click to expand...
Click to collapse
Now I can safely copy all files by drag-n-drop or adb pull from within android.
Cheers
Can someone walk me through solving this? I'm wanting to do a factory reset immediately, but I can't before copying over these Titanium Backup'd apps.
Why is this even happening?
ABD, ES File Explorer, everything is giving me a permission error. The latter said EACCES (Permission denied) Refused by system.
edit: nevermind. I narrowed down the offending files, and forced new backups by deleting the old ones and re-doing them. Something about the way TiBu wrote a handful of the backups was not allowing anything to copy the files.

Apps Cannot Access Internal Memory after TWRP Recover

Background:
Trying out ROMs here and there, making backups along the way in TWRP. Turn out I had my favorite ROM from the start, so clean all the slates and performed a restore to Hybrid X Series 1.07. Everything is as it was...almost.
Apps are complaining about not being able to download to internal memory, there not being enough space, etc (there's plenty). Switching the download directory of these apps to the extSdCard is my current workaround.
What I've tried:
Fix Permissions from TWRP
Repair partition /data from TWRP using e2fsck
recursive busybox chown to 1001 on /data/media
restorecon on /data/media/0
This Fix Script Also found a similar flashable ZIP which did the same thing, but to no avail
None of these seem to have any effect. Also, trying to change permissions from Root Browser works on /sdcard, but not on any subfolders. Error returned is "Changing permissions was not successful. Please note that some file systems do not allow permission changes."
Any thoughts
funkeywoookey said:
Background:
Trying out ROMs here and there, making backups along the way in TWRP. Turn out I had my favorite ROM from the start, so clean all the slates and performed a restore to Hybrid X Series 1.07. Everything is as it was...almost.
Apps are complaining about not being able to download to internal memory, there not being enough space, etc (there's plenty). Switching the download directory of these apps to the extSdCard is my current workaround.
What I've tried:
Fix Permissions from TWRP
Repair partition /data from TWRP using e2fsck
recursive busybox chown to 1001 on /data/media
restorecon on /data/media/0
This Fix Script Also found a similar flashable ZIP which did the same thing, but to no avail
None of these seem to have any effect. Also, trying to change permissions from Root Browser works on /sdcard, but not on any subfolders. Error returned is "Changing permissions was not successful. Please note that some file systems do not allow permission changes."
Any thoughts
Click to expand...
Click to collapse
First off, this is an ownership issue, not a permissions issue
Second, chown 1001 gives ownership to Radio, not System. Chown to 1000 for System ownership
I never did find a solution to this problem. In my attempts to correct the problem, I ran chown on the entire /data partition by accident. The ROM booted, but everything crashed. After this, I just decided to salvage what little I might be able to save and move on with life.
The problem even persisted through wipe/reinstall of the ROM.
Finally, as a last resort, I had flash the stock version through Odin and start over from scratch.

[PSA] lollipop sdcard/TWRP directory permissions problem

I upgraded to motorola's 5.02 lollipop last week. Beautiful - no problems worth mentioning.
Then I wanted to try xposed, so I went into TWRP and made a backup. No problems with xposed. It is working fine.
But, I noticed a disk space inconsistency and a problem with the /sdcard/TWRP directory. Here are the symptoms:
Under settings->storage, it did not show my TWRP backups under "misc", but it counted the space as used in the numeric free space.
I tried to look at /sdcard/TWRP/ in es file explorer, but TWRP showed up as a file and not a directory.
At the command line, I got permission denied when I tried to cd into or ls the /sdcard/TWRP directory.
I could not see the /TWRP directory using my PC via USB/MTP while in android.
I could not delete /sdcard/TWRP within es file explorer or at the command line.
The TWRP directory was available and seemed fine at /data/media/0/TWRP.
Within TWRP recovery (v2.8.5.0), I had no problem viewing or deleting the TWRP directory, but when I made a new backup, the problem came back.
I googled and found a number of people with the same problem. (ie http://forum.xda-developers.com/google-nexus-5/general/sdcard-problems-upgrading-android-t2938749)
This fixes half of the problem. After running this, the TWRP ?file? was a directory again and the space was seen in storage under "misc":
Code:
su
restorecon -FR /data/media/0
But, I still did not access to read TWRP as either root in the terminal or from es file explorer. I noticed the owners were not the same as other directories. This fixed that problem:
Code:
su
chown -R media_rw:media_rw /data/media/0/TWRP
Now, I seem to finally have control over the /sdcard/TWRP directory. Whew!
I did not try a restore, and read where others were having trouble restoring lollipop (bootloops or /data missing) with older versions of TWRP. I would be interested to hear if anyone had successfully restored lollipop /data/ using TWRP.
edit: I was forced to restore system and data.. It worked....
Ctrl-Freak said:
I did not try a restore, and read where others were having trouble restoring lollipop (bootloops or /data missing) with older versions of TWRP. I would be interested to hear if anyone had successfully restored lollipop /data/ using TWRP.
Click to expand...
Click to collapse
About 2 weeks ago I had restored the Motorola 5.0.2 backup posted here on XDA [Link Removed by Mods due to Moto Policies]. I had the SELinux storage access problem. Then I restored the CM12 nandroid i had then.
No problem occurred. All of my data in /data is still intact.
Ctrl-Freak said:
I upgraded to motorola's 5.02 lollipop last week. Beautiful - no problems worth mentioning.
Then I wanted to try xposed, so I went into TWRP and made a backup. No problems with xposed. It is working fine.
But, I noticed a disk space inconsistency and a problem with the /sdcard/TWRP directory. Here are the symptoms:
Under settings->storage, it did not show my TWRP backups under "misc", but it counted the space as used in the numeric free space.
I tried to look at /sdcard/TWRP/ in es file explorer, but TWRP showed up as a file and not a directory.
At the command line, I got permission denied when I tried to cd into or ls the /sdcard/TWRP directory.
I could not see the /TWRP directory using my PC via USB/MTP while in android.
I could not delete /sdcard/TWRP within es file explorer or at the command line.
The TWRP directory was available and seemed fine at /data/media/0/TWRP.
Within TWRP recovery (v2.8.5.0), I had no problem viewing or deleting the TWRP directory, but when I made a new backup, the problem came back.
I googled and found a number of people with the same problem. (ie http://forum.xda-developers.com/google-nexus-5/general/sdcard-problems-upgrading-android-t2938749)
This fixes half of the problem. After running this, the TWRP ?file? was a directory again and the space was seen in storage under "misc":
Code:
su
restorecon -FR /data/media/0
But, I still did not access to read TWRP as either root in the terminal or from es file explorer. I noticed the owners were not the same as other directories. This fixed that problem:
Code:
su
chown -R media_rw:media_rw /data/media/0/TWRP
Now, I seem to finally have control over the /sdcard/TWRP directory. Whew!
I did not try a restore, and read where others were having trouble restoring lollipop (bootloops or /data missing) with older versions of TWRP. I would be interested to hear if anyone had successfully restored lollipop /data/ using TWRP.
edit: I was forced to restore system and data.. It worked....
Click to expand...
Click to collapse
hi, im having the same problem as you. I was on cm12, reverted to 4.4.4 and took the OTA, i then flashed TWRP and did a backup of the stock rom, but I cant see the file on ES Explorer and its taking space like you said. The problem is I didnt understand how you fixed it. Could you explain please? Whats the code you mention on the solution? where do you enter it?
Edit: I managed to flash a backup of the rom i was running prior to KitKat via OTG cable. TWRP recognized the backup when i made a couple of folders: TWRP/BACKUPS/TA000021JN and i flashed. As soon as the phone booted up I was able to see the TWRP folder on ES Explorer again so i think it 's probably fixed?
Cristian314 said:
hi, im having the same problem as you. I was on cm12, reverted to 4.4.4 and took the OTA, i then flashed TWRP and did a backup of the stock rom, but I cant see the file on ES Explorer and its taking space like you said. The problem is I didnt understand how you fixed it. Could you explain please? Whats the code you mention on the solution? where do you enter it?
Click to expand...
Click to collapse
Terminal emulator (app), I just tried it, works [emoji2]
Enviado desde mi XT1058 mediante Tapatalk

Remount issues

Hello,
I am currently running the H918 model with twrp and full root. Root was successful and the phone is running well. Thanks to all those who put in their time and effort and providing such a quick root capability. Makes the phone even more amazing than it already is.
Unfortunately, I am having an issue with be able to modify system files as I am unable to edit them whatsoever. I have tried using adb and using mount and remount commands but nothing has worked. I was hoping if anybody would be able to assist me with my issue. Thank you.
I've tried reflashing super su and I have busy box installed. Adaway is working properly (only through system less root) and I have been able to hibernate apps through tibu. I still cannot edit any files under /system. Does anyone have any suggestions? Thanks.
use root explorer
Thanks for your response. I've tried many root managers (including root explorer), enabled root permissions, had them successfully granted through supersu and still a no go. I just ran recowvery again and flashed twrp (this time without formatting data) and I am still unable to edit any system files.

Categories

Resources