fdisk with optimus 2x - LG Optimus 2x

Hello
I am trying to use fdisk to partition optimus' nand. I want to delete the last 2 partitions /dev/block/mmcblk0p9 and p8 and merge them into p8 but fdisk wont let me do it. It says "value is out of range" and gives me as default 511kb of space each logical partition by default.
If i delete all partitions till p5 and remake the extended partition everything can go ok but these include things i dont wont to touch
For your quick reference the o2x partitions.
/dev/block/mmcblk0p1 = system partition
/dev/block/mmcblk0p2 = cache partition
/dev/block/mmcblk0p3 = misc partition
/dev/block/mmcblk0p4 = unknown partition
/dev/block/mmcblk0p5 = boot partition
/dev/block/mmcblk0p6 = lgdrm partition
/dev/block/mmcblk0p7 = recovery partition
/dev/block/mmcblk0p8 = data partition
/dev/block/mmcblk0p9 = internal SD partition
How can Solve this? Any ideas?

Can someone please upload the contets Of p5 p6 p7?

P5 depends on your ROM
P6 attached
P7 you can get CWM from anywhere really

Thank you a lot rusty its very much aprisiated
Do you know anything about the original question?

No idea I'm afraid.

busybox fdisk -l /dev/block/mmcblk0
d
9
d
8
n
57537
976128
w
didn't worked btw
get notification that i got damaged sd so i removed the internal sdcard part from the vold
but still no big ass data partition xD
btw i don't know anything about fdisk i just gave it a shot

look at that... looks like our phone has 16gbs or wrong declare from fdisk?
http://forum.xda-developers.com/showpost.php?p=17001387&postcount=12
edit: apparently it was a wrong declare from my brain

Apparently the SU660 has more internal storage than the P99x, so maybe it's got the same amount really, but the P99x is set up to ignore some of it?

Related

[Q] Original Partition Layout

Just wondering if anyone has the original nook color's partition layout. I attempted to push HoneyComb to emmc with dd; however, that didn't work the way I expected. Now I'm missing the correct partition layout. In other words, I just need
fdisk -l /dev/mmcblk0
So I can correctly setup the partitions again and install Stock again.
Any word on this would be greatly appreciated.
Thanks.
bdkoepke said:
Just wondering if anyone has the original nook color's partition layout. I attempted to push HoneyComb to emmc with dd; however, that didn't work the way I expected. Now I'm missing the correct partition layout. In other words, I just need
fdisk -l /dev/mmcblk0
So I can correctly setup the partitions again and install Stock again.
Any word on this would be greatly appreciated.
Thanks.
Click to expand...
Click to collapse
I suspect that's the least of your worries if you did a dd to the DEVICE rather than partitions...... Geez.
Code:
# busybox fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 935 7060567+ 5 Extended
/dev/block/mmcblk0p5 57 114 465853+ 83 Linux
/dev/block/mmcblk0p6 115 236 979933+ 83 Linux
/dev/block/mmcblk0p7 237 281 361431 83 Linux
/dev/block/mmcblk0p8 282 935 5253223+ c Win95 FAT32 (LBA)
Thanks
I will let you know how I make out.
(If it doesn't work, then there is probably just a little bit of boot code in the beginning of the device, but I suspect that it simply runs the boot code from the first partition. This is how it is done in OpenBoot, and pretty much every other system besides x86/bios)
Perhaps I should have done a full dd backup beforehand.
bdkoepke said:
Thanks
I will let you know how I make out.
(If it doesn't work, then there is probably just a little bit of boot code in the beginning of the device, but I suspect that it simply runs the boot code from the first partition. This is how it is done in OpenBoot, and pretty much every other system besides x86/bios)
Perhaps I should have done a full dd backup beforehand.
Click to expand...
Click to collapse
In the developers forums theres a recovery thread that has the partitions backed up. As for Honeycomb on internal I will be posting an install image in a bit under an hour (it's uploading now) that will allow you to use honeycomb on internal.
Thank you khaytsus and MattJ951.
I was able to get this to work properly after restoring the partition layout.
Something of interest, there are 935 cylinders allocated in the default partition layout (assuming khaytsus didn't modify it at all). There are actually 965 cylinders, so there is some extra space there for the vfat partition.
Thanks again.
bdkoepke said:
Thank you khaytsus and MattJ951.
I was able to get this to work properly after restoring the partition layout.
Something of interest, there are 935 cylinders allocated in the default partition layout (assuming khaytsus didn't modify it at all). There are actually 965 cylinders, so there is some extra space there for the vfat partition.
Thanks again.
Click to expand...
Click to collapse
Heh, no, rooted stock B&N ROM. Even knowing how fixable it is, I haven't experimented beyond booting NF or HC off SD.
So I have been able to get stock loaded again, but it can't detect the Mac Address/Serial Number... (Uh oh...)
Now this isn't the end of the world, but I can't use Market.apk on stock roms.
As I understand it:
/dev/block/mmcblk0p1 /boot (This should be fine, you can dd this)
/dev/block/mmcblk0p2 /rom (I'm guessing this is what I'm missing)
/dev/block/mmcblk0p3 /emmc (I just copied factory.zip here, there are no other files)
/dev/block/mmcblk0p5 /system (This should be fine...)
/dev/block/mmcblk0p6 /data (This is definitely fine to dd)
/dev/block/mmcblk0p7 /cache (Definitely fine as well)
/dev/block/mmcblk0p8 /sdcard (And also fine...)
So I'm just wondering what the original files are in /rom and /emmc.
I can't imagine the final blocks (935 and on) being used for hard-coded serial numbers/etc. That would be pretty stupid... Also the dual/froyo would clear these values.
I'm assuming the identity information is in /rom and /emmc.
Any word on this would be appreciated.
bdkoepke said:
So I have been able to get stock loaded again, but it can't detect the Mac Address/Serial Number... (Uh oh...)
Now this isn't the end of the world, but I can't use Market.apk on stock roms.
As I understand it:
/dev/block/mmcblk0p1 /boot (This should be fine, you can dd this)
/dev/block/mmcblk0p2 /rom (I'm guessing this is what I'm missing)
/dev/block/mmcblk0p3 /emmc (I just copied factory.zip here, there are no other files)
/dev/block/mmcblk0p5 /system (This should be fine...)
/dev/block/mmcblk0p6 /data (This is definitely fine to dd)
/dev/block/mmcblk0p7 /cache (Definitely fine as well)
/dev/block/mmcblk0p8 /sdcard (And also fine...)
So I'm just wondering what the original files are in /rom and /emmc.
I can't imagine the final blocks (935 and on) being used for hard-coded serial numbers/etc. That would be pretty stupid... Also the dual/froyo would clear these values.
I'm assuming the identity information is in /rom and /emmc.
Any word on this would be appreciated.
Click to expand...
Click to collapse
/dev/block/mmcblk0p2 contains the device specific information...
/dev/block/mmcblk0p3 contains factory.zip and a backup of /rom/devconf which also contains device specific info.
I think my mmcblk0p3 is hosed... thus my 8 failed boots always fails to install... I have yet to be able to mount it in adb to push new factory.zip... would love to get this fixed.
Got it... had to mke2fs /dev/block/mmcblk0p3 then i could copy mmcblk0p2's devconf and push factory.zip to it.... 8 failed boots work as it should now.
DizzyDen said:
/dev/block/mmcblk0p2 contains the device specific information...
/dev/block/mmcblk0p3 contains factory.zip and a backup of /rom/devconf which also contains device specific info.
I think my mmcblk0p3 is hosed... thus my 8 failed boots always fails to install... I have yet to be able to mount it in adb to push new factory.zip... would love to get this fixed.
Got it... had to mke2fs /dev/block/mmcblk0p3 then i could copy mmcblk0p2's devconf and push factory.zip to it.... 8 failed boots work as it should now.
Click to expand...
Click to collapse
DizzyDen, I am having the same problem i.e. 8 failed boots always fails to install. I am also unable to boot a CM7 image off of uSD card (hangs at Android) step. I can boot into CWM but it fails on installing a stock build.
I am hoping maybe my problems are related to yours. How did you accomplish the above? What tools did you use. I am fairly tech literate but a little loss with the tools and procedures for the Nook Color. I have tried several posts on restoring to stock non of which have worked. My assumption is that my partitions are messed up somehow such that it prevents my Nook from booting stock. I don't know why I have the same problem booting an image from a uSD card but it hangs on those. I am desperate at this point and any help would be much appreciated!
Thanks,
John
JoJa15 said:
DizzyDen, I am having the same problem i.e. 8 failed boots always fails to install. I am also unable to boot a CM7 image off of uSD card (hangs at Android) step. I can boot into CWM but it fails on installing a stock build.
I am hoping maybe my problems are related to yours. How did you accomplish the above? What tools did you use. I am fairly tech literate but a little loss with the tools and procedures for the Nook Color. I have tried several posts on restoring to stock non of which have worked. My assumption is that my partitions are messed up somehow such that it prevents my Nook from booting stock. I don't know why I have the same problem booting an image from a uSD card but it hangs on those. I am desperate at this point and any help would be much appreciated!
Thanks,
John
Click to expand...
Click to collapse
If you boot off a CWR sd... adb shell into NC... do a fdisk -l mmcblk0... verify your info against this one:
Code:
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 935 7060567+ 5 Extended
/dev/block/mmcblk0p5 57 114 465853+ 83 Linux
/dev/block/mmcblk0p6 115 236 979933+ 83 Linux
/dev/block/mmcblk0p7 237 281 361431 83 Linux
/dev/block/mmcblk0p8 282 935 5253223+ c Win95 FAT32 (LBA)
as long as the partition is present as listed above...
mke2fs /dev/block/mmcblk0p3
You will now have a file system on the mmcblk0p3 partition that you can mount to /emmc...
mount /dev/block/mmcblk0p3 /emmc
exit from adb shell
You can then push the sideload.zip (or factory zip... fyi 1.1.0 will not work)...
adb push sideload.zip /emmc/factory.zip (replace sideload.zip with whatever zip file you intend to use for the 8 failed boot recovery file)
you will want to do the following in a blank folder on your computer... keeps cleanup a lot easier....
I then pulled mmcblk0p2 to my computer and zipped the contents to rombackup.zip and pushed it to mmcblk0p2 also...
adb shell mkdir /temp
adb shell mount /dev/mmcblk0p2 /temp
adb pull /temp
zip everything you pulled from mmcblk0p2 into a zip file named rombackup.zip
then push it to /emmc
adb shell push rombackup.zip /emmc
ALTERNATIVELY: the first time I did this... I merely copied the devconf folder from mmcblk0p2 to mmcblk0p3...
adb shell
cd /temp
cp -a devconf /emmc
and it seemed fine... so I don't know if you MUST do the rombackup or not... also note....
I did delete all the files and did the zip as mentioned above.
I am not 100% certain of exactly WHAT rombackup is supposed to have in it....I just know that what I listed (both methods) has worked so far.
I kind of like the idea of the cp instead... seems it would be eaiser to just cp them back should anything ever happen to mmcblk0p2... but currently have my version of rombackup.zip trying to stay with stock setup.
Hoping someone else will pull the rombackup.zip from theirs and give me the filestructure in it.
I hope this has been explicit enough... if you need any more help let me know.
ALSO... the CM7 off uSD... are you by chance using one larger than 8 Gb? We've discovered an issue with the mke2fs on 16 Gb cards.
Thanks DizzyDen, currently I have not been able to get ADB to work. I have it installed but it does not see my device when in CWM. I did get a Froyo and Honeycomb off of uSD booting which is good. I can probably add market place and then get ADB wi-fi app to do my copying to the nook. Once I get that setup I will follow your instructions above and report back.
You might want to mount mmcblk0p3 to /emmc before you do any of the more advanced stuff I listed... just to make sure.... IF it mounts... list files before you do anything else.
I was having issues mounting the partition... that's why I had to go to the extent of formatting it.... you may be luckier and only have a corrupt factory.zip
DizzyDen said:
You might want to mount mmcblk0p3 to /emmc before you do any of the more advanced stuff I listed... just to make sure.... IF it mounts... list files before you do anything else.
I was having issues mounting the partition... that's why I had to go to the extent of formatting it.... you may be luckier and only have a corrupt factory.zip
Click to expand...
Click to collapse
OK, I got ADB working now but it seems fairly complex. Please bear with me as I am a newb when it comes to ADB. I did ADB Shell and then the command you listed. Here is the output:
Code:
# fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 965 7301542+ 5 Extended
Let me know what I need to do next.
Comparing your listing and mine it appears I am missing the 5-8 partitions. Also my mmcblk0p4 partition has a different ending then yours. So how do I go about adding the 5-8 partitions back and fixing the mmcblk0p4 one?
Those are partitions that are actually created on the logical partition mmcblk0p4... as you can see in the listing I posted.
Did you use ADB from and installed ROM or did you use a cwm bootable uSD ?
anyway to check your recovery options....
in adb mount mmcblk0p3 to /emmc and list its contents:
adb shell
mount /dev/block/mmcblk0p3 /emmc
ls /emmc
See if it has either recovery file... or both... or nothing
Post back whe you can and we'll go further.
If you want I could post the img files I got of ALL my partitions... well... won't share my mmcblk0p2 or mmcblk0p3 since they have my device specific information. They may help in getting your partitions straightened out.
Another option would be that we could use teamviewer to remote connect and look through it.
DizzyDen said:
Those are partitions that are actually created on the logical partition mmcblk0p4... as you can see in the listing I posted.
Did you use ADB from and installed ROM or did you use a cwm bootable uSD ?
Click to expand...
Click to collapse
I used ADB from my PC connecting to my nook that was running a bootable Froyo build from a uSD card
One other note, when booting from CWM on the uSD card when I try to do the fdisk command I get the following. I was still able to mount the partitions though in the shell example later in this message.
Code:
~ # fdisk -l mmcblk0
fdisk -l mmcblk0
fdisk: can't open 'mmcblk0': No such file or directory
~ #
anyway to check your recovery options....
in adb mount mmcblk0p3 to /emmc and list its contents:
adb shell
mount /dev/block/mmcblk0p3 /emmc
ls /emmc
See if it has either recovery file... or both... or nothing
Post back whe you can and we'll go further.
Click to expand...
Click to collapse
Here is what it shows. This is connecting to ADB via my PC with the nook booting into CWM on a uSD card. I do not have CWM installed on the Nook.
Code:
~ # mount /dev/block/mmcblk0p3 /emmc
mount /dev/block/mmcblk0p3 /emmc
~ # ls /emmc
ls /emmc
factory.zip lost+found rombackup.zip
~ # mount /dev/block/mmcblk0p1 /boot
mount /dev/block/mmcblk0p1 /boot
~ # ls boot
ls boot
charging.zip romrestore.zip uImage uRecImg
mlo u-boot.bin uRamdisk uRecRam
~ # mount /dev/block/mmcblk0p2 /rom
mount /dev/block/mmcblk0p2 /rom
mount: mounting /dev/block/mmcblk0p2 on /rom failed: No such file or directory
~ # mount /dev/block/mmcblk0p4 /system
mount /dev/block/mmcblk0p4 /system
mount: mounting /dev/block/mmcblk0p4 on /system failed: Invalid argument
~ # mount /dev/block/mmcblk0p5 /system
mount /dev/block/mmcblk0p5 /system
mount: mounting /dev/block/mmcblk0p5 on /system failed: No such file or director
y
~ # mount /dev/block/mmcblk0p6 /data
mount /dev/block/mmcblk0p6 /data
mount: mounting /dev/block/mmcblk0p6 on /data failed: No such file or directory
~ # mount /dev/block/mmcblk0p7 /cache
mount /dev/block/mmcblk0p7 /cache
mount: mounting /dev/block/mmcblk0p7 on /cache failed: No such file or directory
~ # mount /dev/block/mmcblk0p8 /sdcard
mount /dev/block/mmcblk0p8 /sdcard
mount: mounting /dev/block/mmcblk0p8 on /sdcard failed: No such file or director
If you want I could post the img files I got of ALL my partitions... well... won't share my mmcblk0p2 or mmcblk0p3 since they have my device specific information. They may help in getting your partitions straightened out.
Another option would be that we could use teamviewer to remote connect and look through it.
Click to expand...
Click to collapse
I'll PM you.
I really appreciate all the help!
I've been doing mine from bootable CWR SD... just to get the commands and make sure I am seeing actual internal emmc...
THAT may be why you can't get list of mmcblk0... not certain... but I responded to your pm's.
You couldn't get fdisk -l mmcblk0 to work cause I gave you the wrong command... it should be...
fdisk -l /dev/block/mmcblk0
The same as you did earlier....
It does look like we may get away with just replacing your factory.zip file...
I can send you the 1.0.1 file... the newest 1.1.0 won't work for recover for whatever reason B&N did it.
You are getting the fails (I think) because you are trying to mount all those partitions to /system...
Try this:
adb shell
mkdir /tmp4
mount /dev/block/mmcblk0p4 /tmp4
If that works... try doing the same for the remainder (5,6,7,8) increasing the tmpx each time... to match the partition you are trying to mount.
If it DOES NOT work... then I would suspect because of corrupt mmcblk04p partition... and we'll find out together if the factory.zip will fix that or if we have to go other methods.
With correct fdisk command
Code:
c:\android-sdk-windows\platform-tools\rombackup>adb shell
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 965 7301542+ 5 Extended
~ #
Looks like we will be trying to fix mmcblk0p4.... I'm gonna have to reseach exactly how to repartition it (maybe my mmcblk0p4 dd image will fix that) and how to fix the logical partitions that should be on that partition.
Will talk to ya in a bit.
here.....
DizzyDen said:
Looks like we will be trying to fix mmcblk0p4.... I'm gonna have to reseach exactly how to repartition it (maybe my mmcblk0p4 dd image will fix that) and how to fix the logical partitions that should be on that partition.
Will talk to ya in a bit.
here.....
Click to expand...
Click to collapse
That file at least helped me see my other partitions:
Code:
~ # dd if=/sdcard/mmcblk0p4-logical.img of=/dev/block/mmcblk0p4
dd if=/sdcard/mmcblk0p4-logical.img of=/dev/block/mmcblk0p4
2+0 records in
2+0 records out
1024 bytes (1.0KB) copied, 0.013641 seconds, 73.3KB/s
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 965 7301542+ 5 Extended
/dev/block/mmcblk0p5 57 114 465853+ 83 Linux
/dev/block/mmcblk0p6 115 236 979933+ 83 Linux
/dev/block/mmcblk0p7 237 281 361431 83 Linux
/dev/block/mmcblk0p8 282 965 5494198+ c Win95 FAT32 (LBA)
~ #
Now I need to figure out why my 4 and 8 partitions end at 965 instead of 935. I a going to try a factory reset first and then if that does not work try messing with resizing the partition.
John, glad we got it working for you... might want to check the fdisk -l /dev/block/mmcblk0 now and see if it still shows mmcblk0p2 ending at 965 after the factory reset and data clear.
Nonetheless... I'm glad we got the 8 failed boots/factory resets working for you.
I'm sure we can mess with parted enough to fix it... or REALLY mess it up ;-)
BTW... in messing with this... we have you enough posts now to post in the dev forums

[Q] The P990 has 7 partitions, what are they?

Hi all ,
I search on internet and with search key of xda , but i dont find anything.
When we flash with SmartFlash the P990 there are seven memory partition what are they?
/dev/block/mmcblk0p1 = system partition
/dev/block/mmcblk0p2 = cache partition
/dev/block/mmcblk0p3 = misc partition
/dev/block/mmcblk0p4 = unknown partition
/dev/block/mmcblk0p5 = boot partition
/dev/block/mmcblk0p6 = lgdrm partition
/dev/block/mmcblk0p7 = recovery partition
/dev/block/mmcblk0p8 = data partition
/dev/block/mmcblk0p9 = internal SD partition
Thank you
the ram is not one of they ?
I wonder if the unknown partition could be splash1 like HTC's have?
Would be nice if you could kill the Internal SD partiation and just merge it with data and just stick with an External SD as /sdcard.

[Q] Why i keep losing my swap partition

Please, i need really need ur help, somebody, why do i keep losing my swap partition???
Please somebody, help me
i have problem with swap and ext3 partition with alfs kernel too, that's why i change the kernel..i don't know why alfs kernel have bug with partitions, because he don't mount the partitions. i want to see this problem solved too
sorry my bad english
akaSk8krew said:
i have problem with swap and ext3 partition with alfs kernel too, that's why i change the kernel..i don't know why alfs kernel have bug with partitions, because he don't mount the partitions. i want to see this problem solved too
sorry my bad english
Click to expand...
Click to collapse
Thanks for ur help, right now i had it solved by restored sd ext partition and wipe dalvik cache before reboot. for now it works but i cant sure that i wont lost my swap partition again. thanks for ur help
phoenix883 said:
Thanks for ur help, right now i had it solved by restored sd ext partition and wipe dalvik cache before reboot. for now it works but i cant sure that i wont lost my swap partition again. thanks for ur help
Click to expand...
Click to collapse
yes, if i clean dalvik cache and boot, the device recognize again the ext partition..but for me if i boot again, i loose again the partition. and swap don't work..i need boot million times to make swap work, but if i reboot again i loose the swap too..the solution for me is don't use ext partition, (but have problems with swap too) but i use much apps, then i have less memory.
alfs kernel in performance it's the best..alfs could fix the partition bug, i don't know..
sorry my bad english
akaSk8krew said:
yes, if i clean dalvik cache and boot, the device recognize again the ext partition..but for me if i boot again, i loose again the partition. and swap don't work..i need boot million times to make swap work, but if i reboot again i loose the swap too..the solution for me is don't use ext partition, (but have problems with swap too) but i use much apps, then i have less memory.
alfs kernel in performance it's the best..alfs could fix the partition bug, i don't know..
sorry my bad english
Click to expand...
Click to collapse
same hope for me also...its not that i dont want to use nAa kernel but the fps uncap make gaming in x8 much more better...thats why i choose alfs kernel...and because of this kernel i can use mdpi theme much more smoother....let's wait patiently for his new update....i believe this will be fix by alfs soon...by the way, thanks for helping me akaSk8krew
with versio 6 of alfs the problem persists..anybody helps?? anybody knows why this kernel dont mount the partitions? because in alfs thread, in first post, alfsamsung said that ext2\3\4 works..but for me and for much people don't work too
I want to help you guys,but I don't have this problem and I can't reproduce your errors....
Try this:
1 format sd card with fat32,ext*,swap if you not allready have done this
2 remove system/etc/init.d/10app2sd Remove swapper and use link2sd to move apps
3 edit system/etc/fstab to look like this
Code:
/dev/block/mtdblock3 /system yaffs2 rw
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/mtdblock5 /data yaffs2 rw
/dev/block/mmcblk0p1 /sdcard vfat rw
/dev/block/mmcblk0p2 /sd-ext auto rw
[B]/dev/block/mmcblk0p3 /swap swap rw[/B]
now all 3 partitions will be mounted at boot
4 add this to system/etc/hw_config.sh
This will turn on swap on swap partition
Code:
#enable swap
swapon /dev/block/mmcblk0p3 #turn on swapp
echo "60" > /proc/sys/vm/swappiness #swap amount
To turn off swap do this and reboot
Code:
#enable swap
#swapon /dev/block/mmcblk0p3 #turn on swapp
#echo "60" > /proc/sys/vm/swappiness #swap amount
check on terminal if swap is working using #free
If you used app2sd before,then try and put it back to see if app2sd is the problem
@alfsamsung
thanks for your reply..the swap partition is mounted with app2sd or without thanks..the ext partition dont work..i test app2sd link2sd and nothing..a few days ago, i test without swap and link2sd and ext work..but also 1 or two days passed and stopped working..this only happens to me with your kernel..in stock or nAa works always..but your kernel is the best. the problem is in kernel..please: can you fix this? it's just a request
same here the ext wont work for me
Can you test this.I patched mmc with fixes.
Please post output from adb shell or terminal if it's not working
Code:
dmesg | grep mmc
alfsamsung said:
Can you test this.I patched mmc with fixes.
Please post output from adb shell or terminal if it's not working
Code:
dmesg | grep mmc
Click to expand...
Click to collapse
don't work i flah your kernel 07 wipe device, flash gingerDx v22, flash vold patch, wipe device again and boot..with root explorer go to \sd-ext and nothing..reboot, go again with root explorer and nothing..i put your code in terminal, but how i post it here, or better, how i make a txt file with output? can you put the code for this? i'm sorry. and thanks for your work
edit: i attached the files..is this what you want??
Tis is my output
Code:
<6>mmc0: Qualcomm MSM SDCC at 0x00000000a0400000 irq 24,113 dma 8
<6>mmc0: 8 bit data mode disabled
<6>mmc0: 4 bit data mode enabled
<6>mmc0: polling status mode disabled
<6>mmc0: MMC clock 144000 -> 49152000 Hz, PCLK 100000000 Hz
<6>mmc0: Slot eject status = 0
<6>mmc0: Power save feature enable = 1
<6>mmc0: DM non-cached buffer at ffc21000, dma_addr 0x0cdca000
<6>mmc0: DM cmd busaddr 0x0cdca000, cmdptr busaddr 0x0cdca300
<4>mmc0: host does not support reading read-only switch. assuming write-enable.
<6>mmc0: new high speed SDHC card at address b368
<6>mmcblk0: mmc0:b368 USD 7.46 GiB
<6> mmcblk0: p1 p2 p3
<6>EXT4 FS on mmcblk0p2, no journal
<6>EXT4-fs: mounted filesystem mmcblk0p2 without journal
and everything is working fine here.I use link2sd and my sd-ext is empty to,because link2sd is using data/sdext2.
why do you have this output: mmcblk0: p1 p2 p3 < p5 >
This is my output from parted in adb shell or terminall.Run the comands in bold
Code:
# [B]parted /dev/block/mmcblk0[/B]
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)[B] print[/B]
print
print
Model: SD USD (sd/mmc)
Disk /dev/block/mmcblk0: 8018MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 4194kB 7600MB 7596MB primary fat32
2 7600MB 7921MB 321MB primary ext2
3 7921MB 7987MB 65.8MB primary linux-swap(v1)
(parted)
alfsamsung said:
Tis is my output
Code:
<6>mmc0: Qualcomm MSM SDCC at 0x00000000a0400000 irq 24,113 dma 8
<6>mmc0: 8 bit data mode disabled
<6>mmc0: 4 bit data mode enabled
<6>mmc0: polling status mode disabled
<6>mmc0: MMC clock 144000 -> 49152000 Hz, PCLK 100000000 Hz
<6>mmc0: Slot eject status = 0
<6>mmc0: Power save feature enable = 1
<6>mmc0: DM non-cached buffer at ffc21000, dma_addr 0x0cdca000
<6>mmc0: DM cmd busaddr 0x0cdca000, cmdptr busaddr 0x0cdca300
<4>mmc0: host does not support reading read-only switch. assuming write-enable.
<6>mmc0: new high speed SDHC card at address b368
<6>mmcblk0: mmc0:b368 USD 7.46 GiB
<6> mmcblk0: p1 p2 p3
<6>EXT4 FS on mmcblk0p2, no journal
<6>EXT4-fs: mounted filesystem mmcblk0p2 without journal
and everything is working fine here.I use link2sd and my sd-ext is empty to,because link2sd is using data/sdext2.
why do you have this output: mmcblk0: p1 p2 p3 < p5 >
Click to expand...
Click to collapse
i don't know why i have this <p5> lol..you don't have.
and the parted output, mine is different..how i can make the output to a txt file?? lol i'm sorry but i don't know..can you help me?
If you are on win7 you have Windows Powershell.Use this instead of cmd.
Just mark the text and right click on it and now you can paste the text anywhere
Code:
# parted /dev/block/mmcblk0 print
parted /dev/block/mmcblk0 print
Model: SD SD08G (sd/mmc)
Disk /dev/block/mmcblk0: 7969MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 6597MB 6596MB primary fat32 boot, lba
2 6597MB 7666MB 1069MB primary ext3
3 7666MB 7937MB 271MB extended lba
5 7666MB 7937MB 271MB logical ntfs
#
with mini tool partition wizard i put a 1gb ext3, 256 mb of swap and the rest is fat 32...
the "p5" is ntfs????? why??? look at the atachment pls:/
try to remove the 2 partitions that is wrong.and make a new swap partition.Remember all partitions must be primary.
You can try this guide which you can run from recovery with card inside phone
And you need an external card reader if you use mini tool partition.Are you using this?
alfsamsung said:
try to remove the 2 partitions that is wrong.and make a new swap partition.Remember all partitions must be primary.
You can try this guide which you can run from recovery with card inside phone
And you need an external card reader if you use mini tool partition.Are you using this?
Click to expand...
Click to collapse
no. always when i partition my sdcard, i only connect the usb cable to the pc and click on "select to copy files to sdcard" and next use mini tool partition manager..using your link to tutorial, if i use the command to reboot recovery, the phone only boot, don´t go to recovery..if i manually put in recovery mode and proceed with the tutorial, the command give me this:
parted /dev/block/mmcblk0
/sbin/sh: parted: not found
i don´t have an external reader. laptop have but is for sd..i have a pen vodafone internet in home that have a reader too.will it work well with this?
i'm sorry something alfsamsung..i am limited at 8 thanks per day, so tomorrow i click thanks to you and again, thanks for this.thanks.
After you entered recovery, mount system, then continue with parted
don't work..always give me the same error:
parted /dev/block/mmcblk0
/sbin/sh: parted: not found
i don't know why
Are you on gingerdx?

Safestrap on ME863

(sorry for my bad english and i still cant post link now)
According to http:// forum.xda-developers.com/showpost.php?p=20976390&postcount=294 ,
I think it may work to redirect partition into SD card, so that safestrap will work on non-VZW-phones.
Safestrap uses /preinstall as a new /system partition to install 2nd ROM on it,
We can make a new partition on SD card to replace "/preinstall".
Here is my steps:
backup your SD card and make partitions
boot to safestrap recovery with usb connected to your PC
plug to PC first, then boot to safestrap recovery mode,
now you can use adb shell to control your system.
1.1 make partitions on your SD Card (ref: http:// forum.xda-developers.com/showthread.php?t=534714)
SD card is /dev/block/mmcblk0 so use parted to modify it
Code:
~ # [B]parted /dev/block/mmcblk0[/B]
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) [B]print[/B]
Model: SD SU08G (sd/mmc)
Disk /dev/block/mmcblk0: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 7946MB 7946MB primary fat32 lba
(parted)
as you can see i have a 8G SD card, fullly used as fat32 partition,
we use rm and mkpartfs to modify our SD card partition, make sure you have backuped your SD card.
for compatibility i choose to make fat32 partition first,
(512mb/1G for new system size is enough, but i want my 2nd system partiton bigger)
Code:
rm 1
mkpartfs primay fat32 0 6G
mkpartfs primay ext2 6G 100%
after done all the things you can see your partition by print,
e.g.
Code:
(parted) [B]print[/B]
Model: SD SU08G (sd/mmc)
Disk /dev/block/mmcblk0: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 5996MB 5996MB primary fat32 lba
2 5996MB 7946MB 1949MB primary ext2
(parted) [B]quit[/B]
1.2 format fat32 partitions
Code:
busybox mkdosfs /dev/block/mmcblk0p1
1.3 make ext2 -> ext3
sometimes you have to mount /dev/block/mmcblk0p2 first, depends on the tune2fs version
Code:
tune2fs -j /dev/block/mmcblk0p2
or you can do ext3 -> ext4 by typing (i never tried, dont know if safestrap support ext4 ??)
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2
Modify safestrap to use our new partition as 2nd system partition
after you install safetrap 1.08, you have some files in your original system,
we have to modify the /preinstall partition (/dev/block/mmcblk1p23) to our new partition (/dev/block/mmcblk0p2 as example here):
2.1 modify /system/bin/logwrapper
find /dev/block/mmcblk1p23, replace to your new partition
Code:
# mount preinstall and move /preinstall/etc/rootfs/* to /
/sbin/busybox mount -t ext3 [B]/dev/block/mmcblk0p2[/B] /preinstall
2.2 modify fixboot.sh in /system/etc/safestrap/2nd-init.zip
find /dev/block/mmcblk1p23, replace to your new partition
Code:
/sbin/busybox ln -s [B]/dev/block/mmcblk0p2[/B] system
2.3 modify etc/recovery.fstab in /system/etc/safestrap/recovery.zip
find /dev/block/mmcblk1p23, replace to your new partition
Code:
/system ext3 [B]/dev/block/mmcblk0p2[/B]
reboot for reloading settings
safestrap need to reload settings, we need reboot.
modify your 2nd ROM to make sure everything works
safestrap loads etc/rootfs from your new partition,
we need to modify /dev/block/mmcblk1p23 to our partition.
you can modify the ROM (.zip) file directly or edit them after installing ROM
just find /dev/block/mmcblk1p23 and replace them to your new partition (e.g. /dev/block/mmcblk0p2 here)
Special thanks to hashcode.
Enjoy safestrap on non-VZW-phones !

[DEV][ Expand System Partition To 5GB - MediaPad M3 ]

Hello !
Here you will find the information needed to change the system partition from 2GB to 5GB - this operation is somewhat useful for installing any version of GApps on your device : Huawei MediaPad M3 8.4 Kirin version ( BTV-DL09; BTV-L0J; BTV-W09 )
Thanks to @accerian for his help, and you can also check out this tutorial for more information !
Download mkfs.ext4 and parted from here : https://forum.xda-developers.com/attachments/parted_gdisk_fdisk_mkfs-ext4-arm-zip.4494671/
Warning : the entire data partition will be deleted following this procedure, make sure you have backed up and saved it to a microsd card
Step I : extended system partition from about 2GB to 5GB ( example for a 32GB device, for 64GB devices the procedure is 99% similar, only one operation differs which will be specified at the appropriate time ) - also this example is for BTV-DL09 which is with LTE capabilities.
- extract "mkfs.ext4" and "parted" from previously download archive and put them into a new created tmp directory
- connect the device to the computer via the USB cable and bring the device into TWRP revovery with this command :
> adb reboot recovery
- copy the two executable files from the computer to the device :
> adb push tmp data/local
> adb shell
# cp -r data/local/tmp/mkfs.ext4 sbin/mkfs.ext4
# chmod 0777 sbin/mkfs.ext4
# cp -r data/local/tmp/parted sbin/parted
# chmod 0777 sbin/parted
- launch the "parted" function as follows :
# parted /dev/block/mmcblk0
- display all properties of all partitions : (I wrote what needs to be displayed as a command before pressing enter, so you just have to type "print" and press enter because (parted) is already displayed as promter ... be careful not to type (parted) twice in the following commands)
(parted) print
- go to line 43, which should be the same for all devices :
43 1174MB 3255MB 2080MB ext2 system msftdata
44 3255MB 3456MB 201MB ext4 cust msftdata
45 3456MB 3490MB 33.6MB ext4 version msftdata
46 3490MB 4127MB 638MB ext2 vendor msftdata
47 4127MB 4329MB 201MB ext4 product msftdata
48 4329MB 4333MB 4194kB hisitest2 msftdata
49 4333MB 31.3GB 26.9GB userdata msftdata
Click to expand...
Click to collapse
- if line 43 is not identical to this one here, please stop the process by writing quit and enter, I'm waiting for a private message with what is written on line 43 in the case of your device so that I can guide you correctly .
- assuming that all devices have the same system partition ( the same 43 line ) - approximately 2GB, we go to the next steps:
- access the Mount menu in TWRP and uncheck Data, and follow the steps below step by step :
(parted) rm 49
(parted) rm 48
(parted) rm 47
(parted) rm 46
(parted) rm 45
(parted) rm 44
(parted) rm 43
(parted) mkpart system ext2 1174 6501
(parted) name 43 system
(parted) set 43 msftdata on
(parted) mkpart cust ext4 6501 6702
(parted) name 44 cust
(parted) set 44 msftdata on
(parted) mkpart version ext4 6702 6736
(parted) name 45 version
(parted) set 45 msftdata on
(parted) mkpart vendor ext2 6736 7374
(parted) name 46 vendor
(parted) set 46 msftdata on
(parted) mkpart product ext4 7374 7575
(parted) name 47 product
(parted) set 47 msftdata on
(parted) mkpart hisitest 7575 7579
(parted) name 48 hisitest2
(parted) set 48 msftdata on
- for devices with 32GB :
(parted) mkpart userdata 7579 31.3GB
- for devices with 64GB :
(parted) mkpart userdata 7579 62.5GB
(parted) name 49 userdata
(parted) set 49 msftdata on
(parted) quit
Step II : activating partitions for reuse :
# mkfs.ext4 /dev/block/mmcblk0p43
# mkfs.ext4 /dev/block/mmcblk0p44
# mkfs.ext4 /dev/block/mmcblk0p45
# mkfs.ext4 /dev/block/mmcblk0p46
# mkfs.ext4 /dev/block/mmcblk0p47
# mkfs.ext4 /dev/block/mmcblk0p49
- go to TWRP -> Wipe -> Advanced Wipe -> select System -> Repair or Change File System -> Change File System -> EXT4 -> Swipe to Change
- go to TWRP -> Wipe -> Advanced Wipe -> select Vendor -> Repair or Change File System -> Change File System -> EXT4 -> Swipe to Change
- go to TWRP -> Wipe -> Format Data -> yes
- reboot device from TWRP to TWRP in order to use data again after formated !
- go to TWRP -> Wipe -> Advanced Wipe -> select Dalvik/ART Cache, Cache, Data, Internal Storage, System, Vendor -> Swipe to wipe
- copy the new updated of LOS 17.1 with system partition of 5GB into your device
- copy any GApps arm64 Android 10 to your device
- Install them like always, enjoy !
Mention :
- if your device is WiFi only, you may have fewer partitions .... the above instructions can be easily adapted from case to case !
The main idea is that we must first find out what position the system partition is in, in this case it was at position 43 which corresponds to /dev/block/mmcblk0p43 - then we need to delete all partitions from userdata to system, and recreate them in the same order !
To calculate the start and end position, it is again very easy : for example the system partition starts from the initial position 1174, which is the same as the end position of the previous partition 42 (42 1160MB 1174MB 14.7MB reserved3 msftdata), and the end position was incremented by 5327 in this case (almost 5GB), resulting in 6501. .. the next partition 44 (cust) will have the starting position 6501, and the end position will be incremented by 201 (i.e. 201MB) as shown on line 44 (44 3255MB 3456MB 201MB ext4 cust msftdata)
If really needed, a concrete example will be added here for WiFi only devices !
Thanks for this guide.
Thank you surdu_petru.
The internal storage size of BTV-L0J is 16GB, is the above procedure effective?
Is it possible to restore a partition size back to its original size? I sometimes use a dd command as a way to restore from LineageOS to stock ROM. So I need to restore it to its original size before using a dd command.
According to z3DD3r, who created a tool to resize the Nexus 5 system partition, it is recommended that after changing the partition size, TWRP should also be changed.
z3DD3r said:
Because TWRP includes size of system partition. This size should match the size of system partition on device. Otherwise bad things can happen...
Click to expand...
Click to collapse
Is there any problem without changing TWRP?
I am sorry for asking so many questions. I am cautious about changing the partition size because it is perilous.
Me said:
Thank you surdu_petru.
The internal storage size of BTV-L0J is 16GB, is the above procedure effective?
Is it possible to restore a partition size back to its original size? I sometimes use a dd command as a way to restore from LineageOS to stock ROM. So I need to restore it to its original size before using a dd command.
According to z3DD3r, who created a tool to resize the Nexus 5 system partition, it is recommended that after changing the partition size, TWRP should also be changed.
Is there any problem without changing TWRP?
I am sorry for asking so many questions. I am cautious about changing the partition size because it is perilous.
Click to expand...
Click to collapse
If you still have 49 partitions, and partition 43 (system) shows that in the above tutorial then the procedure is identical, you just have to put a lower value of the user data partition in the last corresponding line of 16GB!
- for devices with 16GB:
(parted) mkpart userdata 7579 ?? GB
Click to expand...
Click to collapse
There is no need to change anything, neither TWRP nor the partition to the initial value ... the most important thing is to pay attention to the Start and End position of system partition to make the calculations as accurate as possible !
I can help you if you can send me a screenshot of what the command below displays on your device (from the system down to the last partition):
> adb shell
# parted /dev/block/mmcblk0 print
surdu_petru said:
If you still have 49 partitions, and partition 43 (system) shows that in the above tutorial then the procedure is identical, you just have to put a lower value of the user data partition in the last corresponding line of 16GB!
There is no need to change anything, neither TWRP nor the partition to the initial value ... the most important thing is to pay attention to the Start and End position of system partition to make the calculations as accurate as possible !
I can help you if you can send me a screenshot of what the command below displays on your device (from the system down to the last partition):
> adb shell
# parted /dev/block/mmcblk0 print
Click to expand...
Click to collapse
Thank you for your reply.
It is good news that if each partition has the same number it is effective.
I am currently not having trouble with the size of system partitions, so I will give it some more thought.
@surdu_petru - many thanks for this guide, I found it very clear and straightforward. I wasn't sure if you were wanting confirmation that these instructions work with other models of the tablet - if so, I can confirm it works perfectly with my (wifi only, 32GB) BTV-W09.
Herby007 said:
@surdu_petru - many thanks for this guide, I found it very clear and straightforward. I wasn't sure if you were wanting confirmation that these instructions work with other models of the tablet - if so, I can confirm it works perfectly with my (wifi only, 32GB) BTV-W09.
Click to expand...
Click to collapse
Thanks for confirmation. I'm not waiting especially confirmation, but it's always better if you can confirm. I'm here to help in case that something goes wrong.
I'm going for the 3rd time as the first I messed up. Second I did it right but I think I have to switch it up a little as I have the WIFI, and I can't do mkfs.ext4 after doing the parted commands. But I'll keep on it to see if all the partitions are exactly correct. I know 43 is the same as the directions said to make sure. 3rd times the charm. Good luck out there
Hey man, things are kinda messed up for me at the moment.
I've followed your steps however my cmd crashed for some reason during the process. Now I can't mount data to start the process again. Using the genuine EMUI Recovery offerd at startup doesn't work because the partitions are messed up and my own recovery points are inaccessible probably due to a currupted ext sd card (you can't make this up )
Do you have any tips on how to regain control? Or are all hopes lost?
I've tried using pro-team multi tool, however their database/website seems to be unavailable at the moment...
Edit: I have it fixed now, using a sd-card I did a force update to stock firmware, that fixed the storage. Had to restart the entire process starting with TWRP installation, device was still unlocked though. Don't be stupid like me and always check your recovery data before and not after you already messed things up
hey guys,
I somehow messed it up and I'm getting this error message
/data is not present!
Failed to mount '/data'
Partitions are formatted:
43 1174MB 6501MB 5327MB ext4 system msftdata
44 6501MB 6702MB 201MB ext4 cust msftdata
45 6702MB 6736MB 33.6MB ext4 version msftdata
46 6736MB 7374MB 638MB ext4 vendor msftdata
47 7374MB 7575MB 201MB ext4 product msftdata
48 7575MB 7579MB 4194kB hisitest2 msftdata
49 7579MB 31.3GB 23.7GB userdata msftdata
Here is an output of "df" command:
~ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 1.8G 184.0K 1.8G 0% /dev
tmpfs 1.8G 2.0M 1.8G 0% /tmp
/dev/block/mmcblk0p36 232.0M 756.0K 223.6M 0% /cache
/dev/block/mmcblk0p46 582.4M 468.0K 563.7M 0% /vendor
/dev/block/mmcblk1p1 59.5G 5.0G 54.5G 8% /external_sd
I can't continue with "TWRP -> Wipe"
Any ideas what went wrong?
BlueLife98 said:
Hey man, things are kinda messed up for me at the moment.
I've followed your steps however my cmd crashed for some reason during the process. Now I can't mount data to start the process again. Using the genuine EMUI Recovery offerd at startup doesn't work because the partitions are messed up and my own recovery points are inaccessible probably due to a currupted ext sd card (you can't make this up )
Do you have any tips on how to regain control? Or are all hopes lost?
I've tried using pro-team multi tool, however their database/website seems to be unavailable at the moment...
Edit: I have it fixed now, using a sd-card I did a force update to stock firmware, that fixed the storage. Had to restart the entire process starting with TWRP installation, device was still unlocked though. Don't be stupid like me and always check your recovery data before and not after you already messed things up
Click to expand...
Click to collapse
hey man, how did you install the stock firmware? tried to install these firmware's but didn't work at all https://firmwarefile.com/huawei-mediapad-m3-btv-dl09

Categories

Resources