Lenovo Tab 2 Partition Layout


Question

I own a Lenovo Tab 2 A7-20f.



When I try cat /proc/emmc:



partno:
 start_sect
nr_sects  partition_name
emmc_p1: 00000400 00000002 "ebr1"
emmc_p2: 00004800 00005000 "protect_f"
emmc_p3: 00009800 00005000 "protect_s"
emmc_p4: 0001ec00 00003000 "sec_ro"
emmc_p5: 0002e800 00300000 "android"
emmc_p6: 0032e800 0003f000 "cache"
emmc_p7: 0036d800 00b18000 "usrdata"


And when I use cat /proc/partitions:



major minor  #blocks  name

7 0 9570 loop0
253 0 524288 zram0
179 0 7613440 mmcblk0
179 1 1 mmcblk0p1
179 2 10240 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 6144 mmcblk0p4
179 5 1572864 mmcblk0p5
179 6 129024 mmcblk0p6
179 7 5816320 mmcblk0p7
179 64 4096 mmcblk0boot1
179 32 4096 mmcblk0boot0


I don't think this is the typical Android Partition Layout. Any Idea which one is the Recovery and the Boot partition?
Or how to find it out?



Update:

When I lookup /proc/dumchar_info I get



Part_Name  Size
 StartAddr
Type
 MapTo
Region
preloader 0x0000000000040000 0x0000000000000000 2 /dev/misc-sd BOOT_1
mbr 0x0000000000080000 0x0000000000000000 2 /dev/block/mmcblk0 USER
ebr1 0x0000000000080000 0x0000000000080000 2 /dev/block/mmcblk0p1 USER
pro_info 0x0000000000300000 0x0000000000100000 2 /dev/block/mmcblk0 USER
nvram 0x0000000000500000 0x0000000000400000 2 /dev/block/mmcblk0 USER
protect_f 0x0000000000a00000 0x0000000000900000 2 /dev/block/mmcblk0p2 USER
protect_s 0x0000000000a00000 0x0000000001300000 2 /dev/block/mmcblk0p3 USER
seccfg 0x0000000000020000 0x0000000001d00000 2 /dev/block/mmcblk0 USER
uboot 0x0000000000060000 0x0000000001d20000 2 /dev/block/mmcblk0 USER
bootimg 0x0000000001000000 0x0000000001d80000 2 /dev/block/mmcblk0 USER
recovery 0x0000000001000000 0x0000000002d80000 2 /dev/block/mmcblk0 USER
sec_ro 0x0000000000600000 0x0000000003d80000 2 /dev/block/mmcblk0p4 USER
misc 0x0000000000080000 0x0000000004380000 2 /dev/block/mmcblk0 USER
logo 0x0000000000300000 0x0000000004400000 2 /dev/block/mmcblk0 USER
expdb 0x0000000000a00000 0x0000000004700000 2 /dev/block/mmcblk0 USER
tee1 0x0000000000500000 0x0000000005100000 2 /dev/block/mmcblk0 USER
tee2 0x0000000000500000 0x0000000005600000 2 /dev/block/mmcblk0 USER
kb 0x0000000000100000 0x0000000005b00000 2 /dev/block/mmcblk0 USER
dkb 0x0000000000100000 0x0000000005c00000 2 /dev/block/mmcblk0 USER
android 0x0000000060000000 0x0000000005d00000 2 /dev/block/mmcblk0p5 USER
cache 0x0000000007e00000 0x0000000065d00000 2 /dev/block/mmcblk0p6 USER
usrdata 0x0000000163000000 0x000000006db00000 2 /dev/block/mmcblk0p7 USER
bmtpool 0x0000000001500000 0x00000000ffff00a8 2 /dev/block/mmcblk0 USER
Part_Name:Partition name you should open;
Size:size of partition
StartAddr:Start Address of partition;
Type:Type of partition(MTD=1,EMMC=2)
MapTo:actual device you operate


Now how can I found out which one is the system partition and why are Boot and Recovery one partition?


Answer

Why are Boot and Recovery one partition?



This you can find answered in a Wiki entry at Github. Quoting the relevant part:




Since MTK devices use the uboot mechanism, partitions including boot and recovery, are not revealed as separate partitions, but rather accessed sequencially by size and start parameters.




You can see that reflected in your output of /proc/dumchar_info: size is the second column, start sector the third. Think of it like "disk images stored on a raw medium" (not an exact description, but easier to visualize).



Which one is the system partition?



My first guess (by the name) was sec_ro (as system is "ro", read only). But that's not exact enough. To find out, you'd need the sector size and the size of your /system partition, then you can do the maths: /proc/emmc gives you the "number of sectors" each partition occupies, in HEX. sec_ro accordingly occupies 0x3000 sectors, that would be 12288 in decimal. At a sector size of 512 bytes1 that would be 6 MB – too small :) A better guess probably is p5 named "android", which sums up to 1.5 GB – that seems to be the correct size. cache is /cache and usrdata will be the /data partition.






1: according to Understanding MTK’s MBR/EBR File Format


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes