-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Option for Signal install location (internal/external memory) #9015
Conversation
Following https://developer.android.com/guide/topics/data/install-location.html as originally pointed out at https://community.signalusers.org/t/allow-installation-on-external-storage-location-sd-card/2638 Added option to allow the system to install Signal on the external storage.
According to the docs
This suggests hardly anything will be stored on the external storage. Have you tested this PR and have evidence that contradicts that documentation? Signal also falls under the "Applications that should NOT install on external storage" section of the docs as it has several |
The Android documentation is not exhaustive about what 'all private user data' etc. are. Furthermore, there are two options, namely SD card is used as (1) external or (2) internal storage. I am talking right now only about Android 9 now, I haven't tested any other OS. Whilst option (1) may imply (I haven't tested this) that private data is not movable, option (2) allows moving private data to the internal storage on the SD (I have tested this using this workaround). There is a glitch, however: Signal must be freshly installed and moved to the SD space using the system interface before setting up the account. Otherwise, a migration of files (of an already existing account) offered by Android completes, but Signal stops recognising media that were received before the move. And there is a workaround, too: I just made a backup to SD, uninstalled Signal, installed fresh, moved it to SD space, and then restored from the backup. That works fine for already a week. To recap,
=> I guess this request may be closed without merging. |
I've tested this change for several months now (using a local fork, even before this PR) on a Moto G5 first with Android 8.1 (Stock ROM) and then Android 9 (LineageOS) and an "internal storage" SD card. It worked flawlessly the entire time. I can confirm the entire data is moved, not just the .apk file. The Moto G5 Stock ROM only allows moving data to SD card if it is mounted as "internal storage" (due to security/encryption) and if Formatting an SD card as "internal storage" also means that the SD is almost never removed (since all data is encrypted, it is useless without this specific phone or reformatting it and loosing all data). The restarts of services should not be a practical concern in this case. It also seems like the actual behavior differs from the android documentation a bit (exact semantics might to have changed over the years). I will test the restart of the services in a few days with following procedure (is this procedure meaningful?):
If there's anything else that has to be tested, I'm happy to do so. I'm not that familiar with android development, with the codebase or what services are used. As this is a deal-breaker for me because of limited real internal storage, I really hope this PR gets merged. This is such a simple fix for a huge problem. |
Can we please merge the PR? Signal eats internal storage which can be very limited, making the application unusable on old phones. |
I'd like to also ask that the storage thing get fixed. I've got a Samsung Galaxy S7 which has 32GB of internal memory but a 400GB SD. It's sort of ridiculous that with Signal installed I keep running out of space and getting messages from Android that I need to free up storage immediately. |
@sovamind |
On my phone I'm using the SD-card as external storage, so the suggestion of @ssgromov doesn't help me. Signal is using so much space on my phone that I'm about to being forced to uninstall it. However I've convinced so many of my friends to use Signal, so it would be really embarrassing to be forced to stop using Signal because of this little storage issue. Please find a solution for saving data to external storage, I don't want to stop using Signal. |
@ssgromov , can you please detail how you backed up Signal, and how you restored your backup? |
detailed in my post above:
Here's, however, again what I did :
Voila, it should work. Please remember that I only tested it in situation when the SD card is used as internal storage extension (not as "portable", i.e. normal" SD card that can be plugged out and, e.g., be read in PC). |
Thank you @ssgromov for the detailed steps! The part I was missing was that Signal has a built-in backup, hidden under ⋮> Settings > Chats & media > Backups. For my logic that's a tool and should be right in the⋮menu .. BTW, the "Force allow apps on external" setting in Android dev options is present in my Android 7.1.1. Also complete uninstall of the app might not be necessary, just deletion of all its data, because the Android system dialogue only moves the data not the entire app. |
@ssgromov NO success here, and it might not have anything to do with that..:
Details:
Some minutes later all my messages are back, and on my SD card I now see a hidden (and - from what I've read - encrypted) file under:
It is only 59MB big which means it can NOT house all my Signal's data.. which my root file manager, browsing through that file's mount point, confirms:
only contains the base.apk, the lib folder and an empty 'lost+found' folder.. When I check with one of my root apps, I see that Signal's data path is still internal as before:
but nowhere in that folder or its subfolders I can find any images or videos, and the folder on my SD card On further research¹ I found out that the folder which stores all media (with mostly untypical file extensions) is
So to verify that a attempted "data" move was really successful even if you have formatted your SD card as 'internal' (Linux FS), you have to go to Also see (there is waayy more users like us who need this bug fixed!!): |
@ssgromov : unfortunately I had to edit my posting above.. if hope you have a moment to re-read it. But before and apart from that, could you (and anybody else if you feel supportive) please share another little detail which I did not find in your comments: Where after "moving to SD card" does your Signal app now store its "big" media data - videos, audio, images etc? Can you please fire up your fav file manager, look for that folder on your SD card ( |
hello @ssgromov . On your internal storage, can you please go to (system root) |
Instructions to have Signal Data on regular external storage SD formatted as stock FAT32!! Requirement: root via Magisk !! Tested in Android 7.1.1 on a Samsung phone with a TouchWiz ROM [EDIT]: not working anymore in Android 11, both for me and somebody else (ulph0, see below).
If so you have done everything correctly AND it’s working as supposed on your phone.
(23. OPTIONAL AND NOT TESTED: the Global Namespace settings and the Symlinks might stick even if you uninstall Magisk again which will also unroot your Android. If you prefer not be rooted you are welcome to test this and report back) DISCLAIMER: that’s all I can do for you. Either this works on your phone, or it doesn’t. |
Hi @LeeBinder , sorry for taking long to answer (I see a lot of updates in the meanwhile though). P.S. Perhaps, uninstalling Signal helped me (as it is supposed to wipe everything), then the files you've asked about (e.g. Cheers |
@ssgromov Gotcha. Hopefully one fine day the coders will give us an easy option to choose data storage. |
Yes, @LeeBinder , and I think I am also missing an option of reducing picture sizes... we do not need to send 12Mpixel pictures all the time... that would also save a LOT of space. Gotta check the issues list... maybe someone proposed that already. |
@LeeBinder This is how it works with a rooted phone with SuperSU - tested in Android 6.0.1 on Sony Z3:
Note to 4.: You will also have to install Root Add-on for FX File Explorer, otherwise the green button with a white # labeled “System (Root)” will be missing. Not necessary though to activate Pro version test phase. It seems to be crucial to symlink only a sub directory, I tried with another app to symlink its whole |
hey @ThemGo , thanks for the hints with the Root Add-on for FX File Explorer and SD Maid! Glad my share helped you. BTW, re. the Root Add-on for FX File Explorer:
|
@ssgromov How did you manage to do a Backup on the SD card? I am currently running in the same problem: Device space is running out, with signal being by far the biggest app in there. Even when removing all other apps, I would not have enough space for a backup file of signal. Signal always tries to create that file in internal storage. I cannot migrate to an other device, I cannot remove and re-install signal. |
@michaelzangl : https://github.com/johanw666/Signal-Android/releases ..provided you don't mind the 666.. |
Please make it possible to at least have the chat data on SD storage. I really don't mind Signal to be in the phone's memory, but the data grows to several GB in no time. This is really a problem, esp. on older phones. Along with the fact that a backup can't be placed on SD storage, too … |
Can this fork be installed over an existing stock Signal installation as an update? I want to backup my Signal data so I can upgrade my OS, but my database is ~8GB and looking at this comment, I simply have no way of doing it except to chuck it onto my external SD card. |
@Tmpod it might -- provided you are confident with the Also, looking at that fork's storage code, I am not sure it will detect SD cards on all phones, since it relies on calling Do you have an option to upgrade to Android10 on the existing phone? It seems that for Android 10 you can now select the backup location. |
mmmm, I'm pretty sure I don't want to risk it then. But then again, I have no option for the backup, it simply would be too big... This backup is preventing me from upgrading my phone (still on Nougat).
I am using Lineage and would like to continue doing so, but my phone (Redmi 4X, codename |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Yes, dear stale bot, this is still very much relevant! And much more also for Signal people like @greyson-signal @alan-signal @moxie-signal |
I 100% agree with @klues Other apps can. This is NOT a biggie at all. 1422 open issues just for the Android version. Signal devs, if you don't even know how to code simple stuff, then how do you want to proceed.. |
I'm pretty sure insults won't motivate the devs very much to work on this. This is for sure still a problem, esp. for older phones. But since Signal started to auto-compresses images, the amount of space used dropped significantly (in my case from about 3.5 GB to about 800 MB, keeping 6 months of messages), and thus, this problem leveled off a bit. Still, this should be kept on the to-do list. |
Even stating the obvious truth doesn't matter anymore at this point in time of this pitiful and unnecessary saga. Not knowing what I'm talking about? Then read my instructions.. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Keep it open |
I would agree about keeping this issue open. Android phones are a pain for a variety of reasons and having some flexibility for this will make them less painful. |
My instructions are not working anymore for me on my new Nokia 6.1 in LineageOS 18.1 (Android 11) with SD formatted as Internal Storage, aka "Adoptable Storage", above all for the sake of encryption. [EDIT]: not working for me with SD formatted now as Mobile Storage, either. For comparison, WhatsApp data is being written to the merged/ fused Adoptable Storage by default. That can be achieved by following fredsky2's instructions. The key is
easiest via Terminal from one's computer via adb shell. With Signal, the corresponding command
does not have any effect because (as per error thrown),
So this issue could be solved if Signal did ask for permission to write to external storage. The default data path can still be left as Devs @alan-signal @alex-signal @greyson-signal, would you please at least consider, and share your ideas how this can in some way be moved forward with as little effort for you as possible? |
Please provide a way to store the backups to the SD card, it's eating all my disk space on my internal storage any my phone stops working because of it! |
@LeeBinder Hi thanks yor your post above from 2 years ago. My mobile ran full lately - i don't want to delete old messages or buy a new mobile, so i tried it. Didn't work for me. In step 15 i see no images. I don't have adopable storage, but i have Android 11 :'( I am wondering that there is no way to force granting unrequested access to external storage on a rooted phone. even when signal does backups to the external storage now (for which it needs access to external storage?!) |
@ulph0 not working for me with SD formatted now as Mobile Storage, either. From what I know, that's most likely due to Android 11's scoped storage. Yes, Signal CAN access SD for backup, but scoped storage does NOT allow symlinking anymore as described above because folders in Data/Data/.. are pretty much each in their respective dedicated sandbox, so to speak. And the Signal dev team is not willing to change the path, claiming security concerns, from what I understand. What to say.... |
It can be a security concern, but I think there's no point saying security when it interferes with the usability of the app, right? As in if people can't use the app because it takes up space on their device, then they'll just uninstall it and not be secure anyways. I'm on Android 11 (dotOS) & apps can request access to do this. Organic Maps, Google Maps, Telegram, all do this. So, yea. |
/reopen yeah please fix this, this is really shitty. |
it is really sad that this still isn't possible. i want to be free to decide where my data is stored. i want to access all my messages, even with small system memory. why is this closed? |
see #9015 (comment). The beauty of open source. |
First time contributor checklist
Contributor checklist
Description
Following
https://developer.android.com/guide/topics/data/install-location.html
as originally pointed out at
https://community.signalusers.org/t/allow-installation-on-external-storage-location-sd-card/2638
Added option to allow the system to install Signal on the external storage.
Unfortunately, this feature request was closed automatically already twice.
My Signal database has reached some >7Gb size after which it is not possible to update the OS & apps without a
backup Signal to SD -> uninstall Signal -> update -> install Signal again -> restore from SD backup
sequence, which is very annoying.
I am aware of the issue
https://github.com/signalapp/Signal-Android/wiki/Data-loss-when-using-an-SD-Card-formatted-as-internal-memory
which I guess is likely caused by the official update overwriting the install option.