-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHarmDmp.ps1
57 lines (55 loc) · 1.52 KB
/
HarmDmp.ps1
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
param
(
[Parameter(Position=0)]
[string]$name=$null,
[Parameter(Mandatory=$false)]
[switch]$raw,
[Parameter(Mandatory=$false)]
[switch]$all
)
if($name.Length -eq 36)
{
if($raw)
{
$ret = (adb shell run-as TestHarmAndoird.TestHarmAndoird cat /data/data/TestHarmAndoird.TestHarmAndoird/files/.config/$name.json)
}
else
{
$ret = (adb shell run-as TestHarmAndoird.TestHarmAndoird cat /data/data/TestHarmAndoird.TestHarmAndoird/files/.config/$name.json | ConvertFrom-Json)
}
}
else
{
$l=(adb shell run-as TestHarmAndoird.TestHarmAndoird ls /data/data/TestHarmAndoird.TestHarmAndoird/files/.config)
foreach($f in $l)
{
if($f.Length -eq 41)
{
$i = (adb shell run-as TestHarmAndoird.TestHarmAndoird cat /data/data/TestHarmAndoird.TestHarmAndoird/files/.config/$f | ConvertFrom-Json)
if($i.SongInfo.Name -eq $name)
{
$ret = $i
# if($all)
# {
# echo "$($i.SongInfo.Name) v$($i.SongInfo.Version) lc=$($i.Lyrics.Count) lrc=$($i.LyricRefs.Count)"
# echo $f
# return $i | Format-List
# }
# else
# {
# return $i
# }
}
}
}
}
if($all -and $raw -ne $true)
{
echo "$($i.SongInfo.Name) v$($i.SongInfo.Version) lc=$($i.Lyrics.Count) lrc=$($i.LyricRefs.Count)"
echo $f
return $i | Format-List
}
else
{
return $ret
}