Temp directories in an Android file system - Android Q&A, Help & Troubleshooting

Hi,
Are there any temp, volatile directories in the Android file system that get wiped once the device is off? In Linux we have /tmp, but this doesn't seem to exist in Android.
Thanks.

Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Moving to Q&A

Whether /tmp is cleared on boot differ between different distributions, RHEL does for example not.
The easiest way to identify which ram disks you have available is most likely to run mount through an ADB shell and see what you get of the type tmpfs.

How to I see what I get of the type tmpfs?

Related

[Q] No lost+found directory on /system partition

I recently got a phone with Gingerbread (2.3.5) and like the fact that it now uses ext4. However, I am a bit confused. There is no lost+found directory on the /system partition.
It caused some problems with being able to write to the partition when using a couple different versions of Linux (Fedora 16 and Ubuntu 11.10). /var/log/messages showed numerous errors pertaining to the partition and suggested I run fsck. Ran fsck, and it reported that lost+found was missing, and asked if I would like it created.
Not understanding why it was missing in the first place, I have not created it yet. Instead, I was able to use an older version of Linux (Ubuntu 10.04) and was able to gain rw access.
Does anybody know why lost+found might be missing on my phone, and/or is it missing on other Gingerbread phones?
Please use the Q&A Forum for questions Thanks
Moving to Q&A

[Q] Could not find G:\sdk\tools\adb.exe!

Hello all,
I am a newbie facing a little issue.
Previously I had a running set up of Android 2.2 with eclipse.
Two days before I had started the SDK manager within SDK, and update and install my existing SDK.
I am able to take new updates for Android 2.0 to 4.0.3, but because of this eclipse showing me some strange errors like
"Could not find G:\sdk\tools\adb.exe!" .
I made search for this on net they said I need to give the path of platform-tools instead of tools,
How can I set the path when I suppose to give the path till SDK only ?? (Here I am getting confused)
I had given the two paths in the path environmental variable, but problem remains the same.
Please if any one can help me on this issue, since I want to use the other versions greater than 2.2.
If you don't want to modify the path you gave in eclipse, just copy and paste the contents that you have in 'platform-tools' folder to 'tools' folder (choose replace if any prompts appear).. this worked for me..
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A

irulu 10.1 root/remount problems solved

