Commonly used serial port commands in android device development

Today's Android native development is in a slump. In order to survive, you need to find your own development direction. Once you find the development direction, you must continue to accumulate relevant knowledge points. Today I will share some commands commonly used in Android device development.

busybox ifconfig View device IP

start adbd start adb

ls View directory data

ls -l View directory data details, you can see file size, permissions and other information

monkey -p package name 1 starts apk 

You can also use am start package name/MainActivity full path name to start apk 

input text //Input text

getprop | grep -E version View system version

getprop | grep build View version information

reboot recovery enters recovery mode, you can perform U disk upgrade or restore factory settings, etc.

logcat|grep logs to be found //used to filter logs

settings put secure attribute name value Set the attribute value in the secure table of the database

settings get secure attribute name to view the set attribute value

setprop attribute name parameter is used to write attribute values ​​for the system

getprop attribute name gets system attribute value

If the device keeps printing logs, you can try this command echo 0 > /proc/sys/kernel/printk

ps -A | grep application name Find application process method 1

busybox ps | grep application name Find application process method 2

kill -9 + process ID kills the process

pm list packages -s prints all package names in the device

pm path package name Search application based on package name

am broadcast -a broadcast action simulates broadcast

chmod 755 /system/app/test.apk Set permissions for related files

pm list package -f | grep upg can find applications through fuzzy package names. upg is the first three letters of a package name.

dumpsys package package name | grep version Check the version information of an application

How to write data to Mac and other devices using amlogic chips

swunifykey set usid value,SN

swunifykey set mac value,MAC

swunifykey list View details

swdevinfo HiSilicon chip, view SN, MAC and other information

swdevinfo serialno value HiSilicon chip, write to SN

swdevinfo mac value HiSilicon chip, write to MAC

swdevinfo write parameter name parameter

logcat -vtime >> /data/logcat.log & capture logs

tcpdump -i any -s0 -w /data/package.pcap & capture packets

To be continued...

Guess you like

Origin blog.csdn.net/u012598200/article/details/125855198