File tree Expand file tree Collapse file tree 4 files changed +56
-16
lines changed Expand file tree Collapse file tree 4 files changed +56
-16
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,11 @@ Future<void> initializeAppConfigs({bool loadWallet = true}) async {
203
203
final trades = await CakeHive .openBox <Trade >(Trade .boxName, encryptionKey: tradesBoxKey);
204
204
final orders = await CakeHive .openBox <Order >(Order .boxName, encryptionKey: ordersBoxKey);
205
205
final walletInfoSource = await CakeHive .openBox <WalletInfo >(WalletInfo .boxName);
206
+ if (walletInfoSource.length == 0 ) {
207
+ printV ("WalletInfo corrupted: length == 0" );
208
+ } else {
209
+ printV ("WalletInfo normal: ${walletInfoSource .length }" );
210
+ }
206
211
final templates = await CakeHive .openBox <Template >(Template .boxName);
207
212
final exchangeTemplates = await CakeHive .openBox <ExchangeTemplate >(ExchangeTemplate .boxName);
208
213
final anonpayInvoiceInfo = await CakeHive .openBox <AnonpayInvoiceInfo >(AnonpayInvoiceInfo .boxName);
Original file line number Diff line number Diff line change
1
+ # Debug scripts
2
+
3
+ ## ` display_fuzzer_stats.sh `
4
+
5
+ Displays wallet fuzzer statistics in one screen for every emulator
6
+
7
+ ## ` record_tap.sh `
8
+
9
+ Used to configure wallet_fuzzer.sh - to unlock wallet and start fuzzer (or any action we wish to test)
10
+
11
+ ## ` wallet_fuzzer.sh `
12
+
13
+ Main logic to start wallet fuzzing scripts
14
+
15
+ ## Extras
16
+
17
+ In order to install app on all devices you can run the following command:
18
+
19
+ ``` bash
20
+ for device in $( adb devices | grep -w " device" | awk ' {print $1}' ) ; do
21
+ echo " Installing on $device ..."
22
+ adb -s $device install -r build/app/outputs/flutter-apk/app-debug.apk
23
+ done
24
+ ```
25
+
26
+ To watch for some log message:
27
+
28
+ ``` bash
29
+ for device in $( adb devices | grep -w " device" | awk ' {print $1}' ) ; do
30
+ echo " Watching logs on $device ..."
31
+ adb -s " $device " logcat | grep --line-buffered " WalletInfo corrupted" | sed " s/^/[$device ] /" &
32
+ done
33
+
34
+ wait
35
+ ```
Original file line number Diff line number Diff line change @@ -127,6 +127,6 @@ adb shell getevent -lt "$TOUCH_DEVICE" | gawk -v sw="$SCREEN_WIDTH" -v sh="$SCRE
127
127
scaled_x = int(raw_x * sw / rx)
128
128
scaled_y = int(raw_y * sh / ry)
129
129
# Print the input tap command.
130
- printf "adb shell input tap %d %d\n", scaled_x, scaled_y
130
+ printf "adb -s \$device_id shell input tap %d %d\n", scaled_x, scaled_y
131
131
}
132
132
'
Original file line number Diff line number Diff line change @@ -26,21 +26,21 @@ function start_app() {
26
26
# and then copy the output into the adb shell input tap commands below.
27
27
# make sure to tap very briefly, otherwise multiple events will be generated.
28
28
sleep 6
29
- adb -s $device_id shell input tap 602 1940
30
- sleep 2.664044
31
- adb -s $device_id shell input tap 473 1923
32
- sleep 2.713335
33
- adb -s $device_id shell input tap 459 2021
34
- sleep 2.668894
35
- adb -s $device_id shell input tap 515 2027
36
- sleep 3.871710
37
- adb -s $device_id shell input tap 977 141
38
- sleep 4.263207
39
- adb -s $device_id shell input tap 635 1801
40
- sleep 3.804010
41
- adb -s $device_id shell input tap 289 757
42
- sleep 3.833263
43
- adb -s $device_id shell input tap 962 2176
29
+ adb -s $device_id shell input tap 435 1982
30
+ sleep 2.596161
31
+ adb -s $device_id shell input tap 532 1920
32
+ sleep 2.583818
33
+ adb -s $device_id shell input tap 594 1973
34
+ sleep 2.549104
35
+ adb -s $device_id shell input tap 539 2072
36
+ sleep 3.529221
37
+ adb -s $device_id shell input tap 979 139
38
+ sleep 3.287868
39
+ adb -s $device_id shell input tap 430 1645
40
+ sleep 2.325175
41
+ adb -s $device_id shell input tap 368 1784
42
+ sleep 2.461983
43
+ adb -s $device_id shell input tap 442 2164
44
44
}
45
45
46
46
function stop_app() {
You can’t perform that action at this time.
0 commit comments