forked from guoqiao/ansible-android-termux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadb.yaml
executable file
·41 lines (34 loc) · 1.01 KB
/
adb.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env ansible-playbook
- name: run adb from ubuntu desktop to automate tasks on android
hosts: localhost
gather_facts: no
tasks:
- name: enable developer mode
debug:
msg: |
MIUI -> Settings -> About phone -> MIUI version > click 5 times
- name: enable developer mode
debug:
msg: |
MIUI -> Settings -> Additional settings -> Developer options, enable these:
- USB debugging
- Install via USB
- USB debugging (Security settings)
- Default USB configuration -> File Transfer
- name: apt install packages
become: yes
apt:
name: adb
update_cache: yes
- command: adb devices -l
tags: install
- name: find downloaded apks
find:
paths: "{{ playbook_dir }}/download"
patterns: "*.apk"
register: find
tags: install
- name: adb install apks
shell: adb install {{ item.path }} || true
loop: "{{ find.files }}"
tags: install