Clearing cache partition on the Xperia XZ - Sony Xperia XZ Questions & Answers

Does anyone know how to clear the cache partition of this phone? Samsung phones have this option in the recovery where you could clear the cache partition (you don't even need to be rooted for this). I was wondering if there is a Xperia equivalent.
Thank you.

MantaYunkio said:
Does anyone know how to clear the cache partition of this phone? Samsung phones have this option in the recovery where you could clear the cache partition (you don't even need to be rooted for this). I was wondering if there is a Xperia equivalent.
Thank you.
Click to expand...
Click to collapse
Go to settings -> storage & memory -> click on 3 dots on right top corner and pick advanced -> Storage -> Internal shared storage -> once system calculate tap on Cached data it will ask if you want to clear it tap ok and you are done.
If you have unlocked bootloader and TWRP flashed you can do it from TWRP.

pk-air said:
Go to settings -> storage & memory -> click on 3 dots on right top corner and pick advanced -> Storage -> Internal shared storage -> once system calculate tap on Cached data it will ask if you want to clear it tap ok and you are done.
If you have unlocked bootloader and TWRP flashed you can do it from TWRP.
Click to expand...
Click to collapse
Hi. this only clear the app caches not cache partition (totally different). To do so :
Wiping the Cache Partition:
In case your handset is not working correctly and you're considering master resetting, then you might want to try and wipe the cache partition before doing so. Wiping the cache partition will not remove personal data stored on your handset's internal memory.
1:While the device is powered on, press and hold the "Volume Up" and "Power" keys
2:Wait for the display to shut down and for your handset to vibrate once
3:Release the keys once that happened, then press the "Power" key to turn on your device

You press the power button and volume up button simultaneously. Keep them pressed until the phone vibrates three times, then reboot.

The descreibed procedures here HARD reset the device (like pulling the battery). They do not clear the cache partition.
The easiest way to clear the cache partition would be via TWRP. On rooted phones you also could su in adb shell and then format the partition.
Note: the "cache" for each app is on the data partition.
Use a file manager and look into ../Android/data/-app-/cache : you will find the same amount of storage used as if you looked into "app info"->storage

DHGE said:
The descreibed procedures here HARD reset the device (like pulling the battery). They do not clear the cache partition.
The easiest way to clear the cache partition would be via TWRP. On rooted phones you also could su in adb shell and then format the partition.
Note: the "cache" for each app is on the data partition.
Use a file manager and look into ../Android/data/-app-/cache : you will find the same amount of storage used as if you looked into "app info"->storage
Click to expand...
Click to collapse
Exactly, what was described down there is nothing more but a hard reset if you device locks up and freezes.
But to use TWRP you'd need to root the device, right?
So, basically, there's no way to wipe cache partition without root?

Atrax2010 said:
But to use TWRP you'd need to root the device, right?
So, basically, there's no way to wipe cache partition without root?
Click to expand...
Click to collapse
Kind of.
With UNLOCKED bootloader (backup TA first!) you can boot TWRP and then wipe the cache partition.
fastboot boot twrp.img

DHGE said:
Kind of.
With UNLOCKED bootloader (backup TA first!) you can boot TWRP and then wipe the cache partition.
fastboot boot twrp.img
Click to expand...
Click to collapse
I see, so if you have unlocked bootloader, you cant temporarily boot into custom twrp recovery and wipe cache partition, but the TWR doesn't actually get flashed over stock recovery? It reverts to stock once you restart?
I'm interested in this procedure, I'm pretty sure my bootloader is unlocked, I bought the phone directly from Sony, it's SIM-unlocked so I guess the bootloader is unlocked as well.
Let's say it is and I go on with the procedure, does in it any way affect the stock bootloader and maybe void warranty?
My Rooting status says "Bootloader unlock allowed: Yes". Not sure if that means that it's unlocked or that it's locked but I can unlock it.

Atrax2010 said:
I see, so if you have unlocked bootloader, you cant temporarily boot into custom twrp recovery and wipe cache partition, but the TWR doesn't actually get flashed over stock recovery? It reverts to stock once you restart?
I'm interested in this procedure, I'm pretty sure my bootloader is unlocked, I bought the phone directly from Sony, it's SIM-unlocked so I guess the bootloader is unlocked as well.
Let's say it is and I go on with the procedure, does in it any way affect the stock bootloader and maybe void warranty?
My Rooting status says "Bootloader unlock allowed: Yes". Not sure if that means that it's unlocked or that it's locked but I can unlock it.
Click to expand...
Click to collapse
Its locked....But you can unlock it. SIM unlock and bootloader unlock are completely different. You will never buy a device from direct from Sony that has its bootloader already unlocked.
If you unlock the bootloader you void your warranty immediately.

Atrax2010 said:
if you have unlocked bootloader, you can temporarily boot into custom twrp recovery and wipe cache partition, but the TWR doesn't actually get flashed over stock
My Rooting status says "Bootloader unlock allowed: Yes". Not sure ...
Click to expand...
Click to collapse
You should really read my [GUIDE]. Especially the section about TA-Backup.
There are also many links in the Guide if you want to learn and understand (and be surer) follow them.

Related

Can I recovery data without Root ??

I missed accidentally delete all data on the storage.
I see many applications for data recovery required to root, but if root had to unlock bootloader before, if unlock bootloader it will wipe all data. Which may make recovery more difficult.
Are there better solution?
(I just want to recover the photos is enough.) T__________T
Jatiyanon said:
I missed accidentally delete all data on the storage.
I see many applications for data recovery required to root, but if root had to unlock bootloader before, if unlock bootloader it will wipe all data. Which may make recovery more difficult.
Are there better solution?
(I just want to recover the photos is enough.) T__________T
Click to expand...
Click to collapse
There is no real solution for you.
I wrote about it here:
http://forum.xda-developers.com/google-nexus-5/general/info-storage-nexus-5-data-info-loss-t2534010

Pressed factory reset by accident

Now it's my turn. Pressed factory reset by accident in boot loader. Can get to TWRP but it says E: Unable to mount storage
e:Unable to mount /sdcard/TWRP/twps. when trying to read settings file. etc...
Advanced File manager in TWRP shows /sdcard/TWRP
Any ideas???? If I try to mount data in TWRP my Mac wants to initialize.
Thanks
TWRP shows internal storage 0 mb
I flashed the stock recovery, then ran it and somehow it booted right into CM11. Everything was lost, but it's working again.
Factory reset wipe everything! Including SD card.
null0seven said:
Factory reset wipe everything! Including SD card.
Click to expand...
Click to collapse
Possibly, but how come CM11 was still on there? I think that the Boot Loader in Moonshine's factory reset is not compatible with CM11. Luckily the stock recovery fixed things for me.
808phone said:
Possibly, but how come CM11 was still on there? I think that the Boot Loader in Moonshine's factory reset is not compatible with CM11. Luckily the stock recovery fixed things for me.
Click to expand...
Click to collapse
I had the same issue, pressed by mistake factory reset in bootloader some time ago. I was pressing vol down to reach recovery, there was a slight lag and I pressed it a second time the immediately I've pressed power...so cursor has jumped 2 rows then executed. I've solved it only by flashing stock recovery and resetting to factory settings again, then flashed TWRP.
Now why you still had CM11...well not 100% sure but in TWRP when you wipe to factory the system partition is not formatted. I've paid attention once to the messages during a wipe and it was formatting data, cache, dalvik and android secure but not system. A reason can be that while flashing any ROM, the install script formats system at the beginning so theres no need to do that with factory reset.
Now I can only think that the factory reset from bootloader does the same and system is not wiped. Theoretically it is correct...system is read only especially on a stock non rooted device and resetting it to factory practically means that any trace of personal settings/aps and so on should be erased. And those are not stored on the system partition. There is also no hidden place on the phone where a recovery image of the original android OS is kept so this is not like on the laptops where you reset to factory and Windows is reinstalled from the recovery partition. My guess is that the factory reset just wipes all partitions that contain personal data and settings and leave system intact. So after a wipe and reboot is like you first start it.
You still had CM11 cause the wipe didn't format system...If anyone has a better explanation I would be glad to hear it. So From my point of view nothing went wrong and has nothing to do with the Maximus recovery or it's compatibility with CM11. It would have happen the same if you have used any other stock recovery
Factory reset, resets youre phone to original settings.
Anyway, its good that the phone works.
null0seven said:
Factory reset, resets youre phone to original settings.
Anyway, its good that the phone works.
Click to expand...
Click to collapse
Yes. And it is not formatting system when doing this. So any os is installed will be kept
Sent from nowhere over the air...
Rapier said:
Yes. And it is not formatting system when doing this. So any os is installed will be kept
Sent from nowhere over the air...
Click to expand...
Click to collapse
I don't want to try it again but I wonder if moonshine's factory reset is incompatible with cm11?
Dont understand what do you mean by "incompatible". The factory reset from bootloader is not the same thing as the one from a custom recovery. You shouldn't do a factory reset from bootloader regardless of the ROM you're using
Moonshine is an S-Off method, I didn't used it myself so I don't know what factory reset option is in there
Sent from nowhere over the air...
I never said anything about the custom recovery. If you should never use it, why is it there and why does it make the SD card not available?
Wow, HTC says you can use it here:
http://www.htc.com/us/support/htc-one-x-att/howto/313779.html
I'm sure you know something others like me don't, but I when I mean "incompatible" I mean that I don't believe that it should make the sdcard unavailable and make the phone think it has zero MB. I think what you might have missed is that I used factory reset from the custom boot loader from moonshine. I was wondering if that factory reset was compatible - that's all.
Again, it was a mistake - it's not like I chose it on purpose. Thank you for the help.
808phone said:
I never said anything about the custom recovery. If you should never use it, why is it there and why does it make the SD card not available?
Wow, HTC says you can use it here:
http://www.htc.com/us/support/htc-one-x-att/howto/313779.html
I'm sure you know something others like me don't, but I when I mean "incompatible" I mean that I don't believe that it should make the sdcard unavailable and make the phone think it has zero MB. I think what you might have missed is that I used factory reset from the custom boot loader from moonshine. I was wondering if that factory reset was compatible - that's all.
Again, it was a mistake - it's not like I chose it on purpose. Thank you for the help.
Click to expand...
Click to collapse
The reset to factory from bootloader exists because on stock ROM there's no custom recovery that has that option....so it's in bootloader. For it to work properly though, you must have the stock recovery also. If you have a custom recovery like twrp/cwm and use the wipe from bootloader it'll mess your sd cause phone is not able to perform the wipe properly with that custom recovery. That's why, in order to get back to normal you should flash back stock recovery and perform the wipe from bootloader again.
Sent from nowhere over the air...
Thank you for the clarification. It makes sense. Too bad that reset is so close to the recovery command. It's pretty weird that I didn't have to run the wipe from the stock boot loader again. It ran and rebooted the phone into CM11. Anyway, I am glad I am back to running. Thanks.

[HELP] Need urgent help with avoiding a data wipe...

Basically, my wife's phone was constantly rebooting. I had heard of power button issues so I tried to open the phone to fix that. After fiddling around with the button the problem persisted. I read somewhere that wiping the cache would help so I prepared to do that.
As I was waiting for the cache to wipe... the phone reboot again. It now does not boot (sits on the boot screen after the Google logo goes away) and says invalid argument when I try to wipe the cache.
According to this post, flashing the cache.img will fix the corrupt cache and allow me to wipe it.
Unfortunately my wife's phone has not been backed up, nor has the bootloader been unlocked. Is there ANY way to backup/retrieve files before unlocking the bootloader so I can fix the cache corruption issue? She has stock recovery, running lollipop.
Would really appreciate help in this matter, the pictures on her phone are from a year of travelling (not my best idea to leave them on her phone...but I digress).
If your phone keeps rebooting, and bootloader is LOCKED, its going to be hard to do anything to recover user data.
Having said that,
If you had ADB debug enabled before this disaster, you could try to ADB Sidleoad the Nexus 5 Lollipop OTA zip from stock recovery.
Then you data would remain intact.
Best of luck
Artorias90 said:
Basically, my wife's phone was constantly rebooting. I had heard of power button issues so I tried to open the phone to fix that. After fiddling around with the button the problem persisted. I read somewhere that wiping the cache would help so I prepared to do that.
As I was waiting for the cache to wipe... the phone reboot again. It now does not boot (sits on the boot screen after the Google logo goes away) and says invalid argument when I try to wipe the cache.
According to this post, flashing the cache.img will fix the corrupt cache and allow me to wipe it.
Unfortunately my wife's phone has not been backed up, nor has the bootloader been unlocked. Is there ANY way to backup/retrieve files before unlocking the bootloader so I can fix the cache corruption issue? She has stock recovery, running lollipop.
Would really appreciate help in this matter, the pictures on her phone are from a year of travelling (not my best idea to leave them on her phone...but I digress).
Click to expand...
Click to collapse
Contact me on hangouts/email: [email protected]
I can flash custom recovery without unlocking bootloader or wipe. If the /data partition didnt get corrupted we could recover the files.
Sent from my Nexus 5 using XDA Free mobile app
Has my brain gone broken? I thought you could fastboot stock img files without unlocking the bootloader?
Ben36 said:
Has my brain gone broken? I thought you could fastboot stock img files without unlocking the bootloader?
Click to expand...
Click to collapse
You can try that too.
What version of Android did you have on the phone?
In order to flash factory images, you’ll need to have the Android SDK HERE
Then you need to download the same version of Hammerhead Factory Image
you have been running on her phone HERE
Extract the correct Hammerhead Factory Image using 7zip or other extractor tool.
Then copy the cache.img from the extraction to the SDK/platform-tools folder.
From within your platform-tools folder, open a command prompt.
I'd recommend wiping the partition before flash.
-First type the following command
fastboot erase cache
-Then type the following command
fastboot flash cache cache.img
Plenty of tutorials in the sticky's if you need to learn more .
Best of luck

How do I recover my data from a Nexus 5 stuck in a bootloop?

My Nexus 5 is stuck in a bootloop where it says "Optimizing app x of y" and then reboots and repeats this endlessly. I'm not particularly concerned with getting the phone working, I only care about recovering the data on the phone. All the suggestions I've seen involve factory resets which wipe the data. How can I recover my data?
Is the bootloader unlocked? Did you enable usb debugging? Tried wiping cache in recovery?
audit13 said:
Is the bootloader unlocked? Did you thanks usb debugging? Tried wiping cache in recovery?
Click to expand...
Click to collapse
I'm not sure about the bootloader or usb debugging. Is there a way to verify? I have tried wiping the cache but it had no effect.
When you boot the phone, do you see the unlocked padlock at the bottom of the screen? If not, the bootloader is locked.
audit13 said:
When you boot the phone, do you see the unlocked padlock at the bottom of the screen? If not, the bootloader is locked.
Click to expand...
Click to collapse
Unlocked padlock is there, so I guess the bootloader is unlocked.
You can try flashing twrp, boot in twrp, mount data partition, and pull off data. As with any flashing process, things can go wrong which can result in the total loss of data.
What data do you need from the phone?
I have the same problem,
but the bootloader unlocks and locks again after rebooting,
I tried to flash in different ways but I didn't have any results, I did fastboot recovery twrp.img and I managed to get into this recovery, but twrp asks me for my password(i dont have any password), and if I try to format this appear cant mount/cant open cache
Do I need to change my motherboard?
If you can run Teamwin recovery then do a backup, then copy that onto your computer, then wipe data, cache, system, dalvik cache
after this, download any kitkat rom, gapps, and flash it
boot it up, install Titanium backup anow you can recover every app from nandroid backup (menu > special backup)
then backup every app again with titanium backup (menu > batch actions > backup all user apps)
Finally you can wipe your phone again and install any rom you want and recover every app with titanium backup
Why first an kitkat rom? because you can't extract from a nandroid since android 5, but the normal titanium backups work fine
---------- Post added at 04:29 PM ---------- Previous post was at 04:21 PM ----------
_MOE_ said:
I have the same problem,
but the bootloader unlocks and locks again after rebooting,
I tried to flash in different ways but I didn't have any results, I did fastboot recovery twrp.img and I managed to get into this recovery, but twrp asks me for my password(i dont have any password), and if I try to format this appear cant mount/cant open cache
Do I need to change my motherboard?
Click to expand...
Click to collapse
that seems like your filesystem is corrupt or the nand itself. Your phone is not unlocked so I think theres no solution :/ yeah replacing will help
That could be the solution, but I think that's only possible when you're unlocked: https://forum.xda-developers.com/showpost.php?p=76757221&postcount=2
If the bootloader relocks itself when the phone is rebooted, the internal memory chip is damaged and will require a motherboard replacement.

Which "Advanced WIPE" options in TWRP for "best" factory reset?

Hi everyone!
Yesterday after entering boot loops after trying to install the Xposed module from Magisk, I reinstalled the latest Oxygen OS zip via TWRP's "Wipe / Swipe to Factory Reset". When the phone booted in "hello, new user" mode, I saw there were still files from before under sdcard/, so, to be sure, I also tried to do a Factory reset from within OOS Settings / System. When the phone booted in "hello, new user" mode, I noticed there were still files from before under sdcard.
I re-flashed Magisk, installed a few things, did a backup via TWRP. Worked on setting up the phone for two more hours (didn't install any Magisk module, only software from the Play store), rebooted the phone to check everything was okay… boot loop!
Using the backup, I was able to reset the phone to the state of before wasting these two hours… But these boot loops seem so fickle, so random, that I wonder if I'm missing something with the factory reset, if maybe there is a more brutal reset that would erase all trace of activity after the state where the phone was after unlocking the bootloader.
Is there a way to do a more complete "factory reset" than what I've done? I see that Magisk has an "Advanced Wipe", if I checked all the box would that do it? Or is that a bad idea because some important OOS recovery files would vanish. Which "Advanced Wipe" options should I check? If I follow that procedure, will I be able to reinstall TWRP and Magisk via ADB?
Really needing some expert insight, I feel very lost!
Thanks in advance!
who ah way said:
Hi everyone!
Yesterday after entering boot loops after trying to install the Xposed module from Magisk, I reinstalled the latest Oxygen OS zip via TWRP's "Wipe / Swipe to Factory Reset". When the phone booted in "hello, new user" mode, I saw there were still files from before under sdcard/, so, to be sure, I also tried to do a Factory reset from within OOS Settings / System. When the phone booted in "hello, new user" mode, I noticed there were still files from before under sdcard.
I re-flashed Magisk, installed a few things, did a backup via TWRP. Worked on setting up the phone for two more hours (didn't install any Magisk module, only software from the Play store), rebooted the phone to check everything was okay… boot loop!
Using the backup, I was able to reset the phone to the state of before wasting these two hours… But these boot loops seem so fickle, so random, that I wonder if I'm missing something with the factory reset, if maybe there is a more brutal reset that would erase all trace of activity after the state where the phone was after unlocking the bootloader.
Is there a way to do a more complete "factory reset" than what I've done? I see that Magisk has an "Advanced Wipe", if I checked all the box would that do it? Or is that a bad idea because some important OOS recovery files would vanish. Which "Advanced Wipe" options should I check? If I follow that procedure, will I be able to reinstall TWRP and Magisk via ADB?
Really needing some expert insight, I feel very lost!
Thanks in advance!
Click to expand...
Click to collapse
Hello, format internal storage within twrp deletes everything off your /sdcard but does not touch system, data, vendor for example.
You're still able to use fastboot/adb cause you do not delete the bootloader:good:
strongst said:
Hello, format internal storage within twrp deletes everything off your /sdcard but does not touch system, data, vendor for example.
You're still able to use fastboot/adb cause you do not delete the bootloader:good:
Click to expand...
Click to collapse
Thank you for your reply!
Just to be sure I understand, are you suggesting that a strong way of getting a good Factory Reset would be:
TWRP / Wipe
[ ] Dalvik / ART Cache
[ ] System
[ ] Vendor
[ ] Data
[x] Internal Storage
[ ] USB Storage
then (if TWRP is gone):
adb devices
adb reboot bootloader
fastboot boot twrp-3.3.1-52-guacamole-unified.img
In TWRP, install twrp-3.3.1-52-guacamole-unified-installer.zip
In TWRP, install OnePlus7Oxygen_14.E.14_OTA_014_all_1907280716_7e28877dd39949e3.zip
Do the phone's "Welcome, user" setup
Flash Magisk
Does that sound right?
who ah way said:
Thank you for your reply!
Just to be sure I understand, are you suggesting that a strong way of getting a good Factory Reset would be:
TWRP / Wipe
[ ] Dalvik / ART Cache
[ ] System
[ ] Vendor
[ ] Data
[x] Internal Storage
[ ] USB Storage
then (if TWRP is gone):
adb devices
adb reboot bootloader
fastboot boot twrp-3.3.1-52-guacamole-unified.img
In TWRP, install twrp-3.3.1-52-guacamole-unified-installer.zip
In TWRP, install OnePlus7Oxygen_14.E.14_OTA_014_all_1907280716_7e28877dd39949e3.zip
Do the phone's "Welcome, user" setup
Flash Magisk
Does that sound right?
Click to expand...
Click to collapse
Generally the factory reset does all too need(from android settings). Why theres something left of your device I don't know.
But I meant format internal storage, not wipe internal storage.
So reboot to twrp - wipe - format and follow the instructions reading the hints.
Again: that does not wipe your twrp, system, system data only the internal storage like music, photos etc.
For installation, it's OK what you wrote
Thank you very much, @strongst.
If I understand, that "Format" option that you suggested is what gets rid of all the personal files. Then to Factory Reset, I can either flash via TWRP, or use adb.
At the moment I am thinking that like you suggested the phone is actually okay after the standard Factory Reset — and that the earlier boot loop was created by one specific piece of "bad software". So I am reinstalling things little by little, and doing TWRP backups after every 15 minutes of set-up. That way if the phone enters a boot loop, I will be able to restore and to narrow it down, and check on the forum if others have the same problem. Does this make sense to you?
Wishing you a great week!
who ah way said:
Thank you very much, @strongst.
If I understand, that "Format" option that you suggested is what gets rid of all the personal files. Then to Factory Reset, I can either flash via TWRP, or use adb.
At the moment I am thinking that like you suggested the phone is actually okay after the standard Factory Reset — and that the earlier boot loop was created by one specific piece of "bad software". So I am reinstalling things little by little, and doing TWRP backups after every 15 minutes of set-up. That way if the phone enters a boot loop, I will be able to restore and to narrow it down, and check on the forum if others have the same problem. Does this make sense to you?
Wishing you a great week!
Click to expand...
Click to collapse
It's a good way to break a potential boot loop issue down, time consuming, but worth the effort in case it boot loops

Categories

Resources