Answer the question
In order to leave comments, you need to log in
How can I push a phone directory in the second space using ADB?
Good day everyone! I use Xiaomi Redmi Note 7/8 phone, in the first space (main) the script works well. Files are transferred without problems. But for some reason ADB does not see the second space.
How can transfer between PC and smartphone in second space using adb?
def transfer_file(self, file_path,delete=True):
self.clear_folder(self.android_path)
print(f'...Передаю Файл {file_path}...')
self.transfer_file_name = file_path.split('/')[-1]
# пушим файл через адб
self.adb.cmd(f'push {file_path} {self.android_path}')
print(f'...Обновляю Папку {self.android_path}...')
# обновляем хранилище через активити менеджер, чтобы прилка увидела файл
self.adb.cmd(f'shell am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:{self.android_path}')
if delete == True:
print(f'...Удаляю Файл {file_path} c PC...')
Path(file_path).unlink()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question