使用到命令:
1、打開的意思,如cd /dev/block/platform/
2、查看所有內(nèi)容、信息 ls -al /dev/block/platform/soc/by-name
3、查看內(nèi)容 ls
4、
代碼演示:
1、start adbd 注釋:打開adb
2、df 注釋:查看U盤路徑
3、cd /storage/external_storage/sda1 注釋:進(jìn)入U盤
4、ls 注釋:查看U盤中的文件,(主要是查看當(dāng)貝市場和當(dāng)貝桌面在不在)
5、cp dangbei1.apk /data/app
cp dangbei2.apk /data/app
注釋:復(fù)制當(dāng)貝市場和當(dāng)貝桌面到盒子應(yīng)用中
6、cd /data/app 注釋:進(jìn)入盒子應(yīng)用目錄
7、ls 注釋:查看app路徑下是否有當(dāng)貝市場和當(dāng)貝桌面
8、am start com.dangbei.tvlauncher 注釋:啟動當(dāng)貝桌面
第一步:(查啟動信息)
root@Hi3798MV300:/ # cat /proc/cmdline
cat /proc/cmdline
console=ttyAMA0,115200 blkdevparts=mmcblk0:4M(fastboot),4M(bootargs),12M(recover
y),4M(deviceinfo),8M(baseparam),8M(pqparam),20M(logo),16M(fastplay),40M(kernel),
20M(misc),40M(trustedcore),600M(backup),1024M(system),600M(cache),50M(private),8
M(securestore),-(userdata) quiet initrd=0x4000000,0x55A61 mem=1G mmz=ddr,0,0,44M
第二步:(查看分區(qū))
root@Hi3798MV300:/ # cat /proc/partitions
cat /proc/partitions
major minor #blocks name
254 0 102400 zram0
179 0 7634944 mmcblk0
179 1 4096 mmcblk0p1
179 2 4096 mmcblk0p2
179 3 12288 mmcblk0p3
179 4 4096 mmcblk0p4
179 5 8192 mmcblk0p5
179 6 8192 mmcblk0p6
179 7 20480 mmcblk0p7
259 0 16384 mmcblk0p8
259 1 40960 mmcblk0p9
259 2 20480 mmcblk0p10
259 3 40960 mmcblk0p11
259 4 614400 mmcblk0p12
259 5 1048576 mmcblk0p13
259 6 614400 mmcblk0p14
259 7 51200 mmcblk0p15
259 8 8192 mmcblk0p16
259 9 5117952 mmcblk0p17
179 24 4096 mmcblk0rpmb
179 16 4096 mmcblk0boot1
179 8 4096 mmcblk0boot0
第三步:(備份分區(qū)到U盤)
dd if=/dev/block/mmcblk0p1 of=/mnt/sda/sda1/fastboot
dd if=/dev/block/mmcblk0p2 of=/mnt/sda/sda1/bootargs
dd if=/dev/block/mmcblk0p3 of=/mnt/sda/sda1/recovery
dd if=/dev/block/mmcblk0p4 of=/mnt/sda/sda1/deviceinfo
dd if=/dev/block/mmcblk0p5 of=/mnt/sda/sda1/baseparam
dd if=/dev/block/mmcblk0p6 of=/mnt/sda/sda1/pqparam
dd if=/dev/block/mmcblk0p7 of=/mnt/sda/sda1/logo
dd if=/dev/block/mmcblk0p8 of=/mnt/sda/sda1/fastplay
dd if=/dev/block/mmcblk0p9 of=/mnt/sda/sda1/kernel
dd if=/dev/block/mmcblk0p10 of=/mnt/sda/sda1/misc
dd if=/dev/block/mmcblk0p11 of=/mnt/sda/sda1/trustedcore
dd if=/dev/block/mmcblk0p12 of=/mnt/sda/sda1/backup
dd if=/dev/block/mmcblk0p13 of=/mnt/sda/sda1/system
dd if=/dev/block/mmcblk0p14 of=/mnt/sda/sda1/cache
dd if=/dev/block/mmcblk0p15 of=/mnt/sda/sda1/private
dd if=/dev/block/mmcblk0p16 of=/mnt/sda/sda1/securestore
dd if=/dev/block/mmcblk0p17 of=/mnt/sda/sda1/userdata
第四步:(還原系統(tǒng)分區(qū))
dd if=/mnt/sda/sda1/system of=/dev/block/mmcblk0p15
|