pense-bête de bruno sanchiz

Accueil > smartphones et tablettes > commandes adb

commandes adb

Publié le 23 avril 2017, dernière mise-à-jour le 15 janvier 2024, 12 visites, 23643 visites totales.

installation
apt-get install adb
adb : /usr/bin/adb

quelques commandes

adb devices # verifie l existence de la connexion ( ne pas partager les partitions ? )

  • adb shell ouvre un shell sur le smartphone
    on peut par exemple taper ls
  • adb pull /storage # télécharge /storage
  • adb kill-server
  • adb start-server
  • adb pull /mais bloque sur proc et sys

commandes pour les contacts téléphoniques

  • adb shell content query --uri content://com.android.contacts/data --projection display_name:data1:data4:contact_id
    343 lignes du type
  • adb shell content query --uri content://com.android.contacts/contacts
    146 lignes du type

    NULL, times_contacted=0, data_set=NULL, phonebook_label=D, account_type=com.lge.sync, lookup=3266r444-q0Apq00pq00pq0Apq00pq0Apq0Apq00pq00pq00pq0Apq0Apq0Apq00pq00pq00pq00pq00pq0Apq00p, display_name_alt=dentiste, phonetic_name=NULL, has_email=1, last_time_contacted=0, contact_last_updated_timestamp=1656077229710, in_visible_group=1, is_user_profile=0, method_selected=0, sort_key_alt=dentiste escriva msa, contact_presence=NULL, cost_save=NULL, name_raw_contact_id=444, phonetic_name_style=0, send_to_voicemail=0, custom_vibration_type=0, pinned=0, contact_status_label=NULL, contact_status=NULL, message_notification_path=NULL, sync_uid=0, single_is_restricted=0, phonebook_bucket=4, contact_status_res_package=NULL, in_default_directory=1, message_notification=NULL, _id=445, custom_ringtone_path=NULL, custom_led_type=0, yp_source=NULL, has_phone_number=1, photo_file_id=NULL, display_name_source=40, contact_status_ts=NULL, phonebook_bucket_alt=4, single_is_read_only=0, starred=0, photo_thumb_uri=NULL, contact_status_icon=NULL, account_name=Phone, contact_chat_capability=NULL, sourceid=NULL, rcs_is_rcs=NULL

  • adb shell content query --uri content://com.android.contacts/groups
    3 lignes du type
  • adb shell content query --uri content://contacts/phones/
    0 ligne
  • adb shell content query --uri content://contacts/groups/
    0 ligne
  • adb shell content query --uri content://contacts/groupmembership/
    0 ligne
  • adb shell content query --uri content://contacts/organizations/
    0 ligne

#d’après https://stackoverflow.com/questions/25927731/android-adb-command-to-get-total-contacts-on-device

Lister toutes les applis installées sur votre smartphone :

adb shell pm list packages

Lister les applis « google »

adb shell pm list packages | grep google

Lister les applications qui sont désactivées :

adb shell pm list packages -d

#d’aptrès https://tutox.fr/2019/04/14/android-comment-desinstaller-ses-spyware-tuto-n2/

complete list of adb commands : https://developer.android.com/studio/command-line/adb.html

voir aussi Envoyer un sms avec son ordinateur

[bruno sanchiz]