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

Install to external storage (SD card) #50

Closed
Rikk opened this issue Oct 29, 2019 · 11 comments
Closed

Install to external storage (SD card) #50

Rikk opened this issue Oct 29, 2019 · 11 comments

Comments

@Rikk
Copy link

Rikk commented Oct 29, 2019

Is there a way in the app to force installation to external storage (SD card)?

Traditionally I used package manager pm install -s in order to install an app directly into extSD. It is also possible for installing these bundle split apks? Could you please implement an option in SAI app?

Thank you!

@Aefyr
Copy link
Owner

Aefyr commented Oct 29, 2019

Does setting install location to prefer external not work? If so, I don't think forcing it would be a good idea since there must be a reason Android doesn't want to install app to external storage.

@Rikk
Copy link
Author

Rikk commented Oct 29, 2019

Looking at su logs, I see SAI relies on --install-location parameter, which doesn't exist in the pm of my Android 5. According to the help of pm, -s parameter is the one that installs on SD. Therefore, it always install into internal.

pm install-create -r --install-location 2 -i 'com.aefyr.sai'
�MError: java.lang.IllegalArgumentException: Unknown option --install-location

@Aefyr
Copy link
Owner

Aefyr commented Oct 29, 2019

Does rootless mode not work on your device? In rootless mode, install location is supported on Android 5

@Rikk
Copy link
Author

Rikk commented Oct 29, 2019

Doesn't work...

Your ROM is incompatible with rootless installer. Try selecting another installer in SAI settings.

Other than this error, it also leaves a tmp folder in /data/app

@Rikk
Copy link
Author

Rikk commented Oct 30, 2019

Could you please make a test build that uses pm install-create -r -s [...] instead of pm install-create -r --install-location 2 [...]?

@Aefyr
Copy link
Owner

Aefyr commented Nov 2, 2019

Well, I made an option to enter custom install-create command in the Super Secret Settings (Which you can access by tapping SAI logo on about screen 3+ times and then long-tapping it). Here's a debug build (inside a ZIP because GitHub doesn't allow attaching APKs directly), you can try entering pm install-create -r -s there
app-fdroid-debug.zip

@Aefyr
Copy link
Owner

Aefyr commented Nov 2, 2019

You should also provide -i com.aefyr.sai.fdroid argument as well because currently rooted/Shizuku installer in SAI relies on the ACTION_PACKAGE_ADDED broadcast and checks the installer app package there to determine when an app has been installed, so it would hang forever without that argument.

In the build above however there's a bug that I've just found and fixed which would cause it to accept a ACTION_PACKAGE_ADDED event when installer app is null, so installation without that argument works in that build.

@Rikk
Copy link
Author

Rikk commented Nov 3, 2019

This is not related to SAI app...
Weirdly, now I'm only getting this error when using pm install-create -s (I also tested in command line). It only happens when -s parameter is used.

Error: java.lang.IllegalStateException: ☃No storage with enough free space; res=-1

Granted, I remember it didn't trigger error some other time I tried the command. Dunno what is causing it...

@Aefyr
Copy link
Owner

Aefyr commented Nov 3, 2019

Android really doesn't want you to install that app to external storage I guess

@Rikk
Copy link
Author

Rikk commented Nov 3, 2019

Android really doesn't want you to install that app to external storage I guess

Not related to the app. Just pm install-create -s on command line also errors out. Without -s no error. Something is strange about my "pm"

@github-actions
Copy link

github-actions bot commented Jan 3, 2020

This issue hasn't had any activity for the last 60 days and will be automatically closed in 7 days from now

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

No branches or pull requests

2 participants