Closed Bug 1519588 Opened 9 months ago Closed 9 months ago

|mach install| with x86 emulator fails with INSUFFICIENT_STORAGE

Categories

(Firefox for Android :: Testing, defect, P2)

defect

Tracking

()

VERIFIED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: botond, Assigned: gbrown)

References

Details

I did an x86 build of Fennec to try to reproduce a test failure locally in the x86 emulator.

However, mach install is failing with INSTALL_FAILED_INSUFFICIENT_STORAGE.

I don't quite get how that's possible, as this is a brand new x86 emulator I've never used before, so there should be nothing filling up its disk space.

Here is the full output of mach install:

$ ./mach install
No Android devices connected. Start an emulator? (Y/n) y
Starting emulator running Android 7.0 x86...
accel:
0
KVM (version 12) is installed and usable.
accel
Running the x86 emulator; be sure to install an x86 APK!
 0:14.98 /usr/bin/make -C . -j16 -s -w install
 0:15.00 make: Entering directory '/home/botond/dev/mozilla/out-of-tree-objdirs/android-android-x86'
 0:17.94 adb: failed to install dist/fennec-66.0a1.en-US.android-i686.apk: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
 0:17.94 /home/botond/dev/mozilla/android/mobile/android/build.mk:42: recipe for target 'install' failed
 0:17.94 make: *** [install] Error 1
 0:17.94 make: Leaving directory '/home/botond/dev/mozilla/out-of-tree-objdirs/android-android-x86'

Here is the output of adb shell df -h:

$ adb shell df -h
Filesystem                    Size  Used Avail Use% Mounted on
tmpfs                         1.4G  460K  1.4G   1% /dev
tmpfs                         1.4G     0  1.4G   0% /mnt
/dev/block/vda                2.4G  891M  1.5G  36% /system
/dev/block/vdb                 61M   56K   61M   1% /cache
/dev/block/vdc                583M   87M  495M  15% /data
tmpfs                         1.4G     0  1.4G   0% /storage
/dev/fuse                     583M   87M  495M  15% /mnt/runtime/default/emulated
/dev/fuse                     583M   87M  495M  15% /storage/emulated
/dev/fuse                     583M   87M  495M  15% /mnt/runtime/read/emulated
/dev/fuse                     583M   87M  495M  15% /mnt/runtime/write/emulated
/dev/block/vold/public:253,48 598M  4.0K  598M   1% /mnt/media_rw/1D1A-0A0A
/dev/fuse                     598M  4.0K  598M   1% /mnt/runtime/default/1D1A-0A0A
/dev/fuse                     598M  4.0K  598M   1% /storage/1D1A-0A0A
/dev/fuse                     598M  4.0K  598M   1% /mnt/runtime/read/1D1A-0A0A
/dev/fuse                     598M  4.0K  598M   1% /mnt/runtime/write/1D1A-0A0A

With :kbrosnan's help, I was able to resolve this by editing ~/.mozbuild/android-device/avd/mozemulator-x86-7.0.avd/config.ini and increasing disk.dataPartition.size to 4G.

I think mach should be taking care of this. After all, the point of mach setting up an emulator, is so that you can install Firefox onto it.

How big was your apk? Was this a debug build?

Component: Build Config & IDE Support → Testing

(In reply to Geoff Brown [:gbrown] from comment #2)

How big was your apk? Was this a debug build?

My apk is about 75 MB in size, though the app seems to use up about 250 MB of space in /data. (That's still less than the 495 MB of space that was available in /data prior to the config.ini change, so it doesn't really add up to me either. Perhaps the app requires additional temporary space during installation?) It is indeed a debug build.

(In reply to Botond Ballo [:botond] from comment #3)

(In reply to Geoff Brown [:gbrown] from comment #2)

How big was your apk? Was this a debug build?

My apk is about 75 MB in size, though the app seems to use up about 250 MB of space in /data. (That's still less than the 495 MB of space that was available in /data prior to the config.ini change, so it doesn't really add up to me either. Perhaps the app requires additional temporary space during installation?) It is indeed a debug build.

I have definitely seen this. I think the oat2dex process and various caching layers use much-o disk space on install. I never use the "provided" AVDs 'cuz they don't work for me, for this and other reasons, so I'd support bumping this limit globally and trying to rehabilitate them.

Assignee: nobody → gbrown
Priority: -- → P2

I am increasing the requested size of /data on the "4.3", "x86", and "x86-7.0" avd's used by mach android-emulator. I just took the old avds, modified the config.ini, repackaged, uploaded and updated the manifests. Note that the older 4.3 and x86 avds seem to have their partition sizes capped at 1G and 1.7G respectively. The x86-7.0 gets the full configured value of 1.8G.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=e41977b8f8cf6ff48429eb07f3143e24eb0a5762

After landing, folks may need to 'mach android-emulator --force-update' to get the new definitions.

Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a02dd51c39da
Update tooltool manifests for Android avd definitions; r=me,a=test-only
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66

Thanks for fixing this!

Status: RESOLVED → VERIFIED
See Also: → 1546453
You need to log in before you can comment on or make changes to this bug.