def getIp(): iptxt = ip.get() if iptxt == '': messagebox.showerror('[ERRO]', 'Campo vazio') else: print(iptxt) #system(f'adb connect {iptxt}:5555') write_log(f'adb connect {iptxt}:5555') #system('adb devices') write_log('adb devices') janela2.destroy()
def enviar_arq(): if a == 0: print('pc: ' + pasta) arq_do_celular = phone_arq.get(1.0, END) print('phone: ' + arq_do_celular) #system(f'adb pull "{arq_do_celular}" "{pasta}"') write_log(f'adb pull "{arq_do_celular}" "{pasta}"') if a == 1: arq_do_celular = phone_arq.get(1.0, END) print('phone: ' + arq_do_celular) #system(f'adb push "{arq_do_pc}" "{arq_do_celular}"') write_log(f'adb push "{arq_do_pc}" "{arq_do_celular}"')
def adb_connect(): #system('adb devices') write_log('adb devices') def getIp(): iptxt = ip.get() if iptxt == '': messagebox.showerror('[ERRO]', 'Campo vazio') else: print(iptxt) #system(f'adb connect {iptxt}:5555') write_log(f'adb connect {iptxt}:5555') #system('adb devices') write_log('adb devices') janela2.destroy() def disconnect_function(): #system('adb disconnect') write_log('adb disconnect') janela2 = Toplevel(janela) janela2.title('IP') ipLabel = Label(janela2, text='IP') ipLabel.pack() ip = Entry(janela2) ip.pack() ipButton = Button(janela2, width=12, text='connect', command=getIp) ipButton.pack() disconnectButton = Button(janela2, width=12, text='disconnect', command=disconnect_function) disconnectButton.pack() janela2.transient(janela) janela2.focus_force() janela2.grab_set() janela2.geometry('200x200') janela2.mainloop()
def start_mirro(): count = 0 for c in range(10): nome = count if path.exists('fotos') == False: write_log('mkdir fotos') write_log(f'adb shell screenrecord --time-limit 5 /sdcard/{nome}.mp4') write_log(f'adb pull /sdcard/{nome}.mp4 fotos') write_log(f'adb shell "cd /sdcard/ && rm {nome}.mp4"') count+=1
def record_screen_finsh(): try: if verificar_chose_folder == 0: tempo = timeEntry.get() data = datetime.now() nome = data.strftime('%d-%m-%Y-%H-%M-%S') write_log(f'adb shell screenrecord --time-limit {tempo} /sdcard/{nome}.mp4') write_log(f'adb pull /sdcard/{nome}.mp4 {pasta_para_gravacao}') write_log(f'adb shell "cd /sdcard/ && rm {nome}.mp4"') except: messagebox.showerror('[ERRO]', 'Escolha uma pasta')
def commandsadbuser(): comando = adbEntry.get() #system(f'adb {comando}') write_log(f'adb {comando}')
def send_command(): commandUser = commandEntry.get() #system(f'adb shell "{commandUser}"') write_log(f'adb shell "{commandUser}"')
def disconnect_function(): #system('adb disconnect') write_log('adb disconnect')
def recovery(): write_log('adb reboot recovery')
def fastboot(): write_log('adb reboot fastboot')
def reiniciar(): write_log('adb reboot')
def desligar(): write_log('adb shell reboot -p')