Skip to content

Commit 79f4250

Browse files
committed
7.50 auto-commit
1 parent 840e554 commit 79f4250

File tree

4 files changed

+35
-6
lines changed

4 files changed

+35
-6
lines changed

CHANGELOG.txt

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
7.50
2+
* 彻底修复夜神模拟器兼容性问题
3+
* 修复逻辑错误导致的僵尸进程
4+
* 新的组网订阅服务,无需 Frp、OpenVPN 即可实现组网
5+
* 修复系统多分辨率的问题
6+
* 优化安卓13, 14的系统证书注入逻辑
7+
* 新增对多开应用的支持 (user)
8+
* OpenVPN 已支持 IPv6
9+
110
7.30
211
* 修复雷电/夜神兼容性问题
312
* 一些小调整

lamda/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#
33
# Distributed under MIT license.
44
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5-
__version__ = "7.30"
5+
__version__ = "7.50"

lamda/client.py

+23-5
Original file line numberDiff line numberDiff line change
@@ -904,10 +904,11 @@ def __call__(self, **kwargs):
904904

905905

906906
class ApplicationOpStub:
907-
def __init__(self, stub, applicationId):
907+
def __init__(self, stub, applicationId, user=0):
908908
"""
909909
Application 子接口,用来模拟出实例的意味
910910
"""
911+
self.user = user
911912
self.applicationId = applicationId
912913
self.stub = stub
913914
def __str__(self):
@@ -919,13 +920,15 @@ def is_foreground(self):
919920
应用是否正处于前台运行
920921
"""
921922
req = protos.ApplicationRequest(name=self.applicationId)
923+
req.user = self.user
922924
r = self.stub.isForeground(req)
923925
return r.value
924926
def permissions(self):
925927
"""
926928
获取应用的所有权限列表
927929
"""
928930
req = protos.ApplicationRequest(name=self.applicationId)
931+
req.user = self.user
929932
r = self.stub.getPermissions(req)
930933
return r.permissions
931934
def grant(self, permission, mode=GrantType.GRANT_ALLOW):
@@ -935,6 +938,7 @@ def grant(self, permission, mode=GrantType.GRANT_ALLOW):
935938
req = protos.ApplicationRequest(name=self.applicationId,
936939
permission=permission,
937940
mode=mode)
941+
req.user = self.user
938942
r = self.stub.grantPermission(req)
939943
return r.value
940944
def revoke(self, permission):
@@ -943,13 +947,15 @@ def revoke(self, permission):
943947
"""
944948
req = protos.ApplicationRequest(name=self.applicationId,
945949
permission=permission)
950+
req.user = self.user
946951
r = self.stub.revokePermission(req)
947952
return r.value
948953
def query_launch_activity(self):
949954
"""
950955
获取应用的启动 activity 信息
951956
"""
952957
req = protos.ApplicationRequest(name=self.applicationId)
958+
req.user = self.user
953959
r = self.stub.queryLaunchActivity(req)
954960
return to_dict(r)
955961
def is_permission_granted(self, permission):
@@ -958,20 +964,23 @@ def is_permission_granted(self, permission):
958964
"""
959965
req = protos.ApplicationRequest(name=self.applicationId,
960966
permission=permission)
967+
req.user = self.user
961968
r = self.stub.isPermissionGranted(req)
962969
return r.value
963970
def delete_cache(self):
964971
"""
965972
清空应用的缓存数据(非数据仅缓存)
966973
"""
967974
req = protos.ApplicationRequest(name=self.applicationId)
975+
req.user = self.user
968976
r = self.stub.deleteApplicationCache(req)
969977
return r.value
970978
def reset_data(self):
971979
"""
972980
清空应用的所有数据
973981
"""
974982
req = protos.ApplicationRequest(name=self.applicationId)
983+
req.user = self.user
975984
r = self.stub.resetApplicationData(req)
976985
return r.value
977986
def reset(self):
@@ -981,62 +990,71 @@ def start(self):
981990
启动应用
982991
"""
983992
req = protos.ApplicationRequest(name=self.applicationId)
993+
req.user = self.user
984994
r = self.stub.startApplication(req)
985995
return r.value
986996
def stop(self):
987997
"""
988998
停止应用
989999
"""
9901000
req = protos.ApplicationRequest(name=self.applicationId)
1001+
req.user = self.user
9911002
r = self.stub.stopApplication(req)
9921003
return r.value
9931004
def info(self):
9941005
"""
9951006
获取应用信息
9961007
"""
9971008
req = protos.ApplicationRequest(name=self.applicationId)
1009+
req.user = self.user
9981010
r = self.stub.applicationInfo(req)
9991011
return r
10001012
def uninstall(self):
10011013
"""
10021014
卸载应用 (always return true)
10031015
"""
10041016
req = protos.ApplicationRequest(name=self.applicationId)
1017+
req.user = self.user
10051018
r = self.stub.uninstallApplication(req)
10061019
return r.value
10071020
def enable(self):
10081021
"""
10091022
启用应用
10101023
"""
10111024
req = protos.ApplicationRequest(name=self.applicationId)
1025+
req.user = self.user
10121026
r = self.stub.enableApplication(req)
10131027
return r.value
10141028
def disable(self):
10151029
"""
10161030
禁用应用(这将使应用从启动器消失)
10171031
"""
10181032
req = protos.ApplicationRequest(name=self.applicationId)
1033+
req.user = self.user
10191034
r = self.stub.disableApplication(req)
10201035
return r.value
10211036
def add_to_doze_mode_whitelist(self):
10221037
"""
10231038
将APP加入省电白名单(可以一直运行,可能不会覆盖所有系统)
10241039
"""
10251040
req = protos.ApplicationRequest(name=self.applicationId)
1041+
req.user = self.user
10261042
r = self.stub.addToDozeModeWhiteList(req)
10271043
return True
10281044
def remove_from_doze_mode_whitelist(self):
10291045
"""
10301046
将APP移除省电白名单 (always return true)
10311047
"""
10321048
req = protos.ApplicationRequest(name=self.applicationId)
1049+
req.user = self.user
10331050
r = self.stub.removeFromDozeModeWhiteList(req)
10341051
return True
10351052
def is_installed(self):
10361053
"""
10371054
检查应用是否已经安装
10381055
"""
10391056
req = protos.ApplicationRequest(name=self.applicationId)
1057+
req.user = self.user
10401058
r = self.stub.isInstalled(req)
10411059
return r.value
10421060

