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

File shuttle not available #97

Open
RufusgrNtham opened this issue Dec 20, 2019 · 13 comments
Open

File shuttle not available #97

RufusgrNtham opened this issue Dec 20, 2019 · 13 comments

Comments

@RufusgrNtham
Copy link

Hi. Using shelter on a one plus pro 7. Set up was fine but after a period of time the file shuttle option has greyed out. What am I doing wrong? I want to be able to transfer some files from the work profile to the main profile but can't enable Files to be able to see them. Please let me know if you need further information. Many thanks.

@RufusgrNtham
Copy link
Author

When I first installed shelter I could enable file shuttle and move files between personal and work profile. Now the option under settings is permanently greyed out meaning I now have files stranded in my work profile. What will happen if I uninstall shelter. Will the work profile files be lost or will they be available?

@sunnaryt
Copy link

If you are on android 10, the feature is unnecessary since this functionality is default.

@MaximilianBecker
Copy link

I am also using Android 10 (Mate 20 pro) but I don't find a way to transfer files. I can share them to apps in my work profile, but I cannot just save them to the storage. Any suggestions?

@DBenette
Copy link

Also having the same problem using Android 10 - Oneplus 7 Pro. File Shuttle was working before updating from Android 9 to 10. Now it's not working at all.

For example, I used to use the work profile app 'Files' which used to show the internal storage for both the regular profile and the work profile and I could copy from one to the other, now it doesn't show the regular profile so no way to copy to/from within the phone. It also doesn't show the work profile when the phone is plugged into a computer so there is not way to get files on / off of it that way either.

@Martinius
Copy link

Martinius commented Jan 24, 2020

If you are on android 10, the feature is unnecessary since this functionality is default.

Could you elaborate? I do not see any option to do that. A google search did not help either. Thanks for your help.

Edit: I found the piece of code that is responsible for this effect

// Disable FileSuttle on Q for now // TODO: Refactor FileShuttle and remove this if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { mPrefCrossProfileFileChooser.setEnabled(false); }

Here is the link to the file

I will try to find out what has to be changed in FileShuttle so it works for new Android versions. Maybe I can do a pull request.

@letkan
Copy link

letkan commented Jan 27, 2020

Edit: I found the piece of code that is responsible for this effect

// Disable FileSuttle on Q for now // TODO: Refactor FileShuttle and remove this if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { mPrefCrossProfileFileChooser.setEnabled(false); }

Here is the link to the file

I will try to find out what has to be changed in FileShuttle so it works for new Android versions. Maybe I can do a pull request.

Please post back if you figured this out, Shuttle is kind of broken on Android 10

@Martinius
Copy link

Edit: I found the piece of code that is responsible for this effect
// Disable FileSuttle on Q for now // TODO: Refactor FileShuttle and remove this if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { mPrefCrossProfileFileChooser.setEnabled(false); }
Here is the link to the file

I will try to find out what has to be changed in FileShuttle so it works for new Android versions. Maybe I can do a pull request.

Please post back if you figured this out, Shuttle is kind of broken on Android 10

I will try to do so as soon as there is time. To be noted: File Shuttle was intentionally disabled for Android 10 by the author of shelter. I am guessing that in Android Q (aka 10) the OS interface has changed and the code has to be adjusted to it.

@riedel
Copy link

riedel commented Feb 19, 2020

I switched to Island where this is working in q. One could do a careful code review in the differences.

@Martinius
Copy link

I switched to Island where this is working in q. One could do a careful code review in the differences.

I dont think it is that easy :/ In the last two weeks I tried to find out why the FileShuttle is not working any more and I made some small progress. It seems that Shelter fails to start the required URI-resolver service in the work profile. Therefore it is not possible to index the filesystem in the workprofile.

Shelter uses the DummyService service to control all task in the work profile with Android system Intents.

    Log.e("Intent", intent.getAction());
        if (START_SERVICE.equals(intent.getAction())) {
            actionStartService();
        } else if (TRY_START_SERVICE.equals(intent.getAction())) {
            // Dummy activity with dummy intent won't ever fail :)
            // This is used for testing if work mode is disabled from MainActivity
            setResult(RESULT_OK);
            finish();
        } else if (INSTALL_PACKAGE.equals(intent.getAction())) {
            actionInstallPackage();
        } else if (UNINSTALL_PACKAGE.equals(intent.getAction())) {
            actionUninstallPackage();
        } else if (FINALIZE_PROVISION.equals(intent.getAction())) {
            actionFinalizeProvision();
        } else if (UNFREEZE_AND_LAUNCH.equals(intent.getAction()) || PUBLIC_UNFREEZE_AND_LAUNCH.equals(intent.getAction())) {
            actionUnfreezeAndLaunch();
        } else if (PUBLIC_FREEZE_ALL.equals(intent.getAction())) {
            actionPublicFreezeAll();
        } else if (FREEZE_ALL_IN_LIST.equals(intent.getAction())) {
            actionFreezeAllInList();
        } else if (START_FILE_SHUTTLE.equals(intent.getAction()) || START_FILE_SHUTTLE_2.equals(intent.getAction())) {
            Log.e("Error", "Trying to Start FileShuttle" );
            actionStartFileShuttle();
        } else if (SYNCHRONIZE_PREFERENCE.equals(intent.getAction())) {
            actionSynchronizePreference();
        } else {
            finish();
        }

I see the Intents for START_SERVICE and TRY_START_SERVICE but not the Intent for the Start of Fileshuttle (BTW I uncommented the disabelment of Fileshutle in Android Q). Since this happens in during the doBindService function of the CrossProfileDocumentsProvider service, I think the problem has to be somewhere in this part of the app. I will look into it a bit more this weekend.

Best regards

@RufusgrNtham
Copy link
Author

Hello all who have commented. Some have suggested switching to Island. However my question is if I uninstall shelter what will happen to the files that are currently in the work profile. Will they be deleted or will they become visible to the main storage. If deleted then I need a solution to back them up beforehand. Thank you in advance for any suggestions.

@Martinius
Copy link

Hello all who have commented. Some have suggested switching to Island. However my question is if I uninstall shelter what will happen to the files that are currently in the work profile. Will they be deleted or will they become visible to the main storage. If deleted then I need a solution to back them up beforehand. Thank you in advance for any suggestions.

Shelter controls your work profile. This means that once you remove Shelter your workprofile will also be removed. If you want to save the data in your work profile, I would recommend installing something like Nextcloud in your work profile via shelter and sync them into the cloud.

Best regards

@matu3ba
Copy link

matu3ba commented Jun 10, 2020

@RufusgrNtham Please change title to "on Android 10".

@mcgyver83
Copy link

I have the same issue:Shelter on Windows 10 cannot enable file shuttle so I cannot move files from base profile into work profile.

"File shuttle" is disabled, greyed not selectable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants