1 diff -Npru stock_core/smali/java/lang/PrivacyInputStream.smali moded_core/smali/java/lang/PrivacyInputStream.smali
2 --- stock_core/smali/java/lang/PrivacyInputStream.smali 1969-12-31 18:00:00.000000000 -0600
3 +++ moded_core/smali/java/lang/PrivacyInputStream.smali 2012-06-14 15:22:52.480092132 -0500
5 +.class public Ljava/lang/PrivacyInputStream;
6 +.super Ljava/io/InputStream;
7 +.source "PrivacyInputStream.java"
11 +.method public constructor <init>()V
14 + invoke-direct {p0}, Ljava/io/InputStream;-><init>()V
21 +.method public close()V
23 + .annotation system Ldalvik/annotation/Throws;
25 + Ljava/io/IOException;
29 + invoke-super {p0}, Ljava/io/InputStream;->close()V
34 +.method public read()I
36 + .annotation system Ldalvik/annotation/Throws;
38 + Ljava/io/IOException;
47 +.method public read([B)I
49 + .annotation system Ldalvik/annotation/Throws;
51 + Ljava/io/IOException;
60 +.method public read([BII)I
62 + .annotation system Ldalvik/annotation/Throws;
64 + Ljava/io/IOException;
72 diff -Npru stock_core/smali/java/lang/PrivacyProcessManager$PrivacyFileReader.smali moded_core/smali/java/lang/PrivacyProcessManager$PrivacyFileReader.smali
73 --- stock_core/smali/java/lang/PrivacyProcessManager$PrivacyFileReader.smali 1969-12-31 18:00:00.000000000 -0600
74 +++ moded_core/smali/java/lang/PrivacyProcessManager$PrivacyFileReader.smali 2012-06-14 15:22:52.480092132 -0500
76 +.class public Ljava/lang/PrivacyProcessManager$PrivacyFileReader;
77 +.super Ljava/lang/Object;
78 +.source "PrivacyProcessManager.java"
82 +.annotation system Ldalvik/annotation/EnclosingClass;
83 + value = Ljava/lang/PrivacyProcessManager;
86 +.annotation system Ldalvik/annotation/InnerClass;
88 + name = "PrivacyFileReader"
93 +.field private buffReader:Ljava/io/BufferedReader;
95 +.field private inputStream:Ljava/io/FileInputStream;
99 +.method public constructor <init>(Ljava/lang/String;)V
101 + .annotation system Ldalvik/annotation/Throws;
103 + Ljava/io/FileNotFoundException;
107 + invoke-direct {p0}, Ljava/lang/Object;-><init>()V
109 + new-instance v0, Ljava/io/FileInputStream;
111 + new-instance v1, Ljava/io/File;
113 + invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
115 + invoke-direct {v0, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
117 + iput-object v0, p0, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->inputStream:Ljava/io/FileInputStream;
119 + new-instance v0, Ljava/io/BufferedReader;
121 + new-instance v1, Ljava/io/InputStreamReader;
123 + iget-object v2, p0, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->inputStream:Ljava/io/FileInputStream;
125 + invoke-direct {v1, v2}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V
127 + invoke-direct {v0, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
129 + iput-object v0, p0, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->buffReader:Ljava/io/BufferedReader;
136 +.method public close()V
138 + .annotation system Ldalvik/annotation/Throws;
140 + Ljava/io/IOException;
144 + iget-object v0, p0, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->inputStream:Ljava/io/FileInputStream;
146 + invoke-virtual {v0}, Ljava/io/FileInputStream;->close()V
151 +.method public readLine()Ljava/lang/String;
153 + .annotation system Ldalvik/annotation/Throws;
155 + Ljava/io/IOException;
159 + iget-object v0, p0, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->buffReader:Ljava/io/BufferedReader;
161 + invoke-virtual {v0}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
163 + move-result-object v0
167 diff -Npru stock_core/smali/java/lang/PrivacyProcessManager.smali moded_core/smali/java/lang/PrivacyProcessManager.smali
168 --- stock_core/smali/java/lang/PrivacyProcessManager.smali 1969-12-31 18:00:00.000000000 -0600
169 +++ moded_core/smali/java/lang/PrivacyProcessManager.smali 2012-06-14 15:22:52.480092132 -0500
171 +.class public Ljava/lang/PrivacyProcessManager;
172 +.super Ljava/lang/Object;
173 +.source "PrivacyProcessManager.java"
177 +.annotation system Ldalvik/annotation/MemberClasses;
179 + Ljava/lang/PrivacyProcessManager$PrivacyFileReader;
185 +.field private static final GET_COMMAND_WAIT_MS:I = 0xa
187 +.field private static final GET_COMMAND_WAIT_STEP:I = 0x5
191 +.method public constructor <init>()V
194 + invoke-direct {p0}, Ljava/lang/Object;-><init>()V
199 +.method private static getPackageName()Ljava/lang/String;
201 + .annotation system Ldalvik/annotation/Throws;
203 + Ljava/io/IOException;,
204 + Ljava/io/FileNotFoundException;
208 + new-instance v0, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;
210 + const-string v2, "/proc/self/cmdline"
212 + invoke-direct {v0, v2}, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;-><init>(Ljava/lang/String;)V
214 + invoke-virtual {v0}, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->readLine()Ljava/lang/String;
216 + move-result-object v2
218 + invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;
220 + move-result-object v1
222 + invoke-virtual {v0}, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->close()V
227 +.method public static hasPrivacyPermission(Ljava/lang/String;I)Z
235 + invoke-static {}, Ljava/lang/PrivacyProcessManager;->getPackageName()Ljava/lang/String;
237 + .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_5} :catch_38
239 + move-result-object v7
245 + new-instance v11, Ljava/lang/StringBuilder;
247 + invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V
249 + const-string v12, "/proc/"
251 + invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
253 + move-result-object v11
255 + invoke-virtual {v11, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
257 + move-result-object v11
259 + const-string v12, "/cmdline"
261 + invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
263 + move-result-object v11
265 + invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
267 + move-result-object v0
269 + new-instance v3, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;
271 + invoke-direct {v3, v0}, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;-><init>(Ljava/lang/String;)V
273 + .catch Ljava/io/FileNotFoundException; {:try_start_7 .. :try_end_25} :catch_b8
274 + .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_25} :catch_96
277 + const-string v8, ""
282 + invoke-virtual {v3}, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->readLine()Ljava/lang/String;
284 + .catch Ljava/io/FileNotFoundException; {:try_start_25 .. :try_end_2c} :catch_ba
285 + .catch Ljava/lang/Exception; {:try_start_25 .. :try_end_2c} :catch_b5
287 + move-result-object v8
289 + if-nez v8, :cond_44
291 + if-ltz v4, :cond_44
293 + const-wide/16 v11, 0x5
296 + invoke-static {v11, v12}, Ljava/lang/Thread;->sleep(J)V
298 + .catch Ljava/lang/InterruptedException; {:try_start_33 .. :try_end_36} :catch_b3
299 + .catch Ljava/io/FileNotFoundException; {:try_start_33 .. :try_end_36} :catch_ba
300 + .catch Ljava/lang/Exception; {:try_start_33 .. :try_end_36} :catch_b5
310 + sget-object v11, Ljava/lang/System;->err:Ljava/io/PrintStream;
312 + const-string v12, "PrivacyProcessManager: could not find package name or UID"
314 + invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
316 + invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
322 + invoke-virtual {v3}, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->close()V
324 + if-eqz v8, :cond_bd
326 + invoke-virtual {v8}, Ljava/lang/String;->trim()Ljava/lang/String;
328 + move-result-object v11
330 + invoke-virtual {v11}, Ljava/lang/String;->length()I
336 + if-le v11, v12, :cond_bd
338 + const-string v11, "logcat"
340 + invoke-virtual {v8, v11}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
344 + if-eqz v11, :cond_bd
346 + new-instance v11, Ljava/lang/StringBuilder;
348 + invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V
350 + const-string v12, "/data/system/privacy/"
352 + invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
354 + move-result-object v11
356 + invoke-virtual {v11, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
358 + move-result-object v11
360 + const-string v12, "/"
362 + invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
364 + move-result-object v11
366 + invoke-virtual {v11, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
368 + move-result-object v11
370 + invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
372 + move-result-object v9
374 + new-instance v2, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;
376 + invoke-direct {v2, v9}, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;-><init>(Ljava/lang/String;)V
378 + .catch Ljava/io/FileNotFoundException; {:try_start_44 .. :try_end_7e} :catch_ba
379 + .catch Ljava/lang/Exception; {:try_start_44 .. :try_end_7e} :catch_b5
382 + invoke-virtual {v2}, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->readLine()Ljava/lang/String;
384 + move-result-object v5
386 + if-eqz v5, :cond_94
388 + invoke-virtual {v5}, Ljava/lang/String;->trim()Ljava/lang/String;
390 + move-result-object v11
392 + invoke-static {v11}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
397 + invoke-virtual {v2}, Ljava/lang/PrivacyProcessManager$PrivacyFileReader;->close()V
399 + .catch Ljava/io/FileNotFoundException; {:try_start_7e .. :try_end_8f} :catch_b8
400 + .catch Ljava/lang/Exception; {:try_start_7e .. :try_end_8f} :catch_96
404 + if-ne v10, v11, :cond_93
421 + sget-object v11, Ljava/lang/System;->err:Ljava/io/PrintStream;
423 + new-instance v12, Ljava/lang/StringBuilder;
425 + invoke-direct {v12}, Ljava/lang/StringBuilder;-><init>()V
427 + const-string v13, "PrivacyProcessManager: could not read privacy settings: "
429 + invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
431 + move-result-object v12
433 + invoke-virtual {v12, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
435 + move-result-object v12
437 + invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
439 + move-result-object v12
441 + invoke-virtual {v11, v12}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
443 + invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
476 diff -Npru stock_core/smali/java/lang/ProcessManager$ProcessImpl.smali moded_core/smali/java/lang/ProcessManager$ProcessImpl.smali
477 --- stock_core/smali/java/lang/ProcessManager$ProcessImpl.smali 2012-06-14 15:21:02.827548393 -0500
478 +++ moded_core/smali/java/lang/ProcessManager$ProcessImpl.smali 2012-06-14 15:22:52.504092243 -0500
481 iput-object v0, p0, Ljava/lang/ProcessManager$ProcessImpl;->errorStream:Ljava/io/InputStream;
483 + const-string v0, "systemLogsSetting"
485 + invoke-static {v0, p1}, Ljava/lang/PrivacyProcessManager;->hasPrivacyPermission(Ljava/lang/String;I)Z
489 + if-eqz v0, :cond_2d
491 new-instance v0, Ljava/lang/ProcessManager$ProcessInputStream;
493 invoke-direct {v0, p2, v1}, Ljava/lang/ProcessManager$ProcessInputStream;-><init>(Ljava/io/FileDescriptor;Ljava/lang/ProcessManager$1;)V
495 iput-object v0, p0, Ljava/lang/ProcessManager$ProcessImpl;->inputStream:Ljava/io/InputStream;
498 new-instance v0, Ljava/lang/ProcessManager$ProcessOutputStream;
500 invoke-direct {v0, p3, v1}, Ljava/lang/ProcessManager$ProcessOutputStream;-><init>(Ljava/io/FileDescriptor;Ljava/lang/ProcessManager$1;)V
502 iput-object v0, p0, Ljava/lang/ProcessManager$ProcessImpl;->outputStream:Ljava/io/OutputStream;
507 + new-instance v0, Ljava/lang/PrivacyInputStream;
509 + invoke-direct {v0}, Ljava/lang/PrivacyInputStream;-><init>()V
511 + iput-object v0, p0, Ljava/lang/ProcessManager$ProcessImpl;->inputStream:Ljava/io/InputStream;
516 .method static synthetic access$300(Ljava/lang/ProcessManager$ProcessImpl;)I