Does "How will you use this SD card?" wipe data?


Question

There is a notification almost every time after boot saying "Issue with SD card" "Tap to Fix".


What happens when I then choose "Use as portable storage"?


I don't want any formatting to happen and it is not clear if it will format or not. ( My SD card works fine from recovery and I can mount and view it in the terminal without problem. Not sure what the notification is about. )


Answer

I have now backed up my contents and am able to try this out.


screenshot of "how will you use this SD card?"
popup after choosing "portable storage"


The popup indeed makes it clear that data will be lost.




Process


If, like me, you don't believe the system that your card is broken, you can try running fsck like @alecxs advised me to. Use the -y flag to avoid manually confirming every fix.


I used mount/blkid to see what filesystemtype my SDcard uses and what its block device id is. And then I ran fsck.exfat /dev/block/mmcblk0p1 which told me


1|beryllium:/ # fsck.exfat -V /dev/block/mmcblk0p1
exfatfsck 1.2.2
Copyright (C) 2011-2015 Andrew Nayenko
beryllium:/ # fsck.exfat /dev/block/mmcblk0p1
exfatfsck 1.2.2
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
WARN: volume was not unmounted cleanly.
Checking file system on /dev/block/mmcblk0p1.
File system version 1.0
Sector size 512 bytes
Cluster size 128 KB
Volume size 463 GB
Used space 211 GB
Available space 252 GB
ERROR: unknown entry type 0x89.

ERROR: unexpected continuation (0).
Totally 5536 directories and 64646 files.
File system checking finished. ERRORS FOUND: 2.

whoops, I should have unmounted it first!!


Running it again (this time from boot instead of recovery (shouldn't matter), and not mounted) I get the option to actually fix it. Note that I did this as su:


beryllium:/ # fsck.exfat /dev/block/mmcblk0p1
exfatfsck 1.3.0
Checking file system on /dev/block/mmcblk0p1.
File system version 1.0
Sector size 512 bytes
Cluster size 128 KB
Volume size 463 GB
Used space 211 GB
Available space 252 GB
ERROR: unknown entry type 0xc0.
Fix (Y/N)? Y
ERROR: unknown entry type 0xc1.
Fix (Y/N)? Y
ERROR: unknown entry type 0xc1.
Fix (Y/N)? Y
Totally 5537 directories and 64860 files.
File system checking finished. ERRORS FOUND: 3, FIXED: 3.
reboot

The reboot was fairly quick, the login afterwards took a bit of time, and now... the sd card warning is gone! This also answers a question I was already typing but haven't submitted yet: How to fix the SD card without data loss!

I shall publish that question as well soon, so that it's easier to find this solution.


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