A simple tool to get method stack

Overview

Get Stack Info by Frida

a simple tool to get method stack

为了更好的排查代码运行时问题,打印运行堆栈等信息

How to use

Step 1: clone this project

Step 2: 更高assets目录下的 frida-config.json文件,填入你想打出堆栈信息的方法

//比如app例子中 hook了点击监听中的 clickStack()方法  那么json就写成这样
{
    "com.tools.yangpingfrida.MainActivity:clickStack": {
        "key": "com.tools.yangpingfrida.MainActivity:clickStack",
        "className": "com.tools.yangpingfrida.MainActivity",
        "methodName": "clickStack",
        "paramCount": 0,
        "returnType": "void"
    }
}

//如果你想hook framework里面的方法,比如Handler的dispatchMessagen方法
{
    "com.tools.yangpingfrida.MainActivity:clickStack": {
        "key": "com.tools.yangpingfrida.MainActivity:clickStack",
        "className": "com.tools.yangpingfrida.MainActivity",
        "methodName": "clickStack",
        "paramCount": 0,
        "returnType": "void"
    },
    "android.os.Handler:dispatchMessage": {   
        "key": "android.os.Handler:dispatchMessage", 
        "className": "android.os.Handler",
        "methodName": "dispatchMessage",
        "paramCount": 1,
        "returnType": "void"
    }
}

step3: 将printstack构建成aar 比如: printstack-release.aar, 并集成进你的项目,放到libs里面就可以

1.build.gradle:中添加路径

allprojects{
  repositories{
   		 ......
       flatDir { dirs 'libs' }
  }
}

2. add dependence
implementation (name:' printstack-release', ext:'aar')

step4:运行你的项目。工具设置了打印时间是10min所以只能打印10min内的消息。

step5: 导出日志信息 adb pull /sdcard/Android/data/你的应用包名/cache/stack_frida.log

>>>>>> pid:1379, thread(id:1523, name:frida-stack-worker), timestamp:1642405020522
android.os.Handler.dispatchMessage
java.lang.Exception
	at android.os.Handler.dispatchMessage(Native Method)
	at android.os.Looper.loop(Looper.java:214)
	at android.os.HandlerThread.run(HandlerThread.java:65)
<<<<<<
>>>>>> pid:1379, thread(id:1379, name:main), timestamp:1642405020505
com.tools.yangpingfrida.MainActivity.clickStack
java.lang.Exception
	at com.tools.yangpingfrida.MainActivity.clickStack(Native Method)
	at com.tools.yangpingfrida.MainActivity.lambda$onCreate$0$com-tools-yangpingfrida-MainActivity(MainActivity.java:17)
	at com.tools.yangpingfrida.MainActivity$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
	at android.view.View.performClick(View.java:7360)
	at android.widget.TextView.performClick(TextView.java:14234)
	at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1119)
	at android.view.View.performClickInternal(View.java:7326)
	at android.view.View.access$3200(View.java:849)
	at android.view.View$PerformClick.run(View.java:27808)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Handler.dispatchMessage(Native Method)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7050)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
<<<<<<
>>>>>> pid:1379, thread(id:1523, name:frida-stack-worker), timestamp:1642405020527
android.os.Handler.dispatchMessage
java.lang.Exception
	at android.os.Handler.dispatchMessage(Native Method)
	at android.os.Looper.loop(Looper.java:214)
	at android.os.HandlerThread.run(HandlerThread.java:65)
<<<<<<
You might also like...

Get device location by telephony (SIM card) or settings without using GPS tracker.

Get device location by telephony (SIM card) or settings without using GPS tracker.

react-native-device-country Get device location by telephony (SIM card) or settings without using GPS tracker Installation yarn add react-native-devic

Nov 29, 2022

A boilerplate project designed to work as a template for new microservices and help you get in touch with various useful concepts.

Microservice Reference Project This project is inspired by the idea to quickly create a production ready project with all the required infrastructure

Dec 17, 2022

This app corrects your sitting posture and provides feedback in real time in conjunction with the app. A sensor of 31 cells detects your posture to get better life-wellness

This app corrects your sitting posture and provides feedback in real time in conjunction with the app. A sensor of 31 cells detects your posture to get better life-wellness

Notichair 실시간 자세분석 및 교정 스마트체어 🏆 상명대학교 PRIME 경진대회 수상 🏆 요구사항 31-cell sensor (mdxs-16-5610) 목차 1. 소개 프로젝트 내용 소개 2. 개발 환경 사전 설정 및 환경 구축 3. 기능 Sensors Ap

Jan 15, 2022

