Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Udate Readme and UI #348

Merged
merged 5 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
# Primitive FTPd

FTP server app for android.
FTP and SFTP server app for Android with external SD-card access.

<!--
[![Build Status](https://travis-ci.org/wolpi/prim-ftpd.png)](https://travis-ci.org/wolpi/prim-ftpd)
-->

![Code Size](https://img.shields.io/github/languages/code-size/wolpi/prim-ftpd.svg?style=popout)

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q8TU8ZQX3WV8J)

[<img alt="Get it on F-Droid" height="60" src="https://f-droid.org/badge/get-it-on.png" />](https://f-droid.org/app/org.primftpd)

[<img alt="Get it on Google Play" height="60" src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" />](https://play.google.com/store/apps/details?id=org.primftpd)
How can you use this server on your device to access your files?
* Install from F-Droid
* Download from GitHub releases
* Use SAF
* Use QuickShare

[<img alt="Get it on Amazon" height="45" style="margin-left: 8px;" src="https://images-na.ssl-images-amazon.com/images/G/01/AmazonMobileApps/amazon-apps-store-us-black.png" />](http://www.amazon.com/wolpi-primitive-FTPd/dp/B00KERCPNY/ref=sr_1_1)
| [<img alt="Get it on F-Droid" height="60" src="https://f-droid.org/badge/get-it-on.png" />](https://f-droid.org/app/org.primftpd) | [<img alt="Get it on Google Play" height="60" src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" />](https://play.google.com/store/apps/details?id=org.primftpd) | [<img alt="Get it on Amazon" height="45" style="margin-left: 8px;" src="https://images-na.ssl-images-amazon.com/images/G/01/AmazonMobileApps/amazon-apps-store-us-black.png" />](http://www.amazon.com/wolpi-primitive-FTPd/dp/B00KERCPNY/ref=sr_1_1) |
| --- | --- | --- |

You may download latest development snapshot from [GitHub packages](https://github.com/wolpi/prim-ftpd/packages/).

## Some features:
* Can optionally be started on system boot
Expand All @@ -30,20 +35,29 @@ FTP server app for android.
* Plugins for powertoggles and tasker
* Android 7 Quicksettings Tile
* Optional root access
* Optional support for Android Storage Access Framework to access external sd-card the official way (NOTE requires selecting a directory, not the root of the sd-card).
* Optional support for Android Storage Access Framework to be able to write external SD-cards

## Translation
You may help translate this app in [hosted weblate](https://hosted.weblate.org/projects/pftpd/pftpd/).

## Development Snapshot
You may download latest development snapshot from [GitHub packages](https://github.com/wolpi/prim-ftpd/packages/).
## SFTP vs SCP

When accessing this app's server via scp, it might be necessary for some clients (specific versions of ssh coming with linux distros), to specify option -O.

## Translation
You may help translate this app in [hosted weblate](https://hosted.weblate.org/projects/pftpd/pftpd/).
## Running in the background

Depending your Android version, Android keeps closing apps running in the background. Even if you think you configured explicitly not do this. Please visit https://dontkillmyapp.com/ on more information about battery saving options.

## External SD card read/write access - Android Storage Access Framework

Basically it requires selecting a directory, not the root of the SD-card.

If you select the root of the SD-card, it will work temporarily, but the permission possibly gets revoked and you have to re-select regularly. Revocation can happen as soon as you close the app, or Android kills it within a few hours or days (see above).

Depending on your Android version, permanent access to the root of the SD-card can be possible, if you first select a directory on your SD-card, then select the root of the SD-card. Though after an update, maybe you have to repeat these steps again. You can check whether the permission is stored permanently by visiting Android Settings &#8594; Apps &#8594; Special access &#8594; Directory access. If you see the primitive ftpd app there after you selected the root of the SD-card, there is a chance, that the permission to access the root of the SD-card will not be revoked.

## sftp vs scp
Note: when accessing this app's server via scp, it might be necessary for some clients (specific versions of ssh coming with linux distros), to specify option -O.
## All files access permission

## Permission
Google introduces more and more restrictions to filesystem access to Android. In order to access all
your files through this server you might have to grant it 'all files access' permission in Anroid settings.

Expand All @@ -57,12 +71,6 @@ To be able to allow 'All files access' an app must declare `android.permission.M
Google has a policy wether an app is allowed to declare that permission and be published on Google Play.
As you can see below this app is considered as not compliant.

How can you use this server on your device to access your files?
* Install from f-droid
* Download from GitHub releases
* Use SAF
* Use QuickShare

Mail from Google:

![google play policy mail](fastlane/img/google-play-policy-mail.png)
2 changes: 1 addition & 1 deletion primitiveFTPd/res/layout/block_storage_type.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/safExplain"
android:text="@string/safExplainV2"
/>
<TextView
android:id="@+id/safUriLabel"
Expand Down
5 changes: 2 additions & 3 deletions primitiveFTPd/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,11 @@
<string name="storageTypePlain">Plain old filesystem</string>
<string name="storageTypePlainV2">Plain old filesystem\nGot read-only access? See our <a href="https://www.github.com/wolpi/prim-ftpd/">GitHub page</a>.</string>
<string name="storageTypeRoot">Super user (device must be rooted)</string>
<string name="storageTypeSaf">"Android Storage Access Framework (SAF)
\n(e.g. for card)"</string>
<string name="storageTypeSaf">"Android Storage Access Framework (SAF)\n(e.g. for external SD-card)"</string>
<string name="storageTypeRoSaf">Read only SAF (faster !)</string>
<string name="storageTypeVirtual">Virtual Folders (provides all Storage Types)</string>
<string name="safExplainHeading">How SAF works</string>
<string name="safExplain">Android will ask you to choose a directory. That will be available via server(s). From time to time permission might be revoked and you have to re-select.</string>
<string name="safExplainV2">Android will ask you to choose a directory. That will be available via server(s). Permission gets revoked and you have to re-select regularly? See our <a href="https://www.github.com/wolpi/prim-ftpd/">GitHub page</a>.</string>
<string name="selectedSafUri">Selected SAF URI:</string>
<string name="startServerAndExit">start server only</string>
<string name="startServerAndUi">start with server</string>
Expand Down
1 change: 1 addition & 0 deletions primitiveFTPd/src/org/primftpd/ui/PftpdFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,

// make links clickable
((TextView)view.findViewById(R.id.radioStoragePlain)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView)view.findViewById(R.id.safExplain)).setMovementMethod(LinkMovementMethod.getInstance());

// create sample authorized_keys files
new SampleAuthKeysFileCreator().createSampleAuthorizedKeysFiles(getContext());
Expand Down
Loading