How do I format /system on CM12.1 ? - Xperia SP Q&A, Help & Troubleshooting

Hello XDA,
Since I update to CM12.1 from CM11 (I didn't realised when I applied update, I would croos to CM12.1, so I did it the dirty way ^^)
So since I upadte to CM12.1, my phone started to freeze for anything I'm doing, even unlock it... I decided to clean all the mess I had in the phone, and do a clean installation of CM12.1.
My problem is simple : since I didn't formatted /system, I can't reinstall Gapps.
The recovery installed is now the cyanogen recovery and I don't know how to format /system with this recovery.
Have you any advice to do this ?
Thanks, see you on the thread !

Flash other kernel like tangerine kernel or kernel that already has custom TWRP or CWM recovery or use this kernel to wipe system and flash the kernel (Format -> Advanced format -> check cache, dalvik, system and what you want more). twrp_2.8.6.0-huashan.img

OK ! Thanks ! I'm trying it right after I right it.
I was reading about fastboot to do this. Could this command work too ?
Code:
fastboot flash system system.img
I tried to find a compatible recovery, but this is not simple since I don't know enough things about recoveries.

xdadogs said:
OK ! Thanks ! I'm trying it right after I right it.
I was reading about fastboot to do this. Could this command work too ?
Code:
fastboot flash system system.img
I tried to find a compatible recovery, but this is not simple since I don't know enough things about recoveries.
Click to expand...
Click to collapse
no need to ...install rashr app on your phone and then from it flash the twrp.img that the user above gave it to you

RASHR !!!
Thank you ! This app should be in every "Swiss army knife folder" of android user !
It ask me to flash Philz recovery. What is the best to do ? Philz recovery from Rashr, or the linked TWRP above ?
I really don't know the difference :-/

Hi !
I tried a lot of time to flash the recovery using rashr. I can't get rid of cyanogen recovery.
I installed clockworkmod's ROM manager and it tells me I have two recoveries installed. Cyanogen and TWRP. It was before I try to flash. But now it is the same.
Any advice ?
Sent from my Xperia SP using XDA Free mobile app

The finish touch
I started a new thread to terminate with rashr issues !
You can check it here : I can't flash any recovery on my phone
Phoenix854 told me to use an older version of rashr, and everything worked fine !
Good bye guys, and thank you for the help...

Related

Simple TWRP instructions for flashing ROMs

So many posts with errors while flashing custom ROMs and flaming it then. No need.
Always flash latest TWRP found here:
http://techerrata.com/browse/twrp2/hammerhead
To flash recovery use fastboot:
fastboot devices
(some number should appear here)
fastboot flash recovery
Or you can use Flashify or similar if already rooted. But, go ahead and learn to fastboot.
(Thanks to @simms22 for telling me to clarify)
first thing you want to do is backup your EFS partition in twrp and copy it to safe place (aka your computer or some secure cloud) - thanks to @gee2012 for headsup.
So now to the ROM flashing / fun part:
Installing custom ROMS/Gapps packages (thanks to @kufikugel for headsup)
Go to Wipe -> Advanced, format system (as your previous custom ROM/Gapps has most probably added backup scripts in system/addon.d), data, cache & dalvik. reboot recovery. flash new ROM & gapps as you would usually.
Easy?
Peace!
lol, you didnt include instructions on how to flash twrp in your instructions post. maybe you should add instructions?
anyways, twrp is flashed via fastboot, not recovery. you can also flash it with the flashify app if you already have root(or the twrp manager app). also, wiping one time is too much. you never ever need to wipe when flashing a recovery.
simms22 said:
twrp is flashed via fastboot, not recovery. you can also flash it with the flashify app if you already have root(or the twrp manager app).
Click to expand...
Click to collapse
And I nowhere mentioned twrp is flashed via recovery . I will edit my post to clarify I mean flashing custom ROMs via twrp.
TIMMAH! said:
And I nowhere mentioned twrp is flashed via recovery . I will edit my post to clarify I mean flashing custom ROMs via twrp.
Click to expand...
Click to collapse
you mentioned about wiping. wiping is done in recovery.
simms22 said:
you mentioned about wiping. wiping is done in recovery.
Click to expand...
Click to collapse
There I fixed it, my post was aimed to post-installing-twrp era. Thanks!
update: even with 2.7.0.0 you'll most probably run into issues flashing ROM if you format system and don't reboot recovery.. so just do it.
@wells said:
I'm well aware I am n00b in your eyes, but still.. so many posts with TWRP 2.6.3.4 errors while flashing custom ROMs and flaming it then. No need.
Always flash latest TWRP found here:
http://techerrata.com/browse/twrp2/hammerhead
To flash recovery use fastboot:
fastboot devices
(some number should appear here)
fastboot flash recovery <filename.img>
Or you can use Flashify or similar if already rooted. But, go ahead and learn to fastboot.
(Thanks to @simms22 for telling me to clarify)
So now to the ROM flashing / fun part:
Don't wipe system as most ROM scripts will do it for you or if you do, unmount system before flashing (or even better just reboot recovery and then flash your custom ROM).
Easy?
Also, no need to wipe multiple times anything before custom ROM flashing, it does nothing, just once is enough and just factory reset is usually enough, no need for advanced wipes.
Hope this helps somebody, mods if you think this should go away, just make it go away, not trying to be clever one.
Peace!
Click to expand...
Click to collapse
Maybe its usefull to add/mention the option to backup the EFS folder in TWRP and users should copy it to the PC once they backed it up
Well I would prefer when you add the hint that switching ROMs or gapps packages the user should wipe manually system prior the flash.
It is right that every ROM flash will format the system partition. But all ROMs have since long time backup scripts (for gapps and such things). When you flash a ROM it searches for this scripts, all things mentioned in the script will be copied to the data partition.... ROM formats the system partition installs its stuff and restores the copied stuff from data partition back.
Due that every gapps package is slightly different and as well a lot ROMs package own scripts into the addon.d folder this results always in problems. And a factory reset does not wipe this scripts. Only a manual format system.
Sent from my Nexus 5 using Tapatalk
I flashed a rom per your instructions and get force closures in play music. What should I do?
Sent from my Nexus 5
@kufikugel & @gee2012 done, thanks for the headsup
@jd1639
try clearing data from Play music app, not sure it's related to these instructions..

Recoveries gone

Hi,
Well, I do have one recovery - cyanogen recovery, all others are gone.
With cyanogen I can't flash gapps or tangerine kernel,so I need my old ones back.
How it happened? Flashed FlexOS,after reboot they were gone, replaced by cyanogen recovery.
Any help would be appreciated.
Thanks
jaretti said:
Hi,
Well, I do have one recovery - cyanogen recovery, all others are gone.
With cyanogen I can't flash gapps or tangerine kernel,so I need my old ones back.
How it happened? Flashed FlexOS,after reboot they were gone, replaced by cyanogen recovery.
Any help would be appreciated.
Thanks
Click to expand...
Click to collapse
Use Rashr app from playstore to flash twrp or philZ
don't have app store, in fact don't have any gapps as cannot install them in cyogen recovery. when download apk. file get "Cant open" message.
jaretti said:
don't have app store, in fact don't have any gapps as cannot install them in cyogen recovery. when download apk. file get "Cant open" message.
Click to expand...
Click to collapse
you have to install tangerine if you use lollipop ....go into fastboot mode flash the kernel via fastboot ..reboot and you have twrp or philz
Is it possible that I've lost root? Cause that what root checker says.
P.s. managed to install gapps,will try flashing kernel like suggested tomorrow. Any links on how to do it?
Thanks guys
jaretti said:
Is it possible that I've lost root? Cause that what root checker says.
P.s. managed to install gapps,will try flashing kernel like suggested tomorrow. Any links on how to do it?
Thanks guys
Click to expand...
Click to collapse
i have did this from a long time so forgive if it didn't work for you>>> form pc download this zip that i uploaded it for you(https://mega.co.nz/#!y51TmaJR!gSWCWbF_6d3JKbkyjgNzhdfBoKakFvNCCFFvBfRl-cY) extract to C:\fastboot then move the kernel.elf if is it tangerine it will be like this (tangerine.elf)>>>press ctrl+shift on the keyboard and then press open command window here then type: fastboot flash boot (the kernel name.elf) when it's done type fastboot reboot
example: fastboot flash boot tangerine.elf
p.s you have to install the drivers for you phone google it or maybe(Connect your Xperia SP via USB. (Don't forget to enable USB Debugging)
Then run the Software (http://adbdriver.com/downloads/) and choose ur phone, which should be listed in the list.
i hope i helped with this if it didn't work so i'm sorry my friend for wasting your time
good luck :good:
Hi, it's all sorted now.
if someone have same problem this is what I've done:
installed gapps aroma as other packages wouldn't install from cyanogen recovery, then flashed super su also from recovery. after that I was able to install phillz recovery using rashr app from Google store. then from phillz installed tangerine kernel. all good now,
thanks everyone!

Mi3 is bricked

Hi Guys,
My Mi3 is bricked.I did a repartition some months back and I wanted to install MIUI 7.I used Miflash but it is showing size too large error while flashing.My recovery is replaced with stock recovery.I tried to use ADB to push the file,that is also not working as it is shoing device not found while I am in recovery.I installed Miphonemanager as well for that.But there is no luck.I am out of ideas.Can anyone please help me.
Can anyone let me know which driver I need to choose in driver manager for android in desktop? Currently I tried CMCC Composite ADB driver and Xiaomi Android Interface.
Flash latest TWRP first. What happened during repartition?
You can allways acces the eeprom writer through short circuiting the sim card, there are a lot of tutorials, the only way to brick this phone is breaking its hardware
nsakhare said:
Hi Guys,
My Mi3 is bricked.I did a repartition some months back and I wanted to install MIUI 7.I used Miflash but it is showing size too large error while flashing.My recovery is replaced with stock recovery.I tried to use ADB to push the file,that is also not working as it is shoing device not found while I am in recovery.I installed Miphonemanager as well for that.But there is no luck.I am out of ideas.Can anyone please help me.
Can anyone let me know which driver I need to choose in driver manager for android in desktop? Currently I tried CMCC Composite ADB driver and Xiaomi Android Interface.
Click to expand...
Click to collapse
Install custom recovery through fast boot mode... Then flash the repartition revert zip .. There is one revert zip in miui forum which ends like this "....EIPerroVerde". Only this revert zip works..Then use miflash .. It should work..
Sent from my MI 3W using Tapatalk
aniketkuber said:
Install custom recovery through fast boot mode... Then flash the repartition revert zip .. There is one revert zip in miui forum which ends like this "....EIPerroVerde". Only this revert zip works..Then use miflash .. It should work..
Sent from my MI 3W using Tapatalk
Click to expand...
Click to collapse
The correct repartition zips can be found in the thread in my signature.
Reproduced here for Tapatalk or mobile users:
http://forum.xda-developers.com/xiaomi-mi-3/general/extremely-useful-flashable-zips-t3080860
The Dork Knight Rises said:
The correct repartition zips can be found in the thread in my signature.
Reproduced here for Tapatalk or mobile users:
http://forum.xda-developers.com/xiaomi-mi-3/general/extremely-useful-flashable-zips-t3080860
Click to expand...
Click to collapse
Hey Knight (didn't want to call you Dork :angel: )
I have a messed up phone,
2 questions here :
1- Would repartitioning reset ALL the partitions ?
2- When installing a ROM with fastboot, will ALL the partitions be filled with the necessary data ?
(I'm in doubt because of IMEI data)
Btw, can anyone point me to a link with WORKING fastboot ROM downloads ?
Inonotting said:
Hey Knight (didn't want to call you Dork :angel: )
I have a messed up phone,
2 questions here :
1- Would repartitioning reset ALL the partitions ?
2- When installing a ROM with fastboot, will ALL the partitions be filled with the necessary data ?
(I'm in doubt because of IMEI data)
Btw, can anyone point me to a link with WORKING fastboot ROM downloads ?
Click to expand...
Click to collapse
Repartitioning will wipe both your system partitions [EDIT: Seems I was wrong?]. If you want to use MIUI 7, you can use either extended partition, or stock partition using the zip from my link.
For fastboot I guess you'll need stock.
No, installing a MIUI fastboot ROM shouldn't touch your IMEI. But yeah everything else can be overwritten, depending on which bat file you use when flashing.
The process I'd recommend right now is to flash TWRP IMG using fastboot(use the 15-second ADB installer and look up a tutorial on how to flash an IMG. Basically just put the IMG into the adb/fastboot installation directory and then open a terminal window and then fastboot flash)
And as for MIUI fastboot ROM, you just gotta find the thread on MIUI forums. Google can help
The Dork Knight Rises said:
Repartitioning will wipe both your system partitions. If you want to use MIUI 7, you can use either extended partition, or stock partition using the zip from my link.
For fastboot I guess you'll need stock.
No, installing a MIUI fastboot ROM shouldn't touch your IMEI. But yeah everything else can be overwritten, depending on which bat file you use when flashing.
The process I'd recommend right now is to flash TWRP IMG using fastboot(use the 15-second ADB installer and look up a tutorial on how to flash an IMG. Basically just put the IMG into the adb/fastboot installation directory and then open a terminal window and then fastboot flash)
And as for MIUI fastboot ROM, you just gotta find the thread on MIUI forums. Google can help
Click to expand...
Click to collapse
Thanks ... but ....
I was under the impression that there were many more partitions (about 28).
Check this site:
http://en.miui.com/thread-138246-1-1.html
Basically, I'm looking for an easy way out to make a REAL factory reset from PC.
Inonotting said:
Thanks ... but ....
I was under the impression that there were many more partitions (about 28).
Check this site:
http://en.miui.com/thread-138246-1-1.html
Basically, I'm looking for an easy way out to make a REAL factory reset from PC.
Click to expand...
Click to collapse
Well there ARE a LOT of partitions on any device, but the important ones are system, boot, data, cache, modem etc.
That guide seems to manually mess with the partition table, so it gets down and dirty.
The easiest thing would be to do what I said, flash TWRP or CWM r7 by furniel and then the proper stock partition zip. Then use MiFlash or recovery to flash any ROM.
I think I'm back online
The Dork Knight Rises said:
Well there ARE a LOT of partitions on any device, but the important ones are system, boot, data, cache, modem etc.
That guide seems to manually mess with the partition table, so it gets down and dirty.
The easiest thing would be to do what I said, flash TWRP or CWM r7 by furniel and then the proper stock partition zip. Then use MiFlash or recovery to flash any ROM.
Click to expand...
Click to collapse
OK,
I followed your links and flashed :
First : Repartition to Stock Layout
Then : Repartition to 1.2GB Single System
Strange, after this, I did a normal reboot, it rebooted into my old ROM.
Shouldn't that have been erased after partitioning ?
Anyway,
Then I flashed ; update-XenonHD-08-08-15-signed-.zip
WAIT WAIT .....
as I'm typing, I'm flashing update-XenonHD-09-05-15-signed-cancro.zip,
first ROM in a few weeks that seems to be installing.
Let me check is it really installed .... YEP .... progress
Flashing : pa_gapps-modular-pico-5.1-20150418-signed
Everything seems to be going smooth
OK, for the time being .... all good.
Thanks a lot :good:
If your device cannot boot, flash it thru fastboot mode. See the full detailed tutorial on en.miui.com
Well you can directly flash with miflash even with the extended partition. Just edit the fastboot script (.bat extension with windows) and search for line
fastboot flash system+system1
And then delete system1
Fastboot flash system
And use those script for flashing via miflash

No further update of CM13 via TWRP possible

Hey folks,
after hours of reading around I have almost no idea left how to update my CM13 (13.0-20151213_nightly-titan) currently installed to a newer version. I tried with TWRP 2.8.6.0 and even 2.8.7.0, but it's all the same: I choose the zip file to install, the filesystem is detected correctly - but the installation just won't continue (usually the detection is followed by "patching the system unconditionally"). TWRP doesn't freeze, but just nothing happens . When I brake up after some time (usually an installation is done very quickly) with pressing the power button, my phone boots in the old version normally.
I tried another TWRP, wiped cache and dalvik, fixed permissions, set root in phone options, tried several CM13 builds... But I'm afraid of wiping data and system as it's a lot of work to get everything right again afterwards :crying:. Do you have any idea why TWRP doesn't want to install the new build?
Thanks a lot!
First always take a nandroid backup before you make any changes.
Even thought TWRP 2.8.7.0 is released, For Moto G 2014(titan)
only 2.8.6.0 is official https://dl.twrp.me/titan/
Try doing a clean installation(Wipe the data & System). That should do the trick.
just for the record the recovery is stopping you from installing a new build
Seems to be an issue with TWRP. You could give a try using CWM PhilZ Touch recovery. I have flashed using this recovery numerous times without any problem.
Thank you two for your replies !
Maddy, I know that 2.8.7.0 is unofficial for titan, but nevertheless it's working (for others). I want to avoid a complete reset, but in the end this could be a solution. But as I reflashed twrp (and tried another version also) I'm really wondering why twrp could be the problem ...
pank, I will take a look on CWM PhilZ, but until now I was really happy with twrp (and of course with its backup function). I hope it's possible to flash CWM using twrp and vice versa .
Unfortunately CWM PhilZ Touch Recovery shows the same behaviour than twrp - installation of new zip file just doesn't work (without any error) . If someone has an idea (except of a full wipe) please give me input !
Update the bootloader to the latest version. Had a similar problem a few months back that resulted in lots of hair tearing This solved it.
http://forum.xda-developers.com/moto-g-2014/general/bootloader-update-t3060007
Great hint - just checked your link already this morning and everything seemed to make sense... But I figured out that bootloader 4883 (newest version) was installed at my phone . Downgrade to 4882 should not be possible, and I'm also afraid of that .
I think I have something to do around Christmas - full wipe and a clean install! Damn...
Try installing this app called "CyanDelta" from playstore. What it does is it downloads the necessary files to upgrade from cm latest build (not the hole file) it's could be around 30 mb only. Totally legit!!... And it would dirty flash after download....
Do let us know how it turns out ?
I already tried CyanDelta, great tool! But as it's just creating a script for TWRP it has the same behavior . Oh, and I discovered that the nightly I'm using is no more available on cyanogenmod's official website ^^.
By now I think I've spend more time on searching for a solution than a full wipe including everything would need :laugh: ...
For me TWRP gives this behaviour only when Downloaded zip has some problem in it.
when it's not downloaded correctly it stuck at patching System
Have you tried latest zip?
also check SHA1 after download, doing that will confirm zip is downloaded correctly
Yes, I've tried the newest zip (several days respectively the newest) and I've checked the SHA value every time . The zip verification of twrp itself also doesn't report an error.
Maybe the reason is that I've used CM 12.1 before and made a "dirty" flash. Full wipe is getting closer to me...
No_Future said:
Yes, I've tried the newest zip (several days respectively the newest) and I've checked the SHA value every time . The zip verification of twrp itself also doesn't report an error.
Maybe the reason is that I've used CM 12.1 before and made a "dirty" flash. Full wipe is getting closer to me...
Click to expand...
Click to collapse
Just to say that I am having the same problem. Does the problem exist with Cyanogen Recovery? Can I replace TWRP with Cyanogen Recovery without touching everything else?
Thanks in advance.
mwalma said:
Just to say that I am having the same problem. Does the problem exist with Cyanogen Recovery? Can I replace TWRP with Cyanogen Recovery without touching everything else?
Thanks in advance.
Click to expand...
Click to collapse
Yes, you can try Cyanogen Recovery
download it and from fastboot
you can either just boot once and try it or flash the recovery replacing TWRP
Code:
fastboot boot recovery.img
Code:
fastboot flash recovery recovery.img
Great, I didn't know that it's possible just to boot once with a special recovery image. I'll try cyanogenmod recovery today !
Great news: With use of Cyanogenmod Recovery I was able to flash the newest build :victory:! I'm looking forward to try one day with TWRP, but for now I'm totally up to date . Thank you all again and have some nice days !
Edit: A full wipe and clean install solved this problem completely . Now the flashing with TWRP works again.

Stuck in recovery

Hi guys.
tl;dr
every try to flash a custom rom ends in recovery with encrypted date. stock rom is working tho
I have a big problem with my beloved Mi9.
I had the 12.0 stable version of xiaomi.eu rom on it. then wanted to flash the latest developer version 12.1. (20.7.9).
downloaded the latest version, went to the recovery (twrp) and started flashing just like many times before. this time i got an "Error 7" or something like that and the phone didnt finish flashing. i reflashed the version i had before and the flashing went normal. but after it was finished i wasnt able to boot to the system, it always booted to the recovery, no matter what.
there, all the files were encrypted on /sdcard, no way to flash a new file or something.
i was able to reflash the stock rom via "MiFlash20191206" and relocked the bootloader. then i used "XiaoMiTool V2" to unlock the bootloader again, this worked. but everytime when i try to flash a custom rom, i get the same problem again.
phone boots into recovery, and after i try flashing something (no matter if i get an error or not) all the files on /sdcard are encrypted again and i cant boot into the system. i dont get past this.
i even tried the latest orangefox recovery, same issue there.
does anyone have an idea for a solution because i dont really want to have the stock rom as a daily driver.
thank you guys in advance
greetings
Xetro
Some advices here:
1. Make sure you have most updated version of TWRP
2. You can flash disable dm-verify&encrypt after flashing ROM every time(https://zackptg5.com/downloads/Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip). Of course, flashing it after OTA as well.
Good luck !
Thank you for your fast reply!
I have tried the latest twrp and latest orangefox.
After im landing in recovery after flashing a rom, data is already encryptet so i cant flash your zip. Only possibility might bei to queue both zips... Will try this! But it still wont let me boot to the system then...
What do you mean with "flashing it after OTA as Well"?
It doesn't make sense. You just flash the file what I posted and it would descrpted your data then make you boot into system after rebooting.
Just one situtaiton you cannot boot into system => If your data&cache is F2FS, you still need to flash a patch file to make you boot into system.
The last one thing and action that may help you: flash vbmeta.img with the comment of "fastboot flash vbmeta vbmeta.img --disable-verity --disable-verification" under fastboot mode before flashing rom.
Good luck !
Xetro84 said:
Thank you for your fast reply!
I have tried the latest twrp and latest orangefox.
After im landing in recovery after flashing a rom, data is already encryptet so i cant flash your zip. Only possibility might bei to queue both zips... Will try this! But it still wont let me boot to the system then...
What do you mean with "flashing it after OTA as Well"?
Click to expand...
Click to collapse
EDIT:
man you safed my digital life! i just flashed your patch via adb sideload (never used adb before, had to figure out everything first) and it worked, right after patching it restartet to recovery, i manualle startet to system and it runs like a charm with the latest xiaomi.eu rom (which i flashed before)
can you tell me what exactly this patch did (for r noob pls)
thank you so much!
first of all, thank you for your effort!
i have a problem with this:
Kris Chen said:
It doesn't make sense. You just flash the file what I posted and it would descrpted your data then make you boot into system after rebooting.
Click to expand...
Click to collapse
after i flashed a new rom, i get in recovery mode automatically and the data is already broken, so i cant flash your patch via recovery...
orangefox shows all of my partitions as Ext4 except for USB-OTG (it has a vfat filesystem).
the thing is, everytime when i am in recovery mode (evertime i boot the phone) the data is encrypted and i cant flash any file because i cant find it.
the one and only time i dont hit into recoverymode is after flashing the stock rom with miFlash...
That's great and it's my pleasure to help me out.
I think dm-verify would play an important role - What's dm-verify ? Reference
Xetro84 said:
EDIT:
man you safed my digital life! i just flashed your patch via adb sideload (never used adb before, had to figure out everything first) and it worked, right after patching it restartet to recovery, i manualle startet to system and it runs like a charm with the latest xiaomi.eu rom (which i flashed before)
can you tell me what exactly this patch did (for r noob pls)
thank you so much!
Click to expand...
Click to collapse

Categories

Resources