Discussion:
I need help from experts to understand Android filesystem permissions
(too old to reply)
Andrew
2024-08-04 20:38:45 UTC
Permalink
I need help from experts to understand Android permissions where, by
design, everything I put on my Android phones go where I want them to go.

That means I create a 0000 directory on my internal sdcard storage such
that the path to all my folders & files in internal storage are always
/storage/emulated/0/0000/{path to my internal storage folders and files}

That means I format my portable storage sdcard to 0000-0001 and I create a
top-level directory called 0001 such that I always know the path to files
/storage/0000-0001/0001/{path to my external storage folders and files}

Today I installed a free open source VPN client on my Android 13 Samsung.
<https://play.google.com/store/apps/details?id=de.blinkt.openvpn>

VPN needs a text configuration file, so I picked up the config from here.
<https://www.freeopenvpn.org/>
Specifically, I chose the UDP free open VPN text configuration file.
<https://www.freeopenvpn.org/ovpn/USA_freeopenvpn_udp.ovpn>
Which requires a username/password of the format freeopenvpn/680025300
<Loading Image...>
So I added this auth command into the free openvpn configuration file.
auth-user-pass //storage//0000-0001//0001//vpn//passwd.txt
And into that passwd.txt file I added the two lines for username/password.
freeopenvpn
680025300

All this works just fine on Windows, with the exception of the syntax:
auth-user-pass C:\\tmp\\vpn\\passwd.txt

The problem is that I can't get the VPN app to look in the vpn folder.
It only looks at the top level internal or external sdcard.

The VPN app isn't asking for any permissions other than for notifications.
But it won't look in the desired vpn folder for the vpn text config file.

Why not?
Why should I have to pollute my Android top-level sdcard file system?

This makes a mess of the file system.

Do you use VPN on Android?
How do you get the VPN client to look in the desired vpn folder for the
text config file?
Andrew
2024-08-06 02:49:23 UTC
Permalink
Post by Andrew
Do you use VPN on Android?
How do you get the VPN client to look in the desired vpn folder for the
text config file?
I solved half the problem by switching to a different opsnvpn VPN client.
<https://play.google.com/store/apps/details?id=net.openvpn.openvpn>
That VPN client has no problem reading a configuration text file from
/storage/0000-0001/0001/vpn/config/{all my text config files put here}

So now the only issue I have is getting Android to honor the uname/passwd
file specified in the openvpn config auth-user-pass directive.

For Windows, this directive works to read the username & password file:
auth-user-pass C:\\tmp\\vpn\\passwd.txt
Where "passwd.txt" consists of two lines, the username & the password:
freeopenvpn
680025300
Assuming that's the current password, which changes a few times a day.
<https://i.postimg.cc/QdqLKX53/freeopenvpn.jpg>

I can't get the auth-user-pass directive to work yet on Android though.
auth-user-pass //storage//0000-0001//0001//vpn//passwd.txt

If anyone has this problem resolved, please let me know how you did it.
Loading...