dual boot mtk 6582 - General Questions and Answers

so I was just trying to dual boot mtk 6582 (qmobile noir I7) I have set up three partitions in sd card
system 1024 MB (Ext 4 )
data 2048 MB (ext 4 )
cache 550 MB (ext 4)
I changed updater script to and replaced mmcblk0p5 to mmcblk1p2 as 2 is partition no on ext SD but it doesn't make any changes to it .
I also edited fstab in bootimg to access these locations instead of [email protected], [email protected] and [email protected] to mmcblk1p2, mmcblk1p3 and mmcblk1p4 respectively but what I see is there is no placement of files in these partitions
what am I doing wrong ?
I used mintool to make partitions and then latter see the state of these partitions after flashing rom as secondary rom

Related

[Q] ROM Manager-created partitions - need to recreate corrupted part table

Hi
My sd card on my Desire has become corrupted. I have a2sd+ on there; I can start from scratch (I accept the risk of installing development ROMs!) but I could really do with getting to the photos I took this morning before the card crashed.
gpart won't find the partitions at all but there's definitely still data on the card - if I strings the card I can see the DOS directory structure.
I used ROM Manager to create a 512MB ext partition with 0MB swap; I tried creating a w95 FAT32 (lba) partition of all the disk except the last 512MB using fdisk, but the partitions won't mount when I do that.
Anyone got an idea what values I should pass to fdisk to get it back?
I have
Disk /dev/sdb: 8017 MB, 8017412096 bytes
247 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
I figured the FAT32 part is probably first, so I calculated the size of a 512MB partition as 65 blocks and assigned the first 956 blocks to the FAT partition, with the rest as the ext partition, but it made no difference.
I tried getting RM to create a partition on a second card I have and when I look at it in fdisk it looks really weird - there's messages about "Partition 1 has different physical/logical beginnings (non-Linux?)" and "Partition 1 does not end on a cylinder boundary"
Is there a way to recreate the partitions that ROM Manager would create without wiping the existing data?
Thanks!

[Q] MMC Partition layout using Ubuntu dual boot

I'm currently dual booting Prime & Ubuntu. If I understand correctly, I have to replace the Ubuntu boot loader with CWM to update Prime. Given the different combinations of 16GB/32GB and dual booting/pure Android/pure Ubuntu, I really want to understand what the partitions are before I start playing. I know enough to know I don't want to copy & paste text that starts with 'sudo dd' into my terminal w/o understanding exactly what it's doing.
Can anyone tell me which partitions serves what purpose? I flashed Ubuntu with flash-linux-android.sh (Android is default, bootable into Ubuntu by holding down volume key during boot).
mmcblk0p1 537MB ext4 (looks androidy, fake asus bios bootanimation.zip)
mmcblk0p2 555MB ext3 (only see lost+found)
mmcblk0p3 2.1 MB ext3 (only see lost+found)
mmcblk0p4 555MB ext3 (only see lost+found)
mmcblk0p5 5.2 MB unknown (?)
mmcblk0p6 524 kB unknown (?)
mmcblk0p7 25 GB ext3 (looks like Prime ROM and prob /sdcard based on size)
mmcblk0p8 4.2 GB ext4 (Ubuntu's / partition)
mmcblk0p9 8.4 MB unknown (?)
mmcblk0p10 8.4 MB unknown (?)
scottt732 said:
I'm currently dual booting Prime & Ubuntu. If I understand correctly, I have to replace the Ubuntu boot loader with CWM to update Prime. Given the different combinations of 16GB/32GB and dual booting/pure Android/pure Ubuntu, I really want to understand what the partitions are before I start playing. I know enough to know I don't want to copy & paste text that starts with 'sudo dd' into my terminal w/o understanding exactly what it's doing.
Can anyone tell me which partitions serves what purpose? I flashed Ubuntu with flash-linux-android.sh (Android is default, bootable into Ubuntu by holding down volume key during boot).
mmcblk0p1 537MB ext4 (looks androidy, fake asus bios bootanimation.zip)
mmcblk0p2 555MB ext3 (only see lost+found)
mmcblk0p3 2.1 MB ext3 (only see lost+found)
mmcblk0p4 555MB ext3 (only see lost+found)
mmcblk0p5 5.2 MB unknown (?)
mmcblk0p6 524 kB unknown (?)
mmcblk0p7 25 GB ext3 (looks like Prime ROM and prob /sdcard based on size)
mmcblk0p8 4.2 GB ext4 (Ubuntu's / partition)
mmcblk0p9 8.4 MB unknown (?)
mmcblk0p10 8.4 MB unknown (?)
Click to expand...
Click to collapse
Years later, I have the same question. Serious bump!
Different hardware and specifics, suerly ( gt p5113, cm10 on internal sd, debian on external sd, eventually i want to boot init from external sd ), but same underlying question: what is the layout of the internal memory card partitions? where is rootfs mounted from? output of mount is opaque wrt this.
Ideas? Links?
Do you have a linux computer that you can use to run olife? There is an option to temporarily flash CWM to upgrade android

[Q] Cannot upgrade from Cyanogenmod 7.0.3 to 7.1: Can't mount /dev/block/mmcblk01

Hello,
First I'd like to tell that I've already searched the forum using Google for my problem, but I'm really new to Android and almost all posts are using lots of acronyms that I don't understand. Eventually I found myself with so many tabs opened in my browser that I almost lost what I was looking for at first.
I have a rooted (with Unrevoked) HTC Desire (Clockworkmod Recovery is in place), on which I managed to install Cyangenmod 7.0.3 a few months ago. I can't recall how I get to this result unfortunately. At the time, I only remember that I fiddled a lot because although there are plenty of howtos for many different things, they look all different and/or specific to one device, and the newbie user is not warned about the potential differences he could face.
Now I would like to upgrade to Cyanogenmod 7.1 (for bug fixes) and install DarkTremor App2SD (because I've created an ext4 partition long ago on my SD-card, naively thinkg it would be used, but it stays desperately empty; and the phone internal memory is almost full despite my strenuous attempts to move as much apps as possible to the SD card using, as far as I can tell, CyanogenMod's Apps2SD).
I stumbled on a nice video explaining "how to upgrade Cyanogenmod 7" (search this exact string on Youtube): basically, it uses ROM Manager to install the new Cyanogenmod without wiping (this is probably something that the ROM supports between minor versions). As I understand it, I should be able to use this method to install DarkTremor App2SD as well.
So I've download the Cyanogenmod 7.1 zip file and even copied in as "update.zip" in the root of my FAT32 partition of my SD card. Unfortunately, Clockwordmod Recovery spits the following message:
Code:
Waiting for SD Card to mount (12s)
E: Can't mount /dev/block/mmcblk0 (or /dev/block/mmcblk0p1)
(Invalid Argument)
Waiting for SD Card to mount (11s)
E: Can't mount /dev/block/mmcblk0 (or /dev/block/mmcblk0p1)
(Invalid Argument)
[...]
Timed out waiting for SD Card...
and then goes back to the recovery menu.
My SD card is partitioned with the following scheme (output is from Linux parted on /dev/sdb, which is accessed through an USB cable with USB storage activated on the phone):
Code:
(parted) p
Model: HTC Desire (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 16.4kB 67.1MB 67.1MB primary
2 67.1MB 537MB 470MB primary ext4
3 537MB 16.0GB 15.5GB primary fat32 lba
As you can see, the first partition is a swap partition (not sure it has been ever used though), the second one in my ext4 partition where I want to move my apps and the third one in the FAT32 partition which contains update.zip.
Thus my understanding it that /dev/block/mmcblk0(p1) points at best to the swap partition. Am I correct?
I could use another temporary SD card to perform the update, but this is unwieldy and given this partitioning scheme looks pretty common among the Android community, I wonder there's an easier way and/or if I missed something.
Please, avoid "me too" replies . And you would be nice if you avoided using acronyms as much as possible when replying (or at least, give a definition upon first use).
Thanks a lot for your help.
Cheers,
-- Tatazou
tatazou said:
Hello,
My SD card is partitioned with the following scheme (output is from Linux parted on /dev/sdb, which is accessed through an USB cable with USB storage activated on the phone):
Code:
(parted) p
Model: HTC Desire (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 16.4kB 67.1MB 67.1MB primary
2 67.1MB 537MB 470MB primary ext4
3 537MB 16.0GB 15.5GB primary fat32 lba
As you can see, the first partition is a swap partition (not sure it has been ever used though), the second one in my ext4 partition where I want to move my apps and the third one in the FAT32 partition which contains update.zip.
Thus my understanding it that /dev/block/mmcblk0(p1) points at best to the swap partition. Am I correct?
-- Tatazou
Click to expand...
Click to collapse
I think I got this more or less confirmed: I got into the phone with "adb shell" and checked /proc/partitions:
Code:
major minor #blocks name
31 0 640 mtdblock0
31 1 5120 mtdblock1
31 2 2560 mtdblock2
31 3 256000 mtdblock3
31 4 40960 mtdblock4
31 5 151168 mtdblock5
179 0 15637504 mmcblk0
179 1 65520 mmcblk0p1
179 2 458752 mmcblk0p2
179 3 15113216 mmcblk0p3
Apart from the internal storage, you can see the mmcblk0 device and its partitions whose sizes match the parted output above.

Difference storage amount between brands!

I just bought a new Quality micro SD from Samsung, 32GB EVO. I was using a brandless 32GB.
I used Win32DiskImager program (windows) to create images for both SD cards. One has everything installed what I want.
The newer Samsung has only the basic apps like link2SD, rootinternal2external.
The strange part is that there is an difference in the amount of free storage, both are parttioned with the same program.
The only difference is that the amount of partitions:
Black brandless: 3 partitions: Data,App,swap
Samsung: Data , App
But the image file that I pulled from the SD cards is as follows:
Black: 31.691.112.448 MB
Samsung: 31.440.502.784 MB
How come there is an difference?
I want to burn the old image on my new card. I guess I can make a partition of the black SD card about 260MB smaller, then create
a new image again, then burn it. I hope that works.
But is it normal that the amount of storage differs between brands???
I think that yes, regards
[How to] Copy image between different size micro SD
I found a way to copy my larger SD image, made with Win32diskimager, into my smaller Samsung 32GB micro SD:
http://softwarebakery.com/shrinking-images-on-linux
Basicly you have to do:
- Use a tool to access the micro SD and make the last partition XXX MB smaller. This creates unpartitioned space.
- Create a image file from that micro SD: xxxx.img
- Boot into a Linux Operating system, Like Ubuntu 14.04LTS, by installing it on your HD or boot directly from a live CD
- Open a terminal screen. With CTRL+ALT+T, or use the graphical UI to open one terminal.
- in that terminal, execute the command: fdisk -l xxxx.img
- The output of the command looks like the following:
Disk myimage.img: 6144 MB, 6144000000 bytes, 12000000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ea37d
Device Boot Start End Blocks Id System
myimage.img1 2048 9181183 4589568 b W95 FAT32
Now we have to calculate where we want to cut the xxxx.img file. We want to cut away the last part that is not allocated to any partition.
Above you see the line "myimage.img1 2048 9181183 4589568 b W95 FAT32".
The last partition ends at 9181183, in your example it will be different ofcourse, just take the end of the last partition.
If you have 2 partitions, then you have 2 lines under:
"Device Boot Start End Blocks Id System"
in this example we have to cut from 9181183+1. Identify also what the block size is. In our example it's 512.
512 is the block size. In your example it might be different. If it's different, execute below command with a different value.
Now we cut away the empty space that is not used in our xxx.img.
Execute in the terminal screen: truncate --size=$[(9181183+1)*512] xxxx.img
The xxxx.img file is now smaller and can be burned into the smaller device.

Question about flashing nandroid backups

I want to know that when we flash specific partition images (say system.img, data.img, cache.img, etc.), then how does the software know where exactly to put those partition bytes? For example, if I flash system.img, which CHS/LBA sector will it consider as beginning of that block? If it is based on the MBR/EBR1 tables, what will happen if I'm flashing the MBR/EBR1 too?
The reason I'm asking is that I want to change the partitioning in EBR1 slightly, so that more space is allocated to /data partition instead of /sdcard. I've got an old but good conditioned MediaTek (MTK-6577) based smart-phone called Karbonn-A30 which is great in build quality and almost every other aspect, but it only has 500MB of Internal Storage (/data partition in Linux lingo) which is not good enough for apps. Presently, the MBR and EBR1 partitions are thus:
$disktype MBR
--- MBR
Regular file, size 512 bytes
DOS/MBR partition map
Partition 1: 2.000 TiB (2199023255040 bytes, 4294967295 sectors from 1024)
Type 0x05 (Extended)
Partition 2: 10 MiB (10485760 bytes, 20480 sectors from 18432)
Type 0x83 (Linux)
Partition 3: 10 MiB (10485760 bytes, 20480 sectors from 38912)
Type 0x83 (Linux)
Partition 4: 650 MiB (681574400 bytes, 1331200 sectors from 113152)
Type 0x83 (Linux)
$disktype EBR1
--- EBR1
Regular file, size 512 bytes
DOS/MBR partition map
Partition 1: 376 MiB (394264576 bytes, 770048 sectors from 1443328)
Type 0x83 (Linux)
Partition 2: 1.293 GiB (1388314624 bytes, 2711552 sectors from 2213376)
Type 0x83 (Linux)
Partition 3: 1.998 TiB (2196501691904 bytes, 4290042367 sectors from 4924928)
Type 0x83 (Linux)
Click to expand...
Click to collapse
Why this last partition which corresponds to /sdcard is left so large (1.998 TiB) is beyond my understanding! Since there is a good 2.5GB of space available on my actual /sdcard partition, I was thinking if I can alter the EBS1 and change the LBA addressing so that the third partition starts from 2097152 additional sectors (which comes to 1024MB or 1GB which is good enough for me), will it automatically increase my /data partition by 1GB and decrease the /sdcard by 1GB correspondingly? On XDA and other forums, I've read that people have successfully done this mod and achieved the change in partition sizes, but I first want to understand how it happens.

Categories

Resources