ksauraj / jee_counsellor

"Introducing jee_counsellor - a tool to display colleges based on Jee Mains rank. Get personalized informations based on your rank and make informed decisions.
GNU General Public License v3.0
13 stars 8 forks source link

Tool fails due to permission elevation #24

Closed TheDarkW3b closed 7 months ago

TheDarkW3b commented 7 months ago

When opening an HTML file through Termux on an Android device, you may encounter permission issues related to the Termux sandbox environment and the security policies of the Chrome browser.

Termux operates within a restricted environment on Android, and certain actions that require broader permissions are restricted.

So this line eventually fails(it reaches the last case in android as both above conditions becomes false): image


Due to permission, one just can't hit the following url content://com.termux.files/data/data/com.termux/files/home/jee_counsellor/output/<fileName>.html


Security Policies of Chrome:

ksauraj commented 7 months ago

Actually you can move files to ~/storage/shared/some_dir . For this you just need to give termux storage permission via this command termux-setup-storage Screenshot_2024-01-23-23-10-49-05_84d3000e3f4017145260f7618db1d683

Trying doing this and most probably it will work.

TheDarkW3b commented 7 months ago

termux-setup-storage doesn't work for me. I did it by implementing a local webserver. If you agree assign it to me under iwoc2024

ksauraj commented 7 months ago

termux-setup-storage doesn't work for me. I did it by implementing a local webserver. If you agree assign it to me under iwoc2024

Okay we can use server method for now( we might replace it later ). I'm assigning this for you under IWOC2024

TheDarkW3b commented 7 months ago

I think it should be labelled as hard. Finding the issue is a work in itself and then looking/implementing a optimized fix. Termux users can employ to achieve similar results without introducing new complexities such as allowing for storage and haven't used any third party library(which seems a lot of concern for you). Please analyse the PR and let me know

ksauraj commented 7 months ago

I think it should be labelled as hard. Finding the issue is a work in itself and then looking/implementing a optimized fix. Termux users can employ to achieve similar results without introducing new complexities such as allowing for storage and haven't used any third party library(which seems a lot of concern for you). Please analyse the PR and let me know

You are right, I labelled it as hard. Sorry for inconvenience caused.