Repartitioning internal memory - General Questions and Answers

Hey guys,
So i've searched but can't seem to get my terms correct or what im about to ask hasnt been answered... I have a tablet its based on an rk3188 chip which is armv7 and it's running android 4.2.2 with locked bootloader and no custom recovery or access to fastboot... I'm curious to know can i repartition the nand flash, more specifically the /data and /mnt/sdcard one to allocate more space to /data and two to change file system type of mnt to something that isnt as restrictive as vfat? I can access adb while the device is powered off but charging without the system running. I will be posting an output of 'busybox ls -alh /dev/block/mtd/by-name/' so you guys can see how the blocks are setup currently. If you need more info please tell me.
[email protected]:/ # busybox ls -alh /dev/block/mtd/by-name/
total 0
drwxr-xr-x 2 0 0 240 May 16 19:01 .
drwxr-xr-x 3 0 0 60 May 16 19:01 ..
lrwxrwxrwx 1 0 0 20 May 16 19:01 backup -> /dev/block/mtdblock4lrwxrwxrwx 1 0 0 20 May 16 19:01 boot -> /dev/block/mtdblock2
lrwxrwxrwx 1 0 0 20 May 16 19:01 cache -> /dev/block/mtdblock5
lrwxrwxrwx 1 0 0 20 May 16 19:01 kernel -> /dev/block/mtdblock1lrwxrwxrwx 1 0 0 20 May 16 19:01 kpanic -> /dev/block/mtdblock7lrwxrwxrwx 1 0 0 20 May 16 19:01 misc -> /dev/block/mtdblock0
lrwxrwxrwx 1 0 0 20 May 16 19:01 recovery -> /dev/block/mtdblock3
lrwxrwxrwx 1 0 0 20 May 16 19:01 system -> /dev/block/mtdblock8lrwxrwxrwx 1 0 0 20 May 16 19:01 user -> /dev/block/mtdblock9
lrwxrwxrwx 1 0 0 20 May 16 19:01 userdata -> /dev/block/mtdblock6
[email protected]:/ #

Related

[INFO] Nexus 7 Partitions!

