Cyanogenmod Caused Corrupted Internal SD-Card. How to reformat? - Galaxy Note GT-N7000 General

So, today I was transferring some files to my phone using the latest Cyanogenmod nightly in MTP mode. In this mode, there is no splash screen that allows you to disconnect your phone from USB mode, so I assumed that it was safe to just disconnect the USB cable when no transfer is occurring. I have done this many times with no problem.
Well, after disconnecting this time, the phone won't mount the internal SD either in the phone itself, by USB or in CWM. I did the following and it looks like the internal SD has a corrupted partition.
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ su
[email protected]:/ # cd /dev/block
[email protected]:/dev/block # ls | grep mmcblk0
mmcblk0
mmcblk0boot0
mmcblk0boot1
mmcblk0p1
mmcblk0p10
mmcblk0p11
mmcblk0p12
mmcblk0p2
mmcblk0p3
mmcblk0p4
mmcblk0p5
mmcblk0p6
mmcblk0p7
mmcblk0p8
mmcblk0p9
[email protected]:/dev/block # fdisk -l mmcblk0
Disk mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
mmcblk0p1 1 1923584 15388671+ ee EFI GPT
Partition 1 does not end on cylinder boundary
[email protected]:/dev/block # fdisk -l mmcblk0p11
Disk mmcblk0p11: 11.8 GB, 11895046144 bytes
4 heads, 16 sectors/track, 363008 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk mmcblk0p11 doesn't contain a valid partition table
[email protected]:/dev/block #
What command would I use to reformat mmcblk0p11? mkfs.vfat /dev/block/mmcblk0p11?
Also, just a warning for others to not use MTP mode in Cyanogenmod due to this bug.

So, I did a factory reset in Cyanogenmod with the erase SD card option ticked and it looks like everything is working now. Hopefully they will soon fix the MTP splash screen so that others will not have this issue again.

Related

[Q] borked internal sd card on Atrix

Hi all,
I posted this in the Atrix Q&A but it doesn't seem to have had many hits, thought I'd try my luck here (here is the original thread: http://forum.xda-developers.com/showthread.php?t=1594675) ...basically my Atrix emmc internal memory card is borked and I am trying to find a way to restore it other than SBFing to factory (which is risky and a hassle...).
rickywyatt kindly told me to execute these commands in an adb shell and to post the results:
adb shell
# cat /proc/partitions
# fdisk /dev/block/mmcblk0
p
q
well my results are as follows:
1|[email protected]:/ $ su
su
[email protected]:/ # cat /proc/partitions
cat /proc/partitions
major minor #blocks name
7 0 2048 loop0
253 0 98304 zram0
179 0 15541760 mmcblk0
179 1 3584 mmcblk0p1
179 2 512 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 1 mmcblk0p4
179 5 1024 mmcblk0p5
179 6 512 mmcblk0p6
179 7 512 mmcblk0p7
179 8 1024 mmcblk0p8
179 9 2048 mmcblk0p9
179 10 8192 mmcblk0p10
179 11 8192 mmcblk0p11
179 12 327680 mmcblk0p12
179 13 786432 mmcblk0p13
179 14 20480 mmcblk0p14
179 15 655360 mmcblk0p15
179 16 2097152 mmcblk0p16
179 17 353280 mmcblk0p17
179 18 11233792 mmcblk0p18
179 32 7772160 mmcblk1
179 33 7771136 mmcblk1p1
[email protected]:/ # fdisk /dev/block/mmcblk0
fdisk /dev/block/mmcblk0
The number of cylinders for this disk is set to 1942720.
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): ←[6np
p
Disk /dev/block/mmcblk0: 15.9 GB, 15914762240 bytes
1 heads, 16 sectors/track, 1942720 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 65 512 3584 83 Linux
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 513 576 512 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 577 832 2048 83 Linux
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 833 1937856 15496192 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 897 1024 1024 83 Linux
/dev/block/mmcblk0p6 1025 1088 512 83 Linux
/dev/block/mmcblk0p7 1089 1152 512 83 Linux
/dev/block/mmcblk0p8 1153 1280 1024 83 Linux
/dev/block/mmcblk0p9 1281 1536 2048 83 Linux
/dev/block/mmcblk0p10 1537 2560 8192 83 Linux
/dev/block/mmcblk0p11 2561 3584 8192 83 Linux
/dev/block/mmcblk0p12 3585 44544 327680 83 Linux
/dev/block/mmcblk0p13 44545 142848 786432 83 Linux
/dev/block/mmcblk0p14 142849 145408 20480 83 Linux
/dev/block/mmcblk0p15 145409 227328 655360 83 Linux
/dev/block/mmcblk0p16 227329 489472 2097152 83 Linux
/dev/block/mmcblk0p17 489473 533632 353280 83 Linux
/dev/block/mmcblk0p18 533633 1937856 11233792 83 Linux
Command (m for help): ←[6nq
q
[email protected]:/ #​
anyone know what I need to do next? If anyone can interpret the output for me I'd be so grateful.
Thanks,
Mark
I'd say flashing an sbf is alot easier then that haha.
Sent from my MB860 using XDA
If i where you i'd try to leave it as if was new and take it to motorola service, they change it to a new one. If you did unlocked the bootload (i guess you did) i think that there was a way to hidde the unlocked at boot.
GL with that!

[Info] List of Samsung Galaxy S2 GT-I9100 devices and partitions

To run this commands you need a rooted device with BusyBox and parted. Using stock partition layout. You can change the partition layout to get more or less than 2GB of size for the data partition:
[MOD][GUIDE]Partition your internal memory for better App management (Pit Files)
List of devices by name:
[email protected]:/sdcard # ls -l /dev/block/platform/dw_mmc/by-name/
lrwxrwxrwx 1 root root 20 May 12 21:24 CACHE -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 May 12 21:24 DATAFS -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 20 May 12 21:24 EFS -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 20 May 12 21:24 FACTORYFS -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 May 12 21:24 HIDDEN -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 20 May 12 21:24 KERNEL -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 May 12 21:24 MODEM -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 May 12 21:24 PARAM -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 20 May 12 21:24 RECOVERY -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 May 12 21:24 SBL1 -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 20 May 12 21:24 SBL2 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 May 12 21:24 UMS -> /dev/block/mmcblk0p11
Click to expand...
Click to collapse
List of fdisk for all given partitions:
Command (needs Superuser or equivalent and Busybox):
su
find /dev/block/platform/dw_mmc/ -name 'mmc*' -exec fdisk -l {} \; > /sdcard/list_of_sgs2_partitions.txt
Click to expand...
Click to collapse
Code:
Disk ./mmcblk0boot0: 0 MB, 524288 bytes
4 heads, 16 sectors/track, 16 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0boot0 doesn't contain a valid partition table
Disk ./mmcblk0boot1: 0 MB, 524288 bytes
4 heads, 16 sectors/track, 16 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0boot1 doesn't contain a valid partition table
Disk ./mmcblk0p12: 536 MB, 536870912 bytes
4 heads, 16 sectors/track, 16384 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p12 doesn't contain a valid partition table
Disk ./mmcblk0p11: 12.3 GB, 12356419584 bytes
4 heads, 16 sectors/track, 377088 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
./mmcblk0p11p4 1 1 0 0 Empty
Partition 4 does not end on cylinder boundary
Disk ./mmcblk0p10: 2147 MB, 2147483648 bytes
4 heads, 16 sectors/track, 65536 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p10 doesn't contain a valid partition table
Disk ./mmcblk0p9: 536 MB, 536870912 bytes
4 heads, 16 sectors/track, 16384 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p9 doesn't contain a valid partition table
Disk ./mmcblk0p8: 16 MB, 16777216 bytes
4 heads, 16 sectors/track, 512 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p8 doesn't contain a valid partition table
Disk ./mmcblk0p7: 104 MB, 104857600 bytes
4 heads, 16 sectors/track, 3200 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p7 doesn't contain a valid partition table
Disk ./mmcblk0p6: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p6 doesn't contain a valid partition table
Disk ./mmcblk0p5: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p5 doesn't contain a valid partition table
Disk ./mmcblk0p4: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p4 doesn't contain a valid partition table
Disk ./mmcblk0p3: 1 MB, 1310720 bytes
4 heads, 16 sectors/track, 40 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p3 doesn't contain a valid partition table
Disk ./mmcblk0p2: 1 MB, 1310720 bytes
4 heads, 16 sectors/track, 40 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p2 doesn't contain a valid partition table
Disk ./mmcblk0p1: 20 MB, 20971520 bytes
4 heads, 16 sectors/track, 640 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p1 doesn't contain a valid partition table
Disk ./mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
./mmcblk0p1 1 1923456 15387647+ ee EFI GPT
Partition 1 does not end on cylinder boundary
Mounted filesystems:
Code:
[email protected]:/ # df
df
Filesystem Size Used Free Blksize
/dev 415M 32K 415M 4096
/mnt/asec 415M 0K 415M 4096
/mnt/obb 415M 0K 415M 4096
/system 503M 429M 74M 4096
/cache 98M 4M 94M 4096
/efs 19M 8M 11M 4096
/data 1G 666M 1G 4096
/mnt/.lfs: Function not implemented
/mnt/sdcard 11G 2G 9G 32768
/mnt/sdcard/external_sd 29G 24G 5G 32768
/mnt/sdcard/external_sd 29G 24G 5G 32768
temporal fstab:
Code:
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mmcblk0p9 on /system type ext4 (ro,noatime,barrier=1,data=ordered)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk0p1 on /efs type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk0p10 on /data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc)
/dev/block/mmcblk0p4 on /mnt/.lfs type j4fs (rw,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
/dev/block/vold/259:3 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/external_sd type tmpfs (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,size=0k,mode=755,gid=1000)
tmpfs on /mnt/sdcard/usbStorage type tmpfs (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,size=0k,mode=755,gid=1000)
/dev/block/vold/179:25 on /mnt/sdcard/external_sd type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:25 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/external_sd/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
/dev/block/dm-0 on /mnt/asec/org.ais.archidroid-1 type vfat (ro,dirsync,nosuid,nodev,noatime,nodiratime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
AdamOutler said:
Hey guys. I'm doing some work to figure out how to recover Galaxy Nexus devices which are hard-bricked.. ie.. they have a bad or no bootloader installed.
the boot sequence
1. IROM - the Internal ROM which cannot be rewritten on the device. This loads the XLoader.
2. XLoader/MLO - This completes the initialization of the processor and memory, and loads up the relatively huge U-Boot ( Samsung modified this and calls it SBL)
3. UBoot/SBL - This "Bootloader" is almost a complete operating system. The U-Boot initializes the screen, provides Odin mode, Fastboot Mode as well as loading the kernel/recovery and provides a UART debugging mode (Yet to be unlocked).
4. Kernel - Once we reach this point, it's all clear.. the kernel is linux which loads android and all sorts of other things.
The Problem
People are bricking their devices at stage 2 and 3 of this boot sequence... This leaves them unable to boot Fastboot or Odin. The device is 100% interchangable with a brick. These devices are ending up hard bricked.
The solution
We must come up with a way to undo the hard brick. Here are some things i'm looking at to use the native hardware to recover itself.
When you plug in the device (when off), you will immediately notice a Texas Instruments D010 device gets enumerated. This is a debug mode for the processor.
Code:
Bus 001 Device 023: ID 0451:d010 Texas Instruments, Inc.
We've started looking at some bootloader output here: http://forum.xda-developers.com/showthread.php?t=1461986
You can find information about the OMAP4 bootloaders here: http://omapedia.org/wiki/Bootloader_Project
Help
I need help locating drivers to initialize the 0451:d010 device and make it readable from within Linux or Windows.. Generally Linux is easier to find appropriate drivers.
I could use some help collecting more reading materials and resources.
I think together as a community we can take care of this problem.
Click to expand...
Click to collapse
AdamOutler said:
There's more to the boot then the OP mentioned... there's 6 partitions involved, not 4.
irom = hard coded
IBL/PBL = initial bootloader and primitive bootloader
SBL = Secondadary Bootloader finds linux
param = contains paramaters to run the phone and required for boot.
SBL2 = download mode (included in SBL)
PIT = Partiton Information Table
Don't touch any of these files.
If you touch the param.ifs, the phone can still boot, however you will see a black screen if something goes wrong.
Code:
BOOT 00000000 0000 0003FFFF 0001
PIT 00040000 0001 0003FFFF 0001
EFS 00080000 0002 009FFFFF 0028
SBL 00A80000 002A 0013FFFF 0005
SBL2 00BC0000 002F 0013FFFF 0005
PARAM 00D00000 0034 004FFFFF 0014
KERNEL 01200000 0048 0077FFFF 001E
RECOVERY 01980000 0066 0077FFFF 001E
FACTORYFS 02100000 0084 11E7FFFF 047A
DBDATAFS 13F80000 04FE 085FFFFF 0218
CACHE 1C580000 0716 022FFFFF 008C
MODEM 1E880000 07A2 00C7FFFF 0032
07D4 1F500000
Click to expand...
Click to collapse
Aditional links:
* Definitive guide to Bricking *
[Guide] Types of Android backups
[REF] GT-I9100 PIT v Flash Analysis
[GUIDE] ROOT/UNROOT Stock ICS Firmware without flashing unsecure kernel
[GUIDE] Making Dump Files Out of Android Device Partitions
/sdcard
This is nice, thank.
But where is from block device the sdcard. How working the "vold"?
How can I partition sdcard with fdisk or with parted?
gyurman said:
This is nice, thank.
But where is from block device the sdcard. How working the "vold"?
How can I partition sdcard with fdisk or with parted?
Click to expand...
Click to collapse
Partition the sdcard from clockworkmod recovery
Thanks, but I want use parted, or fdisk. But what mmcblk0? use sdcard? mmcblk0p11?

[Help] ADB

Hi there,
I've been trying to fix my sdcard problem and have resorted to trying to fix it via adb.
So I run the command
Code:
cat /proc/partitions
Code:
cat /proc/partitions
major minor #blocks name alias
7 7 4096 loop7
179 32 1912832 mmcblk1
179 33 128 mmcblk1p1
179 34 512 mmcblk1p2
179 35 512 mmcblk1p3
179 36 1 mmcblk1p4
179 37 512 mmcblk1p5
179 38 512 mmcblk1p6
179 39 4096 mmcblk1p7 pds
179 40 512 mmcblk1p8
179 41 512 mmcblk1p9
179 42 1024 mmcblk1p10
179 43 2048 mmcblk1p11
179 44 512 mmcblk1p12
179 45 512 mmcblk1p13
179 46 4096 mmcblk1p14
179 47 8192 mmcblk1p15 boot
179 48 8192 mmcblk1p16 recovery
179 49 14336 mmcblk1p17 cdrom
179 50 512 mmcblk1p18 misc
179 51 512 mmcblk1p19 cid
179 52 4096 mmcblk1p20 kpanic
179 53 334848 mmcblk1p21 system
179 54 512 mmcblk1p22 prek
179 55 512 mmcblk1p23 pkbackup
179 56 204800 mmcblk1p24 cache
179 57 1319936 mmcblk1p25 userdata
179 0 7761920 mmcblk0
Its supposed to list mmcblk0p1 as well :\
I ran
Code:
cat /proc/cmdline
Code:
cat /proc/cmdline
console=/dev/null rw [email protected] init=/init ip=off brdrev=P3A omap3_die_
id androidboot.bootloader=0x0000 mmcparts=mmcblk1:p7(pds),p15(boot),p16(recovery
),p17(cdrom),p18(misc),p19(cid),p20(kpanic),p21(system),p22(prek),p23(pkbackup),
p24(cache),p25(userdata) androidboot.mode=normal
Whenever I try to run logcat it goes into a loop of errors
Code:
error: cannot connect to daemon
ADB server didn't ACK
* failed to start daemon *
- waiting for device -
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
ADB server didn't ACK
* failed to start daemon *
- waiting for device -
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
ADB server didn't ACK
* failed to start daemon *
- waiting for device -
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
ADB server didn't ACK
* failed to start daemon *
- waiting for device -
Any help on this issue would be greatly appreciated!
Running 'Show log' from recovery says I can't mount /dev/block/mmcblk0p1 because it doesn't exist.
EDIT:
Code:
fdisk -l /dev/block/mmcblk0
Code:
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 ? 30441958 57035368 850989111+ 6e Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 ? 1 1 0 74 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p4 438273 438279 220+ 0 Empty
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order
Ok I managed to mount it.
You most probably have an unpartitioned sdcard, clockworkmod however assumes that is partitioned and wants to mount the first partition (/dev/block/mmcblk0p1).
You can fix this by repartitioning your sdcard so that it has a mountable fat-formatted first volume and then retry.
If you don't mind using the commandline, boot to recovery and connect via adb shell to it, then mount your sdcard manually: mount /dev/block/mmcblk0 /sdcard and retry.
Technical explanation:
cat /proc/partitions lists:
/dev/block/mmcblk0 is your FAT formatted volume (no more partitions at all)
should be:
/dev/block/mmcblk0 (whole device)
/dev/block/mmcblk0p1 (1st partition, FAT formatted)
/dev/block/mmcblk0p2 (sd-ext partition, only for those that use SD2ext and such)
Click to expand...
Click to collapse
Source: http://android.stackexchange.com/questions/24427/cant-mount-sdcard-from-recovery-mode-clockworkmod
By running the command
Code:
mount /dev/block/mmcblk0 /sdcard
I can now access the sdcard, but this is only a temporary solution. How do I make it so that I don't have to manually mount the sdcard?

boot.img too large lenovo vibe p1ma40 [MT6735M]

Having issues with compiling recovery(cyanogenmod) for Lenovo Vibe P1MA40 (MT6735M),
here's my BoardConfig.mk
github.com/pareshchouhan/android_device_lenovo_p1ma40/blob/master/BoardConfig.mk
Code:
[ 57% 24/42] Target boot image: /home/paresh/android/android/system/out/target/product/p1ma40/boot.img
FAILED: /bin/bash -c "(/home/paresh/android/android/system/out/host/linux-x86/bin/mkbootimg --kernel /home/paresh/android/android/system/out/target/product/p1ma40/kernel --ramdisk /home/paresh/android/android/system/out/target/product/p1ma40/ramdisk.img --base 0x40080000 --pagesize 2048 --cmdline \"bootopt=64S3,32N2,64N2 buildvariant=userdebug\" --os_version 7.1 --os_patch_level 2016-11-05 --output /home/paresh/android/android/system/out/target/product/p1ma40/boot.img ) && (size=\$(for i in /home/paresh/android/android/system/out/target/product/p1ma40/boot.img; do stat --format \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \"/home/paresh/android/android/system/out/target/product/p1ma40/boot.img\" | tr \" \" +); img_blocksize=17301504; twoblocks=\$((img_blocksize * 2)); onepct=\$(((((17301504 / 100) - 1) / img_blocksize + 1) * img_blocksize)); reserve=\$((twoblocks > onepct ? twoblocks : onepct)); maxsize=\$((17301504 - reserve)); echo \"\$printname maxsize=\$maxsize blocksize=\$img_blocksize total=\$total reserve=\$reserve\"; if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > [17301504 - \$reserve])\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi ) && (echo \"Made boot image: /home/paresh/android/android/system/out/target/product/p1ma40/boot.img\" )"
/home/paresh/android/android/system/out/target/product/p1ma40/boot.img maxsize=-17301504 blocksize=17301504 total=7809024 reserve=34603008
error: /home/paresh/android/android/system/out/target/product/p1ma40/boot.img too large (7809024 > [17301504 - 34603008])
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
If someone can pinpoint the makefile which contains this check I can comment it out, or better yet give me a solution to this.
Code:
[email protected]:/ # fdisk -l /dev/block/mmcblk0p7
fdisk -l /dev/block/mmcblk0p7
Disk /dev/block/mmcblk0p7: 16 MB, 16777216 bytes
4 heads, 16 sectors/track, 512 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p7 doesn't contain a valid partition table
[email protected]:/ # fdisk -l /dev/block/mmcblk0p8
fdisk -l /dev/block/mmcblk0p8
Disk /dev/block/mmcblk0p8: 16 MB, 16777216 bytes
4 heads, 16 sectors/track, 512 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p8 doesn't contain a valid partition table
[email protected]:/ # fdisk -l /dev/block/mmcblk0p20
fdisk -l /dev/block/mmcblk0p20
Disk /dev/block/mmcblk0p20: 2684 MB, 2684354560 bytes
4 heads, 16 sectors/track, 81920 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p20 doesn't contain a valid partition table
[email protected]:/ # fdisk -l /dev/block/mmcblk0p22
fdisk -l /dev/block/mmcblk0p22
Disk /dev/block/mmcblk0p22: 12.3 GB, 12303466496 bytes
4 heads, 16 sectors/track, 375472 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p22 doesn't contain a valid partition table
[email protected]:/ # fdisk -l /dev/block/mmcblk0p23
fdisk -l /dev/block/mmcblk0p23
Disk /dev/block/mmcblk0p23: 16 MB, 16777216 bytes
4 heads, 16 sectors/track, 512 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Code:
cat /proc/emmc
partno: start_sect nr_sects partition_name
emmc_p1: 00000400 00001800 "proinfo"
emmc_p2: 00001c00 00002800 "nvram"
emmc_p3: 00004400 00005000 "protect1"
emmc_p4: 00009400 00005000 "protect2"
emmc_p5: 0000e400 00000400 "lk"
emmc_p6: 0000e800 00000400 "para"
emmc_p7: 0000ec00 00008000 "boot"
emmc_p8: 00016c00 00008000 "recovery"
emmc_p9: 0001ec00 00004000 "logo"
emmc_p10: 00022c00 00005000 "expdb"
emmc_p11: 00027c00 00000400 "seccfg"
emmc_p12: 00028000 00001000 "oemkeystore"
emmc_p13: 00029000 00003000 "secro"
emmc_p14: 0002c000 00004000 "keystore"
emmc_p15: 00030000 00002800 "tee1"
emmc_p16: 00032800 00002800 "tee2"
emmc_p17: 00035000 00000800 "frp"
emmc_p18: 00035800 00010000 "nvdata"
emmc_p19: 00045800 00012800 "metadata"
emmc_p20: 00058000 00500000 "system"
emmc_p21: 00558000 000d4000 "cache"
emmc_p22: 0062c000 016eac00 "userdata"
emmc_p23: 01d16c00 00008000 "flashinfo"
Code:
cat /proc/partitions
major minor #blocks name
179 0 15267840 mmcblk0
179 1 3072 mmcblk0p1
179 2 5120 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 10240 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 16384 mmcblk0p7 //boot Disk /dev/block/mmcblk0p7: 16 MB, 16777216 bytes
179 8 16384 mmcblk0p8 //recovery Disk /dev/block/mmcblk0p8: 16 MB, 16777216 bytes
179 9 8192 mmcblk0p9
179 10 10240 mmcblk0p10
179 11 512 mmcblk0p11
179 12 2048 mmcblk0p12
179 13 6144 mmcblk0p13
179 14 8192 mmcblk0p14
179 15 5120 mmcblk0p15
179 16 5120 mmcblk0p16
179 17 1024 mmcblk0p17
179 18 32768 mmcblk0p18
179 19 37888 mmcblk0p19
179 20 2621440 mmcblk0p20 //system Disk /dev/block/mmcblk0p20: 2684 MB, 2684354560 bytes
179 21 434176 mmcblk0p21
179 22 12015104 mmcblk0p22 //userdata Disk /dev/block/mmcblk0p22: 12.3 GB, 12303466496 bytes
179 23 16384 mmcblk0p23 //flash info Disk /dev/block/mmcblk0p23: 16 MB, 16777216 bytes
179 96 4096 mmcblk0rpmb
179 64 4096 mmcblk0boot1
179 32 4096 mmcblk0boot0
179 128 15630336 mmcblk1
179 129 15629312 mmcblk1p1
PS: If you need any other info let me know.
Solved: I resolved this issue with the help of friendly people in #cyanogenmod-dev @ freenode
Thanks to (in no particular order)
evilracer
nailyk
gladiac
pareshchouhan said:
Solved: I resolved this issue with the help of friendly people in #cyanogenmod-dev @ freenode
Thanks to (in no particular order)
evilracer
nailyk
gladiac
Click to expand...
Click to collapse
Can you tell me how have you solved this issue please ? I really need a fix for this issue too. Thanks.

Where is the BCT image on the TPT?

Can someone explain me how the TPT does the booting? According to the nvidia manual there should be a BCT image somewhere on the device, either in SPI or in eMMC but I can not find it. According to this post: https://forum.xda-developers.com/showthread.php?t=2318140 there should be 16 partitions, but it looks like I only have 10:
Code:
[email protected]:/ # cat /proc/partitions
major minor #blocks name
179 0 15387648 mmcblk0
179 1 6144 mmcblk0p1
179 2 8192 mmcblk0p2
179 3 786432 mmcblk0p3
179 4 921600 mmcblk0p4
179 5 2048 mmcblk0p5
179 6 524288 mmcblk0p6
179 7 20480 mmcblk0p7
259 0 143360 mmcblk0p8
259 1 20480 mmcblk0p9
259 2 12939264 mmcblk0p10
[email protected]:/ # ls -al /dev/block/platform/sdhci-tegra.3/by-name/
lrwxrwxrwx root root 2018-08-16 09:07 AP -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2018-08-16 09:07 CC -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2018-08-16 09:07 LX -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2018-08-16 09:07 MC -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2018-08-16 09:07 PA -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2018-08-16 09:07 SC -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2018-08-16 09:07 SS -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2018-08-16 09:07 UA -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2018-08-16 09:07 UP -> /dev/block/mmcblk0p8
As p1 is the recovery image and p2 is the kernel, I do not see any more partitions where the BCT image could be.
nvflash does not work on my device, as the APX mode is locked.
What I find a little bit worrying, is that fdisk says I have no partition table:
Code:
[email protected]:/ # fdisk -l mmcblk0
Disk mmcblk0: 15.7 GB, 15756951552 bytes
4 heads, 16 sectors/track, 480864 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk mmcblk0 doesn't contain a valid partition table
Should this command fail?
But there must be the configuration somewhere, right?
I have a TPT 1839-22G
I imaged now the whole eMMC using dd and found out that in difference to the posted partition table, the partitions BCT, PT, EBT and GP1 are missing. the Partitions SOS starts 0x100000 bytes earlier as given in the other thread.
Between 0x0 and 0x00d00000 I can find some non zero bytes but nothing which caught my attention.
Using gdisk I could restore the partition table:
Code:
GPT fdisk (gdisk) version 1.0.3
Unsupported GPT version in backup header; read 0x00000000, should be
0x00010000
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Command (? for help): p
Disk mmcblk0.img: 30775296 sectors, 14.7 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): D3A36F54-6FB0-48C2-B599-DFD0D4E294BF
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 30775262
Partitions will be aligned on 2048-sector boundaries
Total free space is 30775229 sectors (14.7 GiB)
Number Start (sector) End (sector) Size Code Name
Command (? for help): r
Recovery/transformation command (? for help): b
Recovery/transformation command (? for help): p
Disk mmcblk0.img: 30775296 sectors, 14.7 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): D3A36F54-6FB0-48C2-B599-DFD0D4E294BF
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 30775262
Partitions will be aligned on 2048-sector boundaries
Total free space is 30775229 sectors (14.7 GiB)
Number Start (sector) End (sector) Size Code Name
Recovery/transformation command (? for help): c
Warning! This will probably do weird things if you've converted an MBR to
GPT form and haven't yet saved the GPT! Proceed? (Y/N): y
Caution! After loading partitions, the CRC doesn't check out!
Recovery/transformation command (? for help): p
Disk mmcblk0.img: 30775296 sectors, 14.7 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): D3A36F54-6FB0-48C2-B599-DFD0D4E294BF
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 30775262
Partitions will be aligned on 2048-sector boundaries
Total free space is 30653 sectors (15.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 26624 38911 6.0 MiB 0700 体S
2 38912 55295 8.0 MiB 0700 乌X
3 55296 1628159 768.0 MiB 0700 偁P
4 1628160 3471359 900.0 MiB 0700 䅃C
5 3471360 3475455 2.0 MiB 0700 卍C
6 3475456 4524031 512.0 MiB 0700 䥐A
7 4524032 4564991 20.0 MiB 0700 䕓C
8 4564992 4851711 140.0 MiB 0700 单P
9 4851712 4892671 20.0 MiB 0700 䑐A
10 4892672 30771199 12.3 GiB 0700 䑕A
Which also shows, that there are no partitions before 0xd00000.
But where is the BCT stored then?

Categories

Resources