[Q] Unbrick Hard Brick AT&T Note 3 - AT&T Galaxy Note 3 Q&A, Help & Troubleshooting

So i hard bricked my at&t Note 3 when i was in Odin. Looked like Odin froze so i unplugged it half way thru and tried to get back into download mode and NOTHING! Black screen ... can't get into download mode, power device on or nothing. Never bricked a device in all the years i've been rooting and tried everything. Unfortuantly, i still can't get this to work on Linux system and just want to know im doing things right. I placed the img on sd card and inserted it with thumb usb and that's fine. When i type in dmesg | tail i get this ...
[email protected] ~ $ dmesg | tail
[ 1548.786072] sd 10:0:0:0: [sdb] No Caching mode page found
[ 1548.786079] sd 10:0:0:0: [sdb] Assuming drive cache: write through
[ 1548.790452] sd 10:0:0:0: [sdb] No Caching mode page found
[ 1548.790461] sd 10:0:0:0: [sdb] Assuming drive cache: write through
[ 1548.791624] sdb: sdb1
[ 1548.794337] sd 10:0:0:0: [sdb] No Caching mode page found
[ 1548.794347] sd 10:0:0:0: [sdb] Assuming drive cache: write through
[ 1548.794355] sd 10:0:0:0: [sdb] Attached SCSI removable disk
[ 1549.170010] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 1956.468460] perf samples too long (2506 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
I know my card is sdb1 and tried typing in the rest of the commands. When i type in second command sudo dd if=/<path_to_debrick.img> of=/dev/sdX i get this ...
[email protected] ~ $ sudo dd if=/<path_to_debrick.img> of=/dev/sdb1
bash: path_to_debrick.img: No such file or directory
Really no idea what im doing to not get this work but i'm sure it's something simple. I just want to get back into download mode and then i'll be straight and can Odin my files to recover. Unfortuantely i can't get back in download mode!
Do i need MJ5 img since i was on MJ5 then did UNOFFICIAL KK update and was running DynamicKat when this happened?
Also i am using a SanDisk Elevate 32GB sdhc card on my 32 Note 3 so i know the cards not the problem. It's brand new and reads fine otherwise.
Please let me know if i'm doing anything wrong as i've been working on this for 48 hours and just need my phone back! lol
Thanks ... I really appreciate it!

I'm just going to bite my tongue on this one and help you.
"<path_to_debrick.img>" is just a place holder, you have to actually put the path of the debrick.img file you loaded onto your device, not <path_to_debrick.img>

SpikeyPsyche said:
I'm just going to bite my tongue on this one and help you.
"<path_to_debrick.img>" is just a place holder, you have to actually put the path of the debrick.img file you loaded onto your device, not <path_to_debrick.img>
Click to expand...
Click to collapse
Wow. That's all i have to say ... just wow! Atleast someone was able to "Bite their tongue" and let me know. Appreciate it. Will try again now. Thanks lol ... no words

SpikeyPsyche said:
I'm just going to bite my tongue on this one and help you.
"<path_to_debrick.img>" is just a place holder, you have to actually put the path of the debrick.img file you loaded onto your device, not <path_to_debrick.img>
Click to expand...
Click to collapse
Sent you a PM. Thanks again.

So i got the img to write onto sd card but still can't get into download mode when i hold the buttons. No signs of life still. This is what i got after i wrote the image
PaulMichael paul # dd if=/home/paul/Desktop/debrick/Unbrick_SM-N900A.img of=/dev/sdb1
400000+0 records in
400000+0 records out
204800000 bytes (205 MB) copied, 72.2845 s, 2.8 MB/s
PaulMichael paul # fdisk -l /dev/sdb1
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb1'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb1: 31.9 GB, 31910789120 bytes
1 heads, 32 sectors/track, 1947680 cylinders, total 62325760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1p1 1 61071359 30535679+ ee GPT
Any help would be appreciated. I even tried it twice with no luck. Also my new 32gb sd card won't read now when i put it reader into usb. No pop up or anything? Thanks guys.
***Edited*** also i was on MJ5 then did the Unofficial "Jump from Jellybean to kk" ... which image would i need then? And if someone has it can they send it to me please!

Something didn't go right with the debrick image writing. That fdisk command should have listed all the partitions on that disk, with should be 20+, and you are only seeing one.
Re-run writing the debrick image. Sometimes it fails on the first few tries.

SpikeyPsyche said:
Something didn't go right with the debrick image writing. That fdisk command should have listed all the partitions on that disk, with should be 20+, and you are only seeing one.
Re-run writing the debrick image. Sometimes it fails on the first few tries.
Click to expand...
Click to collapse
Tried writing it a few times but will keep trying. Atleast now i know where to look for the partitions to see. Thanks again.

Yeag3r24 said:
Tried writing it a few times but will keep trying. Atleast now i know where to look for the partitions to see. Thanks again.
Click to expand...
Click to collapse
You're not inputting the command to write the image correctly.
The last part should be of=/dev/sdb NOT of=/dev/sdb1. Lose the 1
You really didn't read the hard debrick OPs instructions closely. he explicitly says to ignore the partition number, being the 1, because you are overwriting the current partitions.
Correcting that issue with the command should write the image correctly, and you should be good to go from there

SpikeyPsyche said:
You're not inputting the command to write the image correctly.
The last part should be of=/dev/sdb NOT of=/dev/sdb1. Lose the 1
You really didn't read the hard debrick OPs instructions closely. he explicitly says to ignore the partition number, being the 1, because you are overwriting the current partitions.
Correcting that issue with the command should write the image correctly, and you should be good to go from there.
Click to expand...
Click to collapse
Funny you said that because i did just rewrite it twice without the 1 just as sdb and when i unplugged it and plugged it back into usb i did recieve about 6 pop ups but were all sd card readers showing on my desktop like i had 6 different usb readers with different size sd cards some

Here's the correct screenshot of whole desktop. Also battery was 65% when this all happened but hasn't been used since in last 2 days of trying to fix it so see no need why the battery would be dead, correct? I could have phone on for 2 days and not touch it and wouldn't be dead. Would still be at about 40-50% i would assume if left on untouched for a few days. I just know i could do this and see no reason why this shouldn't work. Do i need the MJ5 img or something since i was on that with unofficial KK on dynamickat?

SS

Yeag3r24 said:
SS
Click to expand...
Click to collapse
It looks like one of the partitions isn't being written correctly on the SD card for some reason.
How many partitions is the fdisk command showing?

SpikeyPsyche said:
It looks like one of the partitions isn't being written correctly on the SD card for some reason.
How many partitions is the fdisk command showing?
Click to expand...
Click to collapse
PaulMichael paul # dd if=/home/paul/Desktop/debrick/Unbrick_SM-N900A.img of=/dev/sdb
400000+0 records in
400000+0 records out
204800000 bytes (205 MB) copied, 74.1923 s, 2.8 MB/s
PaulMichael paul # fdisk -l /dev/sdb
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb1: 31.9 GB, 31910789120 bytes
1 heads, 32 sectors/track, 1947680 cylinders, total 62325760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1p1 1 61071359 30535679+ ee GPT

Yeag3r24 said:
PaulMichael paul # dd if=/home/paul/Desktop/debrick/Unbrick_SM-N900A.img of=/dev/sdb
400000+0 records in
400000+0 records out
204800000 bytes (205 MB) copied, 74.1923 s, 2.8 MB/s
PaulMichael paul # fdisk -l /dev/sdb
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb1: 31.9 GB, 31910789120 bytes
1 heads, 32 sectors/track, 1947680 cylinders, total 62325760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1p1 1 61071359 30535679+ ee GPT
Click to expand...
Click to collapse
Now it's back to one partition again. Very strange.

SpikeyPsyche said:
Now it's back to one partition again. Very strange.
Click to expand...
Click to collapse
Well today must be my day. I called to get replacement phone and girl was real cool and said I could just pick one up here locally at the support center. Luckily dude at support center was just as cool and just pretty much swapped it right out without even trying another battery or doing tests. However when he put my battery in replacement Note i stilll had 65% so who knows wtf i did. Lesson learned ... never pull out early when Odin looks like it freezes for a few mins. Just in time for the official KK root now that I'm actually on Official KK stock rom. Thanks again for all your help. Much appreciated!

Yeag3r24 said:
Well today must be my day. I called to get replacement phone and girl was real cool and said I could just pick one up here locally at the support center. Luckily dude at support center was just as cool and just pretty much swapped it right out without even trying another battery or doing tests. However when he put my battery in replacement Note i stilll had 65% so who knows wtf i did. Lesson learned ... never pull out early when Odin looks like it freezes for a few mins. Just in time for the official KK root now that I'm actually on Official KK stock rom. Thanks again for all your help. Much appreciated!
Click to expand...
Click to collapse
No prob. I hope you have better luck in the future.

Please delete.
Sent from my SM-N900A using XDA Free mobile app

N900A 4.4.2, 32GB Unbrick HELP!!!
Yeag3r24 said:
Well today must be my day. I called to get replacement phone and girl was real cool and said I could just pick one up here locally at the support center. Luckily dude at support center was just as cool and just pretty much swapped it right out without even trying another battery or doing tests. However when he put my battery in replacement Note i stilll had 65% so who knows wtf i did. Lesson learned ... never pull out early when Odin looks like it freezes for a few mins. Just in time for the official KK root now that I'm actually on Official KK stock rom. Thanks again for all your help. Much appreciated!
Click to expand...
Click to collapse
Help !!!
I have a N900A, tried to unlock the phone and now is dead.
I would like to know how you solve your problem?

Related

Help with GNU/Linux -- Grub problems

I am trying to install MintLinux, but problem persists on normal ubuntu install disk.
Below is the output of fdisk
Code:
[email protected] ~ $ sudo fdisk -l
Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xffffffff
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 13643 109478946 7 HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3 20048 77825 464101785 7 HPFS/NTFS
Partition 3 does not end on cylinder boundary.
/dev/sda4 13644 20047 51440130 83 Linux
Partition table entries are not in disk order
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc4ee2648
Device Boot Start End Blocks Id System
/dev/sdb1 1 121602 976759808 7 HPFS/N
I followed thisgrub install guide after the install from a live cd.
The problem is grub does not install after the OS install. Windows will load up automaticlly, the install is fine and I can see the files from the live cd.
Code:
[email protected] ~ $ sudo grub
Probing devices to guess BIOS drives. This may take a long time.
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> find /boot/grub/stage1
find /boot/grub/stage1
(hd0,3)
grub> root (hd0,3)
root (hd0,3)
grub> setup (hd0)
setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,3)/boot/grub/stage2 /boot/grub/menu.lst"... failed
Error 22: No such partition
grub>
Above is the output of the guide for installing grub. It seems to file creating the grub menu.lst file, which is not found in the /boot/grub/ directory.
Thanks for any help.
Maybe your linux isn't using legacy Grub, (which would explain why you don't see the menu.lst file) it could be using grub2.
It works a bit differently.
http://www.dedoimedo.com/computers/grub-2.html
Edit--
Well if this is based off of Ubuntu 9.10 then it has grub2. It looks like there are 2 drives, which one has the windows install and which has the linux ?
Its possible they are both sata drives, and it's possible that you have the BIOS set to boot from the windows drive. (of course they could both be on the same drive).
I had a problem sort of like this, but I actually got the GRUB menu and then it would poo poo.

