• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.
Sign in to follow this  
Followers 0

Q&A regarding gellmar's notes on E400 development

86 posts in this topic

Posted (edited) · Report post

hecatae, I wrote the output of fastboot in updated post in notes... and reflashed KDZ stock and my partitions gone and now it is stock unrooted. Performed root, installed CWM, going to install cyanogenmod and then make a dump myself. The progress on dumping and instructions will be posted separately in notes thread.

What is it all for? We can make a full flash dump for cyanogenmod with normal and merge partitions, and write a script that will write its contents just like KDZ reflasher performs. Sounds great, isn't it? Assuming we use gzip and the /data and /sdcardpartitions are zeroed, the dump size should not excess 500 MB and will be quite flashable from CWM adb or script from inside zip.

PS: crazybyte, don't brick your GF's phone, or I am afraid of your relations :D

Edited by gellmar
0

Share this post


Link to post
Share on other sites

Posted · Report post

It works, but fdisk does not allow to set non cylinder-boundary layout... So I guess we need a rooted but stock phone or at least a phone with recovery installed.

UPDATE: Stock KDZ reflasher rewrites partition table back so we can revert the mod by KDZ or from recovery if we have a full dump.

I tougth you already know this! KDZ reflash all the nand :D

what do you need, and where do you need it?

anyone else seen the output if you

adb reboot bootloader

gellmar needs:

sfdisk -d /dev/block/mmcblk0 > mmcblk0_merge.txt

I think that our phone don't have a proper bootloader mode.

0

Share this post


Link to post
Share on other sites

Posted · Report post

hecatae, I wrote the output of fastboot in updated post in notes... and reflashed KDZ stock and my partitions gone and now it is stock unrooted. Performed root, installed CWM, going to install cyanogenmod and then make a dump myself. The progress on dumping and instructions will be posted separately in notes thread.

What is it all for? We can make a full flash dump for cyanogenmod with normal and merge partitions, and write a script that will write its contents just like KDZ reflasher performs. Sounds great, isn't it? Assuming we use gzip and the /data and /sdcardpartitions are zeroed, the dump size should not excess 500 MB and will be quite flashable from CWM adb or script from inside zip.

I think that it's a very dirty solution. It breaks the upgradeability of the rom! I think that sfdisk + mke2fs/mkfs.vfat it's the key to go!

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

crazybyte, I actually knew but.... you see, normal mode is slightly different from our.... hum... experiments :) So I was anxious about it, but I am glad to see exactly KDZ operates as it *should*.

I think that it's a very dirty solution. It breaks the upgradeability of the rom! I think that sfdisk + mke2fs/mkfs.vfat it's the key to go!

You are right, I have to admit.

Weird... now got dump with CWM adb shell :)

Great,,, really great... forcing the partition layout with sfdisk brought emergency mode on reboot. Blame.

Edited by gellmar
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

crazybyte, I actually knew but.... you see, normal mode is slightly different from our.... hum... experiments :) So I was anxious about it, but I am glad to see exactly KDZ operates as it *should*.

You are right, I have to admit. But, sfdisk does not work well with CWM recovery :( It works from within Cyanogenmod - exactly where I got the dump, but not inside CWM. I guess that build is not fully static.

I will focus on fixing this. I don't have the LG here but i can try in my GNexus. Maybe downloading the sources and crosscompiling will be enough. It was removed from android busybox long ago:

https://code.google....58fa529ecf1db34

* Removed sfdisk from BusyBox. It was buggy, fat, and we really couldn't maintain it very well, so including it was not really very appropriate. Those wanting an fdisk are invited to grab a copy from util-linux.

Also i will investigate why fdisk can't work as should.

Edited by crazybyte
0

Share this post


Link to post
Share on other sites

Posted · Report post

crazybyte, the false positive... the build IS static, that was my fault but first sfdisk claimed the device is in use - re-partitioning is bad idea. I forced, and on reboot I got a yellow emergency. I just reflashed the stock again, and want going to bed. It is 1am in here, and it looks like we should rely on fdisk as the only reliable solution that works.

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

PS: crazybyte, don't brick your GF's phone, or I am afraid of your relations :D

I'm true lover. Often boyfrends give presents like roses to their girlfriends, as i'm a "little bit" geek i prefeer to give gigabytes .

crazybyte, the false positive... the build IS static, that was my fault but first sfdisk claimed the device is in use - re-partitioning is bad idea. I forced, and on reboot I got a yellow emergency. I just reflashed the stock again, and want going to bed. It is 1am in here, and it looks like we should rely on fdisk as the only reliable solution that works.

Sure, here it's midnight. So.. forget sfdisk, i will try to do with a fdisk script. Another option (the easy one) it's a "KDZ-like" first install. Then use normal zips that check the number of partitions before they try to install on the device! :)

Edited by crazybyte
0

Share this post


Link to post
Share on other sites

Posted · Report post

sfdisk broke my baseband... no service / security error, so don't try to use it! In process of reviving now.

0

Share this post


Link to post
Share on other sites

Posted · Report post

sfdisk broke my baseband... no service / security error, so don't try to use it! In process of reviving now.

s***. Hum does you need any kind of dump of my girlfriend phone? I think that KDZ maybe upgrades baseband, and maybe you can revive it. Anyway if you RMA it, i think that they could revive it using jtag.

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Well till Wednesday the phone is on JTAG. I will compile custom kernel though for Suxsem's fans with my patches. And I want you crazybyte to implement a scripting feature in fdisk / busybox. That is simple - instead of fread from console in loop read from file.

I was able to get dump from baseband before RMA and it looks like sfdisk has overwritten the baseband ID header. fdisk runs fine :) So it is purely an sfdisk clause.

Edited by gellmar
0

Share this post


Link to post
Share on other sites

Posted · Report post

I missunderstud do you want to modify the fdisk source? we could do the same easier with pipes, but if you want i will try to add this feature :)

0

Share this post


Link to post
Share on other sites

Posted · Report post

If you can do it with pipes - even better. I could not.

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

As usual i will try to do this tonight. Pipes is esentially what do you want to do.

Based on my example this list the partition table and then exit.

echo -e "p\nq\n" | fdisk /dev/block/mmcblk0
If you add this you will delete the two problematic partitions and then it'll show the changes without writting to the fs:
echo -e "p\nd\n20\nd\n20\np\nq\n" | fdisk /dev/block/mmcblk0[/code]
[/size]



[size=4]Now we want to create the new partitions, in Linux fdisk we have to input this:

New partition (n) -> First Sector (regarding your fdisk output)  84482 -> Last Sector  236032, And we have to sort the partition in the disk according to the sector: Expert Mode (e) -> Fix (f)



This code removes the two partitions and makes the new one. This code is SAFE, because don't write changes to FS (only prints results), insert the write flag (w\n) before exit (q\n) for write into the disk.

[CODE]echo -e "p\nd\n20\nd\n20\nn\n84482\n236032\nx\nf\nr\np\nq\n" | fdisk /dev/block/mmcblk0[/code]

[/size]

Edited by crazybyte
1

Share this post


Link to post
Share on other sites

Posted · Report post

crazybyte, going to get my phone back today. Your script also has to recreate two following Linux partitions, right?

0

Share this post


Link to post
Share on other sites

Posted · Report post

crazybyte, going to get my phone back today. Your script also has to recreate two following Linux partitions, right?

Print original partition table, remove join the two partitions and prints the new partition table.

echo -e "p\nd\n20\nd\n20\nn\n84482\n236032\nx\nf\nr\np\nq\n" | fdisk /dev/block/mmcblk0
Print modified partition table, remove the new big partition, recreates the two original partitions, then should print the original partition map.
echo -e "p\nd\n20\nn\n84482\n215552\nn\n215553\n236032\nx\nf\nr\nt\n20\n83\nt\n21\n83\np\nq\n" | fdisk /dev/block/mmcblk0[/code]

None of this commands writes changes into the disk, it's only for debugging and see results. After you check the results i will write the final commands. The second one is untested, because i don't have here my phone, check the results by yourself please.

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

crazybyte, got my LG back with a new board :) So I am able to check your commands

the first command:


~ # echo -e "p\nd\n20\nd\n20\nn\n84482\n236032\nx\nf\nr\np\nq\n" | fdisk /dev/b

ock/mmcblk0

echo -e "p\nd\n20\nd\n20\nn\n84482\n236032\nx\nf\nr\np\nq\n" | fdisk /dev/bl

ock/mmcblk0

The number of cylinders for this disk is set to 238592.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):

Disk /dev/block/mmcblk0: 1954 MB, 1954545664 bytes

1 heads, 16 sectors/track, 238592 cylinders

Units = cylinders of 16 * 512 = 8192 bytes

			 Device Boot	 Start		 End	 Blocks Id System

/dev/block/mmcblk0p1 *		 1		 3		 20 4d Unknown

Partition 1 does not end on cylinder boundary

/dev/block/mmcblk0p2			 3		 128	 1003+ 45 Unknown

Partition 2 does not end on cylinder boundary

/dev/block/mmcblk0p3			 129		 256	 1024 46 Unknown

Partition 3 does not end on cylinder boundary

/dev/block/mmcblk0p4			 257	 238592	 1906688 5 Extended

Partition 4 does not end on cylinder boundary

/dev/block/mmcblk0p5		 8193	 8704	 4096 47 Unknown

/dev/block/mmcblk0p6		 8705	 9216	 4096 2c Unknown

/dev/block/mmcblk0p7		 9217	 9728	 4096 58 Unknown

/dev/block/mmcblk0p8		 9729	 12800	 24576 77 Unknown

/dev/block/mmcblk0p9		 12801	 13824	 8192 48 Unknown

/dev/block/mmcblk0p10		 13825	 14336	 4096 4a Unknown

/dev/block/mmcblk0p11		 14337	 14848	 4096 4b Unknown

/dev/block/mmcblk0p12		 14849	 18432	 28672 49 Unknown

/dev/block/mmcblk0p13		 18433	 22016	 28672 6c Unknown

/dev/block/mmcblk0p14		 22017	 70656	 389120 83 Linux

/dev/block/mmcblk0p15		 70657	 71680	 8192 83 Linux

/dev/block/mmcblk0p16		 71681	 80896	 73728 83 Linux

/dev/block/mmcblk0p17		 80897	 81920	 8192 60 Unknown

/dev/block/mmcblk0p18		 81921	 82944	 8192 83 Linux

/dev/block/mmcblk0p19		 82945	 84480	 12288 6b Unknown

/dev/block/mmcblk0p20		 84481	 215552	 1048576 83 Linux

/dev/block/mmcblk0p21		 215553	 236032	 163840 83 Linux

/dev/block/mmcblk0p22		 236033	 238080	 16384 83 Linux

/dev/block/mmcblk0p23		 238081	 238592	 4096 ff Unknown

Command (m for help): Partition number (1-23):

Command (m for help): Partition number (1-22):

Command (m for help): First cylinder (258-238592, default 258): Last cylinder o

+size or +sizeM or +sizeK (84482-236032, default 236032):

Command (m for help): x: unknown command

Command Action

a	 toggle a bootable flag

b	 edit bsd disklabel

c	 toggle the dos compatibility flag

d	 delete a partition

l	 list known partition types

n	 add a new partition

o	 create a new empty DOS partition table

p	 print the partition table

q	 quit without saving changes

s	 create a new empty Sun disklabel

t	 change a partition's system id

u	 change display/entry units

v	 verify the partition table

w	 write table to disk and exit

Command (m for help): f: unknown command

Command Action

a	 toggle a bootable flag

b	 edit bsd disklabel

c	 toggle the dos compatibility flag

d	 delete a partition

l	 list known partition types

n	 add a new partition

o	 create a new empty DOS partition table

p	 print the partition table

q	 quit without saving changes

s	 create a new empty Sun disklabel

t	 change a partition's system id

u	 change display/entry units

v	 verify the partition table

w	 write table to disk and exit

Command (m for help): r: unknown command

Command Action

a	 toggle a bootable flag

b	 edit bsd disklabel

c	 toggle the dos compatibility flag

d	 delete a partition

l	 list known partition types

n	 add a new partition

o	 create a new empty DOS partition table

p	 print the partition table

q	 quit without saving changes

s	 create a new empty Sun disklabel

t	 change a partition's system id

u	 change display/entry units

v	 verify the partition table

w	 write table to disk and exit

Command (m for help):

Disk /dev/block/mmcblk0: 1954 MB, 1954545664 bytes

1 heads, 16 sectors/track, 238592 cylinders

Units = cylinders of 16 * 512 = 8192 bytes

			 Device Boot	 Start		 End	 Blocks Id System

/dev/block/mmcblk0p1 *		 1		 3		 20 4d Unknown

Partition 1 does not end on cylinder boundary

/dev/block/mmcblk0p2			 3		 128	 1003+ 45 Unknown

Partition 2 does not end on cylinder boundary

/dev/block/mmcblk0p3			 129		 256	 1024 46 Unknown

Partition 3 does not end on cylinder boundary

/dev/block/mmcblk0p4			 257	 238592	 1906688 5 Extended

Partition 4 does not end on cylinder boundary

/dev/block/mmcblk0p5		 8193	 8704	 4096 47 Unknown

/dev/block/mmcblk0p6		 8705	 9216	 4096 2c Unknown

/dev/block/mmcblk0p7		 9217	 9728	 4096 58 Unknown

/dev/block/mmcblk0p8		 9729	 12800	 24576 77 Unknown

/dev/block/mmcblk0p9		 12801	 13824	 8192 48 Unknown

/dev/block/mmcblk0p10		 13825	 14336	 4096 4a Unknown

/dev/block/mmcblk0p11		 14337	 14848	 4096 4b Unknown

/dev/block/mmcblk0p12		 14849	 18432	 28672 49 Unknown

/dev/block/mmcblk0p13		 18433	 22016	 28672 6c Unknown

/dev/block/mmcblk0p14		 22017	 70656	 389120 83 Linux

/dev/block/mmcblk0p15		 70657	 71680	 8192 83 Linux

/dev/block/mmcblk0p16		 71681	 80896	 73728 83 Linux

/dev/block/mmcblk0p17		 80897	 81920	 8192 60 Unknown

/dev/block/mmcblk0p18		 81921	 82944	 8192 83 Linux

/dev/block/mmcblk0p19		 82945	 84480	 12288 6b Unknown

/dev/block/mmcblk0p20		 236033	 238080	 16384 83 Linux

/dev/block/mmcblk0p21		 238081	 238592	 4096 ff Unknown

/dev/block/mmcblk0p22		 84482	 236032	 1212408 83 Linux

Partition table entries are not in disk order

Command (m for help):

the second

~ # echo -e "p\nd\n20\nn\n84482\n215552\nn\n215553\n236032\nx\nf\nr\nt\n20\n8

t\n21\n83\np\nq\n" | fdisk /dev/block/mmcblk0

echo -e "p\nd\n20\nn\n84482\n215552\nn\n215553\n236032\nx\nf\nr\nt\n20\n83\n

t\n21\n83\np\nq\n" | fdisk /dev/block/mmcblk0

The number of cylinders for this disk is set to 238592.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):

Disk /dev/block/mmcblk0: 1954 MB, 1954545664 bytes

1 heads, 16 sectors/track, 238592 cylinders

Units = cylinders of 16 * 512 = 8192 bytes

			  Device Boot	  Start		 End	  Blocks  Id System

/dev/block/mmcblk0p1   *		   1		   3		  20  4d Unknown

Partition 1 does not end on cylinder boundary

/dev/block/mmcblk0p2			   3		 128	    1003+ 45 Unknown

Partition 2 does not end on cylinder boundary

/dev/block/mmcblk0p3			 129		 256	    1024  46 Unknown

Partition 3 does not end on cylinder boundary

/dev/block/mmcblk0p4			 257	  238592	 1906688   5 Extended

Partition 4 does not end on cylinder boundary

/dev/block/mmcblk0p5		    8193	    8704	    4096  47 Unknown

/dev/block/mmcblk0p6		    8705	    9216	    4096  2c Unknown

/dev/block/mmcblk0p7		    9217	    9728	    4096  58 Unknown

/dev/block/mmcblk0p8		    9729	   12800	   24576  77 Unknown

/dev/block/mmcblk0p9		   12801	   13824	    8192  48 Unknown

/dev/block/mmcblk0p10		  13825	   14336	    4096  4a Unknown

