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

Update and fixes #255

Open
wants to merge 24 commits into
base: 2.55
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f846bae
Translate new messages
PhilZ-cwm6 May 24, 2022
743a6b8
Proper error message in Edit Schedule SyncTasks List
PhilZ-cwm6 May 24, 2022
89fe39b
Fix wrap view on error message
PhilZ-cwm6 May 24, 2022
b80dcc0
Simpler code
PhilZ-cwm6 May 24, 2022
a026af7
Add jcifs-ng 2.17 and simplify future updates
PhilZ-cwm6 May 27, 2022
1cf94e5
Upgrade libraries for slf4j 1.7.36 based wrapper
PhilZ-cwm6 May 31, 2022
bea85cf
Simplify jcifs-ng version change updates
PhilZ-cwm6 May 31, 2022
30593fe
Update bouncycastle.org to bcprov-jdk15to18-169
PhilZ-cwm6 Jun 1, 2022
87caa7e
Update help files (english only)
PhilZ-cwm6 Jun 3, 2022
08d18cd
Master is deprecated and only used for hardware interfaces
PhilZ-cwm6 Jun 3, 2022
ded0438
fix some sync defaults were not properly set on sync task creation
PhilZ-cwm6 Jun 3, 2022
cc06b08
Set Filter version 2 as the default file/directory filter for new cre…
PhilZ-cwm6 Jun 3, 2022
7cae713
If Filter v1 is selected, add a warning that it is deprecated
PhilZ-cwm6 Jun 10, 2022
b07b702
Update help file filters section
PhilZ-cwm6 Jun 10, 2022
812a32d
Add help button to toggle filters quick help
PhilZ-cwm6 Jun 10, 2022
26f4527
Proper translation of updated resources
PhilZ-cwm6 Jun 10, 2022
f6f1c72
Enable help button to toggle IP list quick guide
PhilZ-cwm6 Jun 10, 2022
f84d05f
On touch, dismiss filter warning about delete excluded items option
PhilZ-cwm6 Jun 10, 2022
3a06ebe
Adapt filter help text size
PhilZ-cwm6 Jun 10, 2022
6505f90
Replace deprecated fill_parent with match_parent
PhilZ-cwm6 Jun 10, 2022
2380876
Fix history and messages were lost after app reinstall
PhilZ-cwm6 Jun 23, 2022
77750b5
Use "ALL Files Access" permission in Android >= 30
PhilZ-cwm6 Jun 23, 2022
ef67bca
Update Utilities-1.0.19.aar
PhilZ-cwm6 Jun 23, 2022
d39bf64
SMB file listing: properly close JcifsFile
PhilZ-cwm6 Jul 13, 2022
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
17 changes: 10 additions & 7 deletions SMBSync2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
compileSdkVersion 30
buildToolsVersion '30.0.3'