[Q] Partition the "install/bootable" sdcard

Hi,
I'm in the process of preparing my sd card to try many of the available ROMs and noticed that common step is that a bootable sdcard partition is needed (either for clockwork recovery, or the actual bootable image)
I was thinking of partitioning my existing 4GB microsd card into 2 partitions 512MB,3.5GB and use the first partition for nook install purposes.
i.e the first partition/drive letter in windows will be the target of the image.
Will this work?
ps: created the two partitions using ubuntu's disk utility (virtualbox), the first one has the bootable flag..
Update:
Will attempt autonooter 3.0 like this!
dd command and output:
Code:
[email protected]:~$ sudo dd if=/mnt/share/auto-nooter-3.0.0.img of=/dev/sdb1
249344+0 records in
249344+0 records out
127664128 bytes (128 MB) copied, 32.303 s, 4.0 MB/s
[email protected]:~$ ls -l /dev/sdb1
brw-rw---- 1 root disk 8, 17 2011-03-02 17:58 /dev/sdb1
Update2:
It did not work. (autonooter didnt work/run)
I simply see two drives mounted (MyNOOKColor and AutoNooter2), NC reports a damaged sd card.
Update3:
All ok now, used one partition with autonooter
thanks

[Q] Completely Hosed - Recovery Impossible?

Yeah, yeah. Sounds like a million other posts. I am a unix/linux sort of guy, so I'm quite familiar with navigating and working in *nix based operating systems.
Here is the synopsis:
Without an SD card, the device will not boot. I can hear the USB cycle and I'm stuck at a black screen. Sounds normal so far.
After booting up CWM, I can adb in. My first step was to check devices.
/dev/block # cd /dev/block
cd /dev/block
/dev/block # ls
ls
loop0 loop5 mmcblk0p2 ram10 ram15 ram6
loop1 loop6 mmcblk1 ram11 ram2 ram7
loop2 loop7 platform ram12 ram3 ram8
loop3 mmcblk0 ram0 ram13 ram4 ram9
loop4 mmcblk0p1 ram1 ram14 ram5
As you can see, there are a few missing block devices. I proceeded to mount each of these. Only mmcblk0p1 had anything on it: the boot partition, as I expected. Mmcblk1 was the device name for the SDCard, which deviates from what I would have expected. Blk0p2 contained nothing and was not mountable.
Next, I tried to do a 'mknod' to create the devices. This was successful to a degree, but did not actually create working devices. I attempted to mkfs.ext2 on them, that failed. For grins, I tried it on p1 and p2. The only one that worked was p1.
At this point, I decided to try and flash the boot.img I retrieved from here: "mrm3.net/nook-color-recover-any-bricked-device/" and see what I could do to get the device up and running - any self booting would be an improvement, I thought. This too failed. The 'dd' was successful and the partition now contained boot info, but when i tried to boot up, I still received a black screen:
/dev/block # dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
144522+0 records in
144522+0 records out
73995264 bytes (70.6MB) copied, 44.914978 seconds, 1.6MB/s
/dev/block #
When I try to flash ANY rom, I get failures - obviously because there's no place for them to flash to.
'dmesg' doesn't contain any useful information. The device seems hosed. The last rom I was running was Cyanogen nightly #69, which wouldn't allow me to mount SDCard or do anything useful. When I tried to install nightly #80, I found that the device was no longer usable.
Hopefully this was thorough enough, I refrained from typing out the obvious stuff, but please feel free to suggest things. I'm stumped. I still think it can be saved, but I don't have a ton of hope.
Thanks a lot for giving this a read. I really hope someone can help out.
--
j.k
Ill add you to the list with everyone else here of people who are more advanced than I. But one of the fist things I learned about the Nook is that its pretty much impossible to brick. I'm sure someone from the list will be by to help soon.
I really hope so.
Logically, if the device nodes can be recreated, I could flash a new mod in. Perhaps I'm going about that the wrong way.
sangandongo said:
Next, I tried to do a 'mknod' to create the devices. This was successful to a degree, but did not actually create working devices. I attempted to mkfs.ext2 on them, that failed. For grins, I tried it on p1 and p2. The only one that worked was p1.
Click to expand...
Click to collapse
Have you verified that the partition table is actually intact/correct? No point trying to create device nodes if the underlying devices aren't there. What does "fdisk -l /dev/block/mmcblk0" give you, and how does it compare to the standard layout?
Maybe check notes with the OP of this thread -- appears that both of you have essentially the same problem.
jll544 said:
Have you verified that the partition table is actually intact/correct? No point trying to create device nodes if the underlying devices aren't there. What does "fdisk -l /dev/block/mmcblk0" give you, and how does it compare to the standard layout?
Maybe check notes with the OP of this thread -- appears that both of you have essentially the same problem.
Click to expand...
Click to collapse
Sorry, I should have included that earlier. The partition table is b0rked. I also had attempted applying the zips from the [ZIP][RECOVERY] EMMC Recovery Repair thread to no avail.
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
4 heads, 16 sectors/track, 242432 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 15260 488312 b Win95 FAT32
/dev/block/mmcblk0p2 15261 242432 7269504 83 Linux
Not to sounds like a smartass (or maybe a dumbass) but have you tried to restore back to stock?
Yes. In my initial post, I stated that no restoring via zip works.
Currently I am attempting to rebuild the partition table as mine is hosed. I get the following output though, which is troubling by comparison to what I should be seeing:
~ # busybox fdisk /dev/block/mmcblk0
busybox fdisk /dev/block/mmcblk0
The number of cylinders for this disk is set to 242432.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
p
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
4 heads, 16 sectors/track, 242432 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 15260 488312 b Win95 FAT32
/dev/block/mmcblk0p2 15261 242432 7269504 83 Linux
Command (m for help): d
d
Partition number (1-4):
Right, virtually all .zip restore files are filesystem-level recovery and assume that the partition table is unchanged.
Try forcing the geometry using "fdisk -H 255 -S 63 /dev/block/mmcblk0"
Before I write this, does the following look like what you'd expect? I mean, it makes sense considering...
Code:
~ # fdisk -H 255 -S 63 /dev/block/mmcblk0
fdisk -H 255 -S 63 /dev/block/mmcblk0
Code:
Command (m for help): p
p
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 61 488312 b Win95 FAT32
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 0, 17)
Partition 1 has different physical/logical endings:
phys=(1023, 3, 16) logical=(60, 202, 14)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 61 966 7269504 83 Linux
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(1023, 3, 16) logical=(60, 202, 15)
Partition 2 has different physical/logical endings:
phys=(1023, 3, 16) logical=(965, 205, 8)
Partition 2 does not end on cylinder boundary
jll544 said:
Right, virtually all .zip restore files are filesystem-level recovery and assume that the partition table is unchanged.
Try forcing the geometry using "fdisk -H 255 -S 63 /dev/block/mmcblk0"
Click to expand...
Click to collapse
What he said. Texas Instrumentss OMAP devices such as the nook require that media, whether sd, mmc, etc, be formatted with particular geometry. One that's set up, you can create the partitions normally and forget it ever happened. Remember that the first partition should be FAT, and this is where the kernel (uImage) and ramdisk (uRamdisk) as well as bootloader (u-boot.bin) and pre-bootloader (mlo) go.
See here for more info.
I believe the version of busybox available to me on this 3.0.2.8 CWR SD image is too old to accomplish what the instructions on this post state: http://forum.xda-developers.com/showpost.php?p=13971291&postcount=110
I've been unable to find a bundle of the binaries yet, but I'm still looking. That being said, I changed the geometry of the partition table and wrote the changes, then tried to dd again - fail.
sangandongo said:
Before I write this, does the following look like what you'd expect? I mean, it makes sense considering...
Code:
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 61 488312 b Win95 FAT32
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 0, 17)
Partition 1 has different physical/logical endings:
phys=(1023, 3, 16) logical=(60, 202, 14)
Partition 1 does not end on cylinder boundary
<snip>
Click to expand...
Click to collapse
You mean you wrote the partition table as shown above? That won't work. You need to run fdisk with the corrected geometry, delete the existing partitions, and create new ones. Those warnings say that your partition LBA's are still aligned to the incorrect geometry.
What happens when remove all if the partitioning on the emmc, format it, and repartition it? For some reason ive found linux has a tendency to corrupt storage bits of memory chips altogether and the only way to restore was to completely start over clean. Also, anyone tested for bad blocks? One of my laptops decided to take a **** and the only way I'm able to install an os on it is by installing ubuntu on half the hard drive. Maybe if it is bad blocks we could repartition around them?
Sent from my PC36100 using Tapatalk
RileyGrant said:
What happens when remove all if the partitioning on the emmc, format it, and repartition it? For some reason ive found linux has a tendency to corrupt storage bits of memory chips altogether and the only way to restore was to completely start over clean. Also, anyone tested for bad blocks? One of my laptops decided to take a **** and the only way I'm able to install an os on it is by installing ubuntu on half the hard drive. Maybe if it is bad blocks we could repartition around them?
Click to expand...
Click to collapse
Save the FUD for somewhere else....
RileyGrant said:
For some reason ive found linux has a tendency to corrupt storage bits of memory chips altogether and the only way to restore was to completely start over clean.
Click to expand...
Click to collapse
LOL, just about any operating system will write an unsuitable partition table if the end user commands it to do so. No, the OP has omitted details about what he did to get into his situation, but there is no chance it just happened on its own (i.e., his partition layout is technically valid but unbootable by OMAP). If we're going to hazard wild guesses, I'd say he was trying to install Backtrack or some other non-Android Linux distribution.
Hahah I only used linux as an example because ubuntu its all I have run for a coupe years now. but you sir are completely oblivious too the fact that evo users, thunderbolt users and now nook users have reported the same issue and symptoms, always on gingerbread. A self corruption of internal memory.
Sent from my PC36100 using Tapatalk
jll544 said:
LOL, just about any operating system will write an unsuitable partition table if the end user commands it to do so. No, the OP has omitted details about what he did to get into his situation, but there is no chance it just happened on its own (i.e., his partition layout is technically valid but unbootable by OMAP). If we're going to hazard wild guesses, I'd say he was trying to install Backtrack or some other non-Android Linux distribution.
Click to expand...
Click to collapse
In this case, I believe it was caused either by "fixing permissions" while using Rom Manager, or by doing it in CWM. This was in an attempt to get out of CM7 nightly #69, which all but rendered my system inoperable.
I agree with you though: there's likely no reason why linux would cause corruption on a disk. If anything, an app might be to blame, but it would have to explicitly do so.
That aside, I am very close to getting my Nook fixed. I rebuilt the partition table this morning after loading busybox 1.18 onto my SD card. ran 'fdisk' with the proper geometry, deleted the existing partitions, built each out to standard specs, then changed the filesystem id for each. After that I did a mkfs.vfat and mke2fs on the appropriate partitions and wrote the configuration.
I rebooted, did a dd of a 1.0.1 boot image to mmcblk0p1 and of a system image to mmcblk0p5 and tried to boot, but I'm still getting a black screen.
Here is my current partition table after I resized it and marked the partitions with their respective types:
Code:
/busybox fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
255 heads, 63 sectors/track, 965 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 9 72261 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 10 18 72292+ c Win95 FAT32 (LBA)
/dev/block/mmcblk0p3 19 56 305235 83 Linux
/dev/block/mmcblk0p4 57 965 7301542+ 5 Extended
/dev/block/mmcblk0p5 57 114 465853+ 83 Linux
/dev/block/mmcblk0p6 115 789 5421906 83 Linux
/dev/block/mmcblk0p7 790 834 361431 83 Linux
/dev/block/mmcblk0p8 835 965 1052226 c Win95 FAT32 (LBA)
I made the Fat32 Partitions using mk.vfat and the linux partitions with mke2fs -j -L <label>. Something still just isn't right.
Blah. I get so OCD about this sort of ****. I need to just go outside and play, this is driving me nuts.
sangandongo said:
Blah. I get so OCD about this sort of ****. I need to just go outside and play, this is driving me nuts.
Click to expand...
Click to collapse
It's not booting because you're missing your /rom partition. There is no data in /mmcblk0p2, which init calls for all your device info. Hopefully you have a backup of that as well. Without it, you won't be able to run any roms with your nook color.
And unfortunately that is a partition that is not good to share with anyone else besides each individual nook owner because is contains all the unique Device identifiers for your Nook. If two people would have the same Device info and you're both logged into your B&N stock, it will error out on the B&N server side and de-register your device and the other person as well.
If you need further guidance, PM me and I'll see what I can do to help to resolve your /rom partition issue.
-Racks
I DD'd every partition off my friend's Nook. Every one. Just to see if I could get this puppy running. Still black.

[Q] With ADB shell, why does "df /data" lie?

I'm new to ADB, but a long time linux user/admin.
I just created dd image of /data (via dd if=/dev/block/userdata ....) as backup.
The resulting image file was just over 2 GB.
But per df, it's only 1 GB total:
==> df /data
Filesystem Size Used Free Blksize
/data 1G 894M 1G 4096
===
It looks to me that the first 1G number is just plain wrong. In particular it should be roughly Used+Free, which it is not.
dd agrees it should be roughly 2 GB
==> dd if=/dev/block/userdata of=userdata.dd bs=4K
536870912+0 records in
536870912+0 records out
2147483648 bytes transferred in 8157.701 secs (263246 bytes/sec)
===
Can anyone explain to me what's going on, and equally can they tell me where on xda this type of question belongs. I hope to get familiar the Android OS and this is my first real exposure to ADB shell.
Thanks
Greg
Aung Thiha said:
your file is not exactly 2GB. It's just under 2GB which means it may be 1.99GB or something. That's why it shows only 1GB. I does not show you in decimal.
Oh, btw, do you know how to get the result with a decimal.
thanks
Click to expand...
Click to collapse
My old Droid died, but I have DroidX now for experimenting with and I'm seeing similar behavior. Thanks for the explanation.
And no, I don't know how to get the result with a decimal.

flash recovery partition from android system/userland

I'm having trouble with fastboot (see my thread here: https://forum.xda-developers.com/xperia-xz1-compact/help/issues-fastboot-t3971227, maybe you can help). However, I can seem to flash sony signed software in sony-service mode using newflasher. That's nice, but I haven't used stock android in years. I am very used to lineageos without gapps---nice and clean. So, for me, until I get rid of stock and get a clean flash of lineage, I'm really not happy.
Given my state of affairs, I'm wondering about flashing one of the exploitable sony stocks and to get root, then flashing the recovery partition with twrp from userland. Then, potentially, i could boot to that recovery and maybe (idk) flash a new system ROM. Does anyone have any tips or suggestions?
It should work as you outlined.
Still having BL unlocked and not usable fastboot seems like a major disadvantage to me.
Did you try with different PC to see if it is not due to usb chipset or something?
Preferably using usb 2.0 only chipset?
Maybe trying that from different OSes too - linux vs win?
Thanks for the reply. I got the exploitable firmware downloaded and flashed as well as your renosploit kit. Hasn't found a root shell yet although I'm hopeful it will eventually (I haven't read the details but I understand that the underlying vuln is a race condition).
One question: I suppose that given that tmp root status, it should be possible to copy a su binary over and make root permanent, that would make experimentation easier, I think. And if whatever I try fails the first time I wouldn't want to have to wait for the race condition exploit every time I wanted to reboot. Am I on the right track? If so, I suppose I need to either compile or download a su binary and possibly a supersu.apk in order to manage it. Are those already available for the xz1 compact?
@apexofservice, planting su binary is possible into /oem for example, it would switch the user to root, but without any better permissions, due to selinux, so it is useless.
But since you have your BL unlocked, you do not need that. As soon as you have twrp, you can flash magisk to have root on runtime easily. Or just enter twrp to have root in recovery.
j4nn said:
@apexofservice, planting su binary is possible into /oem for example, it would switch the user to root, but without any better permissions, due to selinux, so it is useless.
But since you have your BL unlocked, you do not need that. As soon as you have twrp, you can flash magisk to have root on runtime easily. Or just enter twrp to have root in recovery.
Click to expand...
Click to collapse
Got it. Thank you for this detail. So you think my best bet is to just use the root shell to `dd` the twrp image directly to some /dev? And then I would just `adb reboot recovery` and in theory I'm good to go.
Cool. I got a root shell with your exploit kit. I've got two questions at this point.
1) If my bootloader unlock had fully succeeded, would I have expected to find all 0x0 in the TA partition? In fact, there is data in there, so I went ahead and downloaded it. I skimmed the data with xxd and there are some sections of 0x0 as well though.
2) Second question, I've read that xperia's don't have a proper "recovery" partition the way some other boards do. So is FOTAkernel actually where I want to write twrp.img? Also, it would seem that this info is actually encoded somewhere in the fastboot client since on a working fastboot, you can just say "flash recovery" and it knows what part of the disk to write to. Any info about partition layouts on lilac and xperia's in general would be greatly appreciated.
apexofservice said:
Cool. I got a root shell with your exploit kit. I've got two questions at this point.
1) If my bootloader unlock had fully succeeded, would I have expected to find all 0x0 in the TA partition? In fact, there is data in there, so I went ahead and downloaded it. I skimmed the data with xxd and there are some sections of 0x0 as well though.
2) Second question, I've read that xperia's don't have a proper "recovery" partition the way some other boards do. So is FOTAkernel actually where I want to write twrp.img? Also, it would seem that this info is actually encoded somewhere in the fastboot client since on a working fastboot, you can just say "flash recovery" and it knows what part of the disk to write to. Any info about partition layouts on lilac and xperia's in general would be greatly appreciated.
Click to expand...
Click to collapse
1 - The TA partition contains significant amounts of other information as well. So it won't be empty.
The standard way of dealing with it is to not mess with it at all.
2 - The FOTAkernel is the recovery.
2a - The partition layout can be found from the stock firmware image in the "partition-image-LUNZ_X-FLASH-ALL-C93B.sin" file where "Z" is the LUN number. Once you extract the SIN file, you're left with an EFI partition header.
I've attached a CSV file that contains the layout as specified in the "partition-image-LUN0_X-FLASH-ALL-C93B.sin" file.
The layout for LUNs 1 and 2 both contain a single 4MB partition for "xbl" and "xblbak" respectively, so they're not as interesting.
@pbarrette, thanks! I tried the naive approach:
Code:
d if=twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img of=/dev/block/bootdevice/by-name/FOTAKernel <
60128+0 records in
60128+0 records out
30785536 bytes transferred in 2.100 secs (14659779 bytes/sec)
G8441:/data/local/tmp # sync
G8441:/data/local/tmp # sync
G8441:/data/local/tmp # reboot recovery
Alas, it just rebooted back to system. It did seem to take a bit longer, so it's possible that it tried to boot from FOTAKernel and failed then fell back to system. I've just got a new root shell so I can look in startup logs from dmesg to see if there's anything of interest.
Also, I'm probably missing something really obvious. Thanks for any insight!
Reading dmesg now, this seems quite relevant (I recall booting to recovery on my z3 compact by touching a file in /cache/recovery). I'll post it here but I'm still reading the dmesg.
Code:
[ 7.406109] bs_roots: recovery filesystem table
[ 7.406120] bs_roots: =========================
[ 7.406125] bs_roots: 0 /data ext4 /dev/block/bootdevice/by-name/userdata
[ 7.406130] bs_roots: 1 /oem ext4 /dev/block/bootdevice/by-name/oem
[ 7.406134] bs_roots: 2 /cache ext4 /dev/block/bootdevice/by-name/cache
[ 7.406139] bs_roots: 3 /rca ext4 /dev/block/bootdevice/by-name/appslog
[ 7.406143] bs_roots: 4 /idd ext4 /dev/block/bootdevice/by-name/diag
[ 7.406148] bs_roots: 5 /storage/sdcard1 vfat /devices/soc/c0a4900.sdhci/mmc_host*
[ 7.406153] bs_roots: 6 none swap /dev/block/zram0
[ 7.406157] bs_roots: 7 /persistent emmc /dev/block/bootdevice/by-name/frp
[ 7.406162] bs_roots: 8 /misc emmc /dev/block/bootdevice/by-name/misc
[ 7.406167] bs_roots: 9 /firmware vfat /dev/block/bootdevice/by-name/modem
[ 7.406172] bs_roots: 10 /bt_firmware vfat /dev/block/bootdevice/by-name/bluetooth
[ 7.406177] bs_roots: 11 /dsp ext4 /dev/block/bootdevice/by-name/dsp
[ 7.406182] bs_roots: 12 /persist ext4 /dev/block/bootdevice/by-name/persist
[ 7.406187] bs_roots: 13 /boot/modem_fs1 emmc /dev/block/bootdevice/by-name/modemst1
[ 7.406191] bs_roots: 14 /boot/modem_fs2 emmc /dev/block/bootdevice/by-name/modemst2
[ 7.406195] bs_roots: 15 auto auto /devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto/usb*
[ 7.406199] bs_roots: 16 /qns ext4 /dev/block/bootdevice/by-name/Qnovo
[ 7.406203] bs_roots: 17 /tmp ramdisk ramdisk
[ 7.406206] bs_roots:
[ 7.408585] MR: Mounting /cache ourselves
[ 7.412318] EXT4-fs (sda53): recovery complete
[ 7.412666] EXT4-fs (sda53): mounted filesystem with ordered data mode. Opts:
[ 7.413213] MR: fopen() failed -/cache/recovery/command (No such file or directory)
[ 7.413219] MR: Unmounting /cache
[ 7.413959] MR: Fail to get command from /cache/recovery/command, trying /misc
[ 7.414272] MR: Unknown wipe command
[ 7.414280] MR: Buffer is empty from /dev/block/bootdevice/by-name/misc with command 0
[ 7.417568] MR: TA_MASTER_RESET value = 0
[ 7.418475] init: Service 'exec 3 (/sbin/mr)' (pid 605) exited with status 0 waiting took 0.022997 se
conds
[ 7.418513] init: starting service 'exec 4 (/sbin/ffu)'...
[ 7.418846] init: SVC_EXEC pid 609 (uid 0 gid 0+0 context u:r:recovery:s0) started; waiting...
[ 7.419833] init: Service 'exec 4 (/sbin/ffu)' (pid 609) exited with status 255 waiting took 0.001316
seconds
------
One more update, I did a sanity check that that dd command is actually overwriting FOTAkernel. It doesn't look like it's working:
Code:
G8441:/data/local/tmp # dd if=/dev/block/bootdevice/by-name/FOTAKernel of=FOTAKernel-extracted.img
131072+0 records in
131072+0 records out
67108864 bytes transferred in 0.812 secs (82646384 bytes/sec)
G8441:/data/local/tmp # chown shell:shell FOTAKernel-extracted.img
G8441:/data/local/tmp # dd if=twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img of=/dev/block/bootdevice/by-name/FOTAKernel
60128+0 records in
60128+0 records out
30785536 bytes transferred in 2.037 secs (15113174 bytes/sec)
G8441:/data/local/tmp # sync
G8441:/data/local/tmp # sync
=/dev/block/bootdevice/by-name/FOTAKernel of=FOTAKernel-extracted-2.img <
131072+0 records in
131072+0 records out
67108864 bytes transferred in 0.846 secs (79324898 bytes/sec)
And there's no `diff` on the device, so I pulled the files back to a laptop then:
Code:
$ diff FOTAKernel-extracted-2.img FOTAKernel-extracted.img
$ diff FOTAKernel-extracted.img twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img
Binary files FOTAKernel-extracted.img and twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img differ
@j4nn @pbarrette doing some more reading, I found some interesting details about booting to recovery stored on FOTAKernel here:
https://twrp.me/sony/sonyxperiaxz.html
https://twrp.me/sony/sonyxperiaz3compact.html
Looks like you really need a kernel that has the ramdisk extraction setup. So I'm guessing that once I figure out why dd isn''t working as I expected (see above) that I need to overwrite the main stock kernel with an alternative.
Yes, a dd extraction of the partition will be different than the TWRP image.
That's because the TWRP image is only ~35MB, while "dd" is extracting the entire 64MB partition.
So, if you do a visual diff on the files, you should see that what's actually different is the fact that the partition extraction is filled with zeros after the end of the TWRP image.
You're doing a "reboot recovery", but have you tried:
1 - Turn the phone off
2 - Press and hold [Vol-Down].
3 - Press and hold [Power].
4 - Release [Power] at power on.
5 - Release [Vol-Down] when you see an actual boot screen (after the bootloader unlocked screen).
I don't remember the "reboot recovery" command ever working right for me.
Edit to add: That's also a really old version of TWRP that you seem to be using.
pbarrette said:
Yes, a dd extraction of the partition will be different than the TWRP image.
That's because the TWRP image is only ~35MB, while "dd" is extracting the entire 64MB partition.
So, if you do a visual diff on the files, you should see that what's actually different is the fact that the partition extraction is filled with zeros after the end of the TWRP image.
You're doing a "reboot recovery", but have you tried:
1 - Turn the phone off
2 - Press and hold [Vol-Down].
3 - Press and hold [Power].
4 - Release [Power] at power on.
5 - Release [Vol-Down] when you see an actual boot screen (after the bootloader unlocked screen).
I don't remember the "reboot recovery" command ever working right for me.
Edit to add: That's also a really old version of TWRP that you seem to be using.
Click to expand...
Click to collapse
Hot damn. Thanks, I'm booted to twrp!
Note: i was using the older version for android 8 since I'm currently on the android 8 exploitable rom!
apexofservice said:
@j4nn @pbarrette doing some more reading, I found some interesting details about booting to recovery stored on FOTAKernel here:
https://twrp.me/sony/sonyxperiaxz.html
https://twrp.me/sony/sonyxperiaz3compact.html
Looks like you really need a kernel that has the ramdisk extraction setup. So I'm guessing that once I figure out why dd isn''t working as I expected (see above) that I need to overwrite the main stock kernel with an alternative.
Click to expand...
Click to collapse
XZ1 compact never needed the recovery with this extraction stuff. But according to
https://twrp.me/sony/sonyxperiaxzpremium.html
XZ Premium (which is also yoshino platform, the same as xz1c is) seems to need that - but I am not sure if it is still valid.
It might got fixed even in xzp case with some bootloader update to have it working the same as with other yoshino phones.
Sorry for my late answer, it's good you already have it working.
But I still wonder about that usb problem with fastboot - have you tried a different pc with different usb controller, preferably usb 2.0 type (not 3.0 one)?
j4nn said:
XZ1 compact never needed the recovery with this extraction stuff. But according to
https://twrp.me/sony/sonyxperiaxzpremium.html
XZ Premium (which is also yoshino platform, the same as xz1c is) seems to need that - but I am not sure if it is still valid.
It might got fixed even in xzp case with some bootloader update to have it working the same as with other yoshino phones.
Sorry for my late answer, it's good you already have it working.
But I still wonder about that usb problem with fastboot - have you tried a different pc with different usb controller, preferably usb 2.0 type (not 3.0 one)?
Click to expand...
Click to collapse
I haven't yet. Well, I have sorta. When I first ran into issues, I tried it with a different laptop, got the same result. Now that laptop was also a thinkpad (although a newer model) and was also running debian linux. I don't have any computers with Windows. I was going to reboot this laptop with usb3.0 kernel mod blacklisted and only using hci but I didn't get around to it yet (especially once I got twrp flashed and working, then I mainly wanted to get started actually using the phone i bought ). However, if it were a usb thing, wouldn't we expect that newflasher would fail too? Still, it is very curious about the fastboot thing, however, so I'm willing to keep playing with it.
@apexofservice, I am not sure if blacklisting usb3 drivers would help. Sometime there may be present multiple usb ports, some connected to usb 3.0 host controller, others just usb 2.0 controller.
Even if newflasher works, it is not that simple, that fastboot should work too.
Fastboot (including it's usb support) is implemented in UEFI bootloader, the ABL component of it (Android Boot Loader).
So usb stack is implemented by UEFI fw.
While newflasher uses flash mode, which is running XFL - a linux (bare bone android) kernel, running the lilo/loader userspace application. So there is in my opinion quite good usb stack implemented by linux kernel.
So it can easily be some incompatibility within UEFI usb stack implementation used with fastboot.

Categories

Resources