File: copy_profile_icons.sh

package info (click to toggle)
android-framework-23 6.0.1%2Br72-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 233,196 kB
  • sloc: java: 1,707,033; xml: 247,323; cpp: 211,819; ansic: 2,748; python: 2,640; sh: 1,506; yacc: 343; lex: 214; ruby: 183; perl: 88; makefile: 63; sed: 19
file content (14 lines) | stat: -rwxr-xr-x 415 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

for user in `adb $* shell ls /data/system/users | grep -v xml`
do
  user=${user/$'\r'/}
  adb shell mkdir /data/user/${user}/users
  for photo in `adb $* shell ls /data/system/users | grep -v xml`
  do
    photo=${photo/$'\r'/}
    adb shell mkdir /data/user/${user}/users/${photo}
    adb pull /data/system/users/${photo}/photo.png
    adb push photo.png /data/user/${user}/users/${photo}
  done
done