Here's an output of /proc/mounts, might be help full other devs:
which one is recovery partition does anyone know?
zoneinfo
[email protected]:/proc $ cat mounts
cat mounts
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,relatime,user_xatt
r,acl,barrier=1,data=ordered 0 0
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw,nosuid,nodev,noatim
e,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered 0 0
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw,nosuid,nodev,noatime
,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1
023,default_permissions,allow_other 0 0
run
Code:
ls -l /dev/block/platform/sdhci-tegra.3/by-name/
and that should show all partitions.
Indirect said:
run
Code:
ls -l /dev/block/platform/sdhci-tegra.3/by-name/
and that should show all partitions.
Click to expand...
Click to collapse
Thanks!
C:\Users\max\Downloads\Nexus7Root>adb shell
[email protected]:/ $ ls -l /dev/block/platform/sdhci-tegra.3/by-name/
ls -l /dev/block/platform/sdhci-tegra.3/by-name/
lrwxrwxrwx root root 2012-06-28 11:51 APP -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2012-06-28 11:51 CAC -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2012-06-28 11:51 LNX -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2012-06-28 11:51 MDA -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2012-06-28 11:51 MSC -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2012-06-28 11:51 PER -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2012-06-28 11:51 SOS -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2012-06-28 11:51 UDA -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2012-06-28 11:51 USP -> /dev/block/mmcblk0p6
try
Code:
ls -l /dev/block/
and if you see r on the 3rd from last line of each partition, do the following commands:
Code:
adb shell cat /dev/block/platform/sdhci-tegra.3/by-name/lnx > lnxfile.bin
adb shell cat /dev/block/platform/sdhci-tegra.3/by-name/SOS > SOSfile.bin
Indirect said:
try
Code:
ls -l /dev/block/
and if you see r on the 3rd from last line of each partition, do the following commands:
Code:
adb shell cat /dev/block/platform/sdhci-tegra.3/by-name/lnx > lnxfile.bin
adb shell cat /dev/block/platform/sdhci-tegra.3/by-name/SOS > SOSfile.bin
Click to expand...
Click to collapse
C:\Users\max\Downloads\Nexus7Root>adb shell
[email protected]:/ $ ls -l /dev/block/
ls -l /dev/block/
brw------- root root 7, 0 2012-06-28 11:51 loop0
brw------- root root 7, 1 2012-06-28 11:51 loop1
brw------- root root 7, 2 2012-06-28 11:51 loop2
brw------- root root 7, 3 2012-06-28 11:51 loop3
brw------- root root 7, 4 2012-06-28 11:51 loop4
brw------- root root 7, 5 2012-06-28 11:51 loop5
brw------- root root 7, 6 2012-06-28 11:51 loop6
brw------- root root 7, 7 2012-06-28 11:51 loop7
brw------- root root 179, 0 2012-06-28 11:51 mmcblk0
brw------- root root 179, 16 2012-06-28 11:51 mmcblk0boot0
brw------- root root 179, 32 2012-06-28 11:51 mmcblk0boot1
brw------- root root 179, 1 2012-06-28 11:51 mmcblk0p1
brw------- root root 179, 2 2012-06-28 11:51 mmcblk0p2
brw------- root root 179, 3 2012-06-28 11:51 mmcblk0p3
brw------- root root 179, 4 2012-06-28 11:51 mmcblk0p4
brw------- root root 179, 5 2012-06-28 11:51 mmcblk0p5
brw------- root root 179, 6 2012-06-28 11:51 mmcblk0p6
brw------- root root 179, 7 2012-06-28 11:51 mmcblk0p7
brw------- root root 179, 8 2012-06-28 11:51 mmcblk0p8
brw------- root root 179, 9 2012-06-28 11:51 mmcblk0p9
drwxr-xr-x root root 2012-06-28 11:51 platform
drwx------ root root 2012-06-28 11:51 vold
[email protected]:/ $
Permission denied for cat
yep, that's what I figured but it was still worth a shot. :x
You'll need root. If you can get it before you have to surrender that tab, it'd be great.
run this one:
Code:
cat /proc/partitions
and this one:
Code:
fdisk -l /dev/block/mmcblk0
this command would be interesting too:
Code:
cat /proc/cmdline
And if the file exists execute "adb pull /proc/config.gz"(or copy it via rootexplorer) and post it here. It's the kernel-config
Cool - these are btw mostly generic tegra names, while most are probably obvious I've "translated" them below.
zedomax said:
C:\Users\max\Downloads\Nexus7Root>adb shell
[email protected]:/ $ ls -l /dev/block/platform/sdhci-tegra.3/by-name/
ls -l /dev/block/platform/sdhci-tegra.3/by-name/
lrwxrwxrwx root root 2012-06-28 11:51 APP -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2012-06-28 11:51 CAC -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2012-06-28 11:51 LNX -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2012-06-28 11:51 MDA -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2012-06-28 11:51 MSC -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2012-06-28 11:51 PER -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2012-06-28 11:51 SOS -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2012-06-28 11:51 UDA -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2012-06-28 11:51 USP -> /dev/block/mmcblk0p6
Click to expand...
Click to collapse
APP -> system
CAC -> cache
LNX -> boot.img
MDA -> Unknown
MSC -> Misc (bootloader commands and other misc stuff )
PER -> usually a fat partition containing sensor calibration etc. - per device provisioned.
SOS -> recovery.img
UDA -> /data - "user data area"
USP -> Staging
---------- Post added at 10:18 PM ---------- Previous post was at 10:17 PM ----------
m11kkaa said:
run this one:
Code:
cat /proc/partitions
and this one:
Code:
fdisk -l /dev/block/mmcblk0
Click to expand...
Click to collapse
There's no standard "dos" partition anywhere, so that won't work.
m11kkaa said:
this command would be interesting too:
Code:
cat /proc/cmdline
And if the file exists execute "adb pull /proc/config.gz"(or copy it via rootexplorer) and post it here. It's the kernel-config
Click to expand...
Click to collapse
At least cmdline is actually protected from normal users in newer kernels and same with config.gz I believe. Worth a shot though. (FWIW, usually tegra bootloader fills in kernel cmdline rather than hardcoding it in boot.img )
Code:
1|[email protected]:/dev/block/platform/sdhci-tegra.3/by-name $ cat /proc/partitions
/partitions <
major minor #blocks name
179 0 7467008 mmcblk0
179 1 12288 mmcblk0p1
179 2 8192 mmcblk0p2
179 3 665600 mmcblk0p3
179 4 453632 mmcblk0p4
179 5 512 mmcblk0p5
179 6 10240 mmcblk0p6
179 7 5120 mmcblk0p7
179 8 512 mmcblk0p8
179 9 6302720 mmcblk0p9
179 32 2048 mmcblk0boot1
179 16 2048 mmcblk0boot0
Config.gz
Here's Config.gz attached
zedomax said:
Code:
1|[email protected]:/dev/block/platform/sdhci-tegra.3/by-name $ cat /proc/partitions
.....[/QUOTE]
4096Bytes are missing. Maybe the bootloader+PartitionTable at first bytes of Nand :)
Did anyone of you try if there is an bootloader-mode(the usual key-combinations)?
Click to expand...
Click to collapse
Partition sizes
Could you/someone please post a df to see the size of each partition, I wonder how much of the 8GB are available and how much is for /data.
Thanks!
Filesystem Size Used Free Blksize
/dev 487M 32K 487M 4096
/mnt/asec 487M 0K 487M 4096
/mnt/obb 487M 0K 487M 4096
/system 639M 422M 217M 4096
/cache 436M 7M 428M 4096
/data 5G 4G 1G 4096
/storage/sdcard0 5G 4G 1G 4096
/mnt/asec/com.lexi.android-1 3M 1M 1M 4096
Is there any way to creat a extra partition or at least to change the size?
I don't believe so or someone would have done it already.
rayman said:
Cool - these are btw mostly generic tegra names, while most are probably obvious I've "translated" them below.
APP -> system
CAC -> cache
LNX -> boot.img
MDA -> Unknown
MSC -> Misc (bootloader commands and other misc stuff )
PER -> usually a fat partition containing sensor calibration etc. - per device provisioned.
SOS -> recovery.img
UDA -> /data - "user data area"
USP -> Staging
Click to expand...
Click to collapse
Just a bit of an update on these from what I've found. MDA is listed in the fstab as encrypted data.
/dev/block/platform/sdhci-tegra.3/by-name:
lrwxrwxrwx 1 root root 20 Nov 12 00:10 SOS -> /dev/block/mmcblk0p1 -> recovery
lrwxrwxrwx 1 root root 20 Nov 12 00:10 LNX -> /dev/block/mmcblk0p2 -> boot
lrwxrwxrwx 1 root root 20 Nov 12 00:10 APP -> /dev/block/mmcblk0p3 -> system
lrwxrwxrwx 1 root root 20 Nov 12 00:10 CAC -> /dev/block/mmcblk0p4 -> cache
lrwxrwxrwx 1 root root 20 Nov 12 00:10 MSC -> /dev/block/mmcblk0p5 -> misc
lrwxrwxrwx 1 root root 20 Nov 12 00:10 USP -> /dev/block/mmcblk0p6 -> bootloader
lrwxrwxrwx 1 root root 20 Nov 12 00:10 PER -> /dev/block/mmcblk0p7 -> per device calibration
lrwxrwxrwx 1 root root 20 Nov 12 00:10 MDA -> /dev/block/mmcblk0p8 -> encrypted userdata
lrwxrwxrwx 1 root root 20 Nov 12 00:10 UDA -> /dev/block/mmcblk0p9 -> userdata
APP -> system
CAC -> cache
LNX -> boot
MDA -> encrypted userdata
MSC -> misc
PER -> per device calibration
SOS -> recovery
UDA -> userdata
USP -> bootloader
Edit, Jan. 9th: Dug up the N7 tilapia equivalents today because I was curious (found on the Ubuntu site of all places).
/dev/block/platform/sdhci-tegra.3/by-name/
lrwxrwxrwx root root 2012-11-20 13:48 SOS -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2012-11-20 13:48 LNX -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2012-11-20 13:48 APP -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2012-11-20 13:48 RDO -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2012-11-20 13:48 CAC -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2012-11-20 13:48 MSC -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2012-11-20 13:48 USP -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2012-11-20 13:48 PER -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2012-11-20 13:48 MDA -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2012-11-20 13:48 UDA -> /dev/block/mmcblk0p10
Seems they just stuck RDO (radio) in the middle at p4 so everything else just shifts down, and up a p#.
Also worth mentioning for both N7 variants (and apparently Tegras in general), mmcblk0boot0 and mmbblk0boot1 are continuous and contain 3 partitions: BCT, PT and the start of the bootloader. BCT takes up all of boot0 and the beginning of boot1. They are encrypted and boot0 is where lockstate is stored. For more info check out my BootUnlocker Script thread.
Credits to lilstevie for that information.
USP is only staging Area for bootloader flashes not the bootloader itself...
Is the per partition on all N7 the same or are there differences from device to device, so that I can´t use the per partion of another N7?
osm0sis said:
Just a bit of an update on these from what I've found. MDA is listed in the fstab as encrypted data.
/dev/block/platform/sdhci-tegra.3/by-name:
lrwxrwxrwx 1 root root 20 Nov 12 00:10 SOS -> /dev/block/mmcblk0p1 -> recovery
lrwxrwxrwx 1 root root 20 Nov 12 00:10 LNX -> /dev/block/mmcblk0p2 -> boot
lrwxrwxrwx 1 root root 20 Nov 12 00:10 APP -> /dev/block/mmcblk0p3 -> system
lrwxrwxrwx 1 root root 20 Nov 12 00:10 CAC -> /dev/block/mmcblk0p4 -> cache
lrwxrwxrwx 1 root root 20 Nov 12 00:10 MSC -> /dev/block/mmcblk0p5 -> misc
lrwxrwxrwx 1 root root 20 Nov 12 00:10 USP -> /dev/block/mmcblk0p6 -> bootloader
lrwxrwxrwx 1 root root 20 Nov 12 00:10 PER -> /dev/block/mmcblk0p7 -> per device calibration
lrwxrwxrwx 1 root root 20 Nov 12 00:10 MDA -> /dev/block/mmcblk0p8 -> encrypted userdata
lrwxrwxrwx 1 root root 20 Nov 12 00:10 UDA -> /dev/block/mmcblk0p9 -> userdata
APP -> system
CAC -> cache
LNX -> boot
MDA -> encrypted userdata
MSC -> misc
PER -> per device calibration
SOS -> recovery
UDA -> userdata
USP -> bootloader
Edit, Jan. 9th: Dug up the N7 tilapia equivalents today because I was curious (found on the Ubuntu site of all places).
/dev/block/platform/sdhci-tegra.3/by-name/
lrwxrwxrwx root root 2012-11-20 13:48 SOS -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2012-11-20 13:48 LNX -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2012-11-20 13:48 APP -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2012-11-20 13:48 RDO -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2012-11-20 13:48 CAC -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2012-11-20 13:48 MSC -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2012-11-20 13:48 USP -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2012-11-20 13:48 PER -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2012-11-20 13:48 MDA -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2012-11-20 13:48 UDA -> /dev/block/mmcblk0p10
Seems they just stuck RDO (radio) in the middle at p4 so everything else just shifts down, and up a p#.
Click to expand...
Click to collapse
Having issues decompiling the Boot and Recovery, code suggestions

[Q] Running X Server on the atrix 2

Hi. I saw and interesting blog post where someone was able to run arch linux on a nook color and run X server directly.
thomaspolasek.blogspot.ca/2012/04/arch-linux-lxde-w-xorg-mouse-keyboard_16.html
So I tried to do this with the Atrix 2, and managed to get Arch working fine through chroot but when I try startx there is a problem accessing the virtual terminal and I get this error.
Code:
Fatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
So I checked /dev and found tty, tty00 tty01. Assuming that they were simply named differently by the kernel I symblinked tty0 > tty, but unfortunately I get this error
Code:
Fatal server error:
xf86OpenConsole: Cannot find a free VT: Invalid argument
So I'm wondering if there is there any workaround that will allow X to use the VT? Or is some sort of kernel patch/module required? (wich I don't think would be possible due to the locked bootloader)
Also might it be possible to point X to the VT used by webtop?
bump
usus transformer infinity t700t
Alias.TDP said:
bump
Click to expand...
Click to collapse
When I read the article it seemed like a custom kernel was installed. Stock kernels may not be compiled with VT support, anyhow
my t700t is as follows
ls -l /dev/tty*
[email protected]:/dev# ls tty*
tty tty0 tty1 tty2 ttyFIQ0 ttyHS1 ttyHS2 ttyHS3 ttyHS4 ttyS0 ttyS1 ttyS2 ttyS3
[email protected]:/dev# ls -l tty*
crw-rw-rw- 1 root root 5, 0 May 11 17:58 tty
lrwxrwxrwx 1 root root 3 May 12 14:45 tty0 -> tty
lrwxrwxrwx 1 root root 5 May 12 14:44 tty1 -> ttyS1
lrwxrwxrwx 1 root root 5 May 12 14:44 tty2 -> ttyS2
crw------- 1 root root 254, 0 May 11 17:58 ttyFIQ0
crw-rw-r-- 1 root system 244, 1 May 12 14:26 ttyHS1
crw-rw---- 1 bluetooth bluetooth 244, 2 May 11 17:58 ttyHS2
crw------- 1 root root 244, 3 May 11 17:58 ttyHS3
crw------- 1 root root 244, 4 May 11 17:58 ttyHS4
crw------- 1 root root 4, 64 May 11 17:58 ttyS0
crw------- 1 root root 4, 65 May 11 17:58 ttyS1
crw------- 1 root root 4, 66 May 11 17:58 ttyS2
crw------- 1 root root 4, 67 May 11 17:58 ttyS3
[email protected]:/dev#
I added the -> links myself...
when I run x (using Xorg to start it) it tells me:
Current Operating System: Linux android-fe30b4a8071b23ff 3.1.10-00001-gdc9b6cf #1 SMP PREEMPT Fri Dec 28 19:02:52 CST 2012 armv7l
Kernel command line: tegra_wdt.heartbeat=30 tegraid=30.1.3.0.0 [email protected] commchip_id=0 androidboot.serialno=015d2a508b080209 androidboot.commchip_id=0 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,0 usbcore.old_scheme_first=1 [email protected] [email protected] core_edp_mv=0 audio_codec=wm8903 board_info=245:0:44:de:28 tegraboot=sdmmc gpt gpt_sector=124174335 android.kerneltype=normal androidboot.productid=0x04 androidboot.carrier=wifi-only
Build Date: 11 April 2013 01:10:43PM
so the console is using ttys0 at 155baud
so I'm going to have a look at VT support, though I probably need a custom kernel to get it up and running.
---------- Post added at 04:21 PM ---------- Previous post was at 04:02 PM ----------
here's a list of devices on my t770t as reported by sysfs
[email protected]:/sys# ls -l dev/char/ | grep tty
lrwxrwxrwx 1 root root 0 May 12 15:12 244:1 -> ../../devices/platform/tegra_uart.1/tty/ttyHS1
lrwxrwxrwx 1 root root 0 May 12 15:12 244:2 -> ../../devices/platform/tegra_uart.2/tty/ttyHS2
lrwxrwxrwx 1 root root 0 May 12 15:12 244:3 -> ../../devices/platform/tegra_uart.3/tty/ttyHS3
lrwxrwxrwx 1 root root 0 May 12 15:12 244:4 -> ../../devices/platform/tegra_uart.4/tty/ttyHS4
lrwxrwxrwx 1 root root 0 May 12 15:12 254:0 -> ../../devices/virtual/tty/ttyFIQ0
lrwxrwxrwx 1 root root 0 May 12 15:12 4:64 -> ../../devices/platform/serial8250/tty/ttyS0
lrwxrwxrwx 1 root root 0 May 12 15:12 4:65 -> ../../devices/platform/serial8250/tty/ttyS1
lrwxrwxrwx 1 root root 0 May 12 15:12 4:66 -> ../../devices/platform/serial8250/tty/ttyS2
lrwxrwxrwx 1 root root 0 May 12 15:12 4:67 -> ../../devices/platform/serial8250/tty/ttyS3
lrwxrwxrwx 1 root root 0 May 12 15:12 5:0 -> ../../devices/virtual/tty/tty
lrwxrwxrwx 1 root root 0 May 12 15:12 5:1 -> ../../devices/virtual/tty/console
lrwxrwxrwx 1 root root 0 May 12 15:12 5:2 -> ../../devices/virtual/tty/ptmx
[email protected]
You can start xorg as follows
Xorg vt##
replacing ## with the number of the vt e.g.
Xorg vt0
This gives me a mix of three sperate errors, a file not found if the vt# isn't in /dev/vtt#, and io error if i symlink to a ttys and ad error saying the device doesn't exist if i symink tty0 to tty

problem in boot.img

i have a boot.img with a size of 13mb, when i unpack it , it produce two files the boot.im-kernel and boot.img-ramdisk.cpio.gz,and it became much less in size, together they where 5.3mb and when i repack it using mkbootimg and flash it it wont flash. .
what i do to repack is , on the folder containing the ramdisk and kernel and the mkbootimg ' i typed mkbootimg --kernel "the kernel" --ramdisk "the disk" -o boot.img . .then i got an output boot.img
now when i flash it using fastboot
i type fastboot device.. then it shows my device.. and then i typed fastboot boot 'the boot.img i repack after i unpack'
then its says it been copied and rebooting. .but the device is still in downloading mode. .so i try again typed fastboot boot 'the boot.img' and now it says fastboot waiting for device. .so i think it was disconnected
now again i repack the kernel and ramdisk but with different command
i typed mkbootimg --kernel 'kerne' --ramdisk 'ramdisk' and i include other commands like --base --cmdline then -o boot.img
then i get the results boot.img again the flash it using fastboot
but this time it vibrates and turn off but didnt light up and in computer it mounts different partitions like sd mode
now they say there is a specific procedure of compiling a boot.img base on different boot.img
they also say that when i unpack it the command just discarded the garbage or other files
now my question is if theres any how would i know and where would i find the specific procedure of repacking my boo.imgs
and the missing files i think they were neccessary if there any missing file. how would i get it and how would i know what it is
my devices is running ics , cpu msm825, kernel 3.0..
this is my partition table and i dont understand any of it or which is which
i use abootimg and in boot.cfg this is whats written might be helpful
bootsize = 0xd42000
pagesize = 0x1000
kerneladdr = 0x208000
ramdiskaddr = 0x1508000
secondaddr = 0x1100000
tagsaddr = 0x200100
name =
cmdline = androidboot.hardware=qcom loglevel=1
in adb shell i ran
[email protected]:/ $ su
[email protected]:/ # cat /proc/partitions
major minor #blocks name
179 0 3817472 mmcblk0
179 1 20 mmcblk0p1
179 2 150 mmcblk0p2
179 3 40960 mmcblk0p3
179 4 1 mmcblk0p4
179 5 1000 mmcblk0p5
179 6 2048 mmcblk0p6
179 7 2000 mmcblk0p7
179 8 13576 mmcblk0p8
179 9 3072 mmcblk0p9
179 10 3072 mmcblk0p10
179 11 3072 mmcblk0p11
179 12 466666 mmcblk0p12
179 13 1970176 mmcblk0p13
179 14 10240 mmcblk0p14
179 15 102400 mmcblk0p15
179 16 13576 mmcblk0p16
179 17 20 mmcblk0p17
179 18 1048576 mmcblk0p18
179 19 1000 mmcblk0p19
179 20 111441 mmcblk0p20
179 32 1927168 mmcblk1
179 33 1926144 mmcblk1p1
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,noatime,nodiratime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,noatime,nodiratime 0 0
sysfs /sys sysfs rw,noatime,nodiratime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
debugfs /mnt/debugfs debugfs rw,relatime 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p12 /system ext4 rw,noatime,nodiratime,user_xattr,barrier=0,data=ordered,noauto_da_alloc 0 0
/dev/block/mmcblk0p13 /data ext4 rw,nosuid,nodev,noatime,nodiratime,user_xattr,barrier=0,data=ordered,noauto_da_alloc 0 0
/dev/block/mmcblk0p14 /persist ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p15 /cache ext4 ro,nosuid,nodev,noatime,nodiratime,user_xattr,barrier=0,data=ordered,noauto_da_alloc 0 0
/dev/block/vold/179:18 /mnt/emmc vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1023,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=continue 0 0
/dev/block/vold/179:33 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=continue 0 0
/dev/block/vold/179:33 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=continue 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 170.7M 64.0K 170.7M 4096
/mnt/asec 170.7M 0.0K 170.7M 4096
/mnt/obb 170.7M 0.0K 170.7M 4096
/system 448.5M 375.4M 73.1M 4096
/data 1.8G 181.5M 1.7G 4096
/persist 9.8M 4.0M 5.8M 4096
/cache 98.4M 4.0M 94.4M 4096
/mnt/emmc 1013.6M 658.5M 355.1M 4096
/mnt/sdcard 1.8G 1.8G 9.1M 4096
/mnt/secure/asec 1.8G 1.8G 9.1M 4096
[email protected]:/ # ls -la
drwxr-xr-x root root 2013-12-23 18:04 acct
drwxrwx--x system cache 1970-01-01 08:00 cache
-rwxr-x--- root root 190772 1970-01-01 08:00 charger
dr-x------ root root 2013-12-23 18:04 config
lrwxrwxrwx root root 2013-12-23 18:04 d -> /sys/kernel/debug
drwxrwxr-x system system 2013-12-23 18:04 data
-rw-r--r-- root root 151 1970-01-01 08:00 default.prop
drwxr-xr-x root root 2013-12-23 18:08 dev
lrwxrwxrwx root root 2013-12-23 18:04 emmc -> /mnt/emmc
lrwxrwxrwx root root 2013-12-23 18:04 etc -> /system/etc
-rwxr-x--- root root 182020 1970-01-01 08:00 init
-rwxr-x--- root root 2344 1970-01-01 08:00 init.goldfish.rc
-rwxr-x--- root root 8772 1970-01-01 08:00 init.qcom.class_core.sh
-rwxr-x--- root root 4529 1970-01-01 08:00 init.qcom.class_main.sh
-rwxr-x--- root root 16886 1970-01-01 08:00 init.qcom.rc
-rwxr-x--- root root 4570 1970-01-01 08:00 init.qcom.sh
-rwxr-x--- root root 27316 1970-01-01 08:00 init.qcom.usb.rc
-rwxr-x--- root root 5512 1970-01-01 08:00 init.qcom.usb.sh
-rwxr-x--- root root 24437 1970-01-01 08:00 init.rc
-rwxr-x--- root root 2680 1970-01-01 08:00 init.target.rc
drwxrwxr-x root system 2013-12-23 18:04 mnt
-rwxr-x--- root root 67104 1970-01-01 08:00 nv_set
drwxrwx--x system system 1970-01-01 08:00 persist
dr-xr-xr-x root root 1970-01-01 08:00 proc
drwxr-xr-x root root 1970-01-01 08:00 res
-rwxr-x--- root root 63472 1970-01-01 08:00 rmt_storage_recovery
drwx------ root root 2013-01-22 10:18 root
drwxr-x--- root root 1970-01-01 08:00 sbin
lrwxrwxrwx root root 2013-12-23 18:04 sdcard -> /mnt/sdcard
drwxr-xr-x root root 2013-12-23 18:04 sys
drwxrwxr-x root root 2013-12-22 06:15 system
-rw-r--r-- root root 272 1970-01-01 08:00 ueventd.goldfish.rc
-rw-r--r-- root root 9232 1970-01-01 08:00 ueventd.rc
lrwxrwxrwx root root 2013-12-23 18:04 vendor -> /system/vendor
can anyone help me with this?

[Q] How to extract boot.img from Zopo C7 ( MTK6589T)

First how to find location of boot image in device? I want to take current boot image. Do modifications and later flash that boot image back to device.
I have searched correct block device and did some image files with dd command but they were not boot images. I tried with several tools.
Here is some listing from the phone with adb shell commands.
Code:
[email protected]:/proc # cat partitions
major minor #blocks name
179 0 30512256 mmcblk0
179 1 1 mmcblk0p1
179 2 10240 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 6144 mmcblk0p4
179 5 665600 mmcblk0p5
179 6 129024 mmcblk0p6
179 7 1572864 mmcblk0p7
179 8 28077696 mmcblk0p8
179 64 2048 mmcblk0boot1
179 32 2048 mmcblk0boot0
Code:
[email protected]:/ # ls -l /emm*
lrwxrwxrwx root root 1970-01-01 06:30 [email protected] -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 1970-01-01 06:30 [email protected] -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 1970-01-01 06:30 [email protected] -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 1970-01-01 06:30 [email protected] -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 1970-01-01 06:30 [email protected]_f -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 1970-01-01 06:30 [email protected]_s -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 1970-01-01 06:30 [email protected]_ro -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 1970-01-01 06:30 [email protected] -> /dev/block/mmcblk0p7
[email protected]:/ #
Code:
[email protected]:/dev/block # ls -al
brw------- root root 7, 0 2014-03-12 12:54 loop0
brw------- root root 7, 1 2014-03-12 12:54 loop1
brw------- root root 7, 2 2014-03-12 12:54 loop2
brw------- root root 7, 3 2014-03-12 12:54 loop3
brw------- root root 7, 4 2014-03-12 12:54 loop4
brw------- root root 7, 5 2014-03-12 12:54 loop5
brw------- root root 7, 6 2014-03-12 12:54 loop6
brw------- root root 7, 7 2014-03-12 12:54 loop7
brw-rw---- root system 179, 0 2014-03-12 12:54 mmcblk0
brw------- root root 179, 32 2014-03-12 12:54 mmcblk0boot0
brw------- root root 179, 64 2014-03-12 12:54 mmcblk0boot1
brw------- root root 179, 1 2014-03-12 12:54 mmcblk0p1
brw-r----- root system 179, 2 2014-03-12 12:54 mmcblk0p2
brw------- root root 179, 3 2014-03-12 12:54 mmcblk0p3
brw------- root root 179, 4 2014-03-12 12:54 mmcblk0p4
brw------- root root 179, 5 2014-03-12 12:54 mmcblk0p5
brw------- root root 179, 6 2014-03-12 12:54 mmcblk0p6
brw------- root root 179, 7 2014-03-12 12:54 mmcblk0p7
brw------- root root 179, 8 2014-03-12 12:54 mmcblk0p8
drwxr-xr-x root root 2014-03-12 12:54 platform
[email protected]:/dev/block #
/dev/block/mmcblk0boot0 looked promising but I made image of it by by command dd if=/dev/block/mmcblk0boot0 of=/sdcard/boot.img
But the image was not boot image.
Code:
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
[email protected] /system ext4 ro,noatime,noauto_da_alloc,commit=1,data=ordered 0 0
[email protected] /data ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/[email protected]_f /protect_f ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/[email protected]_s /protect_s ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/[email protected] /storage/sdcard0 vfat rw,dirsync,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
[email protected]:/ #
I can make full image by dding /dev/block/mmcblk0 but it would be better to get the parts separately.
Is there easy way to find where the boot image is located?
I checked block device sizes
/dev/block/mmcblk0p8 is the internal flash area for user, about 28G. Boot image boot loader etc must be in mmcblk0p1 - mmcblk0p7
Size of the block devices
Code:
/dev/block/mmcblk0 31244550144
/dev/block/mmcblk0boot0 2097152
/dev/block/mmcblk0boot1 2097152
/dev/block/mmcblk0p1 1024
/dev/block/mmcblk0p2 10485760
/dev/block/mmcblk0p3 10485760
/dev/block/mmcblk0p4 6291456
/dev/block/mmcblk0p5 681574400
/dev/block/mmcblk0p6 132120576
/dev/block/mmcblk0p7 1610612736
/dev/block/mmcblk0p8 28751560704
/dev/block/mmcblk1 8178892800
I got these with script
Code:
#!/system/bin/sh
command="/sdcard/busybox blockdev --getsize64"
for f in /dev/block/mm*
do
result=`$command $f`
result="$f \t $result"
echo $result
done
Via Terminal Emulator:
"su
cat /proc/partitions"
When again other command: dd if=/dev/block/(boot_partition_which_showed under /proc/partitions) of=/sdcard/boot.img
Root your device and try MtkDroidTools.
Use MTK SP_Flash_tool to flash image back.
In proc partitions there were two boot related devices listed
179 64 2048 mmcblk0boot1
179 32 2048 mmcblk0boot0
I made images from both of those but there was nothing inside the images which looked like boot image.
I found that there is /dev/bootimage
Code:
[email protected]:/ # ls -l /dev/boo*
crw-r----- root system 234, 10 2013-01-01 06:30 bootimg
I made image from that. The image is 4.3G. Very large. Anyway I found bootimage inside that. Then I made another smaller one with
Code:
# dd if=/dev/bootimg of=/sdcard/testboot.img count=12000
I can unpack that image in linux with tool unpack-MT65xx.pl. I tried to repack the exact same files without modifying. But repacking the image with repack-MT65.pl generates file which is different.
cnexpat said:
Is there easy way to find where the boot image is located?
Click to expand...
Click to collapse
Looking for same

[Completed] [Q] Need help finding recovery partition

I've got a fancy new Asus K01A and as far as I can tell, I'm the first to try to root it on xda, or at least the first to try to make CWM for it. When you're making CWM, it's rather important to know exactly where the recovery partitition is, in case I need to flash something from fastboot to correct something stupid it did. Problem is, I can't seem to find a partition for recovery, here's a bunch of partition information I gathered:
/proc/partitions
major minor #blocks name
179 0 15392768 mmcblk0
179 1 48128 mmcblk0p1
179 2 8192 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 21504 mmcblk0p4
179 5 1024 mmcblk0p5
179 6 21504 mmcblk0p6
179 7 32768 mmcblk0p7
179 8 428032 mmcblk0p8
179 9 1187840 mmcblk0p9
259 0 13633519 mmcblk0p10
179 40 4096 mmcblk0rpmb
179 30 8192 mmcblk0gp0
179 20 4096 mmcblk0boot1
179 10 4096 mmcblk0boot0
179 50 3872256 mmcblk1
179 51 3870720 mmcblk1p1
"$ mount" results
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
tmpfs /mnt/media_rw tmpfs rw,seclabel,relatime,mode=700,uid=1023,gid=1023 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,mode=751,gid=1028 0 0
tmpfs /Removable tmpfs rw,seclabel,relatime,mode=751,gid=1028 0 0
tmpfs /mnt/secure tmpfs rw,seclabel,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/intel/by-label/system /system ext4 ro,seclabel,noatime,data=
ordered 0 0
/dev/block/platform/intel/by-label/factory /factory ext4 ro,seclabel,noatime 0 0
/dev/block/platform/intel/by-label/cache /cache ext4 rw,seclabel,nosuid,nodev,no
atime,data=ordered 0 0
/dev/block/platform/intel/by-label/config /config ext4 rw,seclabel,nosuid,nodev,
noatime,data=ordered 0 0
/dev/block/platform/intel/by-label/firmware /firmware ext4 ro,seclabel,noatime,d
ata=ordered 0 0
/dev/block/platform/intel/by-label/data /data ext4 rw,seclabel,nosuid,nodev,noat
ime,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/intel/by-label/gauge /gauge ext4 rw,seclabel,nosuid,nodev,no
atime 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
/dev/block/mmcblk0p7 /ADF ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
none /sys/kernel/debug debugfs rw,relatime,mode=755 0 0
none /pstore pstore rw,relatime 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_i
d=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:51 /mnt/media_rw/MicroSD vfat rw,dirsync,nosuid,nodev,noexec
,relatime,uid=1023,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=437,
iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:51 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1023,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=437,iocha
rset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/MicroSD fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1
023,default_permissions,allow_other 0 0
/dev/block/platform/intel/by-label contents
lrwxrwxrwx root root 2014-11-28 17:29 ADF -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2014-11-28 17:29 cache -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2014-11-28 17:29 config -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2014-11-28 17:29 data -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2014-11-28 17:29 factory -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2014-11-28 17:29 firmware -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2014-11-28 17:29 gauge -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2014-11-28 17:29 panic -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2014-11-28 17:29 reserved -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2014-11-28 17:29 system -> /dev/block/mmcblk0p9
/dev/block/platform/intel/by-guid contents
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000000 -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000001 -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000002 -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000003 -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000004 -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000005 -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000006 -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000007 -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000008 -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2014-11-28 17:29 80868086-8086-8086-8086-000000000009 -> /dev/block/mmcblk0p10
Parted info for partitions
Model: MMC 016GE2 (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 49.3MB 49.3MB reserved boot
2 49.3MB 57.7MB 8389kB panic boot
3 57.7MB 59.8MB 2097kB ext2 factory
4 59.8MB 81.8MB 22.0MB ext4 config
5 81.8MB 82.9MB 1049kB ext2 gauge
6 82.9MB 105MB 22.0MB ext4 firmware
7 105MB 138MB 33.6MB ext4 ADF
8 138MB 577MB 438MB ext4 cache
9 577MB 1793MB 1216MB ext4 system
10 1793MB 15.8GB 14.0GB ext4 data
I'm wondering if somehow there is a specific file or if the recovery is somehow integrated into the bootloader. If so, my hopes are dashed :crying:
Hi,
I would ask if anyone knows anything here,
> Android Development and Hacking > Android Q&A, Help & Troubleshooting
Good luck!

Categories

Resources