Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Froyo 手机中强制设置墓碑/崩溃?
我需要一种方法来执行测试,强制在 Froyo 手机中生成墓碑。最好使用 adb 命令。
有谁知道如何做到这一点?
非常感谢!
我一直无法弄清楚如何从 java 代码中做到这一点,但是从本机代码中很容易,并且无论如何您都想从 adb 中触发它。
将以下内容编译为独立的本机可执行文件并从 adb shell 启动它:
int main(int argc, char **argv) { int *p=0; *p=1; //will seg fault return 0; }
您也可以将其作为普通 android 应用程序的本机子程序执行,并使用 am start 命令从 adb 启动它