-
The system has been destroyed
· Grape今天将自己的一个旧手机Redmi Note 8找出来,想刷一个最新版本的全球版ROM : ginkgo_global_images_V12.5.2.0.RCOMIXM_20220216.0000.00_11.0_global_da0a599e0c.tgz。下载解压完成,直接运行flash_all.sh脚本完成刷机,但系 …
-
Android Logcat Usage
· Grapezsh:no matches found
因为zsh缺省情况下始终自己解释这个firefox*,而不会传递给adb logcat来解释。 在~/.zshrc中加入: setopt no_nomatch, 然后进行source .zshrc命令
-
The Implementation Details of Android's force-stop
· 28 min read · Grape基于AOSP 8.0.1源码分析force-stop的实现细节。
使用 force-stop
am force-stop com.examplecom.example 是应用程序包名。
am命令
cat /system/bin/am #!/system/bin/sh if [ "$1" != "instrument" ] ; then cmd activity "$@" else base=/system export CLASSPATH=$base/framework/am.jar exec app_process $base/bin com … -
Debug Android Framework with Android Studio
· Grape背景
在阅读Android Framework代码时,有时需要动态调试加深理解,或者想调试某个API的实现原理(如startActivity)时,希望可以使用Android Studio调试,且可以对应到源码的每一行 …
-
Android Unicode 字符串
· Grape相关源码
String16
// http://androidxref.com/6.0.1_r10/xref/system/core/libutils/String16.cpp#allocFromUTF8 static char16_t* allocFromUTF8(const char* u8str, size_t u8len) { const ssize_t u16len = utf8_to_utf16_length(u8cur, u8len); utf8_to_utf16(u8cur … -
Android 智能指针
· Grape相关源码
http://androidxref.com/6.0.1_r10/xref/system/core/include/utils/StrongPointer.h http://androidxref.com/6.0.1_r10/xref/system/core/include/utils/RefBase.h http://androidxref.com/6.0.1_r10/xref/system/core/libutils/RefBase.cpp
StrongPointer
INITIAL_STRONG_VALUE 为什么不是0 …
-
Android 源码开发
· 1 min read · Grape准备开发环境
使用docker-aosp搭建
编译步骤
source build/envsetup.sh including device/asus/deb/vendorsetup.sh including device/asus/flo/vendorsetup.sh including device/asus/fugu/vendorsetup.sh including device/generic/mini-emulator-arm64/vendorsetup.sh including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh including device/generic … -
Android ClassLoader
· 1 min read · GrapeClass
// http://androidxref.com/6.0.1_r10/xref/libcore/libart/src/main/java/java/lang/Class.java public final class Class<T> implements Serializable, AnnotatedElement, GenericDeclaration, Type { static native Class<?> classForName(String className, boolean shouldInitialize, ClassLoader classLoader) throws ClassNotFoundException; }VMClassLoader
// http://androidxref.com/6.0.1_r10/xref/libcore/libart/src … -
Android ProgressBar Circle
· 1 min read · GrapeShape
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape=["rectangle" | "oval" | "line" | "ring"] android:innerRadius="integer" android:innerRadiusRatio="integer" android:thickness="integer" android:thicknessRatio="integer" android:useLevel="boolean" > <corners android:radius="integer" android:topLeftRadius="integer" android:topRightRadius="integer" android:bottomLeftRadius … -
hacking android app with frida
· Grape环境安装
- frida-server
- frida-tools
pip3 install frida pip3 install frida-tools基础用法
frida-ps -U frida-trace -U -i "recvfrom" com.android.chromeJavascript example 1
Java.enumerateLoadedClasses( { "onMatch": function(className){ console.log(className) }, "onComplete":function(){} } )Javascript example 2:chrome.js
Java.perform(function () { var Activity = Java.use …