yashsingh1/xdaforums huggingface dataset:
[Samsung Captivate Glide] Litatus:
i know the difference...

I know that [vol up & power] is to get to the download mode, and [vol down & power] is to get to recovery mode.

I'm doing everything in download mode. Is the only mode I can get into. Because when I do the combo to get into recovery mode sometimes I get the "no kernel" message or just the "booting android recovery" but nothing happens, it never gets into the recovery.

Any ideas? please..
[Samsung Captivate Glide] terinfire:
You can't do recovery mode because you destroyed your partitions, earlier. When you destroyed the partitions, you wrecked your recovery partition. This is why you're trying to get a PIT and restore the phone.

The PIT file should be used to rebuild the correct partitions and apply the entire phone image (system, recovery, etc) to your phone in download mode.

You're fortunate that even download mode works. If you weren't quite so fortunate, the phone would have been bricked for certain -- at least there is some chance of recovery at this point.
[Samsung Captivate Glide] romanr:
flash the recovery

Okay, recovery bootloader seems work fine. Good.

Let's flash the recovery.

My recovery (CWM-like) is named SOS.img.

Try either of these cmdlets:

heimdall flash --14 SOS.img

or

heimdall flash --recovery SOS.img

and hold the volume down key tightly!

The goal is to get into the recovery.

Once you get the recovery working you may flash any rom you like then.
[Samsung Captivate Glide] Litatus:
nothing...

If I do the first comand in the terminal, the heimdall finishes the process, but nothing. When I do the vol down & power, to get into recovery, just says: "booting android recovery", that's all. Nothing hapens.

When I do the second comand, I get the following error: "ERROR: Partition name for "recovery" could not be located"...
[Samsung Captivate Glide] romanr:
adb shell

In this mode, try to launch "adb shell". Probably the recovery is booted up but unable to mount filesystems so graphical screen is not displayed.
[Samsung Captivate Glide] roothorick:
My friend owns a Galaxy S3 and has told me quite a different story...

Anyway, to try to get things back on track.

I got my data just from dumping the /dev/block/mmcblk0p* files in the PACman ROM and prodding them with hexdump and strings on my laptop. (FYI, if you have an mmcblk1, it is your real microSD card, not anything internal to the phone.) I did notice that there are /dev/block/mmcblk0boot0 and mmlblk0boot1; might those be the two "missing" blocks? They do happen to be exactly 512KB...

---------- Post added at 09:01 PM ---------- Previous post was at 08:53 PM ----------

So, here's the entirety of the contents of partition 11:

roothorick@RaidingParty:/mnt/loop$ ls -A
INTERNAL_SDCARD
roothorick@RaidingParty:/mnt/loop$ ls -A INTERNAL_SDCARD/
ASPHALT6_11-002_ONv2_480_H264_GOOD.wmv Asphalt_6_Screen_Shot_1280x768_3.png
Asphalt_6_Screen_Shot_1280x768_1.png Asphalt_6_Screen_Shot_1280x768_4.png
Asphalt_6_Screen_Shot_1280x768_2.png Asphalt_6_Screen_Shot_1280x768_5.png

Anticlimactic, huh?

Unfortunately, since it's at the END, and there's some critical data between it and /data, we may not be able to directly reclaim that space.

---------- Post added at 09:11 PM ---------- Previous post was at 09:01 PM ----------

Here's an idea, but I'm not brave enough to try it:

Make sure the phone boots into the OS, obviously.

Write CWMR into p10 (it's 100% blank right now so you're not overwriting anything)

Modify partition table so that p10 doesn't exist, p9 is where p10 was, and the original location of p9 is now unpartitioned space (which still contains your normal kernel).

Reboot

