Closed Bug 989343 Opened 10 years ago Closed 9 years ago

Update the AVD definitions for Android 2.3

Categories

(Testing :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(firefox39 fixed)

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file)

There's nothing urgent here, but I have had some thoughts about improvements to our Android 2.3 avd definitions and am noting them before I forget:

 - remove test-2, test-3, test-4 definitions since they are not used
     - use less space
     - faster to download, copy, etc
 - enable dpad and keyboard input, so that the emulator is more usable when the avds are used for local debugging
 - reconsider dalvik.vm.heapsize, qemu.sf.lcd_density, etc.
 - avoid "D/SntpClient(   64): request time failed: java.net.SocketTimeoutException: Try again"
 - check for debug symbols for system libs, collect or build as necessary, for crash reports, ndk-stack, etc
...and consider using a newer kernel.
See Also: → 998431
...and check on the camera settings for the emulator device.
...and create the /data/anr directory.
See Also: → 1030342
...and disable background data - https://bugzilla.mozilla.org/show_bug.cgi?id=1004682#c4
...and create the /data/tombstones directory - assists bug 1042097.
Actually, it seems that /data/tombstones does not need to exist -- don't worry about that.
(In reply to Geoff Brown [:gbrown] from comment #1)
> ...and consider using a newer kernel.

See bug 1128548 -- it might be easy.
I tried building a kernel from the latest commit to https://android.googlesource.com/kernel/goldfish.git/+/android-goldfish-2.6.29, 4bb8fa001050e579d1f0aedd2de8723a23426fe8 -- that works fine in local tests with the existing 2.3 AVD. I also tried some variants of goldfish 3.4, but could not get any of them to boot.
Another possibly useful change, for Robocop reliability, from https://code.google.com/p/android-test-kit/wiki/Espresso: turn off Developer options "Window animation scale", "Transition animation scale" and "Animation duration scale".
Let's do this:

 - get the existing AVD package from tooltool, 7140e026b7b747236545dc30e377a959b0bdf91bb4d70efd7f97f92fce12a9196042503124b8df8d30c2d97b7eb5f9df9556afdffa0b5d9625008aead305c32b and extract the archive
 - delete unused files test-2.ini, test-2.avd, test-3.ini, test-3.avd, test-4.ini, test-4.avd.
 - replace test-1.avd/kernel-qemu with a new kernel based on  https://android.googlesource.com/kernel/goldfish.git/+/android-goldfish-2.6.29, revision 4bb8fa001050e579d1f0aedd2de8723a23426fe8
 - modify test-1.avd/config.ini
    -- set dalvik.vm.heapsize=128, hw.camera.back=emulated, hw.dPad=yes, hw.mainKeys=yes
 - make a copy of test-1.avd in my local .android/avd directory
 - start the emulator: emulator -avd test-1 -port 5554 -debug init,console,gles,memcheck,adbserver,adbclient,adb,avd_config,socket -qemu -m 1024 -cpu cortex-a9
 - adb shell mkdir /data/anr
 - adb shell mkdir /data/tombstones
 - modify settings manually in the emulator:
    -- Settings > Accounts & Sync > Background Data - Off
    -- Settings > Accounts & Sync > Auto-sync - Off
    -- Developer Settings > Window animation scale - None
    -- Developer Settings > Transition animation scale - None
 - copy .android/avd/test-1.avd/userdata-qemu.img back to archive directory
 - repack archive
(In reply to Geoff Brown [:gbrown] from comment #9)
> "Animation duration scale".

That setting does not appear to be available on 2.3.
(In reply to Geoff Brown [:gbrown] from comment #0)
>  - reconsider dalvik.vm.heapsize, qemu.sf.lcd_density, etc.

I did not change the lcd_density of 160. The new Android 4.3 emulator tests will use an lcd_density of 320, giving us reasonable coverage of popular densities.

>  - avoid "D/SntpClient(   64): request time failed:
> java.net.SocketTimeoutException: Try again"

The new image still has this issue. It doesn't seem serious.

>  - check for debug symbols for system libs, collect or build as necessary,
> for crash reports, ndk-stack, etc

We could improve crash reports with additional symbols derived from the system libs (or perhaps collected from Graydon's original build) but that seems like a separate bug.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=eeeb11acbda0 looks good -- just as stable as existing AVDs.
Depends on: 1141223
The AVD described in Comment 10 was uploaded to tooltool in bug 1141223. This patch updates the tooltool manifest to use the new AVD in Android 2.3 tests.

Latest try run still looks good:

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

Significant improvements in this AVD over the one currently in use:
 - significantly smaller size
 - background data disabled (requested in bug 1004682)
 - slightly newer kernel (requested in bug 998431)
 - some settings tweaked in hopes of improving robocop reliability
Attachment #8581652 - Flags: review?(kmoir)
Attachment #8581652 - Flags: review?(kmoir) → review+
https://hg.mozilla.org/mozilla-central/rev/c5f83cde557f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: