Related
I am new to Android, want to customize the system follow the tutorials, but found the Note is different to other Android phones:
for other phone, there will be a /proc/mtd and list all the partitions with mount point, but on Note I can only found /proc/fs, with 3 folders: ext4 jbd2 nfsd
and the mount table is like this:
rootfs on / type rootfs (ro,relatime)
...
/dev/block/mmcblk0p9 on /system type ext4
/dev/block/mmcblk0p7 on /cache type ext4
/dev/block/mmcblk0p1 on /efs type ext4
for other devices, e.g., HTC Wildfire, the partition will like below:
mtd1: recovery
mtd3: system"
...
I downloaded the CF-Root flasher, by Chainfire, found basiclly it's flashing a zImage into /dev/block/mmcblk0p5. I mount the partition before flash and seems there is only some picture files there. how can we know the machine will boot to this partition in recovery mode?
nobody knows? so far what I get seems that the phone do not use the /recovery partition, but use same kernel to handle the recovery state. during boot it will search for /system/etc/install-recovery.sh, maybe that will trigger the recovery process?
The Note, like many other Samsung phones, does not use or follow the mtd layout - at all.
Indeed there is a single kernel for both normal boot and recovery. Normal boot uses init.rc script, recovery boot uses recovery.rc script.
There is a "spare" partition that is both called recovery and available, but it isn't used.
This is the place for various bits and pieces of information/facts/wtf collected whilst digging around in our TF701.
Use at your own peril.
UPDATE: I know the staging partition is where to blob (bootloader) goes, but as I found out, that's only half of the story.
It seems like the bootloader takes the contents of staging at boot time and puts them where they belong.
Now if anybody has more details about this, that would be great.
Partitions
Code:
name device mountpoint fs description
/dev/block/platform/sdhci-tegra.3/ADF /dev/block/mmcblk0p7 /ADF ext4 ?
/dev/block/platform/sdhci-tegra.3/APD /dev/block/mmcblk0p6 /APD ext4 ASUS Product Demo
/dev/block/platform/sdhci-tegra.3/APP /dev/block/mmcblk0p4 /system ext4 Android OS
/dev/block/platform/sdhci-tegra.3/CAC /dev/block/mmcblk0p5 /cache ext4 recovery logs
/dev/block/platform/sdhci-tegra.3/CRA /dev/block/mmcblk0p11 ?
/dev/block/platform/sdhci-tegra.3/DTB /dev/block/mmcblk0p2 ?
/dev/block/platform/sdhci-tegra.3/EKS /dev/block/mmcblk0p13 NVEKSP
/dev/block/platform/sdhci-tegra.3/LNX /dev/block/mmcblk0p3 Linux kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/MDA /dev/block/mmcblk0p12 ?
/dev/block/platform/sdhci-tegra.3/MSC /dev/block/mmcblk0p8 empty (misc, bootloader etc.)
/dev/block/platform/sdhci-tegra.3/PER /dev/block/mmcblk0p10 /persist ext4 config/calibration data
/dev/block/platform/sdhci-tegra.3/SOS /dev/block/mmcblk0p1 Recovery kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/UDA /dev/block/mmcblk0p14 /data ext4 Android user data
/dev/block/platform/sdhci-tegra.3/USP /dev/block/mmcblk0p9 Staging (blob)
recovery.fstab
Code:
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro wait
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/MDA
/dev/block/platform/sdhci-tegra.3/by-name/MSC /misc emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/LNX /boot emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/SOS /recovery emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/USP /staging emmc defaults defaults
/devices/platform/sdhci-tegra.2/mmc_host/mmc1 /storage/sdcard1 vfat default voldmanaged=sdcard:auto
/devices/platform/tegra-ehci.0 /mnt/usbdrive vfat default voldmanaged=usbdrive:auto
Blob
Code:
name size description status
[U]10.14.1.47:[/U] [ATTACH]2435244._xfImport[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (original) [ATTACH]2435246._xfImport[/ATTACH]
blob.BC1 8,192 Bytes ? (original) [ATTACH]2435245._xfImport[/ATTACH]
blob.EBT 1,396,736 Bytes Bootloader (original) [ATTACH]2435247._xfImport[/ATTACH]
blob.PT 2,202 Bytes Partition Table (original) [ATTACH]2435248._xfImport[/ATTACH]
[U]10.26.1.7:[/U] [ATTACH]2435238._xfImport[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (unchanged) [ATTACH]2435241._xfImport[/ATTACH]
blob.BC1 8,192 Bytes ? (changed) [ATTACH]2435240._xfImport[/ATTACH]
blob.EBT 1,421,312 Bytes Bootloader (changed) [ATTACH]2435242._xfImport[/ATTACH]
Unbrick
How to unbrick a TF701 that still has fastboot running (possibly partially redundant):
WARNING: Any damage caused by following these instructions...
Yeah, right... Nevermind that... If your fastboot works, this will save your tablet
Required tools: I assume you have them already
Required files:
UL-K00C-xx-10.14.1.47-user.zip (on micro SD card in TF701)
10.14.1.47 blob and boot.img (unpacked from UL-K00C-xx-10.14.1.47-user.zip)
drgravy's recovery.img
Code:
fastboot erase boot
fastboot erase staging
fastboot format system
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery.img
fastboot reboot-bootloader
check the version displayed. Is it 10.14.1.47? if not, hard reset to bootloader ([vol-] + [power])
boot recovery kernel (RCK)
install zip
choose zip from sdcard
UL-K00C-xx-10.14.1.47-user.zip
Yes
wait and pray to odin
+++ go back +++
reboot system now
Yes - Disable recovery flash (doesn't actually matter)
Yes - Root device (/system/xbin/su) (just kidding, this doesn't work)
Please consider clicking thanks
Sources:
Lots of own work
http://forum.xda-developers.com/showpost.php?p=47767352&postcount=71
https://github.com/AndroidRoot/BlobTools
im trying to find pretty much the same info
mmcblk0p? for boot and external_sd
This helped alot thanks!
nevermind find both
LNX = boot
/dev/block/mmcblk1p1 is external_sd
schmeggy929 said:
im trying to find pretty much the same info
mmcblk0p? for boot and external_sd
This helped alot thanks!
nevermind find both
LNX = boot
/dev/block/mmcblk1p1 is external_sd
Click to expand...
Click to collapse
things that will appear here tomorrow:
by name symlinks
recovery fstab info
unpacked blob contents
more detailed bootloader related stuff
anything fun I'll find on the way
for the next 12 hours that's it...
lpdunwell said:
This is the place for various bits and pieces of information/facts/wtf collected whilst digging around in our TF701.
Use at your own peril.
UPDATE: I know the staging partition is where to blob (bootloader) goes, but as I found out, that's only half of the story.
It seems like the bootloader takes the contents of staging at boot time and puts them where they belong.
Now if anybody has more details about this, that would be great.
Partitions
Code:
name device mountpoint fs description
/dev/block/platform/sdhci-tegra.3/ADF /dev/block/mmcblk0p7 /ADF ext4 ?
/dev/block/platform/sdhci-tegra.3/APD /dev/block/mmcblk0p6 /APD ext4 ASUS Product Demo
/dev/block/platform/sdhci-tegra.3/APP /dev/block/mmcblk0p4 /system ext4 Android OS
/dev/block/platform/sdhci-tegra.3/CAC /dev/block/mmcblk0p5 /cache ext4 recovery logs
/dev/block/platform/sdhci-tegra.3/CRA /dev/block/mmcblk0p11 ?
/dev/block/platform/sdhci-tegra.3/DTB /dev/block/mmcblk0p2 ?
/dev/block/platform/sdhci-tegra.3/EKS /dev/block/mmcblk0p13 NVEKSP
/dev/block/platform/sdhci-tegra.3/LNX /dev/block/mmcblk0p3 Linux kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/MDA /dev/block/mmcblk0p12 ?
/dev/block/platform/sdhci-tegra.3/MSC /dev/block/mmcblk0p8 empty (misc, bootloader etc.)
/dev/block/platform/sdhci-tegra.3/PER /dev/block/mmcblk0p10 /persist ext4 config/calibration data
/dev/block/platform/sdhci-tegra.3/SOS /dev/block/mmcblk0p1 Recovery kernel (8388608 b)
/dev/block/platform/sdhci-tegra.3/UDA /dev/block/mmcblk0p14 /data ext4 Android user data
/dev/block/platform/sdhci-tegra.3/USP /dev/block/mmcblk0p9 Staging (blob)
recovery.fstab
Code:
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro wait
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/MDA
/dev/block/platform/sdhci-tegra.3/by-name/MSC /misc emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/LNX /boot emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/SOS /recovery emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/USP /staging emmc defaults defaults
/devices/platform/sdhci-tegra.2/mmc_host/mmc1 /storage/sdcard1 vfat default voldmanaged=sdcard:auto
/devices/platform/tegra-ehci.0 /mnt/usbdrive vfat default voldmanaged=usbdrive:auto
Blob
Code:
name size description status
[U]10.14.1.47:[/U] [ATTACH]2435244[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (original) [ATTACH]2435246[/ATTACH]
blob.BC1 8,192 Bytes ? (original) [ATTACH]2435245[/ATTACH]
blob.EBT 1,396,736 Bytes Bootloader (original) [ATTACH]2435247[/ATTACH]
blob.PT 2,202 Bytes Partition Table (original) [ATTACH]2435248[/ATTACH]
[U]10.26.1.7:[/U] [ATTACH]2435238[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (unchanged) [ATTACH]2435241[/ATTACH]
blob.BC1 8,192 Bytes ? (changed) [ATTACH]2435240[/ATTACH]
blob.EBT 1,421,312 Bytes Bootloader (changed) [ATTACH]2435242[/ATTACH]
Unbrick
How to unbrick a TF701 that still has fastboot running (possibly partially redundant):
WARNING: Any damage caused by following these instructions...
Yeah, right... Nevermind that... If your fastboot works, this will save your tablet
Required tools: I assume you have them already
Required files:
UL-K00C-xx-10.14.1.47-user.zip (on micro SD card in TF701)
10.14.1.47 blob and boot.img (unpacked from UL-K00C-xx-10.14.1.47-user.zip)
drgravy's recovery.img
Code:
fastboot erase boot
fastboot erase staging
fastboot format system
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery.img
fastboot reboot-bootloader
check the version displayed. Is it 10.14.1.47? if not, hard reset to bootloader ([vol-] + [power])
boot recovery kernel (RCK)
install zip
choose zip from sdcard
UL-K00C-xx-10.14.1.47-user.zip
Yes
wait and pray to odin
+++ go back +++
reboot system now
Yes - Disable recovery flash (doesn't actually matter)
Yes - Root device (/system/xbin/su) (just kidding, this doesn't work)
Please consider clicking thanks
Sources:
Lots of own work
http://forum.xda-developers.com/showpost.php?p=47767352&postcount=71
https://github.com/AndroidRoot/BlobTools
Click to expand...
Click to collapse
Sorry, how should I extract the recovery.img from the OTA zip file?
I can only find several files: install-recovery.sh recovery-from-boot.p recovery-resource. dat
Or if I can extract it anywhere else?
lpdunwell said:
Code:
[U]10.26.1.7:[/U] [ATTACH]2435238[/ATTACH]
blob.BCT 8,192 Bytes Boot Config Table (unchanged) [ATTACH]2435241[/ATTACH]
blob.BC1 8,192 Bytes ? (changed) [ATTACH]2435240[/ATTACH]
blob.EBT 1,421,312 Bytes Bootloader (changed) [ATTACH]2435242[/ATTACH]
Click to expand...
Click to collapse
@lpdunwell
Any ideas what BC1 is for? Also there is no SOS file inside the BLOB. I have repacked the BLOB as I wanted to make a bootloader and recovery flash package but not sure how to flash a recovery.
On the TF700 you could just pack it back into the BLOB using the below and it would flash to staging fine. Any ideas?
Code:
blobpack -s blob EBT blob.EBT SOS blob.SOS
I wonder if the same can be done like this?
Code:
blobpack -s blob BCT blob.BCT BC1 blob.BC1 EBT blob.EBT SOS blob.SOS
sbdags said:
@lpdunwell
Any ideas what BC1 is for? Also there is no SOS file inside the BLOB. I have repacked the BLOB as I wanted to make a bootloader and recovery flash package but not sure how to flash a recovery.
On the TF700 you could just pack it back into the BLOB using the below and it would flash to staging fine. Any ideas?
Code:
blobpack -s blob EBT blob.EBT SOS blob.SOS
I wonder if the same can be done like this?
Code:
blobpack -s blob BCT blob.BCT BC1 blob.BC1 EBT blob.EBT SOS blob.SOS
Click to expand...
Click to collapse
TBCH, I'm not sure about the BC1.
The recovery is not part of the blob (anymore?). And the exact way an official update flashes it is probably not the best way to go when flashing manually. My advice for the moment probably is: Keep flashing the bootloader to a minimum, and flash recoveries via fastboot.
lpdunwell said:
TBCH, I'm not sure about the BC1.
The recovery is not part of the blob (anymore?). And the exact way an official update flashes it is probably not the best way to go when flashing manually. My advice for the moment probably is: Keep flashing the bootloader to a minimum, and flash recoveries via fastboot.
Click to expand...
Click to collapse
Yeah I tried a number of ways to get it to flash but it looks like the nvcopy tool that Asus use doesn't work outside the stock recovery.
Search the UL-K00C-WW-10.14.1.47-user.zip file
Hi,
And thank you. But Do you know where I can download the UL-K00C-WW-10.14.1.47-user.zip ?
On ASUS and can find only WW_epaduser_10_14_1_47_UpdateLauncher.zip.
Oups UL-K00C-WW-10.14.1.47-user.zip is in WW_epaduser_10_14_1_47_UpdateLauncher.zip.
Question
Hi
A question : Is it possible to use the same procedure with UL-K00C-WW-10.26.1.7-user.zip or UL-K00C-WW-10.26.1.18-user.zip ?
Best regards
Bumping this as it should be stickied
Xstof said:
Hi,
And thank you. But Do you know where I can download the UL-K00C-WW-10.14.1.47-user.zip ?
On ASUS and can find only WW_epaduser_10_14_1_47_UpdateLauncher.zip.
Oups UL-K00C-WW-10.14.1.47-user.zip is in WW_epaduser_10_14_1_47_UpdateLauncher.zip.
Click to expand...
Click to collapse
Did you ever find out where to get this file? I've been looking everywhere and I fear my device is hosed without it. HELP!
SgtMac02 said:
Did you ever find out where to get this file? I've been looking everywhere and I fear my device is hosed without it. HELP!
Click to expand...
Click to collapse
Google "Asus support downloads", click on the first link....
lpdunwell said:
Code:
fastboot erase boot
fastboot erase staging
fastboot format system
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery.img
fastboot reboot-bootloader
Click to expand...
Click to collapse
Ok, so I'm trying to get through this and having some trouble...
I've been having to go back and forth on a few things and I fear I've managed to hose thing up pretty good. But at this point, I have the files you state, and in following these instructions, was able to successfully erase the partitions mentioned, then when I tried to flash the first time, I actually screwed up and didn't have the blob file I needed, so now I go back, and obviously I can't re-erase the other files, but formatting system still works, so I know I'm getting good communication with the device. Then trying to flash the blob to staging, I get:
sending 'staging' (1379 KB)...
FAILED (command write failed (No such device or address))
Any thoughts or suggestions would be greatly appreciated.
Am I completely bricked?
I'm stuck in a boot loop with Asus / Unlocked appearing and unable to get to recovery. I've tried connecting with win 8.1 via usb but adb does not see devices. i assume running fastboot is the same situation. I can see the device listed APX and understand that Nvflash can help with that but there is no nvflash for Tegra 4.
I'm not sure how it got to this state - could be me or device. it is new and i considered returning save for the Device is Unlocked message
Ironically, this is my second Tf701t as the first cracked the screen. Considering taking motherboard out of old and putting in new (or visa vera) but I'm really bad with hardware.
Do I really have 2 broken devices I'll try anything.
Thanks for any (emotional) support ...
sonicthoughts said:
I'm stuck in a boot loop with Asus / Unlocked appearing and unable to get to recovery. I've tried connecting with win 8.1 via usb but adb does not see devices. i assume running fastboot is the same situation. I can see the device listed APX and understand that Nvflash can help with that but there is no nvflash for Tegra 4.
I'm not sure how it got to this state - could be me or device. it is new and i considered returning save for the Device is Unlocked message
Ironically, this is my second Tf701t as the first cracked the screen. Considering taking motherboard out of old and putting in new (or visa vera) but I'm really bad with hardware.
Do I really have 2 broken devices I'll try anything.
Thanks for any (emotional) support ...
Click to expand...
Click to collapse
This happened in my TF300T, yes is a hard brick.
Nvflash only works if you did work before.
Here is a guide to ifixit a TF700 perhaps help you. :good:
Would it not make more sense to swap the screens over?
Sent from my HTC Desire 610 using XDA Free mobile app
lpdunwell said:
This is the place for various bits and pieces of information/facts/wtf collected whilst digging around in our TF701.
Use at your own peril.
UPDATE: I know the staging partition is where to blob (bootloader) goes, but as I found out, that's only half of the story.
It seems like the bootloader takes the contents of staging at boot time and puts them where they belong.
Now if anybody has more details about this, that would be great.
Sources:
Lots of own work
http://forum.xda-developers.com/showpost.php?p=47767352&postcount=71
https://github.com/AndroidRoot/BlobTools
Click to expand...
Click to collapse
Thank you for your analysis! I wonder does the "staging" partition contain temporary updates, and the blob flashed to it will automatically decompress to the correct partitions in the next boot?
In other words, in order to update the bootloader and the recovery system, I could do either:
1.
Code:
fastboot flash staging bootloader
fastboot flash recovery TWRP.img
Or:
Code:
blobpack -s bootloader-TWRP.blob EBT bootloader.EBT SOS TWRP.img
fastboot flash staging bootloader-TWRP.blob
Are they equivalent?
Stuck with the old bootloader
[CODE said:
fastboot erase boot
fastboot erase staging
fastboot format system
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery.img
fastboot reboot-bootloader[/CODE]
check the version displayed. Is it 10.14.1.47? if not, hard reset to bootloader ([vol-] + [power])
boot recovery kernel (RCK)
install zip
choose zip from sdcard
UL-K00C-xx-10.14.1.47-user.zip
Yes
wait and pray to odin
+++ go back +++
reboot system now
Yes - Disable recovery flash (doesn't actually matter)
Yes - Root device (/system/xbin/su) (just kidding, this doesn't work)
Please consider clicking thanks
Sources:
Lots of own work
http://forum.xda-developers.com/showpost.php?p=47767352&postcount=71
https://github.com/AndroidRoot/BlobTools
Click to expand...
Click to collapse
I am stuck, for some reason after following these steps when the device reboots it is still with the old recovery and bootloader. Can anybody help please?
xabier87 said:
I am stuck, for some reason after following these steps when the device reboots it is still with the old recovery and bootloader. Can anybody help please?
Click to expand...
Click to collapse
What are you trying to do? Which BL and recovery do you currently have?
Flashable zips for the last bootloaders are here: http://forum.xda-developers.com/showpost.php?p=61045480&postcount=2
berndblb said:
What are you trying to do? Which BL and recovery do you currently have?
Flashable zips for the last bootloaders are here: http://forum.xda-developers.com/showpost.php?p=61045480&postcount=2
Click to expand...
Click to collapse
Thanks for the info! I might try with these zips and bootloaders. I am trying to reset my tablet or make it work. Had cm-12.1-20160711-NIGHTLY-tf701t.zip on it with TWRP recovery and US_epad-10.26.1.18-20131217 bootloader but it recently stoppped working. I do have access to the bootloader and recovery but after following the fastboot instructions and rebooting nothing is changed on the tablet.
Hi,
i'm a new user and I can't add post to correct thread so I try to begin a new thread here.
I installed cwm 6.0.4.7-jena on my phone and all install process is been completed correctly but on reboot from cwn shell / menu I can't mount sdcard0.
This error from recovery.log file:
Code:
I:Checking for extendedcommand...
I:Skipping execution of extendedcommand, file not found...
I:Volume /storage/sdcard0 is not idle, current state is 2
Error mounting /storage/sdcard0!
File recovery.fstab it seems correct:
Code:
# cat /etc//recovery.fstab
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/mmcblk0p8 /boot emmc defaults defaults
/dev/block/mmcblk0p12 /recovery emmc defaults defaults
/dev/block/mmcblk0p16 /system ext4 ro,barrier=1 wait
/dev/block/mmcblk0p18 /data ext4 nosuid,nodev,noauto_da_alloc,barrier=1 wait,check,encryptable=footer,length=-16384
/dev/block/mmcblk0p17 /cache ext4 nosuid,nodev,barrier=1 wait,check
# vold managed volumes
/devices/platform/msm_sdcc.3/mmc_host auto vfat defaults voldmanaged=sdcard0:23,noemulatedsd,nonremovable
/devices/platform/msm_sdcc.1/mmc_host auto auto defaults voldmanaged=sdcard1:auto,noemulatedsd
/devices/platform/msm_hsusb_host.0 auto auto defaults voldmanaged=usbdisk:auto
# zRam (zramsize = 64 megabytes)
/dev/block/zram0 none swap defaults zramsize=67108864
If I use last OmniROM I see that sdcard0 is not usable and this confirm like for cwn that cwn-6.0.4.7 that there is a problem with sdcard0 (internal)
But If I use last cm-10.1 sdcard0 is correctly usable sdcard yet if on cwn it isn't possible mount it.
So probably is there a bug on cwm-6.0.4.7 and omni-4.4.2-20140202-jenad-HOMEMADE.
Could be relative to a wrong partition data ? I try to format it from cwm but I receive error and I can't donwgrade to previous cwm-6.0.3.2 (that it works with sdcard0) because there is a check on status of the sdcard0.
Any suggestions ?
Thanks in advance
Hello, [Solution lower in this thread]
My /EFS partition is gone. I dont know why, because I wasnt doing anything with my phone at that moment. Until this problem I was running cyanogenmod nightly. The battery was wasted I think because it feels slightly thicker than normal. I already replaced it.
I have an efs.img made with SA manager.
Symptoms:
Bootloop
Original recovery says:
Code:
E: failed to mount /efs (invalid argument)
I can get into recovery & download mode.
I can still flash philz custom recovery.
When in cwm I can still flash a zip with a rom, but it wont start.
These are the steps I tried to get my phone working again:
ODIN
Flashed stock jellybean with original pit file, and checked "clear efs" in odin 3.09.
Custom Recovery
Connected with ADB, and executed the following commands:
Code:
But as you can see that doesnt help much.
I tried several other things, but they boil down to the same. I used an aroma efs restore tool, but it just executes the dd command and fails the same way.
jogai said:
Hello,
My /EFS partition is gone. I dont know why, because I wasnt doing anything with my phone at that moment. Until this problem I was running cyanogenmod nightly. The battery was wasted I think because it feels slightly thicker than normal. I already replaced it.
I have an efs.img made with SA manager.
Symptoms:
Bootloop
Original recovery says:
Code:
E: failed to mount /efs (invalid argument)
I can get into recovery & download mode.
I can still flash philz custom recovery.
When in cwm I can still flash a zip with a rom, but it wont start.
These are the steps I tried to get my phone working again:
ODIN
Flashed stock jellybean with original pit file, and checked "clear efs" in odin 3.09.
Custom Recovery
Connected with ADB, and executed the following commands:
Code:
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,journal_async_commit,data=ordered)
/dev/block/vold/259:3 on /storage/sdcard0 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_uime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
~ # mke2fs /dev/block/mmcblk0p3
mke2fs /dev/block/mmcblk0p3
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
160 inodes, 1280 blocks
64 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=1310720
1 block group
8192 blocks per group, 8192 fragments per group
160 inodes per group
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
~ # dd if=/storage/sdcard0/efs.img of=/dev/block/mmcblk0p3 bs=4096
dd if=/storage/sdcard0/efs.img of=/dev/block/mmcblk0p3 bs=4096
dd: writing '/dev/block/mmcblk0p3': No space left on device
321+0 records in
320+0 records out
1310720 bytes (1.3MB) copied, 0.035800 seconds, 34.9MB/s
~ # chown 1001:radio /efs/nv_data.bin
chown 1001:radio /efs/nv_data.bin
chown: /efs/nv_data.bin: No such file or directory
But as you can see that doesnt help much.
I tried several other things, but they boil down to the same. I used an aroma efs restore tool, but it just executes the dd command and fails the same way.
Click to expand...
Click to collapse
so hold on!
the dd is failing because the img file is larger than the partition
why?
https://github.com/CyanogenMod/andr...common/blob/cm-11.0/rootdir/fstab.smdk4210#L9
i dont have an exynos4 device, but it seems p1 is /efs. and you are flashing p3, wtf!!! its a miracle if the phone is not fully bricked!! also, was efs mounted while you dd'ed? that would have corrupted it! not to mention using chown on it.
seriously, please stop randomly touching things and be very sure of what you do next or you'll have an unrecoverable brick soon.
p2 and p3 seem to be the bootloaders:
https://gitlab.com/ameer1234567890/...part_layouts/raw/partlayout4nandroid.GT-N7000
so. have you tried rebooting the phone after this? do you still have recovery and download mode?
if so, you need to recover p3 somehow. google a method then ASK before doing anything.
go to recovery and adb shell to it.
use blockdev command to find out the sizes of partitions p1 p2 and p3.
compare it to the size of the alleged-efs.img file you have, which apparently may actually be anything but.
unmount everything from recovery, then you can just adb pull /dev/your/desired/partition.
(i havent seen this used anywhere in xda, but i use it all the time. easier than dd'ing)
get images of your current p1 p2 and p3.
check that p3 and alleged-efs.img match (except for size) to verify that p3 was actually overwritten.
check the contents of alleged-efs.img and verify that it actually is an efs partition image.
dont make any further changes, and post the result of EVERYTHING here
Yes. Can confirm p1 is EFS.
This is N7000 partition table print by parted.
Model: MMC VYL00M (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 EFS
2 25.2MB 26.5MB 1311kB SBL1
3 27.3MB 28.6MB 1311kB SBL2
4 29.4MB 37.7MB 8389kB PARAM
5 37.7MB 46.1MB 8389kB KERNEL
6 46.1MB 54.5MB 8389kB RECOVERY
7 54.5MB 264MB 210MB ext4 CACHE
8 264MB 281MB 16.8MB MODEM
9 281MB 1174MB 893MB ext4 FACTORYFS
10 1174MB 3322MB 2147MB ext4 DATAFS
11 3322MB 15.2GB 11.9GB fat32 UMS
12 15.2GB 15.8GB 537MB ext4 HIDDEN
The efs backup image in my phone is about 20mb.
GL.
you havent answered my questions.
so. have you tried rebooting the phone after this? do you still have recovery and download mode?
go to recovery and adb shell to it.
use blockdev command to find out the EXACT sizes of partitions p1 p2 and p3.
or use any other command you want.
compare it to the EXACT size of the alleged-efs.img file you have.
apparently it might be a match for p1, which is good.
get images of your current p1 p2 and p3:
unmount everything from recovery, then you can just adb pull /dev/your/desired/partition.
(i havent seen this used anywhere in xda, but i use it all the time. easier than dd'ing)
this is another way to find the exact partition sizes by the way: looking at the image sizes
check that p3 and alleged-efs.img match (except for size) to verify that p3 was actually overwritten.
do you absolutely trust that your alleged-efs.img is a good efs backup? you can mount it read only in your linux pc and check the contents of it to verify that it actually is an efs partition image. or you can just be sure that it is the right image. or you can pm it to me and i can check that.
you can pm the 4 partition images so i can see whats going on.
i think the phone has two equal bootloader copies (because corruption means unrecoverable brick) and you borked one. that's why it might be still booting. we need to restore p3 asap. please google the subject and check my asumption if you can.
---------- Post added at 03:31 PM ---------- Previous post was at 02:35 PM ----------
of course if you are lazy you can just:
dd if=/storage/sdcard0/efs.img of=/dev/block/mmcblk0p1
or:
adb push your/pc/dir/efs.img /dev/block/mmcblk0p1
MAKE SURE that the efs partition is not mounted before doing those.
you dont need any kind of chown if the backup is ok.
you need to recover p3. it could be as simple as:
adb pull /dev/block/mmcblk0p2 sbl.img
adb push sbl.img /dev/block/mmcblk0p3
if the two copies are the same, BUT DONT DO ANYTHING UNTIL YOU ARE VERY SURE!
if you use, say, odin now, and the writing of p2 gets interrupted for any reason, there wont be p3 to boot! so device is bricked FOREVER. no recovery possible without JTAG. you need to fix this ASAP.
your first TO-DO: verify the assumption that p2 and p3 are supposed to be two bit-by-bit exact copies of the bootloader.
any rom that contains a bootloader is extremely dangerous to flash at this time. this includes stock.
Thanks for your concern!
I got my instructions from here: http://techbeasts.com/2013/11/29/how-to-restore-and-back-up-efs-data-on-samsung-galaxy-devices/
Thats why I was tring p3. The aroma backup tool did try the same partition.
I tried all this several times, and tried to odin flash several times. The phone is still not bricked and I still can get to download & recovery just fine.
I'm at work now, but will post my findings asap.
jogai said:
Thanks for your concern!
I got my instructions from here: http://techbeasts.com/2013/11/29/how-to-restore-and-back-up-efs-data-on-samsung-galaxy-devices/
Thats why I was tring p3. The aroma backup tool did try the same partition.
I tried all this several times, and tried to odin flash several times. The phone is still not bricked and I still can get to download & recovery just fine.
I'm at work now, but will post my findings asap.
Click to expand...
Click to collapse
I would try to restore efs first to see how it goes. I suspect SBL2 maybe not important!
forest1971 said:
I would try to restore efs first to see how it goes. I suspect SBL2 maybe not important!
Click to expand...
Click to collapse
SBL2 is probably the 2nd copy of the bootloader. if SBL1 gets damaged (eg: interrupted odin) the phone is bricked and unbrickable, except by taking it to a JTAG house.
if you are not going to reseach this, at least copy p2 over p3:
adb pull /dev/block/mmcblk0p2 sbl.img
adb push sbl.img /dev/block/mmcblk0p3
Code:
~ # dd if=/dev/block/mmcblk0p2 of=sdcard/sbl1.img
dd if=/dev/block/mmcblk0p2 of=sdcard/sbl1.img
2560+0 records in
2560+0 records out
1310720 bytes (1.3MB) copied, 0.400897 seconds, 3.1MB/s
~ # dd if=/dev/block/mmcblk0p3 of=sdcard/sbl3.img
dd if=/dev/block/mmcblk0p3 of=sdcard/sbl3.img
2560+0 records in
2560+0 records out
1310720 bytes (1.3MB) copied, 0.161615 seconds, 7.7MB/s
Result:
https://filetea.me/t1sxlmPdQ9xSe2qh94HX82wMQ
https://filetea.me/t1sVUTXpxrWQ2mRSIx600aCqg
Code:
~ # dd if=sdcard/efs.img of=/dev/block/mmcblk0p1
dd if=sdcard/efs.img of=/dev/block/mmcblk0p1
40960+0 records in
40960+0 records out
20971520 bytes (20.0MB) copied, 6.726656 seconds, 3.0MB/s
Seems to work!
Code:
~ # mkdir /efs
mkdir /efs
~ # busybox mount -w -t ext4 /dev/block/mmcblk0p1 /efs
busybox mount -w -t ext4 /dev/block/mmcblk0p1 /efs
I think its strange I had to make /efs, and after reboot its seems gone:
Code:
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,journal_async_commit,data=ordered)
While in fstab.smdk4210:
Code:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# data partition must be located at the bottom for supporting device encryption
/dev/block/mmcblk0p9 /system ext4 ro,noatime wait
/dev/block/mmcblk0p7 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p1 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p10 /data ext4 noatime,nosuid,nodev,discard,noauto_da_alloc,journal_async_commit,errors=panic wait,check_spo,encryptable=/efs/metadata
/dev/block/mmcblk0p12 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait
# vold-managed volumes ("block device" is actually a sysfs devpath)
/devices/platform/dw_mmc/mmc_host/mmc0/mmc0 auto auto defaults voldmanaged=sdcard0:11,nonremovable,noemulatedsd
/devices/platform/s3c-sdhci.2/mmc_host/mmc1 auto auto defaults voldmanaged=sdcard1:auto
/devices/platform/s3c_otghcd/usb auto auto defaults voldmanaged=usbdisk0:auto
# recovery
/dev/block/mmcblk0p5 /boot emmc defaults recoveryonly
/dev/block/mmcblk0p6 /recovery emmc defaults recoveryonly
/dev/block/mmcblk0p8 /modem emmc defaults recoveryonly
Odin'd & working again!
Many thanks to everyone who wanted to help this dumbass out! Much appreciated!
I think its strange I had to make /efs, and after reboot its seems gone:
Code:
~ # mount
mount
rootfs on / type rootfs (rw)
Click to expand...
Click to collapse
/ is rootfs which is a special instance of tempfs (which is a ram drive). nothing you put in / will survive a reboot.
As we all know our device does not get official TWRP builds yet. Hopefully now that the sources have been released, it's just a matter of time before this happens, but meanwhile an unofficial TWRP 2.8.5.2 build has just been released by Syhost. More information is available on his blog (in Chinese). To install:
Download the file from Baidu
The password (posted publicly on Syhost's blog) is sa89.
The download is an .exe file. It appears to be just an installation script but I did not run it. Instead, I just unpacked it with WinRAR (right-click on the file).
Inside there is the file recovery.img, which can be flashed with standard methods. The way I do it:
Code:
adb reboot bootloader
fastboot erase recovery
fastboot flash recovery recovery.img
Alternatively, if you just want to test it without replacing your current recovery:
Code:
adb reboot bootloader
fastboot boot recovery.img
The interface is all in Chinese. If you're comfortable with that language, you can stop here. However, what I did was:
Keep the kernel from Syhost's version.
Replace the RAM Disk image with files from the stock TWRP for another device: I used openrecovery-twrp-2.8.5.2-mako.img, as I already had the file.
Integrate the TWRP Materialised Play theme in the appropriate resolution (720x1280). The file is 2850_v1_720_play.zip and you'll also want to replace the curtain.jpg file with one of the splash screens from here: splashes_720.zip.
Delete the following files:
Code:
/fstab.mako
/ueventd.mako.rc
Copy over the following files from Syhost's RAM Disk image:
Code:
/default.prop
/file_contexts
/init.rc
/init.recovery.qcom.rc
/property_contexts
/seapp_contexts
/selinux_version
/sepolicy
/service_contexts
/ueventd.rc
Replace /etc/recovery.fstab with the following contents:
Code:
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc wait
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:radio_efs_file:s0 wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /radio emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/sbl1 /sbl1 emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/tz /tz emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/rpm /rpm emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/aboot /aboot emmc defaults defaults
/dev/block/mmcblk1p1 /external_sd vfat rw,noatime,nodev,noexec,nosuid,uid=1000,gid=1015,fmask=0002,dmask=0002,utf8 defaults
/dev/block/sda1 /usbdisk vfat rw,noatime,nodev,noexec,nosuid,uid=1000,gid=1015,fmask=0002,dmask=0002,utf8 defaults
Replace /etc/twrp.fstab with the following contents:
Code:
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache
/external_sd vfat /dev/block/mmcblk1p1 flags=display="SD Card";storage;wipeingui;removable
/usbdisk vfat /dev/block/sda1 flags=display="USB Disk";storage;removable
.
I don't think I can post the resulting image file, as none of this is my work and I don't have the original authors' permission but if you follow the above instructions, you'll end up with a working TWRP 2.8.5.2 recovery image with the English interface that also looks great thanks to the excellent TWRP Materialised theme. Haven't had the chance to test it extensively yet but everything appears to work just great at this point. Screenshots - before and after:
That's really great find. And helpful tip. Cool.
Btw, I do think you can share the resulting TWRP, in English and themed, by simply crediting the original dev/page for the find. Without credit, it won't be cool for sure, but with credit, it's good.
MTP Status
MTP does not appear to work in the modified version but neither does it work for me in the original, unmodified one, even if the description on Syhost's blog seems to suggest it should. I don't really use this function so I'll leave it like that at the moment, as it's not immediately obvious what's going on. If someone wants to take over from here, the following might be useful:
Logcat:
Code:
MtpServer::run fd: 16
E:request read returned -1, errno: 22, exiting MtpServer::run loop
TWRP Source, mtp/mtp_MtpServer.cpp:55
Code:
int fd = open(mtp_device, O_RDWR);
TWRP Source, mtp/mtp_MtpServer.cpp:47
Code:
#ifdef USB_MTP_DEVICE
#define STRINGIFY(x) #x
#define EXPAND(x) STRINGIFY(x)
const char* mtp_device = EXPAND(USB_MTP_DEVICE);
MTPI("Using '%s' for MTP device.\n", EXPAND(USB_MTP_DEVICE));
#else
const char* mtp_device = "/dev/mtp_usb";
#endif
Android Source, include/errno.h:55
Code:
#define EINVAL 22 /* Invalid argument */
itskapil said:
That's really great find. And helpful tip. Cool.
Btw, I do think you can share the resulting TWRP, in English and themed, by simply crediting the original dev/page for the find. Without credit, it won't be cool for sure, but with credit, it's good.
Click to expand...
Click to collapse
Thanks! I've PMed Syhost and will upload the image if he's OK with it.
Aqq123 said:
Thanks! I've PMed Syhost and will upload the image if he's OK with it.
Click to expand...
Click to collapse
:good: