Outils pour utilisateurs

Outils du site


tech:telephone_portable_android_connexion_pc_sous_gnu_linux

Ceci est une ancienne révision du document !


Téléphone portable Android connexion PC sous GNU/Linux

Notes adb

Préreq :

  1. le mode debug USB doit être activé
  2. le debug doit être autorisé. Si pas le cas passez en “Photo transfer (PTP) mode”

Install

apt-get install android-tools-adb

Autre outils ?

apt-cache search android-tools
android-tools-adb - Android Debug Bridge CLI tool
android-tools-fsutils - Android ext4 utilities with sparse support
android-tools-fastboot - outil en ligne de commande pour le protocole Fastboot d'Android

Connexion

adb start-server
adb devices
lsusb
Bus 002 Device 005: ID 0e8d:201d MediaTek Inc

~/.android/adb_usb.ini

# 0xidVendorHere
0x0e8d

ou

export ADB_VENDOR_KEYS=0x0e8d

Redémarrage d'adb pour le prise en compte de la modif

adb start-server
adb kill-server

Copie

adb push plop.txt /sdcard/

App

Dépôts alternatifs

Voir aussi :

Install de F-Droid un dépôt de Logiciel Libre

wget https://f-droid.org/FDroid.apk
adb install FDroid.apk

Mise à jour

adb install -r cartes-gps-navigation-osmand.apk

Liste des applis installées

adb shell 'pm list packages -f'

Exemple sauvegarde

#adb backup -apk -shared -all -f backup.ab
adb backup '-apk -shared -all -f backup.ab'

Tar du fichier de sauvegarde

tail -n +5 backup.ab |pigz -d -z  > backup.tar
dd if=backup.ab bs=24 skip=1 |pigz -d -z  > backup.tar

Notes fastboot

Voir :

Prerequisites:

  • unlocked bootloader
  • adb and fastboot installed on your computer
adb reboot bootloader
#fastboot flash recovery twrp-2.8.x.x-xxx.img
fastboot flash system <ROM file here>
fastboot reboot

Source : https://www.thecustomdroid.com/how-to-unlock-bootloader-on-huawei-devices/

adb reboot bootloader
fastboot devices
fastboot oem unlock 2155388422526005
fastboot getvar unlocked
fastboot reboot

Source : https://www.kingoapp.com/root-tutorials/how-to-unlock-bootloader-android-device.htm

apt-get install android-tools-fastboot
 
fastboot devices
fastboot oem unlock
 
# Après confirmation sur le téléphone : 
fastboot reboot

Recovery Fastboot https://www.androidpit.com/forum/731450/wiko-sunny-how-to-get-twrp-recovery-installed

fastboot devices
fastboot oem unlock
 
fastboot flash recovery recovery.img
 
fastbook
fastboot oem unlock
< waiting for device >

Partage de fichier - montage lecteur

Partage MTP (Transfère de fichiers)

apt-get install mtp-tools jmtpfs mtpfs

avec interface graphique

apt-get install gmtp
mkdir ~/mnt/mtp/
jmtpfs ~/mnt/mtp/
rsync -ax /media/cdrom/ mnt/mtp/Carte\ SD/plop/
fusermount ~/mnt/mtp/

Partage PTP (Transfère de photos)

Pb

$ adb install cartes-gps-navigation-osmand.apk 
4529 KB/s (18980364 bytes in 4.092s)
        pkg: /data/local/tmp/cartes-gps-navigation-osmand.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]

$ adb install -r cartes-gps-navigation-osmand.apk 
4861 KB/s (18980364 bytes in 3.812s)
        pkg: /data/local/tmp/cartes-gps-navigation-osmand.apk
 Success

Autres

Logs

adb logcat | grep $(adb shell ps | grep org.smssecure.smssecure | cut -c10-15)
logcat -C -b crash,system,main 'bash:S logcat:S mali_winsys:S *:I'

Droits appli

adb shell pm grant uk.co.richyhbm.monochromatic android.permission.WRITE_SECURE_SETTINGS

root access
https://f-droid.org/wiki/page/Should_I_root_my_device%3F

debian
https://www.debian-fr.org/t/debian-kit-debian-en-parallele-dandroid-sans-chroot/59967

Sécurité Sources inconnues Autoriser l'installation d'application issue de sources inconnues

wget http://download.clockworkmod.com/superuser/superuser.zip
 
mkdir plop
cd plop
unzip ../superuser.zip
 
adb kill-server
$ adb root
adbd cannot run as root in production builds

Note root wiko

SuperSU TWRP ( Team Win Recovery Project)

wipe dalvik/cache

Changer son IMEI ? https://play.google.com/store/apps/details?id=com.cryptotel.chamelephon

adb shell getprop ro.build.version.release
adb shell getprop |grep ro.build.version.release

Autres

Désinstaller une application système

adb shell pm uninstall -k --user 0 foundation.e.mail
tech/telephone_portable_android_connexion_pc_sous_gnu_linux.1764439850.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki