Related
USE AT YOUR OWN RISK! YOU MAY BRICK YOUR DEVICE!
This is just a proof of concept. It will allow you to start any custom recovery. Sadly no completely working custom recovery is available. You can either try seraph's or vache's.
NOTE: Do not flash your kernel from recovery without calling itsmagic! Otherwise you will not be able to boot your device anymore.
How it works:
Checksums for all partitions are stored on mmcblk0p7. During boot, the actual checksums for boot.img and recovery.img are calculated and compared to the values stored in p7.
If a special pattern is applied to p7, the bootloader is triggered to recalculate the checksums and store them to p7. This pattern is also written when using normal recovery after installation of update.zip was succesful.
itsmagic does the same. It just applies the pattern, bootloader does the rest.
Backup:
Automatic method:
1. Download backup_tool
2. Extract somewhere on your PC.
3. Connect Iconia to your PC and ensure that USB debugging is enabled on your Iconia.
4. Execute 01_backup.bat and follow the instructions. The tool will take some time (~10 min), so be patient.
5. As soon as the batch file finished, check the backup folder for the following files:
Code:
p1, p2, p3, p5, p6, p7, mmcblk0_start, md5sums, uid.txt
6. Check if uid.txt contains a number like:
Code:
0x123456789abcdef0
If UID is empty then obtain your USB serial number as described at the end of this post.
Manual method:
1. Get your UID (= USB Serial number, has up to 16 chars) (see at the end of this post how to get). If you brick your device and do not know the UID, you are lost.
2. Backup all partitions (except cache + data) with dd:
Code:
dd if=/dev/block/mmcblk0p1 of=/mnt/external_sd/dumps/p1
dd if=/dev/block/mmcblk0p2 of=/mnt/external_sd/dumps/p2
dd if=/dev/block/mmcblk0p3 of=/mnt/external_sd/dumps/p3
dd if=/dev/block/mmcblk0p5 of=/mnt/external_sd/dumps/p5
dd if=/dev/block/mmcblk0p6 of=/mnt/external_sd/dumps/p6
dd if=/dev/block/mmcblk0p7 of=/mnt/external_sd/dumps/p7
3. Backup the first 0x680000 bytes of mmcblk0:
Code:
dd if=/dev/block/mmcblk0 bs=512 count=13312 of=/mnt/external_sd/dumps/mmcblk0_start
4. Store them somewhere outside of your device.
Install itsmagic:
1. Copy itsmagic somewhere to /data or /cache, and set chmod 755 to it.
Flash a custom recovery:
1. dd the new recovery to mmcblk0p1:
e.g.
Code:
dd if=/mnt/external_sd/cwm.bin of=/dev/block/mmcblk0p1
2. Call itsmagic
3. Reboot. Bootloader will do the rest
4. Boot into recovery and see if it works
5. Every time you change mmcblk0p1 or mmcblk0p2, itsmagic must be called again.
Restore stock recovery:
Same as flashing a custom recovery but flash "p1" of you backup to mmcblk0p1 and call itsmagic.
Note:
Some devices seem to have a /system/etc/install-recovery.sh script. This will reflash the stock recovery every time you boot into normal kernel.
How to get the USB serial number:
1. Connect Iconia to your PC
2. Simple method (Window/Linux/Max), thx @daveid
Call:
Code:
adb devices
It will output something like this:
Code:
List of devices attached
370014740c00594 device
The number is the UID. Save it somewhere. You will need it if you ever brick your device.
Alternative methods (complicated):
2.b Linux
- call lsusb -v
- read the value of iSerial for Iconia
2.c Windows
- Open Device manager
- Goto Properties of Android USB Devices->Acer Composite ADB Interface
- Goto "Details" Tab
- Select "Parent" from the property selection.
- Read the value. It looks like this:
USB\VID_0502&PID_3325\370014740c00594
- The number after the last "/" is the UID.
2.d Windows (alternative method)
Download this tool (download link is nearly at the end of the page):
http://www.nirsoft.net/utils/usb_devices_view.html
- Open the tool
- Sort after VendorID
- Check all devices with VendorID = 0502 and ProductID = 3325 . There is also a "Serial Number" column.
Thanks
Thanks @vache + @rayman for their help.
Thanks to all testers of this tool.
What next
We need a working custom recovery. Sadly I'm quite busy the next few days so I don't have enough time to work on it. But there are enough experienced devs around.
Video
Here's the "faked" video again
http://www.youtube.com/watch?v=6IOayJUvvQI
... somehow the tools got lost
Edit: Added source
i think this is still not ready for user ..
but cant believe in last 3 days development of iconia can reach this far...
great guys...
sure next month we will have custom rom 3.1 for iconia
Finally!!
I am closing in with the 3.1 port of prime 1.4 .. so i needed this release..
so now we can figure out how to flash a working recovery next..
sc2k said:
Flash a custom recovery:
1. dd the new recovery to mmcblk0p1:
e.g.
Code:
dd if=/mnt/external_sd/cwm.bin of=/dev/block/mmcblk0p1
2. Call itsmagic
3. Reboot. Bootloader will do the rest
4. Boot into recovery and see if it works
5. Every time you change mmcblk0p1 or mmcblk0p2, itsmagic must be called again.
Click to expand...
Click to collapse
Does the cwm.bin file you mention actually exist?
eBug said:
Does the cwm.bin file you mention actually exist?
Click to expand...
Click to collapse
No Someone as to develop it.
There are some alpha Recoveries:
vache's recovery:
http://forum.xda-developers.com/showpost.php?p=14655235&postcount=395
seraphimserapis' recovery:
http://forum.xda-developers.com/showpost.php?p=14624515&postcount=326
But note:
YOU MUST CALL itsmagic from within update.zip! Otherwise your device will not boot anymore.
BTW: itsmagic needs libc.so to work
Spectacular, I now understand how this works. Thank you for supplying this to the community.
EDIT: When people begin putting custom roms together, might it be wise to edit the shutdown script to call itsmagic on every shutdown, just to be safe? Or does it introduce a performance penalty on next boot?
Is the backup_tool working?
And you all got your UID?
Has anyone contacted the rom manager guys? This seems like something they might be interested in...
Thanks sc2k! It is amazing!
Basically, I understand the logic, and I have 2 questions:
1) What is the use of UID in the whole process? What I see is getting it and backing it up, but why you say if we brick our device and don't know the UID, we are lost?
2)
sc2k said:
But note:
YOU MUST CALL itsmagic from within update.zip! Otherwise your device will not boot anymore.
Click to expand...
Click to collapse
What update.zip you are describing? You mean custom ROM/kernel? If flashing custom ROM without touching recovery, that means we do not need to call itsmagic again? Thanks.
sc2k said:
Is the backup_tool working?
And you all got your UID?
Click to expand...
Click to collapse
possible to use this on mac?
and is there any risk of brick by trting backup toll ?
ardatdat said:
Thanks sc2k! It is amazing!
Basically, I understand the logic, and I have 2 questions:
1) What is the use of UID in the whole process? What I see is getting it and backing it up, but why you say if we brick our device and don't know the UID, we are lost?
2)
What update.zip you are describing? You mean custom ROM/kernel? If flashing custom ROM without touching recovery, that means we do not need to call itsmagic again? Thanks.
Click to expand...
Click to collapse
1. UID hast some special meaning during unbricking process. I will provide details some days later. But if you do not have the UID, you will not be able to unbrick your device.
2. Yes, i mean any custom kernel. As boot.img is also verified against the checksum, a new kernel requires a new checksum. To recalculate a new checksum, itsmagic has to be used.
sc2k said:
1. UID hast some special meaning during unbricking process. I will provide details some days later. But if you do not have the UID, you will not be able to unbrick your device.
2. Yes, i mean any custom kernel. As boot.img is also verified against the checksum, a new kernel requires a new checksum. To recalculate a new checksum, itsmagic has to be used.
Click to expand...
Click to collapse
Wow! Thanks.
1. Now, I know that it is important. And I will remember it!
2. In theory, after flashing the custom kernel, in the updater-script, I should run the itsmagic. If I forget to embed it in the script, I can make another update.zip that 'only' runs itsmagic and flash it in the recovery. Right? (of coz, I cannot reboot in between...)
Arr.... btw, has acer released the kernel source? in some form of zip or github? I think under the GPL license, acer should have released it if 'someone' is asking for it.
interqd said:
possible to use this on mac?
and is there any risk of brick by trting backup toll ?
Click to expand...
Click to collapse
You will know the answer if you know what the backup script is doing
ardatdat said:
You will know the answer if you know what the backup script is doing
Click to expand...
Click to collapse
i dont understand script actually.. just a user here
but back up meant for backing up for future brickage right? so, it should not have brick possiblity..
I will put an APP together tomorrow, which should be able to install the recovery + run itsmagic all by a single press in the APP .
Let me see if i can have it ready for today or tomorrow..
but im sure it will make it all alot easier for all regular users.
In the nicest possible way, if you don't understand the script then at this point I wouldn't run it!
Give things a few more days to settle down.
EDIT: And Dexter beats me to it
themono said:
In the nicest possible way, if you don't understand the script then at this point I wouldn't run it!
Give things a few more days to settle down.
EDIT: And Dexter beats me to it
Click to expand...
Click to collapse
^ This. A thousand times this! If you don't know what the script is doing, you have zero business using it. Don't risk your device, wait until these smart guys have a chance to make it simpler to use, and hopefully safer for everybody!
Oh, and don't forget to, at the very least, pile thanks on these guys.
Thanks all the efforts up to now. I will try out the magic when I back home.
One question to ask: What is the worst situation? What I mean is that, if I forget to run itsmagic after flashing kernel, will I brick the device forever? And that I can no longer boot to recovery again?
Or, can I still go into recovery and restore from backup?
Thanks.
wow you guys are great!!! im just a regular user so i guess i just wait until all the smart guys make it simpler and safer. thanks for the great job.
anyway where did you guys learn all this thing??
This tutorial is made to help those getting an Iconia for the first time as well as those who lost/didn't backup before going to custom ROMs.
We will try to help you using more than one variant #1, #2 etc to backup and restore your tablet. If you're new stick to the #1s in the first post. If you know a little Android and a little Linux, head to the second post.
Acer does not provide any full-restore ROMs at the moment so your best option is to create your own backup in case something goes wrong.
The ultimate goal is to help users restore their OTA (over the air) update function, aka. get the OS as fresh and clean as it was the day it came out of the factory.
Help us help you! The parts of the tutorial that aren't ready or require your attention are marked in RED. If you got:
A new tablet, never flashed with a custom rom, share your original backup with US, you will need it anyway once you decide to experiment!
A new tablet, never updated, share your Firmware and "Operated Countries" (on the back of the box) so we know what stock ROM belongs to which countries or continent.
Knowledge and the will to share it!
Before you start!
Don't be afraid of rooting, it will not break your OTA (un-rooting is a piece of cake) updates and it is essential to do a proper backup!
Back up your user files from music to documents and save games or you might lose them!
When everything fails > Privacy > data reset is a good way to start fresh. Best to use it when trying something new.
Always unfreeze/restore system APKs like telephony etc before formatting/soft resetting (not to be confused with turning on and off again) your tablet.
Any .zip on the micro-sd card will be automatically flashed on POWER & VOL-
Save Acer Recovery Installer, Root, your favorite file explorer on your desktop
Droid Explorer (PC app) can be a great tool to install apps from your PC
Before attempting to OTA update: un-root, make sure all system apps are in place, remove micro-sd, factory reset (some have reported success after these)
Unbricking
Get the right firmware (Full Package, thanks Vache), for your tablet, decrypt it and extract the update.zip
Put it on your micro-sd card. Shut down. Boot with power and VOL - pressed and it will automatically get flashed.
What firmware is right for my country?
Full Package Acer_A500_0.000.00_1.016.01_COM_GEN1
CWM Backup Acer_A500_0.000.00_1.016.05_COM_GEN1 - Provided by flyinghighaero
Update zip Acer_A500_0.000.00_1.105.01_EMEA_GEN3 - Provided by bpivk
EU: AT, BE, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LY, MT, NL, PL, PT, SK, SI, ES, SE, GB, IS, LI, NO, CH, BG, RO, TR.
Full Package Acer_A500_0.000.00_1.104.02_COM_GEN1:
USA
Full Package Acer_A500_0.000.00_1.104.05_COM_GEN1
Canada
Acer_A500_0.000.00_1.112.01_EMEA_CUS7 - Not available
Germany
Acer_A500_0.000.00_1.016.04_COM_GEN1 - Not available
Thailand - Probably Asia, needs confirmation
Full Package Acer_A500_0.000.00_1.104.03_COM_GEN1
Taiwan - Probably Asia, needs confirmation
Acer_A500_1.105.01_EMEA_GEN3 - Not available
reports of Netherlands and Mexico - hard to tell what EMEA means to Acer
Acer_A501_1.309.02_COM_GEN1 - Warning, this is an European ROM for A501 !!! - thanks captainpaella
Did your tablet come with one of the following firmwares or maybe another one? (Settings > About tablet), tell us what countries/continent it is for by checking the back of the box for the "Operated Countries" label and posting it below:
Acer_A500_0.000.00_1.013.01_EMEA_GEN1
Acer_A500_0.000.00_1.104.04_COM_GEN1
Acer_A500_0.000.00_1.016.02_COM_GEN1
Creating a backup with Acer Recovery Installer #1
Root
Acer Recovery Installer
Install clockwork mod:
select "ClockworkMod Recovery rev1.3.4 by thor2002ro"
click "Install Recovery Image"
click "Yes" when asked to backup the current image!!!
Reboot into CW recovery from the app or with VOL- & POWER
Create a full backup: "backup and restore" -> "Full Backup"
If your backup is a fresh stock-only (no previous custom roms flashed) one, please share it. It's located on your micro SD in clockworkmod/backup/[current date] <= This is the CWM folder we need!
Don't forget to restore the original recovery image to be able to install futher updates. Unrooting might be necesary depending on Acer.
Restoring to defaults via CWM #1
Full restore in CWM: "backup and restore" -> "Full Backup"
Enter Acer Recovery Installer and restore recovery.img!
Aditional restoring info
Remember: un-root, remove micro-sd, factory reset if it doesn't work.
Also don't have modified, removed or frozen system apps, wi-fi module, build.prop or any other OS file!
"dd" method in the second post is practical if you'll want to downgrade from a FW that has no root yet - still needs testing (eg. if you update to a future 3.2 you won't be able to go back to 3.1 or 3.0.1 until 3.2 is rooted, because CWM needs root, here's where ADB and "dd" can really come in handy!)
Available backups:
Updates of original Acer_A500_1.016.01_COM_GEN1
CWM backup successfully used by me, containing: Stock 1.016.01_COM_GEN1 OTA updated to 1.139.02. 1.139.02 is a "dud" - a FW update taken down by ACER that breaks updates; to solve this issue flash the update.zip(1.139.05) with the default acer bootloader (restore the original recovery.img from Acer Recovery Installer to get the default acer bootloader)
1.141.05 provided by Thor - Restore with "dd", see post 2!
Please provide your own CWM folder or flexrom, boot, recovery and system.img, full dumps (p1, p2, p3... description for this method below)
Do not provide
system.zip containing system/app files
3.1 ROMs - the purpose here is to know if OTA is working
What worked for me:
Done with CWM!
Un-root, restore to stock, remove micro-sd - probably not all necesary but it worked for me.
First of all I flashed to my default rom: Acer_A500_0.000.00_1.016.01_COM_GEN1 from Acer's server, didn't have a backup.
I installed acer recovery installer, rooted and then CWM restored 1.139.02. This firmware is probably Acer's mistake as it is not available anymore, nor can you OTA update from it.
Then I entered Acer Recovery Installer, restored the original recovery.img, un-rooted and restored to factory defaults.
Placed Acer_A500_1.016.01_1.139.05_COM_GEN1 on my micro SD and rebooted into Acer's recovery (PWR&VOL-) installed with no issues.
After the reboot 4.010.22 was available! Started the download, removed the micro-sd(probably wasn't necessary) and the tablet rebooted and installed the update properly!
Voila, 3.1 (4.010.22, kernel 2.6.36.3) with the help of CWM!
This is all the Info I was able to gather about a full restore. Put it to good use and be productive - tell us your results!
Additional backup and recovery methods
Creating a backup via ADB #2
If you're uncomfortable with ADB, this should work with Terminal Emulator +/- Busybox too. Just skip to step 4.
Or you can try the automatic backup tool, just fire it up and follow the instructions. Root and 1GB on the external SD required.
Get ADB + Java both for x32 even if you have windows on 64 bit!
Get the Iconia A500 USB drivers
Run SDK Manager from "C:\Program Files (x86)\Android\android-sdk" and let it download it's junk. I've no idea how much of it you'll need.
Go to "C:\Program Files (x86)\Android\android-sdk\platform-tools"
Create a text file that will contain "cmd" and save it.
Rename your text file ADB.bat and create a shortcut on the desktop for convenience
Root then go to Settings > Applications > Development > USB debugging
Open your adb shortcut, connect the tablet and type "adb shell"
"$" will show up, meaning that you are logged in as an User
type "su", accept the superuser request on your tab
"#" you're now Admin and can issue backup commands.
Backup the first 0x680000 bytes of mmcblk0 and all partitions (except cache + data) with dd:
dd if=/dev/block/mmcblk0 bs=512 count=13312 of=/mnt/external_sd/dumps/mmcblk0_start
dd if=/dev/block/mmcblk0p1 of=/mnt/external_sd/dumps/p1
dd if=/dev/block/mmcblk0p2 of=/mnt/external_sd/dumps/p2
dd if=/dev/block/mmcblk0p3 of=/mnt/external_sd/dumps/p3
dd if=/dev/block/mmcblk0p5 of=/mnt/external_sd/dumps/p5
dd if=/dev/block/mmcblk0p6 of=/mnt/external_sd/dumps/p6
dd if=/dev/block/mmcblk0p7 of=/mnt/external_sd/dumps/p7
Thanks sc2k!
Restoring to factory defaults via Terminal #2
Root
Install Terminal Emulator, Busybox installer and Acer Recovery Installer
Copy system.img, flexrom.img, boot.img, recovery.img in /mnt/sdcard
Run (flash system.img last, it will lock down your tablet and you won't be able to flash the other .img files):
/data/data/com.interphaze.AcerRecoveryInstaller/files/itsmagic
dd if=/mnt/sdcard/flexrom.img of=/dev/block/mmcblk0p6
dd if=/mnt/sdcard/boot.img of=/dev/block/mmcblk0p2
dd if=/mnt/sdcard/recovery.img of=/dev/block/mmcblk0p1
dd if=/mnt/sdcard/system.img of=/dev/block/mmcblk0p3
Restoring to factory defaults via ADB #3
Get ADB + Java both for x32 even if you have windows on 64 bit!
Get the Iconia A500 USB drivers
Run SDK Manager from "C:\Program Files (x86)\Android\android-sdk" and let it download it's junk. I've no idea how much of it you'll need.
Go to "C:\Program Files (x86)\Android\android-sdk\platform-tools"
Create a text file that will contain "cmd" and save it.
Rename your text file ADB.bat and create a shortcut on the desktop for convenience
Root then go to Settings > Applications > Development > USB debugging
Open your adb shortcut, connect the tablet and type "adb shell"
"$" will show up, meaning that you are logged in as an User
type "su", accept the superuser request on your tab
"#" you're now Admin and can issue flashing commands.
Install Acer Recovery Installer
Copy system.img, flexrom.img, boot.img, recovery.img in /mnt/sdcard
Run (flash system.img last, it will lock down your tablet and you won't be able to flash the other .img files):
/data/data/com.interphaze.AcerRecoveryInstaller/files/itsmagic
dd if=/mnt/sdcard/flexrom.img of=/dev/block/mmcblk0p6
dd if=/mnt/sdcard/boot.img of=/dev/block/mmcblk0p2
dd if=/mnt/sdcard/recovery.img of=/dev/block/mmcblk0p1
dd if=/mnt/sdcard/system.img of=/dev/block/mmcblk0p3
I hope many people who just bought their tablet will come here and post the recovery files asap they got it...
I need to return with 01.139.04
If you use the Acer Recovery Tool from the market, would that do the same thing to take you back to stock?
link
Please, always run itsmagic BEFORE any dd operation.
@Bec07: Please swap the commands in your guide.
Restoring to factory defaults via ADB #2
In Step 7 where are the files located that I'm supposed to be copying? Can't find them?
They're supposed to be in /clockwork mod on your micro-sd car, provided you've don a backup. Or you can download them.
@haakuturi
No, I've tried even if you can download the update, it will fail installing. Tried with pre 3.1 updates.
@sc2k
Thanks, fixed. But don't the checksums change after we flash the partitions?
sanaell said:
I hope many people who just bought their tablet will come here and post the recovery files asap they got it...
I need to return with 01.139.04
Click to expand...
Click to collapse
Don't you remember your initial firmware?
Could you check it when close to an iconia stocking shop?
Great tutorial... Thanks
So, a question... If the Restore function in CWM doesn't restore properly, does it backup properly? That is, if I manually restore the files that CWM made when it backed up, will it restore properly or did the backup miss something?
I don't think it backs up properly either. At least not by all checksum standards.
My backup is CWM and I can't restore it with "dd" no matter what. Thor's works but I suspect it's not CWM.
Scrap that! CWM works just fine!
Bec07 said:
I don't think it backs up properly either. At least not by all checksum standards.
My backup is CWM and I can't restore it with "dd" no matter what. Thor's works but I suspect it's not CWM.
Click to expand...
Click to collapse
Well that's bloody annoying... :/
If I'd known that, I'd have manually backed up my stock ROM...
Tell me about it...
I think I flashed 15-20 times in the past 3 days. Haven't managed to make OTA work for 3.0.1 and now they're all down and I can't see 3.1 either...
can i do the "proper" backup from within the tablet with something like connectbot that has sdcard writing permissions without rooting?
Probably with terminal emulator and busybox too
Bec07 said:
Don't you remember your initial firmware?
Could you check it when close to an iconia stocking shop?
Click to expand...
Click to collapse
I think that was 1.016.01 but I do remember the first update I got was 1.139.04 pushed by OTA
THailand
I'm not aware of any problem with the backup/restore with CWM. I'll try to do some testing to see. The boot, recovery images from CWM should work with the dd command, but the system and data are compacted in a YAFFS2 format and cannot be used with the dd command.
I know the initial version did not run itsmagic automatically, so the checksum of boot would be off after a restore, but that was fixed.
Not sure if this helps but my a500 came with Acer_A500_1.105.01_EMEA_GEN3.
I live in the Netherlands and i have a backup which contains flexrom system and boot.img as well as the update.zip to get it to version Acer_A500_1.141.01_EMEA_GEN3
Download here.
Iconia Build Number
Mine is Acer_A500_1.141.01_EMA_GEN3, I bought the tablet on México.
sanaell said:
I think that was 1.016.01 but I do remember the first update I got was 1.139.04 pushed by OTA
THailand
Click to expand...
Click to collapse
Are you sure, it was 01 because I know mine was 01 and I'm from EU. Wasn't it 02?
spaanplaat said:
Not sure if this helps but my a500 came with Acer_A500_1.105.01_EMEA_GEN3.
.
Click to expand...
Click to collapse
Can you guys look on the back of your box, there should be a sticker "Operated Countries" that should list in what other countries the same firmware version is for.
I suspect EMEA should cover EU, Middle east and Asia, but I've got no idea why there are also separate versions
Thanks!
Hi everyone!
The reason why I post this threat is that there is no clearly mention about the /efs folder in the rooting/how-to guides in here. In my opinion, it's the MOST IMPORTANT thing to know for all Samsung devices with Android OS before flashing any custom ROM. There is a really good threat posted in Original Android Development by Rawat, which I'm going to quote right here. Unfortunately, it's not a sticky threat so it's gone somewhere deeper in the forums.
I really beg you for a sticky of this thread, or Rawats to prevent all new users of damaging their phones.
My point is: many of you can agree, the /efs folder is very sensitive. If it get corrupted and you have no backup of it, well.. let's just say it's nearly impossible to get you phone working again. It contains your IMEI number and some other important things! There have been some situations when it get corrupted after flashing some ROMs. Without a backup, your IMEI is gone. The only way to get your phone working again is to send it back to Samsung Service.
Here is the guide, originally posted by Rawat! Thank you very much:
This guide is based on a guide by Candanga on the i9000 forums, and some commands from supercurio
Please hit thanks on their posts and show them some love for the write up.
-----------------------------------------------------------------------------------------------------------------------
I’ve compiled a quick guide to instruct how to make a copy of the /efs folder. I’ve found in many threads suggestions about backing up this folder but the methods itself are very general. Most of the times they suggest to “root and copy the folder” with Root Explorer or similar, but usually it’s not that easy or it just doesn't work for everyone.
This guide ASUMES you have read this Excellent Guide by Darkstrikerfirst:
H E R E <-- Make sure to read the ADB Guide.
I recommend doing this with a Mobile just taken out of the box or with any Official ROM of its Service Provider. If you have already Flashed your phone with another ROM but its working fine, then you can use that /efs also.
Why the /efs folder?
This is a very sensitive system folder that contains Phone-specific information such as the IMEI (encrypted in the nv_data.bin), wireless devices MAC addresses, product code (also in the nv_data.bin), and much more. Often users trying to change product codes or trying to unlock the mobile will end up corrupting data in this location.
Why back it up?
Well, let’s resume it saying that backing-up this little folder will keep you away from Samsung service centres.
***WARNING: I take no responsibility to any damage caused by the methods cited and/or written here. Their sole purpose is to back-up data and not to alter in any way the integrity of the original files of the mobile***
What you will need:
* Rooted SGS II to get permissions as a SU (Super User) and perform the backup
* I would suggest learning a little about the terminal commands used (in case you are not familiar with them), as it’s better to know what you are doing rather than typing strings like a little chimp without knowing what they are; if you are a little lazy, then you have a good chance bricking your mobile. <- Busybox Commands(or Google them)
* Terminal Emulator by Jack Palevich (available from the market) <-Terminal Emulator or use ADB which is included in the SDK Development Tools
The standard prompt of terminal (adb) is a $ sign. Once you enter “SU” it will become a # Sign.
***NOTE: Make sure to keep an eye on the screen of your SGS II during this process, because it may request SU permissions [currently doesn't on CF-root]; else, you will get an error (just if it’s the first time). In Terminal Emulator you will need to reset the app after granting permissions cause it usually freezes***
*Remember: to use ADB you need to enable USB DEBUGGING under Applications/Development in your SGS II.
Here are 3 methods, I recommend that you do both Clean and RAW.
Basic, unix permissions lost :
Code:
su
busybox cp -a /efs /sdcard/efs/
Clean :
Code:
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
After this, you will end up with the file efs-backup.tar.gz in your INTERNAL SDCARD in sdcard/efs/, which is a “tarball” or a ZIP of the /efs folder. That file is your backup. You can expand it with Winrar.
You can also back up the mmcblk0p1 (where /efs is stored) under /dev/block which can greatly support in recovering your IMEI in case of a screw-up:
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
alternative
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs/efs_dev-block-mmcblk0p1.img
Same thing, the target is the INTERNAL SDCARD in sdcard/efs/, so go ahead and copy the file.
--------------------------------------
original thread by Rawat @ xda: click here
matee89 said:
Without a backup, your IMEI is gone. The only way to get your phone working again is to send it back to Samsung Service.
Click to expand...
Click to collapse
Not 100% true, there are other ways, for example I know how to generate valid nv_data files.
matee89 said:
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
Same thing, the target is the INTERNAL SDCARD in sdcard/efs/, so go ahead and copy the file.
Click to expand...
Click to collapse
I think using dd is better than cat, I dont know why but I have a feeling cat could do some character conversion in some circumstances, so :-
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs/efs_dev-block-mmcblk0p1.img
or better still do both, cannot have too many backups
Thanks for info Odia! Well, the backup is still important. Saves a lot of time for newbies, so i think that this guide should be sticky. Everyone can see it clearly then
There is already a thread about this...
rawat thread
And there's an app on the way apparently..
app thread
Yes, but this thread is not sticky. If you at least read a little part of mine post you should see that I quoted Hawats thread and put a link to it. My point is that this should be more visible for everyone. To be honest, it should be sticky like the rooting guides and other how to's, because it can give you serious problems with the device when files inside /efs get corrupted. Myself I haven't know about the purpose of /efs since yesterday, because it wasn't clearly mentioned in here. Just want to help other newcomers to Samsung devices.
This app will do exacly the same thing like you will do right now following this guide. It's not released yet, so this guide should be used meanwhile.
matee89 said:
Thanks for info Odia! Well, the backup is still important. Saves a lot of time for newbies, so i think that this guide should be sticky. Everyone can see it clearly then
Click to expand...
Click to collapse
Sure the backup is important, is why I added some input to your thread about using the dd command to make double sure the backup taken was valid.
Can an admin or mod make Rawat's thread sticky pls?
Okay, shall edit and post the alternative backup method with dd comand instead of cat.
Would be great with sticky. I don't think that majority of people who's flashing ROM's know how important this folder is. From what I've heard the nandroid backup in CWM recovery does not backup the /efs so it's needed to be done manually.
before using this comands you should use mkdir /sdcard/efs if you don't want to get an error
I made clean, raw and dd back up. Now I have two files of 20 MB each and one of 28Kb is it ok?
Yes, it seems okay. I saved my efs backup files on my PC as well in case something happens to the internal sdcard storage.
Thank you for that. I will backup mine tonight.
Thank you got the backup with my Note
Re: mp1806
Probably some of the ROMs that you flashed had an automatic backup script included, so you already got a working efs backup on your sd card. If you want to be completly sure if the backup is correct, you can make it manually by following the steps in my first post. Later you can even copy your backup to your PC if you like to.
There is three or four apps by now that aid you in creating EFS backups.
Most have been mentioned in the other (older) EFS backup thread.
It's one app i forgot the name of, EFS-Pro that works from your computer and my own one (see sig).
If you search for "efs backup" on the market you will find "Nitrality" (or however it's spelled, forgot the exact name right now) and my one.
Mine also offers an option to check the EFS backup if it's OK or corrupted, so can be really sure to have a good one when the check succeeds.
Point beeing:
No real need to tinker on the shell anymore
Great Thanks for this
Hi, I am using the RAW method on my Galaxy Note, rooted, but I keep getting a file not found error. Anyone able to help? I got the su and the prompt changed correctly, but after:
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
It just says file not found. What am I doing wrong?
Another way is to use ktool made by Hellcat to backup your efs and even restore.
http://forum.xda-developers.com/showthread.php?t=1314719&highlight=ktool
Anyone knows if this tool is as good as command line way?
(nvm)
Odia said:
Not 100% true, there are other ways, for example I know how to generate valid nv_data files.
Click to expand...
Click to collapse
Can you please let me know how to generate it? I HAVE LOST THE EFS FILES ON MY PHONE!
Samsung Tool
Samsung Tool is the easiest and more safe method
how do you restore it?
I have root my S4 and will make a backup from efs/imei but EFS Professional not working with the S4. How can i backup efs?
is it so hard to get a copy of ur EFS folder to safe place ?
You can use TWRP recovery to get a EFS backup
Gesendet von meinem GT-I9505 mit Tapatalk 2
You can back up a whole partition with Terminal Emulator from Play Store.
This is example made for I9505 ONLY!!!!
For I9500 use mmcblk0p3 and efs.img instead!!!
Download it , and run it, then type:
Code:
su
dd if=/dev/block/mmcblk0p10 of=/mnt/sdcard/efs.img.ext4
and it will dump whole partition into one file efs.img.ext4 on your internal SD card
or
Code:
su
dd if=/dev/block/mmcblk0p10 of=/mnt/extSdCard/efs.img.ext4
to save it on external SD.
If something goes wrong and you need to restore it:
Code:
su
dd if=/mnt/sdcard/efs.img.ext4 of=/dev/block/mmcblk0p10
or
Code:
su
dd if=/mnt/extSdCard/efs.img.ext4 of=/dev/block/mmcblk0p10
Keep it safe and enjoy
djembey said:
You can back up a whole partition with Terminal Emulator from Play Store.
Download it , and run it, then type:
Code:
su
dd if=/dev/block/mmcblk0p10 of=/mnt/sdcard/efs.img
and it will dump whole partition into one file efs.img on your internal SD card
or
Code:
su
dd if=/dev/block/mmcblk0p10 of=/mnt/extSdCard/efs.img
to save it on external SD.
If something goes wrong and you need to restore it:
Code:
su
dd if=/mnt/sdcard/efs.img of=/dev/block/mmcblk0p10
or
Code:
su
dd if=/mnt/extSdCard/efs.img of=/dev/block/mmcblk0p10
Keep it safe and enjoy
Click to expand...
Click to collapse
With all respect to your post, I would like to warn people that this is not working for all the models/devices. Although it might look fine when executing the commands, it might not have made a backup of EFS, but of something else... What I know for sure is that it will not work for atleast the international i9505-model of the S4, as the partition layout is different.
In my post below, more details are given on this partition id.
http://forum.xda-developers.com/showthread.php?t=2276599
While executing your commands does not affect the device, it does not always give the people a backup they expect it to be, depending on their device/model. In my case you are able to verify which 'mmcblk' is actually efs on your device. It also gives a TAR backup as option.
Mr_Q said:
With all respect to your post, I would like to warn people that this is not working for all the models/devices. Although it might look fine when executing the commands, it might not have made a backup of EFS, but of something else... What I know for sure is that it will not work for atleast the international i9505-model of the S4, as the partition layout is different.
In my post below, more details are given on this partition id.
http://forum.xda-developers.com/showthread.php?t=2276599
While executing your commands does not affect the device, it does not always give the people a backup they expect it to be, depending on their device/model. In my case you are able to verify which 'mmcblk' is actually efs on your device. It also gives a TAR backup as option.
Click to expand...
Click to collapse
Mate... I've added that it is for I9505!!!!
I9500 have EFS located @ mmcblk0p3...........
thanks
I used GS2 repair from play store. It went through the usual process and I can see the back up file on the sd card. Can anybody more qualified confirm if this app works on S4?
Sent from my GT-I9505 using xda premium
djembey said:
Mate... I've added that it is for I9505!!!!
I9500 have EFS located @ mmcblk0p3...........
thanks
Click to expand...
Click to collapse
Great. You are right, in my case it's mmcblk0p10 as well, as mentioned correctly in my guide already.
Thank you for updating.
HANDSY said:
I used GS2 repair from play store. It went through the usual process and I can see the back up file on the sd card. Can anybody more qualified confirm if this app works on S4?
Sent from my GT-I9505 using xda premium
Click to expand...
Click to collapse
The best thing is to check it with the developer. I do not know what file has been created, although I expect it to be a raw copy using dd. The best thing is to do it manually. Or by the instructions given by djembey, or by the more detailed step-by-step instructions in the thread of my previous post here.
Hey, I managed to backup the EFS folder. Is there any way to modify the backup file and restore it after the modification? I want to change the IMEI number but unfortunately I have no box / cables available to do so. There must be a solution?! I am currently living in Turkey and they restrict western mobile phone usage for foreign people.
thanks a lot
cheers,
ralf
,
ralfa1234 said:
Hey, I managed to backup the EFS folder. Is there any way to modify the backup file and restore it after the modification? I want to change the IMEI number but unfortunately I have no box / cables available to do so. There must be a solution?! I am currently living in Turkey and they restrict western mobile phone usage for foreign people.
thanks a lot
cheers,
ralf
Click to expand...
Click to collapse
Same here with me
i9505 imei null
please can somebody help me,what ever I try not working.Unfortynately everything working,but always show imei null and not have baseband,of course and network too.I am install with Odin few different fabrics roms or how you call that.Last is this one with 4 files inside
I9505XXUGNG8_I9505OXXGNG2_I9505XXUGNG8_HOME.tar.Everything going fine,but havent imei like on start.I am also try few different things with EFS_Professional.but cannot fix my problem.Also I am try to erase EFS,but folder cannot erase,just files inside,and trying other one downloaded from net,but not going.Every time after reboot,EFS be back automatics,Can you help me ,please
If I am write inside EFS folder must be a file nv_data.bin ,I dot have that.Have lots of,but dont see that.I have inside few folders,like imei and etc.. And inside imei folder I have mps_code.dat.I am hope somebody can understand my problem.Can somebody sent to me that file,and can I take from other phone.Is that my solution,or what.HELP PLEASE
this is in function to my i9505,but not help me to solve problem.Somehow I not have file nv_data.bin on my phone in efs folder,and backup and restore not help me.Please do you no some solutions?
So I was able to do a full adb backup when I was on 4.1.2 before I updated to 4.2.2.. I wanted to do another full adb backup again on 4.2.2 before putting a recovery or custom rom on my device so it would be easy to restore back to my completely stock experience (with root) if I choose. But for some reason after letting it run all the way through (I let it run overnight since it takes so long) the backup is nowhere to be found which leads me to believe it failed somewhere along the way, but no errors are reported. Has anybody had this issue or have any advice on what may be going on? I've tried doing:
Adb backup -all
Adb backup -all C:\Users\Wyth\Desktop
Adb backup -all G:\ (external HDD)
Adb backup -all G:\xtzbackup (in case adb backup had some sort of bug saving to the root of the drive)
If anybody has any help or alternative solutions to creating a full system backup I'd appreciate it! Thanks in advance!
If you are going to supply a path and file name, don't forget the -f switch
dph3055 said:
If you are going to supply a path and file name, don't forget the -f switch
Click to expand...
Click to collapse
Thanks, that was absolutely the issue. I guess I did that the first time around but forgot the second. I ended up making the backup and then unlocking the bootloader. Unfortunately I forgot that it would completely wipe the internal storage rather than just a factory reset, so I lost my titanium backups. Tried to do the adb restore, and every time after the first app it would just reboot the device. After trying it many times I ended up using the adb extractor tool to create a tar from the backup. Apparently however the backup was no good because when extracting the tar after getting to a certain part every time it came up with unexpected end of archive. But I at least got most of the titanium backup folder out. Tried copying that to internal storage and it was permission denied. Copied it to external sd, and then on the tablet transferred it to internal storage. Then every time I restored any of the data, when I rebooted the tablet it would go into bootloops. After many ftf flashes and time wasted copying things back and forth all over the place I finally am basically just resigning to starting over. Boot into CWM and made a backup, and find that it makes the clockwork mod backup folder in data/media rather than the proper place in data/media/0 or even data/media/legacy. The option to backup to external sdcard also doesn't work, as it refuses to mount sdcard or external-sdcard. Needless to say the last 24 hours or so has been massive headaches. Is there a newer version of CWM for the tablet than 6.0.3.2? It seems pretty buggy and hard to believe that it is what everyone has been using as the button combination to reboot to recovery doesn't even work.
Btw, I'm trying to do this on the stock sony 4.2.2 firmware for sgp312.
Using kernel and recovery from here:
http://forum.xda-developers.com/showthread.php?t=2433466
with ftf from here:
http://forum.xda-developers.com/showthread.php?t=2424550