Galaxy Tab A T-580 IMEI and NVRAM backup - Samsung Galaxy Tab A series Questions & Answers

Hi
I am new to this forum and flashing android devices. Today i just managed to root my T-580 using newest TWRP and Magisk versions. The root-checker says its rooted, SafetyNet passes so eveything seems to be OK.
Before flashing any custom ROM i wanted to backup IMEI and NVRAM but without success.
I have tried different approaches:
1. minimal adb and fastboot - after entering commands i get illegal number of block size
2. platform tools - gives me no such file or directory mesage
3. mtkdroid root tools - device info is not read and backup is grayed out. what is strange that the available free space is succesfully read but not any other info.
Check the attachments for the screenshots.
Could anybody help me how can i backup IMEI and NVRAM data? Without this step i cannot proceed in flashing custom ROM.
Thank you
EDIT: is backing up EFS in TWRP the same procedure as backing up IMEI-NVRAM? so it might be enough to backup EFS to secure IMEI-NVRAM?

Related

BACKING UP IMEI BEFORE FLASHING ANY ROM

Mod Edit: Thread closed by @Darth . Pay per click links are not permitted on XDA.
4 Methods on How to Backup your IMEI
How to back up your IMEI
This is the most important things to do before flashing any rom or apps is to backup your imei.
After flashing ROMs or installing updates, it is possible that the phone will get an invalid IMEI or unknown baseband. Invalid IMEI would mean no mobile network connections.
Every mobile phone, GSM modem or device with a built-in phone / modem has a unique 15 digit IMEI number. I have 4 methods to back up your IMEI.
Method 1: Using mtkdroid tools
Requirements:
PC/LAPTOP
USB CABLE
ROOTED PHONE
DRIVER
mtkdroidtools.rar
Set your phone in USB debugging mode, then connect via USB cable.
Open mtkdroid tools
Click IMEI/NVRAM
Then navigate to Backup
This backup will save in your mtkdroid tools backup folder.
Method 2: Using MobileUncle Tools
Requirements:
ROOTED PHONE
mobileuncle.toolbox.apk
Open and install mobile uncle tools then navigate to backup imei. That's it!
Method 3: Using Rootexplorer
ROOTED PHONE
Rootexplorer.apk
Install and open Rootexplorer
Go to Root Folder
Navigate to data/nvram. Save this nvram folder in your sdcard.
Method 4: Using Carliv Touch Recovery 2.7 and 3.0
ROOTED PHONE
CTR 2.7 or 3.0
Flash this CTR 2.7/3.0 then go to recovery mode
Click carliv menu
Navigate to NVRAM
Choose Nvram backup
This nvram will save in clockworkmod/backup/nvram folder
Nowadays there's update in some custom recovery like twrp, philztouch and ctr that has nvram backup and restore menu. You can backup this nvram/imei by means of this custom recovery.
IF ALL THE ABOVE METHOD FAILS TELL ME ILL PROVIDE U A SOLID SOLUTION
XDA:DevDB Information
HOW TO BACKUP IMEI, ROM for all devices (see above for details)
Contributors
manhar2108
Source Code: REMOVED
ROM OS Version: 4.4.x KitKat
Version Information
Status: Testing
Created 2015-08-10
Last Updated 2015-08-10

Extract Google Authenticator database from unrooted S4 i9505?

Hi everyone!
I have a Samsung Galaxy S4 GT-i9505 running Android 5.0.1 build oj2.
It has a Google Authenticator database on it which I would like to extract, so I can migrate it over to a new phone.
I would rather not have to cancel and renew all my 2fa accounts currently stored withing Google Authenticator.
It seems I need root access to access the database file.
I found some references to things like motochopper, psneuter, providing temporary root, and I tried a couple of those, but it seems my S4 has been properly patched.
I tried compiling and executing a copy of Towelroot I found on GitHub under /geekben/towelroot, but that didn't work either (maybe I did not correctly compile...)
Priority #1 is not losing access to my Google Authenticator database (no bricking, no factory reset, ...)
What are my options? Does a simple root exploit exist for my S4 that would allow me to copy the db file? I was unable to find it.
I read something about a custom recovery, and then using nandroid to backup, which, I think, would allow me to extract the db from the backup?
I'm not sure about the risks involved; if flashing the custom recovery fails for whatever reason, do I still have 'normal' access to my S4?
Is it at all possible to flash a custom recover without first wiping everything on my S4? I'm reading mixed information.
Any other options perhaps?
Also, my S4 just finished downloading an OTA upgrade to 'something' (it's not showing what it has downloaded, about 490Mb in size) and I may have postponed the upgrade by rebooting.
Perhaps an upgrade to Android 6.0? I don't know if that would be better or worse for what I'm trying to do here...
Thanks in advance for any pointers...
CF-Autoroot via Odin is what you use to root the S4. This will trip Knox, but at this point it shouldn't be an issue as the I9505 hasn't been produced for a couple years now. However, if you downloaded Authenticator from the Play Store Google should have backed up the database, unless doing so creates a security hole.
Backing up and restoring the Authenticator data can be done with ES File Explorer, as I routinely do it with my copy of Authenticator when I need to do a clean install of my N6's custom ROM. Other apps like Titanium Backup may also work, but I don't use Titanium Backup so I don't know how well it would work with Authenticator. Go here for a tutorial on how to backup both app and data using ES File Explorer. Ignore the requirement for the Pro version. The copies of ES File Explorer that I offer from the link in my signature have the ability to backup app and data. Just make sure both of your devices are rooted and have ES File Explorer installed.
EDIT: The one thing that tutorial doesn't mention is that you need to enable root in ES File Explorer; the setting for that can be found in the menu, accessed by tapping on the three lines at the upper left. It also doesn't mention that after enabling root you need to go into the settings, tap on App, and make sure everything on the page is checked before backing up. Otherwise, the app data will not be backed up when you back up the apps.
Ok, this is what I'm reading about Odin and CF-Autoroot at android.wonderhowto.com at /how-to/android-basics-root-with-cf-auto-root-0167401/ (sorry not allowed to post links):
CF Auto Root works by unlocking your device's bootloader, which means that if your bootloader is not already unlocked, you will lose all of the data on your device.
And there are many more articles hinting that my phone will get wiped if I unlock the bootloader, for an S4 as well as other models.
So.... I'm a little confused here. I never touched my S4 with anything special, so I'm guessing that it's bootloader will be locked?
So this will wipe my S4? I can't do that - I'm looking to save and copy my Google Authenticator database as priority #1, not looking to root my phone. I may do so later but rooting is not prio #1.
You're in a bit of a catch-22 here. There's no guarantee you won't lose your data if you run CF-Autoroot, but you have no choice BUT to run CF-Autoroot if you want to retrieve the Authenticator database at all. Since the database is in the /data partition, unavailable to a normal user, root is required in order to access that partition to retrieve the database, and in order to root you have to risk having your data wiped. To restore the database to your other phone also requires root, for the same reason.
The only devices that had locked bootloaders were in the US, so you should be ok running CF-Autoroot. But there are no guarantees here.
Thanks for your input.
Indeed there's a catch-22 here, except that I also have the option of, one by one, cancelling and renewing all my 2fa accounts and not root at all. I'm trying to decide what to do here, as obviously, renewing all ma 2fa in case of dataloss (losing access to my accounts in the process) will be much more difficult than simply re-doing all my 2fa accounts while I still have access. Rooting my new phone is less of an issue as it contains no important data at the moment.
I think I also read about installing a custom recovery, and using that to make a nandroid backup, which would then allow me to extract the file I need from the backup. Is that a possibility? And, if yes, would this be less risky than using CF-Autoroot? Would my S4 still be able to boot and function normally if I flash some total garbage file as a recovery partition? So I could try and flash a custom recovery, and if that fails for some reason, my S4 will still boot as usual?
Thanks
You can install a custom recovery, make a nandroid backup, and retrieve the database that way. You would then have to transfer the nandroid to the other phone, install a custom recovery to the other phone, and then restore just the data. To me that's a lot of work for little gain. Rooting and using ES File Explorer or Titanium Backup to retrieve the data is far simpler to do and causes less headaches.
As to flashing a custom recovery being less risky than CF-Autoroot, no. It's the same level of risk as both the custom recovery and CF-Autoroot are installed in the same fashion. The only difference is that CF-Autoroot runs a temp environment, roots the device, and then commits seppuku.
Thanks again for your input; much appreciated. I'm trying to learn and understand what is happening, and with all the slightly different combinations out there, it is sometimes difficult to know what applies to my S4 and what is not applicable.
So there is at least the boot loader, the recovery image, and the main android image (file system?). Perhaps a kernel partition also?
These will probably be separate flash partitions within the same flash chip.
The boot loader will always be started when I power up the device. When no special key combination is pressed at power-up, the boot loader will simply load the Linux kernel which will eventually load the main operating system which will end up launching android.
With some special key combination is pressed, the boot loader will launch the recovery image in stead.
I wonder, what would happen if, using Odin, I write a completely invalid data file to the recovery image (I pick the wrong image, or the image is corrupt, or by accident I pick a jpg file of my cat in Odin, or the process is interrupted due to a sudden power loss on my phone or even my computer running Odin), and suppose Odin will just go ahead thus destroying the recovery image. My recovery partition is now corrupt, unusable and will crash the system when launched.
Does this brick my phone? Will I still be able to boot normally? Will I still be able to use Odin and try flashing the recovery image a 2nd tine?
2kman said:
Does this brick my phone?
Will I still be able to boot normally?
Will I still be able to use Odin and try flashing the recovery image a 2nd time?
Click to expand...
Click to collapse
No.
Yes.
Yes.

Possible fix for IMEI 0 after OTA update?

Like many people who have lost IMEI after flashing Oreo ROM and reverting to stock, I too have run into the same issue. I've managed to get my IMEI back and now have a working EFS backup. I've also got my VoLTE fixed using the VoLTE fix thread.
The problem I'm running into now is that the OTA updates from motorola keep breaking my IMEI. So every time I install an OTA, my IMEI becomes 0 afterwards. I then have to install TWRP and restore my EFS+persist backup to get my IMEI back. But this essentially prevents me from installing the next OTA update.
Has anyone found a way to install the OTA update without losing IMEI? Any help would be much appreciated!
I've thought of possible solution but I'm not sure if it will work. If someone could tell me if this will work, that would be great!
1. Using Partition Backup app from playstore, backup Modem, Modemst1, Modemst2 and persist on working stock ROM
2. Do a fresh install of stock ROM via fastboot and install OTA
3. Use Magisk to patch boot image and flash the image from fastboot
4. Re install Partition Backup from playstore, grant root access and restore the partition backup to get IMEI back?
This way you can restore the stock boot image and install next OTA all without installing and decrypting your storage with twrp.
PLEASE
please share the EFS folder:good::good:
Another users EFS paritition won't help you and sharing is not allowed on XDA, this has been addressed multiple times since there are over a dozen threads about the the same damn thing.
THE REAL FIX:
Accept that you made a mistake cause you didn't keep a secure backup of your original firmware, and let it be a learning experience in the future. Some users are in worst situations following some of these half-cocked fixes.
Randumb_User said:
Another users EFS paritition won't help you and sharing is not allowed on XDA, this has been addressed multiple times since there are over a dozen threads about the the same damn thing.
THE REAL FIX:
Accept that you made a mistake cause you didn't keep a secure backup of your original firmware, and let it be a learning experience in the future. Some users are in worst situations following some of these half-cocked fixes.
Click to expand...
Click to collapse
No....we did not make mistakes actually. Many things have been borked by Oreo development, I did nothing to lose my Imei other than flash 64bit Roms, keeping a secure backup of stock firmware would not restore your imei, if so, so would flashing via fastboot your original stock firmware.
Ok so I've been analyzing the app "Partition Backup" on the play store and it seems that you can also flash your backed up partition through fastboot. So if you back up those partitions, you can restore them through fastboot even without the app (As long as you backup the partition in the .img format). I haven't tried any of this yet so I'm not sure if it will work.
smartish123 said:
Ok so I've been analyzing the app "Partition Backup" on the play store and it seems that you can also flash your backed up partition through fastboot. So if you back up those partitions, you can restore them through fastboot even without the app (As long as you backup the partition in the .img format). I haven't tried any of this yet so I'm not sure if it will work.
Click to expand...
Click to collapse
Best way to back up partitions is to use ADB
Code:
ls -al /dev/block/platform/soc/7824900.sdhci/by-name
which will give you a list of all partitions by name and their starting addresses. Then ADB shell and dd command, for instance for persist
Code:
dd if=/dev/block/mmcblk0p30 of=/external_sd/persist.img
This backs up that partition to your external sd card. To restore/write it
Code:
dd if=/external_sd/persist.img of=/dev/block/mmcblk0p30
Of course you would do this for each partition you want to back up.
[email protected] said:
Best way to back up partitions is to use ADB
Code:
ls -al /dev/block/platform/soc/7824900.sdhci/by-name
which will give you a list of all partitions by name and their starting addresses. Then ADB shell and dd command, for instance for persist
Code:
dd if=/dev/block/mmcblk0p30 of=/external_sd/persist.img
This backs up that partition to your external sd card. To restore/write it
Code:
dd if=/external_sd/persist.img of=/dev/block/mmcblk0p30
Of course you would do this for each partition you want to back up.
Click to expand...
Click to collapse
Do you need to have root installed to run those commands through adb? What I'm planning on doing is to unroot my device and go to pure stock. I want to be able to restore my modem partitions when I install an OTA (which will probably break my IMEI).
UPDATE
I tried flashing the backed up image of modemst1 i got from the app through fastboot. It failed saying "flash permission denied"
Code:
(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
(bootloader) has-slot:modemst1: not found
target reported max download size of 536870912 bytes
sending 'modemst1' (2048 KB)...
OKAY [ 0.076s]
writing 'modemst1'...
(bootloader) flash permission denied
FAILED (remote failure)
finished. total time: 0.101s
How to get back imie...??? Please help
madhu kumaraaa said:
How to get back imie...??? Please help
Click to expand...
Click to collapse
Try this thread
https://forum.xda-developers.com/g5-plus/help/restore-imei-0-moto-g5-xt1687-t3739808
Try this.
1-Pixel Experience workaround (Flash PE, don't turn on wifi, get to home screen, reboot to bootloader, run fastboot erase modemst1 and fastboot modemst2, let phone reboot, confirm network.)
2-Lock Bootloader (If the last OTA you got was 9x-8 you're in a tight spot til firmware is available. If it was -4, you're good.)
3-Flash Full Firmware (but not fastboot erase modemst1 and modemst1. Keep as-is)
4-Install and Flash OTA
I can make absolutely no promises it will work for you. But I was dealing with IMEI 0, and now my bootloader is locked, on Stock, OTA installed with IMEI. I've had the phone return IMEI 0 after OTA updates before this. I can't confirm LTE/voLTE connectivity, not much data in the first place cause I don't need it.
If it doesn't work. Try again but do this first. I dunno if it's redundant or not. I can't test further and I'm leaving this phone alone now.
--When I was messing with my phone while doing this. I ****ed up the first time and only did 1- and 3-. I ran the above steps after phone as on the home screen and not enabling wifi
For reference. I don't have an EFS backup and I never messed with persist.
Randumb_User said:
Try this.
1-Pixel Experience workaround (Flash PE, don't turn on wifi, get to home screen, reboot to bootloader, run fastboot erase modemst1 and fastboot modemst2, let phone reboot, confirm network.)
2-Lock Bootloader (If the last OTA you got was 9x-8 you're in a tight spot til firmware is available. If it was -4, you're good.)
3-Flash Full Firmware (but not fastboot erase modemst1 and modemst1. Keep as-is)
4-Install and Flash OTA
I can make absolutely no promises it will work for you. But I was dealing with IMEI 0, and now my bootloader is locked, on Stock, OTA installed with IMEI. I've had the phone return IMEI 0 after OTA updates before this. I can't confirm LTE/voLTE connectivity, not much data in the first place cause I don't need it.
If it doesn't work. Try again but do this first. I dunno if it's redundant or not. I can't test further and I'm leaving this phone alone now.
--When I was messing with my phone while doing this. I ****ed up the first time and only did 1- and 3-. I ran the above steps after phone as on the home screen and not enabling wifi
For reference. I don't have an EFS backup and I never messed with persist.
Click to expand...
Click to collapse
So just to clarify (I understand that this may not work for me):
After following the above steps, you were able to have a working IMEI and you were able to install an OTA update without having your IMEI go to 0 correct?
Also on step 4, when you say "Install and Flash OTA" do you mean you proceed to install the OTA normally (as in you click the install button in Stock and your phone reboots and installs it)?
smartish123 said:
So just to clarify (I understand that this may not work for me):
After following the above steps, you were able to have a working IMEI and you were able to install an OTA update without having your IMEI go to 0 correct?
Also on step 4, when you say "Install and Flash OTA" do you mean you proceed to install the OTA normally (as in you click the install button in Stock and your phone reboots and installs it)?
Click to expand...
Click to collapse
Correct and correct, I'm a ****show when it comes to explaining things.
I'm still not sure what's gonna happen after a factory reset. The reluctance is overwhelming.
Did anyone else have any luck?
If anyone manages to get thier IMEI at any point I'd suggest Unlocking/TWRP to make an EFS backup. First thing I did after rooting again. Then I got stuck on the logo, had to flash 93-4 and....IMEI 0. EFS backup worked proper and restored it just fine. I could wipe data in TWRP without losing IMEI.
Gonna avoid custom ROMs. Stick with Stock+ElementalX+Magisk.
What a fun device....
Here's some probable good news: https://www.xda-developers.com/google-require-oem-regular-security-patches/
Randumb_User said:
Did anyone else have any luck?
If anyone manages to get thier IMEI at any point I'd suggest Unlocking/TWRP to make an EFS backup. First thing I did after rooting again. Then I got stuck on the logo, had to flash 93-4 and....IMEI 0. EFS backup worked proper and restored it just fine. I could wipe data in TWRP without losing IMEI.
Gonna avoid custom ROMs. Stick with Stock+ElementalX+Magisk.
What a fun device....
Here's some probable good news: https://www.xda-developers.com/google-require-oem-regular-security-patches/
Click to expand...
Click to collapse
Yea as of now, no one has been able to figure out how to apply OTA without losing imei. However someone has managed to figure out how to apply an OTA using the firmware files without losing imei.
https://forum.xda-developers.com/g5-plus/help/restore-imei-0-moto-g5-xt1687-t3739808/post76468866
The only drawback with this method is that you need have the firmware zip of the OTA.
smartish123 said:
Yea as of now, no one has been able to figure out how to apply OTA without losing imei. However someone has managed to figure out how to apply an OTA using the firmware files without losing imei.
https://forum.xda-developers.com/g5-plus/help/restore-imei-0-moto-g5-xt1687-t3739808/post76468866
The only drawback with this method is that you need have the firmware zip of the OTA.
Click to expand...
Click to collapse
I have used OTA to update to 93-8 and the other day 93-10 (For XT1687 retus) without losing IMEI, it's an anomaly to me. Prior to that I was dealing with the same OTA updates reverting back to IMEI 0. I'm not trying to gloat or anything, I've been hoping at least one person managed the same outcome. It's a really $h!t situation for a lot of people.
Randumb_User said:
I have used OTA to update to 93-8 and the other day 93-10 (For XT1687 retus) without losing IMEI, it's an anomaly to me. Prior to that I was dealing with the same OTA updates reverting back to IMEI 0. I'm not trying to gloat or anything, I've been hoping at least one person managed the same outcome. It's a really $h!t situation for a lot of people.
Click to expand...
Click to collapse
What sucks so much is how random things are with this device. For example, a month ago I fastbooted one of the firmwares and my imei was there(was 0 before flashing). After that flashing an Oreo rom, my imei was 0. Going back and repeating the process, flashing same firmware, imei 0 still?????. So damn random. If only we had a safe way to manually insert our imei. Let's just hope the problems do not multiply when we get 32bit official Oreo .
Cupcake 1.5 said:
What sucks so much is how random things are with this device. For example, a month ago I fastbooted one of the firmwares and my imei was there(was 0 before flashing). After that flashing an Oreo rom, my imei was 0. Going back and repeating the process, flashing same firmware, imei 0 still?????. So damn random. If only we had a safe way to manually insert our imei. Let's just hope the problems do not multiply when we get 32bit official Oreo .
Click to expand...
Click to collapse
I've been doing a lot of thinking and I came up with this idea on how to install OTA safely without losing imei.
Essentially, the main goal is to be able to install the OTA and then restore a backup of your modemst1 and modemst2 partitions. You need to be able to do this without installing TWRP, since it will decrypt your data partition. The only way I can think of doing this is through backing up and restoring your modemst1 and modemst2 partitions through ADB, which unfortunately requires root. Using some logic, we can see that in order to do this you need to preserve root without installing it through TWRP. I'm proposing that if you can use magisk manager (the apk one) and use it create a patched boot.img (which can be obtained via any firmware zip) with root access , you can flash this patched boot.img in fastboot and obtain root access WITHOUT having to use TWRP. So whenever you install an OTA, you can restore the original boot.img through fastboot, install the OTA, restore patched boot.img, and use root access to restore modemst1 and modemst2 backups via ADB.
UPDATE
I came up with a better idea. It seems it is possible to boot into twrp without having to flash it on your phone via
fastboot boot twrp.img
If this works, you can restore an EFS backup everytime you install an OTA since your stock recovery remains intact.
I haven't tried any of this yet. It would be amazing if you guys could give me your opinions about this. I'd be happy to clarify any of this for you guys.
My G5 Plus was stolen and it's now someone's problem other than mine. Good luck to them. I've inherited a OnePlus X.
Farewell folks.
smartish123 said:
UPDATE
I came up with a better idea. It seems it is possible to boot into twrp without having to flash it on your phone via
fastboot boot twrp.img
If this works, you can restore an EFS backup everytime you install an OTA since your stock recovery remains intact.
I haven't tried any of this yet. It would be amazing if you guys could give me your opinions about this. I'd be happy to clarify any of this for you guys.
Click to expand...
Click to collapse
This doesn't work, I just tried it. You can of course restore EFS this way but the next OTA will not work, you get the "Error!" message.
fivefour said:
This doesn't work, I just tried it. You can of course restore EFS this way but the next OTA will not work, you get the "Error!" message.
Click to expand...
Click to collapse
Drat. This means that whatever efs we are using to recover our imei is tampered. I don't know how to fix that.

Root Without TWRP / Samsung Account Error / IMEI Recovery

Is there any way to be root without TWRP?* I'm in Oreo and I lost my Imei and cell coverage*. However, I have my backing of the EFS folder. But I can't stick it in the root without being root.
I know I have to wait 8 days for the OEM unlock to activate (I even used the trick to not wait 8 days and it worked for me). And be able to use twrp and install Root per zip file.
But now I haven't been able to do the trick because I can't log in to the samsung account*(Procesing Failed). My fear is that the 8 days will pass and since I cannot log in to my samsung account, the OEM unlock will not be activated even after 8 days.
In short, it would be a great help if anyone knew of these 3 options.
*1.- If you can be root without installing twrp.
*2.- If someone knows how to log in to samsung account, when the error message ("Procesing Failed") appears. I've erased cache of all samsung applications, I've reestablished it from the factory. I have installed full Stock firmware and nothing yet.
*3.- Recover IMEI in another way (I have a TWRP EFS Backup (I already restored it but it didn't work) and I have backup of the EFS folder to replace with the root.
Image that could possibly be useful for point 2.
Knox status: https://ibb.co/kjt908 In download mode it appears as (0x030c).
Download mode: https://ibb.co/nuMySo
Translated with www.DeepL.com/Translator
I found something about point 1, about how to rotate without using a TWRP.
https://forum.xda-developers.com/u12-plus/how-to/guide-how-to-root-u12-magisk-tips-tricks-t3802583
Will there be something similar for our device?.
I welcome any input on the subject. (Y)

What partitions to backup before installing a Custom ROM?

I'm not exactly a newbie when it comes to flashing stuff, I know the usual backup through TWRP but I have seen in the forums that you need to backup IMEI, BT and MAC address. I've been searching through the forums but I'm seeing different tools and restore methods and I was wondering what exactly I should use should I ever want to go back to stock rom or incase installing a Custom ROM causes an issue stuff like IMEI or the addresses? Thanks in advance
I use this:
https://forum.xda-developers.com/mi-a1/how-to/tool-low-level-backup-restore-unbrick-t3790307
You need to backup EFS (contains IMEI) and persist (contains BT and Wifi MAC address), and you can do this if you use CosmicDan's TWRP.

Categories

Resources