/dev/block/mmcblk0p11		  14337	   14848	    4096  4b Unknown

/dev/block/mmcblk0p12		  14849	   18432	   28672  49 Unknown

/dev/block/mmcblk0p13		  18433	   22016	   28672  6c Unknown

/dev/block/mmcblk0p14		  22017	   70656	  389120  83 Linux

/dev/block/mmcblk0p15		  70657	   71680	    8192  83 Linux

/dev/block/mmcblk0p16		  71681	   80896	   73728  83 Linux

/dev/block/mmcblk0p17		  80897	   81920	    8192  60 Unknown

/dev/block/mmcblk0p18		  81921	   82944	    8192  83 Linux

/dev/block/mmcblk0p19		  82945	   84480	   12288  6b Unknown

/dev/block/mmcblk0p20		  84481	  215552	 1048576  83 Linux

/dev/block/mmcblk0p21		 215553	  236032	  163840  83 Linux

/dev/block/mmcblk0p22		 236033	  238080	   16384  83 Linux

/dev/block/mmcblk0p23		 238081	  238592	    4096  ff Unknown

Command (m for help): Partition number (1-23):

Command (m for help): First cylinder (259-238592, default 259): Last cylinder

+size or +sizeM or +sizeK (84482-215552, default 215552):

Command (m for help): First cylinder (259-238592, default 259): No free secto

available

Command (m for help): 2: unknown command

Command Action

a	   toggle a bootable flag

b	   edit bsd disklabel

c	   toggle the dos compatibility flag

d	   delete a partition

l	   list known partition types

n	   add a new partition

o	   create a new empty DOS partition table

p	   print the partition table

q	   quit without saving changes

s	   create a new empty Sun disklabel

t	   change a partition's system id

u	   change display/entry units

v	   verify the partition table

w	   write table to disk and exit

Command (m for help): x: unknown command

Command Action

a	   toggle a bootable flag

b	   edit bsd disklabel

c	   toggle the dos compatibility flag

d	   delete a partition

l	   list known partition types

n	   add a new partition

o	   create a new empty DOS partition table

p	   print the partition table

q	   quit without saving changes

s	   create a new empty Sun disklabel

t	   change a partition's system id

u	   change display/entry units

v	   verify the partition table

w	   write table to disk and exit

Command (m for help): f: unknown command

Command Action

a	   toggle a bootable flag

b	   edit bsd disklabel

c	   toggle the dos compatibility flag

d	   delete a partition

l	   list known partition types

n	   add a new partition

o	   create a new empty DOS partition table

p	   print the partition table

q	   quit without saving changes

s	   create a new empty Sun disklabel

t	   change a partition's system id

u	   change display/entry units

v	   verify the partition table

w	   write table to disk and exit

Command (m for help): r: unknown command

Command Action

a	   toggle a bootable flag

b	   edit bsd disklabel

c	   toggle the dos compatibility flag

d	   delete a partition

l	   list known partition types

n	   add a new partition

o	   create a new empty DOS partition table

p	   print the partition table

q	   quit without saving changes

s	   create a new empty Sun disklabel

t	   change a partition's system id

u	   change display/entry units

v	   verify the partition table

w	   write table to disk and exit

Command (m for help): Partition number (1-23): Hex code (type L to list codes

Command (m for help): Partition number (1-23): Hex code (type L to list codes

Command (m for help):

Disk /dev/block/mmcblk0: 1954 MB, 1954545664 bytes

1 heads, 16 sectors/track, 238592 cylinders

Units = cylinders of 16 * 512 = 8192 bytes

			  Device Boot	  Start		 End	  Blocks  Id System

/dev/block/mmcblk0p1   *		   1		   3		  20  4d Unknown

Partition 1 does not end on cylinder boundary

/dev/block/mmcblk0p2			   3		 128	    1003+ 45 Unknown

Partition 2 does not end on cylinder boundary

/dev/block/mmcblk0p3			 129		 256	    1024  46 Unknown

Partition 3 does not end on cylinder boundary

/dev/block/mmcblk0p4			 257	  238592	 1906688   5 Extended

Partition 4 does not end on cylinder boundary

/dev/block/mmcblk0p5		    8193	    8704	    4096  47 Unknown

/dev/block/mmcblk0p6		    8705	    9216	    4096  2c Unknown

/dev/block/mmcblk0p7		    9217	    9728	    4096  58 Unknown

/dev/block/mmcblk0p8		    9729	   12800	   24576  77 Unknown

/dev/block/mmcblk0p9		   12801	   13824	    8192  48 Unknown

/dev/block/mmcblk0p10		  13825	   14336	    4096  4a Unknown

/dev/block/mmcblk0p11		  14337	   14848	    4096  4b Unknown

/dev/block/mmcblk0p12		  14849	   18432	   28672  49 Unknown

/dev/block/mmcblk0p13		  18433	   22016	   28672  6c Unknown

/dev/block/mmcblk0p14		  22017	   70656	  389120  83 Linux

/dev/block/mmcblk0p15		  70657	   71680	    8192  83 Linux

/dev/block/mmcblk0p16		  71681	   80896	   73728  83 Linux

/dev/block/mmcblk0p17		  80897	   81920	    8192  60 Unknown

/dev/block/mmcblk0p18		  81921	   82944	    8192  83 Linux

/dev/block/mmcblk0p19		  82945	   84480	   12288  6b Unknown

/dev/block/mmcblk0p20		 215553	  236032	  163840  83 Linux

/dev/block/mmcblk0p21		 236033	  238080	   16384  83 Linux

/dev/block/mmcblk0p22		 238081	  238592	    4096  ff Unknown

/dev/block/mmcblk0p23		  84482	  215552	 1048568  83 Linux

Partition table entries are not in disk order

Command (m for help):

Edited by gellmar
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

I used crazybyte's first sequence, then


mke2fs -Ldata /dev/block/mmcblk0p22 1212392

then installed a fresh cyanogenmod 9 from /sdcard/ and fix zip and it worked! The second sequence fails:

~ # echo -e "p\nd\n20\nn\n84482\n215552\nn\n215553\n236032\nx\nf\nr\nt\n20\n83\n

t\n21\n83\np\nq\n" | fdisk /dev/block/mmcblk0

echo -e "p\nd\n20\nn\n84482\n215552\nn\n215553\n236032\nx\nf\nr\nt\n20\n83\n

t\n21\n83\np\nq\n" | fdisk /dev/block/mmcblk0

The number of cylinders for this disk is set to 238592.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):

Disk /dev/block/mmcblk0: 1954 MB, 1954545664 bytes

1 heads, 16 sectors/track, 238592 cylinders

Units = cylinders of 16 * 512 = 8192 bytes

			  Device Boot	  Start		 End	  Blocks  Id System

/dev/block/mmcblk0p1   *		   1		   3		  20  4d Unknown

Partition 1 does not end on cylinder boundary

/dev/block/mmcblk0p2			   3		 128	    1003+ 45 Unknown

Partition 2 does not end on cylinder boundary

/dev/block/mmcblk0p3			 129		 256	    1024  46 Unknown

Partition 3 does not end on cylinder boundary

/dev/block/mmcblk0p4			 257	  238592	 1906688   5 Extended

Partition 4 does not end on cylinder boundary

/dev/block/mmcblk0p5		    8193	    8704	    4096  47 Unknown

/dev/block/mmcblk0p6		    8705	    9216	    4096  2c Unknown

/dev/block/mmcblk0p7		    9217	    9728	    4096  58 Unknown

/dev/block/mmcblk0p8		    9729	   12800	   24576  77 Unknown

/dev/block/mmcblk0p9		   12801	   13824	    8192  48 Unknown

/dev/block/mmcblk0p10		  13825	   14336	    4096  4a Unknown

/dev/block/mmcblk0p11		  14337	   14848	    4096  4b Unknown

/dev/block/mmcblk0p12		  14849	   18432	   28672  49 Unknown

/dev/block/mmcblk0p13		  18433	   22016	   28672  6c Unknown

/dev/block/mmcblk0p14		  22017	   70656	  389120  83 Linux

/dev/block/mmcblk0p15		  70657	   71680	    8192  83 Linux

/dev/block/mmcblk0p16		  71681	   80896	   73728  83 Linux

/dev/block/mmcblk0p17		  80897	   81920	    8192  60 Unknown

/dev/block/mmcblk0p18		  81921	   82944	    8192  83 Linux

/dev/block/mmcblk0p19		  82945	   84480	   12288  6b Unknown

/dev/block/mmcblk0p20		 236033	  238080	   16384  83 Linux

/dev/block/mmcblk0p21		 238081	  238592	    4096  ff Unknown

/dev/block/mmcblk0p22		  84482	  236032	 1212408  83 Linux

Partition table entries are not in disk order

Command (m for help): Partition number (1-22):

Command (m for help): First cylinder (258-238592, default 258): Sector 1351696 i

s already allocated

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): Value is out of range

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): First cylinder (236034-238592, default 236034): First cylinder (

236034-238592, default 236034): First cylinder (236034-238592, default 236034):

Value is out of range

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): Value is out of range

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): First cylinder (236034-238592, default 236034): Using default va

lue 236034

Last cylinder or +size or +sizeM or +sizeK (236034-238080, default 238080): ~ #

Edited by gellmar
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

I used crazybyte's first sequence, then


mke2fs -Ldata /dev/block/mmcblk0p22 1212392

then installed a fresh cyanogenmod 9 from /sdcard/ and fix zip and it worked!
I will check for typo, it should work, but seems that your fdisk doesn't have expert mode.LG original rom have it! (http://linuxman.wiki...k#x-Expert mode) Please test the second one after joining the partitions (if you writed the first secuence to the disk use directly, else use this command), to check if we restored successfully the original partition table.
echo -e "p\nd\n20\nd\n20\nn\n84482\n236032\nx\nf\nr\np\nd\n20\nn\n84482\n215552\nn\n215553\n236032\nx\nf\nr\nt\n20\n83\nt\n21\n83\np\nq\n" | fdisk /dev/block/mmcblk0[/code]

Edited by crazybyte
0

Share this post


Link to post
Share on other sites

Posted · Report post


~ # echo -e "p\nd\n20\nd\n20\nn\n84482\n236032\nx\nf\nr\np\nd\n20\nn\n84482\n215

552\nn\n215553\n236032\nx\nf\nr\nt\n20\n83\nt\n21\n83\np\nq\n" | fdisk /dev/bloc

k/mmcblk0

echo -e "p\nd\n20\nd\n20\nn\n84482\n236032\nx\nf\nr\np\nd\n20\nn\n84482\n215

552\nn\n215553\n236032\nx\nf\nr\nt\n20\n83\nt\n21\n83\np\nq\n" | fdisk /dev/bloc

k/mmcblk0

The number of cylinders for this disk is set to 238592.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):

Disk /dev/block/mmcblk0: 1954 MB, 1954545664 bytes

1 heads, 16 sectors/track, 238592 cylinders

Units = cylinders of 16 * 512 = 8192 bytes

			  Device Boot	  Start		 End	  Blocks  Id System

/dev/block/mmcblk0p1   *		   1		   3		  20  4d Unknown

Partition 1 does not end on cylinder boundary

/dev/block/mmcblk0p2			   3		 128	    1003+ 45 Unknown

Partition 2 does not end on cylinder boundary

/dev/block/mmcblk0p3			 129		 256	    1024  46 Unknown

Partition 3 does not end on cylinder boundary

/dev/block/mmcblk0p4			 257	  238592	 1906688   5 Extended

Partition 4 does not end on cylinder boundary

/dev/block/mmcblk0p5		    8193	    8704	    4096  47 Unknown

/dev/block/mmcblk0p6		    8705	    9216	    4096  2c Unknown

/dev/block/mmcblk0p7		    9217	    9728	    4096  58 Unknown

/dev/block/mmcblk0p8		    9729	   12800	   24576  77 Unknown

/dev/block/mmcblk0p9		   12801	   13824	    8192  48 Unknown

/dev/block/mmcblk0p10		  13825	   14336	    4096  4a Unknown

/dev/block/mmcblk0p11		  14337	   14848	    4096  4b Unknown

/dev/block/mmcblk0p12		  14849	   18432	   28672  49 Unknown

/dev/block/mmcblk0p13		  18433	   22016	   28672  6c Unknown

/dev/block/mmcblk0p14		  22017	   70656	  389120  83 Linux

/dev/block/mmcblk0p15		  70657	   71680	    8192  83 Linux

/dev/block/mmcblk0p16		  71681	   80896	   73728  83 Linux

/dev/block/mmcblk0p17		  80897	   81920	    8192  60 Unknown

/dev/block/mmcblk0p18		  81921	   82944	    8192  83 Linux

/dev/block/mmcblk0p19		  82945	   84480	   12288  6b Unknown

/dev/block/mmcblk0p20		 236033	  238080	   16384  83 Linux

/dev/block/mmcblk0p21		 238081	  238592	    4096  ff Unknown

/dev/block/mmcblk0p22		  84482	  236032	 1212408  83 Linux

Partition table entries are not in disk order

Command (m for help): Partition number (1-22):

Command (m for help): Partition number (1-21):

Command (m for help): First cylinder (258-238592, default 258): Sector 1351696 i

s already allocated

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): First cylinder (236034-238592, default 236034): First cylinder (

236034-238592, default 236034): First cylinder (236034-238592, default 236034):

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): Value is out of range

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): Value is out of range

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): First cylinder (236034-238592, default 236034): First cylinder (

236034-238592, default 236034): First cylinder (236034-238592, default 236034):

Value is out of range

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): Value is out of range

First cylinder (236034-238592, default 236034): Value is out of range

First cylinder (236034-238592, default 236034): First cylinder (236034-238592, d

efault 236034): First cylinder (236034-238592, default 236034): Using default va

lue 236034

Last cylinder or +size or +sizeM or +sizeK (236034-238592, default 238592): ~ #

0

Share this post


Link to post
Share on other sites

Posted · Report post

And please note that data now is p23 and sdcard is p22 not 20/21

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Ok, it needs some debugging. Let me test the second one later, i will see my girlfriend soon and i will make the "restore" command. We need the expert mode fix option if we are going to mount the partition later, because as you see the partitions without fixing are unsorted.

EXAMPLE:

/dev/block/mmcblk0p20 236033 238080 16384 83 Linux

/dev/block/mmcblk0p21 238081 238592 4096 ff Unknown

/dev/block/mmcblk0p22 84482 236032 1212408 83 Linux <---- THIS SHOULD BE 20!!

Try to fdisk manually type x. Should enable expert mode otherwise try to use echo "..." | busybox fdisk "...". The first one should works because i tested days ago.

Edited by crazybyte
0

Share this post


Link to post
Share on other sites

Posted · Report post

Yes, while it is 22 :) So I fixed a patch for 22 right now

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Yes, while it is 22 :) So I fixed a patch for 22 right now

Don't release a rom with "wrong" partitions numbers, it could make a lot of troubles if some user by a mistake flash a "standar" rom that formats mmcblk20. Let me fix it before :)

Edited by crazybyte
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

I am not going to release this. Stability first, I don't want others to RMA their phones. Mine is on warranty yet :)

UPD: I did a stock KDZ reflash and the baseband is fine. It looks like sfdisk killed the first part of sbl3's baseband partition and thus locked the baseband chip in hardware on next reboot. So be aware of sfdisk - use fdisk, even with p22, cause it can be reverted to stock safely.

Edited by gellmar
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Well my girlfriend said me that she'll give me the phone during the weekend. Are you sure that your fdisk don't have expert mode (x)? Could you try to use fix(order of partitions) option (f) works outside expert mode?

Maybe your fdisk it's diferent than mine,( i rooted my phone using SuperOneClick 1.7 for Windows (http://www62.zippysh...49888/file.html)) because i tested the join command last weekend and worked flawlessly :S

Take notice that maybe your antivirus warns you about the file. It's because rageagainsthecage root method uses a trojan to achieve root. Don't be afraid, the program it's safe. Also from now i will call the two commands join (the first one, joins two partitions into bigger one) and split (restores the original layout) :)

EDIT: Did you found any bug related to the new partition map during your tests? If everything works, i will be a very great news for L3 owners :) I'm proud of us :P

EDIT2: DON'T add the write flag to split yet, because i writed it thinking that the partitions was ordered in join. We don't want to mess again the other partitions!

Edited by crazybyte
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.