Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Incorrect File Size Calculation in Files App (Uses 1:1000 Instead of 1:1024)

  • /e/ version: 2.4-t
  • Device model(s): beyond2lte
  • Developer mode enabled: yes
  • Device rooted: no
  • Trackers blocker enabled: yes

Summary

The file size calculation in the Files app on Android /e/OS is incorrect, using 1:1000 instead of the standard 1:1024, resulting in wrong file size displays.

The problem

Steps to reproduce

  1. Open the Files app in /e/OS.
  2. Select any file (image, video, document, etc.).
  3. Observe the displayed file size.
  4. Compare the displayed size with the actual size (calculated using 1:1024).

What is the current behavior?

File sizes are calculated using the 1:1000 ratio (e.g., 1 KB = 1000 bytes, 1 MB = 1000 KB), which results in an incorrect display of file sizes.

What is the expected correct behavior?

File sizes should be calculated using the 1:1024 ratio (e.g., 1 KB = 1024 bytes, 1 MB = 1024 KB), which is the standard method for file size calculation.

Technical informations

Relevant logs (adb logcat)

Relevant screenshots

Screenshot_20241002-184158_Files

Solutions

Workaround

Possible fixes

Edited by Žroutík