Hi all, probably mine is a noob question, since in android I'm quite a noob. I've been using gentoo for years though so I'm somehow confident with the shell and I'd love it to work on it on my rooted sgs2
So, basically, I searched but I didn't find (/me fool). When asking for write permission everyone is talking about /system, but not / in general. Is there a reason? If I need to copy&paste or just create a file directly in / how can I do?
Giving a #mount command shows me only this about "/" :
rootfs on / type rootfs (ro,relatime)
so there is no indication about a /dev/block adress or a "real fs" information (which for what I know is ext4). Also those informations looks like a "pseudo-filesystem" partition, like sysfs or fusefs for instance.
Looking at the rest of the "#mount" output (aka "cat /proc/mounts") I see the only other partition mounted in ro is /system, but it has a block device association and I can remount it in rw easily. Not the same with /
Can anyone clarify me please? Is there a way to mount / in rw?
This is because that's where we want to use. The system area is where modifications of the device (done by people who should know exactly what they are doing; e.g changing build.prop codes) is made. It can easily be made r/w but only if your device is rooted and in many cases S-OFF'ed. If you have root (and for some devices S-OFF), then you can just use a file explorer (which supports root functions e.g Root Explorer) to mount it as r/w (this is the easiest way).
Yes, my phone is rooted and S-OFF'd and everything's fine, I have no particular problem to fix, just wondering.
So what if anything goes corrupted in / (outside /system, /data or any other separate partition) and we need to restore it or just create a script or anything changing permissions or writing data on the / partition? Btw: for what I know about linux, the root partition (I mean "/" not "/root") must be a "real partition" with a proper fs and mount point, and not anything cached somewhere. Guess it must be the same in android too. So, where is it?
johnnystuff said:
Yes, my phone is rooted and S-OFF'd and everything's fine, I have no particular problem to fix, just wondering.
So what if anything goes corrupted in / (outside /system, /data or any other separate partition) and we need to restore it or just create a script or anything changing permissions or writing data on the / partition? Btw: for what I know about linux, the root partition (I mean "/" not "/root") must be a "real partition" with a proper fs and mount point, and not anything cached somewhere. Guess it must be the same in android too. So, where is it?
Click to expand...
Click to collapse
For Android (about corruption for the first question), people usually just reflash the rom since you wouldn't be able to boot the phone (at least fully) to be able to replace a missing file(s). Where is "/" you ask, if you open Root Explorer that's where you'll be.
I know where is "/" in that sense, I meant where is the partition or the mount point
anyway..... not a big issue. I must deduce in android, in any present past and future device, the /efs directory is mounted on a separate partition. All my guessing came mostly from that point, since I wanted to backup and most of all _restore_ that dir using the shell. Again, I don't need it now, I did my backup and I hopefully will never need a restore. Most of all in my sgs2 /efs is on a rw partition, so no issue at all even in case of deep trouble (/efs deletion).
And yep, I know about EFS Pro and similar tools, but wanted to try the sh way and to understand something more of android in general
why is the trouble EFS deletion? what is EFS partition for?
Sent from my Nexus S using XDA App
Speaking on this subject, I have tried but cannot remove the file "/sys/devices/virtual/sec/ts/touchkey_led" (trying to turn off lights behind capacitive buttons).
Does anyone know how to move/delete this?
No, led hack doesn't work on my device if you are wondering.
why is the trouble EFS deletion? what is EFS partition for?
Click to expand...
Click to collapse
/efs is where your IMEI and other critical (and legal) information of your device are stored. You should backup it as soon as you root your phone, before any other mod. Hence comes the troubles, since if you delete it for any reason, you are in deep troubles, expecially if you didn't backup it.
I have tried but cannot remove the file "/sys/devices/virtual/sec/ts/touchkey_led"
Click to expand...
Click to collapse
I'm not totally sure about what I'm saying on android, but on linux /sys is an in-memory filesystem, meaning it is generated by the system after (at) boot and it's where all your device are linked in for the kernel, so it basically manged by the kernel itself. That could be the reason why you cannot delete anything in there. But again, I'm somehow guessing so, wait for someone else to confirm (or deny)
johnnystuff said:
That could be the reason why you cannot delete anything in there. But again, I'm somehow guessing so, wait for someone else to confirm (or deny)
Click to expand...
Click to collapse
Actually you can delete items in there... but they will just be re-created .
Related
First rooted no problem and researched unlocking S5380, using
JC-Masters tutorial and StoneBoyTony have similar steps but IMPORTANT stoneboytony tutorial has an extra step 31. Make shure that Root Explorer is in "Mounted as r/o" like this .
I used Jc_master tutorial my phoned bricked I only blame myself which does not remount file system read only r/o and does not use Root Explorer app.
I could be totally wrong here and believe you must use the extra step 31.
I thought umount /efs was the problem because if you UNMOUNT the efs
how would access that partition when rebooting.when you mkdir /efs this could mean you make a directory called efs which could be encrypted which you cant access when rebooting. Yes you can see 8 digit code clearly but cant reboot and cant reflash new rom. because you cant acess the efs files.
durbancurry said:
First rooted no problem and researched unlocking S5380, using
JC-Masters tutorial and StoneBoyTony have similar steps but IMPORTANT stoneboytony tutorial has an extra step 31. Make shure that Root Explorer is in "Mounted as r/o" like this .
I used Jc_master tutorial my phoned bricked I only blame myself which does not remount file system read only r/o and does not use Root Explorer app.
I could be totally wrong here and believe you must use the extra step 31.
I thought umount /efs was the problem because if you UNMOUNT the efs
how would access that partition when rebooting.when you mkdir /efs this could mean you make a directory called efs which could be encrypted which you cant access when rebooting. Yes you can see 8 digit code clearly but cant reboot and cant reflash new rom. because you cant acess the efs files.
Click to expand...
Click to collapse
Me too, for this I started a thread to see if its posible to make a kernel that remount efs partition. No one said to me nothing.
http://forum.xda-developers.com/showthread.php?p=16981439#post16981439
vinclar what tutorial did you use.? even if you type unmount that command would not be recognised nothing would happen,
This is a guess maybe the file system needs to be r/o read only when booting so that the orig efs files cant be rewritten or generated. as the files are specific to your phone only.
durbancurry said:
vinclar what tutorial did you use.? even if you type unmount that command would not be recognised nothing would happen,
This is a guess maybe the file system needs to be r/o read only when booting so that the orig efs files cant be rewritten or generated. as the files are specific to your phone only.
Click to expand...
Click to collapse
It's no unmount it's umount. Unfortunately, it seems like a fail on whoever created the umount command. In general Linux though, a simple typo to manually unmount a partition wouldn't do much harm. On a phone it seems to brick or clear the IMEI and other critical info.
russ18uk said:
It's no unmount it's umount. Unfortunately, it seems like a fail on whoever created the umount command. In general Linux though, a simple typo to manually unmount a partition wouldn't do much harm. On a phone it seems to brick or clear the IMEI and other critical info.
Click to expand...
Click to collapse
So this is what caused all the bricked phones?
Hi,
I was wondering if its possible to mount the "/" in CWM ?
Giving access to /SYSTEM and /DATA folders from the CWM mount options?
I have had a bit of a play around in CWM4 but the mount functions in there, dont seem to work?
When i mount from CWM it only gives me access to the /SDCARD
So i guess my questions are....
1) Is it currently possible to do this?
2) If not - why not? If the phone is rooted, shouldnt it be possible to allow access to these folders via mount in CWM?
3) If it is currently possible, how is it done?
Cheers
Not sure what you are trying to do, but if you want to access system or data from recovery use adb.
Sent from my GT-I9100 using xda premium
TheGhost1233 said:
Not sure what you are trying to do, but if you want to access system or data from recovery use adb.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
theres no particular reason at the moment, but there has been cases where this would have been very handy to have... i was just wondering, why isnt it avaliable? it would/could be such a valuable resource, especially for those of us who dont know adb coding/phrases...
"/" is always mounted, w/o a "/" drive nothing can boot.
Unless you're talking about the USB mount, I don't think that's possible just like that.
If you want to tinker around on "/", like already suggested above, use an adb shell or the like.
AMDPOWERFIST said:
it would/could be such a valuable resource, especially for those of us who dont know adb coding/phrases...
Click to expand...
Click to collapse
it would have absolutely no value in that case.
HellcatDroid said:
"/" is always mounted, w/o a "/" drive nothing can boot.
Unless you're talking about the USB mount, I don't think that's possible just like that.
If you want to tinker around on "/", like already suggested above, use an adb shell or the like.
it would have absolutely no value in that case.
Click to expand...
Click to collapse
Yeh sorry, i meant through the USB mount option from CWM4 or 5....
The reference "/" meaning the furthest possible directory back (like C:/ on a PC) - thus allowing access to the /SYSTEM and /DATA folders, mainly for issues that arise from say a faulty or incorrect version of a theme or framework-res.apk and systemui.apk etc etc etc - where the system wont boot or stuck in a bootloop, you know what the problem is, and want to rectify it without using adb shell, mainly because i dont know how to use adb shell - i assume its fairly easy, but have never tried
Just make a backup using CWM for those cases.
Backup -> install faulty theme -> bootloop -> restore -> be happy
HellcatDroid said:
Just make a backup using CWM for those cases.
Backup -> install faulty theme -> bootloop -> restore -> be happy
Click to expand...
Click to collapse
Yeah i do these days, really need more space on my internal SDcard tho, too much music on there, gotta delete the old backup before making a new one each time lol
does anyone else think tho, that this would be a good function to have?
I just received my new 32gb SD card, and am wondering how to ensure that my ext3 partition is also copied over, not just the fat32 files. I have found some other threads regarding this process but I still have some unanswered questions.
FYI, I am using MIUI 1.11.4 on a rooted Acer Liquid E (and malez-recovery, which is based on CM).
1. The general consensus seems to be to do a nandroid backup, partition the new card with gparted, and restore that backup (and obviously copy the fat32 files to my computer and then transfer back). I'd just like someone to tell me I'm correct before I try it.
2. On every single one of the threads I found, it always says to do a nandroid backup. Do they really mean a nandroid+ext backup?! Will the basic nandroid backup do the trick (I don't see how)? I'm concerned about this because I always get errors when I attempt a nandroid+ext backup. I plan to run nandroid-mobile.sh -b -e via adb once my file transfer is complete (stupid slow old sd card + computer), but I'm not confident that it'll work. If it doesn't, what options do I have for accessing the ext3 partition? **UPDATE: I ran nandroid-mobile.sh, and it eventually said "--ext2 specified but unable to mount the ext2 partition". I'm still Googling but I haven't figured out a solution yet. Ideas?
3. Every thread recommends using gparted but provides no justification as to why. Since I am using Windows, the whole process seems over-complicated. Can I not just use the "partition sd card" available through recovery? Why is it better to use gparted?
Thanks for any help you can give a semi-n00b!
skittleys said:
1. The general consensus seems to be to do a nandroid backup, partition the new card with gparted, and restore that backup (and obviously copy the fat32 files to my computer and then transfer back). I'd just like someone to tell me I'm correct before I try it.
2. On every single one of the threads I found, it always says to do a nandroid backup. Do they really mean a nandroid+ext backup?! Will the basic nandroid backup do the trick (I don't see how)? I'm concerned about this because I always get errors when I attempt a nandroid+ext backup. I plan to run nandroid-mobile.sh -b -e via adb once my file transfer is complete (stupid slow old sd card + computer), but I'm not confident that it'll work. If it doesn't, what options do I have for accessing the ext3 partition?
3. Every thread recommends using gparted but provides no justification as to why. Since I am using Windows, the whole process seems over-complicated. Can I not just use the "partition sd card" available through recovery? Why is it better to use gparted?
Thanks for any help you can give a semi-n00b!
Click to expand...
Click to collapse
1. Do that (just do it ; in case anything goes wrong, you can restore the nandroid backup and have your device up and running easily). If you don't create one (make sure you do) you will have a hard time getting your device to work again (and depending on your device, it may not be fixable).
2. Just make a nandroid backup. Some roms have it enabled by default (access to the partition). See here: http://forum.cyanogenmod.com/topic/19160-modhow-to-apps2ext-for-cm7-updated-03312011/.
3. Using GParted is the easiest method (which is why it is recommended): http://gparted.sourceforge.net/.
Theonew said:
3. Using GParted is the easiest method (which is why it is recommended): .
Click to expand...
Click to collapse
Easier than 3 multiple-choice questions in a recovery I've already installed???
Theonew said:
2. Just make a nandroid backup. Some roms have it enabled by default (access to the partition). See here:.
Click to expand...
Click to collapse
I doubt that my ROM does an ext backup by default.... I have now run nandroid-mobile.sh and eventually got the following message: "Warning: --ext2 specified but unable to mount the ext2 partition". I'm still Googling but I haven't yet figured out a solution for this. In the meantime, I have copied /sd-ext to my computer, which might end up being a decent workaround...but I'd still love to know what's going on!
**UPDATE: Something I've noticed...:
If I access the phone after a "normal" reboot, /sd-ext definitely exists (I can see it using simply ls, and also mount and df), but no scripts are available in /sbin.
When I go into recovery, /sbin contains all the scripts (so I can now run nandroid), but /sd-ext doesn't appear!
I've a strong suspicion this is why the partition can't be mounted during the nandroid backup.
So how do I fix this?!
skittleys said:
Easier than 3 multiple-choice questions in a recovery I've already installed???
Click to expand...
Click to collapse
According to others, yes .
skittleys said:
**UPDATE: Something I've noticed...:
If I access the phone after a "normal" reboot, /sd-ext definitely exists (I can see it using simply ls, and also mount and df), but no scripts are available in /sbin.
When I go into recovery, /sbin contains all the scripts (so I can now run nandroid), but /sd-ext doesn't appear!
I've a strong suspicion this is why the partition can't be mounted during the nandroid backup.
So how do I fix this?!
Click to expand...
Click to collapse
You cannot "fix" it. That is one reason but it also really depends on your device. For example: http://www.jayceooi.com/2011/01/12/...tition-on-sd-card-with-clockworkmod-recovery/ - This device is able to do it from recovery and it is easier than the GParted method (at least on that device).
Theonew said:
You cannot "fix" it. That is one reason but it also really depends on your device. For example: - This device is able to do it from recovery and it is easier than the GParted method (at least on that device).
Click to expand...
Click to collapse
I think we're mixing up 2 different issues now.
Forget the partitioning method, I'll just use gparted.
But now there's a major issue: I can't make a nandroid+ext backup. I've used adb to copy everything from my current ext partition and can load it onto the new card's partition, but that might not be an effective solution -- will it break all the symlinks? I'm trying to figure out whether symlinks ultimately store a path (therefore links won't break because the directory structure is still the same) or an address (which will break the links if I'm just copying + pasting). I'm finding conflicting answers.
So now I'm asking about what this error means (why won't it mount), whether the behaviour I described in the "update" above is normal (no sbin in normal mode, no sd-ext in recovery), and what alternatives I have! (Oh, and also my symlinks Qs) Plenty of people using the same recovery have created nandroid+ext backups without problems, and all the posts I'm finding about the issue relate to older versions of AmonRa.
skittleys said:
I think we're mixing up 2 different issues now.
Forget the partitioning method, I'll just use gparted.
But now there's a major issue: I can't make a nandroid+ext backup. I've used adb to copy everything from my current ext partition and can load it onto the new card's partition, but that might not be an effective solution -- will it break all the symlinks? I'm trying to figure out whether symlinks ultimately store a path (therefore links won't break because the directory structure is still the same) or an address (which will break the links if I'm just copying + pasting). I'm finding conflicting answers.
Click to expand...
Click to collapse
It's quite likely that it will break the symlinks (just like .android_secure issues). Are you able to make a nandroid-only backup?
skittleys said:
So now I'm asking about what this error means (why won't it mount), whether the behaviour I described in the "update" above is normal (no sbin in normal mode, no sd-ext in recovery), and what alternatives I have! (Oh, and also my symlinks Qs) Plenty of people using the same recovery have created nandroid+ext backups without problems, and all the posts I'm finding about the issue relate to older versions of AmonRa.
Click to expand...
Click to collapse
What recovery are you using (include version)? It is a known problem for some recovery not being able to have access to the SD-ext partition (e.g. ClockworkMod Recovery 3.0.0.5 on some if not all devices). So you should be able to access the SD-ext partition in recovery, and you should be able to access sbin normally.
Theonew said:
It's quite likely that it will break the symlinks (just like .android_secure issues). Are you able to make a nandroid-only backup?
Click to expand...
Click to collapse
Yes, I can do a nandroid backup of the internal partitions. Also not sure what issues you're referring to. I did some research on symlinks and posted on a linux forum and concluded that it shouldn't break....
Theonew said:
What recovery are you using (include version)? It is a known problem for some recovery not being able to have access to the SD-ext partition (e.g. ClockworkMod Recovery 3.0.0.5 on some if not all devices). So you should be able to access the SD-ext partition in recovery, and you should be able to access sbin normally.
Click to expand...
Click to collapse
(I don't have enough posts to insert URLs) I am using Malez recovery 0.6.1 (current is 0.6.2, nothing in the changelog suggests any relevant fixes though). I've searched extensively and it seems that I'm the only malez user having this problem.
Also, I can access sbin, but its only contents are adbd and ueventd. /sd-ext just plain doesn't show up in recovery mode.
Question: who is the owner of your /system, /sd-ext, and /system/sd partitions?
And a possibly unrelated question: what's the point of running a command through busybox (e.g., busybox ls instead of just ls)?
skittleys said:
Yes, I can do a nandroid backup of the internal partitions. Also not sure what issues you're referring to. I did some research on symlinks and posted on a linux forum and concluded that it shouldn't break....
Click to expand...
Click to collapse
It shouldn't break, but on some roms it does.
skittleys said:
Question: who is the owner of your /system, /sd-ext, and /system/sd partitions?
Click to expand...
Click to collapse
What do you mean?
skittleys said:
And a possibly unrelated question: what's the point of running a command through busybox (e.g., busybox ls instead of just ls)?
Click to expand...
Click to collapse
Busybox adds additional commands that the normal android command system does not have/understand on it's own (It gives you additional LINUX/UNIX based commands). See here: http://busybox.net/about.html.
Theonew said:
What do you mean?
Click to expand...
Click to collapse
When you run ls -l the 3rd and 4th columns show the 'owner' and 'group', respectively. It'll say things like root, system, etc., or maybe 0, 1000, 500, etc.
Theonew said:
Busybox adds additional commands that the normal android command system does not have/understand on it's own (It gives you additional LINUX/UNIX based commands). See here: http://busybox.net/about.html.
Click to expand...
Click to collapse
So there's no point in running a command like ls through busybox, right?
New question:
All that /system/sd contains is a 0-byte file called 'placeholder'. I can't find much info about this, but it sounds like this is intentional. But I know that this is where the ext partition is supposed to mount to. Does yours look like this (in either normal mode or recovery)? (edit: in recovery mode, the placeholder is gone, replaced with another 0-byte file called 'empty')
Also, do you think you could paste the output of mount when run in recovery?
BTW, A2SD seems to work perfectly otherwise. The only oddity I've noticed is that when I run a2sd forcecheck near the end it tries to unmount the partiton and can't.
Code:
[ ] Launching Apps2SD Start Program with forcecheck
[ ] Starting Darktremor Apps2SD in forcecheck mode
[ ] Creating Force Check Flag File...
[ ] Unmounting /dev/block/mmcblk0p2...
umount: can't umount /sd-ext: Device or resource busy
[ ] Rebooting phone...
Ironic that I can't mount it in recovery yet I can't unmount it normally!
Hey there?
I've got a question which I can't seem to find anywhere else and YES I have searched this forum and google. However, I may miss it.
Anyway, I've mapped my android phone as a network drive using Samba and changed the smb.conf file to show the System Root directory as well. However, system root is default set as R/O so to mange files USING my computer I need to change the permission to R/W using a file manager (such as root explorer). This is annoying, as I have to keep doing this in order to write to certail directories.
What I wish to do is create a massive guide on all of this to help out the community, however I need one little bit of information.
I would like the / directory (root) to be mounted as R/W as default so that I can quickly edit files on my PC without having to constantly change it to R/O.
If this has been answered before, I do apologize.
Thanks in advance.
Regards,
xxSHABSxx
EDIT:
To make things a bit clearer.
I want something that will automatically mount my phone's root dir into rw upon boot, without custom apps/having to manually mount as rw everytime it reboots. And yes I understand there are apps that do this.
Yes, the root file system is read-only, but it's also volatile. It's restored from the initramfs in the boot image each time you reboot the phone, so only mounting it writeable, doesn't do you very much anyway.
In /init.rc you find a line:
Code:
mount rootfs rootfs / ro remount
This remounts your root read-only. Remove this, and it'll stay writeable. But again, all edits to the root file system are volatile. To change this, you must flash a new boot.img
An easier way would be a root-app remounting it writable again after boot.
kuisma said:
Yes, the root file system is read-only, but it's also volatile. It's restored from the initramfs in the boot image each time you reboot the phone, so only mounting it writeable, doesn't do you very much anyway.
In /init.rc you find a line:
Code:
mount rootfs rootfs / ro remount
This remounts your root read-only. Remove this, and it's stay writeable. But again, all edits to the root file system are volatile. To change this, you must flash a new boot.img
An easier way would be a root-app remounting it writable again after boot.
Click to expand...
Click to collapse
Ahh I figured as much, since Google didn't offer any solutions to me. And flashing is way much more effort than simply having an app that does it for you.
Anyway thanks for the reply!
xxshabsxx said:
Ahh I figured as much, since Google didn't offer any solutions to me. And flashing is way much more effort than simply having an app that does it for you.
Click to expand...
Click to collapse
Or do like I did, move the root to a real ext3 non-volatile file system instead.
Hey. I tried this swapper2 app from the market and this little thing formated some partition from my phone thinking it was the swap one. Now phone won't go pass the samsung logo with sound.
I can get into recovery and into download mode. I tried flashing a brand new pcodin EMB5 flash, with no .pit nor repartition. No go. Rooted with CF-root (which also gives me CWM recovery). Recovery gives me the error: can't mount /efs so i'm guessing my /efs got formated. I have a backup made by copying the /efs files to another folder when all was working. What i'm guessing needs to be done is get my /efs partition created again (or at least mounted, not sure it's state) so i can copy it's contents there again.
What's the best way of doing this? I've seen people saying they can just use adb, mount /efs with the commands:
mke2fs /dev/block/mmcblk0p1
mount -w -t ext4 /dev/block/mmcblk0p1 /efs
and copy it's contents. But i need my phone to boot first to use adb, right? Doesn't seem to be working from recovery or download mode.
Would reflashing with odin using the pit file, repartition option or even the Clear ESF option work? I'm not very clear about what "clear efs" does.
Any other ideas?
Thanks!
EDIT:
I've managed to solve my problem, phone's up and running again. I'll post the entire process later for anyone else, god knows i'd have loved to see this written somewhere instead of all the inconclusive bits and pieces scavenged around the internet.
Update:
On recovery (CWM) /efs is the only partition it can't mount.Log says
"w:failed to mount /dev/block/mmcblk0p3 (invalid argument)
Error mounting /efs"
From what i understand, mmcblk0p3 is the /efs partition. Would restoring an image of mmcblk0p3 work? I have my /efs contents but not an image of it. Would it be possible to get an image from some other phone, restore it on mine and just replace it's contents later?
If so, would anyone be so kind to send me one image of mmcblk0p3 for the gt-i9000?
Thank you.
adb works from recovery.
no, no one will send you their efs folder
Yes, i managed to get adb working with recovery. i figured as much. to be honest, but i though if someone had an image from a broken phone or simply wouldn't mind sharing, it wouldn't hurt to ask since i've seen them around for other phones before. I couldn't care less about other phone's contents, just want to replace them with mine.
I will try to recreate this partition via adb with fdisk or something. Can anyone share the details of the mmcblk0p3, like size, blocks, etc?
Any other ideas are also appreciated.
efs contains fragile data, like the IMEI. Having it, it is relatively easy to unblock the phone locked as the result of stolen one claim.
I doubt if someone would share this content, first. Second, any effort related with IMEI cloning is not welcomed here.
spamtrash said:
efs contains fragile data, like the IMEI. Having it, it is relatively easy to unblock the phone locked as the result of stolen one claim.
I doubt if someone would share this content, first. Second, any effort related with IMEI cloning is not welcomed here.
Click to expand...
Click to collapse
I'm well aware and not trying to clone anything. But I'll change my request then: think it's possible for someone to extract the efs image, mount it elsewhere (in linux or something, should be an ext4, right?) delete it's files, save and send it to me? The partition structure should still be there (which is what i want) but no delicate files for me to use. I can then restore it to my phone, hopefully mount it manually in adb and copy my /efs contents.
Think this would work?
Thank you