opengapps-app-support icon indicating copy to clipboard operation
opengapps-app-support copied to clipboard

Show space available on /system

Open mfonville opened this issue 8 years ago • 4 comments
trafficstars

Not every user knows how large their /system partition is.

We could indicate the current space used and available on /system just like Android itself can show about disk-usage.

UI:

  • a multi-colored bar that indicates 3 types: used by ROM + used by GApps + free
  • maybe (tooltip) text with human readable size info

Backend:

  • fetch partition size, used space and free space of /system/
  • check existence of /system/etc/g.prop if it exists and indicates with prop-values that Open GApps installed, check for /system/addon.d/70-gapps.sh and collect the filepaths listed in list_files.
  • calculate the total filesize of these GApps-related files
  • total used space minus these GApps filesize => used by ROM size

mfonville avatar Dec 16 '16 10:12 mfonville

By detecting the available storage, the .APK can automatically select the largest possible package variant to install and mark it as detected if no other OpenGApps are already installed.

NatoBoram avatar Dec 20 '16 09:12 NatoBoram

@NatoBoram unfortunately we cannot predict from the app (yet) how large the install would be; because we don't know which dpi-variants will be installed each for each app, or whether the user uses a gapps-config file.

mfonville avatar Dec 20 '16 09:12 mfonville

It is possible to get the DPI using DisplayMetrics, and it is safe to assume that the user will not use a gapps-config file if it doesn't know the size of its own /system partition. I think you can do it :)

NatoBoram avatar Mar 21 '17 04:03 NatoBoram

This was a interesting Information. Any actually Status?

Revan335 avatar Apr 14 '18 12:04 Revan335