[Q] Flashing N4 from stock to Paranoid Android - Nexus 4 Q&A, Help & Troubleshooting

I wonder whether it's possible to manually flash PA without touching the /data partition. I used to do it to manually when updating factory ROMs because I couldn't update OTA. I would have backed up all apps and data but Nexus 4 doesn't have external memory card slot and I already ran out of space for a complete back up.
By manual flash I mean unpack the ROM and flash each section one by one using command line.
I understand backing up is very important. But there seems no good solution. Is there a way to back up all data, I mean all - photos and app data both internal and external - when I am still running factory and restore all data once I flash to PA? What are the commands I need to use?

Related

[Q] Newbie questions (don't kill me Im new!)

Hy there I love xda and im a new user to xda nexus forum
With excelent guides I learnt how to root unlock and install custom rom (quite easy let it down into your internal storage and install from zip)
but I have few questions..
When I tried to wipe data and cache I accidentally did factory reset which ended up in no installed rom, internal storage empty and I was in custom recovery and I couldn't connect to computer, so I had to start from 0... last times I've been selecting wipe data and cache.. but I seen that in my nexus 7 some old files are still there (under a folder called 0) What should I do to make a clean install? which option of the new recovery should I choose? thankyou
mariosanoguera said:
Hy there I love xda and im a new user to xda nexus forum
With excelent guides I learnt how to root unlock and install custom rom (quite easy let it down into your internal storage and install from zip)
but I have few questions..
When I tried to wipe data and cache I accidentally did factory reset which ended up in no installed rom, internal storage empty and I was in custom recovery and I couldn't connect to computer, so I had to start from 0... last times I've been selecting wipe data and cache.. but I seen that in my nexus 7 some old files are still there (under a folder called 0) What should I do to make a clean install? which option of the new recovery should I choose? thankyou
Click to expand...
Click to collapse
Use TWRP for recovery and to do a clean install wipe all data from TWRP.
Sent from my Nexus 7 using xda premium
mariosanoguera said:
Hy there I love xda and im a new user to xda nexus forum
With excelent guides I learnt how to root unlock and install custom rom (quite easy let it down into your internal storage and install from zip)
but I have few questions..
When I tried to wipe data and cache I accidentally did factory reset which ended up in no installed rom, internal storage empty and I was in custom recovery and I couldn't connect to computer, so I had to start from 0... last times I've been selecting wipe data and cache.. but I seen that in my nexus 7 some old files are still there (under a folder called 0) What should I do to make a clean install? which option of the new recovery should I choose? thankyou
Click to expand...
Click to collapse
I'd flash a stock recovery image onto your device available here which would restore your device completely back to stock (with your bootloader unlocked) From there I'd just re root and do what you want. However I'd personally use CWM Touch Recovery myself, but I just like that recovery more (have used it and the non-touch version for ages and on many devices)
smt8544 said:
I'd flash a stock recovery image onto your device available here which would restore your device completely back to stock (with your bootloader unlocked) From there I'd just re root and do what you want. However I'd personally use CWM Touch Recovery myself, but I just like that recovery more (have used it and the non-touch version for ages and on many devices)
Click to expand...
Click to collapse
I actually have Team Win Recovery Project..
under wipe I can find
Cache
Dalvik
Factory Reset (This is the one I use.. but It leaves in my internal storage with a folder called 0 and my old data from previous roms is stored there)
System
External Storage
Int. Storage ?
Format Data (I did this and I lost everything except TWRM which I could boot at it (but I had no option to install from zip neither couldnt transferr a file through usb mount sd card didn't work))
Which one of all of this should I run before doing the install zip from sd card?
mariosanoguera said:
I actually have Team Win Recovery Project..
under wipe I can find
Cache
Dalvik
Factory Reset (This is the one I use.. but It leaves in my internal storage with a folder called 0 and my old data from previous roms is stored there)
System
External Storage
Int. Storage ?
Format Data (I did this and I lost everything except TWRM which I could boot at it (but I had no option to install from zip neither couldnt transferr a file through usb mount sd card didn't work))
Which one of all of this should I run before doing the install zip from sd card?
Click to expand...
Click to collapse
I think it would be easier and cleaner if you restored back to stock before trying to re root, flash recovery, etc. If you have no important data on your device I'd go for it. If you do have important data, then try and pull it to your computer and then flash a stock image and re root etc.
I always find that in times when my device is screwing around, or I have file dregs around the place, I find it simply easier to backup important things and flash a stock image.

[Q] partitions messed up

Ive been flashing for a while now. Just recent my phone got stuck on the "Galaxy S4" screen amd I had to restart like 15 times and reflash a few times before it booted into the rom. Now I see that I only have 3.5GB of internal space left. Even off od a fresh flash with a complete format. I even fomatted all data in TWRP amd all that. How do I get my space back?
Do I use odin and check off the repartition tab?
Sent from my SGH-I337M using xda app-developers app
Do not mess with odin and check repartition. This will do nothing but brick your phone. If any thing, use your custom recovery and format storage, but be prepared to lose everything. First find out what's taking up all the space.
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
I've heard of problems after formatting /data in twrp on this device. You may consider flashing back to stock and starting over
Keep in mind that the total internal storage available includes your /data partition as well as your internal SDCard (/data/media/). TWRP will not format your internal SDCard unless you explicitly tell it to. Check out the stuff on your SDCard and see if it's eating up space (like a nandroid backup for example that can take up over 2.5gb of space!)
If still unresolved, I would do these steps:
- Backup your internal SDCard to your computer, and otherwise backup everything (nandroid, data backup, what-have-you) to your computer
- Do a simple wipe-data with TWRP
- Use Odin to return to MDL stock (or Canadian equivalent)
- Use stock recovery to wipe your data (this should also wipe SDCard)
- Root with motochopper, install custom recovery, install rom, etc.
To avoid accidentally downloading any OTA updates, I would recommend simply removing your SIM card during all this
Aou said:
Keep in mind that the total internal storage available includes your /data partition as well as your internal SDCard (/data/media/). TWRP will not format your internal SDCard unless you explicitly tell it to. Check out the stuff on your SDCard and see if it's eating up space (like a nandroid backup for example that can take up over 2.5gb of space!)
If still unresolved, I would do these steps:
- Backup your internal SDCard to your computer, and otherwise backup everything (nandroid, data backup, what-have-you) to your computer
- Do a simple wipe-data with TWRP
- Use Odin to return to MDL stock (or Canadian equivalent)
- Use stock recovery to wipe your data (this should also wipe SDCard)
- Root with motochopper, install custom recovery, install rom, etc.
To avoid accidentally downloading any OTA updates, I would recommend simply removing your SIM card during all this
Click to expand...
Click to collapse
:good:

[Q] Cleaning out the main storage/new beginning

I am about to give my AT&T Samsung GS4 a new beginning. I have had issues with my current stock ROM and restoring to a previous recovery is giving me issues. I am ready for a new start. The device is rooted, and I have TWRP 2.6.3.0 installed. I don't mind switching to CWM (Jeboo v1.1 is already on my flash list). I am leaning toward Graviton 1.4 ROM. Maybe Goldeneye.
I have just over 2 GB free on my internal storage, which I see getting used up pretty quick with photos of kids and other stuff. I have looked into a few folders, not knowing if they are important. I would like a fresh start with a new ROM and a clean internal storage. I'm even starting anew with a new empty SD card.
What can I do to clean out this internal storage and still keep TWRP (or CWM) recovery intact so I can install a new ROM? My goal is to have a fresh start on a new ROM with no junk files in the internal. Will wiping the internal storage from recovery wipe out my recovery?
In the interest of avoiding catastrophic meltdown and loss of everything, I have indeed made a copy of my internal drive, the sd card, and a few Nandroid backkups, which are all stored on a flash and/or PC.
Device config: Rooted stock ROM, UCUAMDL, stock kernel 3.4.0-453947.
duckredbeard said:
I am about to give my AT&T Samsung GS4 a new beginning. I have had issues with my current stock ROM and restoring to a previous recovery is giving me issues. I am ready for a new start. The device is rooted, and I have TWRP 2.6.3.0 installed. I don't mind switching to CWM (Jeboo v1.1 is already on my flash list). I am leaning toward Graviton 1.4 ROM. Maybe Goldeneye.
I have just over 2 GB free on my internal storage, which I see getting used up pretty quick with photos of kids and other stuff. I have looked into a few folders, not knowing if they are important. I would like a fresh start with a new ROM and a clean internal storage. I'm even starting anew with a new empty SD card.
What can I do to clean out this internal storage and still keep TWRP (or CWM) recovery intact so I can install a new ROM? My goal is to have a fresh start on a new ROM with no junk files in the internal. Will wiping the internal storage from recovery wipe out my recovery?
In the interest of avoiding catastrophic meltdown and loss of everything, I have indeed made a copy of my internal drive, the sd card, and a few Nandroid backkups, which are all stored on a flash and/or PC.
Device config: Rooted stock ROM, UCUAMDL, stock kernel 3.4.0-453947.
Click to expand...
Click to collapse
Reset Flash Counter
http://www.youtube.com/watch?v=2FXULkN5rAU
Reflash Stock
http://www.youtube.com/watch?v=ZpdWLPaJpiQ
What is the purpose of resetting the flash counter? As far as I know my bootloader is still locked.
Returning to stock? Wont i ose root and recovery? Wont I risk ending up with MF3 instead of the MDL that can be rooted?
On-On and Beer Near
If you've got everything backed up, a nandroid, the new ROM, a custom kernel (if you so desire) and the loki-doki zip (if not flashing a loki'd ROM or kernel) all on your micro SD card, then you're ready to begin.
In recovery, wipe everything except the external sd card. I've heard of users having problems after wiping/formatting data in twrp. May want to look into that. I think some users reverted to an older version of TWRP to avoid that. I use cwm. Check out the I337 guide in my signature. It details everything to wipe for a clean slate (system, data, etc).
Cheers
I have one each of a TWRP and CWM backup and recovery. Can a CWM be restored in TWRP?
On-On and Beer Near
duckredbeard said:
I am about to give my AT&T Samsung GS4 a new beginning. I have had issues with my current stock ROM and restoring to a previous recovery is giving me issues. I am ready for a new start. The device is rooted, and I have TWRP 2.6.3.0 installed. I don't mind switching to CWM (Jeboo v1.1 is already on my flash list). I am leaning toward Graviton 1.4 ROM. Maybe Goldeneye.
I have just over 2 GB free on my internal storage, which I see getting used up pretty quick with photos of kids and other stuff. I have looked into a few folders, not knowing if they are important. I would like a fresh start with a new ROM and a clean internal storage. I'm even starting anew with a new empty SD card.
What can I do to clean out this internal storage and still keep TWRP (or CWM) recovery intact so I can install a new ROM? My goal is to have a fresh start on a new ROM with no junk files in the internal. Will wiping the internal storage from recovery wipe out my recovery?
In the interest of avoiding catastrophic meltdown and loss of everything, I have indeed made a copy of my internal drive, the sd card, and a few Nandroid backkups, which are all stored on a flash and/or PC.
Device config: Rooted stock ROM, UCUAMDL, stock kernel 3.4.0-453947.
Click to expand...
Click to collapse
You have the answers already, but I will advice one thing, do not do any twrp over version 2.5.0.2, or you will for sure be starting over again at some point. Those versions have issues.
good luck.
TheAxman said:
You have the answers already, but I will advice one thing, do not do any twrp over version 2.5.0.2, or you will for sure be starting over again at some point. Those versions have issues.
good luck.
Click to expand...
Click to collapse
TWRP 2.6.0.0 is why we are having this conversation...
I have TWRP on my Asus TF700 tablet...not sure which version. Perhaps I need to get CWM on that device also.
Now I'm thinking the SD card that I was using at the time was the problem. I have not been able to write any files to that card using a PC. I have found another card from a different manufacturer. I have clockworkmod installed. My sd card contains recovery files and a new ROM.
I think all I need to do now is go into recovery, wipe everything including internal storage but not the external SD. Flash the new rom and kernel then reboot.
I believe this is all I need to do. Sound good to you?
On-On and Beer Near

TWRP backup question

If I backup my system on tw recovery, and flash a new rom, will wiping my phone delete the tw recovery backup in case I have to restore my phone? Feel free to correct me on this, but to my understanding teamwin has it's own partition, and wiping does not mess with this partition?
matthewbhass said:
If I backup my system on tw recovery, and flash a new rom, will wiping my phone delete the tw recovery backup in case I have to restore my phone? Feel free to correct me on this, but to my understanding teamwin has it's own partition, and wiping does not mess with this partition?
Click to expand...
Click to collapse
I think TWRP backups are normally stored on your internal storage partition, so if you perform a (EDIT full factory reset doesnt wipe this, thanks Silesh) or wipe your internal storage, your backups will be erased too. The TWRP itself does install to the recovery partition (which will only be affected by a flash to the recovery, which a wipe will not perform), you're correct on that but the backups are held separately to that. You can copy your backups to another computer or SD card, I found my backup under /SDcard/TWRP/BACKUPS - you could either copy the folder with a root browser or use the ADB pull command (with the ADB terminal), though the TWRP backup may not show on a Windows desktop even if it's been copied correctly. However, if copied back to your phone, the TWRP backup should function.
Edit: thanks Silesh for correcting me, I was thinking of app data rather than user data!
echo92 said:
I think TWRP backups are normally stored on your internal storage partition, so if you perform a full factory reset or wipe your internal storage, your backups will be erased too. The TWRP itself does install to the recovery partition (which will only be affected by a flash to the recovery, which a wipe will not perform), you're correct on that but the backups are held separately to that. You can copy your backups to another computer or SD card, I found my backup under /SDcard/TWRP/BACKUPS - you could either copy the folder with a root browser or use the ADB pull command (with the ADB terminal), though the TWRP backup may not show on a Windows desktop even if it's been copied correctly. However, if copied back to your phone, the TWRP backup should function.
Click to expand...
Click to collapse
Thanks for replying. I can't transfer files from my computer to my phone, but I have thought about using the ADB sideload option from recovery. Is there a way that I can move my backup from my phone to my computer (and to my phone from my computer) using the sideload option, just in case I need the backup? I refuse to flash a new ROM without access to my complete backup, lol.
Internal storage is not formatted during a normal wipe. You have to specifically go into the advanced wipe and select internal storage to wipe it completely. So there is no issue while flashing a new rom if you don't choose the advanced wipe option.
You could also create the twrp backup in your external sdcard. That way your backup stays even if you wipe your phone using a factory reset or by mistake.
Strange. What's the problem of making backups to external SD? The function is right there (as Silesh mentioned). BTW: the very last version of TWRP is able to make backups straight to pc. This needs to be done FROM a pc though. TWRP is capable to work with fastboot now (using special command though, or with this GUI for pc: https://forum.xda-developers.com/android/software-hacking/tool-twrp-backup-restore-tool-pc-t3572241 )
You can choose whether you want to use internal storage or SD card when making a backup. It doesn't matter which you choose as long as you (and I learned this the hard way) pay attention to what you are doing and DO NOT WIPE internal storage or your SD card. Advantages of SD card is you won't lose your backup if you decide to flash stock. Disadvantage: if your card craps out on you backup is lost unless you have copied to PC or saved on cloud.
My Solution
I solved my problem by using the pull command in adb. Now if I decide to flash a new ROM, I can push my TWRP recovery back to my phone using adb and then recover it in my TWRP recovery.. I also backup using adb backup which backs it up directly to my computer anyways.
I knew about storing my TWRP backup on an sd card, but I haven't made time to get one. . I recently switched to the Motorola G4 Plus after my iPhone 6s decided to turn off and not turn back on. I eventually grew tired of the iPhone anyways due to lack of accessibility and freedom. Back in the day I owned androids but never rooted one or had one that was rooted. I did jailbreak my 4th generation iPod a few years ago. But I went through an iPhone 5s, and upgraded to a 6s and had that for a few months. I eventually just switched back to android after the longest time and I can't say that I regret it.
My Moto G4 Plus has been an amazing phone. I've only had it for a few weeks now, but I rooted it the day after I got it . So I'm a bit of a noob in the rooting community, . Since then it's been a pretty smooth transition. I've only got root access and xposed framework as of now. I was thinking about flashing a ROM so I made backups just in case, but I don't plan on making any major changes to the kernel or flashing another ROM. I'm satisfied with the stock ROM since Motorola pretty much made it as minimal as possible. I would recommend this phone to anyone. It's the most solid phone I've had yet.

file corruption.

hi, i have a sm-t510 with android 9, and im trying to install twrp but everytime i try i get some kind of wierd file corruption. all my files in sdcar are named with random numbers and letters and there is nothing in it. the tablet boot normaly, but i cant install anything or acces any of my normal file. is there anyway to fix that, or does anyone has a data back up i can use for that version XAC-T510XXU2ASK5. thank you.
cwarrow said:
hi, i have a sm-t510 with android 9, and im trying to install twrp but everytime i try i get some kind of wierd file corruption. all my files in sdcar are named with random numbers and letters and there is nothing in it. the tablet boot normaly, but i cant install anything or acces any of my normal file. is there anyway to fix that, or does anyone has a data back up i can use for that version XAC-T510XXU2ASK5. thank you.
Click to expand...
Click to collapse
Didn't read the instructions very carefully, now did you? The very FIRST thing you need to do when booting to TWRP is to FORMAT THE DATA PARTITION. Not wipe, but FORMAT. The data partition is encrypted and TWRP can't read it. That is why everything looks weird. Also, that is why you need to backup any pictures, downloads or anyting else you want to save because formating the partition will erase EVERYTHING and not just system stuff that wiping deletes.
lewmur said:
Didn't read the instructions very carefully, now did you? The very FIRST thing you need to do when booting to TWRP is to FORMAT THE DATA PARTITION. Not wipe, but FORMAT. The data partition is encrypted and TWRP can't read it. That is why everything looks weird. Also, that is why you need to backup any pictures, downloads or anyting else you want to save because formating the partition will erase EVERYTHING and not just system stuff that wiping deletes.
Click to expand...
Click to collapse
I have been rooting phones and tablet for the past 10 years its the first time it happens. Maybe its something new. Thanks for the info. But i already format the data and evwrything disapeared beside a file named twrp. And i cant reatore the data, cause i didnt have twrp to back them up. So if you have another sugestion, i am all ear
cwarrow said:
I have been rooting phones and tablet for the past 10 years its the first time it happens. Maybe its something new. Thanks for the info. But i already format the data and evwrything disapeared beside a file named twrp. And i cant reatore the data, cause i didnt have twrp to back them up. So if you have another sugestion, i am all ear
Click to expand...
Click to collapse
My post pointed out that formatting would erase everything and that you should backup prior to doing it. And there are several other methods of backing up data and apps besides TWRP. Yes, it leaves the data partition blank, but flashing a ROM and gapps will put the directories back. Of course, they will still be empty. If you used a Google Account, then that should have at least backed up your apps and some settings. When you setup a new ROM, it should let you restore them.
BTW, yes it was the first time it happened for most of us. Samsung keeps trying to improve "security" and adding encryption, by default, to the data partition is in all of their new tablets and phones.
lewmur said:
My post pointed out that formatting would erase everything and that you should backup prior to doing it. And there are several other methods of backing up data and apps besides TWRP. Yes, it leaves the data partition blank, but flashing a ROM and gapps will put the directories back. Of course, they will still be empty. If you used a Google Account, then that should have at least backed up your apps and some settings. When you setup a new ROM, it should let you restore them.
BTW, yes it was the first time it happened for most of us. Samsung keeps trying to improve "security" and adding encryption, by default, to the data partition is in all of their new tablets and phones.
Click to expand...
Click to collapse
my point is that i want to keep the stock rom, i was able to install a costum rom no problem after. but it doesnt work with the stock rom
cwarrow said:
my point is that i want to keep the stock rom, i was able to install a costum rom no problem after. but it doesnt work with the stock rom
Click to expand...
Click to collapse
You can't backup a stock ROM with TWRP because it can't handle the encryption. But you can use TWRP to root a stock ROM. In that case you just ignore the wierd internal data and put what you want to flash only on the external SD. IOW, if your reason for flashing TWRP is to use its backup function on a stock, don't bother, it won't work. But if your intent is to ROOT the stock ROM, then go ahead, but DON'T format data. Just put the files needed to root on the external SD and flash from there. You format the data partition in order to flash a custom ROM.
lewmur said:
You can't backup a stock ROM with TWRP because it can't handle the encryption. But you can use TWRP to root a stock ROM. In that case you just ignore the wierd internal data and put what you want to flash only on the external SD. IOW, if your reason for flashing TWRP is to use its backup function on a stock, don't bother, it won't work. But if your intent is to ROOT the stock ROM, then go ahead, but DON'T format data. Just put the files needed to root on the external SD and flash from there.
Click to expand...
Click to collapse
yeah but, i stil have the same problem though, i still cant use my tablette properly. i cant install new games and other app. but anyway i already rooted my stock firmware using magisk. but thanks anyway for the help
its just that i dont like the custom firware we have for it, and the stock firmware is slow af. but ill end up probably falshing a custom firmware anyway. have a good day.

Categories

Resources