This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Looper | |
import android.util.Log | |
fun looper() { | |
Gloal.handler.post { | |
while (true) { | |
try { | |
Looper.loop() | |
} catch (e: Throwable) { | |
val stack = Log.getStackTraceString(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void getSalt() { | |
try { | |
Class<?> clazz = Class.forName("com.android.internal.widget.LockPatternUtils"); | |
Object lockUtils = clazz.getConstructor(Context.class).newInstance(this); | |
Class<?> lockUtilsClazz = lockUtils.getClass(); | |
Method getSaltM = lockUtilsClazz.getDeclaredMethod("getSalt", int.class); | |
getSaltM.setAccessible(true); | |
Object saltObj = getSaltM.invoke(lockUtils, 0); | |
Log.i("LouisShark", "Salt: " + saltObj); | |
} catch (Exception e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.yibo.housekeeping.test | |
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.support.annotation.NonNull | |
import android.support.annotation.Nullable | |
/** | |
* @author LouisShark | |
* @date 2018/8/4. |