Checking SD Card bootloop

simondedmansimondedman Level 1
edited September 2020 in ZenFone 6

My Zenfone 6 has been working great. I have a 400gb SD card in it with 350gb of music and that's been working fine also.

I just decided to restart the phone, and it got into a kind of bootloop:

Phone starts, gets to unlock location, can unlock or leave locked, if locked shows notification

"Checking SanDisk SD Card...

Reviewing current content"

If I unlock it says

"Phone is starting..." with a spinning progress bar.

And after a few minutes, it reboots.

I can boot with the SD card out then put it in while the phone is on but after a few minutes I guess the phone does a check of the SD card and then it reboots.

It seems this is a software bug with how the system deals with SD card content, potentially it has some timeout which causes the reboot if it takes too long?

Please advise if I can generate logs so y'all can fix this because the SD card slot was one of my top 2 purchase reasons for this phone.

Thanks.


Oh p.s. if one clicks "remember me" on the login screen for this forum, logins don't work. Please fix this bug (or remove remember me)

«1

Comments

  • Have you checked the integrity of the file system on the memory card, preferably on your computer?

  • I haven't - anything in particular I should be looking for or tests to run?

    FWIW like I say it was working fine when I inserted it (with all the files already present) then setup my NAS cloud sync software to keep the SD card files synced with my NAS, then indexed the whole thing in my music program. Nothing went wrong at any point until I rebooted. But then maybe that's the point when the OS would check the integrity, and only then?

    Thanks for the input!

  • fsck from util-linux 2.34

    exfatfsck 1.3.0

    Checking file system on /dev/sdb1.

    File system version          1.0

    Sector size                512 bytes

    Cluster size               256 KB

    Volume size                367 GB

    Used space                 345 GB

    Available space             22 GB

    Totally 84823 directories and 63187 files.

    File system checking finished. No errors found.

  • Retried it, still fails. System is booting other stuff in the background e.g. I saw it flash the email icon showing that it was starting or checking gmail, and other services are popping up as they're loaded, but eventually the SD card checking must hit a breakpoint for whatever reason and the phone reboots.


    This process has also switched my smart key from custom back to google assistant. IDK why this would be related but there you go!

  • Other experiment: start phone with 2gb SD card, mostly blank, inserted. Result: works fine, silent notification after bootup is

    "Settings

    SD card

    For transferring photos and media

    Total space: 2.04gb

    EXPLORE EJECT"

    Phone seems to work fine, OS has populated SD card with the system folders it wants.

    Increasingly supports my conclusion that the large volume of files to scan is the cause of the problem.

    Keen to see if someone from ASUS (or otherwise) can verify this, or give me tips for how to generate log files to help confirm this diagnosis so folks can get working on a firmware fix asap.

    Cheers

  • Oh FWIW, not rooted, a week old max, firmware WW_17.1810.1910.73

  • Totally 84823 directories and 63187 files.

    Just curious, why do you have so much directories on your card? More than files...

  • Uh, yeah, good question. I have no idea. Folder structure is

    Music/First Letter/Artist/Album

    e.g.

    Music/A/Apollo 400/Electro Glide In Blue/[tracks]

    So I'm not sure why there would be more folders than files, I'll have a look.

  • Totally 84823 directories and 63187 files.

    Increasingly supports my conclusion that the large volume of files to scan is the cause of the problem.

    I think the same.

    I have two ideas.

    1. Move some of the files from the card to the PC to reduce the number of directories below 65536 and then retest.
    2. Read the thread below to see which application takes up the most space. Maybe it will be the one that works with your songs.


  • Cheers again for your input.

    The SD card had tons of folders autocreated from apps either by this phone or the last, so I cleaned out everything except /Android/data/com.synology.dscloud/files/Music/ which is the music sync folder. Now back to "phone is starting" with SD card icon, aaaaand reboot loop again.

    So it defo seems like an SD card scanning time issue.

    Asus employees, now would be a great time to chime in.

  • @Asus TSD team: link to my other issue, Bluetooth dropping out: https://support.google.com/androidauto/thread/5386001?hl=en


  • I'd be happy to log your phone and see what's going on with Android Auto. I have seen complaints about Bluetooth only connections, and the hardwired version of Android Auto.

    @_jis_ is more experienced than me with Android, I was letting him take the lead on this one. ;) I don't have any good answers on the SD card issue, but we can log that one too. I'll send you a PM in a bit with instructions.

  • _jis__jis_ Level 5
    edited December 2019

    @simondedman

    The SD card had tons of folders autocreated from apps either by this phone or the last, so I cleaned out everything except /Android/data/com.synology.dscloud/files/Music/ which is the music sync folder. Now back to "phone is starting" with SD card icon, aaaaand reboot loop again.

    Please do fsck again, I don't believe you pushed the number of directories by such a cleaning below 65536.

    Eventually you can disable whole /Android/data/com.synology.dscloud/files/Music/ folder from media scanning by creating a blank file named ".nomedia" if your player doesn't rely on Android Media Scanner and support the ability to ignore ".nomedia" files.

  • @LP_ASUS thanks for the PM, reproduced here to keep all the intel in one place:


    *Please be advised, this will log everything on your phone while the app is running. If you are not comfortable with providing us that information, please do not install the logging tool.*

    After installation, reproduce the issue.

    After that, open up the logtool app and click "Capture Log to MTP"

    This might take a few minutes. You should see a dialog box where you can type some feedback, then the device will reboot.

    The log will be saved to the /save_log/ folder, with its own subfolder named after the date of the log.

    You can .zip the folder and send it to me here, or use your preferred method of sharing files. (Google drive, etc)

    Thanks for your help debugging this issue!"


    So the error takes place on my commute which is the only time I drive a sustained amount of time, during which time it's not easy for me to interact with the phone other than one or two clicks. The drive is about 1.5 hours, do you think that this will be a problem in terms of log file size? Presuming it timestamps events, I'll try to remember when the dropouts occur so I/you/anyone has an easier time of narrowing in on the problem. Though there shouldn't be too many actions occurring since, as I say, I won't be interacting with the phone.

    Cheers!

  • That would be a gigantic file, I might recommend against that because it would be hard to share.

    Does this error take 1.5 hours to replicate? Could you sit in the driveway for 5 minutes to simulate driving and have the Bluetooth signal drop?

    I'm not sure how R&D samples the log file, but I know that the log itself can be large when its a big sample, and that can make it tricky to share.

  • @_jis_

    fsck from util-linux 2.34

    exfatfsck 1.3.0

    Checking file system on /dev/sdb1.

    WARN: volume was not unmounted cleanly.

    File system version          1.0

    Sector size                512 bytes

    Cluster size               256 KB

    Volume size                367 GB

    Used space                 344 GB

    Available space             23 GB

    Totally 84439 directories and 62986 files.

    File system checking finished. No errors found.


    So you are.... absolutely correct. Weird that I have so many directories. Back of envelope math would suggest I should have maybe 8000 (10 songs per folder = 6200 with some overhead for artist and letters), so this is 10X more. More investigative work to be done.

  • @LP_ASUS "to simulate driving", haha, I'll move my hands on the wheel and swear at other drivers to make it realistic ;)


    Yeah I'll give it a go. Problem is it can often be 15, 20 minutes before it goes out. But I'll give it a whirl and report back when I'm done. Cheers for the advice. I might also do a quick logfile generation test since if the format is open & editable (xml, txt, e.g.) I can crack it open myself and delete all the unnecessary stuff.

  • @_jis_ looks like the Synology cloudstation app responsible for syncing to the NAS might be the culprit here - within /Music/ there's a hidden .SynologyWorkingDirectory folder which is: 77915 items, totalling 11.4 MiB (11,980,733 bytes)

    Absolutely absurd. The only folder within that is #SynoRecycle. Deleted that, which looks like it's the same few folders copied infinity times, potentially 50% of the folders are a copy of some small notification sounds I synced and removed one, a week ago. Terrible coding from Synology and seemingly I'm not the only one. Good thinking jis for asking about this.


    Used space                 318 GB

    Available space             49 GB

    Totally 6599 directories and 58894 files.

    File system checking finished. No errors found.


    A .nomedia file was somehow created automatically in /Android/data/; should this instead be in /Android/data/com.synology.dscloud/ ?

    Should I delete it and see what happens?

    Thanks again for your input!

  • That looks to have worked a treat. @_jis_ thanks again so much, I'll be having a strongly worded email support ticket exchange with Synology, who seem to be going from weakness to weakness in the last few years, turning working products into buggy messes.


    I think I'll celebrate tonight by sitting in my car and not driving anywhere :)

  • I feel like I'm being trolled for "simulated driving". ;)

This discussion has been closed.