[Q] How do I gain root without wiping my data on stock 4.1.2 - Nexus S Q&A, Help & Troubleshooting

Yesterday I spend the whole day trying to gain root on my Nexus S while preserving my precious data on the phone.
Ho do I gain root without wiping my data?
Is there currently a way at all?
All I need is to be pointed into the right direction.
I'd be really thankful for helpful responses.
Thanks for reading
I have:
a functional ADB connection
a locked Bootloader
a stock Recovery
a Desktop Backup Password set which is unknown to me
I tried gaining root with:
SRS One Click Root for Android
Root_with_Restore_by_Bin4ry_v26
I ruled out:
Unlocking the Bootloader
doing a Factory reset
creating a backup via desktop backup since I have set an unknown password
Samsung Nexus S (GT-I9023) :: herring 4.1.2/JZ054K :: Radio I9020XXKI1 :: Bootloader I9020XXLC2

An unknown password on ur phone?
What data u talking about?
Copy it all to ur computer before rooting then copy it back. Backup ur SMS with "SMS backup +" then restore it.
Vs Nexus S4G using tapatalk2

You can't.

OK, so I was writing this big reply telling how I don't think that rooting makes you lose you data and all. Then I googled it for a bit (as it's been a long time since I rooted mine, I could be wrong) and found out I was indeed wrong
Thing is, when you unlock your bootloader, as a safety precaution, your data partition is erased. As far as I can tell, there's nothing you can do about that.
OK, so you don't want to unlock the bootloader, you want to simply gain root access, right? So, it should be doable. I don't believe that just flashing a recovery will erase your data partition (i think).
There's this guide I found that should help you. Just remember to read the whole thing through before following it
completeandroid.wordpress.com/2011/01/31/complete-guide-to-rooting-the-nexus-s
Now, about that desktop backup password. Initially, I don't think that should be a problem. After you have root access you can use something like Titanium Backup to backup all your data and then unlocking the bootloader (if you want to do that). I don't have my desktop backup password set, so I'm not sure this would work.
Hope I have helped.
Cheers!

The simple answer is that you cant... i tried a lot, but failed
If you want all your precious data restored in its original position, get Titanium Backup and backup everything... Restore it after getting rooted...
Sent from my Nexus S using xda premium

Partially resolved
Thanks for all your replies.
Luckily I was able to brute force guess the forgotten Desktop Backup Password. So for me the topic is resolved since I now was able to make a full Desktop Backup. Unlock the Bootloader and restore the backup.
I did set the password at a time where I got ICS and wanted to give it a try just to realize that the full backup is more designed for development purposes then for the end user. At that point I just abort that mini project and forgot about it. That's how I forgot the testing password I initially set when I got ICS.
For me this issue is resolved for someone else having the same issue probably not.
So at the time writing I don't know of any root exploit in existence that works for a stock build 4.1.2/JZ054K
--
hehe @gmantovani I also stumbled about that blog post, followed it's instructions just to realize that it didn't apply for my case.

You can use Go Backup to backup everything you don't want to lose, that is in the SD Card. But it's usually SMS and Call-logs so I'd personally use SMS-Backup/Restore and CallLogs-Backup/Restore apps to do it. Contacts will be synced with your Gmail account and photos will be stored in your SD card.

Related

[SOLVED] Efs?

What is it? Because I want to download the mokeeOS, but the installation is confusing me, so I wanna know if the efs matters
Sent from my SGH-T959V using XDA
1. Yes efs matters a lot
2. I don't know a whole lot but it holds the network info, imei number, and alot of other really important things
Sent from my SGH-T959V using xda premium
Although there is a way to make sure you have a backup, flash this file in cwm
sourceforge.net/projects/teamacid/files/fb/cwm/cm7-efs-backup.zip/download
And there will be two files in the root of your sd card
Efs-backup.tar and efs-backup.tar.md5 ( I suggest save it to your computer, it saved my ass )
And you can restore this backup at anytime by flashing this
sourceforge.net/projects/teamacid/files/fb/cwm/cm7-efs-restore.zip/download
Good luck
Sent from my SGH-T959V using xda premium
Efs is the files system that holds the unique identifiers for your device. Without it, your phone is basically useless. You won't be able to connect to any network properly do things like phone calls, internet, texting, are all degraded, if they even work at all... Make sure you know what you are doing before messing with it. Fb created a vet good guide on the wiki. Follow it to a T!
Sent from my SGH-T959V using XDA
I would suggest using a root browser to copy the EFS folder to somewhere safe on your PC and copy a 2nd back-up to your SD card. I lost IMEI going from CM7 to moKeeOS but was able to easliy restore it with a back-up and a root browser.
The flashable EFS back-up/restore from FB should still be used, but with EFS/IMEI I don't think you can be too careful and backing it up manually as previously stated is a good idea.
Yeah, I keep multiple copies of it on my PC. The reason being is that I copy it whenever I do a backup before a flash. So I have a directory with the date with 3 folders: efs, nandroid, and sdcard. I used adb to copy them:
Code:
cd efs
adb pull /efs/
Probably overkill, but better to be safe than sorry, eh?
Ok, but once you lose IMEI and don't have a backup (I received this phone for repair), then what can I do?
serialteg said:
Ok, but once you lose IMEI and don't have a backup (I received this phone for repair), then what can I do?
Click to expand...
Click to collapse
It's pretty much screwed without the OEM Samsung/Tmo software. You would have to send it to Samsung for repair, or you might get lucky and get an engineer to hook you up, but that is unlikely...
thomas.raines said:
It's pretty much screwed without the OEM Samsung/Tmo software. You would have to send it to Samsung for repair, or you might get lucky and get an engineer to hook you up, but that is unlikely...
Click to expand...
Click to collapse
thanks for the answer. that OEM software isn't available in the forums or anywhere else for us? because I swear I flashed something OEM'ish without root with heimdall.
also, the imei is on the battery part of the phone, can't i fix it?
i read somewhere that you could use a phone just fine without imei on the about phone.
you can use the phone without imei, but it doesn't function as well as it would with it. Also, i was using titanium backup and it said my device's id was changed, and it showed my actual imei. If i were to restore it, would that fix the imei?
EFS help on the SGH-T959V
Basically, I've had a hell of a time with some EFS drama this weekend, made a total noob mistake, but in a stroke of luck I was able to "recover" so to speak my EFS even after it was supposedly "wiped."
After some thorough research and READING and bit of thought, I realized that the PIT mapping layouts between BML and MTD are indeed different, and that in theory if one remaps to BML (in layman's terms a stock partition map) then the EFS data originally on the phone gets correctly remapped (at least in my case it did).
To reiterate:
1. I did a nandroid backup. Basic ****. I hope to god you at least did this step too.
2. I used the cm7-efs-backup.zip script to backup my EFS. This was my first mistake. In my case, I don't know why I'm still researching, this script failed to make a backup .tar on my sdcard or anywhere else for that matter. It didn't throw any error messages either on the screen in the process. Not trying to attack the authors of that script, I'm just saying it didn't work for me this time.
3. I pushed the TWRP boot.img with Heimdall
4. I used the cm7-efs-restore.zip script which also "succeeded" but did nothing to restore any sort of EFS obviously because there was no backup to begin with.
5. I flashed R11 unofficial cm7 and booted up. Everything was fine but the IMEI was corrupted and I confirmed that the new MTD EFS partition was empty. On T-Mobile I could place no calls and only got sporadic and intermittent data access.
It was at this point I was sure I had ruined my phone.
After some more careful reading I realized that the original EFS was still present on the firmware, however the new MTD layout I flashed (wisely) stores its EFS partition in a different physical location. In theory, I thought if I reverted to BML and a stock ROM then I would recover the original EFS. In my case, this was successful.
1. I accessed the most recent "boot.img" file from my most recent nandroid and pushed that back to the device with Heimdall
2. At this point you have to flip your USB drivers back to USB Composite Device.
3. I then used a Heimdall one click to return to a rooted stock KJ6 "Gremlin Remover"
4. Upon restart, everything was fine (sigh of relief)
At this point, I'm still trying to determine why my EFS cannot be backed up with a few automatic tools. I made a backup of the file structure, but even lyriquidperfection's EFS Pro 1.4.7 can't make a backup of the EFS. It can access the ADB Server, but the backup 'fails'.
I'll check back in after I figure out why.
Hopefully this info will help anyone else who has switched to MTD and has a missing EFS.
nick.tansy said:
At this point, I'm still trying to determine why my EFS cannot be backed up with a few automatic tools. I made a backup of the file structure, but even lyriquidperfection's EFS Pro 1.4.7 can't make a backup of the EFS. It can access the ADB Server, but the backup 'fails'.
I'll check back in after I figure out why.
Hopefully this info will help anyone else who has switched to MTD and has a missing EFS.
Click to expand...
Click to collapse
I had similar issues yesterday. If your trying to install the twrp and then downgrade to the version with wifi dont flash the boot.img with heimdall. Follow the instructions for installing via cwm.
Just install the zip that has twrp in it. But follow the directions for normal cwm installation.
Also when trying to make a backup of your efs, make sure system is mounted. I initially did not have any problem but I was on antonx's kernel and when you flash with that recovery it would mount properly. What is happening is system isnt getting mounted. So its making a null backup.
The most important thing to do is when you are trying to make a backup of your efs is mount system!
Hi have you tried the updated EFS Pro v1.7.13? It can now automatically detect the mount point of the '/efs' folder for back up and restore. Also many many bug fixes and new code to communicate with adb.exe alot more quickly and efficiently.
Head over to the forum and check it out.
I already solved this problem, but this would seem useful other people with the same problem. But what forums are you exactly referring to?
Sent from my SGH-T959V using XDA
mierkat09 said:
I already solved this problem, but this would seem useful other people with the same problem. But what forums are you exactly referring to?
Sent from my SGH-T959V using XDA
Click to expand...
Click to collapse
This one.
http://forum.xda-developers.com/showthread.php?p=18524176

Problems after encryption

Hi there!
I'm running a bunch of problems after I tried to encrypt my phone.
Long story short: I use JellyTime as ROM, which have not the "encrypt phone" setting available.
By the way I found this Google Issue: http://code.google.com/p/cyanogenmod/issues/detail?id=5678
As you can see in #21, there's a procedure to enlarge the data partition so the system can be encrypted (or better, the option to encrypt would be in the settings menu). Then I tried to encrypt but it failed, asking me to factory reset my device. And I did it (damn).
Now every time I flash a ROM, Home button don't work, and the lock screen disappeared.
It works (home and lock screen working) only restoring a Nandroid backup that I had previously saved.
Is there anybody who can suggest me what to do? I think that the last chance is flashing the stock ruu and then flash again CWM and ROM, but if there exists another method I would be much more happy
This is in the wrong section, you should have posted this in the Q&A, this is the development section.
Either write something worth reading or do something worth writing.
Benjamin Franklin
crap, i got confused! i'm sorry! is it possible to move the thread? or do i have to post another on the right section?
Pm a mod to move it
Either write something worth reading or do something worth writing.
Benjamin Franklin
jugg1es said:
Pm a mod to move it
Either write something worth reading or do something worth writing.
Benjamin Franklin
Click to expand...
Click to collapse
Better use the report button there is a move option
Same problems
I had the same problems, wanted to encrypt my DS to. On every Rooted Rom had this issue.
Perhaps because the base rom which is used is not for the DS.
I wanted to encrypt my DS because of the active sync settings which state that the android phone needs to be encrypted and a PIN needs to be sed.
I am trying to use a program and I like it very much
TouchDown HD (for ICS/JB)
https://play.google.com/store/apps/details?id=com.nitrodesk.honey.nitroid
I am using this ROM
[ROM][22-01-13][Flinny] Andromadus Test builds - CM10.1[12]
http://forum.xda-developers.com/showthread.php?t=2031694
Like this ROM very much, stable and working cam.
U can use TouchDown HD for 30 days completely.
The only downsite is that it has it's own agenda and e-mail.
But I don't mind the own e-mail because I can set my mail to only push mail during buisiness hours.
Love the program so far.
Cheers
j_schipper said:
I had the same problems, wanted to encrypt my DS to. On every Rooted Rom had this issue.
Perhaps because the base rom which is used is not for the DS.
I wanted to encrypt my DS because of the active sync settings which state that the android phone needs to be encrypted and a PIN needs to be sed.
I am trying to use a program and I like it very much
TouchDown HD (for ICS/JB)
https://play.google.com/store/apps/details?id=com.nitrodesk.honey.nitroid
I am using this ROM
[ROM][22-01-13][Flinny] Andromadus Test builds - CM10.1[12]
http://forum.xda-developers.com/showthread.php?t=2031694
Like this ROM very much, stable and working cam.
U can use TouchDown HD for 30 days completely.
The only downsite is that it has it's own agenda and e-mail.
But I don't mind the own e-mail because I can set my mail to only push mail during buisiness hours.
Love the program so far.
Cheers
Click to expand...
Click to collapse
Thanks for the advice mate, but I had to play with encryption not for a personal need, but because of a lecture/exam for my university course of Cryptography II (luckily went very good ) and I needed to perform a demo to attack the encryption.
By the way, after a lot of search, seems that the mess with encryption is caused by the way clockworkmod handles partitions on internal storage, or something like that. That's why if you want to enable it (actually, just for make visible the encrypt option in Security menu!) you have to follow that procedure I linked in the first post (you have to make room for the crypto footer, 16 Kb).
Now, I was lucky to being able to mount my SD card after the failed encryption (if you search in the various threads you realize that this is a common issue after factory resetting), but some problems remained.
For sake of information, I found the solution by myself: I had a Nandroid backup working good made before the encryption, so I restored it (old \data partition layout returned), than wiped \data (and cache) from cwm. After that, I was able to flash every other ROM without problems.
Hope it will be useful!
spiaggefredde said:
Thanks for the advice mate, but I had to play with encryption not for a personal need, but because of a lecture/exam for my university course of Cryptography II (luckily went very good ) and I needed to perform a demo to attack the encryption.
By the way, after a lot of search, seems that the mess with encryption is caused by the way clockworkmod handles partitions on internal storage, or something like that. That's why if you want to enable it (actually, just for make visible the encrypt option in Security menu!) you have to follow that procedure I linked in the first post (you have to make room for the crypto footer, 16 Kb).
Now, I was lucky to being able to mount my SD card after the failed encryption (if you search in the various threads you realize that this is a common issue after factory resetting), but some problems remained.
For sake of information, I found the solution by myself: I had a Nandroid backup working good made before the encryption, so I restored it (old \data partition layout returned), than wiped \data (and cache) from cwm. After that, I was able to flash every other ROM without problems.
Hope it will be useful!
Click to expand...
Click to collapse
Thanks, but I am on HBoot 7.00.1002 and don't have an old data partition. Had the same problem with hboot-0.98.0002 or hboot-6.98.1002.
Anyway I am glad for you that it is working for you

temp root through adb?

Hi guys,
is it possible to gain a temp root through adb?
after upgrading from Android 4 to 6, there are some applications that has been removed.
For example, Microsoft Account application which provide you the 2-step authentication for your accounts.
I can't install it anymore, i keep getting error code: -505
which is probably related to some data already present on the device which it cannot erase.
right now, that there's permission management for application, i don't see any real reason to be rooted.
therefore, my question is if i can remove this specific application data from the data partition without being rooted?
Thanks
I've read since day one of my Android experience that when you upgrade a full version (as opposed to small incrementals) such as Kitkat to Lollipop, or Lollipop to Marshmallow, you should back up, do a full wipe, and reinstall all your apps from scratch. You have upgraded two full versions, so it's not surprising that you're having problems. Rather than messing around with temporary root and deleting from partitions you should be doing it right as I've stated above.
Thanks dahawthrone,
This might work indeed but will take too much time to accomplish.
not really worth it.
Really? You prefer to put up with a broken phone? This is just one symptom of corruption. Who knows how many others there may be? And particularly with something as important as 2-factor authentication...
root ur phone do wht ever u need to do then unroot through super user
and yes u can delete data from data partition using es explorer and after everything is done unroot ur device through super user!
not broken.. just having a difficulties with his specific app
I just solved it.
root was not needed, although, usb debugging mode was mandatory.
through adb:
1. adb uninstall com.microsoft.msa.authenticator
2. adb install com.microsoft.msa.authenticator-2.apk
and we're done, works like a charm!
thanks for all the advice's.

Regarding the state of data backups in Android

Hi Everyone,
I am new to XDA, and I am really proud to be in this community.
I have created this thread to discuss about the current situation with backup of data in Android, as I did not find any thread which covers my specific concerns. This is meant to be part discussion, part rant, part guide, etc.
Now to the actual scenario. I have a Moto G (2014), which used to run stock unrooted 6.0, and I used a combination of Helium (free version), manual file backup, and import/export options from various apps to back up my data. I recently flashed the official 14.1 Lineage OS ROM with GApps Pico and Lineage OS su package to root. All went well, and I could restore the backups as planned. SMS restore did not work, but I did not bother much about that.
Now, if I try to use Helium to backup my apps, it shows me an error. No detail is provided about the error. On digging further into the ADB backup feature (which is the underlying technique for Helium), I found that I can not even backup the data to the .ab files everyone talks about. I came by a blog which advised creating the backup using .adb extension, and it worked for one or two apps. In all probability, .ab has been replaced by .adb files - experts can suggest, I can not find anything online.
Now came the second twist. I wanted to backup a game which does not support cloud save. And it apparently saves the app data in /data/app, which ADB backup probably does not support - again, experts can enlighten me on this. I noticed that apps saving in /data/data were getting backed up, while the /data/app one was not.
Now the question may arise that since I am rooted, I can easily access these backups through file system or Titanium, without the need for ADB backup. But I am really worried about a scenario when I have to buy a new phone (the current one is already running for 3+ years). I am really wary of rooting a new phone and losing the warranty in the process. In such cases, root based backups can not be restored to the new phone. To validate this, I tried to restore a specific save file to my unrooted tablet, but could not get in even using ADB shell (this may seem foolish, but I thought since ADB backup can access /data/data, may be ADB shell too can access the protected partitions).
So, after this long exercise, my finding is that, unless we are rooted, better forget the backup. It makes me very uneasy to know that I can not carry over my progress in a game to another phone because the developer does not support cloud save (even cloud saves are not full proof, but I will rant about that some other day).
Is there something I am missing? Or is this the scenario all over? And if it is, why can't a ten year old platform provide such a basic feature? And finally, if there is some tool/technique which lets me backup/restore data on an unrooted device, please point me to that.
I believe XDA is the only place I can put these questions/rants forward. Thanks for reading.
Please ask your question only in one place :good: I answered you here https://forum.xda-developers.com/showthread.php?t=2717159&p=75474972

Asking for help Blu G90

Forgive if I put this in the wrong section.
Q: my father recently passed away and I'm trying to recover some data that is on his phone. I physically have his phone. Blu G90. Is there a way to bypass or disable the native pin lock?
Usb debug not enabled. Default set to charge only for pc.
Pretty sure wipe at 15 is set so can't brute force.
I have a couple of forensics applications that can see it when it goes to bootloader but then they crash as soon as I try to grab an image or mount /system.
I'm literally begging for any assistance I can get.
Thanks in advance
AntiMatter2112 said:
Forgive if I put this in the wrong section.
Q: my father recently passed away and I'm trying to recover some data that is on his phone. I physically have his phone. Blu G90. Is there a way to bypass or disable the native pin lock?
Usb debug not enabled. Default set to charge only for pc.
Pretty sure wipe at 15 is set so can't brute force.
I have a couple of forensics applications that can see it when it goes to bootloader but then they crash as soon as I try to grab an image or mount /system.
I'm literally begging for any assistance I can get.
Thanks in advance
Click to expand...
Click to collapse
Since the device is locked (bootloader locked) so the permissions to change/modifiy/copy something into phone cannot obtain the internal storage files.
Only unlocking bootloader and for it is need format phone as internal storage so the device erasing all files. The pin lock can remove with adb-fastboot commands or TWRP.
But again, with locked bootloader, without chance to have internal files.
DragonPitbull said:
Since the device is locked (bootloader locked) so the permissions to change/modifiy/copy something into phone cannot obtain the internal storage files.
Only unlocking bootloader and for it is need format phone as internal storage so the device erasing all files. The pin lock can remove with adb-fastboot commands or TWRP.
But again, with locked bootloader, without chance to have internal files.
Click to expand...
Click to collapse
thanks for the reply. i was afraid of that. even after factory reset, if i root, theres a chance at partial data recovery? or is it completely gone?
AntiMatter2112 said:
thanks for the reply. i was afraid of that. even after factory reset, if i root, theres a chance at partial data recovery? or is it completely gone?
Click to expand...
Click to collapse
You can try an official unlock. Maybe it can have some result or maybe not. Trying is the attitude.
Write Google support and try to legally show some death certificate and supporting documents over your father's phone number. Write down the situation and wait for some response from them.
The only practical way would be to try a backup of the internal partition. But it depends on your knowledge with Smart Phone Flash Tool. Also you must know how to "cut" the file in the right parts.
There would be a very small possibility of restoring the internal files with a backup of userdata or in its entirety (called ROM_1).
The next step would be to unlock the phone, install TWRP and restore the file made from userdata.
Perhaps at that point you have a 1% chance of removing the PIN and booting the device without a password.
But this should only be done if Google gives you a negative answer.
Another way is with carrier company. But I think help in nothing.
Understand that despite having a userdata file with PIN, there is encryption involved and that is what makes the whole process difficult.
I know the TWRP made for BLU G90 has active decryption. But I don't know how it will behave with a userdata file made with stock ROM.
Unfortunately there is no guarantee that files like photos, docs, etc can be in userdata as this refers to internal storage. Already userdata is in ROOT storage.
So even if there is an application or software capable of restoring files, there is also the possibility that it will not be successful or have corrupted files. This will depend on your choice and risk carrying out the process.
DragonPitbull said:
You can try an official unlock. Maybe it can have some result or maybe not. Trying is the attitude.
Write Google support and try to legally show some death certificate and supporting documents over your father's phone number. Write down the situation and wait for some response from them.
The only practical way would be to try a backup of the internal partition. But it depends on your knowledge with Smart Phone Flash Tool. Also you must know how to "cut" the file in the right parts.
There would be a very small possibility of restoring the internal files with a backup of userdata or in its entirety (called ROM_1).
The next step would be to unlock the phone, install TWRP and restore the file made from userdata.
Perhaps at that point you have a 1% chance of removing the PIN and booting the device without a password.
But this should only be done if Google gives you a negative answer.
Another way is with carrier company. But I think help in nothing.
Understand that despite having a userdata file with PIN, there is encryption involved and that is what makes the whole process difficult.
I know the TWRP made for BLU G90 has active decryption. But I don't know how it will behave with a userdata file made with stock ROM.
Unfortunately there is no guarantee that files like photos, docs, etc can be in userdata as this refers to internal storage. Already userdata is in ROOT storage.
So even if there is an application or software capable of restoring files, there is also the possibility that it will not be successful or have corrupted files. This will depend on your choice and risk carrying out the process.
Click to expand...
Click to collapse
Thanks for the reply. Google was pretty useless. They told me to contact Blu and Blu said to contact Google. I successfully hard reset and root. Went through setup to try a restore from his drive backup and it wanted the unlock pin in order to restore. Google was again quite useless. Since this is a matter if his estate i served Google with a notice of preservation on the backup, since it expires pretty soon. I'm going to try next to roll back to an older version, before the unlock pin requirement to restore Google backup. Grabbed a cellebrite image earlier so I can mess around with it later tonight. I'm hoping that because of the unlock requirement that the pin file is still there after reset.

Categories

Resources