Showing
4 changed files
with
117 additions
and
52 deletions
... | @@ -25,7 +25,7 @@ | ... | @@ -25,7 +25,7 @@ |
25 | <component name="DefaultGradleProjectSettings"> | 25 | <component name="DefaultGradleProjectSettings"> |
26 | <option name="isMigrated" value="true" /> | 26 | <option name="isMigrated" value="true" /> |
27 | </component> | 27 | </component> |
28 | - <component name="ExecutionTargetManager" SELECTED_TARGET="Pixel_2_API_28" /> | 28 | + <component name="ExecutionTargetManager" SELECTED_TARGET="ce12160cc327c64005" /> |
29 | <component name="ExternalProjectsManager"> | 29 | <component name="ExternalProjectsManager"> |
30 | <system id="GRADLE"> | 30 | <system id="GRADLE"> |
31 | <state> | 31 | <state> |
... | @@ -37,7 +37,12 @@ | ... | @@ -37,7 +37,12 @@ |
37 | </task> | 37 | </task> |
38 | <projects_view> | 38 | <projects_view> |
39 | <tree_state> | 39 | <tree_state> |
40 | - <expand /> | 40 | + <expand> |
41 | + <path> | ||
42 | + <item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" /> | ||
43 | + <item name="DataExtraction" type="f1a62948:ProjectNode" /> | ||
44 | + </path> | ||
45 | + </expand> | ||
41 | <select /> | 46 | <select /> |
42 | </tree_state> | 47 | </tree_state> |
43 | </projects_view> | 48 | </projects_view> |
... | @@ -59,8 +64,8 @@ | ... | @@ -59,8 +64,8 @@ |
59 | <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml"> | 64 | <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml"> |
60 | <provider editor-type-id="android-manifest" /> | 65 | <provider editor-type-id="android-manifest" /> |
61 | <provider selected="true" editor-type-id="text-editor"> | 66 | <provider selected="true" editor-type-id="text-editor"> |
62 | - <state relative-caret-position="207"> | 67 | + <state relative-caret-position="-76"> |
63 | - <caret line="38" column="71" selection-start-line="38" selection-start-column="71" selection-end-line="38" selection-end-column="71" /> | 68 | + <caret line="11" column="80" selection-start-line="11" selection-start-column="80" selection-end-line="11" selection-end-column="80" /> |
64 | </state> | 69 | </state> |
65 | </provider> | 70 | </provider> |
66 | </entry> | 71 | </entry> |
... | @@ -83,11 +88,11 @@ | ... | @@ -83,11 +88,11 @@ |
83 | </provider> | 88 | </provider> |
84 | </entry> | 89 | </entry> |
85 | </file> | 90 | </file> |
86 | - <file pinned="false" current-in-tab="true"> | 91 | + <file pinned="false" current-in-tab="false"> |
87 | <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/MainActivity.java"> | 92 | <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/MainActivity.java"> |
88 | <provider selected="true" editor-type-id="text-editor"> | 93 | <provider selected="true" editor-type-id="text-editor"> |
89 | - <state relative-caret-position="342"> | 94 | + <state relative-caret-position="366"> |
90 | - <caret line="20" column="110" selection-start-line="20" selection-start-column="110" selection-end-line="20" selection-end-column="110" /> | 95 | + <caret line="23" lean-forward="true" selection-start-line="23" selection-end-line="23" /> |
91 | <folding> | 96 | <folding> |
92 | <element signature="imports" expanded="true" /> | 97 | <element signature="imports" expanded="true" /> |
93 | </folding> | 98 | </folding> |
... | @@ -95,11 +100,15 @@ | ... | @@ -95,11 +100,15 @@ |
95 | </provider> | 100 | </provider> |
96 | </entry> | 101 | </entry> |
97 | </file> | 102 | </file> |
98 | - <file pinned="false" current-in-tab="false"> | 103 | + <file pinned="false" current-in-tab="true"> |
99 | <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/LoadingActivity.java"> | 104 | <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/LoadingActivity.java"> |
100 | <provider selected="true" editor-type-id="text-editor"> | 105 | <provider selected="true" editor-type-id="text-editor"> |
101 | - <state relative-caret-position="14193"> | 106 | + <state relative-caret-position="209"> |
102 | - <caret line="813" column="26" selection-start-line="813" selection-start-column="21" selection-end-line="813" selection-end-column="26" /> | 107 | + <caret line="184" column="53" lean-forward="true" selection-start-line="184" selection-start-column="53" selection-end-line="184" selection-end-column="53" /> |
108 | + <folding> | ||
109 | + <element signature="e#5574#8719#0" expanded="true" /> | ||
110 | + <element signature="e#8718#8719#0" expanded="true" /> | ||
111 | + </folding> | ||
103 | </state> | 112 | </state> |
104 | </provider> | 113 | </provider> |
105 | </entry> | 114 | </entry> |
... | @@ -143,8 +152,8 @@ | ... | @@ -143,8 +152,8 @@ |
143 | <list> | 152 | <list> |
144 | <option value="$PROJECT_DIR$/src/main/res/xml/network_security_config.xml" /> | 153 | <option value="$PROJECT_DIR$/src/main/res/xml/network_security_config.xml" /> |
145 | <option value="$PROJECT_DIR$/src/main/res/layout/activity_main.xml" /> | 154 | <option value="$PROJECT_DIR$/src/main/res/layout/activity_main.xml" /> |
146 | - <option value="$PROJECT_DIR$/src/main/AndroidManifest.xml" /> | ||
147 | <option value="$PROJECT_DIR$/build.gradle" /> | 155 | <option value="$PROJECT_DIR$/build.gradle" /> |
156 | + <option value="$PROJECT_DIR$/src/main/AndroidManifest.xml" /> | ||
148 | <option value="$PROJECT_DIR$/src/main/java/com/example/dataextraction/LoadingActivity.java" /> | 157 | <option value="$PROJECT_DIR$/src/main/java/com/example/dataextraction/LoadingActivity.java" /> |
149 | <option value="$PROJECT_DIR$/src/main/java/com/example/dataextraction/MainActivity.java" /> | 158 | <option value="$PROJECT_DIR$/src/main/java/com/example/dataextraction/MainActivity.java" /> |
150 | </list> | 159 | </list> |
... | @@ -222,9 +231,9 @@ | ... | @@ -222,9 +231,9 @@ |
222 | </option> | 231 | </option> |
223 | </component> | 232 | </component> |
224 | <component name="ProjectFrameBounds" extendedState="6"> | 233 | <component name="ProjectFrameBounds" extendedState="6"> |
225 | - <option name="x" value="952" /> | 234 | + <option name="x" value="770" /> |
226 | - <option name="width" value="977" /> | 235 | + <option name="width" value="1159" /> |
227 | - <option name="height" value="1038" /> | 236 | + <option name="height" value="1048" /> |
228 | </component> | 237 | </component> |
229 | <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> | 238 | <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> |
230 | <component name="ProjectView"> | 239 | <component name="ProjectView"> |
... | @@ -232,20 +241,24 @@ | ... | @@ -232,20 +241,24 @@ |
232 | <foldersAlwaysOnTop value="true" /> | 241 | <foldersAlwaysOnTop value="true" /> |
233 | </navigator> | 242 | </navigator> |
234 | <panes> | 243 | <panes> |
235 | - <pane id="Scope" /> | ||
236 | - <pane id="PackagesPane" /> | ||
237 | - <pane id="ProjectPane" /> | ||
238 | <pane id="AndroidView"> | 244 | <pane id="AndroidView"> |
239 | <subPane> | 245 | <subPane> |
240 | <expand> | 246 | <expand> |
241 | <path> | 247 | <path> |
242 | <item name="DataExtraction" type="1abcf292:AndroidViewProjectNode" /> | 248 | <item name="DataExtraction" type="1abcf292:AndroidViewProjectNode" /> |
249 | + <item name="app" type="feadf853:AndroidModuleNode" /> | ||
250 | + </path> | ||
251 | + <path> | ||
252 | + <item name="DataExtraction" type="1abcf292:AndroidViewProjectNode" /> | ||
243 | <item name="Gradle Scripts" type="ae0cef3a:AndroidBuildScriptsGroupNode" /> | 253 | <item name="Gradle Scripts" type="ae0cef3a:AndroidBuildScriptsGroupNode" /> |
244 | </path> | 254 | </path> |
245 | </expand> | 255 | </expand> |
246 | <select /> | 256 | <select /> |
247 | </subPane> | 257 | </subPane> |
248 | </pane> | 258 | </pane> |
259 | + <pane id="PackagesPane" /> | ||
260 | + <pane id="Scope" /> | ||
261 | + <pane id="ProjectPane" /> | ||
249 | </panes> | 262 | </panes> |
250 | </component> | 263 | </component> |
251 | <component name="PropertiesComponent"> | 264 | <component name="PropertiesComponent"> |
... | @@ -356,7 +369,7 @@ | ... | @@ -356,7 +369,7 @@ |
356 | <frame x="-7" y="-7" width="1550" height="838" extended-state="6" /> | 369 | <frame x="-7" y="-7" width="1550" height="838" extended-state="6" /> |
357 | <layout> | 370 | <layout> |
358 | <window_info id="Captures" order="0" side_tool="true" weight="0.25" /> | 371 | <window_info id="Captures" order="0" side_tool="true" weight="0.25" /> |
359 | - <window_info content_ui="combo" id="Project" order="1" visible="true" weight="0.13892618" /> | 372 | + <window_info content_ui="combo" id="Project" order="1" visible="true" weight="0.020134227" /> |
360 | <window_info id="Structure" order="2" side_tool="true" /> | 373 | <window_info id="Structure" order="2" side_tool="true" /> |
361 | <window_info id="Favorites" order="3" side_tool="true" /> | 374 | <window_info id="Favorites" order="3" side_tool="true" /> |
362 | <window_info id="Build Variants" order="4" side_tool="true" /> | 375 | <window_info id="Build Variants" order="4" side_tool="true" /> |
... | @@ -365,7 +378,7 @@ | ... | @@ -365,7 +378,7 @@ |
365 | <window_info id="Resources Explorer" order="7" /> | 378 | <window_info id="Resources Explorer" order="7" /> |
366 | <window_info id="Capture Tool" order="8" /> | 379 | <window_info id="Capture Tool" order="8" /> |
367 | <window_info anchor="bottom" id="Run" order="0" sideWeight="0.49932885" weight="0.32907802" /> | 380 | <window_info anchor="bottom" id="Run" order="0" sideWeight="0.49932885" weight="0.32907802" /> |
368 | - <window_info anchor="bottom" id="Logcat" order="1" sideWeight="0.49798658" visible="true" weight="0.3219858" /> | 381 | + <window_info anchor="bottom" id="Logcat" order="1" sideWeight="0.49798658" weight="0.32056737" /> |
369 | <window_info anchor="bottom" id="TODO" order="2" sideWeight="0.49932885" weight="0.32907802" /> | 382 | <window_info anchor="bottom" id="TODO" order="2" sideWeight="0.49932885" weight="0.32907802" /> |
370 | <window_info anchor="bottom" id="Debug" order="3" /> | 383 | <window_info anchor="bottom" id="Debug" order="3" /> |
371 | <window_info anchor="bottom" id="Terminal" order="4" sideWeight="0.49932885" weight="0.32907802" /> | 384 | <window_info anchor="bottom" id="Terminal" order="4" sideWeight="0.49932885" weight="0.32907802" /> |
... | @@ -374,9 +387,9 @@ | ... | @@ -374,9 +387,9 @@ |
374 | <window_info anchor="bottom" id="Build" order="7" sideWeight="0.49932885" weight="0.32907802" /> | 387 | <window_info anchor="bottom" id="Build" order="7" sideWeight="0.49932885" weight="0.32907802" /> |
375 | <window_info anchor="bottom" id="Android Profiler" order="8" /> | 388 | <window_info anchor="bottom" id="Android Profiler" order="8" /> |
376 | <window_info anchor="bottom" id="Find" order="9" /> | 389 | <window_info anchor="bottom" id="Find" order="9" /> |
377 | - <window_info anchor="right" id="Device File Explorer" order="0" side_tool="true" weight="0.74630874" /> | 390 | + <window_info anchor="right" id="Device File Explorer" order="0" sideWeight="0.6680761" side_tool="true" weight="0.3295302" /> |
378 | <window_info anchor="right" id="Capture Analysis" order="1" /> | 391 | <window_info anchor="right" id="Capture Analysis" order="1" /> |
379 | - <window_info anchor="right" id="Gradle" order="2" weight="0.3295302" /> | 392 | + <window_info anchor="right" id="Gradle" order="2" sideWeight="0.3319239" weight="0.3295302" /> |
380 | <window_info anchor="right" id="Theme Preview" order="3" /> | 393 | <window_info anchor="right" id="Theme Preview" order="3" /> |
381 | <window_info anchor="right" id="Preview" order="4" /> | 394 | <window_info anchor="right" id="Preview" order="4" /> |
382 | <window_info anchor="right" id="Palette	" order="5" /> | 395 | <window_info anchor="right" id="Palette	" order="5" /> |
... | @@ -476,6 +489,27 @@ | ... | @@ -476,6 +489,27 @@ |
476 | <entry file="file://$USER_HOME$/AppData/Local/Android/Sdk/sources/android-29/android/provider/Browser.java"> | 489 | <entry file="file://$USER_HOME$/AppData/Local/Android/Sdk/sources/android-29/android/provider/Browser.java"> |
477 | <provider selected="true" editor-type-id="text-editor" /> | 490 | <provider selected="true" editor-type-id="text-editor" /> |
478 | </entry> | 491 | </entry> |
492 | + <entry file="file://$USER_HOME$/AppData/Local/Android/Sdk/sources/android-29/android/content/Context.java"> | ||
493 | + <provider selected="true" editor-type-id="text-editor"> | ||
494 | + <state relative-caret-position="223"> | ||
495 | + <caret line="4748" column="24" selection-start-line="4748" selection-start-column="24" selection-end-line="4748" selection-end-column="24" /> | ||
496 | + </state> | ||
497 | + </provider> | ||
498 | + </entry> | ||
499 | + <entry file="file://$USER_HOME$/AppData/Local/Android/Sdk/sources/android-29/android/content/ContextWrapper.java"> | ||
500 | + <provider selected="true" editor-type-id="text-editor"> | ||
501 | + <state relative-caret-position="242"> | ||
502 | + <caret line="777" column="43" selection-start-line="777" selection-start-column="43" selection-end-line="777" selection-end-column="43" /> | ||
503 | + </state> | ||
504 | + </provider> | ||
505 | + </entry> | ||
506 | + <entry file="file://$PROJECT_DIR$/build.gradle"> | ||
507 | + <provider selected="true" editor-type-id="text-editor"> | ||
508 | + <state relative-caret-position="513"> | ||
509 | + <caret line="27" column="60" selection-start-line="27" selection-start-column="60" selection-end-line="27" selection-end-column="60" /> | ||
510 | + </state> | ||
511 | + </provider> | ||
512 | + </entry> | ||
479 | <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/SMSDataBase.java"> | 513 | <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/SMSDataBase.java"> |
480 | <provider selected="true" editor-type-id="text-editor"> | 514 | <provider selected="true" editor-type-id="text-editor"> |
481 | <state relative-caret-position="76"> | 515 | <state relative-caret-position="76"> |
... | @@ -505,45 +539,31 @@ | ... | @@ -505,45 +539,31 @@ |
505 | <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml"> | 539 | <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml"> |
506 | <provider editor-type-id="android-manifest" /> | 540 | <provider editor-type-id="android-manifest" /> |
507 | <provider selected="true" editor-type-id="text-editor"> | 541 | <provider selected="true" editor-type-id="text-editor"> |
508 | - <state relative-caret-position="207"> | 542 | + <state relative-caret-position="-76"> |
509 | - <caret line="38" column="71" selection-start-line="38" selection-start-column="71" selection-end-line="38" selection-end-column="71" /> | 543 | + <caret line="11" column="80" selection-start-line="11" selection-start-column="80" selection-end-line="11" selection-end-column="80" /> |
510 | - </state> | ||
511 | - </provider> | ||
512 | - </entry> | ||
513 | - <entry file="file://$USER_HOME$/AppData/Local/Android/Sdk/sources/android-29/android/content/Context.java"> | ||
514 | - <provider selected="true" editor-type-id="text-editor"> | ||
515 | - <state relative-caret-position="223"> | ||
516 | - <caret line="4748" column="24" selection-start-line="4748" selection-start-column="24" selection-end-line="4748" selection-end-column="24" /> | ||
517 | </state> | 544 | </state> |
518 | </provider> | 545 | </provider> |
519 | </entry> | 546 | </entry> |
520 | - <entry file="file://$USER_HOME$/AppData/Local/Android/Sdk/sources/android-29/android/content/ContextWrapper.java"> | 547 | + <entry file="file://$USER_HOME$/Documents/AndroidStudio/DeviceExplorer/samsung-sm_g950n-ce12160cc327c64005/sdcard/TestLog/logfile.txt"> |
521 | - <provider selected="true" editor-type-id="text-editor"> | 548 | + <provider selected="true" editor-type-id="text-editor" /> |
522 | - <state relative-caret-position="242"> | ||
523 | - <caret line="777" column="43" selection-start-line="777" selection-start-column="43" selection-end-line="777" selection-end-column="43" /> | ||
524 | - </state> | ||
525 | - </provider> | ||
526 | </entry> | 549 | </entry> |
527 | - <entry file="file://$PROJECT_DIR$/build.gradle"> | 550 | + <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/MainActivity.java"> |
528 | <provider selected="true" editor-type-id="text-editor"> | 551 | <provider selected="true" editor-type-id="text-editor"> |
529 | - <state relative-caret-position="513"> | 552 | + <state relative-caret-position="366"> |
530 | - <caret line="27" column="60" selection-start-line="27" selection-start-column="60" selection-end-line="27" selection-end-column="60" /> | 553 | + <caret line="23" lean-forward="true" selection-start-line="23" selection-end-line="23" /> |
554 | + <folding> | ||
555 | + <element signature="imports" expanded="true" /> | ||
556 | + </folding> | ||
531 | </state> | 557 | </state> |
532 | </provider> | 558 | </provider> |
533 | </entry> | 559 | </entry> |
534 | <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/LoadingActivity.java"> | 560 | <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/LoadingActivity.java"> |
535 | <provider selected="true" editor-type-id="text-editor"> | 561 | <provider selected="true" editor-type-id="text-editor"> |
536 | - <state relative-caret-position="14193"> | 562 | + <state relative-caret-position="209"> |
537 | - <caret line="813" column="26" selection-start-line="813" selection-start-column="21" selection-end-line="813" selection-end-column="26" /> | 563 | + <caret line="184" column="53" lean-forward="true" selection-start-line="184" selection-start-column="53" selection-end-line="184" selection-end-column="53" /> |
538 | - </state> | ||
539 | - </provider> | ||
540 | - </entry> | ||
541 | - <entry file="file://$PROJECT_DIR$/src/main/java/com/example/dataextraction/MainActivity.java"> | ||
542 | - <provider selected="true" editor-type-id="text-editor"> | ||
543 | - <state relative-caret-position="342"> | ||
544 | - <caret line="20" column="110" selection-start-line="20" selection-start-column="110" selection-end-line="20" selection-end-column="110" /> | ||
545 | <folding> | 564 | <folding> |
546 | - <element signature="imports" expanded="true" /> | 565 | + <element signature="e#5574#8719#0" expanded="true" /> |
566 | + <element signature="e#8718#8719#0" expanded="true" /> | ||
547 | </folding> | 567 | </folding> |
548 | </state> | 568 | </state> |
549 | </provider> | 569 | </provider> | ... | ... |
... | @@ -20,7 +20,6 @@ | ... | @@ -20,7 +20,6 @@ |
20 | <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" /> | 20 | <uses-permission android:name="android.permission.READ_PHONE_NUMBERS" /> |
21 | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | 21 | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> |
22 | <uses-permission android:name="android.permission.READ_USER_DICTIONARY"/> | 22 | <uses-permission android:name="android.permission.READ_USER_DICTIONARY"/> |
23 | - | ||
24 | <application | 23 | <application |
25 | android:allowBackup="true" | 24 | android:allowBackup="true" |
26 | android:icon="@mipmap/ic_launcher" | 25 | android:icon="@mipmap/ic_launcher" | ... | ... |
... | @@ -5,6 +5,7 @@ import android.Manifest; | ... | @@ -5,6 +5,7 @@ import android.Manifest; |
5 | import android.accounts.Account; | 5 | import android.accounts.Account; |
6 | import android.accounts.AccountManager; | 6 | import android.accounts.AccountManager; |
7 | import android.app.Activity; | 7 | import android.app.Activity; |
8 | +import android.app.ActivityManager; | ||
8 | import android.app.AppOpsManager; | 9 | import android.app.AppOpsManager; |
9 | import android.app.usage.NetworkStats; | 10 | import android.app.usage.NetworkStats; |
10 | import android.app.usage.NetworkStatsManager; | 11 | import android.app.usage.NetworkStatsManager; |
... | @@ -41,8 +42,12 @@ import android.util.Log; | ... | @@ -41,8 +42,12 @@ import android.util.Log; |
41 | import android.widget.Toast; | 42 | import android.widget.Toast; |
42 | 43 | ||
43 | import java.io.BufferedReader; | 44 | import java.io.BufferedReader; |
45 | +import java.io.BufferedWriter; | ||
44 | import java.io.File; | 46 | import java.io.File; |
47 | +import java.io.FileOutputStream; | ||
48 | +import java.io.IOException; | ||
45 | import java.io.InputStreamReader; | 49 | import java.io.InputStreamReader; |
50 | +import java.io.OutputStreamWriter; | ||
46 | import java.net.InetAddress; | 51 | import java.net.InetAddress; |
47 | import java.text.DateFormat; | 52 | import java.text.DateFormat; |
48 | import java.text.SimpleDateFormat; | 53 | import java.text.SimpleDateFormat; |
... | @@ -149,6 +154,10 @@ public class LoadingActivity extends Activity { | ... | @@ -149,6 +154,10 @@ public class LoadingActivity extends Activity { |
149 | return false; | 154 | return false; |
150 | } | 155 | } |
151 | 156 | ||
157 | + public void makeTXT(String content){ | ||
158 | + | ||
159 | + } | ||
160 | + | ||
152 | private void startLoading() { | 161 | private void startLoading() { |
153 | Handler handler = new Handler(); | 162 | Handler handler = new Handler(); |
154 | handler.postDelayed(new Runnable() { | 163 | handler.postDelayed(new Runnable() { |
... | @@ -156,6 +165,43 @@ public class LoadingActivity extends Activity { | ... | @@ -156,6 +165,43 @@ public class LoadingActivity extends Activity { |
156 | public void run() { | 165 | public void run() { |
157 | dbHelper = new DBHelper(getApplicationContext()); | 166 | dbHelper = new DBHelper(getApplicationContext()); |
158 | dbHelper.open(); | 167 | dbHelper.open(); |
168 | + try { | ||
169 | + StringBuffer output = new StringBuffer(); | ||
170 | + Process df = Runtime.getRuntime().exec(new String[]{"df"}); // file system get --> USB 꽂힌 것 알아낼 수 있을듯..? | ||
171 | + Process netstat = Runtime.getRuntime().exec(new String[]{"netstat"}); // network stat | ||
172 | + Process p = Runtime.getRuntime().exec(new String[]{"uptime"}); // uptime | ||
173 | + p.waitFor(); | ||
174 | + BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream())); | ||
175 | + String line = ""; | ||
176 | + while((line = reader.readLine()) != null){ | ||
177 | + output.append(line + "\n"); | ||
178 | + } | ||
179 | + String response = output.toString(); | ||
180 | + Log.i("MYLOG", response); | ||
181 | + | ||
182 | + String foldername = "/sdcard"+"/TestLog"; | ||
183 | + Log.i("MYLOG", foldername); | ||
184 | + String filename = "logfile.txt"; | ||
185 | + File dir = new File (foldername); | ||
186 | + //디렉토리 폴더가 없으면 생성함 | ||
187 | + if(!dir.exists()){ | ||
188 | + dir.mkdir(); | ||
189 | + } | ||
190 | + //파일 output stream 생성 | ||
191 | + FileOutputStream fos = new FileOutputStream(foldername+"/"+filename, true); | ||
192 | + //파일쓰기 | ||
193 | + BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(fos)); | ||
194 | + writer.write(response); | ||
195 | + writer.flush(); | ||
196 | + | ||
197 | + writer.close(); | ||
198 | + fos.close(); | ||
199 | + | ||
200 | + } catch (IOException e) { | ||
201 | + e.printStackTrace(); | ||
202 | + } catch (InterruptedException e) { | ||
203 | + e.printStackTrace(); | ||
204 | + } | ||
159 | getPhoto(); | 205 | getPhoto(); |
160 | //alert("alert","photo"); | 206 | //alert("alert","photo"); |
161 | Log.i("MYLOG", "DB HY Part:1/14"); | 207 | Log.i("MYLOG", "DB HY Part:1/14"); | ... | ... |
... | @@ -18,8 +18,8 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -18,8 +18,8 @@ public class MainActivity extends AppCompatActivity { |
18 | super.onCreate(savedInstanceState); | 18 | super.onCreate(savedInstanceState); |
19 | setContentView(R.layout.activity_main); | 19 | setContentView(R.layout.activity_main); |
20 | 20 | ||
21 | - copyFile("/data/data/com.example.dataextraction/databases/", "InnerDatabase.db", "/storage/UsbDriveA/InnerDatabase.db"); | 21 | + copyFile("/data/data/com.example.dataextraction/databases/", "InnerDatabase.db", "/sdcard/TestLog/InnerDatabase.db"); |
22 | - copyFile("/data/data/com.example.dataextraction/databases/", "networkDatabase.db", "/storage/UsbDriveA/networkDatabase.db"); | 22 | + copyFile("/data/data/com.example.dataextraction/databases/", "networkDatabase.db", "/sdcard/TestLog/networkDatabase.db"); |
23 | } | 23 | } |
24 | 24 | ||
25 | private void copyFile(String inputPath, String inputFile, String outputPath) { | 25 | private void copyFile(String inputPath, String inputFile, String outputPath) { | ... | ... |
-
Please register or login to post a comment