Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the debugging techniques commonly used in Android development

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces the debugging techniques commonly used in Android development, which have a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

ANDROID debugging technology:

1) Ps instruction

Ls-l / proc/27/

The cat / proc/27/cmdline # cmdline file represents the command line on which the process resides.

The cat / proc/27/status # status file indicates that you have learned information about this process. # stat contains more information, but is more difficult to read.

The cat / proc/27/task # task file shows the process information.

2) vmstat to view virtual memory statistics

3) top statistics of CPU consumption

4) dumpstat dumpsys

# adb shell dumpstat | grep CPU

5) dmesg

6) ioctl

Ioctl-l 16-r / dev/graphics/fb0 0x4600

Android dedicated debugging commands:

1) netcfg

2) service

1. Service list

All running service on this machine will be listed.

Service call:

Service call phone 2 S16 "123"

Service call isms 4 s16 "12345678" S16 "" S16 "hello world!" S16 "" S16 ""

3) am

# am start-n com.android.music/com.android.music.MusicBrowserActivity

# am start-n com.android.music/com.android.music.VideoBrowserActivity

# am start-n com.android.music/com.android.music.MediaPlaybackActivity

The startup method of Camera (camera) is:

# am start-n com.android.camera/com.android.camera.Camera

The startup method of Browser (browser) is:

# am start-n com.android.browser/com.android.browser.BrowserActivity

Start the browser:

Am start-an android.intent.action.VIEW-d http://www.google.cn/

To make a call:

Am start-an android.intent.action.CALL-d tel:10086

Start google map to locate directly to Beijing:

Am start-an android.intent.action.VIEW geo:0,0?q=beijing

Appendix: table android shell

Dumpcrash

Sh

Date

Am

Hciattach

Dd

Dumpstate

Sdptool

Cmp

Input

Logcat

Cat

Itr

Servicemanager

Dmsg

Monkey

Dbus-daemon

Df

Pm

Debug_tool

Getevent

Svc

Flash_image

Getprop

Ssltest

Installd

Hd

Debuggerd

Dvz

Id

Dhcpcd

Hostapd

Ifconfig

Hostapd_cli

Htclogkernel

Insmod

Fillup

Mountd

Ioctl

Linker

Qemud

Kill

Logwrapper

Radiooptions

Ln

Telnetd

Toolbox

Log

Iftop

Hcid

Lsmod

Mkdosfs

Route

Ls

Mount

Setprop

Mkdir

Mv

Sleep

Dumpsys

Notify

Setconsole

Service

Netstat

Smd

Playmp3

Printenv

Stop

Sdutil

Reboot

Top

Rild

Ps

Start

Dalvikvm

Renice

Umount

Dexopt

Rm

Vmstat

Surfaceflinger

Rmdir

Wipe

App_process

Rmmod

Watchprops

Mediaserver

Sendevent

Sync

System_server

Schedtop

Netcfg

Ping

Chmod

Thank you for reading this article carefully. I hope the article "what are the debugging techniques commonly used in Android development" shared by the editor will be helpful to everyone? at the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report