bhgv / Inferno-OS_Android

an Android port of Inferno OS. it works as a regular Android (> 4.0) app. to build it needs only Android Studio (>3.0) and NDK
73 stars 3 forks source link

Choose inferno filetree path #7

Open sirjofri opened 5 years ago

sirjofri commented 5 years ago

This is a feature request/enhancement. On many current phones there is no way to insert an sdcard due to a missing slot. A possible workaround might be changing the inferno filetree path and recompile the app.

It is possible to store the filetree in other paths. Paths are weird in android, so /storage/emulated/ or /storage/emulated/0/ might work without adjusting the app.

In my opinion a better approach could be creating a dialog where the user can select what path leads to a valid inferno filetree. This way inferno developers can have multiple different versions of inferno, eg. one for daily use and another one for testing. I know this would mean more development in the android app.

A simpler idea would be having a simple text file in some place that exists on all android installations. This file contains only a valid path to a filetree directory. The app would read that file and use that path. I guess this would also be the more "unixish" or "9pish" way.

Please let me know if I can help somehow. Time is always rare, but I see infernos/9ps bright future in many use cases. In any case thank you for this great project!

eekee commented 5 years ago

On Wed, Jan 9, 2019, at 8:51 AM, sirjofri wrote:

This is a feature request/enhancement. On many current phones there is no way to insert an sdcard due to a missing slot. A possible workaround might be changing the inferno filetree path and recompile the app.

I have no slot for an sd card in my Kindle Fire, but Inferno installs and runs no problem. Are you confused by the path? In Android, /sdcard is internal storage. Wonderful things, these commercial systems! A less illogical path might be /storage/emulated/0 or /storage/emulated/legacy, both of which should both be the same as /sdcard (I think), but as long as they're 3 levels deep with long names I'll keep using /sdcard!

sirjofri commented 5 years ago

That is indeed confusing... Then I can install the filetree in /storage/emulated/0? That's so weird... I will try it out and then close this issue. Thank you

sirjofri commented 5 years ago

Well, it's weird, but it works. Thank you for pointing out. Once I figured out how to change the DPI/scale of the UI I can use inferno on my phone-without-sdcard.

Is this issue still relevant? Maybe just adding the other possible paths to the documentation/app will be fine?

sirjofri commented 5 years ago

Updated the description. Thank you eekee

eekee commented 5 years ago

Welcome. :)

Is /sdcard (the directory) really not present on your phone? All my devices have /sdcard as a link to one of the other two, except the Android 4 device.

My Android 4 device has /sdcard as a symlink to /storage/sdcard0, but it's still internal storage. (There is currently no physical SD card inserted, but Inferno runs just fine.) It doesn't have /storage/emulated.

I don't know what to suggest, except "keep /sdcard in the list of possibilities." There's no harm in adding others, but just make clear that it's internal storage.

sirjofri commented 5 years ago

Yeah, the sdcard is misleading. Android seems weird and my file browser does not show /sdcard. I guess it's best to explain it a little and add other path variants to the UI. I could try another file browser but to be honest: it works and I don't think it's that important

bhgv commented 5 years ago

inferno os runs using command line parameters from INFERNO_ROOT/lib/starup/cmd_line.txt it supports all inferno parameters including the path to a inferno tree root ("-r").

this file is loaded somewhere near main (don't remember where. sorry. search it by filename)

you may recompile with changed path to your own choise.

or propose a way to search of user space of android supported by all androids. i don't want to use protected space because some phones have problems with rooting.