Diferencia entre revisiones de «Usuario:Juanda/android/filesystem»

De WikiEducator
Saltar a: navegación, buscar
(Particiones habituales y directorios)
(Comprobación desde el terminal)
Línea 88: Línea 88:
 
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
 
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
 
shell@android:/ #  
 
shell@android:/ #  
 +
 +
shell@android:/ # df
 +
Filesystem            Size  Used  Free  Blksize
 +
/dev                  936M    32K  936M  4096
 +
/mnt/secure            936M    0K  936M  4096
 +
/mnt/asec              936M    0K  936M  4096
 +
/mnt/obb              936M    0K  936M  4096
 +
/system                827M  512M  315M  4096
 +
/cache                551M    9M  541M  4096
 +
/data                    5G    2G    3G  4096
 +
/persist                15M    4M    11M  4096
 +
/firmware              63M    53M    10M  16384
 +
/mnt/shell/emulated      5G    2G    3G  4096
 +
shell@android:/ #
 +
  
 
</code>
 
</code>

Revisión de 05:27 10 abr 2013


RAM, Flash, y tarjeta SD

Los dispositivos Android pueden tener tres tipos de almacenamiento: RAM, almecenamiento interno flash, y menos frecuentemente, memoria externa mediante tarjeta SD

La RAM o memoria interna es muy rápida y volatil. Las aplicaciones se cargarán del almacenamiento interno a la memoria RAM. Cuando la aplicación se cierra (¿se cierran?) se liberará dicha memoria.

La memoria interna es el equivalente al disco duro del ordenador. Aquí es donde el sistema operativo del dispositivo (firmware), las aplicaciones, y los datos de usuario se guardan. Las aplicaciones funcionan en modo sandbox, para mantener la seguridad. Hay un usuario linux por cada aplicación instalada.

La tarjeta SD, normalmente se dedica a almacenamiento de usuario, imágenes, vídeos y música. No todos los dispositivos permiten usar tarjetas SD (ejemplo Nexus 4 o iPhone5).

Particiones habituales y directorios

Cada dispositivo puede tener unas particiones distintas. Los que listo a continuación son los más comunes:

  • /boot Es la partición de arranque del sistema Android. En esta partición se guarda el kernel y el ramdisk. El kernel es el núcleo software del dispositivo. Permite la comunicación entre el hardware y el software y otros aspectos básicos del dispositivo como los formatos de ficheros soportados. El ramdisk contiene los primeros bits de Android que se cargan. Es el software que carga todo lo demás.
  • /recovery Esta partición guarda el software de recovery, el cual da al usuario acceso a funciones especiales como la actualización del sistema operativo o hacer un backup del software actual. Se puede considerar como una partición de boot alternativa, que permite arrancar el sistema con una consola de recuperación para tareas de mantenimiento o restauración.
  • /system Es el directorio principal donde está todo el sistema operativo (salvo el kernel y el ramdisk). Normalmente se carga en modo solo lectura y solo se puede modificar en circunstancias especiales.
  • /cache Ficheros temporales de Android. Normalmente no son ficheros críticos para la operación del dispositivo y se puede limpiar de contenidos (wipe), especialmente en las actualizaciones mayores.
  • /data Aquí se guardan los datos del usuario. Cuando descargamos una aplicación del Play Store viene aquí. Los settings de la aplicación también. Un SMS que recibamos, también viene aquí.
  • /sdcard Este directorio contendrá los ficheros de la tarjeta SD. Se usa por las aplicaciones como espacio de "propósito general". Los dispositivos sin tarjeta SD también pueden disponer de esta partición "enlazada" a un directorio del almacenamiento interno.

/misc

This partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and certain hardware settings etc. This is an important partition and if it is corrupt or missing, several of the device’s features will will not function normally.

/sdcard

This is not a partition on the internal memory of the device but rather the SD card. In terms of usage, this is your storage space to use as you see fit, to store your media, documents, ROMs etc. on it. Wiping it is perfectly safe as long as you backup all the data you require from it, to your computer first. Though several user-installed apps save their data and settings on the SD card and wiping this partition will make you lose all that data.

On devices with both an internal and an external SD card – devices like the Samsung Galaxy S and several tablets – the /sdcard partition is always used to refer to the internal SD card. For the external SD card – if present – an alternative partition is used, which differs from device to device. In case of Samsung Galaxy S series devices, it is /sdcard/sd while in many other devices, it is /sdcard2. Unlike /sdcard, no system or app data whatsoever is stored automatically on this external SD card and everything present on it has been added there by the user. You can safely wipe it after backing up any data from it that you need to save.

/sd-ext

This is not a standard Android partition, but has become popular in the custom ROM scene. It is basically an additional partition on your SD card that acts as the /data partition when used with certain ROMs that have special features called APP2SD+ or data2ext enabled. It is especially useful on devices with little internal memory allotted to the /data partition. Thus, users who want to install more programs than the internal memory allows can make this partition and use it with a custom ROM that supports this feature, to get additional storage for installing their apps. Wiping this partition is essentially the same as wiping the /data partition – you lose your contacts, SMS, market apps and settings.

Now when you install a new binary, you can know what you’re going to loose, make sure to backup your data before flash new binary in your android device.

Comprobación desde el terminal

juanda@juanda-PC:~$ adb shell shell@android:/ $ su - shell@android:/ # cat /proc/mounts shell@android:/ # cat /proc/mounts rootfs / rootfs ro,relatime 0 0 tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0 devpts /dev/pts devpts rw,relatime,mode=600 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 debugfs /sys/kernel/debug debugfs rw,relatime 0 0 none /acct cgroup rw,relatime,cpuacct 0 0 tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0 tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0 tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0 none /dev/cpuctl cgroup rw,relatime,cpu 0 0 /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,relatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,nosuid,nodev,noatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,nosuid,nodev,noatime,noauto_da_alloc,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,nosuid,nodev,relatime,nodelalloc,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0 /dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 shell@android:/ #

shell@android:/ # mount rootfs / rootfs ro,relatime 0 0 tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0 devpts /dev/pts devpts rw,relatime,mode=600 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 debugfs /sys/kernel/debug debugfs rw,relatime 0 0 none /acct cgroup rw,relatime,cpuacct 0 0 tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0 tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0 tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0 none /dev/cpuctl cgroup rw,relatime,cpu 0 0 /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,relatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,nosuid,nodev,noatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,nosuid,nodev,noatime,noauto_da_alloc,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,nosuid,nodev,relatime,nodelalloc,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0 /dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0 shell@android:/ #

shell@android:/ # df Filesystem Size Used Free Blksize /dev 936M 32K 936M 4096 /mnt/secure 936M 0K 936M 4096 /mnt/asec 936M 0K 936M 4096 /mnt/obb 936M 0K 936M 4096 /system 827M 512M 315M 4096 /cache 551M 9M 541M 4096 /data 5G 2G 3G 4096 /persist 15M 4M 11M 4096 /firmware 63M 53M 10M 16384 /mnt/shell/emulated 5G 2G 3G 4096 shell@android:/ #