MCPcopy Create free account
hub / github.com/XiaoMi/mace / install

Method install

tools/python/utils/device.py:151–176  ·  view source on GitHub ↗
(self, target, install_dir, install_deps=False)

Source from the content-addressed store, hash-verified

149 return devices
150
151 def install(self, target, install_dir, install_deps=False):
152 install_dir = os.path.abspath(install_dir)
153 sn = self._device_id
154
155 execute("adb -s %s shell mkdir -p %s" % (sn, install_dir))
156 if os.path.isdir(target.path):
157 execute("adb -s %s push %s/* %s" % (sn, target.path, install_dir),
158 False)
159 else:
160 execute("adb -s %s push %s %s" % (sn, target.path, install_dir),
161 False)
162
163 for lib in target.libs:
164 execute("adb -s %s push %s %s" % (sn, lib, install_dir), False)
165
166 device_target = copy.deepcopy(target)
167 device_target.path = "%s/%s" % (install_dir,
168 os.path.basename(target.path))
169 device_target.libs = ["%s/%s" % (install_dir, os.path.basename(lib))
170 for lib in target.libs]
171 device_target.envs.append("LD_LIBRARY_PATH=%s" % install_dir)
172
173 if install_deps:
174 self.install_common_libs_for_target(target, install_dir)
175
176 return device_target
177
178 def install_common_libs_for_target(self, target, install_dir):
179 sn = self._device_id

Callers

nothing calls this directly

Calls 2

executeFunction · 0.85

Tested by

no test coverage detected