Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions android_env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

15 changes: 15 additions & 0 deletions android_env/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

15 changes: 15 additions & 0 deletions android_env/components/action_fns.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Functions to convert actions between different components' formats."""

from absl import logging
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/action_fns_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from unittest import mock

from absl.testing import absltest
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/action_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""The different kinds of actions that AndroidEnv supports.

The native action space of AndroidEnv consists of a tuple consisting of
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/adb_call_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Processes adb_pb2.AdbRequest commands."""

import os
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/adb_call_parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import builtins
import os
import subprocess
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/adb_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""A class to manage and control an external ADB process."""

import os
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/adb_controller_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import subprocess
import time
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/adb_log_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Class for a stream of logs output by a locally running emulator."""

import subprocess
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/adb_log_stream_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Tests for adb_log_stream."""

import subprocess
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/app_screen_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Determines if the current app screen matches an expected app screen."""

from collections.abc import Callable, Sequence
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/app_screen_checker_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Tests for android_env.components.app_screen_checker."""

import re
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/config_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Dataclass definitions used for instantiating AndroidEnv components."""

import dataclasses
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Coordinator handles interaction between internal components of AndroidEnv."""

import copy
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/coordinator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Tests for android_env.components.coordinator."""

import tempfile
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/device_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Sets and gets some global settings on an Android device."""

from typing import Final
Expand Down
15 changes: 15 additions & 0 deletions android_env/components/device_settings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# coding=utf-8
# Copyright 2025 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from unittest import mock

from absl.testing import absltest
Expand Down
Loading
Loading