来源

享学堂

主函数

import java.io.File;
import java.io.FileFilter;
import java.io.FileOutputStream;
import java.io.FilenameFilter;public class MyMain {public static void main(String[] args) throws Exception {byte[] mainDexData; //存储源apk中的源dex文件 byte[] aarData;     // 存储壳中的壳dex文件byte[] mergeDex;    // 存储壳dex 和源dex 的合并的新dex文件File tempFileApk = new File("source/apk/temp");if (tempFileApk.exists()) {File[]files = tempFileApk.listFiles();for(File file: files){if (file.isFile()) {file.delete();}}}File tempFileAar = new File("source/aar/temp");if (tempFileAar.exists()) {File[]files = tempFileAar.listFiles();for(File file: files){if (file.isFile()) {file.delete();}}}/*** 第一步 处理原始apk 加密dex**/AES.init(AES.DEFAULT_PWD);//解压apkFile apkFile = new File("source/apk/app-debug.apk");File newApkFile = new File(apkFile.getParent() + File.separator + "temp");if(!newApkFile.exists()) {newApkFile.mkdirs();}File mainDexFile = AES.encryptAPKFile(apkFile,newApkFile);if (newApkFile.isDirectory()) {File[] listFiles = newApkFile.listFiles();for (File file : listFiles) {if (file.isFile()) {if (file.getName().endsWith(".dex")) {String name = file.getName();System.out.println("rename step1:"+name);int cursor = name.indexOf(".dex");String newName = file.getParent()+ File.separator + name.substring(0, cursor) + "_" + ".dex";System.out.println("rename step2:"+newName);file.renameTo(new File(newName));}}}}/*** 第二步 处理aar 获得壳dex*/File aarFile = new File("source/aar/mylibrary-debug.aar");File aarDex  = Dx.jar2Dex(aarFile);
//        aarData = Utils.getBytes(aarDex);   //将dex文件读到byte 数组File tempMainDex = new File(newApkFile.getPath() + File.separator + "classes.dex");if (!tempMainDex.exists()) {tempMainDex.createNewFile();}
//        System.out.println("MyMain" + tempMainDex.getAbsolutePath());FileOutputStream fos = new FileOutputStream(tempMainDex);byte[] fbytes = Utils.getBytes(aarDex);fos.write(fbytes);fos.flush();fos.close();/*** 第3步 打包签名*/File unsignedApk = new File("result/apk-unsigned.apk");unsignedApk.getParentFile().mkdirs();
//        File disFile = new File(apkFile.getAbsolutePath() + File.separator+ "temp");Zip.zip(newApkFile, unsignedApk);//不用插件就不能自动使用原apk的签名...File signedApk = new File("result/apk-signed.apk");Signature.signature(unsignedApk, signedApk);}private static File getMainDexFile(File apkFile) {// TODO Auto-generated method stubFile disFile = new File(apkFile.getAbsolutePath() + "unzip");Zip.unZip(apkFile, disFile);File[] files = disFile.listFiles(new FilenameFilter() {@Overridepublic boolean accept(File dir, String name) {if (name.endsWith(".dex")) {return true;}return false;}});for (File file: files) {if (file.getName().endsWith("classes.dex")) {return file;}}return null;}
}

AES.java

import java.io.File;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;/*** Created by xiang on 16/6/8.*/
public class AES {public static final String DEFAULT_PWD = "abcdefghijklmnop";private static final String algorithmStr = "AES/ECB/PKCS5Padding";private static Cipher encryptCipher;private static Cipher decryptCipher;public static void init(String password) {try {// 生成一个实现指定转换的 Cipher 对象。encryptCipher = Cipher.getInstance(algorithmStr);decryptCipher = Cipher.getInstance(algorithmStr);// algorithmStrbyte[] keyStr = password.getBytes();SecretKeySpec key = new SecretKeySpec(keyStr, "AES");encryptCipher.init(Cipher.ENCRYPT_MODE, key);decryptCipher.init(Cipher.DECRYPT_MODE, key);} catch (NoSuchAlgorithmException e) {e.printStackTrace();} catch (NoSuchPaddingException e) {e.printStackTrace();} catch (InvalidKeyException e) {e.printStackTrace();}}/**** @param srcAPKfile  源文件所在位置* @param dstApkFile  目标文件* @return             加密后的新dex 文件* @throws Exception*/public static File encryptAPKFile(File srcAPKfile, File dstApkFile) throws Exception {if (srcAPKfile == null) {System.out.println("encryptAPKFile :srcAPKfile null");return null;}
//        File disFile = new File(srcAPKfile.getAbsolutePath() + "unzip");
//		Zip.unZip(srcAPKfile, disFile);Zip.unZip(srcAPKfile, dstApkFile);//获得所有的dex (需要处理分包情况)File[] dexFiles = dstApkFile.listFiles(new FilenameFilter() {@Overridepublic boolean accept(File file, String s) {return s.endsWith(".dex");}});File mainDexFile = null;byte[] mainDexData = null;for (File dexFile: dexFiles) {//读数据byte[] buffer = Utils.getBytes(dexFile);//加密byte[] encryptBytes = AES.encrypt(buffer);if (dexFile.getName().endsWith("classes.dex")) {mainDexData = encryptBytes;mainDexFile = dexFile;}//写数据  替换原来的数据FileOutputStream fos = new FileOutputStream(dexFile);fos.write(encryptBytes);fos.flush();fos.close();}return mainDexFile;}public static byte[] encrypt(byte[] content) {try {byte[] result = encryptCipher.doFinal(content);return result;} catch (IllegalBlockSizeException e) {e.printStackTrace();} catch (BadPaddingException e) {e.printStackTrace();}return null;}public static byte[] decrypt(byte[] content) {try {byte[] result = decryptCipher.doFinal(content);return result;} catch (IllegalBlockSizeException e) {e.printStackTrace();} catch (BadPaddingException e) {e.printStackTrace();}return null;}public static void main(String[] args) throws Exception {
//        byte[] newfs = Utils.int2Bytes(2312312);
//        byte[] refs = new byte[4];
//        //楂樹綅鍦ㄥ墠锛屼綆浣嶅湪鍓嶆帀涓釜
//        for (int i = 0; i < 4; i++) {
//            refs[i] = newfs[newfs.length - 1 - i];
//        }
//        System.out.println(Arrays.toString(newfs));
//        System.out.println(Arrays.toString(refs));
//
//        ByteBuf byteBuf = Unpooled.buffer();
//
//        byteBuf.writeInt(2312312);
//        byte[] a = new byte[4];
//        byteBuf.order(ByteOrder.LITTLE_ENDIAN);
//        byteBuf.readBytes(a);
//        System.out.println(Arrays.toString(a));//        AES.init(AES.DEFAULT_PWD);
//        String msg = Base64.encode(AES.encrypt(new byte[]{1, 2, 3, 4, 5}));
//        System.out.println(msg);
//        byte[] aes = AES.decrypt(Base64.decode(msg));
//        System.out.println(Arrays.toString(aes));File zip = new File("/Users/xiang/develop/source.apk");String absolutePath = zip.getAbsolutePath();File dir = new File(absolutePath.substring(0, absolutePath.lastIndexOf(".")));Zip.unZip(zip,dir);File zip2 = new File("/Users/xiang/develop/app-debug2.apk");Zip.zip(dir,zip2);String[] argv = {"jarsigner","-verbose", "-sigalg", "MD5withRSA","-digestalg", "SHA1","-keystore", "/Users/xiang/develop/debug.keystore","-storepass","android","-keypass", "android","-signedjar", "/Users/xiang/develop/app-debug2-sign.apk","/Users/xiang/develop/app-debug2.apk","androiddebugkey"};Process pro = null;try {pro = Runtime.getRuntime().exec(argv);//destroy the streamtry {pro.waitFor();} catch (InterruptedException e) {e.printStackTrace();}} finally {if (pro != null) {pro.destroy();}}}}

Dx.java

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;/*** Created by LK on 2017/9/5.* */public class Dx {public static File jar2Dex(File aarFile) throws IOException, InterruptedException {File fakeDex = new File(aarFile.getParent() + File.separator + "temp");System.out.println("jar2Dex: aarFile.getParent(): " + aarFile.getParent());//解压aar到 fakeDex 目录下Zip.unZip(aarFile, fakeDex);//过滤找到对应的fakeDex 下的classes.jarFile[] files = fakeDex.listFiles(new FilenameFilter() {@Overridepublic boolean accept(File file, String s) {return s.equals("classes.jar");}});if (files == null || files.length <= 0) {throw new RuntimeException("the aar is invalidate");}File classes_jar = files[0];// 将classes.jar 变成classes.dexFile aarDex = new File(classes_jar.getParentFile(), "classes.dex");//我们要将jar 转变成为dex 需要使用android tools 里面的dx.bat//使用java 调用windows 下的命令Dx.dxCommand(aarDex, classes_jar);return aarDex;}public static void dxCommand(File aarDex, File classes_jar) throws IOException, InterruptedException {Runtime runtime = Runtime.getRuntime();Process process = runtime.exec("cmd.exe /C dx --dex --output=" + aarDex.getAbsolutePath() + " " +classes_jar.getAbsolutePath());try {process.waitFor();} catch (InterruptedException e) {e.printStackTrace();throw e;}if (process.exitValue() != 0) {InputStream inputStream = process.getErrorStream();int len;byte[] buffer = new byte[2048];ByteArrayOutputStream bos = new ByteArrayOutputStream();while((len=inputStream.read(buffer)) != -1){bos.write(buffer,0,len);}System.out.println(new String(bos.toByteArray(),"GBK"));throw new RuntimeException("dx run failed");}process.destroy();}
}

Signature.java

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;/*** Created by LK on 2017/9/4.* */public class Signature {public static void signature(File unsignedApk, File signedApk) throws InterruptedException, IOException {String cmd[] = {"cmd.exe", "/C ","jarsigner",  "-sigalg", "MD5withRSA","-digestalg", "SHA1","-keystore", "C:/Users/allen/.android/debug.keystore","-storepass", "android","-keypass", "android","-signedjar", signedApk.getAbsolutePath(),unsignedApk.getAbsolutePath(),"androiddebugkey"};Process process = Runtime.getRuntime().exec(cmd);System.out.println("start sign");
//        BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
//        String line;
//        while ((line = reader.readLine()) != null)
//            System.out.println("tasklist: " + line);try {int waitResult = process.waitFor();System.out.println("waitResult: " + waitResult);} catch (InterruptedException e) {e.printStackTrace();throw e;}System.out.println("process.exitValue() " + process.exitValue() );if (process.exitValue() != 0) {InputStream inputStream = process.getErrorStream();int len;byte[] buffer = new byte[2048];ByteArrayOutputStream bos = new ByteArrayOutputStream();while((len=inputStream.read(buffer)) != -1){bos.write(buffer,0,len);}System.out.println(new String(bos.toByteArray(),"GBK"));throw new RuntimeException("签名执行失败");}System.out.println("finish signed");process.destroy();}
}

Utils.java

import java.io.File;
import java.io.RandomAccessFile;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.zip.Adler32;/*** Created by xiang on 2017/5/17.*/public class Utils {//  public static byte[] int2Bytes(int number) {
//      byte[] b = new byte[4];
//      for (int i = 3; i >= 0; i--) {
//          b[i] = (byte) (number % 256);
//          number >>= 8;
//      }
//      return b;
//  }public static byte[] int2Bytes(int value) {byte[] src = new byte[4];src[3] = (byte) ((value >> 24) & 0xFF);src[2] = (byte) ((value >> 16) & 0xFF);src[1] = (byte) ((value >> 8) & 0xFF);src[0] = (byte) (value & 0xFF);return src;}public static int bytes2Int(byte[] src) {int value;value = (int) ((src[0] & 0xFF)| ((src[1] & 0xFF)<<8)| ((src[2] & 0xFF)<<16)| ((src[3] & 0xFF)<<24));return value;}public static void changeSignature(byte[] newDex) throws NoSuchAlgorithmException {System.out.println("更换dex文件 签名信息...");MessageDigest md = MessageDigest.getInstance("SHA-1");//从32个字节开始 计算sha1值md.update(newDex, 32, newDex.length - 32);byte[] sha1 = md.digest();//从第12位开始拷贝20字节内容//替换signatureSystem.arraycopy(sha1, 0, newDex, 12, 20);System.out.println("更换dex文件 checksum...");}public static void changeCheckSum(byte[] newDex) {Adler32 adler = new Adler32();adler.update(newDex, 12, newDex.length - 12);int value = (int) adler.getValue();byte[] checkSum = Utils.int2Bytes(value);System.arraycopy(checkSum, 0, newDex, 8, 4);}public static byte[] getBytes(File dexFile) throws Exception {RandomAccessFile fis = new RandomAccessFile(dexFile, "r");byte[] buffer = new byte[(int)fis.length()];fis.readFully(buffer);fis.close();return buffer;}public static void changeFileSize(byte[] mainDexData, byte[] newDex, byte[] aarData ) {byte[] bytes = Utils.int2Bytes(mainDexData.length);System.out.println("拷贝原来dex长度到新的dex:" + Utils.bytes2Int(bytes));//更该文件头长度信息//修改System.out.println("更换dex 文件头长度信息...");byte[] file_size = Utils.int2Bytes(newDex.length);System.arraycopy(file_size, 0, newDex, 32, 4);}
//  public static void main(String[] args) throws Exception {
//      ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer();
//      byteBuf.writeInt(241241143);
//      byte[] a = new byte[4];
//      byteBuf.markReaderIndex();
//      byteBuf.readBytes(a);
//      byteBuf.resetReaderIndex();
//
//      System.out.println(Arrays.toString(a));
//      System.out.println(Arrays.toString(int2Bytes(241241143)));
//      System.out.println(Arrays.toString(intToBytes(241241143)));
//  }}

Zip.java

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.zip.CRC32;
import java.util.zip.CheckedOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;/*** Created by xiang on 2017/5/17.*/public class Zip {public static void unZip(File zip, File dir) {try {dir.delete();ZipFile zipFile = new ZipFile(zip);Enumeration<? extends ZipEntry> entries = zipFile.entries();while (entries.hasMoreElements()) {ZipEntry zipEntry = entries.nextElement();String name = zipEntry.getName();if (name.equals("META-INF/CERT.RSA") || name.equals("META-INF/CERT.SF") || name.equals("META-INF/MANIFEST.MF")) {continue;}if (!zipEntry.isDirectory()) {File file = new File(dir, name);if (!file.getParentFile().exists()) file.getParentFile().mkdirs();FileOutputStream fos = new FileOutputStream(file);InputStream is = zipFile.getInputStream(zipEntry);byte[] buffer = new byte[1024];int len;while ((len = is.read(buffer)) != -1) {fos.write(buffer, 0, len);}is.close();fos.close();}}zipFile.close();} catch (Exception e) {e.printStackTrace();}}public static void zip(File dir, File zip) throws Exception {zip.delete();// 对输出文件做CRC32校验CheckedOutputStream cos = new CheckedOutputStream(new FileOutputStream(zip), new CRC32());ZipOutputStream zos = new ZipOutputStream(cos);compress(dir, zos, "");zos.flush();zos.close();}private static void compress(File srcFile, ZipOutputStream zos,String basePath) throws Exception {if (srcFile.isDirectory()) {compressDir(srcFile, zos, basePath);} else {compressFile(srcFile, zos, basePath);}}private static void compressDir(File dir, ZipOutputStream zos,String basePath) throws Exception {File[] files = dir.listFiles();// 构建空目录if (files.length < 1) {ZipEntry entry = new ZipEntry(basePath + dir.getName() + "/");zos.putNextEntry(entry);zos.closeEntry();}for (File file : files) {// 递归压缩compress(file, zos, basePath + dir.getName() + "/");}}private static void compressFile(File file, ZipOutputStream zos, String dir)throws Exception {String dirName = dir + file.getName();String[] dirNameNew = dirName.split("/");StringBuffer buffer = new StringBuffer();if (dirNameNew.length > 1) {for (int i = 1; i < dirNameNew.length; i++) {buffer.append("/");buffer.append(dirNameNew[i]);}} else {buffer.append("/");}ZipEntry entry = new ZipEntry(buffer.toString().substring(1));zos.putNextEntry(entry);BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));int count;byte data[] = new byte[1024];while ((count = bis.read(data, 0, 1024)) != -1) {zos.write(data, 0, count);}bis.close();zos.closeEntry();}
}

==Android

app

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.example.protectapp"><applicationandroid:allowBackup="true"android:icon="@mipmap/ic_launcher"android:label="@string/app_name"android:roundIcon="@mipmap/ic_launcher_round"android:supportsRtl="true"android:name="com.example.mylibrary.ShellApplication"android:theme="@style/AppTheme"><activity android:name=".MainActivity"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity></application></manifest>

MainActivity.java

package com.example.protectapp;import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;public class MainActivity extends AppCompatActivity {@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);}
}

lib

ShellApplication.java

package com.example.mylibrary;import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.util.Log;import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;/*** @author 享学课堂 Alvin* @package com.xiangxue.alvin.applibrary* @fileName ShellApplication* @date on 2019/4/21* @qq 2464061231**/
public class ShellApplication extends Application {private static final String TAG = "ShellApplication";public static String getPassword(){return "abcdefghijklmnop";}//    static {
//        System.loadLibrary("native-lib");
//    }@Overrideprotected void attachBaseContext(Context base) {super.attachBaseContext(base);AES.init(getPassword());File apkFile = new File(getApplicationInfo().sourceDir);//data/data/包名/files/fake_apk/File unZipFile = getDir("fake_apk", MODE_PRIVATE);File app = new File(unZipFile, "app");if (!app.exists()) {Zip.unZip(apkFile, app);File[] files = app.listFiles();for (File file : files) {String name = file.getName();if (name.equals("classes.dex")) {} else if (name.endsWith(".dex")) {try {byte[] bytes = getBytes(file);FileOutputStream fos = new FileOutputStream(file);byte[] decrypt = AES.decrypt(bytes);
//                        fos.write(bytes);fos.write(decrypt);fos.flush();fos.close();} catch (Exception e) {e.printStackTrace();}}}}List list = new ArrayList<>();Log.d("FAKE", Arrays.toString(app.listFiles()));for (File file : app.listFiles()) {if (file.getName().endsWith(".dex")) {list.add(file);}}Log.d("FAKE", list.toString());try {V19.install(getClassLoader(), list, unZipFile);} catch (IllegalAccessException e) {e.printStackTrace();} catch (NoSuchFieldException e) {e.printStackTrace();} catch (InvocationTargetException e) {e.printStackTrace();} catch (NoSuchMethodException e) {e.printStackTrace();}}private static Field findField(Object instance, String name) throws NoSuchFieldException {Class clazz = instance.getClass();while (clazz != null) {try {Field e = clazz.getDeclaredField(name);if (!e.isAccessible()) {e.setAccessible(true);}return e;} catch (NoSuchFieldException var4) {clazz = clazz.getSuperclass();}}throw new NoSuchFieldException("Field " + name + " not found in " + instance.getClass());}private static Method findMethod(Object instance, String name, Class... parameterTypes)throws NoSuchMethodException {Class clazz = instance.getClass();
//        Method[] declaredMethods = clazz.getDeclaredMethods();
//        System.out.println("  findMethod ");
//        for (Method m : declaredMethods) {
//            System.out.print(m.getName() + "  : ");
//            Class<?>[] parameterTypes1 = m.getParameterTypes();
//            for (Class clazz1 : parameterTypes1) {
//                System.out.print(clazz1.getName() + " ");
//            }
//            System.out.println("");
//        }while (clazz != null) {try {Method e = clazz.getDeclaredMethod(name, parameterTypes);if (!e.isAccessible()) {e.setAccessible(true);}return e;} catch (NoSuchMethodException var5) {clazz = clazz.getSuperclass();}}throw new NoSuchMethodException("Method " + name + " with parameters " + Arrays.asList(parameterTypes) + " not found in " + instance.getClass());}private static void expandFieldArray(Object instance, String fieldName, Object[]extraElements) throws NoSuchFieldException, IllegalArgumentException,IllegalAccessException {Field jlrField = findField(instance, fieldName);Object[] original = (Object[]) ((Object[]) jlrField.get(instance));Object[] combined = (Object[]) ((Object[]) Array.newInstance(original.getClass().getComponentType(), original.length + extraElements.length));System.arraycopy(original, 0, combined, 0, original.length);System.arraycopy(extraElements, 0, combined, original.length, extraElements.length);jlrField.set(instance, combined);}private static final class V19 {private V19() {}private static void install(ClassLoader loader, List<File> additionalClassPathEntries,File optimizedDirectory) throws IllegalArgumentException,IllegalAccessException, NoSuchFieldException, InvocationTargetException,NoSuchMethodException {Field pathListField = findField(loader, "pathList");Object dexPathList = pathListField.get(loader);ArrayList suppressedExceptions = new ArrayList();Log.d(TAG, "Build.VERSION.SDK_INT " + Build.VERSION.SDK_INT);if (Build.VERSION.SDK_INT >= 23) {expandFieldArray(dexPathList, "dexElements", makePathElements(dexPathList, newArrayList(additionalClassPathEntries), optimizedDirectory,suppressedExceptions));} else {expandFieldArray(dexPathList, "dexElements", makeDexElements(dexPathList, newArrayList(additionalClassPathEntries), optimizedDirectory,suppressedExceptions));}if (suppressedExceptions.size() > 0) {Iterator suppressedExceptionsField = suppressedExceptions.iterator();while (suppressedExceptionsField.hasNext()) {IOException dexElementsSuppressedExceptions = (IOException)suppressedExceptionsField.next();Log.w("MultiDex", "Exception in makeDexElement",dexElementsSuppressedExceptions);}Field suppressedExceptionsField1 = findField(loader,"dexElementsSuppressedExceptions");IOException[] dexElementsSuppressedExceptions1 = (IOException[]) ((IOException[])suppressedExceptionsField1.get(loader));if (dexElementsSuppressedExceptions1 == null) {dexElementsSuppressedExceptions1 = (IOException[]) suppressedExceptions.toArray(new IOException[suppressedExceptions.size()]);} else {IOException[] combined = new IOException[suppressedExceptions.size() +dexElementsSuppressedExceptions1.length];suppressedExceptions.toArray(combined);System.arraycopy(dexElementsSuppressedExceptions1, 0, combined,suppressedExceptions.size(), dexElementsSuppressedExceptions1.length);dexElementsSuppressedExceptions1 = combined;}suppressedExceptionsField1.set(loader, dexElementsSuppressedExceptions1);}}private static Object[] makeDexElements(Object dexPathList,ArrayList<File> files, FileoptimizedDirectory,ArrayList<IOException> suppressedExceptions) throwsIllegalAccessException, InvocationTargetException, NoSuchMethodException {Method makeDexElements = findMethod(dexPathList, "makeDexElements", newClass[]{ArrayList.class, File.class, ArrayList.class});return ((Object[]) makeDexElements.invoke(dexPathList, new Object[]{files,optimizedDirectory, suppressedExceptions}));}}/*** A wrapper around* {@code private static final dalvik.system.DexPathList#makePathElements}.*/private static Object[] makePathElements(Object dexPathList, ArrayList<File> files, File optimizedDirectory,ArrayList<IOException> suppressedExceptions)throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {Method makePathElements;try {makePathElements = findMethod(dexPathList, "makePathElements", List.class, File.class,List.class);} catch (NoSuchMethodException e) {Log.e(TAG, "NoSuchMethodException: makePathElements(List,File,List) failure");try {makePathElements = findMethod(dexPathList, "makePathElements", ArrayList.class, File.class, ArrayList.class);} catch (NoSuchMethodException e1) {Log.e(TAG, "NoSuchMethodException: makeDexElements(ArrayList,File,ArrayList) failure");try {Log.e(TAG, "NoSuchMethodException: try use v19 instead");return V19.makeDexElements(dexPathList, files, optimizedDirectory, suppressedExceptions);} catch (NoSuchMethodException e2) {Log.e(TAG, "NoSuchMethodException: makeDexElements(List,File,List) failure");throw e2;}}}return (Object[]) makePathElements.invoke(dexPathList, files, optimizedDirectory, suppressedExceptions);}private byte[] getBytes(File file) throws Exception {RandomAccessFile r = new RandomAccessFile(file, "r");byte[] buffer = new byte[(int) r.length()];r.readFully(buffer);r.close();return buffer;}
}

AES.java

package com.example.mylibrary;import java.io.File;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;/*** Created by xiang on 16/6/8.*/
public class AES {public static final String DEFAULT_PWD = "abcdefghijklmnop";private static final String algorithmStr = "AES/ECB/PKCS5Padding";private static Cipher encryptCipher;private static Cipher decryptCipher;public static void init(String password) {try {// 生成一个实现指定转换的 Cipher 对象。encryptCipher = Cipher.getInstance(algorithmStr);decryptCipher = Cipher.getInstance(algorithmStr);// algorithmStrbyte[] keyStr = password.getBytes();SecretKeySpec key = new SecretKeySpec(keyStr, "AES");encryptCipher.init(Cipher.ENCRYPT_MODE, key);decryptCipher.init(Cipher.DECRYPT_MODE, key);} catch (NoSuchAlgorithmException e) {e.printStackTrace();} catch (NoSuchPaddingException e) {e.printStackTrace();} catch (InvalidKeyException e) {e.printStackTrace();}}public static byte[] encrypt(byte[] content) {try {byte[] result = encryptCipher.doFinal(content);return result;} catch (IllegalBlockSizeException e) {e.printStackTrace();} catch (BadPaddingException e) {e.printStackTrace();}return null;}public static byte[] decrypt(byte[] content) {try {byte[] result = decryptCipher.doFinal(content);return result;} catch (IllegalBlockSizeException e) {e.printStackTrace();} catch (BadPaddingException e) {e.printStackTrace();}return null;}public static void main(String[] args) throws Exception {File zip = new File("/Users/xiang/develop/app-debug.apk");String absolutePath = zip.getAbsolutePath();File dir = new File(absolutePath.substring(0, absolutePath.lastIndexOf(".")));Zip.unZip(zip,dir);File zip2 = new File("/Users/xiang/develop/app-debug2.apk");Zip.zip(dir,zip2);String[] argv = {"jarsigner","-verbose", "-sigalg", "MD5withRSA","-digestalg", "SHA1","-keystore", "/Users/xiang/develop/debug.keystore","-storepass","android","-keypass", "android","-signedjar", "/Users/xiang/develop/app-debug2-sign.apk","/Users/xiang/develop/app-debug2.apk","androiddebugkey"};Process pro = null;try {pro = Runtime.getRuntime().exec(argv);//destroy the streamtry {pro.waitFor();} catch (InterruptedException e) {e.printStackTrace();}} finally {if (pro != null) {pro.destroy();}}}}

Base64.java

package com.example.mylibrary;import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;/*** Created by xiang on 16/5/11.*/
public final class Base64 {private static final char[] legalChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();public static String encode(byte[] data) {int start = 0;int len = data.length;StringBuffer buf = new StringBuffer(data.length * 3 / 2);int end = len - 3;int i = start;int n = 0;while (i <= end) {int d = ((((int) data[i]) & 0x0ff) << 16) | ((((int) data[i + 1]) & 0x0ff) << 8)| (((int) data[i + 2]) & 0x0ff);buf.append(legalChars[(d >> 18) & 63]);buf.append(legalChars[(d >> 12) & 63]);buf.append(legalChars[(d >> 6) & 63]);buf.append(legalChars[d & 63]);i += 3;if (n++ >= 14) {n = 0;buf.append(" ");}}if (i == start + len - 2) {int d = ((((int) data[i]) & 0x0ff) << 16) | ((((int) data[i + 1]) & 255) << 8);buf.append(legalChars[(d >> 18) & 63]);buf.append(legalChars[(d >> 12) & 63]);buf.append(legalChars[(d >> 6) & 63]);buf.append("=");} else if (i == start + len - 1) {int d = (((int) data[i]) & 0x0ff) << 16;buf.append(legalChars[(d >> 18) & 63]);buf.append(legalChars[(d >> 12) & 63]);buf.append("==");}return buf.toString();}private static int decode(char c) {if (c >= 'A' && c <= 'Z')return ((int) c) - 65;else if (c >= 'a' && c <= 'z')return ((int) c) - 97 + 26;else if (c >= '0' && c <= '9')return ((int) c) - 48 + 26 + 26;elseswitch (c) {case '+':return 62;case '/':return 63;case '=':return 0;default:throw new RuntimeException("unexpected code: " + c);}}/*** Decodes the given Base64 encoded String to a new byte array. The byte* array holding the decoded data is returned.*/public static byte[] decode(String s) {ByteArrayOutputStream bos = new ByteArrayOutputStream();try {decode(s, bos);} catch (IOException e) {throw new RuntimeException();}byte[] decodedBytes = bos.toByteArray();try {bos.close();bos = null;} catch (IOException ex) {System.err.println("Error while decoding BASE64: " + ex.toString());}return decodedBytes;}private static void decode(String s, OutputStream os) throws IOException {int i = 0;int len = s.length();while (true) {while (i < len && s.charAt(i) <= ' ')i++;if (i == len)break;int tri = (decode(s.charAt(i)) << 18) + (decode(s.charAt(i + 1)) << 12) + (decode(s.charAt(i + 2)) << 6)+ (decode(s.charAt(i + 3)));os.write((tri >> 16) & 255);if (s.charAt(i + 2) == '=')break;os.write((tri >> 8) & 255);if (s.charAt(i + 3) == '=')break;os.write(tri & 255);i += 4;}}
}

Utils.java

package com.example.mylibrary;/*** Created by xiang on 2017/5/17.*/public class Utils {//    public static byte[] int2Bytes(int number) {
//        byte[] b = new byte[4];
//        for (int i = 3; i >= 0; i--) {
//            b[i] = (byte) (number % 256);
//            number >>= 8;
//        }
//        return b;
//    }public static byte[] int2Bytes(int value) {byte[] src = new byte[4];src[3] = (byte) ((value >> 24) & 0xFF);src[2] = (byte) ((value >> 16) & 0xFF);src[1] = (byte) ((value >> 8) & 0xFF);src[0] = (byte) (value & 0xFF);return src;}public static int bytes2Int(byte[] src) {int value;value = (int) ((src[0] & 0xFF)| ((src[1] & 0xFF)<<8)| ((src[2] & 0xFF)<<16)| ((src[3] & 0xFF)<<24));return value;}public static void main(String[] args) throws Exception {
//        ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer();
//        byteBuf.writeInt(241241143);
//        byte[] a = new byte[4];
//        byteBuf.markReaderIndex();
//        byteBuf.readBytes(a);
//        byteBuf.resetReaderIndex();
//
//        System.out.println(Arrays.toString(a));
//        System.out.println(Arrays.toString(int2Bytes(241241143)));
//        System.out.println(Arrays.toString(intToBytes(241241143)));}}

Zip.java

package com.example.mylibrary;import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.zip.CRC32;
import java.util.zip.CheckedOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;/*** Created by xiang on 2017/5/17.*/public class Zip {public static void unZip(File zip, File dir) {try {dir.delete();ZipFile zipFile = new ZipFile(zip);Enumeration<? extends ZipEntry> entries = zipFile.entries();while (entries.hasMoreElements()) {ZipEntry zipEntry = entries.nextElement();String name = zipEntry.getName();if (name.equals("META-INF/CERT.RSA") || name.equals("META-INF/CERT.SF") || name.equals("META-INF/MANIFEST.MF")) {continue;}if (!zipEntry.isDirectory()) {File file = new File(dir, name);if (!file.getParentFile().exists()) file.getParentFile().mkdirs();FileOutputStream fos = new FileOutputStream(file);InputStream is = zipFile.getInputStream(zipEntry);byte[] buffer = new byte[1024];int len;while ((len = is.read(buffer)) != -1) {fos.write(buffer, 0, len);}is.close();fos.close();}}zipFile.close();} catch (Exception e) {e.printStackTrace();}}public static void zip(File dir, File zip) throws Exception {zip.delete();// 对输出文件做CRC32校验CheckedOutputStream cos = new CheckedOutputStream(new FileOutputStream(zip), new CRC32());ZipOutputStream zos = new ZipOutputStream(cos);compress(dir, zos, "");zos.flush();zos.close();}private static void compress(File srcFile, ZipOutputStream zos,String basePath) throws Exception {if (srcFile.isDirectory()) {compressDir(srcFile, zos, basePath);} else {compressFile(srcFile, zos, basePath);}}private static void compressDir(File dir, ZipOutputStream zos,String basePath) throws Exception {File[] files = dir.listFiles();// 构建空目录if (files.length < 1) {ZipEntry entry = new ZipEntry(basePath + dir.getName() + "/");zos.putNextEntry(entry);zos.closeEntry();}for (File file : files) {// 递归压缩compress(file, zos, basePath + dir.getName() + "/");}}private static void compressFile(File file, ZipOutputStream zos, String dir)throws Exception {String dirName = dir + file.getName();String[] dirNameNew = dirName.split("/");StringBuffer buffer = new StringBuffer();if (dirNameNew.length > 1) {for (int i = 1; i < dirNameNew.length; i++) {buffer.append("/");buffer.append(dirNameNew[i]);}} else {buffer.append("/");}ZipEntry entry = new ZipEntry(buffer.toString().substring(1));zos.putNextEntry(entry);BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));int count;byte data[] = new byte[1024];while ((count = bis.read(data, 0, 1024)) != -1) {zos.write(data, 0, count);}bis.close();zos.closeEntry();}}
查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. CPU 一致性缓存协议MESI

    CPU 一致性缓存协议MESI 计算机在执行指令的时候都是通过cpu进行逐条执行而在执行指令的过程中势必涉及对数据的读写,而数据基本从磁盘加载到内存中cpu直接使用内存中的数据 由于cpu计算速度远大于对内存的读写速度如果任何数据的读写都通过内存cpu的效率将会大打折扣,因此在…...

    2024/4/28 19:02:40
  2. UG NX 8.5有限元分析入门与实例精讲(PPT、视频、模型)

    《UG NX 8.5有限元分析入门与实例精讲》介绍了在典型工程实例中采用有限元进行分析的解题思路、操作步骤和经验技巧,内容包括零件和组件的有限元分析、轴对称和对称约束分析、多载荷条件静力学分析、结构静力学和优化分析、结构静力学和疲劳分析、接触应力分析、屈曲响应分析、…...

    2024/4/28 1:45:53
  3. linux内存管理笔记(二十二)----伙伴系统原理

    在内核初始化完成后,内存管理将成为一项重要的工作。如何频繁的申请释放内存的情况下,如何避免碎片的产生,这就要求内核采取灵活而恰当的分配策略。通常,内存分配一般有以下两种情况大对象(大的连续空间分配) 小对象(小的空间分配)针对不同的需求,Linux采取了不同的方式来…...

    2024/4/28 1:03:41
  4. 006【毕业设计】基于51单片机的波形发生器(四种波形)

    006【毕业设计】基于51单片机的波形发生器(四种波形).rar四种波形的产生,包括锯齿波、三角波、方波、正弦波。通过LCD液晶显示当前波形以及波形的频率。可以通过按键切换波形,并可以通过按键进行设置当前波形的频率大小,也可以设置频率设置不步进值。立即下载四种波形的产…...

    2024/4/28 2:13:51
  5. Pandas入门--3.丟失数据NaN

    Pandas入门--3.丟失数据NaN本教程适用范围一、丢失数据NaN说明二、删除NaN三、填充NaN值四、判断是否空值(NaN)五、完 本教程适用范围安有python、numpy、pandas Series、DataFrame丟失数据NaN一、丢失数据NaN说明 pandas没有的数据用NaN表示,而NaN是numpy的一个数据类型。如…...

    2024/4/28 6:15:03
  6. 云耀服务器 python 配置 sentencepiece 完整过程

    特别注意 1、python 版本对应 2、如果使用conda进行环境管理,一定要注意你当前pip实在那个环境下面!!!!!第一步 基础环境 python3.6 Archiconda3 华为云官方教程:https://www.huaweicloud.com/kunpeng/software/anaconda.html建议使用bash进行执行!!!第二步 sentence…...

    2024/4/28 13:18:15
  7. CRT C Runtime Library

    1. CRT最初目的是支持操作系统运行,内核和许多关键服务都在CRT上运行(它们采用dll技术动态连接)2. VC编写的C/C++程序也用到CRT(可以动态链接,也可以静态链接,前者需要系统中已经安装CRT的dll,①或者把CRT下的dll拷贝至主程序运行目录)3. windows API作为windows的一部…...

    2024/4/28 10:20:46
  8. 常用数据集合—Map

    1、实现Map的类2、数据结构数组 + 链表(红黑树)3、HashMap源码构造函数tableSizeFor决定了集合大小均是2的指数幂所有集合存储方式都是在添加元素时决定了数据结构,所以接下来看下put如果要将hash冲突用红黑树存储,数组长度小于64则要扩容,因为hash冲突严重2、节点数据结构…...

    2024/4/29 0:44:05
  9. MAC 安装包管理工具homebrew

    传统安装方式为:https://brew.sh/输入这行命令:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"但是会出现错误curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connectio好在现在国内也…...

    2024/4/28 6:24:17
  10. Java 内部类和匿名内部类小结

    一、什么是内部类 在一个类中定义另外一个类 举例: 在类A中,定义一个类B,就可以将类B作为A类的内部类. 二、分类 1)成员内部类: 在外部类的成员位置,定义一个类。 2)局部内部类: 在外部类的局部位置,定义一个类。 三、成员内部类访问特点 访问成员内部类中的成员方法: 需求…...

    2024/4/28 2:22:39
  11. 项目实训日志一

    项目实训日志一 项目开始已经有几天了,一直在读《Approximation Algorithm》这本书,由于大部分概念都比较陌生,读得很慢,目前主要把第3章的阅读翻译工作完成了。 本章中关键问题是斯坦纳树问题和TSP旅行商问题,在看这两个问题之前要先明确几个概念: 1.最小生成树MST 2.三…...

    2024/4/28 4:37:34
  12. RabbitMQ基本概念

    RabbitMQ是使用Erlang语言实现的消息队列,它可以用来限流。 1、基本概念 Broker:接收和分发消息,可以包含多个virtualhost Virualhost:Virualhost与Virtualhost之间是相互独立的,Virtualhost内包含Exchange和queue, Exchange:把消息路由到指定的queue Binding Key:binding k…...

    2024/4/28 18:21:36
  13. 入门级SQL常见函数

    #常见函数 /* 调用:select 函数名(实参列表) 【from】; 分类:1、1单行函数(做处理)concat, length, ifnull等2、分组函数(统计函数、聚合函数、组函数)*/#一、字符函数 SHOW VARIABLES LIKE %char%; #utf8中汉字占3个字节 #length 返回参数的字节数 LENGTH(hhh); LENG…...

    2024/4/28 16:56:45
  14. OFD文件转换接口

    广州税航OFD文件转换服务可将发票OFD或公文OFD文件转换成PDF或图片,并实现检测发票OFD是否被篡改,文件转换服务以在线的方式将客户的OFD格式文件转换为所需的格式,包括PDF,PNG,GIF,BMP等格式,该服务通过在线转换工具或调用相应的api即可实现,相应api如下: 发票数据产生OF…...

    2024/4/28 23:56:28
  15. 2020-04-09:怎么判断内存泄漏

    评论...

    2024/4/28 6:37:43
  16. P2831 愤怒的小鸟 题解

    博客园同步 原题链接 简要题意: 平面直角坐标系的第一象限有若干绿猪,小鸟要通过若干条函数解析线来消灭它们。每个小鸟可以把所有 y=ax2+bx(a<0)y=ax^2 + bx (a<0)y=ax2+bx(a<0) 上的 (x,y)(x,y)(x,y) 的所有绿猪消灭,当然没有绿猪就是白走。问最少多少次后可以消…...

    2024/4/28 15:15:19
  17. C#中读取.mat文件,然后实现寻峰算法

    理论可以看我下面推荐的博客,我直接上代码 private double[] oneDiff(double[] data)//一阶差分{double[] result = new double[data.Length - 1];for (int i = 0; i < result.Length; i++){result[i] = data[i + 1] - data[i];}return result;}private int[] trendSign(do…...

    2024/4/28 3:19:04
  18. dp+搜索

    Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2…...

    2024/4/15 4:30:10
  19. 二叉搜索树与双向链表

    剑指offer36题 二叉搜索树与双向链表题目思路代码 题目 请实现 copyRandomList 函数,复制一个复杂链表。在复杂链表中,每个节点除了有一个 next 指针指向下一个节点,还有一个 random 指针指向链表中的任意节点或者 null。 思路 由于二叉搜索树性质,左子树节点的数值均小于根…...

    2024/4/24 12:34:49
  20. Eureka大杂烩

    文章目录0、为什么需要注册中心从系统架构的演变到对于微服务架构的思考1、 Eurake 核心概念1.1 Eurake Server: 注册中心服务端1.2、Eureka client 的注册中心客户端2、自我保护机制3、Eureka 集群原理4、Eureka 工作流程5、dubbo ,zookeeper , eureka之间的关系与区别6、作为…...

    2024/4/24 12:34:46

最新文章

  1. NiceGUI:一个超赞的Python UI库

    1. 引言 NiceGUI是一个基于Python的简单用户界面框架&#xff0c;可与浏览器或桌面应用程序流畅运行。无论你是制作小型网络应用程序、还是玩机器人项目&#xff0c;NiceGUI 都能以其简单的界面和众多的功能满足你的需求。这篇文章的目的是通过向大家展示如何构建和部署NiceGU…...

    2024/4/29 2:16:28
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. DDIM,多样性与运行效率之间的trade off

    DDPM的重大缺陷在于其在反向扩散的过程中需要逐步从 x t x_t xt​倒推到 x 0 x_0 x0​&#xff0c;因此其推理速度非常缓慢。相反&#xff0c;DDPM的训练过程是很快的&#xff0c;可以直接根据 x 0 x_0 x0​到 x t x_t xt​添加的高斯噪声 ϵ \epsilon ϵ完成一次训练。 为了解…...

    2024/4/25 10:12:11
  4. 16个Python接单平台,做私活爽歪歪!(附100个爬虫源码)

    一、python爬虫是可以做副业的&#xff0c;主要是爬取网站、小程序或者APP的数据&#xff0c;对数据进行分析与处理&#xff0c;或者直接向客户提供爬虫程序与技术支持。 当初学会Python那会儿&#xff0c;有朋友来介绍我去接私活&#xff0c;是为一家公司做网站&#xff0c;那…...

    2024/4/28 23:24:40
  5. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/4/28 13:52:11
  6. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/4/28 3:28:32
  7. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/4/26 23:05:52
  8. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/4/28 13:51:37
  9. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/4/27 17:58:04
  10. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/4/27 14:22:49
  11. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/4/28 1:28:33
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/4/28 15:57:13
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/4/27 17:59:30
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/4/25 18:39:16
  15. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/4/28 1:34:08
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/4/26 19:03:37
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/4/28 1:22:35
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/4/25 18:39:14
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/4/26 23:04:58
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/4/27 23:24:42
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/4/28 5:48:52
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/4/26 19:46:12
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/4/27 11:43:08
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/4/27 8:32:30
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57