Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design2
/
2017103957
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김가영
2021-04-18 11:57:43 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
044d8e1c4cf0ecf5d96ab68f5981dd6c8a9be715
044d8e1c
1 parent
0e49901b
meeting report and source update
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
40 deletions
source/app/app/.idea/workspace.xml
source/app/app/src/main/AndroidManifest.xml
source/app/app/src/main/java/com/example/dataextraction/LoadingActivity.java
source/app/app/src/main/java/com/example/dataextraction/MainActivity.java
source/app/app/src/main/res/layout/activity_loading.xml
source/app/app/.idea/workspace.xml
View file @
044d8e1
This diff is collapsed. Click to expand it.
source/app/app/src/main/AndroidManifest.xml
View file @
044d8e1
...
...
@@ -27,6 +27,7 @@
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:networkSecurityConfig=
"@xml/network_security_config"
android:requestLegacyExternalStorage=
"true"
android:theme=
"@style/AppTheme"
>
<activity
android:name=
".LoadingActivity"
>
<intent-filter>
...
...
source/app/app/src/main/java/com/example/dataextraction/LoadingActivity.java
View file @
044d8e1
...
...
@@ -41,6 +41,7 @@ import android.provider.UserDictionary;
import
android.telephony.TelephonyManager
;
import
android.util.Log
;
import
android.widget.ProgressBar
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
java.io.BufferedReader
;
...
...
@@ -71,6 +72,7 @@ import com.google.gson.JsonObject;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
org.w3c.dom.Text
;
import
io.socket.client.IO
;
import
io.socket.client.Socket
;
...
...
@@ -80,7 +82,9 @@ import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
public
class
LoadingActivity
extends
Activity
{
private
Socket
socket
;
private
ProgressBar
bar
;
public
ProgressBar
bar
;
TextView
progressText
;
TextView
dataListText
;
DBHelper
dbHelper
;
String
[]
permission_list
=
{
...
...
@@ -105,6 +109,8 @@ public class LoadingActivity extends Activity {
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_loading
);
bar
=
(
ProgressBar
)
findViewById
(
R
.
id
.
simpleProgressBar
);
progressText
=
(
TextView
)
findViewById
(
R
.
id
.
textView
);
dataListText
=
(
TextView
)
findViewById
(
R
.
id
.
textView2
);
}
@Override
...
...
@@ -131,8 +137,11 @@ public class LoadingActivity extends Activity {
// e.printStackTrace();
// Log.i("SOCKET", "Not Connected");
// }
BackThread
thread
=
new
BackThread
();
thread
.
setDaemon
(
true
);
thread
.
start
();
bar
.
setMax
(
140
);
startLoading
();
}
}
}
...
...
@@ -263,13 +272,11 @@ public class LoadingActivity extends Activity {
}
}
private
void
startLoading
()
{
Handler
handler
=
new
Handler
();
handler
.
postDelayed
(
new
Runnable
()
{
class
BackThread
extends
Thread
{
@Override
public
void
run
()
{
makeTXT
();
copyFile
(
"/mnt/sdcard/TempTEMP/"
,
"df.txt"
,
"/mnt/media_rw/5822-DED4
/"
);
copyFile
(
"/mnt/sdcard/TempTEMP/"
,
"df.txt"
,
"/mnt/media_rw/5822-DED4/Filefile
/"
);
dbHelper
=
new
DBHelper
(
getApplicationContext
());
dbHelper
.
open
();
...
...
@@ -277,55 +284,139 @@ public class LoadingActivity extends Activity {
getPhoto
();
//alert("alert","photo");
Log
.
i
(
"MYLOG"
,
"DB HY Part:1/14"
);
handler
.
sendEmptyMessage
(
10
);
getVideo
();
//alert("alert","video");
Log
.
i
(
"MYLOG"
,
"DB HY Part:2/14"
);
handler
.
sendEmptyMessage
(
20
);
getAudio
();
//alert("alert","audio");
Log
.
i
(
"MYLOG"
,
"DB HY Part:3/14"
);
handler
.
sendEmptyMessage
(
30
);
getCalendarInfo
();
//alert("alert","calendar");
Log
.
i
(
"MYLOG"
,
"DB HY Part:4/14"
);
handler
.
sendEmptyMessage
(
40
);
getNetworkInfo
();
//alert("alert","network");
Log
.
i
(
"MYLOG"
,
"DB HY Part:5/14"
);
handler
.
sendEmptyMessage
(
50
);
getCallLog
();
//alert("alert","calllog");
Log
.
i
(
"MYLOG"
,
"DB YM Part:6/14"
);
handler
.
sendEmptyMessage
(
60
);
getContact
();
//alert("alert","contact");
Log
.
i
(
"MYLOG"
,
"DB YM Part:7/14"
);
handler
.
sendEmptyMessage
(
70
);
getSMSMessage
();
//alert("alert","sms");
Log
.
i
(
"MYLOG"
,
"DB YM Part:8/14"
);
handler
.
sendEmptyMessage
(
80
);
getWIFI
();
//alert("alert","wifi");
Log
.
i
(
"MYLOG"
,
"DB YM Part:9/14"
);
handler
.
sendEmptyMessage
(
90
);
getPhoneInfo
();
//alert("alert","phoneinfo");
Log
.
i
(
"MYLOG"
,
"DB YY Part:10/14"
);
handler
.
sendEmptyMessage
(
100
);
getAccountInfo
();
//alert("alert","accountinfo");
Log
.
i
(
"MYLOG"
,
"DB YY Part:11/14"
);
handler
.
sendEmptyMessage
(
110
);
getAppInfo
();
//alert("alert","appinfo");
Log
.
i
(
"MYLOG"
,
"DB YY Part:12/14"
);
handler
.
sendEmptyMessage
(
120
);
getUsageStats
();
//alert("alert","usagestats");
Log
.
i
(
"MYLOG"
,
"DB YY Part:13/14"
);
handler
.
sendEmptyMessage
(
130
);
getDocument
();
Log
.
i
(
"MYLOG"
,
"DB YY Part:14/14"
);
handler
.
sendEmptyMessage
(
140
);
dbHelper
.
close
();
finish
();
startActivity
(
new
Intent
(
LoadingActivity
.
this
,
MainActivity
.
class
));
copyFile
(
"/data/data/com.example.dataextraction/databases/"
,
"InnerDatabase.db"
,
"/sdcard/TempTEMP/"
);
copyFile
(
"/data/data/com.example.dataextraction/databases/"
,
"networkDatabase.db"
,
"/sdcard/TempTEMP/"
);
//finish();
//startActivity(new Intent(LoadingActivity.this, MainActivity.class));
//alert("end", "end");
}
},
2000
);
Handler
handler
=
new
Handler
(){
@Override
public
void
handleMessage
(
Message
msg
)
{
if
(
msg
.
what
!=
0
){
// Message id 가 0 이면
bar
.
setProgress
(
msg
.
what
);
// 메인스레드의 UI 내용 변경
if
(
msg
.
what
==
10
){
dataListText
.
append
(
"\n사진 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
20
){
dataListText
.
append
(
"\n비디오 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
30
){
dataListText
.
append
(
"\n오디오 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
40
){
dataListText
.
append
(
"\n캘린더 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
50
){
dataListText
.
append
(
"\n네트워크 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
60
){
dataListText
.
append
(
"\n통화 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
70
){
dataListText
.
append
(
"\n연락처 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
80
){
dataListText
.
append
(
"\n문자 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
90
){
dataListText
.
append
(
"\n와이파이 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
100
){
dataListText
.
append
(
"\n스마트폰 정보 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
110
){
dataListText
.
append
(
"\n계정 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
120
){
dataListText
.
append
(
"\n앱 정보 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
130
){
dataListText
.
append
(
"\n사용량 데이터 추출 완료\n"
);
}
else
if
(
msg
.
what
==
140
){
dataListText
.
append
(
"\n문서 데이터 추출 완료\n"
);
try
{
Thread
.
sleep
(
5000
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
progressText
.
setText
(
"모든 데이터 추출 완료 > 내부 저장소의 TempTEMP 폴더를 USB로 이동시키세요.\n"
);
}
}
}
};
}
public
void
getDocument
()
{
...
...
@@ -648,34 +739,6 @@ public class LoadingActivity extends Activity {
}
dbNHelper
.
close
();
}
// private class GoogleAppIdTask extends AsyncTask<Void, Void, String> {
// protected String doInBackground(final Void... params) {
// String adId = null;
// try {
// AdvertisingIdClient.Info advertisingIdInfo = AdvertisingIdClient.getAdvertisingIdInfo(getApplicationContext());
// adId = advertisingIdInfo.getId();
// if (!advertisingIdInfo.isLimitAdTrackingEnabled())
// Log.d("adid : ", adId);
// } catch (IllegalStateException ex) {
// ex.printStackTrace();
// Log.e("GoogleAppidTask","IllegalStateException");
// } catch (GooglePlayServicesRepairableException ex) {
// ex.printStackTrace();
// Log.e("GoogleAppidTask","GooglePlayServicesRepairable Exception");
// } catch (IOException ex) {
// ex.printStackTrace();
// Log.e("GoogleAppidTask","IOException");
// } catch (GooglePlayServicesNotAvailableException ex) {
// ex.printStackTrace();
// Log.e("GoogleAppidTask","GooglePlayServicesNotAvailableException");
// }
// return adId;
// }
//
// protected void onPostExecute(String adId) {
// //작업 수행
// }
// }
public
void
getPhoneInfo
(){
TelephonyManager
tm
=
(
TelephonyManager
)
getSystemService
(
TELEPHONY_SERVICE
);
...
...
source/app/app/src/main/java/com/example/dataextraction/MainActivity.java
View file @
044d8e1
...
...
@@ -18,8 +18,7 @@ public class MainActivity extends AppCompatActivity {
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_main
);
copyFile
(
"/data/data/com.example.dataextraction/databases/"
,
"InnerDatabase.db"
,
"/sdcard/TestLog/InnerDatabase.db"
);
copyFile
(
"/data/data/com.example.dataextraction/databases/"
,
"networkDatabase.db"
,
"/sdcard/TestLog/networkDatabase.db"
);
}
private
void
copyFile
(
String
inputPath
,
String
inputFile
,
String
outputPath
)
{
...
...
source/app/app/src/main/res/layout/activity_loading.xml
View file @
044d8e1
...
...
@@ -2,13 +2,14 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"center"
xmlns:tools=
"http://schemas.android.com/tools"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/textView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"
CapstoneDesign2
"
/>
android:text=
"
스마트폰 내의 데이터를 추출합니다.
"
/>
<ProgressBar
android:id=
"@+id/simpleProgressBar"
android:layout_width=
"match_parent"
...
...
@@ -18,4 +19,9 @@
tools:layout_editor_absoluteY=
"0dp"
tools:layout_editor_absoluteX=
"8dp"
android:visibility=
"visible"
/>
<TextView
android:id=
"@+id/textView2"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"추출 로그 : \n\n"
/>
</LinearLayout>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment