[Q] Access to /data folder without losing data - Nexus 4 Q&A, Help & Troubleshooting

Hi
I recently got a Nexus 4 after always having had iPhone, so I am quite new to this. =)
Is it possible to root a Nexus 4 without losing the data folder? Either by simply never deleting it or is there any way to get a backup of everything in the data folder(including hidden files and everything in /data/app, etc.) to my computer(windows or mac), when it isin't rooted?
All the rooting guides I have looked at until now says that they will wipe the phone, but I also read a discussion that said it were possible to gain complete access to the data folder by either manually rooting the phone or by not unlocking the bootloader? I posted somewhere else and someone there said that what I want is SU in the OS, but I am not sure about that, since I haven't heard more.
Thank you =)

You can root without wiping data. The trick is to not boot into Android after unlocking bootloader. You do things like this:
1. Setup your pc ( drivers, fastboot )
2. Unlock your bootloader
From now on, you must not boot normally, or else your phone will be wiped.
3. Flash a custom recovery.
4. Enter recovery
5. Wipe cache
6. Flash the SuperSu zip to root.
7. Reboot.
Now you should be rooted, and your data should not be wiped. But I'd make a backup is I were you.
Being a new user, try reading this:
http://forum.xda-developers.com/showthread.php?t=2367406

Related

three questions about Nexus 6P

hi guys,
please i have some questions i really need there answers:
1- (rooted phone) if i do a factory data reset will the root gone and the TWRP also ?
2- (rooted phone) is there a way to install an update if i got it ( like update security patches "monthly" ) on rooted phone without wipe data or loosing the root or TWRP?
3- (rooted phone) if i reinstall the factory image full,the root and TWRP will have gone or not ?
thanks a lot !
1. If you use systemless root a factory reset will remove it. If you use a root method that modifies the system partition a factory reset won't remove root. Factory resets will not remove TWRP.
2. Installing monthly security updates and keeping TWRP, root, and data can be done by manually installing the update using fastboot and doing the following:
-Systemless root method: flash everything EXCEPT the recovery, boot, and userdata images.
-System based root method: install everything EXCEPT the recovery and userdata images. You will have to reflash Superuser/SuperSU (whichever you prefer) in TWRP since flashing the system image will remove root. There's no way around this.
3. If you use fastboot to install everything included in a factory image you will lose root, data, and TWRP.
Face_Plant said:
1. If you use systemless root a factory reset will remove it. If you use a root method that modifies the system partition a factory reset won't remove root. Factory resets will not remove TWRP.
2. Installing monthly security updates and keeping TWRP, root, and data can be done by manually installing the update using fastboot and doing the following:
-Systemless root method: flash everything EXCEPT the recovery, boot, and userdata images.
-System based root method: install everything EXCEPT the recovery and userdata images. You will have to reflash Superuser/SuperSU (whichever you prefer) in TWRP since flashing the system image will remove root. There's no way around this.
3. If you use fastboot to install everything included in a factory image you will lose root, data, and TWRP.
Click to expand...
Click to collapse
Could you explain me what are the difference between systemless root method and system based root method, in order to get know what is it the method that I used
Chouiyekh said:
Could you explain me what are the difference between systemless root method and system based root method, in order to get know what is it the method that I used
Click to expand...
Click to collapse
If you are running Marshmallow or Nouget and used a version of SuperSU that is a year or less old it does system less root by default.
You can flash OTA updates on a rooted device with FlashFire without using a computer.
You can also flash an OTA image in TWRP and then simply flash root after, before you boot the phone. If the phone boots without root, out will wipe TWRP and leave you with stock recovery.
But honestly, from the questions being asked, you might not want to try this stuff until you understand it better. Losing root and TWRP is not a big deal. You can flash them again in about 1min and 30 seconds, so it's not worth worrying about.
Sent from my Nexus 6P using Tapatalk
Why would factory reset remove systemless root? I expect factory reset to only reset what you're supposed to have changed since factory image. That is /data.
Systemless must be in /data if it's not in /system, right? I don't really know much about systemless, because I don't use Android pay, Snapchat or play children's games haha.
But my guess is that if it's not touching system, then it must be in data, so wiping data would remove it. But I'm just guessing.
Sent from my Nexus 6P using Tapatalk
HikingMoose said:
You can also flash an OTA image in TWRP and then simply flash root after, before you boot the phone. If the phone boots without root, out will wipe TWRP and leave you with stock recovery.
But honestly, from the questions being asked, you might not want to try this stuff until you understand it better. Losing root and TWRP is not a big deal. You can flash them again in about 1min and 30 seconds, so it's not worth worrying about.
Sent from my Nexus 6P using Tapatalk
Click to expand...
Click to collapse
thank you, i got it easily because i'm not a beginner i have some experience
HikingMoose said:
Systemless must be in /data if it's not in /system, right?
But my guess is that if it's not touching system, then it must be in data, so wiping data would remove it. But I'm just guessing.
Click to expand...
Click to collapse
You guessed right. Never thought of that, thought it was actually all done from boot partition.
Quoting Chainfire:
As the binaries should still be updatable, and we don't know the space we have available in the boot image itself, we're mounting a (writable) ext4 image with /su as mount point from /data, and modifying PATH accordingly. Interestingly, for reasons yet unknown to me, if the image is mounted r/o by init, later remounting it r/w causes a bunch of issues. So we're keeping it r/w (for root) for now.

Unable to understand decryption

Hi
I am unable to understand the concept of Decryption. I have been rooting my phone since the time of Samsung S3. I currently own a 64gb Nexus 6p with build number N4F26T. I use the sticky guide given here to root my phone and install custom recovery.
Now I want to apply pixel mods, but they demand verity check disabled. When I go in the security of my phone, it says Phone Encrypted in Encryption. I have checked all of the threads and forums regarding this but there is no clear guideline.
Do I have to decrypt my data? If yes, how will I be going on with this process? I see the format user data command but I am on Nougat 7.1.1 so I think this is not applicable to me. But no where has it been mentioned that I have to decrypt any other way.
Any help would be appreciated as I have always received from this community. How will I go on about the decryption? Please help soon as I currently have no data in it so its easier to format it.
You do not have to decrypt your data to use those MOD's. To disable variety check all you need to do is install a custom kernel or rom that does this by default. You will not lose any data by doing this. If you wanted to decrypt your data then you would have to format the data partition on your phone. This would obviously wipe your data so you would need to make a backup first on your PC. Some people think that decrypting your data will give you a slight speed bump but I've tried both ways and haven't noticed any real difference. So far I haven't run into any reason that the data partition would need to be decrypted to install anything.
This is a Question, so you are supposed to post in the Q/A section, not General.
First, you can't just decrypt the existing data on the phone, you'll have to wipe the device first and then NOT allow the encryption to happen on your fresh install. Make sure you already have USB debugging enabled. You need to perform a factory reset to wipe the phone. Then transfer from your PC either SuperSU (zipfile) or a no force-encrypt custom kernel such as EX Kernel or Franco (zipfile) to the root of the phone (or both). You can do this with TWRP's file manager. Before booting for the first time use TWRP's "Install" to flash either SU or your kernel. Now you can boot to system and your device will not be encrypted by default. Going forward with any updates that include flashing a new boot.img you need to reflash SU or the kernel (before booting) to avoid encryption.
First of all apologies about posting in the wrong section. Secondly, I have already rooted with Supersu. So now all I need to do is format the user data and I will have decrypted data right? It won't again get encrypted, right?
Secondly, thanks alot for such prompt responses. I am unable to find the thanks button that used to be there.

I have a few questions

I am newbie to Android/Rooting and I would like to root my P10 Plus, but I am having a few questions because I have rooted my P10 Plus before and the entire OS got wiped somehow, and I had to pay about 100 USD to get my phone replaced, so my questions are:
1. TWRP doesn't work for backing up DATA, so what is exactly stored in DATA?
2. Can I restore from a backup if I got my entire system wiped somehow?
3. What apps can harm my device because of the DATA encryption issue?
4. Can I use KangVIP ROM if I had my entire system wiped?
5. Is it safe to use KangVIP ROM?
6. Can I lock my bootloader after rooting?
7. Can I hide the "open bootloader" message, to keep my warranty?

Stuck in boot loop, how can I save my app data?

OK, I played with Titanium Backup and removed some Samsung apps like S health... Now I am stuck at boot loop and phone wont start. I am on stock rom 6.01 rooted. tried everything I could read:
- installed TWRP - did not quite work, gave me an error "is not seadroid"
- installed CWM - I can boot into it, but not much I can do to fix the boot, I tried wiping the partition cache and dalvik, but not help
- installed root again with stock recovery, nothing..
If I install the latest version of stock firmware, will I loose my app data? All I care about is to preserve my notes from ColorNote I read somewher that if a rom does not have userdata img, it wont wipe. Does the stock firmware have that? I am just looking for a way to get back in, backup stuff, and then reflash properly.
I tried going the adb route, but nothing there either. In cmd it says now unlock your phone for the pull command to compete, which obviously I cannot do.
Any other options to save my ColorNotes and Pictures?
OK, I was able to execute:
adb pull / C:\Myfile
This copied system files pretty much. How do I copy the app data or personal data - that's what I actually need
Got lucky...
I had to flash the latest stock firmware, but because I was running it anyway, just not the latest security patch, I the system ended up upgrading and all my files were preserved. It is as if I simply got the monthly patch.

First time ever installing a custom ROM. I have some questions. Moto G5 Plus stock.

I have a completely stock Moto G5 Plus (XT1683 - 2GB of RAM) on stock Oreo 8.1 and I want to use the Pixel Experience 10. I've watched some tutorials online but I still have some questions:
1. I've seen many people complaining that they lost their IMEI and 4G, but I still couldn't figure out if that only happened with people that downgraded from a custom Oreo rom to a stock Nougat or if there's a chance of that happening by installing any custom ROM. My phone has the latest official Oreo version and I've never messed with the system before. Is my phone still at risk of losing its IMEI if I install Pixel Experience 10? What did those people do wrong?
2. Now let's talk about the procedures I have to take. After unlocking the bootloader it will wipe my system, right? If that's so, should I let it boot again into Android and turn off or should I immediately get into fastboot and flash TWRP? Will it make a difference? Will the persist and efs partitions be there on TWRP to be backed up or do I need to let Android boot so it can make them first?
3. After everything, if I get into TWRP and it asks for a password, should I just cancel and wipe the partitions to remove the encryption (can I keep the internal storage?) or do I need to install that dm-verity file instead? As I understand the dm-verity if only for when rooting the phone while keeping the stock system, right? (I don't plan to root my phone, only install a custom ROM. It would also be good if I could keep my files, but if I can't, that's fine too.)
My original plan was the following, please take a look to see if i'll do things correctly.
1. Unlock the bootloader
2. Install TWRP immediately, before it even has a chance to restart
3. If TWRP asks for a password, skip and wipe all the partitions, if it doesn't, wipe them anyway to install the new ROM.
4. Backup efs and persist to my SD Card (will they even be there after I wipe the partitions?)
5. Right after that install the custom ROM
6. Reboot, not get into a bootloop and still have my IMEI. Profit.
Is everything right or did I misunderstand something?
Thanks!
Raploz said:
I have a completely stock Moto G5 Plus (XT1683 - 2GB of RAM) on stock Oreo 8.1 and I want to use the Pixel Experience 10. I've watched some tutorials online but I still have some questions:
1. I've seen many people complaining that they lost their IMEI and 4G, but I still couldn't figure out if that only happened with people that downgraded from a custom Oreo rom to a stock Nougat or if there's a chance of that happening by installing any custom ROM. My phone has the latest official Oreo version and I've never messed with the system before. Is my phone still at risk of losing its IMEI if I install Pixel Experience 10? What did those people do wrong?
2. Now let's talk about the procedures I have to take. After unlocking the bootloader it will wipe my system, right? If that's so, should I let it boot again into Android and turn off or should I immediately get into fastboot and flash TWRP? Will it make a difference? Will the persist and efs partitions be there on TWRP to be backed up or do I need to let Android boot so it can make them first?
3. After everything, if I get into TWRP and it asks for a password, should I just cancel and wipe the partitions to remove the encryption (can I keep the internal storage?) or do I need to install that dm-verity file instead? As I understand the dm-verity if only for when rooting the phone while keeping the stock system, right? (I don't plan to root my phone, only install a custom ROM. It would also be good if I could keep my files, but if I can't, that's fine too.)
My original plan was the following, please take a look to see if i'll do things correctly.
1. Unlock the bootloader
2. Install TWRP immediately, before it even has a chance to restart
3. If TWRP asks for a password, skip and wipe all the partitions, if it doesn't, wipe them anyway to install the new ROM.
4. Backup efs and persist to my SD Card (will they even be there after I wipe the partitions?)
5. Right after that install the custom ROM
6. Reboot, not get into a bootloop and still have my IMEI. Profit.
Is everything right or did I misunderstand something?
Thanks!
Click to expand...
Click to collapse
Answer for your questions
1) losing of IMEI no is possible on custom ROM too, but taking the backup of EFS and persist will retrieve them, so no problem. And losing of IMEI is random occur when moving from one rom to other.
2) just let the android boot once, so everything get loads up with unlock bootloader (no need to setup).
3)after installing the twrp, it won't ask for password since your device got format when unlocking bootloader, so it won't ask. If you want to remove encryption then format< type yes. It will remove your encryption.
4) for talking backup of EFS and persist use this method.
Code:
Use the following command to create a backup and save it at /sdcard/persist.img:
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
To restore use the following command:
dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist
If you have saved a backup using different name then use that name instead.
And seeing your plan, everything seem good, you can continue with your plan.
Note:- for some user PE won't work for them with 2gb version, so I suggest you to take a backup of stock ROM or keep an other rom file in case it needed.

Categories

Resources