lamda 7.55__tar.gz → 7.57__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. {lamda-7.55 → lamda-7.57}/PKG-INFO +1 -1
  2. {lamda-7.55 → lamda-7.57}/lamda/__init__.py +1 -1
  3. {lamda-7.55 → lamda-7.57}/lamda/client.py +20 -0
  4. {lamda-7.55 → lamda-7.57}/lamda/rpc/services.proto +1 -0
  5. {lamda-7.55 → lamda-7.57}/lamda/rpc/uiautomator.proto +17 -0
  6. {lamda-7.55 → lamda-7.57}/lamda.egg-info/PKG-INFO +1 -1
  7. {lamda-7.55 → lamda-7.57}/README.md +0 -0
  8. {lamda-7.55 → lamda-7.57}/lamda/bcast.proto +0 -0
  9. {lamda-7.55 → lamda-7.57}/lamda/const.py +0 -0
  10. {lamda-7.55 → lamda-7.57}/lamda/exceptions.py +0 -0
  11. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/any.proto +0 -0
  12. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/api.proto +0 -0
  13. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/compiler/plugin.proto +0 -0
  14. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/descriptor.proto +0 -0
  15. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/duration.proto +0 -0
  16. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/empty.proto +0 -0
  17. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/field_mask.proto +0 -0
  18. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/source_context.proto +0 -0
  19. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/struct.proto +0 -0
  20. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/timestamp.proto +0 -0
  21. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/type.proto +0 -0
  22. {lamda-7.55 → lamda-7.57}/lamda/google/protobuf/wrappers.proto +0 -0
  23. {lamda-7.55 → lamda-7.57}/lamda/rpc/application.proto +0 -0
  24. {lamda-7.55 → lamda-7.57}/lamda/rpc/debug.proto +0 -0
  25. {lamda-7.55 → lamda-7.57}/lamda/rpc/file.proto +0 -0
  26. {lamda-7.55 → lamda-7.57}/lamda/rpc/policy.proto +0 -0
  27. {lamda-7.55 → lamda-7.57}/lamda/rpc/proxy.proto +0 -0
  28. {lamda-7.55 → lamda-7.57}/lamda/rpc/settings.proto +0 -0
  29. {lamda-7.55 → lamda-7.57}/lamda/rpc/shell.proto +0 -0
  30. {lamda-7.55 → lamda-7.57}/lamda/rpc/status.proto +0 -0
  31. {lamda-7.55 → lamda-7.57}/lamda/rpc/storage.proto +0 -0
  32. {lamda-7.55 → lamda-7.57}/lamda/rpc/types.proto +0 -0
  33. {lamda-7.55 → lamda-7.57}/lamda/rpc/util.proto +0 -0
  34. {lamda-7.55 → lamda-7.57}/lamda/rpc/wifi.proto +0 -0
  35. {lamda-7.55 → lamda-7.57}/lamda/types.py +0 -0
  36. {lamda-7.55 → lamda-7.57}/lamda.egg-info/SOURCES.txt +0 -0
  37. {lamda-7.55 → lamda-7.57}/lamda.egg-info/dependency_links.txt +0 -0
  38. {lamda-7.55 → lamda-7.57}/lamda.egg-info/not-zip-safe +0 -0
  39. {lamda-7.55 → lamda-7.57}/lamda.egg-info/requires.txt +0 -0
  40. {lamda-7.55 → lamda-7.57}/lamda.egg-info/top_level.txt +0 -0
  41. {lamda-7.55 → lamda-7.57}/setup.cfg +0 -0
  42. {lamda-7.55 → lamda-7.57}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamda
3
- Version: 7.55
3
+ Version: 7.57
4
4
  Summary: Android reverse engineering & automation framework
5
5
  Home-page: https://github.com/rev1si0n/lamda
6
6
  Author: rev1si0n
@@ -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__ = "7.55"
5
+ __version__ = "7.57"
@@ -242,6 +242,8 @@ TouchSequence.__iter__ = touchSequenceIter
242
242
  Bound.width = property(width)
243
243
  Bound.height = property(height)
244
244
 
245
+ FindImageMethod = protos.FindImageMethod
246
+
245
247
  Bound.center = center
246
248
  Bound.corner = corner
247
249
 
@@ -853,6 +855,19 @@ class UiAutomatorStub(BaseServiceStub):
853
855
  """
854
856
  r = self.stub.getClipboard(protos.Empty())
855
857
  return r.value
858
+ def find_similar_image(self, data, threshold=0,
859
+ max_distance=0, bound=None,
860
+ method=FindImageMethod.FI_TEMPLATE):
861
+ """
862
+ 根据提供的目标图片从屏幕中获取相似图片位置
863
+ """
864
+ req = protos.FindImageRequest(bound=bound)
865
+ req.method = method
866
+ req.max_distance = max_distance
867
+ req.threshold = threshold
868
+ req.partial = data
869
+ r = self.stub.findSimilarImage(req)
870
+ return r.bounds
856
871
  def freeze_rotation(self, freeze=True):
857
872
  """
858
873
  锁定屏幕旋转
@@ -2022,6 +2037,11 @@ class Device(object):
2022
2037
  return self.stub("UiAutomator").wait_for_idle(timeout)
2023
2038
  def get_last_toast(self):
2024
2039
  return self.stub("UiAutomator").get_last_toast()
2040
+ def find_similar_image(self, data, threshold=0,
2041
+ max_distance=0, bound=None,
2042
+ method=FindImageMethod.FI_TEMPLATE):
2043
+ return self.stub("UiAutomator").find_similar_image(data, threshold=threshold,
2044
+ max_distance=max_distance, bound=bound, method=method)
2025
2045
  # watcher
2026
2046
  def remove_all_watchers(self):
2027
2047
  return self.stub("UiAutomator").remove_all_watchers()
@@ -186,6 +186,7 @@ service UiAutomator {
186
186
  rpc registerClickUiObjectWatcher(WatcherRegistRequest) returns (Boolean) {}
187
187
  rpc registerPressKeysWatcher(WatcherRegistRequest) returns (Boolean) {}
188
188
  rpc registerNoneOpWatcher(WatcherRegistRequest) returns (Boolean) {}
189
+ rpc findSimilarImage(FindImageRequest) returns (FindImageResponse) {}
189
190
  }
190
191
 
191
192
  service Wifi {
@@ -554,3 +554,20 @@ message WatcherRegistRequest {
554
554
  Key key = 4;
555
555
  }
556
556
  }
557
+
558
+ enum FindImageMethod {
559
+ FI_TEMPLATE = 0;
560
+ FI_FEATURE_POINT = 1;
561
+ }
562
+
563
+ message FindImageRequest {
564
+ FindImageMethod method = 1;
565
+ Bound bound = 2;
566
+ bytes partial = 3;
567
+ uint32 max_distance = 4;
568
+ float threshold = 5;
569
+ }
570
+
571
+ message FindImageResponse {
572
+ repeated Bound bounds = 1;
573
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamda
3
- Version: 7.55
3
+ Version: 7.57
4
4
  Summary: Android reverse engineering & automation framework
5
5
  Home-page: https://github.com/rev1si0n/lamda
6
6
  Author: rev1si0n
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes