Skip to content
Commit 179923a6 authored by Felipe Leme's avatar Felipe Leme
Browse files

Improved storage size detection.

The total storage size was calculating by reading and multiplying the
contents of /sys/block/mmcblk0/size and
/sys/block/mmcblk0/queue/hw_sector_size.

On some devices, such calculation doesn't work because:

1.The primary block is not /sys/block/mmcblk0 .
2.The sector size is not the right value to use.

These 2 issues are temporarily addressed by providing alternative
primary blocks and hardcoding the size (512 bytes). In the long term,
the size should be calculated by vold, so each device could provide its
own calculation if necessary.

BUG: 30216622
Change-Id: I8f9a9f4f753d3c92bab9257062b61ed2b9d665c5
Fixes: 24128505
parent fb0ec9de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment