-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi_list.txt
590 lines (493 loc) · 40 KB
/
api_list.txt
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# DroidMate, an automated execution generator for Android apps.
# Copyright (C) 2012-2016 Konrad Jamrozik
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# email: [email protected]
# web: www.droidmate.org
# This file defines list of Android SDK APIs monitored during DroidMate run.
#
# The methods are written in the "class" file format
# http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.3
# with the optional " static" word appended at the end. Please note the space at the beginning.
#
# ------
#
# The list was originally adapted from AppGuard from MonitorInitializer.java.
# Details of that .java file are explained in a private repository:
# https://hg.st.cs.uni-saarland.de/projects/droidmate-private/repository/revisions/master/entry/resources/from_Philipp/appguard_apis_list_origin.txt
#
# The manual adaptations of this list were made to make it compatible with
# API19 / Android 4.4.4-r2.0.1 [1] and API2 / Android 6.0.1_r63 [2]
# [1] https://android.googlesource.com/platform/frameworks/base.git/+/android-4.4.4_r2.0.1
# [2] https://android.googlesource.com/platform/frameworks/base.git/+/android-6.0.1_r63
#
# The first set of modifications, to make sure the methods work on API 19, were done by
# 1. deploying the instrumented monitored app on the device,
# 2. observing the logcat messages with "Instrumentation" tag,
# 3. diagnosing any failures and comparing the list definitions with the official source,
# 4. fixing the list and writing down the findings in comments in this file.
#
# The second of set of modifications was done in similar way, but with API23 which uses ArtHook.
# To understand how to diagnose method signatures here that cannot be handled by ArtHook (which is used for Android 6),
# read the class comment of org.droidmate.monitor.RedirectionsGenerator
#
# ------
#
# Entries starting with !API19 will be skipped when running on Android 4 (API 19) because they do not exist there.
# Entries starting with !API23 will be skipped when running on Android 6 (API 23) because they do not exist there.
#
Landroid/app/ActivityThread;->installContentProviders(Landroid/content/Context;Ljava/util/List;)V
Landroid/app/ActivityManager;->getRecentTasks(II)Ljava/util/List;
Landroid/app/ActivityManager;->getRunningTasks(I)Ljava/util/List;
# Instrumentation fails with:
# 10-09 14:30:21.916 2435-2435/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.app.ActivityManagerNative->getRecentTasks
#
# The failed method source is in [1]. Note it has three int params not two, as originally defined.
# However, both versions fail to instrument. Maybe reason for that is the class is annotated with @hide [2]
#
# [1] https://github.com/android/platform_frameworks_base/blob/android-4.4.4_r2.0.1/core/java/android/app/ActivityManagerNative.java#L2554
# [2] https://github.com/android/platform_frameworks_base/blob/android-4.4.4_r2.0.1/core/java/android/app/ActivityManagerNative.java#L52
#
# This is the original method, whose instrumentation fails:
#Landroid/app/ActivityManagerNative;->getRecentTasks(II)Ljava/util/List;
# This is the manually modified method, matching the source, whose instrumentation also fails:
#Landroid/app/ActivityManagerNative;->getRecentTasks(III)Ljava/util/List;
# Note: there are many other methods in this class [1] requiring BLUETOOTH or other similar permissions, yet they are not monitored.
# [1] https://github.com/android/platform_frameworks_base/blob/android-4.4.4_r2.0.1/core/java/android/bluetooth/BluetoothHeadset.java
#
Landroid/bluetooth/BluetoothHeadset;->startVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z
Landroid/bluetooth/BluetoothHeadset;->stopVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z
# Instrumentation fails:
# 10-09 17:46:18.976 7461-7461/? W/Instrumentation? Failed to redirect method android.bluetooth.HeadsetBase->acquireWakeLock
# 10-09 17:46:18.976 7461-7461/? W/Instrumentation? Failed to redirect method android.bluetooth.HeadsetBase->releaseWakeLock
#
# This class seems to have been removed in Android 4.1 (API 16)
# Still present:
# https://github.com/android/platform_frameworks_base/blob/android-cts-4.1_r4/core/java/android/bluetooth/HeadsetBase.java#L279
# Not any more (404)
# https://github.com/android/platform_frameworks_base/tree/android-cts-4.2_r1/core/java/android/bluetooth/HeadsetBase.java
#
#Landroid/bluetooth/HeadsetBase;->acquireWakeLock()V
#Landroid/bluetooth/HeadsetBase;->releaseWakeLock()V
# Just delegates to the call below. See:
# https://github.com/android/platform_frameworks_base/blob/android-4.4.4_r2.0.1/core/java/android/hardware/Camera.java#L319
#
#Landroid/hardware/Camera;->open()Landroid/hardware/Camera;
# Added "static" modifier
#
Landroid/hardware/Camera;->open(I)Landroid/hardware/Camera; static
Landroid/location/LocationManager;->addGpsStatusListener(Landroid/location/GpsStatus$Listener;)Z
Landroid/location/LocationManager;->addNmeaListener(Landroid/location/GpsStatus$NmeaListener;)Z
Landroid/location/LocationManager;->addProximityAlert(DDFJLandroid/app/PendingIntent;)V
Landroid/location/LocationManager;->addTestProvider(Ljava/lang/String;ZZZZZZZII)V
Landroid/location/LocationManager;->clearTestProviderEnabled(Ljava/lang/String;)V
Landroid/location/LocationManager;->clearTestProviderLocation(Ljava/lang/String;)V
Landroid/location/LocationManager;->clearTestProviderStatus(Ljava/lang/String;)V
Landroid/location/LocationManager;->getBestProvider(Landroid/location/Criteria;Z)Ljava/lang/String;
Landroid/location/LocationManager;->getLastKnownLocation(Ljava/lang/String;)Landroid/location/Location;
Landroid/location/LocationManager;->getProvider(Ljava/lang/String;)Landroid/location/LocationProvider;
Landroid/location/LocationManager;->getProviders(Landroid/location/Criteria;Z)Ljava/util/List;
Landroid/location/LocationManager;->getProviders(Z)Ljava/util/List;
Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z
Landroid/location/LocationManager;->removeTestProvider(Ljava/lang/String;)V
Landroid/location/LocationManager;->requestLocationUpdates(JFLandroid/location/Criteria;Landroid/app/PendingIntent;)V
Landroid/location/LocationManager;->requestLocationUpdates(JFLandroid/location/Criteria;Landroid/location/LocationListener;Landroid/os/Looper;)V
Landroid/location/LocationManager;->requestLocationUpdates(Ljava/lang/String;JFLandroid/app/PendingIntent;)V
Landroid/location/LocationManager;->requestLocationUpdates(Ljava/lang/String;JFLandroid/location/LocationListener;)V
Landroid/location/LocationManager;->requestLocationUpdates(Ljava/lang/String;JFLandroid/location/LocationListener;Landroid/os/Looper;)V
Landroid/location/LocationManager;->requestSingleUpdate(Landroid/location/Criteria;Landroid/app/PendingIntent;)V
Landroid/location/LocationManager;->requestSingleUpdate(Landroid/location/Criteria;Landroid/location/LocationListener;Landroid/os/Looper;)V
Landroid/location/LocationManager;->requestSingleUpdate(Ljava/lang/String;Landroid/app/PendingIntent;)V
Landroid/location/LocationManager;->requestSingleUpdate(Ljava/lang/String;Landroid/location/LocationListener;Landroid/os/Looper;)V
Landroid/location/LocationManager;->sendExtraCommand(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Z
Landroid/location/LocationManager;->setTestProviderEnabled(Ljava/lang/String;Z)V
Landroid/location/LocationManager;->setTestProviderLocation(Ljava/lang/String;Landroid/location/Location;)V
Landroid/location/LocationManager;->setTestProviderStatus(Ljava/lang/String;ILandroid/os/Bundle;J)V
Landroid/media/AudioManager;->isBluetoothA2dpOn()Z
Landroid/media/AudioManager;->isWiredHeadsetOn()Z
Landroid/media/AudioManager;->setBluetoothScoOn(Z)V
Landroid/media/AudioManager;->setMicrophoneMute(Z)V
Landroid/media/AudioManager;->setMode(I)V
Landroid/media/AudioManager;->setParameter(Ljava/lang/String;Ljava/lang/String;)V
Landroid/media/AudioManager;->setParameters(Ljava/lang/String;)V
Landroid/media/AudioManager;->setSpeakerphoneOn(Z)V
Landroid/media/AudioManager;->startBluetoothSco()V
Landroid/media/AudioManager;->stopBluetoothSco()V
Landroid/media/AudioRecord;-><init>(IIIII)V
Landroid/media/MediaPlayer;->setWakeMode(Landroid/content/Context;I)V
Landroid/media/MediaRecorder;->setAudioSource(I)V
Landroid/media/MediaRecorder;->setVideoSource(I)V
Landroid/net/ConnectivityManager;->requestRouteToHost(II)Z
# Update 19 Apr 2016
# This method no longer exists on Android 6 / API 23. Source:
# https://github.com/android/platform_frameworks_base/blob/android-6.0.1_r31/core/java/android/net/ConnectivityManager.java
# Some discussion what might have replaced it: http://stackoverflow.com/questions/26539445/the-setmobiledataenabled-method-is-no-longer-callable-as-of-android-l-and-later
!API23 Landroid/net/ConnectivityManager;->setMobileDataEnabled(Z)V
Landroid/net/ConnectivityManager;->setNetworkPreference(I)V
# Instrumentation fails:
# 10-09 17:46:19.376 7461-7461/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.net.ConnectivityManager->setRadio
#
# Reason: not present in source at all, only the second variant of this method, which instruments successfully, is present [1]
# [1] https://github.com/android/platform_frameworks_base/blob/android-4.4.4_r2.0.1/core/java/android/net/ConnectivityManager.java#L722
#
#Landroid/net/ConnectivityManager;->setRadio(ILjava/lang/String;)I
# Note: this instruments successfully even though it has @hide annotation!
#
# Update 19 Apr 2016
# This method no longer exists on Android 6 / API 23. Source:
# https://github.com/android/platform_frameworks_base/blob/android-6.0.1_r31/core/java/android/net/ConnectivityManager.java
!API23 Landroid/net/ConnectivityManager;->setRadio(IZ)Z
# Instrumentation fails:
# 10-09 17:46:19.396 7461-7461/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.net.ConnectivityManager->setRadios
#
# Reason: not present in source at all, only the second variant of this method, which instruments successfully, is present [1]
# [1] https://github.com/android/platform_frameworks_base/blob/android-4.4.4_r2.0.1/core/java/android/net/ConnectivityManager.java#L702
#
#Landroid/net/ConnectivityManager;->setRadios(ILjava/lang/String;)I
# Note: this instruments successfully even though it has @hide annotation!
#
# Update 19 Apr 2016
# This method no longer exists on Android 6 / API 23. Source:
# https://github.com/android/platform_frameworks_base/blob/android-6.0.1_r31/core/java/android/net/ConnectivityManager.java
!API23 Landroid/net/ConnectivityManager;->setRadios(Z)Z
Landroid/net/ConnectivityManager;->startUsingNetworkFeature(ILjava/lang/String;)I
Landroid/net/ConnectivityManager;->stopUsingNetworkFeature(ILjava/lang/String;)I
Landroid/net/ConnectivityManager;->tether(Ljava/lang/String;)I
Landroid/net/ConnectivityManager;->untether(Ljava/lang/String;)I
# Insrumentation fails due to its un-workaround-able implementation limitation:
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored D/Instrumentation? TypeId not found in dexFile 0x40036910: Ljava/lang/reflect/Method;
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x40036910: invoke
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored D/Instrumentation? TypeId not found in dexFile 0x40036910: Ljava/lang/reflect/InvocationTargetException;
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x40036910: getCause
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x40036910: getTargetException
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x40036910: getCause
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored D/Instrumentation? TypeId not found in dexFile 0x40036910: Ljava/lang/reflect/InvocationTargetException;
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to generate trampoline for startAudio V
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.net.sip.SipAudioCall->startAudio to org.droidmate.monitor_generator.generated.Monitor->redir_android_net_sip_SipAudioCall_startAudio0
#
#Landroid/net/sip/SipAudioCall;->startAudio()V
# Instrumentation fails due to its un-workaround-able implementation limitation:
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored D/Instrumentation? TypeId not found in dexFile 0x40036910: Ljava/lang/Boolean;
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x40036910: valueOf
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to generate trampoline for setSpeakerMode VZ
# 10-09 17:46:19.436 7461-7461/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.net.sip.SipAudioCall->setSpeakerMode to org.droidmate.monitor_generator.generated.Monitor->redir_android_net_sip_SipAudioCall_setSpeakerMode1
#
#Landroid/net/sip/SipAudioCall;->setSpeakerMode(Z)V
Landroid/net/wifi/WifiManager$MulticastLock;->acquire()V
Landroid/net/wifi/WifiManager$MulticastLock;->release()V
Landroid/net/wifi/WifiManager$WifiLock;->acquire()V
Landroid/net/wifi/WifiManager$WifiLock;->release()V
Landroid/net/wifi/WifiManager;->addNetwork(Landroid/net/wifi/WifiConfiguration;)I
Landroid/net/wifi/WifiManager;->disableNetwork(I)Z
Landroid/net/wifi/WifiManager;->disconnect()Z
Landroid/net/wifi/WifiManager;->enableNetwork(IZ)Z
Landroid/net/wifi/WifiManager;->initializeMulticastFiltering()Z
Landroid/net/wifi/WifiManager;->pingSupplicant()Z
Landroid/net/wifi/WifiManager;->reassociate()Z
Landroid/net/wifi/WifiManager;->reconnect()Z
Landroid/net/wifi/WifiManager;->removeNetwork(I)Z
Landroid/net/wifi/WifiManager;->saveConfiguration()Z
Landroid/net/wifi/WifiManager;->setWifiApEnabled(Landroid/net/wifi/WifiConfiguration;Z)Z
Landroid/net/wifi/WifiManager;->setWifiEnabled(Z)Z
Landroid/net/wifi/WifiManager;->startScan()Z
# Instrumentation fails:
# 10-09 20:27:15.536 12024-12024/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.net.wifi.WifiManager->startScanActive
#
# Reason: there is no such method in the source:
# https://android.googlesource.com/platform/frameworks/base/+/android-4.4.4_r2.0.1/wifi/java/android/net/wifi/WifiManager.java
#
#Landroid/net/wifi/WifiManager;->startScanActive()Z
Landroid/os/PowerManager$WakeLock;->acquire()V
Landroid/os/PowerManager$WakeLock;->acquire(J)V
# REDUNDANT: just delegates to release(I)
# Source: https://android.googlesource.com/platform/frameworks/base/+/android-6.0.1_r46/core/java/android/os/PowerManager.java#1127
## Landroid/os/PowerManager$WakeLock;->release()V
Landroid/os/PowerManager$WakeLock;->release(I)V
# Instrumentation fails:
# 10-09 20:27:15.556 12024-12024/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.server.BluetoothA2dpService->resumeSink
#
# Reason: there is no such method in the source [1]. It was present in the previous versions [2].
# [1] https://github.com/android/platform_frameworks_base/blob/android-4.4.4_r2.0.1/core/java/android/bluetooth/BluetoothA2dp.java
# [2] https://github.com/android/platform_frameworks_base/blob/android-cts-4.1_r4/core/java/android/bluetooth/BluetoothA2dp.java#L396
#
#Landroid/server/BluetoothA2dpService;->resumeSink(Landroid/bluetooth/BluetoothDevice;)Z
Landroid/speech/SpeechRecognizer;->cancel()V
Landroid/speech/SpeechRecognizer;->handleCancelMessage()V
Landroid/speech/SpeechRecognizer;->handleStartListening(Landroid/content/Intent;)V
Landroid/speech/SpeechRecognizer;->handleStopMessage()V
Landroid/speech/SpeechRecognizer;->startListening(Landroid/content/Intent;)V
Landroid/speech/SpeechRecognizer;->stopListening()V
# Instrumentation fails due to its un-workaround-able implementation limitation:
# 10-09 18:21:55.646 8703-8703/? D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/Short;
# 10-09 18:21:55.646 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: valueOf
# 10-09 18:21:55.646 8703-8703/? W/Instrumentation? Failed to generate trampoline for sendDataMessage VLLSLLL
# 10-09 18:21:55.646 8703-8703/? W/Instrumentation? Failed to redirect method android.telephony.SmsManager->sendDataMessage to org.droidmate.monitor_generator.generated.Monitor->redir_android_telephony_SmsManager_sendDataMessage6
#
#Landroid/telephony/SmsManager;->sendDataMessage(Ljava/lang/String;Ljava/lang/String;S[BLandroid/app/PendingIntent;Landroid/app/PendingIntent;)V
# Instrumentation fails due to its un-workaround-able implementation limitation:
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/reflect/Method;
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: invoke
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/reflect/InvocationTargetException;
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getTargetException
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.656 8703-8703/? W/Instrumentation? Failed to generate trampoline for sendMultipartTextMessage VLLLLL
# 10-09 18:21:55.656 8703-8703/? W/Instrumentation? Failed to redirect method android.telephony.SmsManager->sendMultipartTextMessage to org.droidmate.monitor_generator.generated.Monitor->redir_android_telephony_SmsManager_sendMultipartTextMessage5
#
#Landroid/telephony/SmsManager;->sendMultipartTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V
# Instrumentation fails due to its un-workaround-able implementation limitation:
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/reflect/Method;
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: invoke
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/reflect/InvocationTargetException;
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getTargetException
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.656 8703-8703/? D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.656 8703-8703/? W/Instrumentation? Failed to generate trampoline for sendTextMessage VLLLLL
# 10-09 18:21:55.656 8703-8703/? W/Instrumentation? Failed to redirect method android.telephony.SmsManager->sendTextMessage to org.droidmate.monitor_generator.generated.Monitor->redir_android_telephony_SmsManager_sendTextMessage5
#
# Landroid/telephony/SmsManager;->sendTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)V
Landroid/telephony/TelephonyManager;->getCellLocation()Landroid/telephony/CellLocation;
Landroid/telephony/TelephonyManager;->getDeviceId()Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getDeviceSoftwareVersion()Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getLine1Number()Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getNeighboringCellInfo()Ljava/util/List;
Landroid/telephony/TelephonyManager;->getSimSerialNumber()Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getSubscriberId()Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getVoiceMailAlphaTag()Ljava/lang/String;
Landroid/telephony/TelephonyManager;->getVoiceMailNumber()Ljava/lang/String;
Landroid/telephony/TelephonyManager;->listen(Landroid/telephony/PhoneStateListener;I)V
# Instrumentation fails due to its un-workaround-able implementation limitation:
# 10-09 18:21:55.716 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/Short;
# 10-09 18:21:55.716 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: valueOf
# 10-09 18:21:55.716 8703-8703/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to generate trampoline for sendDataMessage VLLSLLL
# 10-09 18:21:55.716 8703-8703/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.telephony.gsm.SmsManager->sendDataMessage to org.droidmate.monitor_generator.generated.Monitor->redir_android_telephony_gsm_SmsManager_sendDataMessage6
#
#Landroid/telephony/gsm/SmsManager;->sendDataMessage(Ljava/lang/String;Ljava/lang/String;S[BLandroid/app/PendingIntent;Landroid/app/PendingIntent;)V
# Instrumentation fails due to its un-workaround-able implementation limitation:
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/reflect/Method;
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: invoke
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/reflect/InvocationTargetException;
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getTargetException
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to generate trampoline for sendMultipartTextMessage VLLLLL
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.telephony.gsm.SmsManager->sendMultipartTextMessage to org.droidmate.monitor_generator.generated.Monitor->redir_android_telephony_gsm_SmsManager_sendMultipartTextMessage5
#
#Landroid/telephony/gsm/SmsManager;->sendMultipartTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V
# Instrumentation fails due to its un-workaround-able implementation limitation:
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/reflect/Method;
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: invoke
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? TypeId not found in dexFile 0x41edffa8: Ljava/lang/reflect/InvocationTargetException;
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getTargetException
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored D/Instrumentation? MethodId not found in dexFile 0x41edffa8: getCause
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to generate trampoline for sendTextMessage VLLLLL
# 10-09 18:21:55.726 8703-8703/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method android.telephony.gsm.SmsManager->sendTextMessage to org.droidmate.monitor_generator.generated.Monitor->redir_android_telephony_gsm_SmsManager_sendTextMessage5
#
#Landroid/telephony/gsm/SmsManager;->sendTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)V
Landroid/webkit/WebView;->loadDataWithBaseURL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V
Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;Ljava/util/Map;)V
# APIs added on 9 Jun 2016 to enable sensitive dataflow leaks. Obtained from Vitalii.
# Taken from "apis_art.txt" that should be located in the same dir as this file.
# Note that as of 9 Jun 2016 the methods from Vitalii are missing the " static" suffix. The methods have been obtained from HornDroid API list.
!API19 Landroid/telephony/SmsManager;->sendTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)V
# ! If this method call is commented out, asserts for api23 in method org.droidmate.frontend.DroidmateFrontendTest#exploreOnRealDevice will have to be changed.
# !API19 Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I static
# While these methods were present in the original MonitorInitializer.java in AppGuard,
# they pertain to activity lifecycle and thus are very common and not security-critical.
# For this reason they are not monitored.
# ! If this method call is commented out, asserts for api23 in method org.droidmate.frontend.DroidmateFrontendTest#exploreOnRealDevice will have to be changed.
# Landroid/app/Activity;->onResume()V
# ! If this method call is commented out, asserts for api23 in method org.droidmate.frontend.DroidmateFrontendTest#exploreOnRealDevice will have to be changed.
# Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V
# Landroid/app/Activity;->startActivityFromChild(Landroid/app/Activity;Landroid/content/Intent;I)V
# Landroid/app/Activity;->startActivityIfNeeded(Landroid/content/Intent;I)Z
# APIs for various bugs repros from Mark Schuegraf.
# !API19 Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I static
# !API19 Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I static
# !API19 Ljava/io/FileOutputStream;->write([BII)V
# !API19 Ljava/io/FileOutputStream;->write(I)V
# !API19 Ljava/io/FileOutputStream;->write([B)V
# ========================================
# NETWORKING APIs
# ========================================
#
# Reviewed on 22 Aug 2016 for Android 6.0.1_r63.
# Might break on Android 4.4.4_r2.0.1, although developer.android.com doc is the same.
# API comments pertain to 6.0.1_r63
# ========== java.net.Socket documentation
# https://developer.android.com/reference/java/net/Socket.html
# https://android.googlesource.com/platform/libcore/+/android-6.0.1_r63/luni/src/main/java/java/net/Socket.java
# https://android.googlesource.com/platform/libcore/+/android-4.4.4_r2.0.1/luni/src/main/java/java/net/Socket.java
# ========== java.net.Socket constructors
# SECURITY-IRRELEVANT: it doesn't actually connect anywhere, and doesn't contain any server address.
## Ljava/net/Socket;-><init>()V
# Similar to no-arg constructor, but takes as param SocketAddress which might contain server address.
Ljava/net/Socket;-><init>(Ljava/net/Proxy;)V
# REDUNDANT: delegates to <init>(Ljava/lang/String;ILjava/net/InetAddress;I)V
## Ljava/net/Socket;-><init>(Ljava/lang/String;I)V
# Calls no-arg constructor and then tryAllAddresses(dstName, dstPort, localAddress, localPort, streaming=true)
Ljava/net/Socket;-><init>(Ljava/lang/String;ILjava/net/InetAddress;I)V
# @Deprecated. Calls no-arg constructor and then tryAllAddresses(hostName, port, null, 0, streaming)
Ljava/net/Socket;-><init>(Ljava/lang/String;IZ)V
# Calls: no-arg constructor, checkDestination, startupSocket
Ljava/net/Socket;-><init>(Ljava/net/InetAddress;I)V
# Calls: no-arg constructor, checkDestination, startupSocket
Ljava/net/Socket;-><init>(Ljava/net/InetAddress;ILjava/net/InetAddress;I)V
# @Deprecated. Calls: no-arg constructor, checkDestination, startupSocket
Ljava/net/Socket;-><init>(Ljava/net/InetAddress;IZ)V
# SECURITY-IRRELEVANT: protected, used only in private or test code.
## Ljava/net/Socket;-><init>(Ljava/net/SocketImpl;)V
# ========== java.net.Socket methods
# REDUNDANT: delegates to Ljava/net/Socket;->connect(Ljava/net/SocketAddress;I)V
## Ljava/net/Socket;->connect(Ljava/net/SocketAddress;)V
Ljava/net/Socket;->connect(Ljava/net/SocketAddress;I)V
# ========== java.net.DatagramSocket constructors
# Calls: checkPort, createSocket
Ljava/net/DatagramSocket;-><init>(I)V
# Calls: checkPort, createSocket
Ljava/net/DatagramSocket;-><init>(ILjava/net/InetAddress;)V
Ljava/net/DatagramSocket;-><init>(Ljava/net/SocketAddress;)V
# Note that there are other constructors. They have been manually inspected and determined to be redundant.
# ========== java.net.DatagramSocket methods
Ljava/net/DatagramSocket;->connect(Ljava/net/SocketAddress;)V
# REDUNDANT: delegates to the Ljava/net/DatagramSocket;->connect(Ljava/net/SocketAddress;)V
## Ljava/net/DatagramSocket;->connect(Ljava/net/InetAddress;I)V
# ========== java.net.MulticastSocket constructors
# All MulticastSocket constructors call super, which is DatagramSocket constructor, which should be monitored.
# ========== java.net.MulticastSocket methods
# From method javadoc: "A socket must join a group before data may be received". Thus these methods are monitored.
Ljava/net/MulticastSocket;->joinGroup(Ljava/net/InetAddress;)V
Ljava/net/MulticastSocket;->joinGroup(Ljava/net/SocketAddress;Ljava/net/NetworkInterface;)V
# ========== java.net.URL documentation
# https://android.googlesource.com/platform/libcore/+/android-6.0.1_r63/luni/src/main/java/java/net/URL.java
# ========== java.net.URL constructors
# REDUNDANT: delegates to Ljava/net/URL;-><init>(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V
## Ljava/net/URL;-><init>(Ljava/lang/String;)V
# REDUNDANT: delegates to Ljava/net/URL;-><init>(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V
## Ljava/net/URL;-><init>(Ljava/net/URL;Ljava/lang/String;)V
Ljava/net/URL;-><init>(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V
# REDUNDANT: delegates to Ljava/net/URL;-><init>(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V
##Ljava/net/URL;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
# REDUNDANT: delegates to Ljava/net/URL;-><init>(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V
##Ljava/net/URL;-><init>(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V
Ljava/net/URL;-><init>(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V
# ========== java.net.URL methods
# Fundamental methods for establishing connections, as described here: https://developer.android.com/reference/java/net/HttpURLConnection.html
Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
Ljava/net/URL;->openConnection(Ljava/net/Proxy;)Ljava/net/URLConnection;
# ========== java.net.URLConnection documentation
# https://developer.android.com/reference/java/net/URLConnection.html
# ========== java.net.URLConnection constructors
# API23 (ArtHook) error: "Can't find original method (redir_9_java_net_URLConnection_ctor1)"
# Possibly because the method is "protected".
## Ljava/net/URLConnection;-><init>(Ljava/net/URL;)V
# ========== java.net.URLConnection methods
!API19 Ljava/net/URLConnection;->connect()V
# This method is part of a general connection lifecycle as described in the doc (see above)
# Note that the http implementation of URLConnection, the HttpURLConnection doesn't actually use connect() method.
# Instead of connection, one writes to OutputStream, as described here:
# https://developer.android.com/reference/java/net/HttpURLConnection.html
#
# In the AppGuard's MonitorInitializer.java following method is defined to be monitored:
# Ljava/net/HttpURLConnection;->connect()V
# But its instrumentation fails:
# 10-09 19:35:44.456 10187-10187/? W/Instrumentation? Failed to redirect method java.net.HttpURLConnection->connect
#
# Failure reason: the method doesn't actually exist in the class HttpURLConnection [1];
# instead, it is inherited from URLConnection [2]. However URLConnection also cannot be monitored in API 19 due to:
# 10-09 19:53:46.226 10965-10965/org.droidmate.fixtures.apks.monitored W/Instrumentation? Skipping abstract method: connect V
# 10-09 19:53:46.226 10965-10965/org.droidmate.fixtures.apks.monitored W/Instrumentation? Failed to redirect method java.net.URLConnection->connect to org.droidmate.monitor_generator.generated.Monitor->redir_java_net_URLConnection_connect0
#
# Nevertheless, it works on API23, so it is monitored on it.
#
# [1] https://android.googlesource.com/platform/libcore/+/android-4.4.4_r2.0.1/luni/src/main/java/java/net/HttpURLConnection.java
# [2] https://android.googlesource.com/platform/libcore/+/android-4.4.4_r2.0.1/luni/src/main/java/java/net/URLConnection.java#167
# ========== org.apache.http.impl.client.AbstractHttpClient
# Note: this class as well as its implementation, DefaultHttpClient, are deprecated and HttpURLConnection should be used instead.
# This is explained here: https://developer.android.com/reference/org/apache/http/impl/client/DefaultHttpClient.html
# Note: AppGuard's MonitorInitializer.java monitors a set of "execute" methods of DefaultHttpClient, but it doesn't work on API19:
#
# DefaultHttpClient doesn't actually contain the execute() method [1]. It inherits it from AbstractHttpClient [2].
#
# Furthermore, all the execute() methods are really just delegates to AbstractHttpClient.execute(HttpHost, HttpRequest, HttpContext) [2]
#
# [1] https://android.googlesource.com/platform/external/apache-http/+/android-4.4.4_r2.0.1/src/org/apache/http/impl/client/DefaultHttpClient.java
# [2] https://android.googlesource.com/platform/external/apache-http/+/android-4.4.4_r2.0.1/src/org/apache/http/impl/client/AbstractHttpClient.java#514
# API23 sources:
# https://android.googlesource.com/platform/external/apache-http/+/android-6.0.1_r63/src/org/apache/http/impl/client/DefaultHttpClient.java
# https://android.googlesource.com/platform/external/apache-http/+/android-6.0.1_r63/src/org/apache/http/impl/client/AbstractHttpClient.java
# Here is the method that actually needs to be monitored [2], as all the other execute() methods delegate to it:
Lorg/apache/http/impl/client/AbstractHttpClient;->execute(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/HttpResponse;
# ========================================
# End of NETWORKING APIs
# ========================================
# ========================================
# CONTENT PROVIDER APIs
# ========================================
#
# Reviewed on 23 Aug 2016 for Android 6.0.1_r63.
# Might break on Android 4.4.4_r2.0.1.
# API comments pertain to 6.0.1_r63
#
# Intro to content APIs from official doc:
# https://developer.android.com/guide/topics/providers/content-providers.html
# On class difference
# http://stackoverflow.com/questions/5084896/using-contentproviderclient-vs-contentresolver-to-access-content-provider
# ========== android.content.ContentResolver documentation
# https://developer.android.com/reference/android/content/ContentResolver.html
# https://android.googlesource.com/platform/frameworks/base/+/android-6.0.1_r63/core/java/android/content/ContentResolver.java
# https://android.googlesource.com/platform/frameworks/base/+/android-4.4.4_r2.0.1/core/java/android/content/ContentResolver.java
# ========== android.content.ContentResolver
# APIs unchanged from AppGuard's MonitorInitializer.java
Landroid/content/ContentResolver;->bulkInsert(Landroid/net/Uri;[Landroid/content/ContentValues;)I
Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
Landroid/content/ContentResolver;->openInputStream(Landroid/net/Uri;)Ljava/io/InputStream;
# Note: openOutputStream methods are not monitored as they ultimately are redundant: they call openAssetFileDescriptor, which should be monitored.
# REDUNDANT: originally present in AppGuard's MonitorInitializer.java, but it delegates to 3-param openFileDescriptor, which in turn just delegates to openAssetFileDescriptor.
## Landroid/content/ContentResolver;->openFileDescriptor(Landroid/net/Uri;Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/os/ParcelFileDescriptor;
# REDUNDANT: delegates to 3-param openAssetFileDescriptor
## Landroid/content/ContentResolver;->openFileDescriptor(Landroid/net/Uri;Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/os/ParcelFileDescriptor;
# Note: there are also openTypedAssertFileDescriptor() methods that ultimately delegate to this one.
Landroid/content/ContentResolver;->openAssetFileDescriptor(Landroid/net/Uri;Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/content/res/AssetFileDescriptor;
# Note: there is a 2-arg query() method that just delegates to this one.
Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/database/Cursor;
# Note: there is a 3-arg registerContentObserver() method that just delegates to this one.
Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;I)V
# ========== android.content.ContentProviderClient
# APIs unchanged from AppGuard's MonitorInitializer.java
Landroid/content/ContentProviderClient;->bulkInsert(Landroid/net/Uri;[Landroid/content/ContentValues;)I
Landroid/content/ContentProviderClient;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
Landroid/content/ContentProviderClient;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
Landroid/content/ContentProviderClient;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
# REDUNDANT: delegates to 3-arg openFile
# Landroid/content/ContentProviderClient;->openFile(Landroid/net/Uri;Ljava/lang/String;)Landroid/os/ParcelFileDescriptor;
Landroid/content/ContentProviderClient;->openFile(Landroid/net/Uri;Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/os/ParcelFileDescriptor;
# Note: there is a 2-arg openAssetFile() that just delegates to this one.
Landroid/content/ContentProviderClient;->openAssetFile(Landroid/net/Uri;Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/content/res/AssetFileDescriptor;
Landroid/content/ContentProviderClient;->openTypedAssetFileDescriptor(Landroid/net/Uri;Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/content/res/AssetFileDescriptor;
# REDUNDANT: delegates to the 6-arg query() method.
## Landroid/content/ContentProviderClient;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
Landroid/content/ContentProviderClient;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/database/Cursor;
# ========================================
# End of CONTENT PROVIDER APIs
# ========================================