Example #1
0
        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()
Example #2
0
 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}"')
Example #3
0
    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()
Example #4
0
        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
Example #5
0
 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')
Example #6
0
 def commandsadbuser():
     comando = adbEntry.get()
     #system(f'adb {comando}')
     write_log(f'adb {comando}')
Example #7
0
 def send_command():
     commandUser = commandEntry.get()
     #system(f'adb shell "{commandUser}"')
     write_log(f'adb shell "{commandUser}"')
Example #8
0
 def disconnect_function():
     #system('adb disconnect')
     write_log('adb disconnect')
Example #9
0
 def recovery():
     write_log('adb reboot recovery')
Example #10
0
 def fastboot():
     write_log('adb reboot fastboot')
Example #11
0
 def reiniciar():
     write_log('adb reboot')
Example #12
0
 def desligar():
     write_log('adb shell reboot -p')