Problems with partition table


Question

I have a Prestigio 5044 Duo (PAP5044) with MTK6589.
Basically, what I was trying to do was to resize /data partition, beacause it was only about 950Mb, by shrinking Internal SD card (/emmc) partition. For that I used Meteos MTK6589 Apllication.



After going all the steps I found out that Android OS was hanging during boot (like half-way to boot up, and it freezed with no error messages). Though, recovery (I have CWM) boots well.

After doing some research I found out, that partition table of the device was messed up after /cache partition. So, all system and recovery partititons are fine.



Here is fdisk output:



~ # fdisk -lu /dev/block/mmcblk0
Warning: ignoring extra data in partition table 5
Warning: ignoring extra data in partition table 5

Disk /dev/block/mmcblk0: 3853 MB, 3853516800 bytes
1 heads, 16 sectors/track, 470400 cylinders, total 7526400 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1024 1022 2147483647+ 5 Extended
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 26624 47103 10240 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 47104 67583 10240 83 Linux
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 93184 105471 6144 83 Linux
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 134144 1465343 665600 83 Linux
/dev/block/mmcblk0p6 7556096 1022 2143706111+ 83 Linux


And here are /proc/partitions and fstab:



~ # cat /proc/partitions 
major minor #blocks name

179 0 3763200 mmcblk0
179 1 1 mmcblk0p1
179 2 10240 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 6144 mmcblk0p4
179 5 665600 mmcblk0p5
179 6 129024 mmcblk0p6
179 7 2901504 mmcblk0p7
179 64 2048 mmcblk0boot1
179 32 2048 mmcblk0boot0
179 96 31338496 mmcblk1
179 97 31334400 mmcblk1p1
~ # cat /etc/fstab
/dev/block/mmcblk0p6 /cache ext4 rw
/dev/block/mmcblk0p7 /data ext4 rw
/dev/block/mmcblk0p8 /emmc vfat rw
/dev/block/mmcblk0p5 /system ext4 rw
/dev/block/mmcblk1p1 /sdcard vfat rw
/dev/block/mmcblk1p2 /sd-ext auto rw


So, on mmcblk0 there must be 10 partitions, and now there are only 6, according to fdisk.



I have two ideas how it is possible to restore partitions:
1) manually with fdisk, though it doesn't seem like a very good idea
2) I've found some info about scatter file for MTK-based devices, seems like it contains all the partitioning info; I have no idea how to get and use that file, though.



What should I do to recover my device?


Answer

I don’t know the asked partition restore process, but there is a solution that works, and the phone will work again.
You will need
1. 1.0.42 full image ROM for Flashtool
2. SP Flashtool
3. EBRtweak
4. CWM 6.0.4.4



Solution:
1. Extract 1.0.42 ROM
2. Copy the EBRtweak into the ROM folder, and run with the asked option (like 2,5 GB)
3. Delete the EBR*.bak from the ROM folder
4. Copy the CWM 6.0.4.4 recovery.img to the ROM folder
5. Run CheckSum_Generate.exe
6. Flash with SP Flashtool the MT6589_Android_scatter_emmc.txt file from the 1.0.42 ROM folder.
7. Boot into recovery mode and go to mounts and storage: format /data, format/cache
8. Reboot system.



If you need any of those files, write me and I'll send it to you.


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