If it boots into CWMR (without you selecting recovery), the bootloader reads and obeys the partition table (SCORE!) and looks for the main kernel in p9. (If I were to guess, I'd guess it looks for recovery in p8, and Odin/Download mode in p7.) This is the best possible result, because it means we don't need p10 or p11 to exist at all and can just scoot p7/8/9 to the end of the MMC, claiming a solid 500-550MB of extra space for /data or InternalSD

If it boots into Android, the bootloader is just using static offsets (sticky, but we can work with it). We can still do the /data<->InternalSD merging thing, but p10 and p11 can't be combined with anything else. (If we REALLY wanted to, though, we could have TWO internal storages...)

If it doesn't boot at all, uh, ****... there's some voodoo going on. Hopefully the bootloader can still find your original copy of CWMR and you can save the phone that way.
[Samsung Captivate Glide] romanr:
Really valuable info! Thank you, that makes perfect sense!

I have another idea: completely repartition i.e. make another PIT with internal storage and that 512Mb bloatware garbage space merged into /data. Perhaps I'll buy some broken sgh-i927 for experimenting. Checking eBay...
[Samsung Captivate Glide] roothorick:
That has a MUCH higher chance of bricking. If the bootloader uses static offsets, which is somewhat likely, you'll brick the phone outright as the bootloader won't be able to find kernel or recovery or download mode. My test will boot something useful whether the bootloader respects the partition table or not, and also has a significant chance of still being able to boot something useful even if there is something funky going on.

The idea is my test will tell us whether the bootloader is respecting the partition table, or using static offsets. That will give us a much clearer idea of what we can do with the partition table and how to avoid bricking.
[Samsung Captivate Glide] romanr:
Seems download mode is working fine even with completely erased internal sd, so there is no chance of bricking, IMO.

Yeah, that is really good test to start up.

Also I can see plenty bricked devices on ebay under $100, thinking of buying one.
[Samsung Captivate Glide] roothorick:
Do we KNOW that or is it just a rumor? Seems highly unlikely to me, especially given how easy the S3 is to brick...
[Samsung Captivate Glide] romanr:
For now it is just a rumor.

But looking into Litatus's situation, seems he has completely broken mmcblk0 partiton table and the download mode still works.

At the last resort it's possible to use somehow nvdata mode, it is solely hardware mode and works at any state for sure.

I also did read manuals about how easy the S1 is to unbrick and my opinion is grounded right there. S3 is a very fresh device so not much knowledge about it.
[Samsung Captivate Glide] roothorick:
Actually, his download mode starts but fails to do anything useful, so it may well be corrupt. Also it'd make sense for download mode to start but barf all over itself when it tries to write something if his partition table is hosed but the bootloader is going off static offsets (and therefore can find the download mode code regardless of partition table state).

It sounds to me almost like he has failing NAND (as in, there's something physically wrong with the chip). He's getting weird errors from nvdata, which should NEVER happen.
[Samsung Captivate Glide] romanr:
Hey, what's up with you? I know that is the simplest explanation, but let's find a way where the broken device starts working again!
[Samsung Captivate Glide] roothorick:
Oh, allright.

So I googled it, "usb write failed" means that it got an error back from the OS while trying to write the command out to the device. The errcode given by the OS might be a hint... run nvflash in strace, something like

strace -o nvflash-strace.txt {nvflash command}

and post the resulting file here.
[Samsung Captivate Glide] taiber2000:
So the partion table still unknown. I want yo know the mounting points so i can play with swaping the int. sd and ext. sd.
[Samsung Captivate Glide] ninthsense:
Would this help ? http://xdaforums.com/showpost.php?p=35998166&postcount=19
[Samsung Captivate Glide] romanr:
Swap internal & external SD cards

http://xdaforums.com/showthread.php?p=22741298#post22741298
[Samsung Captivate Glide] Felix Tang:
Where can you get this software? Can it reformat the NAND memory of tablet acer A510? I'm trying to format mmcblk0. But I keep getting problems with all the command line I used. Fastboot stucks forever at waiting for devices, newfs_msdos gives me a warning /dev/block/mmcblk0 is not a character device. What is all this???? I'm a newbie btw. :angel:
[Samsung Captivate Glide] terinfire:
Felix apparently messaged everyone on this thread.

This isn't a support forum for the Acer A510. We have no idea about your device, so we cannot make any comments about it.

This would be the correct forum:

http://xdaforums.com/forumdisplay.php?f=1615
[Samsung Captivate Glide] romanr:
bootloader & partition table encryption

I've just found that bootloader and partition table on Tegras are encrypted with a key, based on CPUID

http://xdaforums.com/showthread.php?t=1698560

http://forum.tegraowners.com/viewtopic.php?f=8&t=563

so it is not possible to transfer backup images to another device.

But having CPUID it is still possible to recover the device, since APX/nvflash mode always works (pressing volume up + volume down on reboot) and it is possible (teoretically) to encrypt a bootloader from another device with correct key and write to the target.
[Samsung Captivate Glide] roothorick:
Er, no. The Boot ROM isn't encrypted, but it's unwriteable. It reads one-time-only fuses inside the SoC to find the BCT and some configuration params, then reads the BCT out of MMC to get the rest of configuration and the bootloader location.

nvflash doesn't work on the Glide at all. To summarize: SBK has been enabled and we don't know the key, so the boot ROM won't talk to us. At all.

If you can't get into download/Odin mode, it's over. Unless you somehow manage to bruteforce the SBK (see you in six million years!) or convince Samsung to release/leak it.

Repartitioning is a problem because the PIT used by Odin is NOT a partition table -- we don't presently know how the partition table is generated from it so we can't predict the locations of partitions. This means we have to flash PIT, BCT, bootloader, and Odin mode all in one go or we may brick the device outright. We don't have BCT, bootloader, or Odin mode images -- that's the problem.
[Samsung Captivate Glide] romanr:
I have complete mmcblk0 dump, doesn't it contain BCT, bootloader & Odin ?
[Samsung Captivate Glide] romanr:
I thought the key is computed out of CPUID on every Tegra, no ?

CPUID is possible to fetch out of APX mode - it is contained in the first reply usb frame.
[Samsung Captivate Glide] romanr:
No, that does not work for samsung.

I fetched the bootloader out of the device (it is encrypted), fetched the CPUID using http://xdaforums.com/showpost.php?p=23783875&postcount=9, calculated the SBK using http://a500bootloaderflash.tk/sbkcalc/, decryphered the bootloader by openssl aes-128-cbc -K $SBK -iv 0 -d -in bootloader.bin -out bootloader.bin.dec -nopad and expected to see some strings like NVFLASH EBT.....MSM-RADIO-UPDATE at the beginning of decrypted file. Does not work.
[Samsung Captivate Glide] roothorick:
We believe so. But where does one end and the next begin?

---------- Post added at 02:47 PM ---------- Previous post was at 02:46 PM ----------

That's exclusive to Acer Iconia Ax00 tablets. The key is different on all other T2 devices.
[Samsung Captivate Glide] romanr:
PIT file has offsets

I dug the offsets out of the pit file. It has the structure similar to APX/nvflash flash.cfg file. I.e. pit file contains partition sizes (in number of blocks but block size should be guessed) starting from the beginning of the storage. But the first 2 blocks of the internal storage are missed in the /dev/block/mmcblk0, they can be accessed through /dev/block/boot0 and /dev/block/boot1 though.
[Samsung Captivate Glide] roothorick:
I don't like to call people out, but I've picked apart a PIT file in a hex editor, and no, you're wrong. It has the partition size in blocks, and the block size (all 512K), but no offsets. Can we assume no gaps between partitions? Based on what I've seen at the front of my mmcblk0 dump, probably not. There's partition information in the NAND that is not in the PIT.

My current plan of attack is to pick apart the BCT, and find the entry point of the bootloader from there. Hopefully I'll stumble across a useful header and be able to figure out the size of the bootloader. At that point we'll have a valid PIT, BCT, and bootloader; add a recovery, and while we might nuke Odin mode in the process, they'll have working recovery that they can then use to bring the phone back up to a usable state.

-E- It just dawned on me, if the order in the PIT matches the order in NAND, and "PT" is what I think it is... I might just crack this nut wide open.
[Samsung Captivate Glide] romanr:
Is it really important whether there are gaps? I dug filesystems and kernels based on PIT info, and they are correct. The gap at the end of filesystem or code is possible, it implies nothing. The front of mmcblk0 contains not the start of PIT partition. As I mentioned above, the first 2 blocks of the first PIT partition are accessed through /dev/block/boot{0,1} and the first block of mmcblk0 contains the 3rd block of the first PIT partition.

Since we have an interface to program it (using PIT file) the exact internal sctructure is not important, IMO.

If you mean bootloader.bin PIT partition as bootloader - it is encrpyted on the mmcblk0 and to decipher it we need SBK, so it is unique on every device (mine has size=2097152 md5=4c07b40612c161a2c629806a89e82521). Btw, I think it may contain the ODIN code, since it is 2Mb size - rather large for bootloader. Acer A500 bootloader contains fastboot code which is conceptually similar to ODIN.

Actually I think with working ODIN mode restoring the device is a trivial operation.

My goal is to repartition the internal storage completely: I want to merge the internal sdcard storage and that extra partition with bloatware (named HD in the GPT, HID in the PIT) into data partition. I also need a ROM to manage this configuration, preferably ICS/JB one.
[Samsung Captivate Glide] roothorick:
I just ran some numbers... y=(8x-16)*65536 (where x is the sum of the blockcounts of the preceding partitions) gives offsets that match what I bruteforced from ext4 headers. Looks like you found something.

So your theory goes, mmcblk0 starts at 0x160000, not 0x0, and boot0 and boot1 cover that first 1MB. Makes sense.

It IS important if you want to actually find anything in a preexisting image.

Bootloader is NOT encrypted -- strings from the bootloader are present plaintext in MMC. Ditto Odin. Is the Tegra BootROM even capable of reading an encrypted BCT or bootloader?

Well, sure, as long as you have dumps of BCT, PT, and EBT from a working device, which, if the above formula checks out, we can now trivially get. That is assuming, though, that Odin/download mode is part of EBT.

Yeah, it's something I've been looking at. Keep in mind that repartitioning would be incompatible with all current ROMs and recoveries. We could use UUIDs and runtime detection to make it seamless, but Odin could pose a problem, if we care enough to keep it working (and hey, call me oldschool, but I do care).
[Samsung Captivate Glide] taiber2000:
this will not for JB by maybe i can extract the inf for JB 4.2.1

btw i'm tring to bypass the auto mount and find the ecsact partion numbering for the extanal sd card.

the auto funcation didnt worked well for me in the past in JB 4.2.1.
[Samsung Captivate Glide] roothorick:
BCT and bootloader MAY be encrypted according to nvidia's own docs: http://http.download.nvidia.com/tegra-public-appnotes/tegra-boot-flow.html scroll down to "Security"

Further, the BCT contains a cryptographic hash of itself and every copy of the bootloader: http://http.download.nvidia.com/tegra-public-appnotes/bct-overview.html look at "Integrity checking".

I'm operating on the assumption that the BCT and bootloader are not encrypted, but cryptographically signed and therefore unmodifiable, BUT...

An AES-CMAC with the same key hashing the same data will always be the same. We can use this to determine whether there is a single SBK common to all Glides, or if each Glide has its own SBK.

If each Glide has its own SBK, then there MUST be a way for Odin to get it or at least use it, or it wouldn't be able to produce the required hashes in the BCT.

If a single SBK is global to all Glides, then any valid BCT/bootloader combination will work on every Glide, and therefore we have a way to unbrick Glides with damaged partition tables. (In theory.)

Good theory, but we may be able to do better.

We have reason to believe Odin cares about partition names, not numbers. But that needs to be tested. The most obvious idea is to switch UDA (/data) and IMS (InternalSD) around, so that UDA is id 10 and IMS is id 14, and see which filesystem it formats ext4, and which it formats FAT.
[Samsung Captivate Glide] romanr:
I don't have that devices, could you tell me minor & major numbers? Are they block or char devs?
[Samsung Captivate Glide] roothorick:
Covenant kernel should expose them automatically...

brw------- root root 179, 8 2013-01-07 13:39 mmcblk0boot0
brw------- root root 179, 16 2013-01-07 13:39 mmcblk0boot1
[Samsung Captivate Glide] romanr:
Uhm, I have different number assignments, "b 179 8" is mmcblk1 for me and "b 179 16" is absent.

Seems I don't have access to the first 2 blocks of BCT.

My kernel is 2.6.36.3.

What's yours?
[Samsung Captivate Glide] roothorick:
I'm running Covenant V2 (3.1.10) with the 4.2 RAMdisk.
[Samsung Captivate Glide] Litatus:
idea

hi!... it's been a while.

Well, I still have the phone in non-working condition.

I've just have one experience that it might help me but I want you to know and tell if it could work.

I had a Captivate i897 with some kind of a broken internal memory. In the recovery mode if you try to wipe the data, or if you want to format the data partition with CWM recovery it says that could not format /data partition.

So I've found a solution on youtube that involves a 8GB memory card. I just required making a primary partition of 6GB in fat32 type and another primary partition of the remaining space in the memory with "reiserfs" as format type to fix the issue. Somehow the odin finishes the flashing process, wipes data normally, boots and works normal.

Could I do something like that for the glide? How many partitions would I have to do in the sd card?

I wanna try this out.
[Samsung Captivate Glide] romanr:
Tried to mount mmcblk0p11 as sd-ext on ICS rom - unable to do it because the partition is blocked by someone. Using it as swap space works fine though.
[Samsung Captivate Glide] ameer1234567890:
Number Start (sector) End (sector) Size Code Name Long Full
1 21504 46079 12.0 MiB 0700 ES EFS efs
2 46080 1274879 600.0 MiB 0700 AP APP system
3 1274880 1913855 312.0 MiB 0700 CC CAC cache
4 1913856 9779199 3.8 GiB 0700 IS INS sdcard (internal storage)
5 9779200 9783295 2.0 MiB 0700 MC MSC misc
6 9783296 13977599 2.0 GiB 0700 UA UDA userdata (/data)
7 13977600 14010367 16.0 MiB 0700 MM MDM modem
8 14010368 14020607 5.0 MiB 0700 SS SOS recovery
9 14020608 14036991 8.0 MiB 0700 LX LNX boot
10 14036992 14053375 8.0 MiB 0700 OA OTA ota
11 14053376 15101951 512.0 MiB 0700 HD preload
[Samsung Captivate Glide] willriddle1:
Should be able to use parted?

It seems like you should be able to use parted to rearrange the partitions on the glide, but I haven't figured it out yet... reading massive numbers of threads on it..
[Samsung Captivate Glide] jago25_98:
Different device... also interested in the partition table. I'm not sure if it varies by device or by rom or what...

I'd prefer to understand it enough so that device isn't relevent.

Currently trying to decide where to put my thread (CM forum, Nexus4 forum or reply here more http://xdaforums.com/general/xda-assist/nexus-forensic-recovery-fixed-sdcard-t2849560 ) Some of the info in my thread is relevent to this thread
[Samsung Captivate Glide] eMPee584:
progress, anyone?

After spending a tremendous amount of time ruling out every possible source for repeatedly getting a "Re-Partition operation failed"-error, I ended up here in this thread. Did anyone achieve any modification of his partition layout? My plan was to give most of the space of the /preload (/dev/block/mmcblk0p11 "HID") and /cache (/dev/block/mmcblk0p3 "CAC") to the /data partition (/dev/block/mmcblk0p6 "UDA").. as mentioned before, the PIT for our device does not contain partition offsets.. changing only the block counts appropriately did not lead me to success. Here's the resulting PIT however... :laugh: :rolleyes:
[Samsung Captivate Glide] Antagonist42:
Something that may help with understanding the partitioning, search for the UEFI.org website and pdf's on UEFI boot and partitioning, there's a LOT to read but it'll help to understand what's going on in there (like booting a GUID system without using MBR/EBR) from the older MBR, GPT and EFI partitioning and booting formats.

Out of curiosity (and because I've done it myself) have you tried

dd if=/your_mmcblk0_location/mmcblk0p0 of=/your_storage_location/mmcblk0p0.bin

It's not always available on the system but can sometimes be extracted, this would be the first 512 of the NAND/MMC, like I say, it may not work but sometimes does even though it doesn't show or be read.

Not sure if it applies to the PIT partition data but I'm sure (if I remember rightly) the PIT data is Partition and Block size and is applied to atag data which is booted and applied at boot, there's more info in a thread for MTK devices and as I've found every little bit of info helps even if it seems it's not for your device ;)

MTK Infohttp://xdaforums.com/showthread.php?t=1959691

UEFI Specifications http://www.uefi.org/specifications
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] faru123:
WHAT is the actual wallpaper size of Xperia Mini Pro / XMP / SK17i

and also y is d music and videos of my xperia not working ???
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] DanToDeath:
640x480 should be the wallpaper size,

and try going to mange applications>all>media storage,

and clear data. install QuickPic instead of stock gallery, coz it's better.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
but i saw dis for XMP:- 320 x 480 resolution
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] gyeben:
The right background resolution is 640x480 because it scrolls the background...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] whalesplaho:
thanks so much buddy....
[XPERIA X8 Q&A, Help & Troubleshooting] zack19:
hi guy's flashtool will start on my laptop click on program exe then flashtool and it's saying there are some problems with Java can you help:(
[XPERIA X8 Q&A, Help & Troubleshooting] B.Jay:
Flashtool version?

Windows version and edition?

(i.e. Windows 7 32-Bit Home Premium)

User account control turned on?

Run flashtool.exe as Administrator (Right-click -> "Run as Administator")

Java Runtime (JRE) or Development Kit (JDK) installed?

If yes, which version?

Exact error message you get upon starting Flashtool?
[XPERIA X8 Q&A, Help & Troubleshooting] zack19:
hi B.Jay sorry for the delay, running win xp 32 bit androxyde-flashtool-300f4b7 can't find the version, don't understand user account turned on, if i right click on flastool.exe

i don't get the option to run as admin. Java 1.6.0_31

these are the errors.

java.lang.ClassNotFoundException: gui.FlasherGUI

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)

at com.exe4j.runtime.WinLauncher.main(Unknown Source)