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

Signal Android app consumes too much internal storage space which makes it useless on low internal storage devices. #7881

Closed
3 of 4 tasks
vbspam opened this issue Jun 8, 2018 · 20 comments

Comments

@vbspam
Copy link

vbspam commented Jun 8, 2018


Bug description

Signal Android app consumes too much internal storage space which makes it useless on low internal storage devices.

Steps to reproduce

  • lets have a device with 4GB internal storage and 64GB external SD card
  • install most recent Signal Android App
  • use it intensively for a while

Actual result: - Android will complain about "insufficient storage available"
Expected result: Signal should detect that is using inappropriate amount of storage (let's say anything above 10% of the storage capacity is not appropriate) and ask the user if it can move the message history to the external SD card storage. When user confirms, Signal should automatically move its data to the external storage. Option: If there are more then one external storage, it should let the user select which one may be used.

Screenshots

Device info

Device: Samsung GT-S7582
Android version: 7.1.2 LineageOS
Signal version: 4.18.3

Link to debug log

https://debuglogs.org/b75748d8e2abb6adb75a349285026badbbd117170952420100cf19b709a3decd

Observation

My Signal app uses 1.7GB of internal storage.

@vbspam
Copy link
Author

vbspam commented Jun 8, 2018

Happens also on the same device type Samsung GT-S7582 with the original Samsung firmware with Android version 4.x, Signal version: 4.18.3 .

@Cerberus0
Copy link

Hello @vbspam,

Welcome to the Signal Android issue tracker. Thank you for filling out the issue template. As mentioned in the project's contributing guidelines, the purpose of this issue tracker is to track bugs in the Android client. Bug reports should only be submitted for existing functionality that does not work as intended. In the template's "expected result" section, you wrote:

Signal should detect that is using inappropriate amount of storage (let's say anything above 10% of the storage capacity is not appropriate) and ask the user if it can move the message history to the external SD card storage. When user confirms, Signal should automatically move its data to the external storage.

There is currently no such functionality in the app, which makes this submission a request for additional functionality that does not yet exist (i.e. a feature request). Such requests are handled on the community forum. Please close this issue and open a new topic at https://community.signalusers.org/c/feature-requests/android-feature-requests (you can sign up/login with your GitHub account).

@vbspam
Copy link
Author

vbspam commented Jun 8, 2018

Ok. As suggested above, closing this issue and opening discussion about feature request here

@klues
Copy link

klues commented May 18, 2020

Come on, do you somehow care about user requests? This issue was created about 2 years ago, it stops people being able to use Signal and the only response is: go to forum - where then nobody takes care of the issue?!

I for myself have convinced so many people to use Signal and now I'm barely able to use it anymore because my phone runs out of memory (while my SD-card isn't). So what to do?! Uninstall Signal and tell everyone of my friends that I've convinced for years to use Signal to use WhatsApp instead?!

@LeeBinder
Copy link

LeeBinder commented Jun 19, 2020

Agreed. Please re-open this thread and please fix this bug. Also please see Pull Request #9015 (Option for Signal install location [internal/external memory])

@LeeBinder
Copy link

@RomBuch
Copy link

RomBuch commented Jun 15, 2021

@LeeBinder Thanks your your instructions. However, this seems only to work with rooted device/Magisk. I don't want to install Magisk on my device. So I assume it does not work.

I also like to keep my sdcard formated as "portable". Because then it can easily read on PC or in a new device (also if my old device is not working anymore). So it seems that there is no option at the moment that the signal app data is stored on sdcard for me.

However, I also want to ask Signal developers to enable the possibility to store app data on sdcard (like it is possible for Telegram messenger etc). My phone has only 8 GB internal storage and Signal is already eating more than 1 GB with the app data. This is not practical.

@LeeBinder
Copy link

@Rom4nB you're welcome. Yes, root is necessary. Couldn't live w/o it.

This has been ignored/ swept underneath the rug for so long by these ignorant dev folks that I doubt they'll ever implement this simple basic feature. Too stubborn and limited.

@Drag0nFly
Copy link

Simply, wow. At least 4 bug reports referencing the exact same issue, and PRs which still haven't been merged; talk about ignoring their users. I've been dealing with this issue for a while now, and even after deleting and moving numerous apps, there simply is no way to get a working Signal backup on my phone due to limited internal storage.

This limitation is mindboggingly impractical, and will affect migration to newer phones as well in the absence of WiFi direct capability from the sending device.

I'm seriously considering switching to Telegram permanently, and regret pointing family, friends & colleagues to Signal after this continued arrogance.

@LeeBinder
Copy link

LeeBinder commented Jul 25, 2022

@Drag0nFly when Signal offers me to choose the backup folder, it allows me to pick the external SD. Nokia 6.1 with LineageOS 18.1/ Android 11

@Drag0nFly
Copy link

There is no option to choose the backup folder.

Only /storage/emulated/0 is offered, which is the internal storage.

@LeeBinder
Copy link

apparently this seems to be phone and/or ROM specific. Which version of Android are you running, and which ROM (stock, LineageOS, etc.)?

@LeeBinder
Copy link

LeeBinder commented Jul 25, 2022

Also with..:

  • USB debugging enabled on your phone
  • your phone connected to your computer
  • adb installed on your computer

on your computer, open terminal, then:

ADB SHELL
pm grant org.thoughtcrime.securesms android.permission.WRITE_EXTERNAL_STORAGE
pm grant org.thoughtcrime.securesms android.permission.READ_EXTERNAL_STORAGE
pm grant org.thoughtcrime.securesms android.permission.WRITE_STORAGE
# to force-quit the app so it restarts with updated permissions:
am force-stop org.thoughtcrime.securesms

and see if Signal can now access your external SD.

@Drag0nFly
Copy link

Thanks for the information and the steps to change app permissions, @LeeBinder. 👍 I suspect this is ROM or phone-specific as well. Since this is an “old”-ish phone with a crappy amount of internal storage, I am also still locked to Android 6 (hooray for Sony's Android support–or lack thereof) :~(

I am however on the latest Signal version (2.43.7, if I recall correctly).

I'll try your advice later on to see if it makes an impact (USB debugging is already active on this device) (Obviously the underlying issue in not being able to move Signal to SD storage is still very much prevalent, and quite a critical drawback no matter which phone one is using.)

@LeeBinder
Copy link

You're welcome. Have you checked if there is a stable custom ROM for your Sony?

If there isn't, my instructions work in Android 7.1.1 (Samsung) as long as your ROM is rooted, and might also work in Android 6.

@Drag0nFly
Copy link

The permissions change didn't do anything, unfortunately. When starting the backup process with “Turn on” (and ticking the box to verify the passphrase has been recorded) it immediately starts backing up to the internal drive, without giving any options to select the destination.

adb shell does however bail on the permission for “android.permission.WRITE_STORAGE”, stating it is unknown. Full details below. I also manually force-killed Signal to make sure it had actually been restarted.

* daemon not running; starting now at tcp:5037
* daemon started successfully
shell@D5803:/ $
org.thoughtcrime.securesms android.permission.WRITE_EXTERNAL_STORAGE          <

shell@D5803:/ $
org.thoughtcrime.securesms android.permission.READ_EXTERNAL_STORAGE           <
shell@D5803:/ $
org.thoughtcrime.securesms android.permission.WRITE_STORAGE                   <

Bad argument: java.lang.IllegalArgumentException: Unknown permission: android.permission.WRITE_STORAGE
usage: pm list packages [-f] [-d] [-e] [-s] [-3] [-i] [-u] [--user USER_ID] [FILTER]
       pm list permission-groups
       pm list permissions [-g] [-f] [-d] [-u] [GROUP]
       pm list instrumentation [-f] [TARGET-PACKAGE]
       pm list features
       pm list libraries
       pm list users
       pm path PACKAGE
       pm dump PACKAGE
       pm install [-lrtsfd] [-i PACKAGE] [--user USER_ID] [PATH]
       pm install-create [-lrtsfdp] [-i PACKAGE] [-S BYTES]
               [--install-location 0/1/2]
               [--force-uuid internal|UUID]
       pm install-write [-S BYTES] SESSION_ID SPLIT_NAME [PATH]
       pm install-commit SESSION_ID
       pm install-abandon SESSION_ID
       pm uninstall [-k] [--user USER_ID] PACKAGE
       pm set-installer PACKAGE INSTALLER
       pm move-package PACKAGE [internal|UUID]
       pm move-primary-storage [internal|UUID]
       pm clear [--user USER_ID] PACKAGE
       pm enable [--user USER_ID] PACKAGE_OR_COMPONENT
       pm disable [--user USER_ID] PACKAGE_OR_COMPONENT
       pm disable-user [--user USER_ID] PACKAGE_OR_COMPONENT
       pm disable-until-used [--user USER_ID] PACKAGE_OR_COMPONENT
       pm hide [--user USER_ID] PACKAGE_OR_COMPONENT
       pm unhide [--user USER_ID] PACKAGE_OR_COMPONENT
       pm grant [--user USER_ID] PACKAGE PERMISSION
       pm revoke [--user USER_ID] PACKAGE PERMISSION
       pm reset-permissions
       pm set-app-link [--user USER_ID] PACKAGE {always|ask|never|undefined}
       pm get-app-link [--user USER_ID] PACKAGE
       pm set-install-location [0/auto] [1/internal] [2/external]
       pm get-install-location
       pm set-permission-enforced PERMISSION [true|false]
       pm trim-caches DESIRED_FREE_SPACE [internal|UUID]
       pm create-user [--profileOf USER_ID] [--managed] USER_NAME
       pm remove-user USER_ID
       pm get-max-users

pm list packages: prints all packages, optionally only
  those whose package name contains the text in FILTER.  Options:
    -f: see their associated file.
    -d: filter to only show disbled packages.
    -e: filter to only show enabled packages.
    -s: filter to only show system packages.
    -3: filter to only show third party packages.
    -i: see the installer for the packages.
    -u: also include uninstalled packages.

pm list permission-groups: prints all known permission groups.

pm list permissions: prints all known permissions, optionally only
  those in GROUP.  Options:
    -g: organize by group.
    -f: print all information.
    -s: short summary.
    -d: only list dangerous permissions.
    -u: list only the permissions users will see.

pm list instrumentation: use to list all test packages; optionally
  supply <TARGET-PACKAGE> to list the test packages for a particular
  application.  Options:
    -f: list the .apk file for the test package.

pm list features: prints all features of the system.

pm list users: prints all users on the system.

pm path: print the path to the .apk of the given PACKAGE.

pm dump: print system state associated with the given PACKAGE.

pm install: install a single legacy package
pm install-create: create an install session
    -l: forward lock application
    -r: replace existing application
    -t: allow test packages
    -i: specify the installer package name
    -s: install application on sdcard
    -f: install application on internal flash
    -d: allow version code downgrade
    -p: partial application install
    -g: grant all runtime permissions
    -S: size in bytes of entire session

pm install-write: write a package into existing session; path may
  be '-' to read from stdin
    -S: size in bytes of package, required for stdin

pm install-commit: perform install of fully staged session
pm install-abandon: abandon session

pm set-installer: set installer package name

pm uninstall: removes a package from the system. Options:
    -k: keep the data and cache directories around after package removal.

pm clear: deletes all data associated with a package.

pm enable, disable, disable-user, disable-until-used: these commands
  change the enabled state of a given package or component (written
  as "package/class").

pm grant, revoke: these commands either grant or revoke permissions
    to apps. The permissions must be declared as used in the app's
    manifest, be runtime permissions (protection level dangerous),
    and the app targeting SDK greater than Lollipop MR1.

pm reset-permissions: revert all runtime permissions to their default state.

pm get-install-location: returns the current install location.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

pm set-install-location: changes the default install location.
  NOTE: this is only intended for debugging; using this can cause
  applications to break and other undersireable behavior.
    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media

pm trim-caches: trim cache files to reach the given free space.

pm create-user: create a new user with the given USER_NAME,
  printing the new user identifier of the user.

pm remove-user: remove the user with the given USER_IDENTIFIER,
  deleting all data associated with that user

@Drag0nFly
Copy link

btw.–these are the storage-related permissions:

shell@D5803:/ $ pm list permissions|grep -i storage
permission:com.sonymobile.remotestorage.permission.REMOTE_STORAGE_SEND
permission:com.sonymobile.permission.WRITE_PERSISTENT_STORAGE
permission:android.permission.WRITE_MEDIA_STORAGE
permission:com.sonymobile.remotestorage.permission.REMOTE_STORAGE_RECEIVE
permission:android.permission.ACCESS_KEYGUARD_SECURE_STORAGE
permission:com.sonymobile.remotestorage.permission.REMOTE_STORAGE

I attempted to give thoughtcrime.securesms access to to WRITE_MEDIA_STORAGE, but it also fails.

shell@D5803:/ $
pm grant org.thoughtcrime.securesms android.permission.WRITE_MEDIA_STORAGE             <
Operation not allowed: java.lang.SecurityException: Package org.thoughtcrime.securesms has not requested permission android.permission.WRITE_MEDIA_STORAGE

@LeeBinder
Copy link

I see. Looks as if you tried all you could - it simply doesn't work on your phone with its ROM. BTW, best you put the terminal output into a show/hide spoiler, like this:

<details>
  <summary>click to expand</summary> 

  Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the `<details>` tag... just make sure you close `<details>` afterward.

  ```javascript
  console.log("I'm a code block!");
```

@Drag0nFly
Copy link

(Sorry about the non-hiding code-block, I just quickly triple-backticked it...)

As for the firmware; I'm not sure if there is a custom stable ROM for this D5803 (actually, I have no idea which one to use; CarbonROM/OmniROM, etc. or how to consider these stable). I'm probably not going to invest too much time on it, as the phone is EOL (even though I replaced both battery and screen recently), since one could potentially risk b0rking the whole thing in the process.

I basically just want to ensure that a full backup–incl. Signal data–can be performed. Don't get me wrong–I'm not a fan of Sony's Android install (or their policies), but just assume this is not a straightforward process (esp. with such limited internal storage due to a large chunk being consumed by Signal.)

@sp7412
Copy link

sp7412 commented Jun 10, 2024

Is there any update on running signal from a microsd card (storing all data and backups on microsd card) on Android?

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

No branches or pull requests

7 participants