[Q]How is Kernel Extracted? - Samsung Galaxy R i9103

@Devs: Plz answer this.
We know that the ROM is installed to the /system partition. Likewise the kernel ie boot.img is installed to the /boot partition of the device. I tried hard but could not find any reference to such a /boot partition(directory) in the root of the device. I would like know whether it is hidden or disguised as something else. The script that flashes the custom kernels has the following line
Code:
package_extract_file("boot.img", "/dev/block/mmcblk0p9");
(What is the block code for system and other partitions?)
Is mmcblk0p9 the /boot partition? Moreover /dev/block has no reference to boot or mmcblk0p9. So where exactly is the kernel being extracted? The boot.img comes packaged as zImage + ramdisk, if i'm not wrong. It would be really helpful if someone could explain how this extraction process is done. In other words where are zImage and ramdisk extracted to, in the root file system and in what form? Is the ramdisk responsible for the creation of the root files system(/dev, /proc, /data. /system, /sys, /sbin etc)?

Total 11 Partition are available and these are the partition i know and all the system related file will be extracted to this mmcblk0p2 partition, which we will be using in our day to day life...
Code:
mmcblk0p2 "system"
mmcblk0p3 "cache"
mmcblk0p6 "userdata"
mmcblk0p8 "recovery"
mmcblk0p9 "boot"
These are also available but i don't know exactly where they are used i guess like EFS etc etc.......
Code:
mmcblk0p1, mmcblk0p4, mmcblk0p5, mmcblk0p7, mmcblk0p10 & mmcblk0p11

Thnx MJ!:good:
So does this mean that in the updater-script, I can use /dev/block/mmcblk0p2 instead of /system? Will the end-result be the same?
Also AFAIK,
Code:
mmcblk0p2 "system" ===> /system |
mmcblk0p3 "cache" ===> /cache |
mmcblk0p6 "userdata" ===> /data |===> In the Root FS
mmcblk0p8 "recovery" ===> /res |
mmcblk0p9 "boot" ===> ? |

You can go through the linux file systems, and the ramdisk extracted in the root which contains the all *.rc files
Hope Adam or any linux specialist can explain it more...

The-Droidster said:
Thnx MJ!:good:
So does this mean that in the updater-script, I can use /dev/block/mmcblk0p2 instead of /system? Will the end-result be the same?
Click to expand...
Click to collapse
Yes buddy this is same .....
The-Droidster said:
Also AFAIK,
Code:
mmcblk0p2 "system" ===> /system |
mmcblk0p3 "cache" ===> /cache |
mmcblk0p6 "userdata" ===> /data |===> In the Root FS
mmcblk0p8 "recovery" ===> /res |
mmcblk0p9 "boot" ===> ? |
Click to expand...
Click to collapse
No idea may be experts can answer this question ....

