android-emulator-runner icon indicating copy to clipboard operation
android-emulator-runner copied to clipboard

Empty root even with sdcard

Open EmmanuelMess opened this issue 3 years ago • 0 comments

I have an sdcard but the root directory doesn't have any files:

val  ftpClient = FTPClient()
ftpClient.connect("localhost", FtpService.DEFAULT_PORT)
ftpClient.login("anonymous", "[email protected]")
ftpClient.changeWorkingDirectory("/")
val files = ftpClient.listFiles()
assertNotNull(files)
assertTrue(
    "No files found on device? It is also possible that app doesn't have " +
        "permission to access storage, which may occur on broken Android emulators",
    files.size > 0
)

That last assert is failing.

Script:

  test_emulator:
    timeout-minutes: 30 # Emulator can get stuck
    runs-on: macos-latest
    strategy:
      fail-fast: true
      matrix:
        api-level: [23]#[16, 19, 28]
    steps:
      - name: checkout
        uses: actions/checkout@v2
      - name: Java 15
        uses: actions/setup-java@v1
        with:
          java-version: 15
      - name: Gradle cache
        uses: actions/cache@v2
        with:
          path: |
            ~/.gradle/caches
            ~/.gradle/wrapper
          key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
      - uses: actions/cache@v2
        id: avd-cache
        with:
          path: |
            ~/.android/avd/*
            ~/.android/adb*
            ~/.android/debug.keystore
          key: avd-${{ matrix.api-level }}
      - name: create AVD and generate snapshot for caching
        if: steps.avd-cache.outputs.cache-hit != 'true'
        uses: reactivecircus/android-emulator-runner@v2
        with:
          api-level: ${{ matrix.api-level }}
          force-avd-creation: false
          emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
          disable-animations: false
          sdcard-path-or-size: 100M
          arch: x86_64
          ram-size: 2048M
          channel: canary
          script: echo "Generated AVD snapshot for caching."

      - name: run tests
        uses: reactivecircus/android-emulator-runner@v2
        with:
          api-level: ${{ matrix.api-level }}
          force-avd-creation: false
          emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
          disable-animations: true
          sdcard-path-or-size: 100M
          arch: x86_64
          ram-size: 2048M
          channel: canary
          script: |
            adb logcat -c
            adb logcat *:E &
            ./gradlew :app:connectedCheck

Can I have a normal fs for the emulator? We would need rely on it.

EmmanuelMess avatar Jan 31 '22 03:01 EmmanuelMess