|
@@ -5,15 +5,20 @@ import static com.app.http.APPConfig.APP_TG_SEND_MESSAGE;
|
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
|
+import com.app.duck.BuildConfig;
|
|
|
+import com.app.duck.Config;
|
|
|
+import com.app.duck.R;
|
|
|
+import com.blankj.utilcode.util.AppUtils;
|
|
|
+import com.blankj.utilcode.util.DeviceUtils;
|
|
|
import com.blankj.utilcode.util.FileUtils;
|
|
|
+import com.blankj.utilcode.util.GsonUtils;
|
|
|
+import com.blankj.utilcode.util.PermissionUtils;
|
|
|
+import com.blankj.utilcode.util.RomUtils;
|
|
|
import com.blankj.utilcode.util.StringUtils;
|
|
|
import com.blankj.utilcode.util.ThreadUtils;
|
|
|
import com.blankj.utilcode.util.ToastUtils;
|
|
|
import com.blankj.utilcode.util.Utils;
|
|
|
import com.blankj.utilcode.util.ZipUtils;
|
|
|
-import com.app.duck.BuildConfig;
|
|
|
-import com.app.duck.Config;
|
|
|
-import com.app.duck.R;
|
|
|
import com.elvishew.xlog.XLog;
|
|
|
|
|
|
import java.io.File;
|
|
@@ -46,10 +51,25 @@ public class TgBot {
|
|
|
ThreadUtils.executeByIo(new ThreadUtils.Task<Object>() {
|
|
|
@Override
|
|
|
public Object doInBackground() throws Throwable {
|
|
|
+
|
|
|
+ try {
|
|
|
+ XLog.i("AppName -> " + AppUtils.getAppName());
|
|
|
+ XLog.i("PackageName -> " + AppUtils.getAppPackageName());
|
|
|
+ XLog.i("AppVersionName -> " + AppUtils.getAppVersionName());
|
|
|
+ XLog.i("AppVersionCode -> " + AppUtils.getAppVersionCode());
|
|
|
+ XLog.i("Model -> " + DeviceUtils.getModel());
|
|
|
+ XLog.i("SDKVersionName -> " + DeviceUtils.getSDKVersionName());
|
|
|
+ XLog.i("SDKVersionCode -> " + DeviceUtils.getSDKVersionCode());
|
|
|
+ XLog.i("Root -> " + DeviceUtils.isDeviceRooted());
|
|
|
+ XLog.i("Rom -> " + GsonUtils.toJson(RomUtils.getRomInfo()));
|
|
|
+ XLog.i("Permissions -> " + GsonUtils.toJson(PermissionUtils.getPermissions()));
|
|
|
+ } catch (Exception e) {
|
|
|
+ }
|
|
|
+
|
|
|
ToastUtils.showLong(R.string.pushing);
|
|
|
XLog.i(StringUtils.getString(R.string.pushing));
|
|
|
String filePath = Utils.getApp().getFilesDir().getPath() + "/ulog";
|
|
|
- String filePathZip = Utils.getApp().getFilesDir().getPath() + "/zip/" + HxUtils.getPhone() + "-log";
|
|
|
+ String filePathZip = Utils.getApp().getFilesDir().getPath() + "/zip/" + HxUtils.getPhone() + "-log.zip";
|
|
|
FileUtils.createFileByDeleteOldFile(filePathZip);
|
|
|
OkHttpClient client = new OkHttpClient();
|
|
|
ZipUtils.zipFile(filePath, filePathZip, "log zip push");
|