The boot image is on a separate partition the device of which is '/dev/block/mmcblk0p9'. If you try, you see that you cannot change directory to that file, because it is not a folder, but a block device. It is like a link to the corresponding partition, like '/dev/sda', '/dev/sdb', etc. You have to mount these devices first. You have to use the 'mount' command. However, not all partitions are mountable. The only partitions being able for mount are those with a proper filesystem on them. There are partitions which are not formatted and filesystems are not created, these store data in a more generic form directly on the blocks.
You can find a list of our partitions here (Created by Epsy, thanks to him!).
The boot image partition for our device is '/dev/block/mmcblk0p9'. The update-binary writes the image directly to the flash memory. It's like you executed:
Code:
dd if=/path/to/boot.img of=/dev/block/mmcblk0p9
Regarding the extraction process: You can find detailed information of boot image structure here. After a successful low-level bootup process, the bootloader loads the boot image partition, loads the kernel, the ramdisk and the kernel command line into the memory, then passes memory address of the ramdisk and command line to the kernel's main method, thereby calling it and letting the execution begin.
You can see contents of a ramdisk here (Modified and uploaded by UnknownzD, thanks to him!). This is the ramdisk of the stock ICS rom, probably XXLQ7. The main directories are created upon init process as you can see in 'init.rc'. Sometimes the folders are already created (e.g. in ardatdat's kernel).
The-Droidster said:
Thnx MJ!:good:
So does this mean that in the updater-script, I can use /dev/block/mmcblk0p2 instead of /system? Will the end-result be the same?
Also AFAIK,
Code:
mmcblk0p2 "system" ===> /system |
mmcblk0p3 "cache" ===> /cache |
mmcblk0p6 "userdata" ===> /data |===> In the Root FS
mmcblk0p8 "recovery" ===> /res |
mmcblk0p9 "boot" ===> ? |
Click to expand...
Click to collapse
You cannot use '/dev/block/mmcblk0p2' instead of '/system', because you want to extract more files into it's filesystem. When you do the same with boot.img, it works because you extract it to the flash memory directly then.
'mmcblk0p5', 'mmcblk0p7', 'mmcblk0p8', 'mmcblk0p9' and 'mmcblk0p10' cannot be mounted in our case and thus cannot be linked to a specific directory. They don't have a filesystem on them.

Very lucid explanation. I was waiting for this. It's really surprising that despite the popularity of Android, there's dearth of such Android specific documentation. There's a lot of linux documentation but there's no straight Android analogy present in any of the material I found online. Thanx Adam!:good:

I think it is all device specific... So there can't be a generic document for it... But we have our master Adam who can explain us better...
Sent from my GT-I9103 using xda app-developers app

FearTheBeard said:
Exuseme, can anyone please tell me are these mmcblk0p2 "system", mmcblk0p3 "cache", mmcblk0p6 "userdata", mmcblk0p8 "recovery", mmcblk0p9 "boot" are all the same for all devices?
Click to expand...
Click to collapse
Nope, they aren't in most cases. Similar devices may have the same though.

Related

[Solved] mmcblk* partitions

Where can I get a complete list of what each partition is? There's a list for the HTC Amaze at http://forum.xda-developers.com/showthread.php?t=1545911 but that list isn't correct for the Desire S.
I've worked out the following, but would like a complete list:
mmcblk0p17 misc_version
mmcblk0p18 hboot
mmcblk0p22 boot
mmcblk0p25 system
mmcblk0p26 data
mmcblk0p27 cache
mmcblk0p28 devlog
The command “cat /proc/partitions" lists all partitions, but not their name/function.
Sent from my Desire S
you can try to use command “cat /proc/emmc”
Here are my findings if you stil need the info:
Code:
mmcblk0p1 qcsbl_cfg part of radio.img
mmcblk0p2 qcsbl <empty>
mmcblk0p3 osbl part of radio.img
mmcblk0p4 extended part of radio.img elf-header of rex/amss
--------- --------- -------
mmcblk0p5 modem part of radio.img
mmcblk0p6 adsp part of radio.img
mmcblk0p7 htc rcdata.img Radio settings (IMEI,CID,S-OFF)
mmcblk0p8 rf_nv <empty>
mmcblk0p9 nv_mfg <empty>
mmcblk0p10 cdma_user_data <empty>
mmcblk0p11 rf_delta <empty>
mmcblk0p12 reserved <empty>
mmcblk0p13 modem_fs1
mmcblk0p14 modem_fs2
mmcblk0p15 htc_data <empty>
mmcblk0p16 htc_reserved <empty>
mmcblk0p17 misc device info
mmcblk0p18 appsbl hboot
mmcblk0p19 splash1
mmcblk0p20 wifi WiFi module
mmcblk0p21 recovery
mmcblk0p22 boot kernel & ramdisk
mmcblk0p23 mfg device config ?, contains WiFi MAC-address and Serial number
mmcblk0p24 splash2 <empty>
mmcblk0p25 system
mmcblk0p26 data userdata
mmcblk0p27 cache
mmcblk0p28 devlog
This is 0.98.x partition layout, on 2.00.x it has more partitions, but I believe that the first 27 are the same
Brilliant! Thanks.
Would you mind sharing how you found out all of this?
Sent from my HTC Desire S
How can you get this info? I need it ,Thanks.
BillGoss said:
Brilliant! Thanks.
Would you mind sharing how you found out all of this?
Sent from my HTC Desire S
Click to expand...
Click to collapse
A lot of searching through the Net, dumping partitions, hex analyzing, comparing to rom.zip images...
EDIT: some of the names are pure guess, such as mfg, but the content is 100 % verified. The names can be verified checking the hboot string if somebody is interested...
Thanks!
Sent from my Desire S
Need this for gt-i8150
amidabuddha said:
A lot of searching through the Net, dumping partitions, hex analyzing, comparing to rom.zip images...
EDIT: some of the names are pure guess, such as mfg, but the content is 100 % verified. The names can be verified checking the hboot string if somebody is interested...
Click to expand...
Click to collapse
Hey, I really need this for my model of phone (try to get a network unlock code from phone), but I'm really noob at hacking at using linux. What command would allow me to check the 'hboot' string of a given mmcblkXpXX file?
Thanks heaps,
Foxy
GrayedFox said:
Hey, I really need this for my model of phone (try to get a network unlock code from phone), but I'm really noob at hacking at using linux. What command would allow me to check the 'hboot' string of a given mmcblkXpXX file?
Thanks heaps,
Foxy
Click to expand...
Click to collapse
You have to dump the partition to the SD card via the dd command (you can use terminal emulator on your device) then copy the image to PC, open it with some HEX editor and look through the file
Sent from my HTC Desire S using Tapatalk
DD onto Mac
amidabuddha said:
You have to dump the partition to the SD card via the dd command (you can use terminal emulator on your device) then copy the image to PC, open it with some HEX editor and look through the file
Click to expand...
Click to collapse
Thanks. I've been using the strings command and piping to egrep for binary files, pulling only lines that have at least one 8 digit number present.I don't have very large SD cards on my phone - is there any way I could data dump directly to my mac, or alternatively (this would be much faster too) get my mac to do the work? Like... somehow open a terminal on the mac that had super user and root access to the phone?
Again, sorry for being a noob. I've been googling the above problem :S
EDIT: never mind. Downloading ADK now and will use ADB... pretty sure that will do it.

TF700T complete flash layout

I spent some time in analyzing of flash layout. The comprehensive description below attempts to map each byte of the flash and describes way to extract it.
I would be glad if somebody could provide more detailed info about bootloader, signatures, DRM etc.
Patches are welcome.
Code:
mmcblk0 layout
All dumps were done on Asus Eee Pad Transformer Infinity TF700T, 64GB version, firmware 9.4.5.26, locked
mmcblk0 off-partition section
Offset: 0 (0x0)
Size: 38273024 (0x2480000)
Read command: busybox dd if=/dev/block/mmcblk0 of=/mnt/sdcard/mmcblk0pre1.img bs=524288 count=73
Offset: 0 (0x0)
Size: 3670016 (0x380000)
Contains: Zeroes
Purpose: Unknown
Extract command: dd if=mmcblk0pre1.img of=mmcblk0pre1s1.img bs=3670016 count=1
Process command: tr -d '\0' <mmcblk0pre1s1.img >mmcblk0pre1s1nz.img # mmcblk0pre1s1nz.img must be empty file
Offset: 3670016 (0x380000)
Contains: Recovery kernel image followed by zeroes
Size: 8388608 (0x800000)
Extract command: dd if=mmcblk0pre1.img of=mmcblk0pre1s2.img bs=524288 skip=7 count=16
Process commands:
perl split_bootimg.pl mmcblk0pre1s2.img
mkdir mmcblk0pre1s2.img-ramdisk
cd mmcblk0pre1s2.img-ramdisk
zcat ../mmcblk0pre1s2.img-ramdisk.gz | cpio -i
cd ..
# end Process commands
Offset: 12058624 (0xb80000)
Contains: Regular boot kernel image followed by zeroes
Size: 8388608 (0x800000)
Extract command: dd if=mmcblk0pre1.img of=mmcblk0pre1s3.img bs=524288 skip=23 count=16
Process commands:
perl split_bootimg.pl mmcblk0pre1s3.img
mkdir mmcblk0pre1s3.img-ramdisk
cd mmcblk0pre1s3.img-ramdisk
zcat ../mmcblk0pre1s3.img-ramdisk.gz | cpio -i
cd ..
# end Process commands
Offset: 20447232 (0x1380000)
Contains: Block of 16 bytes followed by 0x2de0 hexadecimal numbers followed by FF
Size: 12288 (0x3000)
Extract command: dd if=mmcblk0pre1.img of=mmcblk0pre1s4.img bs=524288 skip=39
Vital data:
Extract command: dd if=mmcblk0pre1s4.img of=mmcblk0pre1s4ss2.img bs=4096 skip=3
Binary part of vital data:
Extract command: dd if=mmcblk0pre1s4ss1.img of=mmcblk0pre1s4ss1ch1.img bs=16 count=1
Hexadecimal part of vital data:
Extract command: dd if=mmcblk0pre1s4ss1.img of=mmcblk0pre1s4ss1ch2.img bs=16 count=734 skip=1
Process command: unhex <mmcblk0pre1s4ss1ch2.img >mmcblk0pre1s4ss1ch2bin.img
FF part of vital data:
Extract command: dd if=mmcblk0pre1s4ss1.img of=mmcblk0pre1s4ss1ch3.img bs=16 skip=735
Process command: tr -d '\377' <mmcblk0pre1s4ss1ch3.img >mmcblk0pre1s4ss1ch3nff.img # mmcblk0pre1s4ss1ch3nff.img must be empty file
Zeroes:
Extract command: dd if=mmcblk0pre1s4.img of=mmcblk0pre1s4ss1.img bs=4096 count=3
Process command: tr -d '\0' <mmcblk0pre1s4ss2.img >mmcblk0pre1s4ss2nz.img # mmcblk0pre1s4ss2nz.img must be empty file
Purpose: Probably encrypted bootloader
mmcblk0p1
Offset: 38273024 (0x2480000)
Size: 805306368 (0x30000000)
File system size: 196608 * 4096 = 805306368 (fully occupies partition)
Format: Linux ext4 filesystem
Mounted at: /system
Mount options: read only, extended attributes, ACL
Permissions: only root can manipulate
Contains: Base system and embedded applications
Purpose: Base system
mmcblk0p2
Offset: 843579392 (0x32480000)
Size: 448790528 (0x1ac00000)
File system size: 109568 * 4096 = 448790528 (fully occupies partition)
Format: Linux ext4 filesystem
Mounted at: /cache
Mount options: read/write, no SUID, no device nodes, no atime
Permissions: only root can manipulate, UID system and GID cache can read and write
Contains: Cache
Purpose: Application cache
Note: The volume has the same UUID as mmcblk0p1
mmcblk0p3
Offset: 1292369920 (0x4d080000)
Size: 2097152 (0x200000)
File system size: 512 * 4096 = 2097152 (fully occupies partition)
Linux rev 1.0 ext3 filesystem
Not mounted
Permissions: GID system can manipulate
Contains: Empty file system
Purpose: Recovery /misc
Referenced by: /system/lib/libandroid_runtime.so recovery ramdisk: /etc/recovery.fstab
Note: File system is referenced in recovery as emmc, not ext3!
mmcblk0p4
Offset: 1294467072 (0x4d280000)
Size: 855638016 (0x33000000)
File system size: 208896 * 4096 = 855638016
Linux rev 1.0 ext3 filesystem
Not mounted
Permissions: GID system can manipulate
Contains: Empty file system
Purpose: Recovery /staging
Referenced by: recovery ramdisk: init.rc /etc/recovery.fstab
mmcblk0p5
Offset: 2150105088 (0x80280000)
Size: 5242880 (0x500000)
File system size: 5092 * 1024 = 5147488
Format: FAT32 file system, no partition table, MS-DOS "Non-system disk" boot block
Not mounted
Permissions: only root can manipulate
Contains: File system with files:
Serial numbers (ISN, PPID, SSN, UUID)
Calibration data (AL3010 light sensor, AMI304 magnetic sensor, KXTF9 motion sensor)
Purpose: Device specific unique system data, mounted as /btmac during Android boot
Referenced by: /system/bin/wifimacwriter /system/bin/brcm_patchram_plus /system/bin/sensors-config /system/bin/sixpair ramdisk: /init recovery ramdisk: /etc/recovery.fstab /init
mmcblk0p5 off file-system area
Offset in section: 5147488 (0x4e8b60)
Size: 28672 (0x7000)
Read command: busybox dd if=/dev/block/mmcblk0p5 of=/mnt/sdcard/mmcblk0p5s2.img bs=1024 skip=5092
Process command: tr -d '\0' <mmcblk0p5s2.img >mmcblk0p5s2nz.img # mmcblk0p5s2nz.img must be empty file
mmcblk0p6
Offset: 2155347968 (0x80780000)
Size: 524288 (0x80000)
Format: binary data
Permissions: UID drm can manipulate
Contains: 208 bytes of binary data, the rest are zeroes
Purpose: DRM, probably contains encrypted DRM key
Referenced by: /system/bin/wvdrmserver /system/vendor/lib/drm/libdrmwvmplugin.so
mmcblk0p7
Offset: 2155872256 (0x80800000)
Size: 5242880 (0x500000)
Format: empty
Contains: Zeroes
Purpose: Unknown
mmcblk0p8
Offset: 2161115136 (0x80d00000)
Size: 61415620608 (0xe4ca80000)
File system size: 14994040 * 4096 = 61415587840
Format: Linux ext4 filesystem
Mounted at: /data
Mount options: read/write, no SUID, no device nodes, no atime
Permissions: only root can manipulate, read and write are directory specific
Contains: User applications, user data, and virtual internal SD card
Note: /data/media is mounted via UID/GID stripping FUSE as /mnt/sdcard
mmcblk0p8 off file-system area
Offset in section: 61415587840 (0xe4ca78000)
Size: 32768 (0x8000)
Read command: busybox dd if=/dev/block/mmcblk0p8 of=/mnt/sdcard/mmcblk0p8s2.img bs=4096 skip=14994040
mmcblk0 off-partition section
Offset: 63576735744 (0xecd780000)
Size: 524288 (0x80000)
Read command: busybox dd if=/dev/block/mmcblk0 of=/mnt/sdcard/mmcblk0post8.img bs=524288 skip=121263
Process command: tr -d '\0' <mmcblk0p8s2.img >mmcblk0p8s2nz.img # mmcblk0p8s2nz.img must be empty file
Offset: 63576735744 (0xecd780000)
Offset in section: 0 (0x0)
Size: 507392 (0x7be00)
Contains: Zeroes
Purpose: Unknown
Extract command: dd if=mmcblk0post8.img of=mmcblk0post8s1.img bs=507392 count=1
Process command: tr -d '\0' <mmcblk0post8s1.img >mmcblk0post8s1nz.img # mmcblk0post8s1nz.img must be empty file
Offset: 63577243136 (0xecd7fbe00)
Offset in section: 507392 (0x7be00)
Size: 16896 (0x4200)
Contains: EFI Partition table (partition names: APP, CAC, MSC, USP, PER, YTU, CRA, UDA)
Extract command: dd if=mmcblk0post8.img of=mmcblk0post8s2.img bs=512 skip=991
Purpose: Partition table
Total size of mmcblk0: 63577260032 (0xecd800000)
Notes:
can manipulate = can read, write partition vital data, only root can mount
can read, write = can read, write partition file system contents
Read commands are ran on the Transformer
Extract and process commands are run anywhere, with pre-read image file in the current directory.
You need dd with large files support. Vanilla dd on TF700T does not support large files. Busybox dd does.
Dropbox link to Asus_Transformer_Infinity_TF700T/flash_layout.txt
Wow, thanks for this detailed analysis - much more detailed than mine.
So what can I add to your research?
Tegra-based systems have another partition table, which has a proprietary layout and an unknown purpose (maybe just important for NVFlash and for flashing blobs?). Looking at the flash.cfg in the NVFlash package from AndroidRoot.mobi, we can get the Tegra partition layout and partition names:
Partition number 1 is missing in the list, maybe it contains the extremely well-hidden APX mode recovery code or even the answer to life, the universe and everything.
The following 3 partitions are located at the beginning of mmcblk0 and their contents are apparently encrypted with a device-specific key. For some reason, with ICS-based ROMs it reads as all zeros; in JB-based ROMs additional mmcblk0boot0 and mmcblk0boot1 partitions appear which together cover this area. The "bricksafe.img" in the nvflash guide covers these 3 partitions.
2 BCT: Tegra Boot Configuration Table - 3145728 bytes
3 PT: Tegra Partition Table - 524288 bytes
4 EBT: Bootloader - 8388608 bytes
You already know the following 2:
5 SOS: Recovery kernel - 8388608 bytes
6 LNX: Linux kernel - 8388608 bytes
Then some more funny ones:
7 CER: I think this stands for "Certificate" and contains the bootloader unlock token. - 8388608 bytes. If I calculated correctly, this is at 0x1380000 into mmcblk0. Saved as "unlock-token.img" in the nvflash guide.
8 IMG: no idea what this is for - 8388608 bytes
9 GP1: space for a GPT partition table, maybe unused - 1048576 bytes
Now the regular partitions follow (p1 to p8):
10 APP: p1 = /system (Android OS)
11 CAC: p2 = /cache (for communication between Android and recovery)
12 MSC: p3 ="misc", whatever that is. On the TF101 it was used for bootloader commands.
13 USP: p4 = The update staging partition. Update blobs are copied here and flashed to the correct partition by the bootloader.
14 PER: p5 = device-specific config in a FAT filesystem
15 YTU: p6 = Apparently the DRM key. Confirmed to be overwritten with 0 by the unlocking process.
16 CRA: p7 = unknown (reserved for crash dumps?)
17 UDA: p8 = /data (Android user data)
And finally:
18 GPT: the EFI partition table that is actually used by the kernel
Well, it seems, that something (ICS stock kernel, hardware) hides contents of the first (at most) 0x380000 bytes of flash.
I am locked, and I have some token at 0x1380000 as well.
I am still thinking about a way to unlock, keep access to nvflash, and upgrade to JB keeping DRM working, even at cost of using stock system. That is why I wanted to backup and analyze everything and find all keys and signatures.
It would be also nice to know, whether there are areas of flash with hardware or kernel write lock.
utx said:
Well, it seems, that something (ICS stock kernel, hardware) hides contents of the first (at most) 0x380000 bytes of flash.
I am locked, and I have some token at 0x1380000 as well.
Click to expand...
Click to collapse
Yes, before unlocking I had something very similar to you there - a 16 byte header followed by some hexdump. I don't know what it was. It was overwritten by the unlock process with a 4 byte data block prefixed with a "-SIGNED-BY-SIGNBLOB-" header and followed by 256 bytes of what looks like a digital signature, very similar to the signed update blobs.
utx said:
I am still thinking about a way to unlock, keep access to nvflash, and upgrade to JB keeping DRM working, even at cost of using stock system. That is why I wanted to backup and analyze everything and find all keys and signatures.
Click to expand...
Click to collapse
Definitely back up the YTU partition before unlocking (p6) and then make the nvflash backups - but maybe the key must match something that is broken by the unlocking process, or it is renewed periodically, etc., so it might not help. Maybe try using DRM before unlocking and watch if the content of the partition changes over time.
utx said:
It would be also nice to know, whether there are areas of flash with hardware or kernel write lock.
Click to expand...
Click to collapse
Never tried to write directly to the block device - too scared to break something.
---------- Post added at 09:32 PM ---------- Previous post was at 09:28 PM ----------
Another small addition:
Note: /data/media is mounted via UID/GID stripping FUSE as /mnt/sdcard
Click to expand...
Click to collapse
This FUSE trick also makes /mnt/sdcard case-insensitive.
I just thought of something. What if you launched a data recovery process and recovered the DRM keys for the device?
ostar2 said:
I just thought of something. What if you launched a data recovery process and recovered the DRM keys for the device?
Click to expand...
Click to collapse
How do you define "data recovery process"? You cannot recover data that has been overwritten.
_that said:
How do you define "data recovery process"? You cannot recover data that has been overwritten.
Click to expand...
Click to collapse
Well, if the DRM partition is write enabled, it may be possible to restore its contents, if you backed it up before unlock (it is probably per-device unique). But it could be insufficient. Locked bootloader can be different than unlocked bootloader, and may drop cipher needed for DRM decihering. It is just a theory. Somebody could proof it or falsify, if:
1) Backed all accessible data before unlock.
2) Unlocked (and to be safe, also made brickproof image).
3) Recovered the data creates in step 1.
Will DRM work then? Or did we need the contents of (currently inaccessible) locked stock data of the first megabytes?
But I see no way, how to back-up first megabytes of locked device (on ICS; JB is not as interesting for us, once you upgrade to JB, you cannot create brickproof image for nvflash).
I even don't know, which part of the subsystem causes these megabytes being reported as zeroes. Is it stock Asus ICS kernel? Is it bootloader? Is it a hardware lock on the flash device?
Good idea, but what I meant by "Data Recovey". Is restoring the deleted data from that filesystem/partition.
ostar2 said:
Good idea, but what I meant by "Data Recovey". Is restoring the deleted data from that filesystem/partition.
Click to expand...
Click to collapse
I see, so I assume you assume you had a backup before.
Somebody (maybe you?) could try roughly the following sequence:
- get new TF700
- update to 9.4.5.26. if it's already newer, forget nvflash, but the rest could still work.
- root it using debugfs
- make a backup of /dev/block/mmcblk0p6
- do some DRM-dependent stuff and check that it works
- after some days, make another backup of /dev/block/mmcblk0p6 and compare if anything has changed. If the key is static, maybe restoring after unlocking could work. If not, chances are high that it doesn't work.
- unlock (this erases mmcblk06 and voids warranty)
- optional, but very useful: install AndroidRoot hacked bootloader to make blobs for nvflash, then use nvflash to backup all partitions
- restore backup of /dev/block/mmcblk0p6
- try if DRM still works
_that said:
I see, so I assume you assume you had a backup before.
Somebody (maybe you?) could try roughly the following sequence:
- get new TF700
- update to 9.4.5.26. if it's already newer, forget nvflash, but the rest could still work.
- root it using debugfs
- make a backup of /dev/block/mmcblk0p6
- optional, but very useful: install AndroidRoot hacked bootloader to make blobs for nvflash, then use nvflash to backup all partitions
- do some DRM-dependent stuff and check that it works
- after some days, make another backup of /dev/block/mmcblk0p6 and compare if anything has changed. If the key is static, maybe restoring after unlocking could work. If not, chances are high that it doesn't work.
- unlock (this erases mmcblk06 and voids warranty)
- restore backup of /dev/block/mmcblk0p6
- try if DRM still works
Click to expand...
Click to collapse
To install AndroidRoot bootloader and by that getting nvflash blobs, you have to unlock first... The order of your steps is therefore wrong.
firetech said:
To install AndroidRoot bootloader and by that getting nvflash blobs, you have to unlock first... The order of your steps is therefore wrong.
Click to expand...
Click to collapse
Oops, thanks for noticing. I edited my post.
what if we were to read from the NAND externally (RAW)....xbox 360 style...wouldn't that be the same as nvflash....
except that the three partitions in question are encrypted with a key that is probably unique per Tegra...
2 BCT: Tegra Boot Configuration Table - 3145728 bytes
3 PT: Tegra Partition Table - 524288 bytes
4 EBT: Bootloader - 8388608 bytes
but I would suppose it wouldn't be a problem since a raw flash would restore everything back to normal...even if we can't read it..the CPU can..and that's all that matters.
---------- Post added at 11:21 AM ---------- Previous post was at 11:13 AM ----------
never mind...its a BGA
_that said:
I see, so I assume you assume you had a backup before.
Somebody (maybe you?) could try roughly the following sequence:
- get new TF700
- update to 9.4.5.26. if it's already newer, forget nvflash, but the rest could still work.
- root it using debugfs
- make a backup of /dev/block/mmcblk0p6
- do some DRM-dependent stuff and check that it works
- after some days, make another backup of /dev/block/mmcblk0p6 and compare if anything has changed. If the key is static, maybe restoring after unlocking could work. If not, chances are high that it doesn't work.
- unlock (this erases mmcblk06 and voids warranty)
- optional, but very useful: install AndroidRoot hacked bootloader to make blobs for nvflash, then use nvflash to backup all partitions
- restore backup of /dev/block/mmcblk0p6
- try if DRM still works
Click to expand...
Click to collapse
Correct order maybe.
- get new TF700
- update to 9.4.5.26.
- root it using debugfs
- make a backup of /dev/block/*.*
- unlock (this erases mmcblk06 and voids warranty)
- install AndroidRoot hacked bootloader to make blobs for nvflash
- restore backup of /dev/block/mmcblk0p6
- try if DRM still works
Q1:If i backed up 9.4.5.26 all block image.After i updated 9.4.5.30 can i get the nvflash blob from backed up images?No way to dig out the blob key from the backup?
W3ber said:
Q1:If i backed up 9.4.5.26 all block image.After i updated 9.4.5.30 can i get the nvflash blob from backed up images?No way to dig out the blob key from the backup?
Click to expand...
Click to collapse
No way - the BCT, bootloader, etc. is not visible to the kernel at all (so it's not included in your images), and I don't know which kind of magic the blob creation tool uses, but I assume it's more than reading stuff from the nand.

[Q] Stuck in splash screen but CAN access recovery

SL 101 with cwm. on ICS.
I have tried over and over and many different ways to figure this out.... here is what's happening.
"power on" is stuck in splash screen and WILL NOT recognize on my PC as a device or in ADB
"power + vol down" grants me recovery mode which WILL recognize.
SD card will not mount to device. (i purchased brand new)
Cannot seem to push any files to internal storage... this is what my CMD looks like.
---------------------------------------
adb devices =
list of devices attached
0123456789abcdef recovery
C:\Users\me\Desktop\Android>adb push C:\Users\me\Desktop\US_epad-user-9.2.1.27.1.zip /sdcard/Download/
---------------------------------------
When I hit enter it does nothing but go to the space below and won't let me type anything.
I have tried PERI which didn't work because when it starts rebooting my device it just boots to the splash screen where it won't recognize on my PC
PLEASE any help I'm ripping my hair out here!
I have got the same problem, which is mentioned here: http://forum.xda-developers.com/showthread.php?t=2244728
Now I am trying to discover which of the mounting points are internal sdcard and data, so I would be able to format them and I hope that this will fix my problem.
You are also unlucky because Slider and TF101G versions of the tablet doesn't support NVflash: http://forum.xda-developers.com/showthread.php?t=1688447
They support but ASUS hasn't provided developers with the keys: http://androidroot.mobi/technical/tf-secure-boot-key/
Sincerely,
Žiga
ZigaG said:
I have got the same problem, which is mentioned here: http://forum.xda-developers.com/showthread.php?t=2244728
Now I am trying to discover which of the mounting points are internal sdcard and data, so I would be able to format them and I hope that this will fix my problem.
But since you have got the TF101 version (not G or slider) of the tablet, you can try to use NVflash: http://forum.xda-developers.com/showthread.php?t=1688447
Sincerely,
Žiga
Click to expand...
Click to collapse
I do have the slider and would prefer to find help pertaining to that but it seems there are way more guides on the TF101 not SL101
It specifically says you cannot use the NVflash for sl101....
Sorry, I misread it. I fixed my post.
ZigaG said:
I have got the same problem, which is mentioned here: http://forum.xda-developers.com/showthread.php?t=2244728
Now I am trying to discover which of the mounting points are internal sdcard and data, so I would be able to format them and I hope that this will fix my problem.
You are also unlucky because Slider and TF101G versions of the tablet doesn't support NVflash: http://forum.xda-developers.com/showthread.php?t=1688447
They support but ASUS hasn't provided developers with the keys: http://androidroot.mobi/technical/tf-secure-boot-key/
Sincerely,
Žiga
Click to expand...
Click to collapse
So does that mean I'm stuck until something comes out? Or is there an alternative route.
chchas said:
So does that mean I'm stuck until something comes out? Or is there an alternative route.
Click to expand...
Click to collapse
You can check the file /proc/mtd and /proc/mounts and upload it here, so I can see if we are dealing with the same problem. You can try to mount external sdcard.
While in ADB use:
Code:
adb pull /proc/mtd backup/
adb pull /proc/mounts backup/
This will copy this 2 files to folder backup.
Žiga
ZigaG said:
You can check the file /proc/mtd and /proc/mounts and upload it here, so I can see if we are dealing with the same problem. You can try to mount external sdcard.
While in ADB use:
Code:
adb pull /proc/mtd backup/
adb pull /proc/mounts backup/
This will copy this 2 files to folder backup.
Žiga
Click to expand...
Click to collapse
remote object '/proc/mtd' does not exist
remote object '/proc/mounts' not a file or directory
chchas said:
remote object '/proc/mtd' does not exist
remote object '/proc/mounts' not a file or directory
Click to expand...
Click to collapse
Strange!? What is outputted if you write:
Code:
adb shell ls
ZigaG said:
Strange!? What is outputted if you write:
Code:
adb shell ls
Click to expand...
Click to collapse
cache ---- init.rc ---- sys
data ---- proc ---- system
default.prop ---- res ---- tmp
dev ---- root --- ueventd.goldfish.rc
etc --- sbin --- ueventd.rc
fstab.ventana --- sdcard--- ueventd.ventana.rc
init --- staging---
chchas said:
cache ---- init.rc ---- sys
data ---- proc ---- system
default.prop ---- res ---- tmp
dev ---- root --- ueventd.goldfish.rc
etc --- sbin --- ueventd.rc
fstab.ventana --- sdcard--- ueventd.ventana.rc
init --- staging---
Click to expand...
Click to collapse
OK, do you have busybox installed?
Can you post files: (-> adb pull... or you can insert external SDCARD and copy the files on it)
- /etc/fstab? -> here is written which partition is mounted as sdcard, system, data...
- /proc/partitions -> here are listed all the partitions that you have on the tablet.
Sincerely,
Žiga
ZigaG said:
OK, do you have busybox installed?
Can you post files: (-> adb pull... or you can insert external SDCARD and copy the files there)
- /etc/fstab? -> here is writted which partition is mounted as sdcard, system, data...
- /proc/partitions -> here are listed all the partitions that you have on tablet
Sincerely,
Žiga
Click to expand...
Click to collapse
I do not have busy box. and cannot install any new apps on tablet as far as I know... unless downloading on my computer will send it to my tablet? still wouldn't be able to open anything.
I'm a little confused about
Can you post files: (-> adb pull... or you can insert external SDCARD and copy the files there)
-/etc/fstab -> here is writted which partition is mounted as sdcard, system, data...
- /proc/partitions -> here are listed all the partitions that you have on tablet
should i write in cmd adb pull /etc/fstab/ ?
Sorry I feel like i need someone to hold my hand while i do this. I am so frustrated with the millions of different ways I've tried but it seems I have a very unique problem that doesn't have many helps vids/threads out there.
chchas said:
I do not have busy box. and cannot install any new apps on tablet as far as I know... unless downloading on my computer will send it to my tablet? still wouldn't be able to open anything.
I'm a little confused about
Can you post files: (-> adb pull... or you can insert external SDCARD and copy the files there)
-/etc/fstab -> here is writted which partition is mounted as sdcard, system, data...
- /proc/partitions -> here are listed all the partitions that you have on tablet
should i write in cmd adb pull /etc/fstab/ ?
Sorry
Click to expand...
Click to collapse
You can try, but without / at the end of fstab since fstab is not directory but file.
Code:
PULL usage: adb pull "file on tablet" "copy to remote machine"
adb pull /etc/fstab backup/fstab
adb pull /proc/partitions backup/partitions
If this doesn't work, you can insert micro SD in tablet and use adb shell to write linux commands.
Sincerely,
Žiga
ZigaG said:
You can try, but without / at the end of fstab since fstab is not directory but file.
Code:
PULL usage: adb pull "file on tablet" "copy to remote machine"
adb pull /etc/fstab backup/fstab
adb pull /proc/partitions backup/partitions
If this doesn't work, you can insert micro SD in tablet and use adb shell to write linux commands.
Sincerely,
Žiga
Click to expand...
Click to collapse
fstab gave me
17 kb/s <108 bytes in 0.006s>
proc/partitions
60 kb/s <374 bytes in 0.006s>
not sure where i'll need to go to figure out which linux commands would need to be done...
chchas said:
fstab gave me
17 kb/s <108 bytes in 0.006s>
proc/partitions
60 kb/s <374 bytes in 0.006s>
not sure where i'll need to go to figure out which linux commands would need to be done...
Click to expand...
Click to collapse
OK, I see. This is only time needed for transfer.
Go to your folder, where you have got adb.exe (you can search with windows). There is created new folder backup, where you can find fstab and partitions. Upload the files or open them with notepad++ or regular notepad and paste the content of files here (it is the best to use #-tag in the editor of the post so the code is easier to read.)
Sincerely,
Žiga
ZigaG said:
OK, I see. This is only time needed for transfer.
Go to your folder, where you have got adb.exe (you can search with windows). There is created new folder backup, where you can find fstab and partitions. Upload the files or open them with notepad++ or regular notepad and paste the content of files here (it is the best to use #-tag in the editor of the post so the code is easier to read.)
Sincerely,
Žiga
Click to expand...
Click to collapse
fstab -
#-tag /dev/block/mmcblk0p2 /cache ext4 rw
/dev/block/mmcblk0p7 /data ext4 rw
/dev/block/mmcblk0p1 /system ext4 rw
partitions
#-tag major minor #blocks name
179 0 15097856 mmcblk0
179 1 524288 mmcblk0p1
179 2 542208 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 542208 mmcblk0p4
179 5 5120 mmcblk0p5
179 6 512 mmcblk0p6
179 7 13457920 mmcblk0p7
179 8 15558144 mmcblk1
179 9 15554048 mmcblk1p1
chchas said:
fstab -
#-tag /dev/block/mmcblk0p2 /cache ext4 rw
/dev/block/mmcblk0p7 /data ext4 rw
/dev/block/mmcblk0p1 /system ext4 rw
partitions
#-tag major minor #blocks name
179 0 15097856 mmcblk0
179 1 524288 mmcblk0p1
179 2 542208 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 542208 mmcblk0p4
179 5 5120 mmcblk0p5
179 6 512 mmcblk0p6
179 7 13457920 mmcblk0p7
179 8 15558144 mmcblk1
179 9 15554048 mmcblk1p1
Click to expand...
Click to collapse
OK thank you, I will analyse and compare the files with mine and from other TF's. But so far, I discovered, that TF's don't have special partition for data as on other Android devices and this probably causes problem.
For posting code, you can use [ CODE ] You write here code [ /CODE ] - write CODE in brackets without spaces. In post editor there is a sign # for indicating code.
You can try mounting /dev/block/mmcblk0p7 to a folder:
Code:
adb shell
mkdir NEW
mount /dev/block/mmcblk0p7 NEW
It probably won't work and this will indicate, that we are issuing the same problem.
Sincerely,
Žiga
ZigaG said:
OK thank you, I will analyse and compare the files with mine and from other TF's. But so far, I discovered, that TF's don't have special partition for data as on other Android devices and this probably causes problem.
For posting code, you can use [ CODE ] You write here code [ /CODE ] - write CODE in brackets without spaces. In post editor there is a sign # for indicating code.
You can try mounting /dev/block/mmcblk0p7 to a folder:
Code:
adb shell
mkdir NEW
mount /dev/block/mmcblk0p7 NEW
It probably won't work and this will indicate, that we are issuing the same problem.
Sincerely,
Žiga
Click to expand...
Click to collapse
Code:
adb shell mount/dev/block/mmcblk0p7
/sbin/sh: adb not found
chchas said:
Code:
adb shell mount/dev/block/mmcblk0p7
/sbin/sh: adb not found
Click to expand...
Click to collapse
Use commands as I wrote them:
This will connect to your tablet and access tablet's terminal commands
Code:
adb shell
You need to create new folder to which you will mount partition
Code:
mkdir /NEW
Now you only need to mount the partition
Code:
mount /dev/block/mmcblk0p7 /NEW
Did you have external sdcard attached, when you uploaded file partitions?
ZigaG said:
Use commands as I wrote them:
This will connect to your tablet and access tablet's terminal commands
Code:
adb shell
You need to create new folder to which you will mount partition
Code:
mkdir /NEW
Now you only need to mount the partition
Code:
mount /dev/block/mmcblk0p7 /NEW
Did you have external sdcard attached, when you uploaded file partitions?
Click to expand...
Click to collapse
I don't remember partitioning the SD card. I did not have an SD card when I rooted.
I followed the code lines and it only came back as ~ #
chchas try this http://forum.xda-developers.com/showthread.php?t=2244728.
If you have any questions feel free to ask.
Have a nice day,
Žiga

CLOSE, please

All important information/ links will be moved to an INFO thread, since this is a question thread, we do not need it anymore.
Still looking.
Bump, can anyone help?
Saw this page:
forum.xda-developers .com/showthread.php?t=1959445
Was wondering if it's worth a shot.
Kernel released by Huawei.
For kernel/Rom Developers, Huawei has released the kernel for the Huawei Prism II online.
Attached is a notepad document with the links in them, since I am not allowed to post links. I apologize for the inconvenience.
ALSO
For anyone else with a Huawei device that has not released their kernel, I used the email format below:
Emal 1:
I would like the source code for my phone that is available to me. I am an android developer, and it would be useful to me if I have the
source code(that is offerred by Huawei).
The reply you will get:
Dear Customer,
Thank you for contacting Huawei device. The open source is under our technical department to make. Since the procedure is a little more complex, so please kindly be a little patient. We will keep you informed once available.Once again thank you for contacting Huawei device.
Best Regards.
Huawei Device Customer Care Team.
Give them 2-3 days, then E-mail once again! Be persistent!
2nd email:
Any new information about the source code?
The reply I got:
Dear Customer,
Thank you for contacting Huawei device. Please kindly check the source code link for your reference:
(link given above)
Once again thank you for contacting Huawei device.
Best Regards.
Huawei Device Customer Care Team.
Parted/FDisk Output on /dev/block/mmcblk0
streetdev22 said:
Bump, can anyone help?
Saw this page:
forum.xda-developers .com/showthread.php?t=1959445
Was wondering if it's worth a shot.
Click to expand...
Click to collapse
Tried the guide on my Prism II. Parted gave me an error. Possible reason for parted error is explained here: http://forum.xda-developers.com/showthread.php?t=2169709.
However, fdisk worked, but it doesn't clearly identify the partitons:
Edited to include gdisk output
parted:
Code:
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) print
print
print
Error: Unable to satisfy all constraints on the partition.
fdisk:
Code:
[email protected]:/ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 3909 MB, 3909091328 bytes
1 heads, 16 sectors/track, 477184 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 3 20 4d Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 3 41 300 45 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 41 16681 133120 c Win95 FAT32 (LBA)
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 16681 477184 3684031+ 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 16897 18432 12288 6a Unknown
/dev/block/mmcblk0p6 18433 18944 4096 46 Unknown
/dev/block/mmcblk0p7 18945 19456 4096 63 GNU HURD or SysV
/dev/block/mmcblk0p8 19457 19840 3072 58 Unknown
/dev/block/mmcblk0p9 19969 20352 3072 4a Unknown
/dev/block/mmcblk0p10 20481 20864 3072 4b Unknown
/dev/block/mmcblk0p11 20993 21504 4096 47 Unknown
/dev/block/mmcblk0p12 21505 22528 8192 48 Unknown
/dev/block/mmcblk0p13 22529 25088 20480 60 Unknown
/dev/block/mmcblk0p14 25089 25600 4096 6c Unknown
/dev/block/mmcblk0p15 25601 50176 196608 83 Linux
/dev/block/mmcblk0p16 50177 60416 81920 83 Linux
/dev/block/mmcblk0p17 60417 191488 1048576 83 Linux
/dev/block/mmcblk0p18 191489 338944 1179648 83 Linux
/dev/block/mmcblk0p19 338945 477184 1105920 6b Unknown
gdisk:
Code:
[email protected]:/ # gdisk -l /dev/block/mmcblk0
gdisk -l /dev/block/mmcblk0
GPT fdisk (gdisk) version 0.8.4
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
***************************************************************
Exact type match not found for type code 4D00; assigning type code for
'Linux filesystem'
Exact type match not found for type code 4500; assigning type code for
'Linux filesystem'
Exact type match not found for type code 6A00; assigning type code for
'Linux filesystem'
Exact type match not found for type code 4600; assigning type code for
'Linux filesystem'
Exact type match not found for type code 6300; assigning type code for
'Linux filesystem'
Exact type match not found for type code 5800; assigning type code for
'Linux filesystem'
Exact type match not found for type code 4A00; assigning type code for
'Linux filesystem'
Exact type match not found for type code 4B00; assigning type code for
'Linux filesystem'
Exact type match not found for type code 4700; assigning type code for
'Linux filesystem'
Exact type match not found for type code 4800; assigning type code for
'Linux filesystem'
Exact type match not found for type code 6000; assigning type code for
'Linux filesystem'
Exact type match not found for type code 6C00; assigning type code for
'Linux filesystem'
Exact type match not found for type code 6B00; assigning type code for
'Linux filesystem'
Warning! Main partition table overlaps the first partition by 33 blocks!
You will need to delete this partition or resize it in another utility.
Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/block/mmcblk0: 7634944 sectors, 3.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E271C8D6-2001-435D-A466-BEFE7ED158CD
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7634910
Partitions will be aligned on 1-sector boundaries
Total free space is 9599 sectors (4.7 MiB)
Number Start (sector) End (sector) Size Code Name
1 1 40 20.0 KiB 8300 Linux filesystem
2 41 640 300.0 KiB 8300 Linux filesystem
3 641 266880 130.0 MiB 0700 Microsoft basic data
5 270336 294911 12.0 MiB 8300 Linux filesystem
6 294912 303103 4.0 MiB 8300 Linux filesystem
7 303104 311295 4.0 MiB 8300 Linux filesystem
8 311296 317439 3.0 MiB 8300 Linux filesystem
9 319488 325631 3.0 MiB 8300 Linux filesystem
10 327680 333823 3.0 MiB 8300 Linux filesystem
11 335872 344063 4.0 MiB 8300 Linux filesystem
12 344064 360447 8.0 MiB 8300 Linux filesystem
13 360448 401407 20.0 MiB 8300 Linux filesystem
14 401408 409599 4.0 MiB 8300 Linux filesystem
15 409600 802815 192.0 MiB 8300 Linux filesystem
16 802816 966655 80.0 MiB 8300 Linux filesystem
17 966656 3063807 1024.0 MiB 8300 Linux filesystem
18 3063808 5423103 1.1 GiB 8300 Linux filesystem
19 5423104 7634943 1.1 GiB 8300 Linux filesystem
[email protected]:/ #
Partition Layout
streetdev22 said:
Recently rooted and unlocked the bootloader on my Huawei Prism II, but there is no custom recovery nor custom roms for this phone. I have tried determing the partition layout in order to dump the recovery, but I am unable to do so.
Tried earlier versions of romdump, but they returned with a segmentation failure.
Click to expand...
Click to collapse
I believe I've found the partition layout based on the /etc/recovery_mmc.fstab extracted from mmcblk0p13, but am not sure. The excerpt of my /etc/recovery_mmc.fstab file from mmcblk0p13 shows some partition names correlated to device names. Could someone verify this is a legitimate way to determine the partition layout? I've also attached the whole recovery_mmc.fstab file.
recovery_mmc.fstab excerpt:
Code:
/boot emmc /dev/block/mmcblk0p12
/cache ext4 /dev/block/mmcblk0p15
# /* < DTS2012062603367 lizhigang 20120626 begin */
/data ext4 /dev/block/mmcblk0p18 length=-16384
#/* < DTS2012062603367 lizhigang 20120626 end */
/recovery emmc /dev/block/mmcblk0p13
/misc emmc /dev/block/mmcblk0p7
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
/system ext4 /dev/block/mmcblk0p17
/sys_boot vfat /dev/block/mmcblk0p3
/fat vfat /dev/block/mmcblk0p3
/HWUserData vfat /dev/block/mmcblk0p19
#/*< DTS2012020804291 weizhonghui 20120208 begin */
/cust ext4 /dev/block/mmcblk0p16
#/* DTS2012020804291 weizhonghui 20120208 end >*/
#/* DTS2012011906026 chendeng 20120120 end > */
# /* DTS2012031506621 lishubin 20120321 end > */
Easier to read (joined fdisk and the recovery_mmc.fstab)
Code:
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 3 20 4d Unknown /sdcard
/dev/block/mmcblk0p2 3 41 300 45 Unknown
/dev/block/mmcblk0p3 41 16681 133120 c Win95 FAT32 (LBA) /sys_boot and /fat
/dev/block/mmcblk0p4 16681 477184 3684031+ 5 Extended
/dev/block/mmcblk0p5 16897 18432 12288 6a Unknown
/dev/block/mmcblk0p6 18433 18944 4096 46 Unknown
/dev/block/mmcblk0p7 18945 19456 4096 63 GNU HURD or SysV /misc
/dev/block/mmcblk0p8 19457 19840 3072 58 Unknown
/dev/block/mmcblk0p9 19969 20352 3072 4a Unknown
/dev/block/mmcblk0p10 20481 20864 3072 4b Unknown
/dev/block/mmcblk0p11 20993 21504 4096 47 Unknown
/dev/block/mmcblk0p12 21505 22528 8192 48 Unknown /boot
/dev/block/mmcblk0p13 22529 25088 20480 60 Unknown /recovery
/dev/block/mmcblk0p14 25089 25600 4096 6c Unknown
/dev/block/mmcblk0p15 25601 50176 196608 83 Linux /cache
/dev/block/mmcblk0p16 50177 60416 81920 83 Linux /cust
/dev/block/mmcblk0p17 60417 191488 1048576 83 Linux /system
/dev/block/mmcblk0p18 191489 338944 1179648 83 Linux /data
/dev/block/mmcblk0p19 338945 477184 1105920 6b Unknown /HWUserData
Very nice!
Correlates with the hints found in other files as seen above, so I think we have successfully found the partition layout! I will take a look when my device gets here(originally was working on my relative's phone, but now I purchased it for myself). If this method is confirmed,we can to port CWM, thank you all!! After CWM, we should be able to make custom ROMs freely.
streetdev22 said:
Correlates with the hints found in other files as seen above, so I think we have successfully found the partition layout! I will take a look when my device gets here(originally was working on my relative's phone, but now I purchased it for myself). If this method is confirmed,we can to port CWM, thank you all!! After CWM, we should be able to make custom ROMs freely.
Click to expand...
Click to collapse
Great. I'm glad that someone can verify part of the partition layout. Hopefully, this means that the new information is credible too.
Prism 2 said:
Great. I'm glad that someone can verify part of the partition layout. Hopefully, this means that the new information is credible too.
Click to expand...
Click to collapse
How exactly did you extract the file? Did you extract it from mmcblk0p13? Have the device on hand, so I am trying to verify the findings.
Thanks.
Unpacking Recovery Image
streetdev22 said:
How exactly did you extract the file? Did you extract it from mmcblk0p13? Have the device on hand, so I am trying to verify the findings.
Thanks.
Click to expand...
Click to collapse
First, I made a selective backup using a google store app called Online Nandroid Backup https://play.google.com/store/apps/details?id=com.h3r3t1c.onnandbup&hl=en to make a backup on the "recovery" partition. Even though the app does not specify which block it copies, I believe the app makes a backup of /dev/block/mmcblk0p13 because it uses /system/partlayout4nandroid to determine the partition layout. If you look at the "cat /system/partlayout4nandroid" output below, you'll see that mmcblk0p13 corresponds to recovery.
Then I transferred the recovery.img from the sdcard to my computer.
From there, I followed the directions in Step 1 and Step 2 of http://www.imajeenyus.com/computer/20130301_android_tablet/android/unpack_repack_recovery_image.html to unpack and extract recovery.img.
Online Nandroid Backup Partition Layout:
Code:
[email protected]:/ # cat /system/partlayout4nandroid
cat /system/partlayout4nandroid
dev: size erasesize name
mmcblk0p1: 010000 000000 "modem"
mmcblk0p2: 000008 000000 "ssd"
mmcblk0p3: 000080 000000 "sbl1"
mmcblk0p4: 000100 000000 "sbl2"
mmcblk0p5: 000200 000000 "sbl3"
mmcblk0p6: 000200 000000 "aboot"
mmcblk0p7: 000200 000000 "rpm"
mmcblk0p8: 000200 000000 "tz"
mmcblk0p9: 002800 000000 "pad"
mmcblk0p10: 000c00 000000 "fsg"
mmcblk0p11: 002000 000000 "persist"
mmcblk0p12: 002800 000000 "boot"
[B]mmcblk0p13: 002800 000000 "recovery"[/B]
mmcblk0p14: 0b8000 000000 "system"
mmcblk0p15: 0d0000 000000 "cache"
mmcblk0p16: 000c00 000000 "modemst1"
mmcblk0p17: 000c00 000000 "modemst2"
mmcblk0p18: 040000 000000 "tombstones"
mmcblk0p19: 000400 000000 "misc"
mmcblk0p20: 001000 000000 "logo"
mmcblk0p21: 001000 000000 "logo2"
mmcblk0p22: 54c000 000000 "userdata"
mmcblk0p23: 00ffef 000000 "grow"
[email protected]:/ #
Probably correct.
My father(the owner of the phone) has once again left on a trip, so I will have to wait until Monday/Tuesday, when I receive my phone, to confirm these results.
My only issue with this is is why nandroid shows a different partition layout then what is shown in other files.
If partition 13 is recovery, there is no coincidence that you would find that fstab file in the extracted recovery.
Do you mind dumping all the extracted files from the recovery and uploading them to 4shared, mediafire, or any other cloud service as a compressed file(zip, tar)? I think the file is not coincidental, and that we have indeed found the partition layout(or at least the important partitions for our purposes).
Also, try dumping the boot partition that is currently identified (block 12) without using online nandroid backup(I think via dd should still work) and see if you can find similar files to that explained in the guide(.png, ramdisk directory, etc). If these files match up to what would be typically found in a boot.img or recovery.img, then the layout is most likely correct.
If these files match up to typical boot.img or recovery.img files, we can test the layout by changing something simple like a background before working on serious stuff.
Also, thanks for helping! Once we conclusively identify that this partition layout is correct, we can start to port clockworkmod.
streetdev22 said:
My father(the owner of the phone) has once again left on a trip, so I will have to wait until Monday/Tuesday, when I receive my phone, to confirm these results.
My only issue with this is is why nandroid shows a different partition layout then what is shown in other files.
If partition 13 is recovery, there is no coincidence that you would find that fstab file in the extracted recovery.
Do you mind dumping all the extracted files from the recovery and uploading them to 4shared, mediafire, or any other cloud service as a compressed file(zip, tar)? I think the file is not coincidental, and that we have indeed found the partition layout(or at least the important partitions for our purposes).
Also, try dumping the boot partition that is currently identified (block 12) without using online nandroid backup(I think via dd should still work) and see if you can find similar files to that explained in the guide(.png, ramdisk directory, etc). If these files match up to what would be typically found in a boot.img or recovery.img, then the layout is most likely correct.
If these files match up to typical boot.img or recovery.img files, we can test the layout by changing something simple like a background before working on serious stuff.
Also, thanks for helping! Once we conclusively identify that this partition layout is correct, we can start to port clockworkmod.
Click to expand...
Click to collapse
The extracted files in partition 13 can be found in post #44 of http://forum.xda-developers.com/showthread.php?t=2546455&page=5 labeled as "ramdisk.tar.bz2". I will make a dump of the boot partition using dd and run the tests tomorrow.
Looks validated, Also more tools
There are other guides on the matter of porting cyanogenmod..for example
http://wiki.cyanogenmod.org/w/Doc:_porting_intro
which even mentions a recovery.fstab file in recovery.img! So, that means the partition layout in the fstab file you found is most likely correct.
Another guide:
http://xda-university.com/as-a-developer/porting-clockworkmod-recovery-to-a-new-device
Also, there is an automated tool to porting cyanogenmod for new devices..
http://builder.clockworkmod.com/ (I would recommend avoiding the touch recovery for now, simple is all we need and we don't need more complications)
I am really feeling pretty confident about the partition layout found in the recovery.fstab, because one guide mentions it to be found in the recovery.img!
I would recommend making the changes to a recovery.img instead, because boot.img is still kinda scary (possible bricking )
Also, I think there is a command to try booting from a recovery.img without flashing the .img to the actual partition.
I think the command is mentioned here: http://forum.xda-developers.com/showthread.php?t=2233477
fastboot boot recovery.img is the command and it will not overwrite your existing recovery.
By using this command, you can try booting the stock recovery you extracted(to validate that we have a stock recovery available if we need it), and then boot the recovery.img you make with small edits, and then boot the recovery.img made from the automated CWM porter.
Thank you for replying so fast! We have made real progress in the last few days.
Edit:In the ramdisk that was extracted, another fstab exists on the root of the directory that is named fstab.msm7627, which is the same name from the file I located in post 1! They are the same file! I think this is validated.
Testing Recovery Partition
streetdev22 said:
I would recommend making the changes to a recovery.img instead, because boot.img is still kinda scary (possible bricking )
Also, I think there is a command to try booting from a recovery.img without flashing the .img to the actual partition.
I think the command is mentioned here: http://forum.xda-developers.com/showthread.php?t=2233477
fastboot boot recovery.img is the command and it will not overwrite your existing recovery.
By using this command, you can try booting the stock recovery you extracted(to validate that we have a stock recovery available if we need it), and then boot the recovery.img you make with small edits, and then boot the recovery.img made from the automated CWM porter.
Click to expand...
Click to collapse
I've made
a regular recovery.img using "dd if=/dev/block/mmcblk0p13 of=/sdcard/recovery.img" to make a copy of the recovery partition
a test recovery.img that is the same in every way to the original recovery.img except that all the images under /res/images is rotated 90 degrees. You can see the difference yourself by looking in res.rar attached below.
a clockworkmod recovery image from the clockworkmod recovery builder website
These images can be found attached below:
recovery.rar = original Huawei recovery image
recovery-test.rar = edited recovery image
recovery.img = clockworkmod recovery automatic builder image from http://jenkins.cyanogenmod.com/job/recovery/52069/
Unfortunately, I cannot test this image myself, because I do not want to unlock my bootloader yet.
If anyone with a rooted, unlocked Huawei Prism 2 is interested in helping to further the development of recovery roms for the Prism 2, I have made 3 tests to see if
the recovery partition is located in /dev/block/mmcblk0p13
the command "fastboot boot recovery.img", which we will be using extensively, can be used to boot the specified image file
the Clockworkmod Recovery image made from automated CWM porter successfully boots
The files you will need are provided below. I've also given instructions to the best of my ability without actually having done this.
To test if the recovery partition is located in /dev/block/mmcblk0p13:
Go into fastboot mode (step 2f in post #1 of http://forum.xda-developers.com/showthread.php?t=2546455)
Download the recovery.rar file below and extract it to get recovery.img.
Open up terminal
change directory to where you extracted recovery.img
type
Code:
fastboot boot recovery.img
See if phone boot into recovery
Next we test an edited recovery.img to see if "fastboot boot recovery.img" is truly letting us boot the image we've specified.
To find out, we're going to use the edited recovery.img and do pretty much the same thing except now with recovery-test.img:
Go into fastboot mode (step 2f in post #1 of http://forum.xda-developers.com/showthread.php?t=2546455)
Download the recovery-test.rar file below and extract it to get recovery-test.img.
Open up terminal
change directory to where you extracted recovery-test.img
type
Code:
fastboot boot recovery-test.img
See if any pictures are upside down (the battery symbol, numbers, or the android robot)
After completing the 2 tasks above, and verifying that we have a valid original recovery.img and that we can use
Code:
fastboot boot recovery.img
to boot a specific image file, we can start testing a very, very, very EXPERIMENTAL Clockworkmod Recovery image using fastboot. I would not rely on this image to make backups and I honestly do not know what kind of damage it might inflict on the phone so make a backup of everything before starting.
output from CWM automatic recovery builder: http://jenkins.cyanogenmod.com/job/recovery/52069/
To test if this CWM recovery image will boot and have the right partition layout:
Go into fastboot mode (step 2f in post #1 of http://forum.xda-developers.com/showthread.php?t=2546455)
Download the recovery.img.
Open up terminal
change directory to where you downloaded recovery.img
type
Code:
fastboot boot recovery.img
If the cwm recovery image boots, type
Code:
mount
See if /sdcard is mounted to the right partition)
If you're feeling lucky, make a backup to /sdcard **this step can cause damage to phone if /sdcard is mounted to the wrong partition**
Thanks for volunteering and bringing the Huawei Prism 2 one step closer to custom roms.
Will test as soon as I get the phone.
I should be getting my phone in the mail Tuesday-Wednesday, but I will test as soon as I get it in the mail and I get my bootloader unlocked. I shouldn't have an issue booting it, since it will boot without effecting my current recovery partition. Hopefully the cwm recovery boots as well.
streetdev22 said:
I should be getting my phone in the mail Tuesday-Wednesday, but I will test as soon as I get it in the mail and I get my bootloader unlocked. I shouldn't have an issue booting it, since it will boot without effecting my current recovery partition. Hopefully the cwm recovery boots as well.
Click to expand...
Click to collapse
Great! I really hope it works. Let me know if I can help with anything in the meantime.
Getting my phone today
My phone is coming today! I will let you know the results either later today or tomorrow. Also, could you pull a build.prop using ADB from your phone? This guy needs it: http://forum.xda-developers.com/showthread.php?p=49494728
niceeeee
Prism 2 said:
Great! I really hope it works. Let me know if I can help with anything in the meantime.
Click to expand...
Click to collapse
I tried them today and they work fine siiiiir. both booted while i was stuck in a boot loop from deleting my settins apk
Cjantolak said:
I tried them today and they work fine siiiiir. both booted while i was stuck in a boot loop from deleting my settins apk
Click to expand...
Click to collapse
Thats good news! Could you state specifically which 2 of the 3 images booted though? I'm assuming the original (recovery.rar file) and the edited (recovery-test.rar file) recovery.images, but want to make sure
In other words, did you test the clockworkmod recovery image?
first two
Prism 2 said:
Thats good news! Could you state specifically which 2 of the 3 images booted though? I'm assuming the original (recovery.rar file) and the edited (recovery-test.rar file) recovery.images, but want to make sure
In other words, did you test the clockworkmod recovery image?
Click to expand...
Click to collapse
I did just boot the clockworkmod recovery and i just booted up fine. os is running as it should other than the whole missing settings app. im stuck without root, without wifi, and usb debugging.
adb not installing the app either so idk.
Thanks for straightening out the confusion. Can you check the mounted partitions are correct? Afterwards you can use update.zip to install your settings.apk
---------- Post added at 01:11 AM ---------- Previous post was at 01:04 AM ----------
Never mind about checking the partition layout. I just remembered you don't have adb. I will try to make a better recovery image.

[Q] ?? How to backup Firmware on stock device

Hello.
I have a Samsung Relay that is rebranded by Cellular One of North East AZ. They have a fancy super thin sticker over the Tmobile logo on the glass. lol... But the firmware in the device is branded by Cellular One.
I cannot find that firmware anywhere and want to know if anyone has any directions on how to back up the firmware so It could be loaded onto a t-mobile Relay to "brand" it for Cellular One.
Appreciate any help you can offer.
Thanks.
(I normally play in CDMA world, but I moved to po dunk nothing ville and VZW Sucks here, so had to go with Cell One. First real experience with GSM)
I've never done this before and I'm not 100% sure if it can be done. But there probably are ways if you're clever enough. So here's what I would try if I were in your position:
1. Check if there's a way to dump it with Odin. You can google around to see if it's possible but I'm pretty sure it's a feature in Odin (Whether our phone supports it is another story). You would have to boot into download mode, (vol down + home + power when powering on) and then follow whatever directions you find for dumping a rom. Just make sure you don't flash anything to your device. And make sure you know what you're doing with Odin because it can brick your phone if you push the wrong buttons.
2. The other way to do it is to dump your partition contents with the dd command (I would do it through an adb shell). This would require you to have root. I'm not sure of how to get root without modifying your ROM (kind of defeats the purpose of what you're trying to do if we have to change the ROM) but there are usually ways to get a temp root. Not sure how to do it on our phone but maybe someone else can help you with that part. Or maybe do some googling. The dd part I've at least done for the boot partition. Basically what you want to do is open an adb shell and run:
"ls -l /dev/block/platform/msm_sdcc.1/by-name/"
This will give you a list of all the partition name symlinks and show you the block devices they point to. For example, when I was getting boot.img I found that the "boot" symlink pointed to "/dev/block/mmcblk0p7". Find all the partitions you want to image in this list and figure out which block devices they point to.
The next part is to figure out how big each of the partitions is. You can find this in /proc/partitions. So from your adb shell you would run:
"cat /proc/partitions"
This will print out all of your flash block devices (look at the ones you were interested in from above). The 3rd column in this list will be the # of blocks in the partition. I believe the block size is 1k (1024 bytes). For example, my boot partition was 10240 blocks which comes out to 10 Megs, which sounds about right. The 1k assumption also agrees with the total device flash size, which is 7634944 blocks (mmcblk0) which is just under the 8GB they say the phone has. So I'm pretty confident about the block size.
So now we're at the part where things get a little hairy. I'm assuming you've found some way to get root in your adb shell. Be very careful with these dd commands and if you don't know what you're doing, don't do it. You would want to run something like the following:
"dd if=/dev/block/<partition name> of=/storage/sdCard/<name of image file> bs=1024 count=<# of blocks for partition you found in /proc/partions>"
You would do this for each partition you want dumped.
Again, be careful if you decide to try and do any of this stuff (especially with the dd commands, if you mix up the in file and out file you can brick your device). But like I said this worked for me to get boot.img and I was able to extract it and get the kernel and ramdisk. Hope this helps and sorry I don't know more about getting you a temp root without modifying your ROM.
Jeff
Can you send me a screenshot of your about phone screen?
Sent from my SGH-T699 using Tapatalk
hello everyone,
i resurrection this thread so bring some information to pepole who want to backup stock rom so they can flash it back with odin.
i constructed a list of partitions names/partition location nb./partition block size for a refreance of what to backup:
block size partition block location partition name
7634944 /dev/block/mmcblk0 Whole SSD on Device
2048 /dev/block/mmcblk0p5 aboot
6144 /dev/block/mmcblk0p20 backup
10240 /dev/block/mmcblk0p7 boot
860160 /dev/block/mmcblk0p17 cache
13952 /dev/block/mmcblk0p11 efs
10240 /dev/block/mmcblk0p19 fota
3072 /dev/block/mmcblk0p21 fsg
5120 /dev/block/mmcblk0p23 grow
61440 /dev/block/mmcblk0p1 modem
3072 /dev/block/mmcblk0p12 modemst1
3072 /dev/block/mmcblk0p13 modemst2
512 /dev/block/mmcblk0p9 pad
10240 /dev/block/mmcblk0p10 param
8192 /dev/block/mmcblk0p16 persist
10240 /dev/block/mmcblk0p18 recovery
512 /dev/block/mmcblk0p6 rpm
128 /dev/block/mmcblk0p2 sbl1
256 /dev/block/mmcblk0p3 sbl2
512 /dev/block/mmcblk0p4 sbl3
8 /dev/block/mmcblk0p22 ssd
1228800 /dev/block/mmcblk0p14 system
512 /dev/block/mmcblk0p8 tz
5386240 /dev/block/mmcblk0p15 userdata
so all you have to do is to use this command via terminal:
"dd if=/dev/block/<partition name> of=/storage/sdCard/<name of image file> bs=1024 count=<# of blocks for partition>"
you can cnange "sdCard" for "extSdCard" if you wish.
this will make you the raw imgae of all partitions and then you will need to use tar in linux to make a tar.md5 file for odin.
use the commands below in terimanl to do so:
"tar -H ustar -c image1 image2 image3 etc... > package_name.tar"
"md5sum -t package_name.tar >> package_name.tar"
"mv package_name.tar package_name.tar.md5"
remember you will need superuser on you phone to do this, also the commands are without the quotation mark.
the only thing left to know is what partitions you must backup to beable to restore fully to stock with/without data.
i know you should backup the boot/efs/recovery/system partitions for clean stock + userdata/cache if you want your data back.
does anybody know of other critical partitions to backup?

Categories

Resources