[Q] Backup/Restore partitions using dd command under ClockWorkMod? - Desire HD Q&A, Help & Troubleshooting

Hello,
Is is possible to use dd command available under busybox when in recovery mode
to backup partitions?
Examples:
Backup data partition:
dd if=/dev/block/mmcblk0p26 of=/sdcard/data.img
Restore data partition:
dd if=/sdcard/data.img of=/dev/block/mmcblk0p26
If yes, then what the needed mount commands to make the above work.
The reason is that I have a problem with nandroid restore:
http://forum.xda-developers.com/showpost.php?p=14714800&postcount=319
Note: similar command apparently works for flashing recovery
image (which is partition /dev/block/mmcblk0p21).

Without appropriate answer, I have to try for myself, and finally get the answer to my own question.
The answer is YES, dd command could be used to backup/restore the entire system (so can replace
nandroid part of ClockWorkMod).
You need to know the mapping of the partitions for the Desire HD:
Code:
/dev/block/mmcblk0p21 recovery
/dev/block/mmcblk0p22 boot
/dev/block/mmcblk0p25 system
/dev/block/mmcblk0p26 data
/dev/block/mmcblk0p27 cache
The partitions backupped will result in same size each time, with same backup/restore time
since it is a "raw" backup (bit-to-bit copy, or sector-by-sector copy in hard disk terminology).
I use the .dsk for file extension to avoid confusion with .img extension used by CWM (since they
are not the same format, and cannot be used in fastboot command for example).
Backup sample log:
Code:
ls -l /sdcard/MyBackups/recovery/recovery*.dsk
-rwxrwxrwx 1 root root 8909824 Jun 16 10:17 /sdcard/MyBackups/recovery/recovery_3.0.2.8.dsk
2011-06-17-02:26:24 Backup boot...
512+0 records in
512+0 records out
4194304 bytes (4.0MB) copied, 0.208129 seconds, 19.2MB/s
-rwxrwxrwx 1 root root 4194304 Jun 17 02:26 /sdcard/MyBackups/LeeDroid_Froyo/boot.dsk
2011-06-17-02:26:24 Backup system...
71423+1 records in
71423+1 records out
585104896 bytes (558.0MB) copied, 188.697998 seconds, 3.0MB/s
-rwxrwxrwx 1 root root 585104896 Jun 17 02:29 /sdcard/MyBackups/LeeDroid_Froyo/system.dsk
2011-06-17-02:29:33 Backup data...
150399+1 records in
150399+1 records out
1232076288 bytes (1.1GB) copied, 370.469513 seconds, 3.2MB/s
-rwxrwxrwx 1 root root 1232076288 Jun 17 02:35 /sdcard/MyBackups/LeeDroid_Froyo/data.dsk
2011-06-17-02:35:43 Backup cache...
38399+1 records in
38399+1 records out
314572288 bytes (300.0MB) copied, 97.289337 seconds, 3.1MB/s
-rwxrwxrwx 1 root root 314572288 Jun 17 02:37 /sdcard/MyBackups/LeeDroid_Froyo/cache.dsk
2011-06-17-02:37:21 Done.
Restore sample code:
Code:
ls -l /sdcard/MyBackups/recovery/recovery*.dsk
-rwxrwxrwx 1 root root 8909824 Jun 16 10:17 /sdcard/MyBackups/recovery/recovery_3.0.2.8.dsk
2011-06-17-15:28:33 Restore boot...
-rwxrwxrwx 1 root root 4194304 Jun 17 14:58 /sdcard/MyBackups/LeeDroid_Froyo/boot.dsk
512+0 records in
512+0 records out
4194304 bytes (4.0MB) copied, 1.006897 seconds, 4.0MB/s
2011-06-17-15:28:34 Restore system...
-rwxrwxrwx 1 root root 585104896 Jun 17 15:02 /sdcard/MyBackups/LeeDroid_Froyo/system.dsk
71423+1 records in
71423+1 records out
585104896 bytes (558.0MB) copied, 405.526398 seconds, 1.4MB/s
2011-06-17-15:35:20 Restore data...
-rwxrwxrwx 1 root root 1232076288 Jun 17 15:08 /sdcard/MyBackups/LeeDroid_Froyo/data.dsk
150399+1 records in
150399+1 records out
1232076288 bytes (1.1GB) copied, 434.877655 seconds, 2.7MB/s
2011-06-17-15:42:34 Restore cache...
-rwxrwxrwx 1 root root 314572288 Jun 17 15:09 /sdcard/MyBackups/LeeDroid_Froyo/cache.dsk
38399+1 records in
38399+1 records out
314568704 bytes (300.0MB) copied, 49.197021 seconds, 6.1MB/s
2011-06-17-15:43:24 Done.
Now with "dd" backup, I can now have the liberty to try other ROMs without my dreaded problem with CWM .
Edit: let have a dream. How about using dd binary like nandroid currently invoked by CWM from it's menu?
CWM currently for backup or restore invoke the standalone nandroid binary with appropriate parameters, then it captures
(pipes) the output of e.g. tar utility to extract (restore) or compress (backup) the .img file.
With dd it would be simple to add to CWM menu to provide invocation of dd for a backup/restore using partition imaging method.
By doing this, no more need to plug an USB cable and use adb command.
Edit: Finally there is a simpler solution. Create an installation ZIP script (like the one used to flash ROM). Then in updater_script invoke a command (shell script, extension.sh) with the run_program(). You can provide parameters to this. You can have a zip to backup, a zip to restore etc...

Good idea. I've tried this on my U8510 (Android 2.3.3) but it doesn't work. This is my partition layout:
cat /proc/mtd
dev: size erasesize name
mtd0: 00500000 00020000 "boot"
mtd1: 00500000 00020000 "recovery"
mtd2: 00140000 00020000 "misc"
mtd3: 00060000 00020000 "splash"
mtd4: 0ba00000 00020000 "system"
mtd5: 03f00000 00020000 "cache"
mtd6: 0a0a0000 00020000 "userdata"
mtd7: 01400000 00020000 "userdata2"
mtd8: 01400000 00020000 "cust"
Click to expand...
Click to collapse
And this is "ls -l /dev/block":
brw------- 1 root root 7, 0 Oct 12 21:54 loop0
brw------- 1 root root 7, 1 Oct 12 21:54 loop1
brw------- 1 root root 7, 2 Oct 12 21:54 loop2
brw------- 1 root root 7, 3 Oct 12 21:54 loop3
brw------- 1 root root 7, 4 Oct 12 21:54 loop4
brw------- 1 root root 7, 5 Oct 12 21:54 loop5
brw------- 1 root root 7, 6 Oct 12 21:54 loop6
brw------- 1 root root 7, 7 Oct 12 21:54 loop7
brw------- 1 root root 179, 0 Oct 12 21:54 mmcblk0
brw------- 1 root root 179, 1 Oct 12 21:54 mmcblk0p1
brw------- 1 root root 31, 0 Oct 12 21:54 mtdblock0
brw------- 1 root root 31, 1 Oct 12 21:54 mtdblock1
brw------- 1 root root 31, 2 Oct 12 21:54 mtdblock2
brw------- 1 root root 31, 3 Oct 12 21:54 mtdblock3
brw------- 1 root root 31, 4 Oct 12 21:54 mtdblock4
brw------- 1 root root 31, 5 Oct 12 21:54 mtdblock5
brw------- 1 root root 31, 6 Oct 12 21:54 mtdblock6
brw------- 1 root root 31, 7 Oct 12 21:54 mtdblock7
brw------- 1 root root 31, 8 Oct 12 21:54 mtdblock8
drwxr-xr-x 3 root root 60 Oct 12 21:54 platform
brw------- 1 root root 1, 0 Oct 12 21:54 ram0
brw------- 1 root root 1, 1 Oct 12 21:54 ram1
brw------- 1 root root 1, 2 Oct 12 21:54 ram2
brw------- 1 root root 1, 3 Oct 12 21:54 ram3
brw------- 1 root root 1, 4 Oct 12 21:54 ram4
brw------- 1 root root 1, 5 Oct 12 21:54 ram5
brw------- 1 root root 1, 6 Oct 12 21:54 ram6
brw------- 1 root root 1, 7 Oct 12 21:54 ram7
Click to expand...
Click to collapse
'mmcblk0' is the sdcard.
When i enter 'dd if=/dev/block/mtdblock0 of=/sdcard/mtdblock0-boot.img' i get:
dd: /dev/block/mtdblock0: I/O error
Click to expand...
Click to collapse
CWM Recovery Backup gives me this files. I'm not sure if this are all files so i want to dump partitions manually.
.android_secure.img
boot.img
cache.img
data.img
nandroid.md5
recovery.img
system.img
Click to expand...
Click to collapse
Why is it not working?
Edit: When i enter 'dd if=/dev/block/mmcblk0 of=/sdcard/mmcblk0.img' dd does work but it copies the sdcard to itself.
Why are the other "blocks" not working and how can i get the working ones like your 'mmcblk0p21'?
Edit2: Got it. For the U8510 its 'dd if=/dev/mtd/mtd0 of=/sdcard/mtd0-boot.img bs=4096'.

busybox dd
dnlilas said:
Hello,
Is dd if=/dev/block/mmcblk0p26 of=/sdcard/data.imgis possible to use dd command available under busybox when in recovery mode
to backup partitions?
Examples:
Backup data partition:
dd if=/dev/block/mmcblk0p26 of=/sdcard/data.img
Restore data partition:
dd if=/sdcard/data.img of=/dev/block/mmcblk0p26
If yes, then what the needed mount commands to make the above work.
The reason is that I have a problem with nandroid restore:
http://forum.xda-developers.com/showpost.php?p=14714800&postcount=319
Note: similar command apparently works for flashing recovery
image (which is partition /dev/block/mmcblk0p21).
Click to expand...
Click to collapse
Hi, I'm interested in using dd command to do a full backup but I don't know how to do.
Where I have to write the command "dd if=/dev/block/mmcblk0 of=/sdcard/data.img"?
In busybox?
Thanks in advance!

Hello,
You need to connect the phone to your PC with USB cable then reboot the phone in recovery. In your PC, start the adb.exe command, you should get a command prompt with root right (# instead of $). Then you can use commands in this prompt.

busybox dd without a pc
dnlilas said:
Hello,
You need to connect the phone to your PC with USB cable then reboot the phone in recovery. In your PC, start the adb.exe command, you should get a command prompt with root right (# instead of $). Then you can use commands in this prompt.
Click to expand...
Click to collapse
Thanks but I've read (http://forum.xda-developers.com/showthread.php?t=1124939) that is possible to use the command "dd" within the smartphone obtaining a full backup in the sdcard.
I've to use a terminal emulator in android, after installing busybox, to launch the command "dd if=/dev/block/mmcblk0 of=/sdcard/data.img"?
Thanks in advance!

OK, so you will need a rooted phone, then in terminal emulator, change to root with su command to get the root # prompt.
But the difference is that you may take a backup of a live (running) system : this may work (as some live online nandroid backup), but of course the safest/surest is to take a backup when the system is shutdown, as in recovery.
Also, to restore, of course you are required to use the recovery, you cannot restore from inside Android with dd.

busybox dd from inside Android
dnlilas said:
OK, so you will need a rooted phone, then in terminal emulator, change to root with su command to get the root # prompt.
But the difference is that you may take a backup of a live (running) system : this may work (as some live online nandroid backup), but of course the safest/surest is to take a backup when the system is shutdown, as in recovery.
Also, to restore, of course you are required to use the recovery, you cannot restore from inside Android with dd.
Click to expand...
Click to collapse
Thanks very much, now I've understand! :victory:
This guide (http://forum.xda-developers.com/showthread.php?t=1818321) says how to do a full backup via pc with the command dd but I don't understand if the phone is in recovery mode!?
Can you tell me if the guide is ok for you? because it says something different from what you have said in your first replay .

To to backup the phone must be powered-on.
But I would suggest you to use this application that will do all the backup for you from inside your running/live Android :
https://play.google.com/store/apps/details?id=com.h3r3t1c.onnandbup

Great app for full backup
dnlilas said:
To to backup the phone must be powered-on.
But I would suggest you to use this application that will do all the backup for you from inside your running/live Android :
https://play.google.com/store/apps/details?id=com.h3r3t1c.onnandbup
Click to expand...
Click to collapse
Thanks, great app for a complete backup of the phone!
Just to learn something new: to do a backup with pc and dd command, the phone must be in recovery mode and then connected to the pc?
It is ok for you the guide that I linked in the previous reply?
You said, in your first replay, to use adb.exe: can you explain the procedure (like a small guide) or link a guide (if you know one web page that speaks about it)?
Thanks again!

From what I know :
adb.exe is part of the Android developer toolkit (ADK) that you can download. In fact for plain user (not Android developer), we only need the following 3 files that are usually available in many tools for customed ROM :
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
You would better download the ADK so you will get the latest version. When you connect the phone either in recovery mode with an USB cable to the PC, the PC has (at least under Win7/Win8) automatically Android adb device driver installed, so it recognizes the phone correctly. By launching adb.exe, you will get to an adb command prompt where you can issue several commands like reboot, restart to recovery, flash the partition etc.... (communication is established between adb.exe in PC and the phone ) You can also issue the su command as far as I remember, then you the the "Linux"-like shell prompt. And dd, ls, du, cat commands of busybox etc... are then all available. You exit the shell by 'exit'.
Searching for adb, fastboot etc.. would help you.
Hope this helps,

i'm confused by the code in this message.
it shows a `ls` command but the output of a `dd` one...

has anybody actually tried to write the live system partition this way? has his phone survived?

Is it correct to flash the data.img(user data image) by fastboot with this command:
fastboot flash userdata data.img
??

gcbxda said:
i'm confused by the code in this message.
it shows a `ls` command but the output of a `dd` one...
Click to expand...
Click to collapse
Agreed. I was looking on a way to restore a complete mmcblk0 raw backup to the device, but the restore sample code given is just the `ls -l` command.

Related

Chnage CID on a One X - found location but how to change it?

Hi all
This thread is based on what I learned in an HTC One S thread (http://forum.xda-developers.com/showthread.php?t=1674202)
OK so I have found the location where the CID and IMEI are stored in /dev/block/mmcblk0 at offset 00a00000
00a0000 [email protected]H3G__00135304xxxxxxxxxx
However, when I try to dump the file to SCDARD with
dd if=/dev/block/mmcblk0 of=/sdcard/mmcblk0
the command never finishes (I broke out after about 5 minutes with a 4GB file sitting on the SDCARD, which I assume is incomplete.
I also dd most of the part "pxx" files but none of them contained the CID & IMEI. ;(
[email protected]:/dev/block # ls -l
ls -l
brw------- root root 254, 0 2012-06-05 16:14 dm-0
brw------- root root 254, 1 2012-06-05 16:14 dm-1
brw------- root root 254, 2 2012-06-05 16:14 dm-2
brw------- root root 254, 3 2012-06-05 16:14 dm-3
brw------- root root 7, 0 2012-06-05 15:34 loop0
brw------- root root 7, 1 2012-06-05 15:34 loop1
brw------- root root 7, 2 2012-06-05 15:34 loop2
brw------- root root 7, 3 2012-06-05 15:34 loop3
brw------- root root 7, 4 2012-06-05 15:34 loop4
brw------- root root 7, 5 2012-06-05 15:34 loop5
brw------- root root 7, 6 2012-06-05 15:34 loop6
brw------- root root 7, 7 2012-06-05 15:34 loop7
brw------- root root 179, 0 2012-06-05 15:34 mmcblk0
brw------- root root 179, 1 2012-06-05 15:34 mmcblk0p1
brw------- root root 179, 10 2012-06-05 15:34 mmcblk0p10
brw------- root root 179, 11 2012-06-05 15:34 mmcblk0p11
brw------- root root 179, 12 2012-06-05 15:34 mmcblk0p12
brw------- root root 179, 13 2012-06-05 15:34 mmcblk0p13
brw------- root root 179, 14 2012-06-05 15:34 mmcblk0p14
brw------- root root 179, 15 2012-06-05 15:34 mmcblk0p15
brw------- root root 179, 16 2012-06-05 15:34 mmcblk0p16
brw------- root root 179, 17 2012-06-05 15:34 mmcblk0p17
brw------- root root 179, 18 2012-06-05 15:34 mmcblk0p18
brw------- root root 179, 19 2012-06-05 15:34 mmcblk0p19
brw------- root root 179, 2 2012-06-05 15:34 mmcblk0p2
brw------- root root 179, 20 2012-06-05 15:34 mmcblk0p20
brw------- root root 179, 3 2012-06-05 15:34 mmcblk0p3
brw------- root root 179, 4 2012-06-05 15:34 mmcblk0p4
brw------- root root 179, 5 2012-06-05 15:34 mmcblk0p5
brw------- root root 179, 6 2012-06-05 15:34 mmcblk0p6
brw------- root root 179, 7 2012-06-05 15:34 mmcblk0p7
brw------- root root 179, 8 2012-06-05 15:34 mmcblk0p8
brw------- root root 179, 9 2012-06-05 15:34 mmcblk0p9
drwxr-xr-x root root 2012-06-05 15:34 platform
drwxr-xr-x root root 2012-06-05 15:34 vold
Is it possible with dd (or another adb shell / linux commmand) to modify only the 8 bytes of mmcblk0 which contain the CID? If so we could debrand with HTC__001 or even superCID with 11111111
Any ideas?
why dont you post this in the S-OFF discussion?
dezborders said:
Is it possible with dd (or another adb shell / linux commmand) to modify only the 8 bytes of mmcblk0 which contain the CID? If so we could debrand with HTC__001 or even superCID with 11111111
Any ideas?
Click to expand...
Click to collapse
man dd
Looks like skip and seek are what you're looking for.
BenPope said:
man dd
Looks like skip and seek are what you're looking for.
Click to expand...
Click to collapse
Sadly conv=notrunc option is disabled in dd on android so I can't update only the area containing cid. It's not feasible to dump all 32gb of mccblk0, edit cid then write back all 32gb.
Sent from my HTC One X using XDA
Does the android version support the "skip" and "seek" options?
dezborders said:
However, when I try to dump the file to SCDARD with
dd if=/dev/block/mmcblk0 of=/sdcard/mmcblk0
the command never finishes (I broke out after about 5 minutes with a 4GB file sitting on the SDCARD, which I assume is incomplete.
Any ideas?
Click to expand...
Click to collapse
mmcblk0 is the whole 32G flash chip of the phone, while mmcblk0p1 .. mmcblk0p20 are the individual partitions.
I think, it is worth to find specific partition between these 20, which contains CID, and work with it.
k0rner said:
mmcblk0 is the whole 32G flash chip of the phone, while mmcblk0p1 .. mmcblk0p20 are the individual partitions.
I think, it is worth to find specific partition between these 20, which contains CID, and work with it.
Click to expand...
Click to collapse
None of the 20 partitions contain the cid, obviously the area of mmcblk0 containing this data is only accessible to hboot.
Also, it has been suggested writing to the 20 partitions only makes temporary changes which revert to original values at next reboot.
I think this thread should be locked and let the devs in the main S-off thread continue the discussion .)
Sent from my HTC One X using XDA
dezborders said:
None of the 20 partitions contain the cid, obviously the area of mmcblk0 containing this data is only accessible to hboot.
Also, it has been suggested writing to the 20 partitions only makes temporary changes which revert to original values at next reboot.
I think this thread should be locked and let the devs in the main S-off thread continue the discussion .)
Sent from my HTC One X using XDA
Click to expand...
Click to collapse
I think mmcblk0p19 contains CID.
Karel
If I remember correctly p19 is just logs, so its just a text file that happens to contain a copy of your cid code. Sorry
@MOD... If any forum mods are reading, please lock this thread for me, thanks !
Sent from my HTC One X using XDA
mmcblk0p14 contains the cid
no lets keep this discussion outside the S-off section
changing CID is a different and as important as s-off
its really odd that this can be done for the One S and not the X
Hello, I've found 0x00A00000 at /dev/block/mmcblk0 is where the cid and IMEI were stored for some time, but I didn't found a way to change it.
But now that I've got a way to modify it. Use the dd command from Busybox, it can let you use the "conv=notrunc" parameter to write the changed cid into /dev/block/mmcblk0. btw, 0x00A00000 is the offset of DIAG partition, so here is the start of diag partition.
You may use dd command to export the mmcblk0 from 0x00A00000 to a file called "towrite", and modify it using a hex editor, then do the flash just as the following command in the shell:
Code:
busybox dd if=/sdcard/towrite of=/dev/block/mmcblk0 bs=1024 count=1 seek=10240 conv=notrunc
Then you willl get it modified(you can check it by "dd if=/dev/block/mmcblk0 of=/sdcard/dump.txt bs=1024 count=1 skip=10240", and then check "dump.txt" in your sdcard, you will see it has been modified.)
BUT IT WON'T CHANGE THE CID ACTUALLY. If you reboot into bootloader, and execute "fastboot oem readcid" then, the cid remains the original one.
So...I think the CID must be stored in the motherboard, and can't be modified by software methods.
What's about the idea to rip the mmcblk0p4 from an S-OFF device and put it on a S-ON device? As far as I know the hboot is stored within this partition.
It might be that the IMEI will also be the same but I guess with the current eng-hboot there is an option to change it.
Who can offer a backup from an TEGRA S-OFF device?
Don't waste your time, as of now you cannot change your cid, if s_off comes in the future this may change but it might never happen.
Sent from my HTC One X using xda app-developers app
hamdir said:
no lets keep this discussion outside the S-off section
changing CID is a different and as important as s-off
its really odd that this can be done for the One S and not the X
Click to expand...
Click to collapse
i believe its possible for the x if its possible for the s.
but at the same time, i dun think its possible.
remember, the s is a qualcomm and the x is a tegra
shiningarmor said:
i believe its possible for the x if its possible for the s.
but at the same time, i dun think its possible.
remember, the s is a qualcomm and the x is a tegra
Click to expand...
Click to collapse
The one x and the one s do not share the same SoC. What works on the one s doesn't necessarily work on the one x.
Sent from somewhere....if I could only remember where....

[Q] E:failed to mount /efs (Invalid argument)

Guys I'm in over my head on this one. Long story short I needed to restore the efs partition which I backed up with the Galaxy Note 2 toolkit. Right as I choose the option to restore it I get a blue screen, computer restarts and now the phone won't boot any more. I said I shouldn't worry I just need to flash the efs.img back-up... I tried creating an Odin flashable tar file using the toolkit again but the process of flashing it with Odin fails every time... I also tried flashing a stock firmware and clearing the efs using Odin.
If I go into recovery I get: "E:failed to mount /efs (Invalid argument)"
Any help is greatly appreciated...
Download toolkit. Put img in backup folder and restore via toolkit.
Btw where you in recovery while trying ?
Sent From Samsung's Galaxy Note II Using Internet
No chance
UtkarshGupta said:
Download toolkit. Put img in backup folder and restore via toolkit.
Btw where you in recovery while trying ?
Sent From Samsung's Galaxy Note II Using Internet
Click to expand...
Click to collapse
Thank you for your reply but my phone doesn't boot to android... it hangs at the SAMSUNG logo so I cannot use the toolkit which requires that the phone is booted to android with USB debugging on.
DieZz said:
Thank you for your reply but my phone doesn't boot to android... it hangs at the SAMSUNG logo so I cannot use the toolkit which requires that the phone is booted to android with USB debugging on.
Click to expand...
Click to collapse
Is the device able to boot into recovery? If it is, boot into CWM, wait a minute or two, and then ADB will be up and running and you can use the toolkit. ADB works in CWM just like it does booted into Android.
If you're still rocking a stock recovery, just flash CWM using ODIN. Then boot into recovery and use the toolkit via ADB.
Let me know if any of this helps.
Sent from my GT-N7100 using XDA Premium HD app
Still no change
Mister_Mxyzptlk said:
Is the device able to boot into recovery? If it is, boot into CWM, wait a minute or two, and then ADB will be up and running and you can use the toolkit. ADB works in CWM just like it does booted into Android.
If you're still rocking a stock recovery, just flash CWM using ODIN. Then boot into recovery and use the toolkit via ADB.
Let me know if any of this helps.
Sent from my GT-N7100 using XDA Premium HD app
Click to expand...
Click to collapse
The computer recognized the phone in ADB mode but the toolkit is still prompting me to enable USB debugging and it doesn't detect the phone. Thanks for your reply though...
I went into mounts and storage and tried to mount efs - no luck..
DieZz said:
The computer recognized the phone in ADB mode but the toolkit is still prompting me to enable USB debugging and it doesn't detect the phone. Thanks for your reply though...
I went into mounts and storage and tried to mount efs - no luck..
Click to expand...
Click to collapse
You may need to reinstall the Samsung mobile device USB driver. Also, make sure you've got root access in ADB. Additionally, you may need to restore your efs backup directly via ADB instead of the toolkit. There's a few threads with tutorials. Regardless, as long as you have an efs backup, you're not totally screwed... yet.
Sent from my GT-N7100 using XDA Premium HD app
No solution
Thank you all for your replies but I am afraid that the only solution once this problem has happened is to return the phone to service. No matter what I have tried nothing worked so I ended up sending the phone away. If anyone finds themselves in my position my advice is not to waste any time on it...
DieZz said:
Thank you all for your replies but I am afraid that the only solution once this problem has happened is to return the phone to service. No matter what I have tried nothing worked so I ended up sending the phone away. If anyone finds themselves in my position my advice is not to waste any time on it...
Click to expand...
Click to collapse
I had the same issue last night my man - took me HOURS to fix it. In the end the solution was to boot into CWM and enter a few ADB commands on the PC:
Run an SU shell, then enter "mke2fs / dev/block/mmcblk0p3", then "mount-w-t ext4 / dev/block/mmcblk0p3 / efs"
This magically made the EFS partition mountable again. I then restored my EFS image, and wala all was good again.
But yes you are right, this is DAMN hard to fix (I had to trawl the internet for hours). A full wipe / odin stock rom flash / repartition does not solve the issue.
agentdark45 said:
I had the same issue last night my man - took me HOURS to fix it. In the end the solution was to boot into CWM and enter a few ADB commands on the PC:
Run an SU shell, then enter "mke2fs / dev/block/mmcblk0p3", then "mount-w-t ext4 / dev/block/mmcblk0p3 / efs"
This magically made the EFS partition mountable again. I then restored my EFS image, and wala all was good again.
But yes you are right, this is DAMN hard to fix (I had to trawl the internet for hours). A full wipe / odin stock rom flash / repartition does not solve the issue.
Click to expand...
Click to collapse
Hi All, I have this problem after rooting the stock rom and taking a backup nandroid. The intention was to then install Philz safe kernel and take efs backup. But on reboot from CMW, the phone loops as described above and I get the invalid efs message in the OP.
I can boot into CWM recovery and downloaded and flashed the Rom many times and also installed Philz Rom with no success. Tried Samsung service centre who also refuse to touch the phone.
Having found this ADB suggestion I have followed the instructions above but I get the response ' invalid blocks count - dev/block/mmcblk0p3 ' and can go no further.
If anyone has any other ideas that a noobie can try I shall be very grateful. If not I guess it is going to be ebay!
Thanks.
agentdark45 said:
I had the same issue last night my man - took me HOURS to fix it. In the end the solution was to boot into CWM and enter a few ADB commands on the PC:
Run an SU shell, then enter "mke2fs / dev/block/mmcblk0p3", then "mount-w-t ext4 / dev/block/mmcblk0p3 / efs"
This magically made the EFS partition mountable again. I then restored my EFS image, and wala all was good again.
But yes you are right, this is DAMN hard to fix (I had to trawl the internet for hours). A full wipe / odin stock rom flash / repartition does not solve the issue.
Click to expand...
Click to collapse
Hi !
I have the same problem with my GN2 N7100 and i try to do "mke2fs / dev/block/mmcblk0p3", then "mount-w-t ext4 / dev/block/mmcblk0p3 / efs" but i don't have any file mmcblk0p3.
look my folder :
cd /dev/block
/dev/block # ls -ltr
ls -ltr
brw------- 1 root root 1, 9 Jan 2 03:39 ram9
brw------- 1 root root 1, 8 Jan 2 03:39 ram8
brw------- 1 root root 1, 7 Jan 2 03:39 ram7
brw------- 1 root root 1, 6 Jan 2 03:39 ram6
brw------- 1 root root 1, 5 Jan 2 03:39 ram5
brw------- 1 root root 1, 4 Jan 2 03:39 ram4
brw------- 1 root root 1, 3 Jan 2 03:39 ram3
brw------- 1 root root 1, 2 Jan 2 03:39 ram2
brw------- 1 root root 1, 15 Jan 2 03:39 ram15
brw------- 1 root root 1, 14 Jan 2 03:39 ram14
brw------- 1 root root 1, 13 Jan 2 03:39 ram13
brw------- 1 root root 1, 12 Jan 2 03:39 ram12
brw------- 1 root root 1, 11 Jan 2 03:39 ram11
brw------- 1 root root 1, 10 Jan 2 03:39 ram10
brw------- 1 root root 1, 1 Jan 2 03:39 ram1
brw------- 1 root root 1, 0 Jan 2 03:39 ram0
drwxr-xr-x 4 root root 80 Jan 2 03:39 platform
brw------- 1 root root 179, 19 Jan 2 03:39 mmcblk1p3
brw------- 1 root root 179, 18 Jan 2 03:39 mmcblk1p2
brw------- 1 root root 179, 17 Jan 2 03:39 mmcblk1p1
brw------- 1 root root 179, 16 Jan 2 03:39 mmcblk1
brw------- 1 root root 179, 9 Jan 2 03:39 mmcblk0p9
brw------- 1 root root 179, 8 Jan 2 03:39 mmcblk0p8
brw-rw---- 1 system root 179, 7 Jan 2 03:39 mmcblk0p7
brw-rw---- 1 system radio 179, 6 Jan 2 03:39 mmcblk0p6
brw-rw---- 1 system radio 179, 5 Jan 2 03:39 mmcblk0p5
brw-rw---- 1 system radio 179, 4 Jan 2 03:39 mmcblk0p4
brw------- 1 root root 179, 3 Jan 2 03:39 mmcblk0p3
brw------- 1 root root 179, 2 Jan 2 03:39 mmcblk0p2
brw------- 1 root root 259, 0 Jan 2 03:39 mmcblk0p16
brw------- 1 root root 179, 15 Jan 2 03:39 mmcblk0p15
brw------- 1 root root 179, 14 Jan 2 03:39 mmcblk0p14
brw------- 1 root root 179, 13 Jan 2 03:39 mmcblk0p13
brw-rw---- 1 system radio 179, 11 Jan 2 03:39 mmcblk0p11
brw-rw---- 1 system radio 179, 10 Jan 2 03:39 mmcblk0p10
brw------- 1 root root 179, 1 Jan 2 03:39 mmcblk0p1
brw------- 1 root root 179, 0 Jan 2 03:39 mmcblk0
brw------- 1 root root 7, 7 Jan 2 03:39 loop7
brw------- 1 root root 7, 6 Jan 2 03:39 loop6
brw------- 1 root root 7, 5 Jan 2 03:39 loop5
brw------- 1 root root 7, 4 Jan 2 03:39 loop4
brw------- 1 root root 7, 3 Jan 2 03:39 loop3
brw------- 1 root root 7, 2 Jan 2 03:39 loop2
brw------- 1 root root 7, 1 Jan 2 03:39 loop1
brw------- 1 root root 7, 0 Jan 2 03:39 loop0
brw------- 1 root root 179, 12 Jan 2 03:40 mmcblk0p12
Someone can help me please ?
maybe a funny question, but you may have missed the spot tho..
Did you mount /efs using cwm and fix the permissions?
If not give it a try. Then use cwm to restore efs. I would suggest philz touch anyways
myaslioglu said:
maybe a funny question, but you may have missed the spot tho..
Did you mount /efs using cwm and fix the permissions?
If not give it a try. Then use cwm to restore efs. I would suggest philz touch anyways
Click to expand...
Click to collapse
Thank's for your answer but i can't mount /efs from cwm : i have an error message : "Error mounting /efs!"
How can i restore efs from cwm ?
Maybe efs partition is corrupt.
Ask some expert like skip or ketan to help you reformat it properly.
Sent from my GT-N7100 using xda app-developers app
Thanks but I have the same problem. Attempting to mount /efs gives the response 'Error mounting /efs!'
I agree whole heartedly about Philz Kernel and had wanted this running on this Note 2 having had it on the original Note.
tcastel said:
Hi !
I have the same problem with my GN2 N7100 and i try to do "mke2fs / dev/block/mmcblk0p3", then "mount-w-t ext4 / dev/block/mmcblk0p3 / efs" but i don't have any file mmcblk0p3.
look my folder :
cd /dev/block
/dev/block # ls -ltr
ls -ltr
brw------- 1 root root 1, 9 Jan 2 03:39 ram9
brw------- 1 root root 1, 8 Jan 2 03:39 ram8
brw------- 1 root root 1, 7 Jan 2 03:39 ram7
brw------- 1 root root 1, 6 Jan 2 03:39 ram6
brw------- 1 root root 1, 5 Jan 2 03:39 ram5
brw------- 1 root root 1, 4 Jan 2 03:39 ram4
brw------- 1 root root 1, 3 Jan 2 03:39 ram3
brw------- 1 root root 1, 2 Jan 2 03:39 ram2
brw------- 1 root root 1, 15 Jan 2 03:39 ram15
brw------- 1 root root 1, 14 Jan 2 03:39 ram14
brw------- 1 root root 1, 13 Jan 2 03:39 ram13
brw------- 1 root root 1, 12 Jan 2 03:39 ram12
brw------- 1 root root 1, 11 Jan 2 03:39 ram11
brw------- 1 root root 1, 10 Jan 2 03:39 ram10
brw------- 1 root root 1, 1 Jan 2 03:39 ram1
brw------- 1 root root 1, 0 Jan 2 03:39 ram0
drwxr-xr-x 4 root root 80 Jan 2 03:39 platform
brw------- 1 root root 179, 19 Jan 2 03:39 mmcblk1p3
brw------- 1 root root 179, 18 Jan 2 03:39 mmcblk1p2
brw------- 1 root root 179, 17 Jan 2 03:39 mmcblk1p1
brw------- 1 root root 179, 16 Jan 2 03:39 mmcblk1
brw------- 1 root root 179, 9 Jan 2 03:39 mmcblk0p9
brw------- 1 root root 179, 8 Jan 2 03:39 mmcblk0p8
brw-rw---- 1 system root 179, 7 Jan 2 03:39 mmcblk0p7
brw-rw---- 1 system radio 179, 6 Jan 2 03:39 mmcblk0p6
brw-rw---- 1 system radio 179, 5 Jan 2 03:39 mmcblk0p5
brw-rw---- 1 system radio 179, 4 Jan 2 03:39 mmcblk0p4
brw------- 1 root root 179, 3 Jan 2 03:39 mmcblk0p3
brw------- 1 root root 179, 2 Jan 2 03:39 mmcblk0p2
brw------- 1 root root 259, 0 Jan 2 03:39 mmcblk0p16
brw------- 1 root root 179, 15 Jan 2 03:39 mmcblk0p15
brw------- 1 root root 179, 14 Jan 2 03:39 mmcblk0p14
brw------- 1 root root 179, 13 Jan 2 03:39 mmcblk0p13
brw-rw---- 1 system radio 179, 11 Jan 2 03:39 mmcblk0p11
brw-rw---- 1 system radio 179, 10 Jan 2 03:39 mmcblk0p10
brw------- 1 root root 179, 1 Jan 2 03:39 mmcblk0p1
brw------- 1 root root 179, 0 Jan 2 03:39 mmcblk0
brw------- 1 root root 7, 7 Jan 2 03:39 loop7
brw------- 1 root root 7, 6 Jan 2 03:39 loop6
brw------- 1 root root 7, 5 Jan 2 03:39 loop5
brw------- 1 root root 7, 4 Jan 2 03:39 loop4
brw------- 1 root root 7, 3 Jan 2 03:39 loop3
brw------- 1 root root 7, 2 Jan 2 03:39 loop2
brw------- 1 root root 7, 1 Jan 2 03:39 loop1
brw------- 1 root root 7, 0 Jan 2 03:39 loop0
brw------- 1 root root 179, 12 Jan 2 03:40 mmcblk0p12
Someone can help me please ?
Click to expand...
Click to collapse
I solved half my problem:
by "mke2fs / dev/block/mmcblk0p3" and "mount-w-t ext4 / dev/block/mmcblk0p3 / efs" the phone connected to the pc and recovery by running the cmd windows.
Now the phone starts but I have a black rectangle with the version of my PDA etc ... (see the picture)
Someone can help me please ?
Make a efs backup again a duplicate to be safe. Then flash stock rom again.
And also do a cache and dalvik and data wipe.
Sent from my GT-N7100 using xda app-developers app
UtkarshGupta said:
Make a efs backup again a duplicate to be safe. Then flash stock rom again.
And also do a cache and dalvik and data wipe.
Sent from my GT-N7100 using xda app-developers app
Click to expand...
Click to collapse
Thank you for your answer but i sent my phone to warranty this morning.
UtkarshGupta said:
Make a efs backup again a duplicate to be safe. Then flash stock rom again.
And also do a cache and dalvik and data wipe.
Sent from my GT-N7100 using xda app-developers app
Click to expand...
Click to collapse
Thanks for this; I had already tried this, but have given it another try. Still the same issue with the boot loop and "E:failed to mount /efs (Invalid argument)" when I try to make any changes in CWM.
tcastel said:
I solved half my problem:
by "mke2fs / dev/block/mmcblk0p3" and "mount-w-t ext4 / dev/block/mmcblk0p3 / efs" the phone connected to the pc and recovery by running the cmd windows.
Now the phone starts but I have a black rectangle with the version of my PDA etc ... (see the picture)
Someone can help me please ?
Click to expand...
Click to collapse
Hi how did you open a SU shell in the Toolkit - which command did you use or did you download an program to do that?
pdafan1 said:
Hi how did you open a SU shell in the Toolkit - which command did you use or did you download an program to do that?
Click to expand...
Click to collapse
You have to put the phone in recovery mode (CWM), wait 2min, plug it to your pc, launch cmd, go to your adb folder and now you can use adb !

[Q] FXP319 soft bricked my c1905?

Hi,
recently i updated via CWM my unblocked, rooted xperia m (C1905). Phone has FXP317, earlier i updated radio installing stock 4.3 and it going well, besides fatal GPS, as usual
After upgrade form FXP317 to FXP319 and reboot phone, it running veeeryy slow and suddenly hangs up. After restart to CWM (it lasts couple minutes), i try to install it again (install from zip) and it failed - it shows problem with mounting /DATA.
Now i attempt to format /DATA but it failed - CWM says that partition can't be mounted.
Another try - flash stock rom (Flasher form Androxyde) gives
Code:
19/048/2014 07:48:57 - INFO - Device connected in flash mode
19/049/2014 07:49:06 - INFO - Selected Bundle for Xperia M C1905. FW release : Google Android 4.3 (Jelly Bean). Customization : 15.4.A.0.23
19/049/2014 07:49:06 - INFO - Preparing files for flashing
19/049/2014 07:49:53 - INFO - Please connect your device into flashmode.
19/049/2014 07:49:54 - INFO - Opening device for R/W
19/049/2014 07:49:54 - INFO - Reading device information
19/049/2014 07:49:54 - INFO - Phone ready for flashmode operations.
19/049/2014 07:49:54 - INFO - Current device : Unknown: Mar 7 2014/10:51:59 - YT910M7GB9 - Unknown: Mar 7 2014/10:51:59 - Unknown: Mar 7 2014/10:51:59 - Unknown: Mar 7 2014/10:51:59
19/049/2014 07:49:54 - INFO - Start Flashing
19/049/2014 07:49:54 - INFO - Processing loader.sin
19/049/2014 07:49:54 - INFO - Checking header
19/049/2014 07:49:54 - INFO - Flashing data
19/049/2014 07:49:55 - INFO - Processing of loader.sin finished.
19/049/2014 07:49:55 - INFO - Loader : S1_Root_dbe9 - Version : loader_MSM8X30_10 / Boot version : S1_Boot_MSM_8227_5 / Bootloader status : ROOTED
19/049/2014 07:49:55 - INFO - Processing partition-image.sin
19/049/2014 07:49:55 - INFO - Checking header
19/049/2014 07:49:55 - INFO - Flashing data
19/049/2014 07:49:55 - INFO - Processing of partition-image.sin finished.
19/049/2014 07:49:55 - INFO - Parsing boot delivery
19/049/2014 07:49:55 - INFO - Phone boot version : S1_Boot_MSM_8227_5. Boot delivery version : S1_Boot_MSM_8227_5
19/049/2014 07:49:55 - INFO - Boot delivery up to date. Nothing to do
19/049/2014 07:49:55 - INFO - Processing kernel.sin
19/049/2014 07:49:55 - INFO - Checking header
19/049/2014 07:49:55 - INFO - Flashing data
19/049/2014 07:49:55 - ERROR - Processing of kernel.sin finished with errors.
19/049/2014 07:49:55 - INFO - Ending flash session
19/049/2014 07:49:55 - ERROR - ERR_SEVERITY="MINOR";ERR_CODE="0017";ERR_DYNAMIC="0x8020001C ";
Soft from SONY - SUS, PC Companion, EMMA did't recognize my phone and gives up.
Meanwhile i flash kernel and i made fatal mistake (i thought so) - i tried to flash wrong kernel (it has 83 bytes), but after choosing the right file I could install the appropriate kernel.
Now i have CWM 6.0.4.8, and i can connect phone in flash mode, also in fastboot but i can't flash any rom because i can't mount /data
Command adb devices -l gives
List of devices attached
YT910M7GB9 recovery product:C1905 model:C1905 device:nicki
How to mount /data or how to do the re-partition? What should I do to flash the stock rom?
Have you flashed the stock ROM again? Does it still show the same error?
elmkzgirxp said:
Have you flashed the stock ROM again? Does it still show the same error?
Click to expand...
Click to collapse
Yes, i did and same again. I have stock ROM 4.1.2, stock ROM 4.3. One thing - phone starts and - after maybe 30 min or so - stops on "Encryption unsuccessful bla bla bla". I try even recovery backup form http://forum.xda-developers.com/showthread.php?p=51574842 but it failed - folder /system cannot be restored.
I'm thinking about partitioning internal memory, but i don't know how. I have an access via flashmode and i'm looking for solution about using adb
Encryption? How'd that get there?
elmkzgirxp said:
Encryption? How'd that get there?
Click to expand...
Click to collapse
In my case - remove battery, wait 5 sec, i turn on the phone and wait about 30 min - after that long boot this is all i see.
TomekParuszewski said:
In my case - remove battery, wait 5 sec, i turn on the phone and wait about 30 min - after that long boot this is all i see.
Click to expand...
Click to collapse
Why not refer here... This might solve your problem.
elmkzgirxp said:
Why not refer here... This might solve your problem.
Click to expand...
Click to collapse
Thx, so far i don't find exactly the same problem as mine, but now i try rubber band trick. I don't know how this will help, will see
Exact same problem
With fxp 18
TomekParuszewski said:
Thx, so far i don't find exactly the same problem as mine, but now i try rubber band trick. I don't know how this will help, will see
Click to expand...
Click to collapse
Hmm, according to the definition of soft brick, and therefore that I can enter fastboot mode and flashmode and CWM, the phone is not soft bricked, but there is a problem with partitions or privileges SU, because I can not reflash rom. The system is still not able to mount the directory / data.
I will try connect to phone by the adb command and see, err, i don't know what - i must check available commands. Right now i'm waiting for CWM
After get into adb shell i get:
Code:
C:\SDK\sdk\platform-tools>adb shell
~ # ←[6nsu
su
/sbin/sh: su: not found
~ # ←[6ndf
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 440892 128 440764 0% /dev
tmpfs 440892 8 440884 0% /tmp
tmpfs 440892 0 440892 0% /storage
tmpfs 440892 0 440892 0% /mnt/secure
tmpfs 440892 0 440892 0% /mnt/fuse
/dev/block/platform/msm_sdcc.1/by-name/cache
252136 4660 247476 2% /cache
~ # ←[6nls -l
ls -l
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x 2 root root 0 May 21 04:33 boot
-rw-r--r-- 1 root root 579 May 21 04:33 boot.txt
drwxrwx--x 6 system cache 4096 May 17 10:36 cache
-rwxr-x--- 1 root root 284696 May 21 04:33 charger
drwxr-xr-x 3 root root 0 May 21 04:33 data
drwxr-xr-x 2 root root 0 May 21 04:33 datadata
-rw-r--r-- 1 root root 3920 May 21 04:33 default.prop
drwxr-xr-x 10 root root 3260 May 21 04:33 dev
drwxr-xr-x 2 root root 0 May 21 04:33 emmc
drwxr-xr-x 2 root root 0 May 21 04:33 etc
drwxr-xr-x 2 root root 0 May 21 04:33 external_sd
-rw-r--r-- 1 root root 10961 May 21 04:33 file_contexts
-rw-r----- 1 root root 1213 May 21 04:33 fstab.qcom
-rwxr-x--- 1 root root 187840 May 21 04:33 init
-rwxr-x--- 1 root root 2704 May 21 04:33 init.qcom.syspart_fixup.sh
-rwxr-x--- 1 root root 2892 May 21 04:33 init.rc
-rwxr-x--- 1 root root 512 May 21 04:33 init.recovery.qcom.rc
drwxr-xr-x 2 root root 0 May 21 04:33 internal_sd
-rw-r--r-- 1 root root 14452 Jan 1 1970 logo.rle
drwxrwxr-x 5 root system 0 May 21 04:33 mnt
dr-xr-xr-x 131 root root 0 Jan 1 1970 proc
-rw-r--r-- 1 root root 2161 May 21 04:33 property_contexts
drwxr-xr-x 2 root root 0 May 21 04:33 recovery
drwxr-xr-x 3 root root 0 May 21 04:33 res
drwx------ 2 root root 0 May 13 22:52 root
drwxr-x--- 2 root root 0 May 21 04:33 sbin
drwxr-xr-x 2 root root 0 May 21 04:33 sd-ext
lrwxrwxrwx 1 root root 11 May 21 04:33 sdcard -> /data/media
-rw-r--r-- 1 root root 660 May 21 04:33 seapp_contexts
-rw-r--r-- 1 root root 95689 May 21 04:33 sepolicy
d---r-x--- 2 root sdcard_r 40 May 21 04:33 storage
dr-xr-xr-x 14 root root 0 May 21 04:33 sys
drwxr-xr-x 3 root root 0 May 21 04:33 system
drwxrwxr-x 2 root shell 60 May 21 04:33 tmp
-rw-r--r-- 1 root root 8196 May 21 04:33 ueventd.qcom.rc
-rw-r--r-- 1 root root 7275 May 21 04:33 ueventd.rc
C:\SDK\sdk\platform-tools>adb remount
remount failed: Success
C:\SDK\sdk\platform-tools>adb devices -l
List of devices attached
YT910M7GB9 recovery product:C1905 model:C1905 device:nicki
C:\SDK\sdk\platform-tools>adb shell
~ # ←[6nls -l
ls -l
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x 2 root root 0 May 21 04:33 boot
-rw-r--r-- 1 root root 579 May 21 04:33 boot.txt
drwxrwx--x 6 system cache 4096 May 17 10:36 cache
-rwxr-x--- 1 root root 284696 May 21 04:33 charger
drwxr-xr-x 3 root root 0 May 21 04:33 data
drwxr-xr-x 2 root root 0 May 21 04:33 datadata
-rw-r--r-- 1 root root 3920 May 21 04:33 default.prop
drwxr-xr-x 10 root root 3260 May 21 04:33 dev
drwxr-xr-x 2 root root 0 May 21 04:33 emmc
drwxr-xr-x 2 root root 0 May 21 04:33 etc
drwxr-xr-x 2 root root 0 May 21 04:33 external_sd
-rw-r--r-- 1 root root 10961 May 21 04:33 file_contexts
-rw-r----- 1 root root 1213 May 21 04:33 fstab.qcom
-rwxr-x--- 1 root root 187840 May 21 04:33 init
-rwxr-x--- 1 root root 2704 May 21 04:33 init.qcom.syspart_fixup.sh
-rwxr-x--- 1 root root 2892 May 21 04:33 init.rc
-rwxr-x--- 1 root root 512 May 21 04:33 init.recovery.qcom.rc
drwxr-xr-x 2 root root 0 May 21 04:33 internal_sd
-rw-r--r-- 1 root root 14452 Jan 1 1970 logo.rle
drwxrwxr-x 5 root system 0 May 21 04:33 mnt
dr-xr-xr-x 131 root root 0 Jan 1 1970 proc
-rw-r--r-- 1 root root 2161 May 21 04:33 property_contexts
drwxr-xr-x 2 root root 0 May 21 04:33 recovery
drwxr-xr-x 3 root root 0 May 21 04:33 res
drwx------ 2 root root 0 May 13 22:52 root
drwxr-x--- 2 root root 0 May 21 04:33 sbin
drwxr-xr-x 2 root root 0 May 21 04:33 sd-ext
lrwxrwxrwx 1 root root 11 May 21 04:33 sdcard -> /data/media
-rw-r--r-- 1 root root 660 May 21 04:33 seapp_contexts
-rw-r--r-- 1 root root 95689 May 21 04:33 sepolicy
d---r-x--- 2 root sdcard_r 40 May 21 04:33 storage
dr-xr-xr-x 14 root root 0 May 21 04:33 sys
drwxr-xr-x 3 root root 0 May 21 04:33 system
drwxrwxr-x 2 root shell 60 May 21 04:33 tmp
-rw-r--r-- 1 root root 8196 May 21 04:33 ueventd.qcom.rc
-rw-r--r-- 1 root root 7275 May 21 04:33 ueventd.rc
~ # ←[6ndf
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 440892 128 440764 0% /dev
tmpfs 440892 8 440884 0% /tmp
tmpfs 440892 0 440892 0% /storage
tmpfs 440892 0 440892 0% /mnt/secure
tmpfs 440892 0 440892 0% /mnt/fuse
/dev/block/platform/msm_sdcc.1/by-name/cache
252136 4660 247476 2% /cache
C:\SDK\sdk\platform-tools>adb shell
~ # ←[6ndf -h
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 430.6M 128.0K 430.4M 0% /dev
tmpfs 430.6M 8.0K 430.6M 0% /tmp
tmpfs 430.6M 0 430.6M 0% /storage
tmpfs 430.6M 0 430.6M 0% /mnt/secure
tmpfs 430.6M 0 430.6M 0% /mnt/fuse
/dev/block/platform/msm_sdcc.1/by-name/cache
246.2M 4.6M 241.7M 2% /cache
~ # ←[6nfdisk
fdisk
BusyBox v1.22.1 static (2014-04-06 21:24 +0200) multi-call binary.
Usage: fdisk [-ul] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK
Change partition table
-u Start and End are in sectors (instead of cylinders)
-l Show partition table for each DISK, then exit
-b 2048 (for certain MO disks) use 2048-byte sectors
-C CYLINDERS Set number of cylinders/heads/sectors
-H HEADS
-S SECTORS
~ # ←[6nfdisk -l
fdisk -l
~ # ←[6nfdisk -l
fdisk -l
~ # ←[6n^C
C:\SDK\sdk\platform-tools>
C:\SDK\sdk\platform-tools>adb shell
~ # ←[6nls
ls
boot logo.rle
boot.txt mnt
cache proc
charger property_contexts
data recovery
datadata res
default.prop root
dev sbin
emmc sd-ext
etc sdcard
external_sd seapp_contexts
file_contexts sepolicy
fstab.qcom storage
init sys
init.qcom.syspart_fixup.sh system
init.rc tmp
init.recovery.qcom.rc ueventd.qcom.rc
internal_sd ueventd.rc
~ # ←[6ndf
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 440892 128 440764 0% /dev
tmpfs 440892 8 440884 0% /tmp
tmpfs 440892 0 440892 0% /storage
tmpfs 440892 0 440892 0% /mnt/secure
tmpfs 440892 0 440892 0% /mnt/fuse
/dev/block/platform/msm_sdcc.1/by-name/cache
252136 4660 247476 2% /cache
~ # ←[6ncd data
cd data
/data # ←[6nls
ls
media
/data # ←[6n^C
C:\SDK\sdk\platform-tools>adb shell
~ # ←[6nls -l
ls -l
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x 2 root root 0 May 21 04:33 boot
-rw-r--r-- 1 root root 579 May 21 04:33 boot.txt
drwxrwx--x 6 system cache 4096 May 17 10:36 cache
-rwxr-x--- 1 root root 284696 May 21 04:33 charger
drwxr-xr-x 3 root root 0 May 21 04:33 data
drwxr-xr-x 2 root root 0 May 21 04:33 datadata
-rw-r--r-- 1 root root 3920 May 21 04:33 default.prop
drwxr-xr-x 10 root root 3260 May 21 04:33 dev
drwxr-xr-x 2 root root 0 May 21 04:33 emmc
drwxr-xr-x 2 root root 0 May 21 04:33 etc
drwxr-xr-x 2 root root 0 May 21 04:33 external_sd
-rw-r--r-- 1 root root 10961 May 21 04:33 file_contexts
-rw-r----- 1 root root 1213 May 21 04:33 fstab.qcom
-rwxr-x--- 1 root root 187840 May 21 04:33 init
-rwxr-x--- 1 root root 2704 May 21 04:33 init.qcom.syspart_fixup.sh
-rwxr-x--- 1 root root 2892 May 21 04:33 init.rc
-rwxr-x--- 1 root root 512 May 21 04:33 init.recovery.qcom.rc
drwxr-xr-x 2 root root 0 May 21 04:33 internal_sd
-rw-r--r-- 1 root root 14452 Jan 1 1970 logo.rle
drwxrwxr-x 5 root system 0 May 21 04:33 mnt
dr-xr-xr-x 131 root root 0 Jan 1 1970 proc
-rw-r--r-- 1 root root 2161 May 21 04:33 property_contexts
drwxr-xr-x 2 root root 0 May 21 04:33 recovery
drwxr-xr-x 3 root root 0 May 21 04:33 res
drwx------ 2 root root 0 May 13 22:52 root
drwxr-x--- 2 root root 0 May 21 04:33 sbin
drwxr-xr-x 2 root root 0 May 21 04:33 sd-ext
lrwxrwxrwx 1 root root 11 May 21 04:33 sdcard -> /data/media
-rw-r--r-- 1 root root 660 May 21 04:33 seapp_contexts
-rw-r--r-- 1 root root 95689 May 21 04:33 sepolicy
d---r-x--- 2 root sdcard_r 40 May 21 04:33 storage
dr-xr-xr-x 14 root root 0 May 21 04:33 sys
drwxr-xr-x 3 root root 0 May 21 04:33 system
drwxrwxr-x 2 root shell 60 May 21 04:33 tmp
-rw-r--r-- 1 root root 8196 May 21 04:33 ueventd.qcom.rc
-rw-r--r-- 1 root root 7275 May 21 04:33 ueventd.rc
I don't have any information about partitions (filesystem tmpfs)!
TomekParuszewski said:
I don't have any information about partitions (filesystem tmpfs)!
Click to expand...
Click to collapse
Firstly you need mount partitions through recovery: item mounts and storage
Also from there try to format all of them and then flash via flashtool / via ZIP / restore backup.
Here is possibility that your NAND-flash (internal 4GB memory chip) broken or have a lot bad sectors.
Bonoboo said:
Firstly you need mount partitions through recovery: item mounts and storage
Also from there try to format all of them and then flash via flashtool / via ZIP / restore backup.
Here is possibility that your NAND-flash (internal 4GB memory chip) broken or have a lot bad sectors.
Click to expand...
Click to collapse
Unfortunately, I can not mount / data or / system. After a very long time the command mount / data, then throws an error, the contents of which I can not remember now. I will try to rewrite its contents exactly as it appears. is below:
(i'm wainting rught now - 14:29)
I have version 6.0.4.8 CWM and I see no formatting options. I tried to upload the CWM 6.0.4.7 from this post http://forum.xda-developers.com/showthread.php?t=2494793 but I could not do that. I still have my version. My bad, of course i have format command.
Does this mean that my phone died? Do I still have any chance to fix it?
TomekParuszewski said:
After a very long time the command mount / data, then throws an error, the contents of which I can not remember now. I will try to rewrite its contents exactly as it appears.
Click to expand...
Click to collapse
Command from ADB? Try from recovery menu.
And output of command will be helpful.
TomekParuszewski said:
Does this mean that my phone died?
Click to expand...
Click to collapse
Don't give up for now.
UPD: I googled ERR_DYNAMIC=0x8020001C and found 7 threads with same problem with Xperia M:
1, 2, 3, 4, 5, 6, 7
All them have error while flashing different parts: kernel and data.
And no solution there for now.
Bonoboo said:
Command from ADB? Try from recovery menu.
And output of command will be helpful.
Don't give up for now.
Click to expand...
Click to collapse
thank you for your words of encouragement - I'm gonna fight to the end
BTW - in time when i'm waiting to output for command mount /data from recovery, I have access to the phone via adb (but it's normal after all, i suppose)
Bonoboo said:
UPD: I googled ERR_DYNAMIC=0x8020001C and found 6 threads with same problem with Xperia M:
1, 2, 3, 4, 5, 6
All them have error while flashing different parts: kernel and data.
And no solution there for now.
Click to expand...
Click to collapse
yes, most of them i've seen, thx
Just info :
Re-partition method not available for now.
Maybe when flashing via flashtool keep tick only on partition-image.sin restore stock.
There is some method to erase internal memory via adb, but it for other model.
And I don't know will it help here.
Questions:
1. So your device not was encrypted, right?
2. Try mounts and storage > format all
3. Try mount via menu in recovery
Bonoboo said:
Just info :
Re-partition method not available for now.
Maybe when flashing via flashtool keep tick only on partition-image.sin restore stock.
There is some method to erase internal memory via adb, but it for other model.
And I don't know will it help here.
Questions:
1. So your device not was encrypted, right?
3. You sure that in mounts and storage no format options?
4. Try mount via menu in recovery?
2. How about post error while mounting?
Click to expand...
Click to collapse
Answers:
If i'm wait long enough, phone boot to screen "Encryption unsuccessful", so i don't know - I do not encrypt the phone as I remember
Sorry, of course there is format command in recovery, my bad
I will try again and write exact message from the screen
Sorry for messing numbers, I edited post.
TomekParuszewski said:
in time when i'm waiting to output for command mount /data from recovery, I have access to the phone via adb (but it's normal after all, i suppose)
Click to expand...
Click to collapse
Seems not. Reboot.
Try formatting.
Just note about adb output earlier.
ls shows temporary FS that recovery creates in RAM.
By fact blocks devices in /dev/block/ and we can do something with them, like recreate partitions using mke2fs
Or erase them by dd if=/dev/zero
Try commands:
cat /proc/partitions
mount
fdisk -l /dev/block/mmcblk0p17
fdisk -l /dev/block/mmcblk0p5
And try flashing via flashtool:
– untick wipe data and cache
– tick all in Exclude section except partition
Here useful commands (similar problem for Samsung, restoring partition table helps)
And here list of all our partitions relatively number:
FOTAKernel -> /dev/block/mmcblk0p23
LTALabel -> /dev/block/mmcblk0p16
TA -> /dev/block/mmcblk0p1
aboot -> /dev/block/mmcblk0p6
alt_aboot -> /dev/block/mmcblk0p12
alt_rpm -> /dev/block/mmcblk0p15
alt_s1sbl2 -> /dev/block/mmcblk0p10
alt_sbl1 -> /dev/block/mmcblk0p8
alt_sbl2 -> /dev/block/mmcblk0p9
alt_sbl3 -> /dev/block/mmcblk0p11
alt_tz -> /dev/block/mmcblk0p13
boot -> /dev/block/mmcblk0p17
cache -> /dev/block/mmcblk0p26
fsg -> /dev/block/mmcblk0p21
modem -> /dev/block/mmcblk0p18
modemst1 -> /dev/block/mmcblk0p19
modemst2 -> /dev/block/mmcblk0p20
persist -> /dev/block/mmcblk0p24
ramdump -> /dev/block/mmcblk0p22
rpm -> /dev/block/mmcblk0p14
s1sbl2 -> /dev/block/mmcblk0p4
sbl1 -> /dev/block/mmcblk0p2
sbl2 -> /dev/block/mmcblk0p3
sbl3 -> /dev/block/mmcblk0p5
system -> /dev/block/mmcblk0p25
tz -> /dev/block/mmcblk0p7
userdata -> /dev/block/mmcblk0p27
Bonoboo said:
Sorry for messing numbers, I edited post.
Seems not. Reboot.
Try formatting.
Just note about adb output earlier.
ls shows temporary FS that recovery creates in RAM.
By fact blocks devices in /dev/block/ and we can do something with them, like recreate partitions using mke2fs
Or erase them by dd if=/dev/zero
Try commands:
cat /proc/partitions
mount
fdisk -l /dev/block/mmcblk0p17
fdisk -l /dev/block/mmcblk0p5
And try flashing via flashtool:
– untick wipe data and cache
– tick all in Exclude section except partition
Here useful commands (similar problem for Samsung, restoring partition table helps)
And here list of all our partitions relatively number:
Click to expand...
Click to collapse
ok, here the log from CWM - i don't know when each event occurred
Code:
persist.audio.low.latency.rec=false
persist.debug.wfd.enable=1
persist.radio.apm_sim_not_pwdn=1
persist.timed.enable=true
persist.fuse_sdcard=true
keyguard.no_require_sim=true
telephonu.lteOnCdmaDevice=0
DEVICE_PROVISIONED=1
I: Checking for extendedcommand
I:Skipping for extendedcommand, file not found...
I:Can't partition non mmcblk device: /devices/platform/msm_sdcc.3/mmc_host/mmc1
I:using /data/media for /sdcard/0/clockworkmod/.no_confirm.
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: invalid argument
W:failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata (File exists)
I:using /data/media for /sdcard/0/clockworkmod/.many_confirm.
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed: invalid argument
W:failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata (File exists)
I:Can't partition non mmcblk device: /devices/platform/msm_sdcc.3/mmc_host/mmc1
And here is the result of your command
Code:
C:\adt-bundle-windows-x86-20140321\adt-bundle-windows-x86-20140321\sdk\platform-
tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
YT910M7GB9 recovery
C:\adt-bundle-windows-x86-20140321\adt-bundle-windows-x86-20140321\sdk\platform-
tools>adb shell
~ # ←[6ncat /proc/partitions
cat /proc/partitions
major minor #blocks name
179 0 3866624 mmcblk0
179 1 2048 mmcblk0p1
179 2 128 mmcblk0p2
179 3 256 mmcblk0p3
179 4 256 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 512 mmcblk0p7
179 8 128 mmcblk0p8
179 9 256 mmcblk0p9
179 10 256 mmcblk0p10
179 11 512 mmcblk0p11
179 12 512 mmcblk0p12
179 13 512 mmcblk0p13
179 14 512 mmcblk0p14
179 15 512 mmcblk0p15
179 16 16384 mmcblk0p16
179 17 20480 mmcblk0p17
179 18 65536 mmcblk0p18
179 19 3072 mmcblk0p19
179 20 3072 mmcblk0p20
179 21 3072 mmcblk0p21
179 22 5120 mmcblk0p22
179 23 16384 mmcblk0p23
179 24 4096 mmcblk0p24
179 25 1228800 mmcblk0p25
179 26 256000 mmcblk0p26
179 27 2183151 mmcblk0p27
179 32 1955840 mmcblk1
179 33 1954816 mmcblk1p1
~ # ←[6nls -la /dev/block/mmcblk*
ls -la /dev/block/mmcblk*
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
brw------- 1 root root 179, 0 May 21 11:43 /dev/block/mmcblk0
brw------- 1 root root 179, 1 May 21 11:43 /dev/block/mmcblk0p1
brw------- 1 root root 179, 10 May 21 11:43 /dev/block/mmcblk0p10
brw------- 1 root root 179, 11 May 21 11:43 /dev/block/mmcblk0p11
brw------- 1 root root 179, 12 May 21 11:43 /dev/block/mmcblk0p12
brw------- 1 root root 179, 13 May 21 11:43 /dev/block/mmcblk0p13
brw------- 1 root root 179, 14 May 21 11:43 /dev/block/mmcblk0p14
brw------- 1 root root 179, 15 May 21 11:43 /dev/block/mmcblk0p15
brw------- 1 root root 179, 16 May 21 11:43 /dev/block/mmcblk0p16
brw------- 1 root root 179, 17 May 21 11:43 /dev/block/mmcblk0p17
brw------- 1 root root 179, 18 May 21 11:43 /dev/block/mmcblk0p18
brw------- 1 root root 179, 19 May 21 11:43 /dev/block/mmcblk0p19
brw------- 1 root root 179, 2 May 21 11:43 /dev/block/mmcblk0p2
brw------- 1 root root 179, 20 May 21 11:43 /dev/block/mmcblk0p20
brw------- 1 root root 179, 21 May 21 11:43 /dev/block/mmcblk0p21
brw------- 1 root root 179, 22 May 21 11:43 /dev/block/mmcblk0p22
brw------- 1 root root 179, 23 May 21 11:43 /dev/block/mmcblk0p23
brw------- 1 root root 179, 24 May 21 11:43 /dev/block/mmcblk0p24
brw------- 1 root root 179, 25 May 21 11:43 /dev/block/mmcblk0p25
brw------- 1 root root 179, 26 May 21 11:43 /dev/block/mmcblk0p26
brw------- 1 root root 179, 27 May 21 11:43 /dev/block/mmcblk0p27
brw------- 1 root root 179, 3 May 21 11:43 /dev/block/mmcblk0p3
brw------- 1 root root 179, 4 May 21 11:43 /dev/block/mmcblk0p4
brw------- 1 root root 179, 5 May 21 11:43 /dev/block/mmcblk0p5
brw------- 1 root root 179, 6 May 21 11:43 /dev/block/mmcblk0p6
brw------- 1 root root 179, 7 May 21 11:43 /dev/block/mmcblk0p7
brw------- 1 root root 179, 8 May 21 11:43 /dev/block/mmcblk0p8
brw------- 1 root root 179, 9 May 21 11:43 /dev/block/mmcblk0p9
brw------- 1 root root 179, 32 May 21 11:43 /dev/block/mmcblk1
brw------- 1 root root 179, 33 May 21 11:43 /dev/block/mmcblk1p1
~ # ←[6nmount
mount
rootfs on / type rootfs (rw,seclabel,relatime)
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/platform/msm_sdcc.1/by-name/cache on /cache type ext4 (rw,seclabel,re
latime,data=ordered)
~ # ←[6nfdisk -l /dev/block/mmcblk0p17
fdisk -l /dev/block/mmcblk0p17
Disk /dev/block/mmcblk0p17: 20 MB, 20971520 bytes
4 heads, 16 sectors/track, 640 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p17 doesn't contain a valid partition table
~ # ←[6nfdisk -l /dev/block/mmcblk0p5
fdisk -l /dev/block/mmcblk0p5
Disk /dev/block/mmcblk0p5: 0 MB, 524288 bytes
4 heads, 16 sectors/track, 16 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p5 doesn't contain a valid partition table
~ # ←[6n
C:\adt-bundle-windows-x86-20140321\adt-bundle-windows-x86-20140321\sdk\platform-
tools>
If both partitions are incorrect, should I try to flash?

[help] Gnex brick/softbrick/emmc problem

Hello guys, Im a experienced user with ROMs, recovery, boot and etc but i have a problem now, and i will try to explain shortly:
AT THE MOMENT:
- I get into fastboot mode
- I get into odin downloading mode
- I have a connection with pc(win8.1)
- The computer can communicate with the phone in fastboot mode and adb(recovery)
- the drivers are installed correctly
- BOOTLOOPIN ON GOOGLE
How this happened:
I was minding my own business and my phone was on my desk when it suddenly rebooted itself and then it bootlooped forever. I had some situations when it rebooted itself but always ended in a successful boot, this time it didnt wanted to start.
What have i done till now:
- First thing i entered recovery(TWRP) and dirtyflashed my current rom version and wiped dalvik/cache. (unsuccessful)
- after several times doing the dirtyflash i finally decided to make a complete hard/factory reset the result was none (after i rebooted to recovery again ALL THE DATA WAS THERE WITHOUT ANY DIFFERENCE, like nothing happened)
- Second thing i tried flashing with Odin3 in Download mode - result was unsuccessful (Operation failed at ~45% and the phone freezed) - I tried this several times with different versions of the software and firmware on 2 different computers (same result)
- Third thing i tried to push img with ADB - no result
- Fourth thing i tried the NexusToolKit and using the UNROOT/GOBACK TO STOCK/SOFTBRICK option - operation was SUCCESSFUL (that's what the cmd console said) BUT, after around 15 mins booting on GOOGLE it started booting my old custom ROM that i had (CarbonROM) with its custom boot animation and i was WTF?! - after several minutes it finally booted the rom. As i tried to unlocked it the touchscreen and processing was very slow and unresponsive, it took around 10-15sec. to unlock the phone and then opening the home menu, and in a short delay the phone restarted itself.
- I tried deleting system,data,userdata,cache and etc with the toolkit but same resault - when i rebooted the information was still there.
- I readed alot on the forums and i found that it maybe caused my my eMMC but long ago i checked with a google store app that my chip is from the safe ones and cant go brickbug.
Some information about the phone:
Product Name - tuna
Variant - maguro 16gb
HW version - 9
Bootloader Version - primemd04
baseband version - I9250XXLJ1
carrier info - none
serial number - 0149C7ED0D020018
signing - production
lock state- unlocked
if anything needed pls ask
valkata1212 said:
Hello guys, Im a experienced user with ROMs, recovery, boot and etc but i have a problem now, and i will try to explain shortly:
AT THE MOMENT:
- I get into fastboot mode
- I get into odin downloading mode
- I have a connection with pc(win8.1)
- The computer can communicate with the phone in fastboot mode and adb(recovery)
- the drivers are installed correctly
- BOOTLOOPIN ON GOOGLE
How this happened:
I was minding my own business and my phone was on my desk when it suddenly rebooted itself and then it bootlooped forever. I had some situations when it rebooted itself but always ended in a successful boot, this time it didnt wanted to start.
What have i done till now:
- First thing i entered recovery(TWRP) and dirtyflashed my current rom version and wiped dalvik/cache. (unsuccessful)
- after several times doing the dirtyflash i finally decided to make a complete hard/factory reset the result was none (after i rebooted to recovery again ALL THE DATA WAS THERE WITHOUT ANY DIFFERENCE, like nothing happened)
- Second thing i tried flashing with Odin3 in Download mode - result was unsuccessful (Operation failed at ~45% and the phone freezed) - I tried this several times with different versions of the software and firmware on 2 different computers (same result)
- Third thing i tried to push img with ADB - no result
- Fourth thing i tried the NexusToolKit and using the UNROOT/GOBACK TO STOCK/SOFTBRICK option - operation was SUCCESSFUL (that's what the cmd console said) BUT, after around 15 mins booting on GOOGLE it started booting my old custom ROM that i had (CarbonROM) with its custom boot animation and i was WTF?! - after several minutes it finally booted the rom. As i tried to unlocked it the touchscreen and processing was very slow and unresponsive, it took around 10-15sec. to unlock the phone and then opening the home menu, and in a short delay the phone restarted itself.
- I tried deleting system,data,userdata,cache and etc with the toolkit but same resault - when i rebooted the information was still there.
- I readed alot on the forums and i found that it maybe caused my my eMMC but long ago i checked with a google store app that my chip is from the safe ones and cant go brickbug.
Some information about the phone:
Product Name - tuna
Variant - maguro 16gb
HW version - 9
Bootloader Version - primemd04
baseband version - I9250XXLJ1
carrier info - none
serial number - 0149C7ED0D020018
signing - production
lock state- unlocked
if anything needed pls ask
Click to expand...
Click to collapse
first question is, what do you mean by download mode and odin? are you not using the google galaxy nexus? for all i know, that device has fastboot but not download mode, which is a proprietary fork of fastboot (i think). am i wrong? how do you boot into download mode?
your emmc might be locked in read-only mode. when the emmc firmware data structures get corrupted beyond the firmware capacity to fix them, the firmware downgrades to read-only mode, in which you can at least recover the stored information (or part of it).
grab a different custom recovery version than the one in your phone and "fastboot flash" it. then get into the recovery. do you get the newly flashed recovery or the old one that was already on your phone?
Lanchon said:
first question is, what do you mean by download mode and odin? are you not using the google galaxy nexus? for all i know, that device has fastboot but not download mode, which is a proprietary fork of fastboot (i think). am i wrong? how do you boot into download mode?
your emmc might be locked in read-only mode. when the emmc firmware data structures get corrupted beyond the firmware capacity to fix them, the firmware downgrades to read-only mode, in which you can at least recover the stored information (or part of it).
grab a different custom recovery version than the one in your phone and "fastboot flash" it. then get into the recovery. do you get the newly flashed recovery or the old one that was already on your phone?
Click to expand...
Click to collapse
Im using the Samsung galaxy nexus and under "download mode odin" i mean VOLUME DOWN + power button. Phone got both odin and fastboot. Fastboot works in bootloader mode ( volume up + volume down + power button).
I already tried with another custom recovery different from the one currently using, yes it flashes the new one - i tried with philz and cw recovery, both booted but again i couldnt wipe everything.
Lanchon said:
first question is, what do you mean by download mode and odin? are you not using the google galaxy nexus? for all i know, that device has fastboot but not download mode, which is a proprietary fork of fastboot (i think). am i wrong? how do you boot into download mode?
your emmc might be locked in read-only mode. when the emmc firmware data structures get corrupted beyond the firmware capacity to fix them, the firmware downgrades to read-only mode, in which you can at least recover the stored information (or part of it).
grab a different custom recovery version than the one in your phone and "fastboot flash" it. then get into the recovery. do you get the newly flashed recovery or the old one that was already on your phone?
Click to expand...
Click to collapse
the galaxy nexus certainly has download mode/Odin.
it is a Samsung device, they all have this.
just like even the HTC nexus device have hboot
to the op, I wish you much luck, I cannot comment much on this, I had similar happen once and I used "fastboot boot recovery.img" and luckily was able to fix my device from there, but I see this happen sometimes to others (few threads on here about it) where they weren't able to get her back up and running I hope that is not the case for you.
---------- Post added at 12:13 AM ---------- Previous post was at 12:08 AM ----------
oh, also, do you have multiple batteries? have you tried another battery? seems simple enough, but I've heard of devices acting awry similar to this when the battery has taken a crap. (sometime the battery will act as if it's charging and holding charge just fine, but it never actually gets itself to fully charged, for example I think fully charged battery should read about 4.12 with a voltmeter, but one that's gone faulty doesn't reach that, is as if it just cannot provide enough juice needed to get things done causing the device to fail while trying to use that battery)
ashclepdia said:
the galaxy nexus certainly has download mode/Odin.
it is a Samsung device, they all have this.
just like even the HTC nexus device have hboot
to the op, I wish you much luck, I cannot comment much on this, I had similar happen once and I used "fastboot boot recovery.img" and luckily was able to fix my device from there, but I see this happen sometimes to others (few threads on here about it) where they weren't able to get her back up and running I hope that is not the case for you.
---------- Post added at 12:13 AM ---------- Previous post was at 12:08 AM ----------
oh, also, do you have multiple batteries? have you tried another battery? seems simple enough, but I've heard of devices acting awry similar to this when the battery has taken a crap. (sometime the battery will act as if it's charging and holding charge just fine, but it never actually gets itself to fully charged, for example I think fully charged battery should read about 4.12 with a voltmeter, but one that's gone faulty doesn't reach that, is as if it just cannot provide enough juice needed to get things done causing the device to fail while trying to use that battery)
Click to expand...
Click to collapse
I have one and only stock battery. TWRP has a battery counter and it seems ok it stays always on 100% when plugged in the usb. I will try to check it with a voltmeter but i doubt that the problem is from the battery.
Waiting Lanchon to asnwer
valkata1212 said:
Im using the Samsung galaxy nexus and under "download mode odin" i mean VOLUME DOWN + power button. Phone got both odin and fastboot. Fastboot works in bootloader mode ( volume up + volume down + power button).
I already tried with another custom recovery different from the one currently using, yes it flashes the new one - i tried with philz and cw recovery, both booted but again i couldnt wipe everything.
Click to expand...
Click to collapse
ok! i had 2 galaxy nexus and never realized they had download mode lol, or at least i dont remember knowing!
so to confirm: you flash any recovery and it sticks and works. you flash it using "fastboot flash recovery x.img". you ARE NOT booting it directly with "fastboot boot x.img". confirm?
this means that your emmc is not fully locked down, and is good news.
Lanchon said:
ok! i had 2 galaxy nexus and never realized they had download mode lol, or at least i dont remember knowing!
so to confirm: you flash any recovery and it sticks and works. you flash it using "fastboot flash recovery x.img". you ARE NOT booting it directly with "fastboot boot x.img". confirm?
this means that your emmc is not fully locked down, and is good news.
Click to expand...
Click to collapse
BAD NEWS: NOPE, i do not confirm, i only did fastboot boot x.img!! Now i tried fastboot flash recovery x.img, restarted bootloader, and entered to recovery and - bang - old recovery is there. It's seems that my phone is a goner right??
valkata1212 said:
BAD NEWS: NOPE, i do not confirm, i only did fastboot boot x.img!! Now i tried fastboot flash recovery x.img, restarted bootloader, and entered to recovery and - bang - old recovery is there. It's seems that my phone is a goner right??
Click to expand...
Click to collapse
ok your emmc is locked in read-only mode. i had a gnex brought to me in that condition and there was absolutely nothing i could do to fix it. writes are ignored by the emmc (but return "ok" to the kernel) and take near zero time. i tried issuing emmc erase commands, etc, and they were all ignored. i tried booting via USB (via an OMAP debugger) and i couldn't accomplish anything. there is a thread here in xda that details what i tried and what i found out. in the end, i had to replace the motherboard of that phone.
but... i know more now
there is one thing you could try: completely reset the emmc. but really, given that you didnt follow a simple fastboot flash instruction and did a fastboot boot instead makes me think that you wont be able to correctly follow the procedure to completion, but we can try.
the trick is to resize the boot partitions, and during that operation the complete emmc will be wiped. this includes the corrupted FTL data structures inside the emmc that i suspect are causing the read-only lock.
so, caveats:
-this has never ever been tried on this device or this emmc. but it was done successfully in some kindles of the same era, which have a different but similar emmc (both are samsung emmcs). take a look here but DO NOT follow that procedure:
http://forum.xda-developers.com/showthread.php?t=2413453
-everything gets wiped! including bootloaders, partition table, partitions, etc.
-the kindle can boot from usb, but the gnex cant. if the gnex is shut down or rebooted after wiping the emmc but before reconstituting the boot chain, THE DEVICE WILL BE BRICKED FOREVER and never boot again.
-if something goes wrong, BRICK.
-the procedure we will improvise and try can be plain wrong, and the device might BRICK.
-the emmc might ignore the boot partition resize command, in which case it wont brick any further, but this whole adventure would be a failure.
-actually i lied. if the device is rebooted without a proper boot chain, there is a boot-over-USB OMAP debugger that can boot it into a monitor. but reconstituting the boot chain from there might be impossible.
read everything twice and make sure you understand everything i write. ASK instead of guessing!
FROM NOW ON: everything you do, you will do it in latest release of TWRP for your device. before doing ANYTHING here, each time you boot your phone you will enter fastboot mode and "fastboot boot" this TWRP image. then you will "adb shell" to it, or "adb push/pull" to/from it.
first i need a map of your emmc. adb shell then run this and paste the output:
ls -l /dev/block/mmc*
ls -l /dev/block/platform/[whatever device name]/by-name
fdisk -l /dev/block/mmcblk0
---------- Post added at 03:25 PM ---------- Previous post was at 03:19 PM ----------
please post outputs in [ CODE ] tags so that its more readable.
Lanchon said:
ok your emmc is locked in read-only mode. i had a gnex brought to me in that condition and there was absolutely nothing i could do to fix it. writes are ignored by the emmc (but return "ok" to the kernel) and take near zero time. i tried issuing emmc erase commands, etc, and they were all ignored. i tried booting via USB (via an OMAP debugger) and i couldn't accomplish anything. there is a thread here in xda that details what i tried and what i found out. in the end, i had to replace the motherboard of that phone.
but... i know more now
there is one thing you could try: completely reset the emmc. but really, given that you didnt follow a simple fastboot flash instruction and did a fastboot boot instead makes me think that you wont be able to correctly follow the procedure to completion, but we can try.
the trick is to resize the boot partitions, and during that operation the complete emmc will be wiped. this includes the corrupted FTL data structures inside the emmc that i suspect are causing the read-only lock.
so, caveats:
-this has never ever been tried on this device or this emmc. but it was done successfully in some kindles of the same era, which have a different but similar emmc (both are samsung emmcs). take a look here but DO NOT follow that procedure:
http://forum.xda-developers.com/showthread.php?t=2413453
-everything gets wiped! including bootloaders, partition table, partitions, etc.
-the kindle can boot from usb, but the gnex cant. if the gnex is shut down or rebooted after wiping the emmc but before reconstituting the boot chain, THE DEVICE WILL BE BRICKED FOREVER and never boot again.
-if something goes wrong, BRICK.
-the procedure we will improvise and try can be plain wrong, and the device might BRICK.
-the emmc might ignore the boot partition resize command, in which case it wont brick any further, but this whole adventure would be a failure.
-actually i lied. if the device is rebooted without a proper boot chain, there is a boot-over-USB OMAP debugger that can boot it into a monitor. but reconstituting the boot chain from there might be impossible.
read everything twice and make sure you understand everything i write. ASK instead of guessing!
FROM NOW ON: everything you do, you will do it in latest release of TWRP for your device. before doing ANYTHING here, each time you boot your phone you will enter fastboot mode and "fastboot boot" this TWRP image. then you will "adb shell" to it, or "adb push/pull" to/from it.
first i need a map of your emmc. adb shell then run this and paste the output:
ls -l /dev/block/mmc*
ls -l /dev/block/platform/[whatever device name]/by-name
fdisk -l /dev/block/mmcblk0
---------- Post added at 03:25 PM ---------- Previous post was at 03:19 PM ----------
please post outputs in [ CODE ] tags so that its more readable.
Click to expand...
Click to collapse
Im doing the adb shell commands now but I have 1 question: How to find my DEVICE NAME?? im not sure what to type from all the data i get, i will wait until you respond to proceed.
EDIT: This is what i get for now:
Code:
~ # ←[6nls -l /dev/block/mmc*
ls -l /dev/block/mmc*
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
brw------- root root 179, 0 2015-02-05 15:26 mmcblk0
brw------- root root 179, 8 2015-02-05 15:26 mmcblk0boot0
brw------- root root 179, 16 2015-02-05 15:26 mmcblk0boot1
brw------- root root 179, 1 2015-02-05 15:26 mmcblk0p1
brw------- root root 259, 2 2015-02-05 15:26 mmcblk0p10
brw------- root root 259, 3 2015-02-05 15:26 mmcblk0p11
brw------- root root 259, 4 2015-02-05 15:26 mmcblk0p12
brw------- root root 259, 5 2015-02-05 15:26 mmcblk0p13
brw------- root root 179, 2 2015-02-05 15:26 mmcblk0p2
brw------- root root 179, 3 2015-02-05 15:26 mmcblk0p3
brw-rw---- radio radio 179, 4 2015-02-05 15:26 mmcblk0p4
brw------- root root 179, 5 2015-02-05 15:26 mmcblk0p5
brw------- root root 179, 6 2015-02-05 15:26 mmcblk0p6
brw------- root root 179, 7 2015-02-05 15:26 mmcblk0p7
brw------- root root 259, 0 2015-02-05 15:26 mmcblk0p8
brw-rw---- radio radio 259, 1 2015-02-05 15:26 mmcblk0p9
~ # ←[6n
Code:
~ # ←[6nls -l /dev/block/platform/
ls -l /dev/block/platform/
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x root root 2015-02-05 15:26 omap
~ # ←[6n
Code:
~ # ←[6nls -l /dev/block/platform/omap
ls -l /dev/block/platform/omap
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x root root 2015-02-05 15:26 omap2_mcspi.3
drwxr-xr-x root root 2015-02-05 15:26 omap_hsmmc.0
~ # ←[6n
Code:
~ # ←[6nfdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 1923584 15388671+ ee EFI GPT
Partition 1 does not end on cylinder boundary
~ # ←[6n
Tell me if you need something
valkata1212 said:
How to find my DEVICE NAME??
Click to expand...
Click to collapse
you should try all options!
but i think it is probably omap/omap_hsmmc.0
are you sure you are "fastboot boot" booting into the latest TWRP recovery before doing adb shell??? your fdisk command doesn't support GPT disks, that is very strange.
also do:
cat /proc/partitions
cat /proc/mounts
also from the pc (are you using linux or windows?):
create a PC folder and cd into it, then:
adb pull -p /dev/block/mmcblk0boot0
adb pull -p /dev/block/mmcblk0boot1
tell me the exact size of the two downloaded files. KEEP THESE FILES SAFE!
Lanchon said:
you should try all options!
but i think it is probably omap/omap_hsmmc.0
are you sure you are "fastboot boot" booting into the latest TWRP recovery before doing adb shell??? your fdisk command doesn't support GPT disks, that is very strange.
also do:
cat /proc/partitions
cat /proc/mounts
also from the pc (are you using linux or windows?):
create a PC folder and cd into it, then:
adb pull -p /dev/block/mmcblk0boot0
adb pull -p /dev/block/mmcblk0boot1
tell me the exact size of the two downloaded files. KEEP THESE FILES SAFE!
Click to expand...
Click to collapse
I can 100% confirm Im on the newest TWRP recovery version v2.8.4.0 flashed with fastboot boot x.img
And here are the results i got, and also those new commands:
Code:
~ # ←[6nls -l /dev/block/platform/omap/omap_hsmmc.0/by-name
ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
lrwxrwxrwx root root 2015-02-05 18:06 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2015-02-05 18:06 cache -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2015-02-05 18:06 dgs -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2015-02-05 18:06 efs -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2015-02-05 18:06 metadata -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2015-02-05 18:06 misc -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2015-02-05 18:06 param -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2015-02-05 18:06 radio -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2015-02-05 18:06 recovery -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2015-02-05 18:06 sbl -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2015-02-05 18:06 system -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2015-02-05 18:06 userdata -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2015-02-05 18:06 xloader -> /dev/block/mmcblk0p1
~ # ←[6n
Code:
~ # ←[6ncat /proc/partitions
cat /proc/partitions
major minor #blocks name
31 0 1024 mtdblock0
179 0 15388672 mmcblk0
179 1 128 mmcblk0p1
179 2 3584 mmcblk0p2
179 3 20480 mmcblk0p3
179 4 8192 mmcblk0p4
179 5 4096 mmcblk0p5
179 6 4096 mmcblk0p6
179 7 8192 mmcblk0p7
259 0 12224 mmcblk0p8
259 1 16384 mmcblk0p9
259 2 669696 mmcblk0p10
259 3 442368 mmcblk0p11
259 4 14198767 mmcblk0p12
259 5 64 mmcblk0p13
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
~ # ←[6n
Code:
~ # ←[6ncat /proc/mounts
cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,seclabel,relatime 0 0
/dev/block/mmcblk0p11 /cache ext4 rw,seclabel,relatime,user_xattr,barrier=1,data
=ordered 0 0
/dev/block/mmcblk0p12 /data ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=
ordered 0 0
/dev/block/mmcblk0p12 /sdcard ext4 rw,seclabel,relatime,user_xattr,barrier=1,dat
a=ordered 0 0
~ # ←[6n
AND THIS IS WHAT I GET WHEN I TRIED TO PULL THE FILES U ASKED: (both mmcblk0boot0/1)
Code:
E:\WugFresh Development\Nexus Root Toolkit\data\MMC>adb pull -p /dev/block/mmcbl
k0boot0
remote object '/dev/block/mmcblk0boot0' not a file or directory
lol please repeat:
ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name
using a wider terminal so that the output can be read
your partitions are:
Code:
major minor #blocks name
31 0 1024 mtdblock0
179 0 15388672 mmcblk0
179 1 128 mmcblk0p1 xloader
179 2 3584 mmcblk0p2 sbl
179 3 20480 mmcblk0p3 efs
179 4 8192 mmcblk0p4 param
179 5 4096 mmcblk0p5 misc
179 6 4096 mmcblk0p6 dgs
179 7 8192 mmcblk0p7 boot
259 0 12224 mmcblk0p8 recovery
259 1 16384 mmcblk0p9 radio
259 2 669696 mmcblk0p10 system
259 3 442368 mmcblk0p11 cache
259 4 14198767 mmcblk0p12 userdata
259 5 64 mmcblk0p13 metadata
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
---------- Post added at 03:34 PM ---------- Previous post was at 03:28 PM ----------
cat /proc/mtd
cat /proc/emmc
dd if=/dev/block/mmcblk0boot0 of=/tmp/mmcblk0boot0
dd if=/dev/block/mmcblk0boot1 of=/tmp/mmcblk0boot1
from the PC:
adb pull /tmp/mmcblk0boot0
adb pull /tmp/mmcblk0boot1
---------- Post added at 03:36 PM ---------- Previous post was at 03:34 PM ----------
get the latest philz touch recovery for gnex. fastboot boot into it, then try this again:
fdisk -l /dev/block/mmcblk0
Lanchon said:
lol please repeat:
ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name
using a wider terminal so that the output can be read
your partitions are:
Code:
major minor #blocks name
31 0 1024 mtdblock0
179 0 15388672 mmcblk0
179 1 128 mmcblk0p1 xloader
179 2 3584 mmcblk0p2 sbl
179 3 20480 mmcblk0p3 efs
179 4 8192 mmcblk0p4 param
179 5 4096 mmcblk0p5 misc
179 6 4096 mmcblk0p6 dgs
179 7 8192 mmcblk0p7 boot
259 0 12224 mmcblk0p8 recovery
259 1 16384 mmcblk0p9 radio
259 2 669696 mmcblk0p10 system
259 3 442368 mmcblk0p11 cache
259 4 14198767 mmcblk0p12 userdata
259 5 64 mmcblk0p13 metadata
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
---------- Post added at 03:34 PM ---------- Previous post was at 03:28 PM ----------
cat /proc/mtd
cat /proc/emmc
dd if=/dev/block/mmcblk0boot0 of=/tmp/mmcblk0boot0
dd if=/dev/block/mmcblk0boot1 of=/tmp/mmcblk0boot1
from the PC:
adb pull /tmp/mmcblk0boot0
adb pull /tmp/mmcblk0boot1
---------- Post added at 03:36 PM ---------- Previous post was at 03:34 PM ----------
get the latest philz touch recovery for gnex. fastboot boot into it, then try this again:
fdisk -l /dev/block/mmcblk0
Click to expand...
Click to collapse
Code:
~ # ←[6ncat /proc/mtd
cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00001000 "w25q80"
~ # ←[6n
hmm :?
Code:
~ # ←[6ncat /proc/emmc
cat /proc/emmc
cat: can't open '/proc/emmc': No such file or directory
~ # ←[6n
I downloaded and fastboot booted latest phillz and i did the command again, but the resault is the same:
Code:
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 1923584 15388671+ ee EFI GPT
Partition 1 does not end on cylinder boundary
~ #
So i pulled both mmcblk files, they are 2,048 KB each.
this is going to be redundant, buy do it just in case:
adb pull -p /dev/block/mmcblk0p##
where ## is 1 to 9 and 13 (skip 10, 11, 12)
Lanchon said:
this is going to be redundant, buy do it just in case:
adb pull -p /dev/block/mmcblk0p##
where ## is 1 to 9 and 13 (skip 10, 11, 12)
Click to expand...
Click to collapse
Done. had to do the trick with dd if=/dev/block/mmcblk0p of=/tmp/mmcblk0p first then adb pull /tmp/mmcblk0p, but i got the files now, their size range are from 64 KB to 20,480 KB (largest one)
Whats next:?
EDIT: first reboot into clean latest TWRP
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-beg bs=1M count=96
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
from the PC:
adb pull -p /tmp/mmcblk0-beg
adb pull -p /tmp/mmcblk0-end
beg should be 96MB
end should be 28MB
verify, that on the PC.
DO NOT REBOOT THE PHONE FROM THIS POINT FORWARD!
we want those files in the ramdrive
Lanchon said:
EDIT: first reboot into clean latest TWRP
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-beg bs=1M count=96
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
from the PC:
adb pull -p /tmp/mmcblk0-beg
adb pull -p /tmp/mmcblk0-end
beg should be 96MB
end should be 28MB
verify, that on the PC.
DO NOT REBOOT THE PHONE FROM THIS POINT FORWARD!
we want those files in the ramdrive
Click to expand...
Click to collapse
downloaded beg and i confirm its 98 MB but i have a problem with END, it doesnt want to copy it im tmp, i deleted the "skip=15000 part" and it came out 250 MB!! but couldnt pull it cuz it game me "no space left on device"
What should i do? Reboot and do this again or ?
valkata1212 said:
downloaded beg and i confirm its 98 MB but i have a problem with END, it doesnt want to copy it im tmp, i deleted the "skip=15000 part" and it came out 250 MB!! but couldnt pull it cuz it game me "no space left on device"
What should i do? Reboot and do this again or ?
Click to expand...
Click to collapse
reboot
redo first dd
no need to pull again
redo second dd, and tell me the error message or whatever it outputs. form now on, i recommend you dont try to fix things without posting first, one error can mean BRICK.
Lanchon said:
reboot
redo first dd
no need to pull again
redo second dd, and tell me the error message or whatever it outputs. form now on, i recommend you dont try to fix things without posting first, one error can mean BRICK.
Click to expand...
Click to collapse
Code:
E:\WugFresh Development\Nexus Root Toolkit\data\MMC>adb shell
~ # ←[6ndd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
It doesnt start the operation dont know why, just like the first time i did. Beg finished for 2-3 sec but -end just doesnt show up.
valkata1212 said:
Code:
E:\WugFresh Development\Nexus Root Toolkit\data\MMC>adb shell
~ # ←[6ndd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
It doesnt start the operation dont know why, just like the first time i did. Beg finished for 2-3 sec but -end just doesnt show up.
Click to expand...
Click to collapse
you are saying:
-no error displayed
-no file created
?
does the phone stop responding?

Trying to flash a dd image I took from the system partition

Long-time UNIX guy here, but relatively new to the world of Android.
I have recently purchased an Asus MemoPAD (ME103K) ; I then became root, and took a `dd` image of the read-only `system` partition to the external SD card:
Code:
$ su
# dd if=/dev/block/platform/msm_sdcc.1/by-name/system \
of=/storage/MicroSD/system.img bs=1M
# ls -l /storage/MicroSD/system.img
-rw-r--r-- 1 root root 2147483648 Sep 27 13:15 system.img
The size (exactly 2GiB) was a bit suspicious - could it be that this was because of the FAT32 partition on the SD card?
No, it was not - `tune2fs -l` revealed that this was indeed, a valid EXT4 image, exactly sized at 2GiB, which passed `fsck -f` with no errors at all.
And `fastboot` (from the linux machine attached to the tablet) concurred, after an `adb reboot bootloader`:
Code:
linuxbox# fastboot getvar all
(bootloader) version-bootloader: 3.03
(bootloader) version-hardware: rev_c
(bootloader) variant: LEOPARDCAT 16G
(bootloader) version-baseband: H00_0.16.F_0521
(bootloader) serialno: 0a3dXXXX
...
(bootloader) partition-type:system: ext4
(bootloader) partition-size:system: 0x0000000080000000
That size, is indeed 2GB:
Code:
linuxbox# python2 -c 'print 0x0000000080000000'
2147483648
So, all is good - I have a backup of the image. Now to test restoring it.
I try to flash the system.img back to the tablet - to make sure I can recover from anything, the sort of bullet-proof backup we do in the Unix world (*e.g. restore contents of a drive via `dd if=backup.image of=/dev/sdXXX`*).
Everything related to `adb` and `fastboot` work flawlessly - so I try...
Code:
linux_box# fastboot devices
0a3dXXXX fastboot
linux_box# mount /dev/sdcard /mnt/sdcard
linux_box# cp /mnt/sdcard/system.img .
linux_box# fastboot flash system system.img
error: cannot load 'system.img'
Hmm. I download and build the `android-tools-5.1.1` of my distribution from sources, adding debug information - and step in the debugger, to see this failure:
Code:
# gdb --args fastboot flash system system.img
...
(sorry, can't paste links yet - see this image: http i stack imgur com 9bIEM.png
Interesting - even though I am in a 64bit machine, apparently there are issues that turn the file size "negative" (in a 32bit world, the file size of my image, 2^31, is indeed considered negative - to be exact, `-2147483648`.
OK, fine - how do they flash large image files in Android?
Googling, searching - turns out they use this `make_ext4fs` tool, that creates flashable images. In fact it is part of what I just compiled, so I might as well use it:
Code:
# mkdir /system
# mount -o loop,ro system.img /system
# ls -l /system
total 208
drwxr-xr-x 106 root root 8192 Sep 17 22:24 app
drwxr-xr-x 3 root 2000 8192 Sep 26 21:08 bin
-rw-r--r-- 1 root root 6847 Sep 12 16:59 build.prop
drwxr-xr-x 19 root root 4096 Sep 26 21:08 etc
drwxr-xr-x 2 root root 4096 Aug 11 22:27 fonts
drwxr-xr-x 4 root root 4096 Sep 12 16:56 framework
drwxr-xr-x 10 root root 16384 Sep 12 16:59 lib
drwxr-xr-x 2 root root 4096 Jan 1 1970 lost+found
drwxr-xr-x 3 root root 4096 Aug 11 22:18 media
drwxr-xr-x 59 root root 4096 Aug 11 22:29 priv-app
-rw-r--r-- 1 root root 126951 Aug 1 2008 recovery-from-boot.p
drwxr-xr-x 3 root root 4096 Aug 11 21:02 scripts
drwxr-xr-x 3 root root 4096 Aug 11 21:02 tts
drwxr-xr-x 11 root root 4096 Sep 26 21:08 usr
drwxr-xr-x 8 root 2000 4096 Aug 11 22:29 vendor
drwxr-xr-x 2 root 2000 4096 Sep 26 21:09 xbin
# ../extras/source/extras/ext4_utils/make_ext4fs \
-l 2048M new_system.img /system
Creating filesystem with parameters:
Size: 2147483648
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 8192
Label:
Blocks: 524288
Block groups: 16
Reserved block group size: 127
Created filesystem with 2666/131072 inodes and 375014/524288 blocks
Cool - so I can apparently build system images from plain old folders. The sky will be my limit - I'll be able to add anything I want to this image.
Let's burn it...
Code:
# fastboot flash system new_system.img
erasing 'system'...
OKAY [ 0.064s]
sending 'system' (2088960 KB)...
^C
I waited for 1h before hitting that Ctrl-C. And had to power-cycle the tablet, which booted back in fastboot mode.
This is not looking good.
What if I build a smaller image? Maybe the 2GB are somehow an issue, and this partition is not used to full capacity - it has free space:
Code:
# ../extras/source/extras/ext4_utils/make_ext4fs \
-l 1536M new_system.img /system
# ./fastboot flash system system.img
erasing 'system'...
OKAY [ 0.065s]
sending 'system' (1572864 KB)...
OKAY [ 51.039s]
writing 'system'...
OKAY [235.080s]
finished. total time: 286.183s
OK, this looks very promising (and only took 5 min). I guess I can now reboot back and everything should be normal, yes?
No
(sorry, can't paste links yet - see this image: http i stack imgur com U7wiX.png
I don't mind a temporarily bricked device, as long as I **do** get to control it in the end (machines that I am not a master of, are machines I don't care to operate
Any ideas on what I did wrong and what I can do to fix this?
Thanks in advance.
P.S. I checked the Asus support page for my tablet - they only provide the sources for the kernel, and the Over-the-air .zip file. That in turn contains a file-system level backup from the root - i.e. the `system` folder exists in there as just a folder, not an image, not a `system.img` that I can flash - so that doesn't really help me.
[SOLVED] Booted from external sd.
I documented how I solved it in android stack exchange, article 124344 (can't post links - the url is formed from .... http android.stackexchange.com questions 124344 trying-to-flash-a-system-img-i-took-with-dd-failing )
Executive summary - I edited my custom boot image /fstab.qcom to point /system to the external SD card, and dd-ed my image there.

Categories

Resources