lamda 10.0__tar.gz → 10.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. {lamda-10.0 → lamda-10.2}/PKG-INFO +3 -3
  2. {lamda-10.0 → lamda-10.2}/README.md +1 -1
  3. {lamda-10.0 → lamda-10.2}/lamda/__init__.py +1 -1
  4. {lamda-10.0 → lamda-10.2}/lamda/client.py +66 -15
  5. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/any.proto +7 -3
  6. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/api.proto +1 -2
  7. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/compiler/plugin.proto +27 -30
  8. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/descriptor.proto +511 -60
  9. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/duration.proto +1 -2
  10. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/empty.proto +1 -2
  11. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/struct.proto +4 -4
  12. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/timestamp.proto +2 -5
  13. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/type.proto +7 -1
  14. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/wrappers.proto +40 -6
  15. {lamda-10.0 → lamda-10.2}/lamda/rpc/application.proto +60 -0
  16. {lamda-10.0 → lamda-10.2}/lamda/rpc/services.proto +6 -1
  17. {lamda-10.0 → lamda-10.2}/lamda.egg-info/PKG-INFO +3 -3
  18. {lamda-10.0 → lamda-10.2}/lamda.egg-info/requires.txt +2 -2
  19. {lamda-10.0 → lamda-10.2}/setup.py +2 -2
  20. {lamda-10.0 → lamda-10.2}/LICENSE +0 -0
  21. {lamda-10.0 → lamda-10.2}/lamda/const.py +0 -0
  22. {lamda-10.0 → lamda-10.2}/lamda/exceptions.py +0 -0
  23. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/field_mask.proto +1 -1
  24. {lamda-10.0 → lamda-10.2}/lamda/google/protobuf/source_context.proto +1 -1
  25. {lamda-10.0 → lamda-10.2}/lamda/rpc/debug.proto +0 -0
  26. {lamda-10.0 → lamda-10.2}/lamda/rpc/file.proto +0 -0
  27. {lamda-10.0 → lamda-10.2}/lamda/rpc/policy.proto +0 -0
  28. {lamda-10.0 → lamda-10.2}/lamda/rpc/proxy.proto +0 -0
  29. {lamda-10.0 → lamda-10.2}/lamda/rpc/settings.proto +0 -0
  30. {lamda-10.0 → lamda-10.2}/lamda/rpc/shell.proto +0 -0
  31. {lamda-10.0 → lamda-10.2}/lamda/rpc/status.proto +0 -0
  32. {lamda-10.0 → lamda-10.2}/lamda/rpc/storage.proto +0 -0
  33. {lamda-10.0 → lamda-10.2}/lamda/rpc/types.proto +0 -0
  34. {lamda-10.0 → lamda-10.2}/lamda/rpc/uiautomator.proto +0 -0
  35. {lamda-10.0 → lamda-10.2}/lamda/rpc/util.proto +0 -0
  36. {lamda-10.0 → lamda-10.2}/lamda/rpc/wifi.proto +0 -0
  37. {lamda-10.0 → lamda-10.2}/lamda/types.py +0 -0
  38. {lamda-10.0 → lamda-10.2}/lamda.egg-info/SOURCES.txt +0 -0
  39. {lamda-10.0 → lamda-10.2}/lamda.egg-info/dependency_links.txt +0 -0
  40. {lamda-10.0 → lamda-10.2}/lamda.egg-info/not-zip-safe +0 -0
  41. {lamda-10.0 → lamda-10.2}/lamda.egg-info/top_level.txt +0 -0
  42. {lamda-10.0 → lamda-10.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lamda
3
- Version: 10.0
3
+ Version: 10.2
4
4
  Summary: Android reverse engineering & automation framework (Client API)
5
5
  Home-page: https://github.com/firerpa/lamda
6
6
  Author: rev1si0n
@@ -14,9 +14,9 @@ Classifier: Operating System :: Android
14
14
  Classifier: Topic :: Security
15
15
  Requires-Python: >=3.6,<=3.14
16
16
  License-File: LICENSE
17
- Requires-Dist: grpcio-tools<=1.74.0,>=1.35.0
17
+ Requires-Dist: grpcio-tools<=1.82.0,>=1.35.0
18
18
  Requires-Dist: grpc-interceptor<=0.15.4,>=0.13.0
19
- Requires-Dist: grpcio<=1.74.0,>=1.35.0
19
+ Requires-Dist: grpcio<=1.82.0,>=1.35.0
20
20
  Requires-Dist: cryptography>=35.0.0
21
21
  Requires-Dist: msgpack>=1.0.0
22
22
  Requires-Dist: asn1crypto<2,>=1.0.0
@@ -11,7 +11,7 @@
11
11
 
12
12
  <h6>An all-in-one Android automation framework that combines on-device services, AI-ready agents, and extensible tool invocation.</h6>
13
13
 
14
- <p align="left"><a href="https://device-farm.com/docs/en/">Documentation</a> | <a href="https://device-farm.com/docs/zh/">使用文档</a> | <a href="https://device-farm.com/contact#telegram">TELEGRAM</a> | <a href="https://device-farm.com/contact#QQ">QQ Group</a> | <a href="https://device-farm.com/contact#WeChat">WeChat</a> | <a href="https://device-farm.com/llms-full.txt">llms-full.txt</a> | <a href="README.zh.md">中文版本</a></p>
14
+ <p align="left"><a href="https://device-farm.com/docs/en/">Documentation</a> | <a href="https://device-farm.com/docs/zh/">使用文档</a> | <a href="https://device-farm.com/contact#telegram">TELEGRAM</a> | <a href="https://device-farm.com/contact#QQ">QQ Group</a> | <a href="https://github.com/firerpa/skills">SKILLS</a> | <a href="https://device-farm.com/llms-full.txt">llms-full.txt</a> | <a href="README.zh.md">中文版本</a></p>
15
15
 
16
16
  FIRERPA is an **all-in-one Android device control platform**. The server runs directly on the device with **no extra runtime dependencies**; it **supports multiple generations of Android** and works **with or without root**. On the PC side, the Python client library orchestrates UI automation, remote operations, traffic capture, Hook-based reverse engineering, network proxying, distributed networking, AI agents, and **MCP** through a single service and API. Compared with stitching together Appium, mitmproxy, frida-server, adb, uiautomator2, and ad-hoc scripts and ops tools, FIRERPA offers **one source of capabilities, unified configuration, connected workflows, and a stack built for multi-device, long-running, production use**.
17
17
 
@@ -2,4 +2,4 @@
2
2
  #
3
3
  # Distributed under MIT license.
4
4
  # See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5
- __version__ = "10.0"
5
+ __version__ = "10.2"
@@ -11,6 +11,7 @@ import time
11
11
  import uuid
12
12
  import json
13
13
  import base64
14
+ import posixpath
14
15
  import hashlib
15
16
  import platform
16
17
  import warnings
@@ -1183,10 +1184,6 @@ class VirtualDisplayStub(UiAutomatorStub):
1183
1184
  def disable_global_method_warning(self):
1184
1185
  self._warning_global = False
1185
1186
  # Application compat
1186
- def install_local_file(self, rpath, user=0):
1187
- self._warning_global_use("install_local_file")
1188
- return self.device.proxy("Application", display=self.display).install_local_file(
1189
- rpath, user=user)
1190
1187
  def enumerate_installed_apps(self, user=0):
1191
1188
  self._warning_global_use("enumerate_installed_apps")
1192
1189
  return self.device.proxy("Application", display=self.display).enumerate_installed_apps(user=user)
@@ -1481,10 +1478,41 @@ class ApplicationOpStub:
1481
1478
  name)
1482
1479
 
1483
1480
 
1481
+ class ApplicationInstallSession(object):
1482
+ def __init__(self, device, session, tmpdir=None):
1483
+ self.tmpdir = tmpdir or "/data/local/tmp"
1484
+ self.stub = device.proxy("Application").stub
1485
+ self.device = device
1486
+ self.session = session
1487
+ def _write(self, path, name=None, delete=False):
1488
+ req = protos.InstallSessionWriteRequest(session=self.session,
1489
+ path=path, name=name,
1490
+ delete=delete)
1491
+ return self.stub.installSessionWrite(req)
1492
+ def write(self, path, name=None):
1493
+ suffix = uuid.uuid4().hex[::4]
1494
+ dest = posixpath.join(self.tmpdir, "{}_{}.apk".format(
1495
+ self.session, suffix))
1496
+ info = self.device.upload_file(path, dest)
1497
+ self.device.file_chmod(info.path, mode=0o777)
1498
+ return self._write(info.path, name, True)
1499
+ def commit(self, wait=True, timeout=0):
1500
+ req = protos.InstallSessionCommitRequest(session=self.session,
1501
+ wait=wait, timeout=timeout)
1502
+ return self.stub.installSessionCommit(req)
1503
+ def abandon(self):
1504
+ req = protos.InstallSessionAbandonRequest(session=self.session)
1505
+ return self.stub.installSessionAbandon(req).value
1506
+ def status(self):
1507
+ req = protos.InstallSessionQueryRequest(session=self.session)
1508
+ return self.stub.installSessionQuery(req)
1509
+
1510
+
1484
1511
  class ApplicationStub(BaseServiceStub):
1485
- def __init__(self, *args, display=0, **kwargs):
1512
+ def __init__(self, *args, display=0, device=None, **kwargs):
1486
1513
  super(ApplicationStub, self).__init__(*args, **kwargs)
1487
1514
  self.display = display
1515
+ self.device = device
1488
1516
  def current_application(self):
1489
1517
  """
1490
1518
  Get the current foreground app info.
@@ -1523,14 +1551,23 @@ class ApplicationStub(BaseServiceStub):
1523
1551
  req.display = self.display
1524
1552
  r = self.stub.startActivity(req)
1525
1553
  return r.value
1526
- def install_local_file(self, fpath, user=0):
1527
- """
1528
- Install an APK from a device path.
1529
- """
1530
- req = protos.ApplicationRequest(path=fpath)
1531
- req.user = user
1532
- r = self.stub.installFromLocalFile(req)
1533
- return r
1554
+ def _create_install_session(self, user=0, size_bytes=0, package=None,
1555
+ installer_package_name=None, dont_kill_app=False,
1556
+ replace_existing=True, allow_test=False, request_downgrade=False,
1557
+ grant_runtime_permissions=False, tmpdir=None):
1558
+ req = protos.InstallSessionCreateRequest(user=user)
1559
+ req.sizeBytes = size_bytes
1560
+ req.dontKillApp = dont_kill_app
1561
+ req.requestDowngrade = request_downgrade
1562
+ req.grantRuntimePermissions = grant_runtime_permissions
1563
+ req.replaceExisting = replace_existing
1564
+ req.allowTest = allow_test
1565
+ req.installerPackageName = installer_package_name or ""
1566
+ req.package = package or ""
1567
+ info = self.stub.installSessionCreate(req)
1568
+ params = dict(device=self.device, session=info.session,
1569
+ tmpdir=tmpdir)
1570
+ return ApplicationInstallSession(**params)
1534
1571
  def __call__(self, applicationId, user=0):
1535
1572
  return ApplicationOpStub(self.stub, applicationId,
1536
1573
  user=user, display=self.display)
@@ -2444,8 +2481,22 @@ class Device(object):
2444
2481
  def file_stat(self, fpath):
2445
2482
  return self.stub("File").file_stat(fpath)
2446
2483
  # Shortcut: Application
2447
- def install_local_file(self, rpath, user=0):
2448
- return self.stub("Application").install_local_file(rpath, user=user)
2484
+ def create_install_session(self, user=0, size_bytes=0, package=None,
2485
+ installer_package_name=None, dont_kill_app=False,
2486
+ replace_existing=True, allow_test=False, request_downgrade=False,
2487
+ grant_runtime_permissions=False, tmpdir=None):
2488
+ kwargs = dict(user=user)
2489
+ kwargs["size_bytes"] = size_bytes
2490
+ kwargs["package"] = package
2491
+ kwargs["request_downgrade"] = request_downgrade
2492
+ kwargs["grant_runtime_permissions"] = grant_runtime_permissions
2493
+ kwargs["installer_package_name"] = installer_package_name
2494
+ kwargs["dont_kill_app"] = dont_kill_app
2495
+ kwargs["replace_existing"] = replace_existing
2496
+ kwargs["allow_test"] = allow_test
2497
+ kwargs["tmpdir"] = tmpdir
2498
+ proxy = self.proxy("Application", device=self)
2499
+ return proxy._create_install_session(**kwargs)
2449
2500
  def current_application(self):
2450
2501
  return self.stub("Application").current_application()
2451
2502
  def enumerate_installed_apps(self, user=0):
@@ -32,12 +32,12 @@ syntax = "proto3";
32
32
 
33
33
  package google.protobuf;
34
34
 
35
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
35
  option go_package = "google.golang.org/protobuf/types/known/anypb";
37
36
  option java_package = "com.google.protobuf";
38
37
  option java_outer_classname = "AnyProto";
39
38
  option java_multiple_files = true;
40
39
  option objc_class_prefix = "GPB";
40
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
41
41
 
42
42
  // `Any` contains an arbitrary serialized protocol buffer message along with a
43
43
  // URL that describes the type of the serialized message.
@@ -63,6 +63,10 @@ option objc_class_prefix = "GPB";
63
63
  // if (any.is(Foo.class)) {
64
64
  // foo = any.unpack(Foo.class);
65
65
  // }
66
+ // // or ...
67
+ // if (any.isSameTypeAs(Foo.getDefaultInstance())) {
68
+ // foo = any.unpack(Foo.getDefaultInstance());
69
+ // }
66
70
  //
67
71
  // Example 3: Pack and unpack a message in Python.
68
72
  //
@@ -93,7 +97,6 @@ option objc_class_prefix = "GPB";
93
97
  // in the type URL, for example "foo.bar.com/x/y.z" will yield type
94
98
  // name "y.z".
95
99
  //
96
- //
97
100
  // JSON
98
101
  // ====
99
102
  // The JSON representation of an `Any` value uses the regular
@@ -146,7 +149,8 @@ message Any {
146
149
  //
147
150
  // Note: this functionality is not currently available in the official
148
151
  // protobuf release, and it is not used for type URLs beginning with
149
- // type.googleapis.com.
152
+ // type.googleapis.com. As of May 2023, there are no widely used type server
153
+ // implementations and no plans to implement one.
150
154
  //
151
155
  // Schemes other than `http`, `https` (or the empty scheme) might be
152
156
  // used with implementation specific semantics.
@@ -35,11 +35,11 @@ package google.protobuf;
35
35
  import "google/protobuf/source_context.proto";
36
36
  import "google/protobuf/type.proto";
37
37
 
38
- option csharp_namespace = "Google.Protobuf.WellKnownTypes";
39
38
  option java_package = "com.google.protobuf";
40
39
  option java_outer_classname = "ApiProto";
41
40
  option java_multiple_files = true;
42
41
  option objc_class_prefix = "GPB";
42
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
43
43
  option go_package = "google.golang.org/protobuf/types/known/apipb";
44
44
 
45
45
  // Api is a light-weight descriptor for an API Interface.
@@ -82,7 +82,6 @@ message Api {
82
82
  // be omitted. Zero major versions must only be used for
83
83
  // experimental, non-GA interfaces.
84
84
  //
85
- //
86
85
  string version = 4;
87
86
 
88
87
  // Source context for the protocol buffer service represented by this
@@ -1,38 +1,12 @@
1
1
  // Protocol Buffers - Google's data interchange format
2
2
  // Copyright 2008 Google Inc. All rights reserved.
3
- // https://developers.google.com/protocol-buffers/
4
3
  //
5
- // Redistribution and use in source and binary forms, with or without
6
- // modification, are permitted provided that the following conditions are
7
- // met:
8
- //
9
- // * Redistributions of source code must retain the above copyright
10
- // notice, this list of conditions and the following disclaimer.
11
- // * Redistributions in binary form must reproduce the above
12
- // copyright notice, this list of conditions and the following disclaimer
13
- // in the documentation and/or other materials provided with the
14
- // distribution.
15
- // * Neither the name of Google Inc. nor the names of its
16
- // contributors may be used to endorse or promote products derived from
17
- // this software without specific prior written permission.
18
- //
19
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4
+ // Use of this source code is governed by a BSD-style
5
+ // license that can be found in the LICENSE file or at
6
+ // https://developers.google.com/open-source/licenses/bsd
30
7
 
31
8
  // Author: kenton@google.com (Kenton Varda)
32
9
  //
33
- // WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
34
- // change.
35
- //
36
10
  // protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
37
11
  // just a program that reads a CodeGeneratorRequest from stdin and writes a
38
12
  // CodeGeneratorResponse to stdout.
@@ -50,6 +24,7 @@ package google.protobuf.compiler;
50
24
  option java_package = "com.google.protobuf.compiler";
51
25
  option java_outer_classname = "PluginProtos";
52
26
 
27
+ option csharp_namespace = "Google.Protobuf.Compiler";
53
28
  option go_package = "google.golang.org/protobuf/types/pluginpb";
54
29
 
55
30
  import "google/protobuf/descriptor.proto";
@@ -78,6 +53,11 @@ message CodeGeneratorRequest {
78
53
  // they import. The files will appear in topological order, so each file
79
54
  // appears before any file that imports it.
80
55
  //
56
+ // Note: the files listed in files_to_generate will include runtime-retention
57
+ // options only, but all other files will include source-retention options.
58
+ // The source_file_descriptors field below is available in case you need
59
+ // source-retention options for files_to_generate.
60
+ //
81
61
  // protoc guarantees that all proto_files will be written after
82
62
  // the fields above, even though this is not technically guaranteed by the
83
63
  // protobuf wire format. This theoretically could allow a plugin to stream
@@ -90,9 +70,13 @@ message CodeGeneratorRequest {
90
70
  // fully qualified.
91
71
  repeated FileDescriptorProto proto_file = 15;
92
72
 
73
+ // File descriptors with all options, including source-retention options.
74
+ // These descriptors are only provided for the files listed in
75
+ // files_to_generate.
76
+ repeated FileDescriptorProto source_file_descriptors = 17;
77
+
93
78
  // The version number of protocol compiler.
94
79
  optional Version compiler_version = 3;
95
-
96
80
  }
97
81
 
98
82
  // The plugin writes an encoded CodeGeneratorResponse to stdout.
@@ -115,8 +99,21 @@ message CodeGeneratorResponse {
115
99
  enum Feature {
116
100
  FEATURE_NONE = 0;
117
101
  FEATURE_PROTO3_OPTIONAL = 1;
102
+ FEATURE_SUPPORTS_EDITIONS = 2;
118
103
  }
119
104
 
105
+ // The minimum edition this plugin supports. This will be treated as an
106
+ // Edition enum, but we want to allow unknown values. It should be specified
107
+ // according the edition enum value, *not* the edition number. Only takes
108
+ // effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
109
+ optional int32 minimum_edition = 3;
110
+
111
+ // The maximum edition this plugin supports. This will be treated as an
112
+ // Edition enum, but we want to allow unknown values. It should be specified
113
+ // according the edition enum value, *not* the edition number. Only takes
114
+ // effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
115
+ optional int32 maximum_edition = 4;
116
+
120
117
  // Represents a single generated file.
121
118
  message File {
122
119
  // The file name, relative to the output directory. The name must not