nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.16k stars 65 forks source link

Can't download bootstrap #259

Closed KiN4Tec closed 1 year ago

KiN4Tec commented 1 year ago

I have a Galaxy F13

When i open the app for a first time it asks to download a bootstrap file, specifically "bootstrap-arm.zip" But when i entered the URL via a browser i noticed that the file is actually called "bootstrap-aarch64.zip"

I can't seem to be able to get it to the app even on a custom (lan ip based) http server.

t184256 commented 1 year ago

That suggests that you have a 32-bit device, which is not supported. The app was supposed to be greyed out in F-Droid if that's the case.

What's your device?

t184256 commented 1 year ago

Oh, sorry, I've missed it, "Galaxy F13". That one should be 64 bit.

I can't seem to be able to get it to the app even on a custom (lan ip based) http server.

And what happens in that case?

KiN4Tec commented 1 year ago

The request just doesn't seem to get sent.

The server in question is a python http.server module server tested with the module's default port (8000) and the http default port (80) and both didn't receive the request.

t184256 commented 1 year ago

And it does when you use a browser?

https://github.com/t184256/nix-on-droid-app/blob/f55587fc9eed7d8a0515f05f0b40a8b0c72c7c66/app/src/main/java/com/termux/app/TermuxInstaller.java#L443 is the place in the code that decides to fetch bootstrap-arm.zip instead of bootstrap-aarch64.zip. We borrow this code from Termux as is.

Do you know of any way to check which ABIs are supported on your device, and whether it's configured to prefer 32-bit over 64-bit?

KiN4Tec commented 1 year ago

And it does when you use a browser?

Yes, it does.

The kernel architecture is armv8l

I did some research, and it turns out it is a 32-bit OS running on a 64-bit CPU, so i see why it is doing that, and i wonder why Samsung has done that.

And indeed, the supported ISAs are armeabi-v7a and armeabi

I should have done that earlier instead of bothering you with this issue, sorry. And now i am stuck with this device until i have a better one (which will be a long time)

Again, sorry for bothering you, and thanks for your help and your very fast response, i really appreciate that ❤️