Android的4种模式

模式 功能 ADB调试
system 正常使用 开发者模式开启usb调试
recovery 备份,恢复模式 卡刷模式 twrp下开启ADB Sideload
fastboot 线刷模式 无
download 9008端口模式 深刷模式

模式

功能   ADB调试 备注
system 正常使用 系统模式 开发者模式下开启USB调试  
recovery 备份恢复模式 卡刷模式 twrp下开启ADB Sideload功能 只能用卡刷包
fastboot   线刷模式   只能用线刷包
download 9008端口模式 深刷模式    

 

=====小米c4,miui6.1.7开发版,无root:

E:\twrp>adb shell
shell@libra:/ $ su
Permission denied
129|shell@libra:/ $ df
Filesystem Size Used Free Blksize
/dev 1.4G 68.0K 1.4G 4096
/sys/fs/cgroup 1.4G 0.0K 1.4G 4096
/sys/fs/cgroup/memory: Permission denied
/mnt/asec 1.4G 0.0K 1.4G 4096
/mnt/obb 1.4G 0.0K 1.4G 4096
/sys/fs/cgroup 1.4G 0.0K 1.4G 4096
/sys/fs/cgroup/memory: Permission denied
/sys/fs/cgroup/freezer: Permission denied
/system 1.8G 1.4G 380.5M 4096
/data 25.5G 1.1G 24.5G 4096
/cust 310.0M 196.0M 114.0M 4096
/cache 372.0M 212.0K 371.8M 4096
/persist 27.5M 72.0K 27.4M 4096
/firmware 127.9M 71.7M 56.2M 16384
/bt_firmware 64.0M 80.0K 63.9M 16384
/mnt/shell/emulated 25.5G 1.1G 24.5G 4096
/mnt/shell/emulated/0 25.5G 1.1G 24.5G 4096
1|shell@libra:/ $

------------------

1|shell@libra:/ $ mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1418372k,nr_inodes=354593,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=1418372k,nr_inodes=354593,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=1418372k,nr_inodes=354593,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=1418372k,nr_inodes=354593,mode=755,gid=1000 0 0
none /dev/memcg cgroup rw,relatime,memory 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
pstore /sys/fs/pstore pstore rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=1418372k,nr_inodes=354593,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
none /sys/fs/cgroup/freezer cgroup rw,relatime,freezer 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
/dev/block/bootdevice/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,relatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/bootdevice/by-name/cust /cust ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/modem /firmware vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/bootdevice/by-name/bluetooth /bt_firmware vfat ro,context=u:object_r:bt_firmware_file:s0,relatime,uid=1002,gid=3002,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/fuse /storage/uicc0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/uicc1 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/usbotg fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/shell/emulated/0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
shell@libra:/ $

-------------------------

=============刷完twrp的rec,全清,格式化后
C:\Users\Administrator>adb devices
List of devices attached
d5f2fed5 recovery


C:\Users\Administrator>adb shell
~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 1418372 52 1418320 0% /dev
tmpfs 1418372 52 1418320 0% /tmp
/dev/block/mmcblk0p411904472 2868 1885220 0% /system
/dev/block/mmcblk0p42380888 212 372812 0% /cache
/dev/block/mmcblk0p4426764324 1254844 25493096 5% /data
/dev/block/mmcblk0p4426764324 1254844 25493096 5% /sdcard
~ # m[
~ # 
~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1418372k,nr_inodes=354593,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=1418372k,nr_inodes=354593)
pstore on /sys/fs/pstore type pstore (rw,relatime)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/mmcblk0p41 on /system type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p42 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p44 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p44 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
~ # 
~ # 

 ----------------------------

===========xiaomi4C 617,开发模式,打开usb调试,

E:\ll>adb shell

129|shell@libra:/ $ su
root@libra:/ # 

root@libra:/ # df
df
Filesystem Size Used Free Blksize
/dev 1.4G 72.0K 1.4G 4096
/sys/fs/cgroup 1.4G 0.0K 1.4G 4096
/mnt/asec 1.4G 0.0K 1.4G 4096
/mnt/obb 1.4G 0.0K 1.4G 4096
/sys/fs/cgroup 1.4G 0.0K 1.4G 4096
/system 1.8G 1.4G 380.5M 4096
/data 25.5G 1.7G 23.8G 4096
/cust 310.0M 196.0M 114.0M 4096
/cache 372.0M 228.0K 371.7M 4096
/persist 27.5M 72.0K 27.4M 4096
/firmware 127.9M 71.7M 56.2M 16384
/bt_firmware 64.0M 80.0K 63.9M 16384
/mnt/shell/emulated 25.5G 1.7G 23.8G 4096
/mnt/shell/emulated/0 25.5G 1.7G 23.8G 4096
root@libra:/ #