I own an irulu K1001L1 10.1 (build number A20_K1001_K1001L1.20130713), a cheap one.
Many people complain about "partial rooting" and being unable to remount system in rw mode. Clueless as I was, I had tried several times with Uberizer, z4root and SRSroot, to no avail (the problem is not in the root, in my tablet su came by default in xbin directory).
D_rex (http://forum.xda-developers.com/show...2606510&page=2) found an effective solution which also helped in my situation: I think my tablet came with "su" application by default (notice overclocking worked) but due to /dev/block/nandd ext4 partition (I think /system starts at some offset) containing some errors (seen in dmesg) and due to this partition having the "s_errors" flag (behavior when errors detected) set to "mount read-only (02)", the partition is ALWAYS mounted read only, and remount as root doesn't change anything. More info on this ext4 option can be found here: https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout.
For me, the solution that worked was changing that flag s_errors to continue (01). I wasn't able to run e2fsck as the partition is already mounted; and I wasn't able to do a fsck in recovery mode since the recovery mode of this tablet lacks seems to lack both shell and e2fsck.
Tune2fs (old version precompiled here can change that flag in the partition. Using adb shell I pushed it to de device, set attribute as executable and run it, successfuly changing that "behavior when errors detected" in both partitions.
It has been suggested filesystem errors are linked to stability and realiability problems. Unfortunately this tablet lacks a version of CWM o TWRP as a recovery custom rom. I also adjusted the "max-mount-counts" value via tune2fs -c hoping it forces Android to run e2fsck, but it seems dmesg keeps displaying errors. I can only hope this problem is given more attention by developers.
After this I used the usual tools to root the device, noticing I had spent many hours in this cheap tablet. I should also mention by default now my tablet mounts in read-only mode (which is of course safer) but lets me change to rw whenever I want.
I have not been able to fix the ext4 errors. As others have explained, ls -al /dev/block can be used to better understand the images structure. System partition (nandd) contains the file e2fsck , but that file seems to be unavailable before mounting. Editing init.rc and associated files didn't force a diskcheck; I have not tried imaging the recovery partition (/dev/block/nandg) with dd and manually adding the required tools.I should also mention by default now my tablet mounts in read-only mode (which is of course safer) but lets me change to rw whenever I want.
On a side note, the adb driver setup tool found here didnt work for me (it seems &USER_PROFILE% in the .bat file should be replaced by "%USER_PROFILE%" and Desktop should be replaced according to the language of your operating system. Nevertheless the tool didn't work for me and I had to install another driver found in Uberizer distribution as the official "android_winusb.inf" didn't work in my Windows XP computer.
Thanks to the creators of tune2fs, to D_rex and other people/programs mentioned here. This is my experience with this problem; I'm not responsible if anyone tries this and bricks his device. All brands are property of their owners.
Good luck and Good bye

mount command is giving 'Invalid argument'

Hello
I have a samsung galaxy s5 SM-G900W8 ( marshmallow )
and am puzzled as to why
mount /dev/block/mmcblk0p15 tmp_mnt
is giving me a 'Invalid argument'
where tmp_mnt is a directory that I have made
and we have in /dev/block/platform/msm_sdcc.1/by-name:
boot -> /dev/block/mmcblk0p15
I wish to see if something like boot.img is in there
Bruce
brucembeach said:
Hello, I have a samsung galaxy s5 SM-G900W8.....
Click to expand...
Click to collapse
I don't have this variant but, your best bet is to post this question within the following Q&A thread that's specific to your device and variants.
https://forum.xda-developers.com/showthread.php?t=2700073
Good Luck!
~~~~~~~~~~~~~~~
I DO NOT provide support via PM unless asked/requested by myself. PLEASE keep it in the threads where everyone can share.
Thanks for the reply. I'm new to the forum and
wasn't sure where to put my query. In any case the
answer came to me shortly after my post, which I
believe is generic to all android devices, except
that things like /dev/block/mmcblk0p15 have to be
adjusted for the specific device.
The reason i was geting 'Invalid argument' from
the mount command is that there is no filesystem
on '/dev/block/mmcblk0p15' and hence it can't be
mounted. My guess is that at boot time the system
doesn't know anything about filesystems and knows
just enough to send raw low level commands to the
storage medium to read the boot file, dissassemble
it and pass control to it.
Here you need to be rooted. If you execute the
commands from:
** adb shell
dd if=/dev/block/mmcblk0p15 of=/storage/C37F-1BE2/test_boot.img
** and some host
adb pull /storage/C37F-1BE2/test_boot.img
you will have just downloaded a backup of the boot
image for your android, and the same applies for
the recovery. With suitable tools the
test_boot.img breaks down to a kernel and a
ramdisk.cpio.gz and the ramdisk.cpio.gz can be
decompressed to the ramdisk
bruce

How to navigate system image backup?

Hello. I've got a backup of
Code:
mmcblk0
It's probably encrypted, but I'm not sure. If it is, I do have the password, but then I wouldn't know where to insert it.
Is there any detailed tutorial on how to mount this file and work with it? If it's a Linux solution then preferably some guide or tutorial on how exactly to figure out this mess.
Thanks for any help.
RecoverVery said:
Hello. I've got a backup of
Code:
mmcblk0
It's probably encrypted, but I'm not sure. If it is, I do have the password, but then I wouldn't know where to insert it.
Is there any detailed tutorial on how to mount this file and work with it? If it's a Linux solution then preferably some guide or tutorial on how exactly to figure out this mess.
Thanks for any help.
Click to expand...
Click to collapse
Hello and good morning, @RecoverVery
Welcome to XDA! I hope you'll always get the support you require.
However, prior to your next posting please read the guidances that are stuck on top of every forum like
[Read Before Posting]QUESTIONS DO NOT BELONG IN GENERAL
Hello Everybody, In order to attempt to keep this forum neat and tidy the moderation team is asking you to post your questions into the Questions and Answers (Q&A) forum and not into the General section. You can find the Q&A forum by clicking...
forum.xda-developers.com
and the others. I've moved your thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator
I don't know what's the goal but you can extract the userdata partition from disk image with dd. the output of parted is in bytes, must divided by block size of your choice (bigger bs is faster)
Code:
parted mmcblk0 unit B print
dd if=mmcblk0 of=userdata.img skip=$off count=$len bs=$bs
another way is boot into TWRP from fastboot and pull the partition image directly.
Code:
fastboot devices
fastboot boot twrp-3.6.2_9-0-lavender.img
adb devices
adb pull /dev/block/bootdevice/by-name/userdata
Note: even if the partition image is mountable, the files are encrypted and manually decryption requires healthy keystore (not included in mmcblk0) and the device of origin itself.
Mate 9 - how to retrieve encrypted files from a broken system (userdata partition)
It's surprising that a bunch of people are interested in this article. But I have to say that some processes I mentioned in this article just happened to work. I don't necessarily understand why they work, which also means they probably cannot be...
forum.xda-developers.com

Categories

Resources