Hey guys,
I think I'm getting crazy, I tried so many things now, but somehow the internal sdcard is not working on Xperia T with KitKat ROM.
Problem:
When I open the camera app is crashes instantly. Other camera apps say they need an external storage. The gallery says "no external storage"
In the filebrowser I see a lost+found folder but can't open it or do anything (write/read).
In adb shell with su I don't even have the permission to create a folder:
Code:
255|[email protected]:/ # mkdir /storage/sdcard0/test
mkdir /storage/sdcard0/test
mkdir failed for /storage/sdcard0/test, Permission denied
I tried CM12 M10-M12, an OmniRom and AOKP build. (all KitKat based)
I'm using TWRP 2.7.1.0 first, now 2.8.0.1 (2.8.1.0 does not seem to start). I wipe everything in recovery except the external micro sd card with the ZIPs. Then install the ROM and I tried with and without GAPPs. The boot.img is flashed via fastboot.
I tried erasing partitions via fastboot.
I flased CM10.2 (JB) and I could take a photo.
I have 2 Xperia T (Mint) with unlocked bootloader here to test and I don't get it working. But my sister has one too and I installed her CM11 a few month ago and she doesn't have any problems.
WTF am I doing wrong?
Try to enter the following in terminal:
Code:
su
busybox chown -R 2800:2800 /mnt/media_rw/sdcard0
WhiteNeo said:
Try to enter the following in terminal:
Click to expand...
Click to collapse
It works :good: Thank you so much
It seems that it works as long as I don't wipe sdcard. Does this mean TWRP is wiping/formating the partition wrong?
qubbey said:
It works :good: Thank you so much
It seems that it works as long as I don't wipe sdcard. Does this mean TWRP is wiping/formating the partition wrong?
Click to expand...
Click to collapse
The wiping is correct, the problem is that Sony has decided for some reason to use a different user/group than the one used by default in Android (and most other phones, as far as I know). Given that Android (Linux) is a user/group/permission driven OS, if any of these don't correspond to the action performed, there will be no access.
If you format the sdcard from a custom ROM or recovery, it will use user/group 1023 (media_rw), but the kernel is set to use user 2800, therefore you will lose RW access.
This can be easily fixed by modding the kernel to use the "proper" permissions, or simply correct the user/group with a CHOWN command.
Is this common knowledge? I didn't find a thing when I was searching for a solution. But I guess it happened to lot of people.
qubbey said:
Is this common knowledge? I didn't find a thing when I was searching for a solution. But I guess it happened to lot of people.
Click to expand...
Click to collapse
It is definitely not common knowledge, but anyone compiling a kernel and having tinkered with formatting would have noticed this, as did @updateing a few months back and was actually the one who confirmed this to me a few months back when I was modding kernels to get Folder Mount to work.
It just takes a bit of troubleshooting to come to this conclusion, but since it's being asked so many times lately, someone should make it a sticky.
WhiteNeo said:
Try to enter the following in terminal:
Code:
su
busybox chown -R 2800:2800 /mnt/media_rw/sdcard0
Click to expand...
Click to collapse
Hi, I'm having the same problem. After putting in the above, it says: Operation NOT permitted.
What is going wrong?
*-MaCK-* said:
Hi, I'm having the same problem. After putting in the above, it says: Operation NOT permitted.
What is going wrong?
Click to expand...
Click to collapse
You might try running the command without the "-R" first, so you're able to access sdcard0 at all.
If this fails as well, try replacing /mn7/media_rw/sdcard0 with /storage/sdcard0
WhiteNeo said:
You might try running the command without the "-R" first, so you're able to access sdcard0 at all.
If this fails as well, try replacing /mn7/media_rw/sdcard0 with /storage/sdcard0
Click to expand...
Click to collapse
I'd be surprised if that works, given that the proper user/group for /storage/sdcard0 is "root:sdcard_rw", as it is set by default, and not "2800".
@*-MaCK-*:
Did you type in the "su" command first, on it's own?
Are you in fact rooted?
Does your storage have the proper file system format (ext4)?
You can check the file system format by running the command:
Code:
mount
Antiga Prime said:
I'd be surprised if that works, given that the proper user/group for /storage/sdcard0 is "root:sdcard_rw", as it is set by default, and not "2800".
@*-MaCK-*:
Did you type in the "su" command first, on it's own?
Are you in fact rooted?
Does your storage have the proper file system format (ext4)?
You can check the file system format by running the command:
Code:
mount
Click to expand...
Click to collapse
Yes, I'm rooted. And yes, I've typed in the "su"command first.
I think that my storage doesn't have the right format. I think it was vfat?
But now things have changed. After flashing a stock rom, there is only a ejected sdcar0 left. Before i could enter the sdcard0 via device/mnt..... Now, their is no mnt map, and esfile explorer doesn't show anything. It says: "SD card ejected"
It doesn't matter if the data is lost, but i realy like to have access again too the sdcard0 drive!
*-MaCK-* said:
Yes, I'm rooted. And yes, I've typed in the "su"command first.
I think that my storage doesn't have the right format. I think it was vfat?
But now things have changed. After flashing a stock rom, there is only a ejected sdcar0 left. Before i could enter the sdcard0 via device/mnt..... Now, their is no mnt map, and esfile explorer doesn't show anything. It says: "SD card ejected"
It doesn't matter if the data is lost, but i realy like to have access again too the sdcard0 drive!
Click to expand...
Click to collapse
:laugh: It seems like I have fixed it. I managed to install the latest version of TWRP and fixed the format of the sdcard to ext4.
It is formatted and working. Very happy.
After reboot the sdcard0 was visible again. Though, I could not write too it. So I put in the next in the Terminal:
su
busybox chown -R 2800:2800 /mnt/media_rw/sdcard0
After this, averything was normal again!
Thanx you all!:good::good::good::good:
WhiteNeo said:
Try to enter the following in terminal:
Code:
su
busybox chown -R 2800:2800 /mnt/media_rw/sdcard0
Click to expand...
Click to collapse
i have th same problem i write this code but it tell me busybox not found
Related
Hey guys
So I am currently running 2.3.3 on my N1. I manually flashed the update from Here. I used the "Modified GRI40".
So after update, I noticed that my adfree wasn't working. Running the app, it tells me my host file is up to date. However, no ads are being blocked. Same after uninstalling and re-installing the app. So then I decided to try to copy the host file over manually using adb.
I run adb and get root prompt. Then I mount /system as rw using
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
It appears to work. So then I try copying the host file to /system/etc using
Code:
cp hosts /system/etc
Then I get the following error.
"write error: No space left on device"
But i do, over 30mb of free space.
So I don't know what the issue is. Im thinking that maybe /system isn't being mounted as RW so it is giving the error??
Any help would be much appreciated.
Thanks!
Did you check the /system free space, or /data?
Try doing a df -h from the terminal to verify that you do, indeed, have free space on /system as well as /data, as Jack_R1 mentioned.
codesplice said:
Try doing a df -h from the terminal to verify that you do, indeed, have free space on /system as well as /data, as Jack_R1 mentioned.
Click to expand...
Click to collapse
Well looks like somehow I don't have any space left. I went to go download a terminal application from the market but it errored saying no space left.
So now I can't even install new apps.
However, under settings->storage it says I have 28MB of free space left.
Any ideas?
Sent from my Nexus One using XDA App
Reboot, wipe Dalvik cache.
Go to Manage Applications, clear browser cache.
If it restores you some space - great, proceed with what codesplice suggested above.
If it doesn't - backup, wipe and reflash.
If no backup installed - you're out of luck.
Since you seem to have adb functioning, you can run adb shell df -h to get a readout of your available space on your different file systems. This could help troubleshoot the issue.
Additionally, rather than doing a long manual "mount" command, you could simply do an adb remount to automagically remount all file systems in read/write mode.
The indication under Settings --> Storage indicates free space on /data, I believe, and gives no indication of /system (where you're trying to copy the hosts file).
Another thought (sorry this isn't really coherent at this point...): What if you were to remove your default hosts file and then push the new one?
Code:
> adb remount
Remount succeeded
> adb shell rm /system/etc/hosts
> adb push hosts /system/etc/hosts
> adb shell chmod 644 /system/etc/hosts
codesplice said:
Another thought (sorry this isn't really coherent at this point...): What if you were to remove your default hosts file and then push the new one?
Code:
> adb remount
Remount succeeded
> adb shell rm /system/etc/hosts
> adb push hosts /system/etc/hosts
> adb shell chmod 644 /system/etc/hosts
Click to expand...
Click to collapse
Well that's thing, that is why I started this thread because I was trying to use ADB to push a new hosts file but got the no space error. So I already tried that.
Sent from my Nexus One using XDA App
I was asking if you had specifically tried removing the old one and replacing it rather than just overwriting.
Oh I see what you mean. But no I have not, let me give it a shot.
**Nope didn't work. I still got the same error, no space left on device.
Have you had the opportunity to do adb shell df -h yet?
codesplice said:
Since you seem to have adb functioning, you can run adb shell df -h to get a readout of your available space on your different file systems. This could help troubleshoot the issue.
Additionally, rather than doing a long manual "mount" command, you could simply do an adb remount to automagically remount all file systems in read/write mode.
The indication under Settings --> Storage indicates free space on /data, I believe, and gives no indication of /system (where you're trying to copy the hosts file).
Another thought (sorry this isn't really coherent at this point...): What if you were to remove your default hosts file and then push the new one?
Code:
> adb remount
Remount succeeded
> adb shell rm /system/etc/hosts
> adb push hosts /system/etc/hosts
> adb shell chmod 644 /system/etc/hosts
Click to expand...
Click to collapse
No to hijack this thread, but I just wanted to ask, does "adb remount" require root?
Brownbay said:
No to hijack this thread, but I just wanted to ask, does "adb remount" require root?
Click to expand...
Click to collapse
yes, without root access to the filesystem, adb remount will fail.
So when I try adb shell df -h, I get:
"-h: No such filesystem or directory"
You don't have busybox. Try running "adb shell df", maybe it'll still give some info.
Ok when I ran adb shell df I got a listing of filesystems. /system says size 145M and used 145M. So apparently it is full.
How could that be though?
It could be that you have some bad blocks on your /system partition (you can generally only check by doing a wipe operation in recovery and then viewing the log). These bad blocks could take up space that would otherwise store your system data, and could push you over capacity.
Or you could just have some extra bloat related to that ROM. You could drive to remove some of the applications on /system that you don't have use for (the Amazon MP3 thing, for instance). I'd suggest using Titanium Backup to do this, but you can also do it by manually using the adb shell.
Alternatively, a full wipe and clean reinstall may help make sure you don't have anything left over taking up space.
I'm thinking about just flashing a new ROM altogether as I am also having issues with the battery. Under usage, Android OS now shows somewhere around 35% of the usage. This only started happening after updating to 2.3.3.
I've always ran stock ROMs, so I haven't played with any of the custom ROMs out there. Are there any ROMs you recommend for a first timer?
*Sidenote* So a nandroid backup is a complete backup of the system state correct?
So after flashing a ROM, I can just restore the nandroid backup and my phone will be exactly as it was with the old ROM and user data?
decoyjoe said:
I'm thinking about just flashing a new ROM altogether as I am also having issues with the battery. Under usage, Android OS now shows somewhere around 35% of the usage. This only started happening after updating to 2.3.3.
I've always ran stock ROMs, so I haven't played with any of the custom ROMs out there. Are there any ROMs you recommend for a first timer?
*Sidenote* So a nandroid backup is a complete backup of the system state correct?
So after flashing a ROM, I can just restore the nandroid backup and my phone will be exactly as it was with the old ROM and user data?
Click to expand...
Click to collapse
I've been really impressed with the Kang-o-rama ROMs. Basically prettied-up versions of Cyanogen. The latest release is a beta based on CM7, so still has a few issues. The prior release (KOR 1.1Final) is still quite solid.
And yes, a nandroid backup creates a copy of your current disk image, which can then be restored at any time to revert back to a previously-working configuration (great for when you break stuff!).
decoyjoe said:
I'm thinking about just flashing a new ROM altogether as I am also having issues with the battery. Under usage, Android OS now shows somewhere around 35% of the usage. This only started happening after updating to 2.3.3.
I've always ran stock ROMs, so I haven't played with any of the custom ROMs out there. Are there any ROMs you recommend for a first timer?
*Sidenote* So a nandroid backup is a complete backup of the system state correct?
So after flashing a ROM, I can just restore the nandroid backup and my phone will be exactly as it was with the old ROM and user data?
Click to expand...
Click to collapse
Exactly Remember to wipe before restoring
Oh and that brings up another thought.
So if before I flash a new ROM, I do a Titanium Backup and then flash the ROM...
Would I then be able to restore that Titanium Backup made on the previous stock ROM to restore all my apps and user data?
I have been experimenting with my new droid/milestone the past couple of days, odd problems which I am past now but still curious about.
Firstly after flashing the 2.1 sbf with rsd it will autoboot and screen slider will be there, then when I reboot, screen slider will be missing. This only happend when I flashed an sbf from the sbf site(2.1 uk version, not service), doing a factory reset didn't have any problem -could reboot as many times and slider would be there.... then suddenly after factory boot it would dissapear after first boot. Anyway solved this problem by installing screen mode widget after first boot after flash, solved problem, but still weird. Fixed this now but still curious about it.
Next, nandroid backup is missing from recovery menu, I have rooted and can execute root commands after typing "su" via Android Terminal emulator, so pretty sure is rooted. So why no nandroid? I thought I could do nandroid backup after rooting.
Next busybox won't install, tried the app, did the "searching system" for over an hour(not exagerrating), eventually gave up and uninstalled.
Trying to do a "manual busybox install" now, using this guide:
Busybox How-to? - Android Forums
Can't execute commands via usb/adb in recovery mode as the other guy suggested so been trying these commands both with terminal emulator on phone, and usb-debugging mode with windows shell. Using these I can go "su" and type "ls" to see files on my droid phone....but when I try to "mount /system" or /sdcard from windows I just get a print about mount options, when I try to "cat /sdcard/busybox > /system/xbin/busybox" I get a "file is read only" error.
I would like advice on how to install busybox, I would like to do it manually(because the app seems to not work for me, remember I waited over an hour while it "searched") and I want to learn to manually do stuff anyway. I tried to chmod /system/xbin too, but that didn't seem to change it from read only.
Also any thoughts on why nandroid backup is missing from my recovery menu even though my droid is rooted. I thought it was meant to appear.
I am still learning and researching, and appreciate any links or tips.
droidtech1 said:
Next, nandroid backup is missing from recovery menu, I have rooted and can execute root commands after typing "su" via Android Terminal emulator, so pretty sure is rooted. So why no nandroid? I thought I could do nandroid backup after rooting.
Click to expand...
Click to collapse
This is odd. Which OpenRecovery did you install? Androidiani? GOT? Or the "original" OpenRecovery? Are you aware, that you come into OpenRecovery by starting Recovery Mode and apply update.zip?
droidtech1 said:
Next busybox won't install, tried the app, did the "searching system" for over an hour(not exagerrating), eventually gave up and uninstalled.
Trying to do a "manual busybox install" now, using this guide:
Busybox How-to? - Android Forums
Click to expand...
Click to collapse
Using the app from the market worked like a charm for me. No idea, what might have gone wrong for you...
droidtech1 said:
Can't execute commands via usb/adb in recovery mode as the other guy suggested so been trying these commands both with terminal emulator on phone, and usb-debugging mode with windows shell. Using these I can go "su" and type "ls" to see files on my droid phone....but when I try to "mount /system" or /sdcard from windows I just get a print about mount options, when I try to "cat /sdcard/busybox > /system/xbin/busybox" I get a "file is read only" error.
Click to expand...
Click to collapse
For remounting, try "mount -o rw,remount /dev/block/mtdblock6 /system" and for undoing this, use "ro" instead of "rw".
droidtech1 said:
I would like advice on how to install busybox, I would like to do it manually(because the app seems to not work for me, remember I waited over an hour while it "searched") and I want to learn to manually do stuff anyway. I tried to chmod /system/xbin too, but that didn't seem to change it from read only.
Click to expand...
Click to collapse
You should download busybox and put the "busybox"-file in the directory /sdcard. After that do:
Code:
# su
# mount -o rw,remount /dev/block/mtdblock6 /system
# cp /sdcard/busybox /system/xbin
# cd /system/xbin
# chmod 755 busybox
# ./busybox --install
# mount -o ro,remount /dev/block/mtdblock6 /system
One thought at the end: How did you root?
I rooted by flashing "vunerable recovery" using RSD lite, copied milestone-root.zip to sd card, renamed it update.zip, rebooted into recovery mode, flashed update.zip from there.
I didn't realise I had to install something like open recovery, think because I remember not having to do that on my pulse? Anyway will try and install one of those now.
Thanks those commands at the end helped, actually managed to copy busybox to /system/xbin, however the 2nd last one "./busybox --install" gave me a load of errors -all being no such file or directory, for example "/usr/bin/wc: no such file"
about 30 of those path errors. Maybe the command path "./busybox" needs to be something else?
ah, okay. sorry, I thought you already installed an openrecovery. for many cool features you will need it (e.g. nandroid, for overclocking it's not a must but a nice-to-have). please don't use GOT, it's rather old already. androidiani is okay, I think.
I think your previous attempts to install busybox via the app etc. mixed up some internal links in the device. please reboot and try again (the above steps except the "cp ..."). seems like the app tried to install busybox to /usr/bin but failed... I hope this failed attempt will be fixed by a simple reboot. otherwise it would be great to have the output of:
Code:
# su
# ls /usr/bin
No I re-flashed my main sbf and also did a factory reset to do a clean start, only thing since that full wipe I have done is rooting in the method I described, installed the screenmode widget, textedit, and android terminal emulator.
I have no such file /usr, are you sure I should have this in droid/milestone?
Here is my full output of my root system using ls:
tmp
pds
cdrom
sqlite_stmt_journals
config
cache
sdcard
d
etc
system
sys
sbin
proc
init_prep_keypad.sh
init.rc
init.mapphone_umts.rc
init.mapphone_cdma.rc
init.goldfish.rc
init
default.prop
data
root
dev
perhaps "/usr" is a sub inside one of the above folders? I tried using "find" to find it but that command dosn't seem to work since it won't even find the ones I can see with ls
I found it, /usr is inside /system... so if busybox was moved to /system/xbin, I'm guessing the ./ means install it to the parent directory which was /system which /usr is also in.
The errors I got said no such file "/usr" so It seems like it is trying to install to the wrong directory.... perhaps the command should be "busybox --install" or "/busybox --install" I don't want to experiment and mess things up before your opinion on this.
*edit almost forgot, output of /system/usr is
keychars
bin
srec
keylayout
share
output of /system/usr/bin is
panic_daemon
gki_pd_notifier
nvm_daemon
clean_dex.sh
brcm_guci_drv
bplogd_daemon
This is really strange. Maybe your busybox-file is corrupt.
Where did you download the busybox-file?
Which sbf did you flash?
So for explanation-purposes: When you put an executable or script file in any directory, you can execute it by first making it executable ("chmod 755 /system/xbin/busybox"), changing to that directory ("cd /system/xbin") and then executing it by adding "./" in front of it. The dot slash always stands for the _current_ directory. The _parent_directory has two dots "../".
If you want, you may try:
# /system/xbin/busybox --install
instead of
# ./busybox --install
Or maybe try this one:
# /system/xbin/busybox --install -s /system/xbin
Last time, I installed busybox into the directory /data/busybox, which worked brilliantly, but this path turned out to be unpractical. So I wanted to reinstall it in a different directory. I removed everything from /data/busybox including the directory itself and tried to start the whole procedure with /system/xbin. But that time it protested, that there were no files in "/data/busybox/...". Conclusion: The last busybox-install affected the second one. When I remember correctly I rebooted after that and used the app from the market *g*
My main sbf I flashed was android 2.1(uk version).
I downloaded busybox 1.17.2(won't let me post url here), was from droidforums dot net.
I don't remember if I tried all of his commands, but the last one on that forum seems to have worked.. I think......... it was:
"busybox --install /system/xbin/"
After remounting with your commands and typing the above command, I didn't get any errors, I synced and rebooted and now when I "ls /system/xbin" it shows a bunch of files/names which look like busybox commands. When I type "busybox" it outputs a bunch of commands too... so I am guessing this means it has succesfully installed? I can't say I tried these before attempting install so I have no comparison but I assume I would have a different output if busybox wasn't installed.
So assuming it worked, why would
"busybox --install /system/xbin/" work, and
"/system/xbin/busybox --install" not?
I also managed to install open recovery and do a nandroid backup succesfully
I have another short question, not specific to android but happens in all terminals I use, windows and linux alike. Sometimes I cannot execute commands anymore and it just becomes text in the terminal(just re-echo'ing my text output, without executing any functions)... can't remember specifically when it happened on my windows or linux pc shells, but on my android it happens whenever I have to give "SU" permission to the terminal, I have to quickly close the terminal and reload it again to get su access. I'm sure there is a name for this "state" where you are locked out of using commands in the shell and just typing text but I can't find a way to get out of it(without closing and re-opening terminal), there must be some key combination to be able to execute commands again in the current terminal session. If you have any idea what I am talking about?
Thanks for all your help so far.
droidtech1 said:
My main sbf I flashed was android 2.1(uk version).
Click to expand...
Click to collapse
Don't want to try one of the 2.2?
droidtech1 said:
I downloaded busybox 1.17.2(won't let me post url here), was from droidforums dot net.
I don't remember if I tried all of his commands, but the last one on that forum seems to have worked.. I think......... it was:
"busybox --install /system/xbin/"
After remounting with your commands and typing the above command, I didn't get any errors, I synced and rebooted and now when I "ls /system/xbin" it shows a bunch of files/names which look like busybox commands. When I type "busybox" it outputs a bunch of commands too... so I am guessing this means it has succesfully installed? I can't say I tried these before attempting install so I have no comparison but I assume I would have a different output if busybox wasn't installed.
Click to expand...
Click to collapse
Yes, this sounds very much like installation was successful.
droidtech1 said:
So assuming it worked, why would
"busybox --install /system/xbin/" work, and
"/system/xbin/busybox --install" not?
Click to expand...
Click to collapse
typing "busybox" without the path in front of it worked, because busybox is in the directory /system/xbin, which is already in your $PATH-variable (try "echo $PATH"). So the command interpreter (shell) will automatically look up "busybox" in /system/xbin.
I had a look at the busybox syntax and it's actually
Code:
busybox --install [-s] [INSTALLDIR]
So you have to put the directory you want to install in at the end. That's what your last command makes use of
droidtech1 said:
I have another short question, not specific to android but happens in all terminals I use, windows and linux alike. Sometimes I cannot execute commands anymore and it just becomes text in the terminal(just re-echo'ing my text output, without executing any functions)... can't remember specifically when it happened on my windows or linux pc shells, but on my android it happens whenever I have to give "SU" permission to the terminal, I have to quickly close the terminal and reload it again to get su access. I'm sure there is a name for this "state" where you are locked out of using commands in the shell and just typing text but I can't find a way to get out of it(without closing and re-opening terminal), there must be some key combination to be able to execute commands again in the current terminal session. If you have any idea what I am talking about?
Click to expand...
Click to collapse
Sounds like this is just the state, when shell is busy, i.e. when the last process you started is still running and no prompt ($ or #) is displayed. You may kill the last process in linux using CTRL+C, which will hopefully bring back the shell prompt. No idea which shortcut replaces this on the milestone/droid. I never use any android terminals, but only the ADB-Shell: http://developer.android.com/guide/developing/tools/adb.html
I'm learning to build apps for android so I thought having 2.1 on my droid would be better for testing (instead of 2.2). I also have a Nexus-S with 2.3 and a tmobile-pulse with 1.5. So I want to keep the most native version on each phone since most consumers won't install custom roms, although some will get updates anyway.
I use my droid a lot when I am out and use the terminal a lot so having busybox too has given me more to play around with. I actually find my droid much better working on than the nexus s, love the keyboard and dpad.
Welcome guys, my internal storage is dead it happend after I accidentally cleaned it (wanted to format external sd card...). I can't copy anything from PC on to it. I have no access. I'm running cm-11-20140623-NIGHTLY-mint with ClockworkModRecovery 6.x
How can I fix it?
I tried so far again cleaning it from Android level and also formating partition via recovery mode.
deywid12345 said:
Welcome guys, my internal storage is dead it happend after I accidentally cleaned it (wanted to format external sd card...). I can't copy anything from PC on to it. I have no access. I'm running cm-11-20140623-NIGHTLY-mint with ClockworkModRecovery 6.x
How can I fix it?
I tried so far again cleaning it from Android level and also formating partition via recovery mode.
Click to expand...
Click to collapse
It's an old issue with formatting your internal memory with a custom ROM, and I think it's a permission issue. Can you access ADB through recovery?
http://forum.xda-developers.com/showpost.php?p=52698386&postcount=95
Antiga Prime said:
It's an old issue with formatting your internal memory with a custom ROM, and I think it's a permission issue. Can you access ADB through recovery?
Click to expand...
Click to collapse
How can I check that? (I installed CM with tutorial step-by-step). I can use recovery mode, fastboot, my phone boot up just fine. I have read this but I don't know what I have to do. Can you tell me ? I'm depressed.
deywid12345 said:
How can I check that? (I installed CM with tutorial step-by-step). I can use recovery mode, fastboot, my phone boot up just fine. I have read this but I don't know what I have to do. Can you tell me ? I'm depressed.
Click to expand...
Click to collapse
If you install a Terminal Emulator on your phone, you might be able to avoid using ADB. Ideally you should learn how to set up ADB (google it), or read this and see if it helps you.
Let me know if you install a Terminal Emulator (and are rooted).
Antiga Prime said:
If you install a Terminal Emulator on your phone, you might be able to avoid using ADB. Ideally you should learn how to set up ADB (google it), or read this and see if it helps you.
Let me know if you install a Terminal Emulator (and are rooted).
Click to expand...
Click to collapse
I have Terminal Emulator installed and rooted yet.
What's the next step. You are my only hope to fix this man.
deywid12345 said:
I have Terminal Emulator installed and rooted yet.
What's the next step. You are my only hope to fix this man.
Click to expand...
Click to collapse
Then open Terminal Emulator and run the following commands (ignore what is in parenthesis):
Code:
su (grant access)
cd /mnt/media_rw
ls -l
Let me know what that command shows you. It should show you something similar to what I have in the attached image.
Antiga Prime said:
Then open Terminal Emulator and run the following commands (ignore what is in parenthesis):
Code:
su (grant access)
cd /mnt/media_rw
ls -l
Let me know what that command shows you. It should show you something similar to what I have in the attached image.
Click to expand...
Click to collapse
yeah it do.
Code:
drwxr -xr -x root root 1971-03-04 01:26 sdcard0
drwxrwx--- media_rw media_rw 1970-01-01 01:00 sdcard1
drwx------ media_rw media_rw 1971-03-04 01:25 usbdisk
That's what i got (can't provide you any screenshot because of not working internal mem.
(it looks like i dont have write permissions, but i have completly no clue how to fix it, just wrote that)
deywid12345 said:
yeah it do.
Code:
drwxr -xr -x root root 1971-03-04 01:26 sdcard0
drwxrwx--- media_rw media_rw 1970-01-01 01:00 sdcard1
drwx------ media_rw media_rw 1971-03-04 01:25 usbdisk
That's what i got (can't provide you any screenshot because of not working internal mem.
(it looks like i dont have write permissions, but i have completly no clue how to fix it, just wrote that)
Click to expand...
Click to collapse
Well, then you should try the following. Open the terminal again, use "su" again to grant root access, and do the following:
Code:
su
cd /mnt/media_rw
busybox chown -R 2800:2800 sdcard0
chmod 0770 sdcard0
Then either try to take a photo or create a file in your internal memory, or reboot and test your internal memory.
Edit: Just to be clear, the default user/owner for Sony internal memory is 2800, mine is set to 1023 (media_rw), as most phones should have, because I have modded the ramdisk in my kernel in order to use a certain program.
Antiga Prime said:
Well, then you should try the following. Open the terminal again, use "su" again to grant root access, and do the following:
Code:
su
cd /mnt/media_rw
busybox chown -R 2800:2800 sdcard0
chmod 0770 sdcard0
Then either try to take a photo or create a file in your internal memory, or reboot and test your internal memory.
Edit: Just to be clear, the default user/owner for Sony internal memory is 2800, mine is set to 1023 (media_rw), as most phones should have, because I have modded the ramdisk in my kernel in order to use a certain program.
Click to expand...
Click to collapse
Man it works! I ****in owe you! Worked even without rebooting phone.
Love from Poland!
deywid12345 said:
Man it works! I ****in owe you! Worked even without rebooting phone.
Love from Poland!
Click to expand...
Click to collapse
No problem. In case you're interested in learning what that just did, you might want read this and this.
Antiga Prime said:
No problem. In case you're interested in learning what that just did, you might want read this and this.
Click to expand...
Click to collapse
Thanks for all your help !
Once I saw differents privilages letters i know its about it. Back in days I was working on FreeBSD (amateur) but had to deal with things like that.
Antiga Prime said:
Well, then you should try the following. Open the terminal again, use "su" again to grant root access, and do the following:
Code:
su
cd /mnt/media_rw
busybox chown -R 2800:2800 sdcard0
chmod 0770 sdcard0
Then either try to take a photo or create a file in your internal memory, or reboot and test your internal memory.
Edit: Just to be clear, the default user/owner for Sony internal memory is 2800, mine is set to 1023 (media_rw), as most phones should have, because I have modded the ramdisk in my kernel in order to use a certain program.
Click to expand...
Click to collapse
Working with Xperia V and just fixed my sd card. Thnx :good::good::good::good:
Antiga Prime said:
No problem. In case you're interested in learning what that just did, you might want read this and this.
Click to expand...
Click to collapse
And I'm here again, anew I got same situation but I can't fix it by applying these command. Can you help me? That's what I recieve.
deywid12345 said:
And I'm here again, anew I got same situation but I can't fix it by applying these command. Can you help me?
Click to expand...
Click to collapse
Are you booted up in Android? Maybe Sdcard0 needs to be unmounted first (although I've never had to unmount it). Maybe you should try running the command from recovery when the internal memory isn't mounted (and if it is, unmount it first).
Antiga Prime said:
No problem. In case you're interested in learning what that just did, you might want read this and this.
Click to expand...
Click to collapse
Antiga Prime said:
Are you booted up in Android? Maybe Sdcard0 needs to be unmounted first (although I've never had to unmount it). Maybe you should try running the command from recovery when the internal memory isn't mounted (and if it is, unmount it first).
Click to expand...
Click to collapse
I'm running TWRP 2.8.4.1 (OmniROM 4.4) when I go to mount section and uncheck "sdcard" it doesnt get saved and on reboot it again unmounted. How do I unmount it in right way?
deywid12345 said:
I'm running TWRP 2.8.4.1 (OmniROM 4.4) when I go to mount section and uncheck "sdcard" it doesnt get saved and on reboot it again unmounted. How do I unmount it in right way?
Click to expand...
Click to collapse
I don't think I understand what you're trying to say, but you don't have to reboot in order to unmount the sdcard. All you have to do is uncheck the "sdcard" in the mount section, and then run the chown command.
Then again, how did that happen again? Did you format your sdcard0 (internal memory) again?
Run the "mount" command in Android and see if your "Sdcard0" is formatted as Vfat. If it is, you won't be able to change ownership to the partition unless you format it again in TWRP so that it changes to ext4.
Antiga Prime said:
I don't think I understand what you're trying to say, but you don't have to reboot in order to unmount the sdcard. All you have to do is uncheck the "sdcard" in the mount section, and then run the chown command.
Then again, how did that happen again? Did you format your sdcard0 (internal memory) again?
Run the "mount" command in Android and see if your "Sdcard0" is formatted as Vfat. If it is, you won't be able to change ownership to the partition unless you format it again in TWRP so that it changes to ext4.
Click to expand...
Click to collapse
Yep It happend again by formatting internal storage.
But it's working back again ! Thanks mate!
I formated it via TWRP to EXT4 then adb commands and poof, it works! God bless you.
There are so many dead question threads but the helpfulness shown here just rekindled my faith in humanity
Didn't work for me, this is the output I got:
/system/bin/sh: <stdin>[2]: cd: /mnt/media_rw:
Permission denied
Sent from my Xperia T using XDA Free mobile app
thijs84 said:
Didn't work for me, this is the output I got:
/system/bin/sh: <stdin>[2]: cd: /mnt/media_rw:
Permission denied
Sent from my Xperia T using XDA Free mobile app
Click to expand...
Click to collapse
If you're having trouble to even change directories to /mnt/media_rw/, how do you know that directory exists?
Are you trying that from recovery?
Hi!
I have problem with my HTC One m7 (ViperOne 7.0.1).
While I changed something in /system/app folder (eg. deleted a "DriveActivator.apk" - successfully accomplished) and restart phone, I see again that deleted app!!!
Do you know why? I'm using RootExplorer, I have root and granted permissions to r/w.
It seems like system restores some kind of backup - I don't know why, and I don't know how to fix it (I mean do some permanent changes in /system/app).
dry3333 said:
Hi!
I have problem with my HTC One m7 (ViperOne 7.0.1).
While I changed something in /system/app folder (eg. deleted a "DriveActivator.apk" - successfully accomplished) and restart phone, I see again that deleted app!!!
Do you know why? I'm using RootExplorer, I have root and granted permissions to r/w.
It seems like system restores some kind of backup - I don't know why, and I don't know how to fix it (I mean do some permanent changes in /system/app).
Click to expand...
Click to collapse
It appears that the System isn't booted with RW capabilities
There's a nice long command that I'll give you later that will fix it
If you wanna get it sooner and aren't afraid of adb shell (make sure you have root access enabled for adb AND apps, not just apps) you can Google remount Linux system read/write and you should find it
You'll need to modify that command to reflect the One, but the name of the partition should be something like by-name-system or something
I'll get it later if you need it when I wake up
ajbiz11 said:
It appears that the System isn't booted with RW capabilities
There's a nice long command that I'll give you later that will fix it
If you wanna get it sooner and aren't afraid of adb shell (make sure you have root access enabled for adb AND apps, not just apps) you can Google remount Linux system read/write and you should find it
You'll need to modify that command to reflect the One, but the name of the partition should be something like by-name-system or something
I'll get it later if you need it when I wake up
Click to expand...
Click to collapse
Thanks mate!
Stupid question - how I can check whether I have root access enabled for adb and apps? I have superuser app, and in settings I can see: "Superuser Access: Apps and ADB" - is this what you are wrote about?
dry3333 said:
Thanks mate!
Stupid question - how I can check whether I have root access enabled for adb and apps? I have superuser app, and in settings I can see: "Superuser Access: Apps and ADB" - is this what you are wrote about?
Click to expand...
Click to collapse
That's exactly what I'm referring to (The settings thing)
Lemme go find that command for you
---------- Post added at 06:00 AM ---------- Previous post was at 05:56 AM ----------
Wish I knew this existed when I was working on the L port
There's an app to do exactly what you need without looking up partitions
https://play.google.com/store/apps/details?id=com.beansoft.mount_system
Although if you want to go through terminal, here's a tutorial
http://ckirbach.wordpress.com/2012/11/27/how-to-remount-system-as-read-write-in-android/
Basically, you use grep to find the name of the system partition, then run the mount command to remount the partition you found in that precious step
I have this app: Mount /system (rw / ro), also I have this option in superuser and it works fine - I mean that I can change /system/app or for eg. edit /etc/hosts (I get message that ES explorer granted superuser access), but after restart I see previous files (before changes)... I have no idea how make this work - maybe I need custom kernel or something? I want to make permanent changes in system files...
I have reinstalled system (clean option with wipe all data), but still no results...
dry3333 said:
I have this app: Mount /system (rw / ro), also I have this option in superuser and it works fine - I mean that I can change /system/app or for eg. edit /etc/hosts (I get message that ES explorer granted superuser access), but after restart I see previous files (before changes)... I have no idea how make this work - maybe I need custom kernel or something? I want to make permanent changes in system files...
I have reinstalled system (clean option with wipe all data), but still no results...
Click to expand...
Click to collapse
The remount app should do exactly that
Try the command option and make your changes then reboot
ajbiz11 said:
The remount app should do exactly that
Try the command option and make your changes then reboot
Click to expand...
Click to collapse
I have tried - still no results. My system already has RW permissions. Problem is that after restart my files are "restored".
Analogously like in Cisco IOS - commit but without write memory.
Maybe I should go to recovery and do something (but I don't know what)?
dry3333 said:
I have tried - still no results. My system already has RW permissions. Problem is that after restart my files are "restored".
Analogously like in Cisco IOS - commit but without write memory.
Maybe I should go to recovery and do something (but I don't know what)?
Click to expand...
Click to collapse
Check the Viper forum and maybe post there
I only run CM-base so I'm not too experienced with Sense issues
ajbiz11 said:
Check the Viper forum and maybe post there
I only run CM-base so I'm not too experienced with Sense issues
Click to expand...
Click to collapse
Thanks - they said they don't know, but it affects S-ON users....
Can You tell me one thing - I execute this script:
echo off
adb reboot
cd /d %~dp0
echo .
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb -d shell su -c "mount -o remount rw /system"
adb -d shell rm /system/app/DriveActivator.apk
adb reboot
This should remove DriveActivator (while script is ongoing I see no errors), but after reboot DriveActivator.apk is still in /system/app...
Is there any other way to permanently remove/change files in /system/app?
dry3333 said:
Thanks - they said they don't know, but it affects S-ON users....
Can You tell me one thing - I execute this script:
echo off
adb reboot
cd /d %~dp0
echo .
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb -d shell su -c "mount -o remount rw /system"
adb -d shell rm /system/app/DriveActivator.apk
adb reboot
This should remove DriveActivator (while script is ongoing I see no errors), but after reboot DriveActivator.apk is still in /system/app...
Is there any other way to permanently remove/change files in /system/app?
Click to expand...
Click to collapse
You can remove it from the ViperROM zip and format ONLY system and reflash
That SHOULD work
That's like...the be all end all
dry3333 said:
Thanks - they said they don't know, but it affects S-ON users....
Can You tell me one thing - I execute this script:
echo off
adb reboot
cd /d %~dp0
echo .
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb -d shell su -c "mount -o remount rw /system"
adb -d shell rm /system/app/DriveActivator.apk
adb reboot
This should remove DriveActivator (while script is ongoing I see no errors), but after reboot DriveActivator.apk is still in /system/app...
Is there any other way to permanently remove/change files in /system/app?
Click to expand...
Click to collapse
Make life simple: erase the apk while in custom recovery, TWRP has a file manager, or you can use Aroma File Manager
even adb commands while booted in custom recovery are better than booted up ROM.
nkk71 said:
Make life simple: erase the apk while in custom recovery, TWRP has a file manager, or you can use Aroma File Manager
even adb commands while booted in custom recovery are better than booted up ROM.
Click to expand...
Click to collapse
Thanks for advice. Is it possible via TWRP not only remove file, but also replace it? Where shoul I place new file for replace original one?
dry3333 said:
Thanks for advice. Is it possible via TWRP not only remove file, but also replace it? Where shoul I place new file for replace original one?
Click to expand...
Click to collapse
I would recommend using the Aroma File Manager instead of TWRP's, just place all the files you'll need on your internal storage (including Aroma File Manager), then reboot to select "Install" to run the Aroma File Manager and remove/replace whatever you need to.
You may need to also check if the permissions are right, I can't remember if Aroma File Manager has that built in.
remember that once you are in recovery to mount /system (in the Mount menu)
and you can even use adb shell, and adb push commands to replace the .apk.... i'm just guessing it's easier with a GUI interface.
nkk71 said:
I would recommend using the Aroma File Manager instead of TWRP's, just place all the files you'll need on your internal storage (including Aroma File Manager), then reboot to select "Install" to run the Aroma File Manager and remove/replace whatever you need to.
You may need to also check if the permissions are right, I can't remember if Aroma File Manager has that built in.
remember that once you are in recovery to mount /system (in the Mount menu)
and you can even use adb shell, and adb push commands to replace the .apk.... i'm just guessing it's easier with a GUI interface.
Click to expand...
Click to collapse
The windows drivers don't work with recovery mode (usually)
ajbiz11 said:
The windows drivers don't work with recovery mode (usually)
Click to expand...
Click to collapse
they do for me, but sometimes (after flashing a new/different version) i have to manually select the drivers, check FAQ#2 here: http://forum.xda-developers.com/showpost.php?p=52135024&postcount=2
I would like to thank you for advice. I did this via TWRP (after I had mounted /system). It works fine for me
dry3333 said:
I would like to thank you for advice. I did this via TWRP (after I had mounted /system). It works fine for me
Click to expand...
Click to collapse
sure, no problem :good: :good:
if all is good now, can you also edit main thread title to include [SOLVED], thanks
edit the first post -> at the bottom of the edit window, click Go Advanced, and then you can edit main title
update file :
[email protected]:/storage/sdcard0/cmupdater $ ls
cm-12-20150225-NIGHTLY-tsubasa.zip
cannot be deleted:
rm: cm-12-20150225-NIGHTLY-tsubasa.zip: Permission denied
permissions:
-rw-rw-r-- root sdcard_rw 285176668 2015-02-25 11:14 cm-12-20150225-NIGHTLY-tsubasa.zip
should be ok.
I can't check i attribute with lsattr:
lsattr: reading cm-12-20150225-NIGHTLY-tsubasa.zip: Function not implemented
and also can't unset -i attribute (if set) with chattr:
chattr: reading flags on cm-12-20150225-NIGHTLY-tsubasa.zip: Function not implemented
any ideas? running cm -12-20150226-NIGHTLY
thanks
Did you try to call root (su) before delete?
Yes, sorry I didn't mention. Of course I tried to delete as root.
My guess is that the immutable flag could be set for that file by mistake. As neither lsattr nor chattr are working inside the phones environment, I cannot prove or unset that flag, but it might be another problem as well..
You might try to grab an aroma file manager zip for recovery and remove the file that way.
It has already been discussed. 27.02 should be a good build, codeworkx's said
@romcio47: can you provide a link where this has been adressed or even solved? Thanks!! @WhiteNeo: I don't have any experince with aroma file manager, why do you think it's gonna be help? Permissions should remain unchanged and commands set should be the same, as with the booted device or adb shell or?
I just realized the whole folder /storage/scdard0/cmupdater seems to be Immutable not just the file in it.. Any ideas how I can get chattr working on my phone?
Out of experience, I can say that aroma file manager helped in certain situations where the native android file managers failed.
miro279 said:
I just realized the whole folder /storage/scdard0/cmupdater seems to be Immutable not just the file in it.. Any ideas how I can get chattr working on my phone?
Click to expand...
Click to collapse
I doubt you need chattr, it's probably the typical case of the /storage/sdcard0 having a different ownership then what the ROM/Kernel is setting on boot.
Apparently on the latest CM12 builds, vold is setting the user/group to 1023 (media_rw); the default is user/group 2800.
So if that is what is happening to you, try:
Code:
su
chown -R media_rw:media_rw /mnt/media_rw/sdcard0
If not, then try the opposite, which even @WhiteNeo has stated in his threads plenty of times:
Code:
su
chown -R 2800:2800 /mnt/media_rw/sdcard0
Basically, if the ownership for /mnt/media_rw/sdcard0 doesn't match what is set in vold/kernel, you won't have access after reboot; and apparently lately a lot of people are having issues with this ownership mismatch.
BTW, the sdcard0 is mounted on /mnt/media_rw, that's why you change the permissions there first. I'm pretty sure that without running the previous commands you might still be able to delete the file you want from /mnt/media_rw/sdcard0
Code:
su
chown -R media_rw:media_rw /mnt/media_rw/sdcard0
dis the trick! Thanks a lot!!!
Antiga Prime said:
I doubt you need chattr, it's probably the typical case of the /storage/sdcard0 having a different ownership then what the ROM/Kernel is setting on boot.
Apparently on the latest CM12 builds, vold is setting the user/group to 1023 (media_rw); the default is user/group 2800.
So if that is what is happening to you, try:
Code:
su
chown -R media_rw:media_rw /mnt/media_rw/sdcard0
If not, then try the opposite, which even @WhiteNeo has stated in his threads plenty of times:
Code:
su
chown -R 2800:2800 /mnt/media_rw/sdcard0
Basically, if the ownership for /mnt/media_rw/sdcard0 doesn't match what is set in vold/kernel, you won't have access after reboot; and apparently lately a lot of people are having issues with this ownership mismatch.
BTW, the sdcard0 is mounted on /mnt/media_rw, that's why you change the permissions there first. I'm pretty sure that without running the previous commands you might still be able to delete the file you want from /mnt/media_rw/sdcard0
Click to expand...
Click to collapse
Sorry to borther again. I have a Simulation Problem now with a different phone (Sony Nicki). There the structure is that internal Storage is mounted in /storage/emulated/0 I guess it might be a different path there as well. I can't find it in /mnt/media_rw though. Anyway, Problem here is that I Installed a new CM Version from the SD and now have a Second Folder /Storage/Emulated/0/0 where all "old" Files from before the Update Are. All These files Are not deletable Even by Root. Is there a was to completly redet all permissions and Start from a clean new Installation?
miro279 said:
Sorry to borther again. I have a Simulation Problem now with a different phone (Sony Nicki). There the structure is that internal Storage is mounted in /storage/emulated/0 I guess it might be a different path there as well. I can't find it in /mnt/media_rw though. Anyway, Problem here is that I Installed a new CM Version from the SD and now have a Second Folder /Storage/Emulated/0/0 where all "old" Files from before the Update Are. All These files Are not deletable Even by Root. Is there a was to completly redet all permissions and Start from a clean new Installation?
Click to expand...
Click to collapse
That's happened to me before (don't remember on which phone). You can either use ADB or some Recovery based file manager to copy all the files back to the top /0 folder, then delete the redundant /0/0, etc. folders, or you can also copy all the files to your PC and format your Internal Memory. I think it's an issue with the recovery you used, don't remember.
Thanks vor the quick reply! I'll try adb Wehen I'm back home with my Linux box. Still it Sems that the whole /Storage/Emulated/0/0 folder is real only to me. (Being Root). Is this a Ownership Problem as well? Group for /Storage/Emulated is sdcard_r.. I Clan edit /Storage/Emulated/0
Also i Cannot find the mountpoint in /mnt for Internal Storage. It's not in /mnt/media_rw
Thanks a löst for your help!
miro279 said:
Thanks vor the quick reply! I'll try adb Wehen I'm back home with my Linux box. Still it Sems that the whole /Storage/Emulated/0/0 folder is real only to me. (Being Root). Is this a Ownership Problem as well? Group for /Storage/Emulated is sdcard_r.. I Clan edit /Storage/Emulated/0
Also i Cannot find the mountpoint in /mnt for Internal Storage. It's not in /mnt/media_rw
Thanks a löst for your help!
Click to expand...
Click to collapse
Then you're most likely using 4.3. /mnt/media_rw is used only on 4.4+. Honestly I don't remember/know what the issue was, but I'm pretty sure it only on a certain old version of CWM, though I could be wrong.