zsh:no matches found
因为zsh缺省情况下始终自己解释这个firefox*,而不会传递给adb logcat来解释。 在~/.zshrc中加入: setopt no_nomatch, 然后进行source .zshrc命令
因为zsh缺省情况下始终自己解释这个firefox*,而不会传递给adb logcat来解释。 在~/.zshrc中加入: setopt no_nomatch, 然后进行source .zshrc命令
$ANDROID_STUDIO/plugins/Kotlin/kotlinc/bin
kotlinc -version
JDK安装完成后,设置路径,使其可以在命令行找到
java -version
源码位置:PackageInstallerSession.java 。
{% include_code lang:java from:689 to:750 aosp/8.1/frameworks/base/services/core/java/com/android/server/pm/PackageInstallerSession.java %} 该方法主要发送了一个MSG_COMMIT消息。下面看Handler如何处理这个消息。
{% include_code lang:java from:275 to:303 aosp/8.1/frameworks/base/services/core/java/com/android/server …
基于AOSP 8.0.1源码分析force-stop的实现细节。
am force-stop com.example
com.example 是应用程序包名。
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.android.commands.am.Am "$@"
fi
am 是一个shell脚本。如果第一 …
在阅读Android Framework代码时,有时需要动态调试加深理解,或者想调试某个API的实现原理(如startActivity)时,希望可以使用Android Studio调试,且可以对应到源码的每一行,故需要搭建一个调试环境。
// 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, u8len, u16str);
}
namespace android{
//! This is a string holding UTF-16 characters.
class String16{
private …
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
区分从来没有指针引用该对象,还 …
使用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/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup …
// 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;
}
// http://androidxref.com/6.0.1_r10/xref/libcore/libart/src/main/java/java/lang/VMClassLoader.java
package java.lang;
class VMClassLoader{
native static Class …