35

I usually use a combination of the following 4 commands and correlate them, since each of these commands gives a piece of the information that might be needed. Summarily: Using df lists the filesystem path alias and size info as seen below (total size, used, free and block size) Example output: root@ks01lte:/sdcard # df df Filesystem ...


30

There is no singularly defined "Android" filesystem, so this can vary between devices. Any FS that the kernel can load drivers for is basically fair game. By and large, you'll almost certainly find that ext4 is the most common filesystem on modern devices. Older devices may use older ext* versions as well, or other filesystems entirely. Since everything is ...


25

Some major changes occurred to storage in Android 4.4 (see Android's Storage Journey). So the following is generally true for Android 4.4+ and particularly 6+. This is from my detailed answer to How disk space is used on Android device?. Apps' files are saved (by system and app itself) to internal and external storage under different categories. DIRECTORY ...


21

This is a known issue. Go to app manager and find 'external storage' and 'media storage' and clear data and cache for them, then reboot, and wait up to 10 minutes and then connect to PC via USB. Sometimes media scan apps from play store help if you don't want to reboot.


19

The answer to your question is built into your phone's OS. 1. Put the SD card in your phone 2. Reformat the SD card with your phone(Settings --> Storage/Storage & USB) 3. The file system on the freshly formatted SD card is the type that will give you the best performance with your phone. 4. Outside the context of your phone the optimum file system is ...


18

The sequence of commands that worked for me was adb root adb disable-verity adb reboot adb root adb remount If I don't reboot, remount does not succeed.


15

The solution was to reboot the phone. The com.fsck.k9 directory is now visible on the top level of the phones file system.


14

The syntax of mount command usually requires you specify the target: mount -o remount,rw /system /system This output could be useful for us to better understand your problem: cat /proc/mounts As a last resort, as you have root you can try saving raw image of system, mount it on your box and push the app there, then flash it back on your device. To save ...


13

It might not always be possible to transfer data between multiple users/profiles. It depends on the Device/Work Policy Controller app, installed by you or your IT admin. Android device can be managed in two ways: fully managed (which is setup at the time of first use or after factory reset on a company owned device) and work profiles (which can be added or ...


12

I'm going to give a general overview of how dm-verity and related things work on Android according to my limited knowledge. Situation might differ on different devices and ROMs. HOW IS DM-VERITY ENFORCED? dm-verity (Verified Boot and AVB) as well as dm-crypt (FDE) are targets of device-mapper feature of Linux kernel. dm-verity verifies the integrity of ...


11

The Android system does not have the conventional /etc/passwd storage for users and groups. In android, user and groups are used to isolate processes and grant permissions. The Android system creates a user per application when an application gets installed. Hence application data files are stored in /data/data/<app-name>/, and are read-writable only ...


10

Looks like it moved to data/User_DE/0/com.android.providers.telephony/databases with Nougat. At least, this is where it can be found on my Nexus 6. Hope this helps.


9

Even it does not fully answer the question, here's a guide to decrypt the external storage formatted as internal. You do need to be root on your phone, however. The gist is that we search for strings including the keyword expand and ending with .key within vold using: $ strings vold|grep -i expand --change-name=0:android_expand %s/expand_%s.key /mnt/expand/...


9

For accessing your Android device via USB in "File Transfer" mode your computer uses the MTP protocol. This protocol allows to list and read/write the files from/to your device. What most people don't know is that the MTP protocol does not show the content of the file-system. Instead it uses the Android MediaStore Database (an SQLite database) ...


8

DiskInfo displays this information (among other things) when you select a partition to view its details. Works with the internal partitions on my Nexus 5, but should also support external SD cards and the like:


8

In the settings of Google Play Music, if you have it set to cache on the external SD card, your cache location will be /external_sd/Android/data/com.google.android.music/files/music/. If you have it use the internal storage, the path will be /sdcard/Android/data/com.google.android.music/files/music. Note that these files are named [some-id].mp3, like 124....


8

Back in 2012, /proc/last_kmsg (1) used to be a dump of kernel console messages, exported after reboots by Android's ram_console functionality (CONFIG_ANDROID_RAM_CONSOLE), which used persistent_ram (CONFIG_ANDROID_PERSISTENT_RAM) to handle a block of RAM that wasn't erased across reboots (2). persistent_ram was based on Linux upstream RAMOOPS code which ...


7

I just tried and found that you need to modify a file: sys/class/power_supply/usb/device/charge its default content is '1' which means 'enable charging' you need to set it to '0' to 'disable charging' $ su $ echo 0 > /sys/class/power_supply/usb/device/charge I tested on Nexus 4 and it's working successfully.


7

I realize that this is an old topic, but some of the answers here actually hindered my efforts to learn about fstab and Android because they so strongly imply that the fstab situation in Android is extremely different from other Linux distributions. From what I can tell, it isn't. However, reading different responses here made me wonder: what fstab-...


7

1) On which physical storage does "Memory" sit When the specs say "Memory", it's referring to the RAM that the device has. This is not persistent storage, it is "volatile" storage, which loses its information when unpowered (after a brief discharge time). RAM is memory the system and apps use to function, for things like storing the state of an application (...


7

Alternatively, one can use a Terminal Emulator app which requires no usage of adb. Download a Terminal Emulator of your choice from Play Store here. Open that app and issue the command mount. You can also use the command df to ascertain the partitions to be looked in the former output. An alternative for mount is blkid command which shows a much better ...


7

First to clarify, Resize Partition is different than Resize File System, TWRP provides latter option. It resizes the ext2/3/4 filesystem to the size of partition it's created on. Filesystem size can be checked with df command when mounted, and partition size with blockdev. Just like HDDs or SSDs on PC, Android's eMMC storage is divided into partitions (can ...


7

SHORT ANSWER: You can simply touch the file or provide any time and date in past or future: ~$ touch /sdcard/test_file ~# debugfs -R 'stat media/0/test_file' /dev/block/bootdevice/by-name/userdata | grep crtime: crtime: 0x5c926e0d:2d61b810 -- Wed Mar 20 21:45:01 2019 ~$ touch -d '2009-2-13 14:32:55' /sdcard/test_file ~$ stat /sdcard/test_file [...] Access: ...


7

On all operating systems based on Linux kernel - like Android is - it's possible to set permissions on files (including directories) provided that filesystem supports UNIX permissions (uid, gid, mode). Common examples of such filesystems are ext4 and f2fs. However Android's internal (confusingly called external) storage which is accessible by installed apps ...


7

Android supports fstrim but it only works if the phone is idle for a long time while charging It's not so. On newer versions, Android runs fstrim with a daily schedule, provided that the conditions meet. Or it should run on a reboot if not run for 3+ days. See this answer for details and how you can run fstrim manually. FRAGMENTATION ON FLASH MEMORY: I ...


7

A charging, idle device over night is not the only way to run fstrim, there are other ways too. What this old article quotes about scheduled fstrim on Android: The Android framework will send out a “start idle maintenance window” event that the MountService listens for, and then invokes vold to fstrim filesystems when a few conditions have been met – the ...


6

You can use fdisk via busybox on a droid. So, assuming you have the busybox binary on your rom, and it's on your path, the command would simply be: busybox fdisk [the various fdisk options...] Example output of an i9305 with TWRP recovery running (v3.5.0_9-0): ~ # busybox fdisk -l /dev/block/mmcblk0 Found valid GPT with protective MBR; using GPT Disk /dev/...


6

Old thread but found something nobody else has mentioned... just in case anyone finds it useful. ls -la /dev/block/bootdevice/by-name The directory contains named symlinks to all the partitons.


6

There's no direct equivalent in Android. Each app has its own directory in /data/data (for a multi-user system, it's /data/users/n). Apps are encouraged to show a metadata-based view of user data, instead of requiring the user to worry about individual files. Each app stores the files and databases that hold its documents, and its configuration files, in its ...


6

If you are logged into your Google account, your Phrasebook will synchronize across devices and you can also access it from the web interface of Google Translate. Furthermore, after importing to Anki you can synchronize your decks across devices. In the web interface of Google Translate, show the Phrasebook by clicking the Phrasebook icon in the upper right ...


Only top voted, non community-wiki answers of a minimum length are eligible