android-emulator-container-scripts icon indicating copy to clipboard operation
android-emulator-container-scripts copied to clipboard

Support for android tv

Open vaclavbenes opened this issue 4 years ago • 8 comments

Hi, is it possible add support for android tv ?

vaclavbenes avatar Jun 16 '20 13:06 vaclavbenes

Yes. Which AVD from Android Studio are you currently using?

pokowaka avatar Jun 16 '20 15:06 pokowaka

We are testing api 22+ (all of them) , but what miss is api + playstore. Screenshot 2020-06-17 at 09 31 15 I d like to go official way, if its possible plus use it in docker.

vaclavbenes avatar Jun 17 '20 07:06 vaclavbenes

Hi @vaclavbenes ,

did you manage to create an androidtv docker image?

Before I go down the rabbit hole. @pokowaka will androidtv images be listed as supported when I do emu-docker list ?

regards

veryhumble avatar Feb 11 '21 15:02 veryhumble

@veryhumble No i didnt i found this part of code

python emu_downloads_menu.py

SYSIMG_REPOS = [
    "https://dl.google.com/android/repository/sys-img/android/sys-img2-1.xml",
    "https://dl.google.com/android/repository/sys-img/google_apis/sys-img2-1.xml",
    "https://dl.google.com/android/repository/sys-img/google_apis_playstore/sys-img2-1.xml",
]

maybe its possible add Screenshot 2021-02-11 at 21 59 28

vaclavbenes avatar Feb 11 '21 21:02 vaclavbenes

@vaclavbenes It is possible. We have a working image with an Android TV image (28) on GCE.

@mightea opened the PR to add the necessary changes. Check it out if you want to give it a try.

veryhumble avatar Feb 12 '21 06:02 veryhumble

@veryhumble android tv is not system image , I try build it with it . @pokowaka is sys-img-android-tv-28-p-x86.zip system img.

╰─$  cd /Users/vaclav.benes/Git/avast-mobile/android-emulator-container-scripts ; /usr/bin/env /Users/vaclav.benes/Git/avast-mobile/android-emulator-container-scripts/venv/bin/python /Users/vaclav.benes/.vscode-insiders/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/debugpy/launcher 57057 -- ./venv/bin/emu-docker create emulator-linux-30.4.5.zip sys-img-android-tv-28-p-x86.zip --gpu --tag latest 
WARNING:Please opt in or out of metrics collection.
You will receive this warning until an option is selected.
To opt in or out pass the --metrics or --no-metrics flag
Note, that metrics will only be collected if you opt in.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/vaclav.benes/.vscode-insiders/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
    cli.main()
  File "/Users/vaclav.benes/.vscode-insiders/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
    run()
  File "/Users/vaclav.benes/.vscode-insiders/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
    runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 268, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "./venv/bin/emu-docker", line 33, in <module>
    sys.exit(load_entry_point('emu-docker', 'console_scripts', 'emu-docker')())
  File "/Users/vaclav.benes/Git/avast-mobile/android-emulator-container-scripts/emu/emu_docker.py", line 286, in main
    args.func(args)
  File "/Users/vaclav.benes/Git/avast-mobile/android-emulator-container-scripts/emu/emu_docker.py", line 98, in create_docker_image
    raise Exception("{} is not a zip file with a system image".format(img))
Exception: sys-img-android-tv-28-p-x86.zip is not a zip file with a system image
'Pkg.Desc'
'Android SDK Platform 9'`

vaclavbenes avatar Mar 23 '21 16:03 vaclavbenes

https://github.com/google/android-emulator-container-scripts/pull/237 was merged. So if you use emu-docker interactive according to the Readme, you should be able to choose an android tv image.

veryhumble avatar Mar 24 '21 07:03 veryhumble

its solved with #238 .

vaclavbenes avatar Mar 25 '21 08:03 vaclavbenes