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

Allow increasing main storage size (sdcard is separate storage) #219

Merged
merged 5 commits into from
Feb 5, 2022

Conversation

ViliusSutkus89
Copy link
Contributor

Android has two drives - main storage for apps and external storage for downloads and user files.
sdcard-path-or-size controls the second - external storage.

The Problem

Older devices default to 800M main storage. After the system apps, there is 309M left.
Most today's apps take more than that. Debug versions are not minimized, instrumented tests take extra space. Long story short - my app cannot fit. I get INSTALL_FAILED_INSUFFICIENT_STORAGE and related errors. Issue #184 is caused by this.

800M

The PR

There is no option in avdcreate, but /Users/runner/.android/avd/${avdName}.avd/config.ini has the config option we want: disk.dataPartition.size=800M

This PR would allow appending a new disk.dataPartition.size size, when supplied as action argument named disk-size.

The Workaround

Until this or similar PR is merged, I have a workaround:

- name: Create AVD
  uses: reactivecircus/android-emulator-runner@v2
  with:
    api-level: 21
    arch: x86_64
    target: google_apis
    script: echo "Generated AVD snapshot."

- name: increate storage size for emulator
  run: echo "disk.dataPartition.size=2G" >> /Users/runner/.android/avd/test.avd/config.ini

- name: Run tests
  uses: reactivecircus/android-emulator-runner@v2
  with:
    api-level: 21
    arch: x86_64
    target: google_apis
    force-avd-creation: false
    script: ./gradlew connectedCheck

@ViliusSutkus89
Copy link
Contributor Author

As an alternative, we could parse config.ini and increase this size for low storage devices without any user supplied input.

Copy link
Member

@ychescale9 ychescale9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

src/input-validator.ts Show resolved Hide resolved
@ychescale9 ychescale9 merged commit 4e0dd2c into ReactiveCircus:main Feb 5, 2022
ychescale9 added a commit that referenced this pull request Feb 17, 2022
* main:
  Prepare for release 2.23.0.
  Add missing generated .js files.
  Add GHA commands to group logs (#224)
  wikimedia have likely renamed master -> main (#221)
  Allow increasing main storage size (sdcard is separate storage) (#219)
  Update to SDK command-line tools 6.0. (#213)
  Update build tools to 32.0.0. Update text-fixture compileSdkVersion and targetSdkVersion to 32. (#212)
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

Successfully merging this pull request may close these issues.

2 participants