Marshmallow Keeps rebooting. It seems a Stagefright bug. How to know which file causing the bug? So, my phone keeps rebooting when SD Card is inserted. Looking at the logcat, theres lots of: 

"FFmpegExtractor" and "stagefright" 

before the phone reboots.

What i suspect is that i have corrupted music or video that make stagefright crash and reboot the whole system.

any idea how to know which ones are the problematic file? In the logcat, FFmpegExtractor and stagefright did not list the file that they process :(

thank you!

07-16 22:27:59.603 263-263/? I/FFmpegExtractor: android-source:0xaee2c7b0
07-16 22:27:59.609 263-263/? I/FFmpegExtractor: adjust mime(video/ffmpeg -&gt; audio/ffmpeg)
07-16 22:27:59.609 263-263/? D/FFmpegExtractor: suppoted codec(aac) by official Stagefright
07-16 22:27:59.609 263-263/? D/FFmpegExtractor: ffmpeg detected media content as 'audio/ffmpeg' with confidence 0.08
07-16 22:27:59.889 8571-8581/com.facebook.katana W/art: Suspending all threads took: 5.881ms
07-16 22:27:59.995 8571-8571/com.facebook.katana V/SplashScreenApplication: ceding control to main thread
07-16 22:28:00.007 802-1988/system_process I/ActivityManager: Killing 6810:com.mxtech.videoplayer.ad/u0a123 (adj 13): empty #17
07-16 22:28:00.312 263-989/? I/FFmpegExtractor: android-source:0xb5fa20c0
07-16 22:28:00.322 263-989/? I/FFmpegExtractor: adjust mime(video/mp4 -&gt; audio/mp4a-latm)
07-16 22:28:00.323 263-989/? D/FFmpegExtractor: suppoted codec(aac) by official Stagefright
07-16 22:28:00.323 263-989/? D/FFmpegExtractor: ffmpeg detected media content as 'audio/mp4a-latm' with confidence 0.08
07-16 22:28:00.372 263-1152/? I/FFmpegExtractor: android-source:0xaee2c7b0
07-16 22:28:00.382 263-1152/? I/FFMPEG: [mov,mp4,m4a,3gp,3g2,mj2 @ 0xaf467200] stream 0, timescale not set
07-16 22:28:00.388 802-812/system_process I/art: Background partial concurrent mark sweep GC freed 107225(6MB) AllocSpace objects, 27(1804KB) LOS objects, 31% free, 34MB/50MB, paused 1.903ms total 174.519ms
07-16 22:28:00.396 263-1152/? I/FFmpegExtractor: adjust mime(video/mp4 -&gt; audio/mp4a-latm)
07-16 22:28:00.396 263-1152/? D/FFmpegExtractor: suppoted codec(aac) by official Stagefright
07-16 22:28:00.397 263-1152/? D/FFmpegExtractor: ffmpeg detected media content as 'audio/mp4a-latm' with confidence 0.08
07-16 22:28:00.449 263-1151/? I/FFmpegExtractor: android-source:0xb5fa20c0
07-16 22:28:00.454 263-1151/? I/FFmpegExtractor: adjust mime(video/ffmpeg -&gt; audio/ffmpeg)
07-16 22:28:00.454 263-1151/? D/FFmpegExtractor: suppoted codec(aac) by official Stagefright
07-16 22:28:00.454 263-1151/? D/FFmpegExtractor: ffmpeg detected media content as 'audio/ffmpeg' with confidence 0.08
07-16 22:28:00.777 264-264/? E/installd: cannot create dir '/mnt/expand/db59b29d-f2da-4ea1-8405-330ab4baae72/user/10/com.noodlecake.altosadventure': File exists
07-16 22:28:00.781 264-264/? E/installd: cannot create dir '/mnt/expand/db59b29d-f2da-4ea1-8405-330ab4baae72/user/11/com.noodlecake.altosadventure': File exists
07-16 22:28:00.784 2217-2217/com.google.android.gms.persistent E/ExecutionCriteria: Package unavailable for task: endpoint='com.google.android.apps.photos/.metasync.periodic.MetaSyncGcoreGcmTaskService'
                                                                                    tag='PeriodicLocalMetaSyncTask' : [PENDING] u0
                                                                                    Next execution: [early=5380s, expires=16180s], p=21600s/f=10800s.
01-01 00:00:00.000 0-0/? E/Internal: device offline
Turns out the adopted storage is corrupted. Fixed by running FSCK after unmounting it first from storage option menu/setting

fsck.f2fs /dev/block/dm-0