droid_adbs 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/droid_adbs/commons/settings.rb +19 -0
- data/lib/droid_adbs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 562d2ad3173a61cf6cc898fa6863941e01efe149
|
4
|
+
data.tar.gz: 124efc1ee1940fbe207f968588ec6d9ae39914a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deb84e6c216d27885369f3bf6e4a7438e5a3c329b87cf57daed71c39fd5814bbd2f43ed0c0ee4cce471f2137fd28ebc9e0085c57296882c2c9c3c6a96f5e7517
|
7
|
+
data.tar.gz: 41dbb6d1944024639d3e9c7bba9e5517396cca95431516a55b65f50dfe549e56d5181a463a72d63b70a91999b0735136570b4c1b290a0a24793c2354aa9ed69e
|
@@ -66,6 +66,25 @@ module DroidAdbs
|
|
66
66
|
`#{::DroidAdbs.shell} date -s #{yyyymmdd}.#{hhmmss}`.strip
|
67
67
|
end
|
68
68
|
|
69
|
+
# Only for rooted devices.
|
70
|
+
#
|
71
|
+
# Default SET format is "MMDDhhmm[[CC]YY][.ss]", that's (2 digits each)
|
72
|
+
# month, day, hour (0-23), and minute. Optionally century, year, and second.
|
73
|
+
# 060910002016.00
|
74
|
+
# Thu Jun 9 10:00:00 GMT 2016
|
75
|
+
# @example
|
76
|
+
#
|
77
|
+
# # Error case
|
78
|
+
# ::DroidAdbs::Settings.set_date '060910002016.00' #=> "date: cannot set date: Operation not permitted\r\nThu Jun 9 10:00:00 JST 2016"
|
79
|
+
#
|
80
|
+
def set_date(date)
|
81
|
+
turn_auto_time_off
|
82
|
+
result = `#{::DroidAdbs.shell} date #{date}`.strip
|
83
|
+
`#{::DroidAdbs.shell} am broadcast -a android.intent.action.TIME_SET`
|
84
|
+
|
85
|
+
result
|
86
|
+
end
|
87
|
+
|
69
88
|
# animation settings
|
70
89
|
# @return [String] message from adb command
|
71
90
|
def turn_all_animation_off
|
data/lib/droid_adbs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: droid_adbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|