Ilya114 / Box64Droid

Running x86_64 applications on Android
GNU General Public License v3.0
833 stars 65 forks source link

SERIOUS BUG: PERMANENT DATA LOSS!!! #97

Closed saffahyjp closed 5 months ago

saffahyjp commented 5 months ago

I am a user of Termux and proot-distro, and use ubuntu distro as my main working environment on my tablet. As this project seems awesome, I downloaded the install script and tried to install a non-root version. To my big suprise, after the installation, all data in my Ubuntu environment just disappeared.

I checked the script and easily found the reason: https://github.com/Ilya114/Box64Droid/blob/main/scripts/non-root/install#L22

proot-distro remove ubuntu &>/dev/null

WHY DO YOU ASSUME THE UBUNTU DISTRO MUST BE CREATED BY THIS PROJECT??? WHY DO YOU JUST SILENTLY REMOVE IT??? WHY??????

I also did not receive any warning about this risk from the project README, or from the installer prompts. The script just wiped away my rootfs.

There would be a lot of better ways, for example:

  1. Do not use the ubuntu distro directly. Copy ubuntu.sh as a new name (e.g. ubuntu-box64droid.sh) and do whatever you want with the new distro name.
  2. Or, you can alias the installation to be a name different from ubuntu. proot-distro already provides this functionallity as well.
  3. Or, at least you can prompt the user whether to remove "the existing installation" before actually removing it.

If any of the above had been done, my data would not be lost. *However, for now, the script is just equivalent to performing `rm -rf /` on my working environment.**

I cannot believe this happens on a project which receives 600+ stars and claims "stable".

PLEASE, seriously consider this defect and fix it ASAP. At least you should add a warning message in the README.

Ilya114 commented 5 months ago

I checked the script and easily found the reason: https://github.com/Ilya114/Box64Droid/blob/main/scripts/non-root/install#L22

Nobody told me there was anything wrong with this, Ubuntu 22.04 using and old ver removing when reinstalling

I also did not receive any warning about this risk from the project README, or from the installer prompts. The script just wiped away my rootfs.

In fact, the script does not imply that you are using your rootfs before installing box64droid, the readme says that you are using ubuntu 22.04

If any of the above had been done, my data would not be lost. However, for now, the script is just equivalent to performing rm -rf /* on my working environment. I cannot believe this happens on a project which receives 600+ stars and claims "stable". PLEASE, seriously consider this defect and fix it ASAP. At least you should add a warning message in the README.

I doesnt have much time to work on project, but, will fix this issue today, thanks

Ilya114 commented 5 months ago

Fixed