Pea pod, 360 mobile phone butler and other software can get the Android device name, displayed on the interface, such as:
How do we get the device name ourselves? The answers are as follows:
Enter "adb shell" on the command line
After entering the shell, enter "Cat/system/build.prop"
In fact, the device information, mainly stored in the "/system/build.prop" file, through the "cat" command can be viewed.
A detailed introduction to the ADB command is attached below
adb Introduction ADB's All-known Android Debug Bridge Debug bridges, is connected to the Android phone and PC-side bridge, through the ADB can manage, operate simulators and devices, such as installation software, system upgrades, run shell commands. Manage DevicesNote: Android phone, simulator unified called "Device"
ADB devices //display devices connected to the computer
ADB Get-serialno//Get the ID and serial number of the device serialnumber
------------------Restart----------------------------------------------
ADB reboot //restart device
ADB reboot bootloader //reboot to bootloader, i.e. brush mode
ADB reboot recovery //reboot to recovery, i.e. recovery mode
------------------send commands to the device--------------------------------------
adb [-d|-e|-s <serialnumber>] <command>
-d Send command to USB connected device-E send command to emulator device-s <serialNumber> send command to specified device
ADB related
ADB kill-server//terminate ADB service process ADB start-server//restart ADB service process
ADB root//root restart ADB service
ADB wait-for-device//The command is reproduced in the ADB command before the simulator/device is connected
Get device hardware information
adb shell cat/sys/class/net/wlan0/address //Get MAC address adb shell Cat/proc/cpuinfo //Get CPU serial number
Manage Device Apps
AAPT d badging <apkfile>//Get apk PackageName and classname
------------------Installation----------------------------------------------
ADB install <apkfile> /installation apk
ADB install-r <apkfile>//Preserve data and cache files, reinstall APK,
ADB install-s <apkfile> //install APK to SD card
------------------Uninstall----------------------------------------------
ADB uninstall <package> //Uninstall app
ADB uninstall-k <package> //uninstall app but keep data and cache files
------------------Start the app-------------------------------------------
ADB shell am start-n <package_name>/.<activity_class_name>//Launch application
------------------View memory Consumption----------------------------------------
ADB shell top //view device CPU and memory usage
ADB shell top-m 6//View the app that occupies the top 6 of memory
ADB shell Top-n 1//Refresh memory information once, then return
ADB shell Procrank//Query the memory usage of each process
ADB shell kill [PID]//Kill a process
ADB shell PS//view process List
adb shell ps-x [PID]//view specified process status
adb Shell Service List//view background services informationadb shell cat/proc/meminfo//view current memory consumptionadb shell cat/proc/iomem//view IO memory partition file Operations
Android, SDcard represents built-in storage, the device name of the TF card in different systems may be different, use view adb shell LS mnt to view all storage device names.
ADB remount //re-mount the system partition as a read-write partition
ADB push <local> <remote>/Copy files from local to device
ADB pull <remote> <local>//Copy files from device to local
ADB shell ls//Lists files and folders in the directory, equivalent to the dir command in DOS
ADB shell CD <folder>//Enter folder, equivalent to the CD command in DOS
adb shell rename Path/oldfilename path/newfilename//rename file
ADB shell rm/system/avi.apk //delete system/avi.apk
ADB shell rm-r <folder>//delete folder and all files below it
ADB shell MV Path/file newpath/file//Move files
ADB shell chmod 777/system/fonts/droidsansfallback.ttf//Set file permissions
ADB shell mkdir path/foldelname//New Folder
ADB shell cat <file>//view file contents
How to get the Android device name (ADB command details)