Get Best Resources on every Domain here!

Get Best Resources on every Domain here!

Useful Resources for Developers To join DEVs Dungeon GitHub Organization, click here ➤ If you find this REPOSITORY helpful, then do give it a 🌟 by pr

Dec 29, 2022

corrects your sitting posture and provides feedback in real time in conjunction with the app. A sensor of 31 cells detects your posture to get better life-wellness

corrects your sitting posture and provides feedback in real time in conjunction with the app. A sensor of 31 cells detects your posture to get better life-wellness

Notichair 실시간 자세분석 및 교정 스마트체어 🏆 상명대학교 PRIME 경진대회 수상 🏆 요구사항 31-cell sensor (mdxs-16-5610) 목차 1. 소개 프로젝트 내용 소개 2. 개발 환경 사전 설정 및 환경 구축 3. 기능 Sensors Ap

Jan 15, 2022

Get or Throw Spring boot Starter will help you to hide handling if entity not found.

Get or Throw Spring boot Starter Get or Throw Spring boot Starter will help you to hide handling if entity not found. 1. Setup 2. Usage Library adds c

Feb 2, 2022

Cheater get banned, I'm banned because im cheater.

This project is discontinued. Most of the code is very bad, if you copy something make sure you fix it up. Thanks to the ones who have supported me du

Jan 1, 2023

Curated Collection of all Low level design Questions and implementation asked in major Tech companies , Get yourself prepared for the LLD round and ace the interview.

Low level Design / Machine Coding Question Collections What is Machine Coding Round ? Machine Coding Round has become very popular interview round in

Dec 31, 2022

By this package we can get sim info, call logs and sms logs.Also we can find for specific sim info and call logs as well.

sim_sms_call_info A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package

Sep 17, 2022
Owner
赵元超
Valar ?Morghulis :Dohaeris 
赵元超
Shitty, yet simple way to get someone's token right at their discord client's startup.

discord-token-stealer Shitty, yet simple discord injector to add a little spice to their discord client Disclaimer: This is for educational purposes o

Gavin 3 Sep 26, 2022
An Android library for member secretGFX group, This can be used to growing your apps and get more install via a simple banner view & native view and interstitial dialog.

GFX-AdPromote An Android library for member secretGFX group, This can be used to growing your apps and get more install via a simple banner view & nat

SAID MOTYA 10 Dec 25, 2022
Simple Design for Java bridge with Javascript. Also can get javascript console.log.

SDBridgeKotlin is here. If your h5 partner confused about how to deal with iOS and Android. This Demo maybe help. 最常见的问题. WebViewJavascriptBridge is n

null 25 Dec 18, 2022
Example usage of work manager in Android, while doing this study, image downloading was preferred as a method.

android-workmanager-example Example usage of work manager in Android, while doing this study, image downloading was preferred as a method. Java 11 com

Adil Çetin 1 Jan 29, 2022
SBSRE is an eclipse plugin for extract method refactoring based on the single responsibility principle(SRP)

SBSRE is a slice-based single responsibility extraction approach supported by an eclipse plugin for identifying Single responsibility violations in the methods.

null 4 Jul 8, 2022
FEM for Students is a program of modeling and structural analysis by Finite Element Method

FEM For Students FEM for Students is a software for modeling and structural analysis by Finite Element Method. This software was developed by me in my

André de Sousa 4 Jun 23, 2022
Ptubes is a database disaster recovery product based on the PITR (Point In Time Recovery) method

Ptubes is a database disaster recovery product based on the PITR (Point In Time Recovery) method, which can be used to restore the entire database to a specific point in time to help users improve the reliability and security of the database

美团 Meituan 46 Nov 29, 2022
This project uses the artificial potential field method to realize the path planning of the robot, and completes the trajectory optimization through other settings. It can also be combined with laser SLAM, target recognition and other technologies for path planning.

FRCAutoDriver 项目说明 Project Instruction 本项目利用人工势场法,实现机器人的路径规划,并通过其他设置完成轨迹优化,还可以结合激光SLAM、目标识别等技术进行路径规划 This project uses the artificial potential field

ZhangzrJerry 2 Sep 9, 2022
A manager tool to categorize game assets such as images and sounds/music. The tool enables you to tag these files, so that finding them by tags allows fast searches.

BtAssetManager This application allows you to easily categorize large amounts of image and sound files. You can apply tags to each individual file to

null 21 Sep 15, 2022
Get notified with available vaccination centres via SMS

About A simple spring boot application that can track vaccine availability and automatically sends a SMS alert with the avilable centers Features Dose

Vic 21 Nov 16, 2022