----------

root@libra:/ # mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1418372k,nr_inodes=354593,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=1418372k,nr_inodes=354593,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=1418372k,nr_inodes=354593,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=1418372k,nr_inodes=354593,mode=755,gid=1000 0 0
none /dev/memcg cgroup rw,relatime,memory 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
pstore /sys/fs/pstore pstore rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=1418372k,nr_inodes=354593,mode=750,gid=1000 0 0
none /sys/fs/cgroup/memory cgroup rw,relatime,memory 0 0
none /sys/fs/cgroup/freezer cgroup rw,relatime,freezer 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
/dev/block/bootdevice/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,relatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/bootdevice/by-name/cust /cust ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/bootdevice/by-name/modem /firmware vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/bootdevice/by-name/bluetooth /bt_firmware vfat ro,context=u:object_r:bt_firmware_file:s0,relatime,uid=1002,gid=3002,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/uicc1 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/usbotg fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/uicc0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/shell/emulated/0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
root@libra:/ #

--------------

root@libra:/ # cat /proc/partitions
cat /proc/partitions
major minor #blocks name

179 0 30535680 mmcblk0
179 1 2048 mmcblk0p1
179 2 2048 mmcblk0p2
179 3 1024 mmcblk0p3
179 4 1024 mmcblk0p4
179 5 1024 mmcblk0p5
179 6 1024 mmcblk0p6
179 7 8 mmcblk0p7
179 8 1024 mmcblk0p8
179 9 1024 mmcblk0p9
179 10 1024 mmcblk0p10
179 11 4096 mmcblk0p11
179 12 4096 mmcblk0p12
179 13 4096 mmcblk0p13
179 14 1024 mmcblk0p14
179 15 128 mmcblk0p15
179 16 128 mmcblk0p16
179 17 1 mmcblk0p17
179 18 256 mmcblk0p18
179 19 256 mmcblk0p19
179 20 1 mmcblk0p20
179 21 96 mmcblk0p21
179 22 512 mmcblk0p22
179 23 1 mmcblk0p23
179 24 512 mmcblk0p24
179 25 1024 mmcblk0p25
179 26 16384 mmcblk0p26
179 27 21636 mmcblk0p27
179 28 1536 mmcblk0p28
179 29 1536 mmcblk0p29
179 30 1 mmcblk0p30
179 31 29695 mmcblk0p31
259 0 32768 mmcblk0p32
259 1 1536 mmcblk0p33
259 2 31232 mmcblk0p34
259 3 32768 mmcblk0p35
259 4 131072 mmcblk0p36
259 5 65536 mmcblk0p37
259 6 65536 mmcblk0p38
259 7 32768 mmcblk0p39
259 8 32768 mmcblk0p40
259 9 1966080 mmcblk0p41
259 10 393216 mmcblk0p42
259 11 327680 mmcblk0p43
259 12 27324399 mmcblk0p44
179 32 4096 mmcblk0rpmb
root@libra:/ #

==============

---------- hm2
E:\twrp\t>fastboot oem device-info
(bootloader) Device tampered: false
(bootloader) Device unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Display panel:
OKAY [ 0.047s]
Finished. Total time: 0.047s
-----------

分区说明

boot:存放内核和ramdisk的分区.
radio:这个是radio所在的分区,(基带):
recovery:Recovery分区.恢复模式
system:系统分区.

userdata:数据分区.
cache:缓存分区

hboot:这个是SPL所在的分区.很重要哦.也是fastboot所在的分区.刷错就真的变砖了.
splash1:这个就是开机第一屏幕了.
oem分区(运营商配置文件,和运营商配置有关):
vendor

6,刷写motoboot镜像:(这个是bootloader的组合镜像包,简称BL,最好不要乱刷!
这个只能升级不能降级这个必须与gpt版本一致才能刷进去,。并且刷这个容易变砖!)
fastbootflash bootloader bootloader.img
或者:
fastbootflash motoboot bootloader.img

==============