New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 796579 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Android Testing Instructions and Install Emulator Deps are out of date

Project Member Reported by rsleevi@chromium.org, Dec 20 2017

Issue description

https://chromium.googlesource.com/chromium/src/+/master/docs/android_test_instructions.md

mentions ./build/android/install_emulator_deps.py as part of the AVD testing.

As far as I can tell, and I may be holding it wrong, it looks like these are out of date due to some past SDK update.

The paths within install_emulator_deps.py refer to src/android_emulator_sdk/, for example, although AFAICT, the paths are now at ./src/third_party/android_tools/sdk/

Running the above tools/android/android command shows that its deprecated, in favor of tools/bin/sdkmanager and tools/bin/avdmanager. 

1) Are the instructions correct?
2) Are the helpers correct?
 
Components: Infra>Documentation
Cc: -agrieve@chromium.org
Owner: agrieve@chromium.org
Status: Assigned (was: Untriaged)
They are certainly out of date. 

AFAIK, there's not a lot of use of the emulators amongst the team. 

I've been using the x86 emulator lately, and I've actually been quite impressed at how much better it is than the last time I tried it out. 

I'm not quite at the point where I could write good instructions on how to use them, but I can take this on at some point (I'll also ask if anyone else is feeling knowledgeable).
I have recently been using x86 emulators extensively (for running the Clank UI Capture tests), and they seem to work reliably. I have, however, been starting from Android Studio, so I don't currently have any useful insight on how to run them, or configure them, from a script (although running and possibly configuring them from a script is on my TODO list).
Is anybody else working on this? If not, then I am happy to take a look, since I will need this quite soon.
Cc: agrieve@chromium.org
Owner: aber...@chromium.org
All yours!

IMO, I think it would be enough to just delete existing scripts and change our docs to say "use target_cpu="x86" and refer to external documentation for starting emulator". 

If you're willing though, I do think it would be nice to:
 * Figure out a way to put the emulator images in a directory other than //third_party/android_tools so that they would not conflict with the checked-in SDK.
 * Have scripts to download / start emulators configured properly (e.g. I think when I tried, the default disk size was too small to install a debug Chrome.apk)
Cc: yolandyan@chromium.org
As far as I can see the only way to avoid messing up //third_party/android_tools is to change the Android Studio instructions so that Android Studio downloads and uses its own copy of the SDK outside the repositories, rather than using the version in android_tools. Sadly it seems that nowadays the only reasonable way to configure an emulator is from Android Tools, and Android Tools doesn't support having multiple SDK directories.

I don't see, in principle, why this should cause problems (Android Studio has an up to date SDK Platforms for all Android versions back to Eclair), but I may have missed something.
Project Member

Comment 8 by bugdroid1@chromium.org, Jan 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d3ce02abf2c40087d85f7b1908e506cad8bd85b

commit 8d3ce02abf2c40087d85f7b1908e506cad8bd85b
Author: Anthony Berent <aberent@chromium.org>
Date: Mon Jan 15 12:24:36 2018

Update emulator documentation

Remove broken emulator scripts, update emulator instructions, and add
option to generate_gradle.py to use Android Studio's default SDK
(avoids corrupting the project SDK when installing emulator files).

BUG= 796579 

Change-Id: I5c8f99370e4c1293bebc66fc381e01a8509f3a41
Reviewed-on: https://chromium-review.googlesource.com/860106
Reviewed-by: agrieve <agrieve@chromium.org>
Commit-Queue: Anthony Berent <aberent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529253}
[delete] https://crrev.com/aeb29389017aa2d0cffe9359db1897c1396aa528/build/android/avd.py
[modify] https://crrev.com/8d3ce02abf2c40087d85f7b1908e506cad8bd85b/build/android/gradle/generate_gradle.py
[delete] https://crrev.com/aeb29389017aa2d0cffe9359db1897c1396aa528/build/android/install_emulator_deps.py
[delete] https://crrev.com/aeb29389017aa2d0cffe9359db1897c1396aa528/build/android/pylib/utils/emulator.py
[modify] https://crrev.com/8d3ce02abf2c40087d85f7b1908e506cad8bd85b/docs/android_studio.md
[modify] https://crrev.com/8d3ce02abf2c40087d85f7b1908e506cad8bd85b/docs/android_test_instructions.md

Status: Fixed (was: Assigned)

Sign in to add a comment