defaultConfig {
applicationId "com.sentaroh.android.SMBSync2"
minSdkVersion 21
// targetSdkVersion 21 //Android 5.0
// targetSdkVersion 23 //Android 6.0
targetSdkVersion 29
// targetSdkVersion 21 //Android 5.0 O
// targetSdkVersion 23 //Android 6.0 M
// targetSdkVersion 29 //Android 10 Q
targetSdkVersion 30 //Android 12 R // Mod 8/x: API 30, manage primary and external storage (Enable ALL_FILE_ACCESS)

//
versionCode 287
Expand Down Expand Up @@ -86,12 +87,14 @@ dependencies {
// implementation files('libs/jcifs-ng-2.1.3-20190427-03.jar')
implementation files('libs/jcifs-ng-2.1.3-20190427-05.jar')
implementation files('libs/jcifs-ng-2.1.4-20200413-02.jar')
implementation files('libs/jcifsngLatest.jar')
implementation files('libs/jcifs-1.3.17_patch.jar')
// implementation files('libs/JcifsFile-1.0.6.jar')
implementation files('libs/JcifsFile-1.0.9.jar')
// implementation files('libs/JcifsFile-1.0.9.jar')
implementation files('libs/JcifsFile-1.10.jar')
// implementation files('libs/slf4j-api-1.7.7.jar')
implementation files('libs/bcprov-jdk15on-158.jar')
// implementation files('libs/WrapperForSlf4j-1.0.2.jar')
implementation files('libs/bcprov-jdk15to18-169.jar')
// implementation files('libs/WrapperForSlf4j-1.7.36.jar')

implementation files('libs/Utilities-1.0.19.aar')

Expand Down
Binary file removed SMBSync2/libs/JcifsFile-1.0.9.jar
Binary file not shown.
Binary file added SMBSync2/libs/JcifsFile-1.10.jar
Binary file not shown.
Binary file modified SMBSync2/libs/Utilities-1.0.19.aar
Binary file not shown.
Binary file removed SMBSync2/libs/WrapperForSlf4j-1.0.2.jar
Binary file not shown.
Binary file added SMBSync2/libs/WrapperForSlf4j-1.7.36.jar
Binary file not shown.
Binary file removed SMBSync2/libs/bcprov-jdk15on-158.jar
Binary file not shown.
Binary file added SMBSync2/libs/bcprov-jdk15to18-169.jar
Binary file not shown.
Binary file modified SMBSync2/libs/jcifs-1.3.17_patch.jar
Binary file not shown.
Binary file added SMBSync2/libs/jcifsngLatest.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion SMBSync2/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>


<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
### Change execution order
You can change the order by pressing and holding an item or holding down the "icon" on the left side of the screen and moving it up or down.
You cannot change the order if it is selected. Please deselect them before reordering.
You cannot change the order if it is selected. Please unselect teh tasks before rearranging them.

### Remove from list
Tap the checkbox or task list name to select it, then tap the trash can icon at the bottom of the screen.

### Add to list
Tap the Add icon at the bottom left corner of the screen.
Tap the Add icon at the bottom left corner of the screen to add a sync task.

### Manuals
[FAQs](https://sentaroh.github.io/Documents/SMBSync3/SMBSync3_FAQ_EN.htm)
Expand Down
16 changes: 11 additions & 5 deletions SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_internal.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
### List Directories
When you press the list button, selectable directories will be displayed, so select it. Tap the directory name to open a subdirectory.
When you press the list button, selectable directories will be displayed. Tap a directory name to browse subdirectories.
Tap Select to specify the current directory as a source or target directory
Tap Create to create a custom directory

### Directory
You can enter a directory name directly. If you specify a non-existent directory, it will be created when the synchronization is executed.
%YEAR%, %MONTH%, %DAY% and %DAY-OF-YEAR% can be used as directory names. The keywords are converted into the year, month, and day on which the sync started.

### Append the photo/video shooting time/date to the directory name
**These options are displayed only when the sync type is Copy/Move.**
If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modified time of the file.
If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modification time of the file.

### Directory
Please enter the target or source directory. If you specify a directory that does not exist in the target, it will be created during synchronization.


**<u>The following options are displayed only when the sync type is Archive.</u>**

### If the date and time cannot be determined by EXIF data, display a confirmation message.
If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modified time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modification time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.

### Archive files if…
Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modified time if it is not possible to acquire the timestamp from the EXIF header.
Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modification time if it is not possible to acquire the timestamp from the EXIF header.

- Any date (all)
Archive all pictures/videos
Expand Down Expand Up @@ -55,7 +61,7 @@ Append 001-999
If checked, the file name of the archived file will be changed based on your selected criteria. You can append the date and time in the file name "File name template".

- %ORIGINAL-NAME%
Will be replaced by original file name during archive archiving (Ex. DSC_0001)
Will be replaced by original file name during archiving (Ex. DSC_0001)
- %DATE%
Will be replaced by the shooting date.(Ex. 2018-01-01)
- %TIME%
Expand Down
25 changes: 11 additions & 14 deletions SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_sdcard.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
### List Directories
When you press the list button, selectable directories will be displayed, so select it. Tap the directory name to open a subdirectory.
When you press the list button, selectable directories will be displayed. Tap a directory name to browse subdirectories.
Tap Select to specify the current directory as a source or target directory
Tap Create to create a custom directory

### Directory
You can enter a directory name directly. If you specify a non-existent directory, it will be created when the synchronization is executed.
%YEAR%, %MONTH%, %DAY% and %DAY-OF-YEAR% can be used as directory names. The keywords are converted into the year, month, and day on which the sync started.

### Append the photo/video shooting time/date to the directory name
If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modified time of the file.
**These options are displayed only when the sync type is Copy/Move.**
If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modification time of the file.

### Directory
Please enter the target or master directory. If you specify a directory that does not exist in the target, it will be created during synchronization.
Please enter the target or source directory. If you specify a directory that does not exist in the target, it will be created during synchronization.

### Select SDCARD
Select the SDCARD root directory to get access to SDCARD.
Select the SDCARD root directory to get access to the SDCARD.

**The following options are displayed only when the sync type is Archive.**
**<u>The following options are displayed only when the sync type is Archive.</u>**

### If the date and time cannot be determined by EXIF data, display a confirmation message.
If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modified time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modification time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.

### Archive files if…

Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modified time if it is not possible to acquire the timestamp from the EXIF header.
Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modification time if it is not possible to acquire the timestamp from the EXIF header.

- Any date (all)
Archive all pictures/videos
Expand All @@ -39,11 +41,9 @@ Archive only files with a shooting date older than the current time by 180 days
Archive only files with a shooting date older than the current time by 1 year or more

### Rename files when archiving and store them in a specified directory.

If checked, the file will be renamed when it is archived. You can use the "File name template" to add date and time to the file name. You can also create a directory to store the files. To store files in a directory, enable "Save to directory when archiving".

### Increment file names by appending

Add an order number to the file name when archiving.

- Do not change
Expand All @@ -60,23 +60,20 @@ Append 001-999
Append 000001-999999

### Change the name of the file before archiving it in the target folder.

If checked, the file name of the archived file will be changed based on your selected criteria. You can append the date and time in the file name "File name template".

- %ORIGINAL-NAME%
Will be replaced by original file name during archive archiving (Ex. DSC_0001)
Will be replaced by original file name during archiving (Ex. DSC_0001)
- %DATE%
Will be replaced by the shooting date.(Ex. 2018-01-01)
- %TIME%
Will be replaced by the shooting time.(Ex. 13:01:10)
The last line in the screen displays how your target folder and file name will look like once archived.

### Create a directory based on the shooting date to store the files.

Creates a time stamped directory where to store the archived files.

### Directory template

Enter the patterns to use to rename the directory to be created (exp. DIR-% YEAR% -% MONTH% and so on). By pressing the patterns buttons, you can enter keywords behind the cursor.

- %YEAR%
Expand Down
41 changes: 23 additions & 18 deletions SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_smb.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
### Search SMB server
Scans the network to find available SMB server
Scans the network to find available SMB servers

### Server host name/IP address
Specify the SMB server name or the IP address
Specify the SMB server name or its IP address

### SMB Protocol
You can specify the SMB protocol.
You can specify the SMB protocol.
SMB V2 and V2/3 options are based on jcifs-ng project. Select an older version (v2.xx) only if you expierience issues with a newer jcifs-ng version update
SMB V1 is considered highly insecure and kept only for compatibility with old legacy servers
SMB V2 will only connect to SMB2 servers
SMB V2/3 will connect to SMB2 and 3 servers, up to SMB v3.11 versions

- Use SMB V1
- Use SMB V2 (2.01)
- Use SMB V2 (2.11)
- Use SMB V2/3 (2.12)
- Use SMB V2/3 (2.14)
- Use SMB V2/3 (2.14)
- Use SMB V2/3 (2.17)

### Specify port number
Specify the port number if different from default. If left empty, SMBSync2 will try to connect to the default standard port numbers 139 and 445.
Expand All @@ -20,7 +25,7 @@ Specify the port number if different from default. If left empty, SMBSync2 will
Must be completed if required by the server.

### User name
User account name to connect to the host. A Microsoft account cannot be used with SMBSync2. Please create a local account and use it.
User account name to connect to the host. A Microsoft account cannot be used with SMBSync2. Please create a local SMB account on the server and use it.

### Password
Account password to connect to the host.
Expand All @@ -29,26 +34,31 @@ Account password to connect to the host.
Connects to the specified host and list all available shares for the account.

### List Directories
When you press the list button, selectable directories will be displayed, so select it. Tap the directory name to open a subdirectory.
When you press the list button, selectable directories will be displayed. Tap a directory name to browse subdirectories.
Tap Select to specify the current directory as a source or target directory
Tap Create to create a custom directory

### Directory
You can enter a directory name directly. If you specify a non-existent directory, it will be created when the synchronization is executed.
%YEAR%, %MONTH%, %DAY% and %DAY-OF-YEAR% can be used as directory names. The keywords are converted into the year, month, and day on which the sync started.

### Append the photo/video shooting time/date to the directory name

**These options are displayed only when the sync type is Copy/Move.**
If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modified time of the file.
If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modification time of the file.

### Directory
Please enter the target or source directory. If you specify a directory that does not exist in the target, it will be created during synchronization.

### Select SDCARD
Select the SDCARD root directory to get access to the SDCARD.

**<u>The following options are displayed only when the sync type is Archive.</u>**

### If the date and time cannot be determined by EXIF data, display a confirmation message.

If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modified time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modification time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.

### Archive files if…

Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modified time if it is not possible to acquire the timestamp from the EXIF header.
Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modification time if it is not possible to acquire the timestamp from the EXIF header.

- Any date (all)
Archive all pictures/videos
Expand All @@ -66,11 +76,9 @@ Archive only files with a shooting date older than the current time by 180 days
Archive only files with a shooting date older than the current time by 1 year or more

### Rename files when archiving and store them in a specified directory.

If checked, the file will be renamed when it is archived. You can use the "File name template" to add date and time to the file name. You can also create a directory to store the files. To store files in a directory, enable "Save to directory when archiving".

### Increment file names by appending

Add an order number to the file name when archiving.

- Do not change
Expand All @@ -87,23 +95,20 @@ Append 001-999
Append 000001-999999

### Change the name of the file before archiving it in the target folder.

If checked, the file name of the archived file will be changed based on your selected criteria. You can append the date and time in the file name "File name template".

- %ORIGINAL-NAME%
Will be replaced by original file name during archive archiving (Ex. DSC_0001)
Will be replaced by original file name during archiving (Ex. DSC_0001)
- %DATE%
Will be replaced by the shooting date.(Ex. 2018-01-01)
- %TIME%
Will be replaced by the shooting time.(Ex. 13:01:10)
The last line in the screen displays how your target folder and file name will look like once archived.

### Create a directory based on the shooting date to store the files.

Creates a time stamped directory where to store the archived files.

### Directory template

Enter the patterns to use to rename the directory to be created (exp. DIR-% YEAR% -% MONTH% and so on). By pressing the patterns buttons, you can enter keywords behind the cursor.

- %YEAR%
Expand Down
Loading