@@ -1086,8 +1104,8 @@ def install_local_file(self, fpath):
10861104
req = protos.ApplicationRequest(path=fpath)
10871105
r = self.stub.installFromLocalFile(req)
10881106
return r
1089-
def __call__(self, applicationId):
1090-
return ApplicationOpStub(self.stub, applicationId)
1107+
def __call__(self, applicationId, user=0):
1108+
return ApplicationOpStub(self.stub, applicationId, user)
10911109

10921110

10931111
class StorageOpStub:
@@ -1893,8 +1911,8 @@ def get_last_activities(self, count=3):
18931911
return self.stub("Application").get_last_activities(count=count)
18941912
def start_activity(self, **activity):
18951913
return self.stub("Application").start_activity(**activity)
1896-
def application(self, applicationId):
1897-
return self.stub("Application")(applicationId)
1914+
def application(self, applicationId, user=0):
1915+
return self.stub("Application")(applicationId, user=user)
18981916
# 快速调用: Util
18991917
def record_touch(self):
19001918
return self.stub("Util").record_touch()

lamda/rpc/application.proto

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ message ApplicationRequest {
1818
string permission = 2;
1919
GrantType mode = 3;
2020
string path = 4;
21+
uint32 user = 5;
2122
}
2223

2324
message ApplicationActivityRequest {
@@ -30,6 +31,7 @@ message ApplicationActivityRequest {
3031
int64 flags = 7;
3132
bool debug = 8;
3233
string data = 9;
34+
uint32 user = 10;
3335
}
3436

3537
message ApplicationActivityInfo {

0 commit comments

Comments
 (0)