[Question] In which partition is /data/ stored. - Android Q&A, Help & Troubleshooting

Hello,
I'm working my way into modifying a Stock Rom. I have files in the directory "/data/" and wanted to ask in which partition they are stored. I searched the partitions "System" "OEM" and "Vendor" and found nothing. Also I didn't find anything in the "Boot" imge ... There I only found the recovery part. The zImage is only the pure kernel code, isn't it?
Question: In which partition is /data/ stored.
Yours sincerely
Fynn

MisterFynn said:
Hello,
I'm working my way into modifying a stick of Rome. I have files in the directory "/data/" and wanted to ask in which partition they are stored. I searched the partitions "System" "OEM" and "Vendor" and found nothing. Also I didn't find anything in the "Boot" imge ... There I only found the recovery part. The zImage is only the pure kernel code, isn't it?
Question: In which partition is /data/ stored.
Yours sincerely
Fynn
Click to expand...
Click to collapse
This directory is in usrdata, userdata or data partition. The partitions mentioned above are all the same, it has different names in different phones.
HIT THANKS IF FOUND USEFUL

Related

write permission on / (not /system)

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 .

[Q] Allwinner A13 (STOCK ROM)-Anyone successfully mounted RFSFAT16_OEM?

I've been trying to mount this particular file on my tablet's decompiled stock ROM (Allwinner A13) but I'm not having a whole lot of luck. every time I do the mount command, it's asking me for a fs type and I can't seem to get the correct one (I've tried ext4 and Yaffs2).
Anyone have any ideas?
Need more information about fullname, size, what said "file" command? Why you need it?
To unpack "system" image i used program called "packer_ics/imagesuite/unimg.exe" from kitchen for ICS.
kaptorali said:
Need more information about fullname, size, what said "file" command? Why you need it?
To unpack "system" image i used program called "packer_ics/imagesuite/unimg.exe" from kitchen for ICS.
Click to expand...
Click to collapse
Thanks-I know it's cramfs. My guess is that it's probably encrypted-no matter, I figured a workaround so I didn't have to decompress/decrypt.
Thanks for the offer though.

S3 won't boot after app gone wrong - need opinion plz

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

Where is recovery.img located.(on which partition)

I am making a custom rom.for my android.I need to know where recovery.img is located.Like which partition or directory can I try to find it at.I try ed the system partition but obviously it wasn't there because that's the system.I dumped my firmware image so I could modify it,but I can't find recovery.Img.All I found is recovery.fex.Is this my recovery?Thanks for your answer.[emoji2]

Can someone share their /persist contents with me?

Hi all,
Did something stupid that erased my /persist folder. The folder exists now and most of the sensors and data has been restored but for wifi. The wifi bin files are missing, so if someone is kind enough to share the contents of their /persist it will be really helpful thanks.
On a rooted device, use a root capable File manager to access the /root folder of your moto z.
in system/persist, copy the contents and share it here.?
XT 1650 3
And also their system/etc/firmware/wlan folder please?
That doesn't work. The binaries are bound to the device serial number and the whole thing is then signed by motorola.
For now, don't do anything more to your persist folder! First, you need to save what's left to save.
Try this: connect your phone with the PC, boot into TWRP recovery..
Code:
adb shell "dd if=/dev/block/sda3 of=/tmp/sda3_persist.bin"
adb pull /tmp/sda3_persist.bin
This is the current partition image. You may be able to reconstruct the missing files and filenames.
However, chance is that you removed just the mount point of the persist partition.
Reinstall system partition and see if that brings back the persist folder...
benzinerwin said:
That doesn't work. The binaries are bound to the device serial number and the whole thing is then signed by motorola.
For now, don't do anything more to your persist folder! First, you need to save what's left to save.
Try this: connect your phone with the PC, boot into TWRP recovery..
Code:
adb shell "dd if=/dev/block/sda3 of=/tmp/sda3_persist.bin"
adb pull /tmp/sda3_persist.bin
This is the current partition image. You may be able to reconstruct the missing files and filenames.
However, chance is that you removed just the mount point of the persist partition.
Reinstall system partition and see if that brings back the persist folder...
Click to expand...
Click to collapse
Thanks for the reply.
/persist is now mounted and phone is booting and everything else is working (bluetooth connects, sensors are working etc) only wifi is not working.
Log Cat is not too helpful, just says wifi driver cannot load. System status gives IMEI number, bluetooth MAC address are shown. But Wifi is shown as 02:00:00:00. Not sure what is wrong! Hardware gone?
Thanks
Hm, you should backup your modem partition:
Code:
adb shell "dd if=/dev/block/sda16 of=/tmp/sda16_modem.bin"
adb pull /tmp/sda16_modem.bin
Afterwards, maybe you want to try this modem backup image from another moto-z...
I have no idea wheather that's locked a serial number or if it is just genereic. Make sure you have a backup of your current modem parition!
Flashing is just the commands slightly reversed...
Code:
adb push other_modem.bin /tmp/other_modem.bin
adb shell "dd if=/tmp/other_modem.bin of=/dev/block/sda16"
No Luck
thanks, can you confirm what is the contents of the /persist/wifi and /system/etc/firmware/wifi/?
Just want to check
anilisanil said:
No Luck
thanks, can you confirm what is the contents of the /persist/wifi and /system/etc/firmware/wifi/?
Just want to check
Click to expand...
Click to collapse
My booted system contains a /persist/wifi folder, but with no content
/system/etc/wifi contains 5 files: p2p_supplicant.conf, p2p_supplicant_overlay.conf, WCNSS_qcom_cfg.ini, wpa_suuplicant.conf, wpa_supplicant_overlay.conf.
Are you sure, you redtored all partitions properly? Maybe FSG as well, though I think it's just cellphone related & erased modemst1/2+cache?
benzinerwin said:
My booted system contains a /persist/wifi folder, but with no content
/system/etc/wifi contains 5 files: p2p_supplicant.conf, p2p_supplicant_overlay.conf, WCNSS_qcom_cfg.ini, wpa_suuplicant.conf, wpa_supplicant_overlay.conf.
Are you sure, you redtored all partitions properly? Maybe FSG as well, though I think it's just cellphone related & erased modemst1/2+cache?
Click to expand...
Click to collapse
The phone is booting without any errors at all, so I am not sure!
Same for me, so issue is not with persist. The etc/firmware/wifi is different for different people? I have 3 files, one .ini and 2 bin files- one for 2G and other for 5G- both are empty! Beats me!
I dont suspect wifi hardware going kaput so easily! But there are quite a few people who raised this in other device forums, but no one seem to have succeeded!
edit: I am assuming /etc/firmware are changed when we flash a new rom and the fact that I flashed the stock ROM a couple of times did not help means that the problem is not with /etc/firmware folder? Really clueless!
benzinerwin said:
My booted system contains a /persist/wifi folder, but with no content
/system/etc/wifi contains 5 files: p2p_supplicant.conf, p2p_supplicant_overlay.conf, WCNSS_qcom_cfg.ini, wpa_suuplicant.conf, wpa_supplicant_overlay.conf.
Are you sure, you redtored all partitions properly? Maybe FSG as well, though I think it's just cellphone related & erased modemst1/2+cache?
Click to expand...
Click to collapse
just realised, the contents are hidden, can you please ensure you are looking for hidden files as well?
anilisanil said:
just realised, the contents are hidden, can you please ensure you are looking for hidden files as well?
Click to expand...
Click to collapse
Yes & I did..
BTW, my phone runs on LineageOS.

Categories

Resources