MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / push_minitouch

Method push_minitouch

source/MaaAdbControlUnit/Input/MtouchHelper.cpp:94–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94bool MtouchHelper::push_minitouch()
95{
96 if (!invoke_app_->init()) {
97 return false;
98 }
99
100 auto archs = invoke_app_->abilist();
101 if (!archs) {
102 return false;
103 }
104
105 auto arch_iter = std::ranges::find_first_of(*archs, arch_list_);
106 if (arch_iter == archs->end()) {
107 LogError << "no matching arch for minitouch" << VAR(*archs) << VAR(arch_list_);
108 return false;
109 }
110 const std::string& target_arch = *arch_iter;
111
112 const auto bin_path = agent_path_ / path(target_arch) / path("minitouch");
113 if (!invoke_app_->push(bin_path)) {
114 return false;
115 }
116
117 if (!invoke_app_->chmod()) {
118 return false;
119 }
120
121 return true;
122}
123
124void MtouchHelper::remove_binary()
125{

Callers

nothing calls this directly

Calls 4

abilistMethod · 0.80
pushMethod · 0.80
chmodMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected