Why bowsers cannot download files to storage (path looks /dev/null/Download)?


Question

The phone is Samsung Galaxy Note N7000. For the last few years I use NightOwl custom rom (Android 7). I do not remember when I faced with this problem, maybe after repartitioning with REPIT (but author says that probably not), but now I cannot make photos - photo app says that I need to insert SD card, but I can make photos through the Evernote app. Also in WhatsUp I cannot see photos because my phone cannot download them, and web browsers cannot download any file. But I can install most of the programs, and for example Evernote cache my notes.



Inside recovery mode, in TWRP, I found that I have partition sdcard1 that is 0 bytes in size. Maybe if I remove this partition it will fix my storage problem?







I tried to flash the same ROM again.
I asked in thread about this ROM, but nobody answered. The phone is without external SD card. When in Settings I open Storage - it crash.



logcat -b all | grep -iE 'vold|storage': log.



/proc/last_kmsg and dmesg: log.



mount returned:



rootfs on / type rootfs (ro,seclabel,relatime)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,mode=755,gid=1000)
none on /dev/memcg type cgroup (rw,relatime,memory)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mmcblk0p9 on /system type ext4 (ro,seclabel,noatime,user_xattr,barrier=1,data=ordered)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,data=ordered)
/dev/block/mmcblk0p1 on /efs type ext4 (rw,seclabel,nosuid,nodev,noatime,user_xattr,barrier=1,journal_async_commit,data=ordered)
/dev/block/mmcblk0p10 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=755,gid=1000)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
/dev/block/vold/public:179_11 on /mnt/media_rw/S } M-^^M-~4M-9^DK $t type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/public:179_11 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/fuse on /mnt/runtime/default/S } M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /storage/S } M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/S } M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/S } M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)


blkid:



/dev/block/zram0: UUID="da191bea-c7ca-4b27-af09-ce87c7f99943" TYPE="swap" 
/dev/block/mmcblk0p1: UUID="57f8f4bc-abf4-0000-675f-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p7: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p9: LABEL="system" UUID="da594c53-9beb-f85c-85c5-cedf76546f7a" TYPE="ext4"
/dev/block/mmcblk0p10: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p11: LABEL="S } M-^^M-~4M-9^DK $t" UUID="7F73-0B1A" TYPE="vfat"
/dev/block/mmcblk0p12: UUID="49f005e2-2f62-448b-9ba1-3e4da2ee1b41" TYPE="ext4"


# cat fstab.smdk4210:



# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# data partition must be located at the bottom for supporting device encryption

/dev/block/mmcblk0p9 /system ext4 ro,noatime wait
/dev/block/mmcblk0p7 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check,formattable
/dev/block/mmcblk0p7 /cache f2fs noatime,nosuid,nodev,inline_data,inline_xattr,discard wait,check,formattable
/dev/block/mmcblk0p1 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check,notrim
/dev/block/mmcblk0p10 /data ext4 noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic wait,check,formattable,encryptable=/efs/metadata
/dev/block/mmcblk0p10 /data f2fs noatime,nosuid,nodev,inline_data,inline_xattr,discard wait,check,formattable,encryptable=/efs/metadata
# /dev/block/mmcblk0p12 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait

# vold-managed volumes ("block device" is actually a sysfs devpath)
/devices/platform/dw_mmc/mmc_host/mmc0/mmc0* auto auto defaults voldmanaged=sdcard0:11,nonremovable,noemulatedsd
/devices/platform/s3c-sdhci.2/mmc_host/mmc1* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
/devices/platform/s3c_otghcd/usb* auto auto defaults voldmanaged=usb:auto

# recovery
/dev/block/mmcblk0p5 /boot emmc defaults recoveryonly
/dev/block/mmcblk0p6 /recovery emmc defaults recoveryonly

# zRAM
/dev/block/zram0

Answer


Inside recovery mode, in TWRP, I found that I have partition sdcard1 that is 0 bytes in size. Maybe if I remove this partition it will fix my storage problem?




In TWRP there's also USB OTG which would also be 0 bytes in size. Both are just mount points where external SD card and USB OTG are mounted (if available). This isn't relevant to your problem, neither you can remove this partition (because it's not a partition).



The root cause of problem seems to be the bad filesystem label you set on mmcblk0p11 partition. vold includes filesystem label (or UUID or serial number) in mount path, which the processes are unable to read.



blkid:



dev/block/mmcblk0p11: LABEL="S
}
M-^^M-~4M-9^DK $t" UUID="7F73-0B1A" TYPE="vfat"


mount:



/dev/block/vold/public:179_11 on /mnt/media_rw/S
}
M-^^M-~4M-9^DK $t type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/fuse on /storage/S } M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)


vold:



11-06 02:25:53.173  2901  2968 D VoldConnector: RCV <- {
654 public:179_11 S
}
M-^^M-~4M-9^DK $t
}

11-06 02:25:53.173 2901 2968 D VoldConnector: RCV <- { 656 public:179_11 /mnt/media_rw/S } M-^^M-~4M-9^DK $t }
11-06 02:25:53.174 2901 2968 D VoldConnector: RCV <- { 655 public:179_11 /storage/S } M-^^M-~4M-9^DK $t }


Characters in string: S } M-^^M-~4M-9^DK $t } seem to be non-printable. E.g. ^M denotes Carriage Return which is used with Line Feed to print new line character (next line) on Windows (CR LF).



You can fix the filesystem label using fatlabel from dosfstools or mlabel from mtools. Boot in recovery, un-mount all partitions and do:



~# fatlabel -r /dev/block/mmcblk0p11


Or set label manually:



~# fatlabel /dev/block/mmcblk0p11 sdcard


Or you can format the partition, but it's not clear from your provided information what filesystem it is. I suppose it's FAT32. So either go to Advanced Wipe --> Repair or Change Filesystem, select the partition, select FAT32 (if supported by TWRP) and format. Or from commandline do:



~# mkfs.fat -F32 /dev/block/mmcblk0p11


Or with label:



~# mkfs.fat -n sdcard -F32 /dev/block/mmcblk0p11


Use -F16 option or mkfs.vfat for FAT16 or vFAT filesystems. Generally all use vfat driver.



In all cases make sure to select right partition otherwise YOU MAY GET YOUR DEVICE PERMANENTLY BRICKED.



Or flash factory firmware if available. Note that all data will be erased.


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