Is it possible to know the wear level information of a phone, like SSD have with SMART?


Question

Is there a way to find out the media wearout level on an android device? I have a tablet that is acting weird and slow, so I wonder if the internal storage is still ok: it is the Nvidia Sheild (renamed Tegra K1 later on) and probably has eMMC since it's quite old.



I know that a SSD is not the same as a phone storage chip. I read about eMMC and UFS and I am interested about wearout on both generations of storage!



https://www.dignited.com/23879/emmc-or-ufs-mobile-phone-storage/

https://www.digitaltrends.com/mobile/what-is-ufs-3-0-storage/



Here's a link to Unix/Linux SE for more info about media wearout:

https://unix.stackexchange.com/questions/106678/how-to-check-the-life-left-in-ssd-or-the-mediums-wear-level



I know that one way to estimate the storage wear is to run a storage benchmark app, but I am interested about storage wearout.



Thanks!


Answer

SMART was originally designed for ATA devices and extended to SCSI and PCIe/NVMe later to cover almost the whole range of HDDs/SSDs. Trying to send SMART commands to eMMC, e.g. using smartctl would throw error: Unable to detect device type. Please specify device type with the -d option.



Unlike SATA or SAS, eMMC communicates over parallel links and has a different command set. One of these commands (CMD8) dumps the Extended CSD (Card Specific Data) register which holds card's internal information and device capabilities including Life Time Estimation and Pre EOL (End of Life) Estimation. EXT_CSD register can be read (requires root) using mmc tool from mmc-utils:



~# mmc extcsd read /dev/block/mmcblk0 | grep -E 'LIFE|EOL'
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x03
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x03
eMMC Pre EOL information [EXT_CSD_PRE_EOL_INFO]: 0x01



* 0x03 indicates health status is estimated between 20% and 30% of the device lifespan.

* 0x01 indicates Normal pre-EOL status.



Depending on your MMC driver, the above information is also available through sysfs interfaces:



~# cat /sys/devices/soc/7824900.sdhci/mmc_host/mmc0/mmc0:0001/{
life_time,pre_eol_info
}

0x03 0x03
01


* Path may differ depending on eMMC vendor.



Another option is to read ECSD register from debugfs:



~# cat /sys/kernel/debug/mmc0/mmc0:0001/ext_csd


But parsing ECSD raw output is an extra job.



For UFS part I'm not sure at the moment if the health/wear estimation is available through HCI Capabilities Registers or not. Also unlike eMMC, UFS operates over a serial communication link and supports a subset of SCSI commands. So it might be providing SMART (or SMART-like) monitoring system. Someone else may update the answer if some authentic source of information is available.






REFERENCES:




Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes