yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Compact Android Development] deboopi2:
factory reset after dual recovery installation

I installed this dual recovery some time ago and it works ok.

SInce I recently started to have some problems with my phone I want to do a factory reset.

If I do such a reset not all the apps are gone and even my wallpaper stays as it was.

I really want to start from scratch, how should I proceed?

I must say that after unlocking and installing dual recovery I also switched my kernel to Doomkernel v22.

Can anybody help me out?
[Xperia Z1 Compact Android Development] F308:
Factory reset resets what factory loaded.

What user loaded - let user wipe.

This is the keyword: WIPE.

Precisely saying - wipe /data and /cache.
[Xperia Z1 Compact Android Development] deboopi2:
So that's what I did and now it is ok.

Thanks

---------- Post added at 09:05 PM ---------- Previous post was at 08:56 PM ----------

I'm on stock rom 14.4.A.0.108

The phone is unlockedand rooted with supersu, at this time I'm running supersu 2.46.

I changed the kernel to doomlord v22

Since NDR utils does not work with twrp releases lower than 2.7.77 I wanted to update to version 2.8.5.

So I backed up chargemon to the external sd card but I still have a file called chargemon.stock in system\bin.

When booting into TWRP recovery I tried to flash the update zip but I just get an 'update failed' message.

So what can be wrong, what to try next?
[Xperia Z1 Compact Android Development] Kockowan:
Hello,

i work on Z1compact (D5503) with original firmware .157, bootloader is still locked but rooted with Easy Root Tool 12.4.

Must mobile's firmware be downgraded to version .108 for installing Z1C-lockeddualrecovery2.8.7-RELEASE.installer.zip?

Mobile should be keep locked :angel: ...

And:

How to remove Z1C-lockeddualrecovery2.8.7 and root for getting original status of my Z1compact?

Thx + regards!
[Xperia Z1 Compact Android Development] F308:
Why not to flash original stock rom?
[Xperia Z1 Compact Android Development] moonryder:
maybe someone can help me!

i am on KitSlim (stock customized rooted ROM) with stock kernel (3.4.0-perf-g0109737) and locked bootloader.

i flashed XZDualRecovery (2.8.2 / 2.8.7), but after reboot it stucks on SONY logo. And there is no chance to get into recovery again to restore a nandroid. Only flashing a ftf firmware helps.

What´s wrong? I have absolutely no idea...
[Xperia Z1 Compact Android Development] [NUT]:
Does your mobile show a continuous green led (and maybe a persistent vibration too)?

If so, kitslim needs the same fix as I made for romaur. You can probably use the same file to flash before you flash or install xzdr.
[Xperia Z1 Compact Android Development] moonryder:
[MENTION=4904057][NUT][/MENTION]

there is no green led and no vibration, device stucks on SONY bootlogo and seems to be dead, frozen... whatever

p.s. look at my signature, all ingredients are in place to work, but it won´t :(
[Xperia Z1 Compact Android Development] [NUT]:
I'm afraid you're going to have to ask kitslim's creator to find a cure for that... Maybe his recovery integration breaks mine and vice-versa, but I have no idea what he did to get his recovery integration to work...
[Xperia Z1 Compact Android Development] moonryder:
maybe flashing a "normal" stock kernel and after that your XZDR ...

i have a stock kernel 108 .ftf file here. Will i loose root flashing it?

Could it work or may i brick my device?
[Xperia Z1 Compact Android Development] templeka:
I'm having some issues installing the recovery. I used to have 2.8.7 a while back but I unlocked my BL and had a custom kernel and didn't need this anymore. Now I re-locked my BL and tried installing 2.8.8 / 2.8.7 but neither work. When pressing vol. up or vol. down I get a red light notification and can't enter recovery. I am rooted, have SuperSU installed, have busybox installed in xbin (the one from Stericson), I cleared cache/dalvik from ADB but nothing seems to work. I'm attaching the log since I can't figure out what's wrong here.

P.S. Running stock 4.4.4 v157 Sony Android. I did notice that the installation of recovery brakes Xposed Framework for some reason and I have to reinstall that.
[Xperia Z1 Compact Android Development] camdecoster:
I tried installing 2.8.8 and it appears that everything installed correctly, but I'm unable to get into any recovery. This includes both rebooting into recovery and powering on and pressing the volume up/down key. Am I doing something incorrect? All of the files are where they should be from what I can tell (on the system partition).
[Xperia Z1 Compact Android Development] geesoos:
I cannot download anything from Nuts download page. Is it working?
[Xperia Z1 Compact Android Development] moonryder:
http://xdaforums.com/showpost.php?p=60090805&postcount=4515
[Xperia Z1 Compact Android Development] BlackArtsInc:
[MENTION=4904057][NUT][/MENTION]

So I installed latest busybox in system/xbin using BusyboxPro app and now I've lost the ability to use XZDualRecovery! If I choose to uninstall Busybox the app warns me that I'll lose root functionality...

What can I do to get my recovery back? :(

Not sent by me!
[Xperia Z1 Compact Android Development] F308:
Don't update busybox from google play, stay with the one which was in recovery package.
[Xperia Z1 Compact Android Development] BlackArtsInc:
I know that now unfortunately.

Can I save my installation and my recovery now though?

Not sent by me!
[Xperia Z1 Compact Android Development] F308:
Sure.

Find busybox binary, must exist in recovery package.

Copy it to /system/xbin/, (you need remount /system to R/W), make correct permissions, reboot.

That worked for me once upon a time.
[Xperia Z1 Compact Android Development] BlackArtsInc:
LOL This is now a complete cluster**** really. I uninstalled Busybox via the BusyboxPro app, rebooted and now I can't mount the system/xbin as R/W using Root Explorer, which means I cannot paste the recovery's busybox binary in it. Also Fx Explorer app which uses its built-in busybox cannot do this either.

So,can I flash anything via Flashtool or something to rectify the problem and get the recovery and my Nandroid backups back?

Unlocked stock. 157 firmware.

Not sent by me!
[Xperia Z1 Compact Android Development] [NUT]:
Just try to install recovery again using the installer.
[Xperia Z1 Compact Android Development] BlackArtsInc:
[MENTION=4904057][NUT][/MENTION]

You mean do the whole thing from the start (flash 108 Kernel,root,then recovery,then 157 kernel)?

Not sent by me!
[Xperia Z1 Compact Android Development] F308:
Well. Under the circumstances I cannot give straight advice except steps which I would do.

1. Assure you have root. It doesn't depend on anything else than existence of 'su' binary. Rest is GUI. You can open terminal and type: su. Tell me what message you got.

2. Install ANY busybox from Google Play. It should make many symbolic links in /system/xbin/. Many of functionalities should come back. Possibly at some point something will ask for root permissions. This will be signal that you go into good direction.

3. Now you should be able to remount /system to R/W mode and do what you want (= replace busybox with wanted one).

Last, not least.

DON'T PANIC.

Don't hurry.

Think and watch.

There is old, very valuable statement that it is not crash what makes damages.

Damages are made by nervous, hasty, not pre-analyzed repair actions.
[Xperia Z1 Compact Android Development] BlackArtsInc:
LOL I've done the steps you mentioned on my own except for the first. Seems I don't even have root so no,I can't mount the system partition! I told you this was a major f uck up and it all happened cos I installed a newer busybox in xbin...

At least I hope no no one else does the same mistake after reading this!

Btw,I really think it's the correct thread to post this,instead of the Q&A one...

Not sent by me!
[Xperia Z1 Compact Android Development] ulum.misbahul:
I can't reboot into CWM mode on dual recovery 2.8.10
[Xperia Z1 Compact Android Development] BlackArtsInc:
Anyway,I cleaned up and reinstalled SuperSU, terminal now recognized it, Root Checker also recognized it but still Busybox Pro cannot install busybox and Root Explorer cannot mount system partition. Well,considering that Lollipop is days away I decided to abandon the whole thing and try again after flashing official Lollipop.

Thanks a lot for your input!

Not sent by me!
[Xperia Z1 Compact Android Development] rwhryz:
Would I lose this if I flash a ftf or restore my TA partition?
[Xperia Z1 Compact Android Development] F308:
General info about flashing.

FTF contains packages related to device's partitions.

You can figure out which ones if you run simple 'df' in terminal as well those are visible under flashtool.

Those are: system, data, cache, kernel, boot, some more, it is easy to check.

You dont have to flash everything, like we flash only kernel 108, later 157 without touching rest.

'su' binary is on /system partition.

That means that if you flash system package wiping current data - you wipe su as well.

If not wiping - I have a feeling that flashed system might work and root would still exist but this may depend on other details.

If you flash kernel, data or anything else BUT NOT system - wipe or not - root stays.
[Xperia Z1 Compact Android Development] BlackArtsInc:
Is this true and what does this mean for us in the real world?

Not sent by me!
[Xperia Z1 Compact Android Development] F308:
That you will have less troubles.

I always have seen selinux as pain in *ss and [at least on computers] my first thing was to switch it off.
[Xperia Z1 Compact Android Development] blue4you:
For me on Z1C too.

And in technical view?
[Xperia Z1 Compact Android Development] deboopi2:
Cannot upgrade to dual recovery 2.8.x

I'm on an older version of this dualrecovery and I wanted to upgrade to the latest version because the twrp release I'm running (2.7.1.0) has some problems with NDR utilities.

But after installing dualrecovery in the past I also changed my kernel to the doomkernel v22.

If I try to flash an upgrade I get get the error that the flashing failed.

I think I've seen somewhere that I need the stock kernel if I want to install an upgrade, is this correct?

If so how can I get back my stock kernel , can this be done by flashing the ftf 14.4.a.0..108 and selecting the correct options in the flashtool?

If yes, what options to select/deselect?

Is upgrading to the latest version the first step in installing lollipop, I've seen it mentioned thread 'Xperia Z1C Lollipop 5.0.2 Update & Discussion here !' under 'Xperia Z1 Compact General'
[Xperia Z1 Compact Android Development] F308:
It was created to increase system security but it's format is hell if you are not programmer.

Functionality is easily googled, for example:

https://access.redhat.com/documenta..._SELinux-SELinux_Contexts_Labeling_Files.html
[Xperia Z1 Compact Android Development] peua79:
No recovery mode

I'm on 4.4.4 .108, rooted, but I cannot boot in recovery mode to install Lollipop FTF file: why????? :crying:

Any solution??????:eek::confused::eek:

And I can't install XZDualRecovery too!
[Xperia Z1 Compact Android Development] [NUT]:
Did you try to install 2.8.12 yet? If not, please do and then after installation copy the contents of the CMD window to a file and attach here please.
[Xperia Z1 Compact Android Development] Revontheus:
Is this Dual Recovery compatible with Lollipop? ( FW 14.5.A.0.242 ).

It works great on .157 Kitkat FW Rooted, Locked Bootloader, was wondering if this would work on the new Lollipop FW as well.

Thanks alot!
[Xperia Z1 Compact Android Development] [NUT]:
Yes it is, check the changelog (post 3) on the DevDB thread (link in OP) to follow development.
[Xperia Z1 Compact Android Development] bongokongo:
Hi everybody.

i've installed sucesfully the dual recovery, but unfortunately, my brother delete the backup file /system/bin/chargemon by deleting it from my backup usb drive!!! (i've to kill him!!!! :crying::mad:)

how could i obtain this file?? It's possible download an original one?

i've a D5503 rooted to latest .242 lollipop firmware.

thanks for everything! :D
[Xperia Z1 Compact Android Development] [NUT]:
Well, check if /system/bin/chargemon.stock exists, if it is, copy this to keep it safe, because that is the original chargemon binary you copied earlier.
[Xperia Z1 Compact Android Development] Riyal:
Hi [MENTION=4904057][NUT][/MENTION]

I recompiled TWRP. Framebuffer should not overflow now. BTW it's v2.7. You might want to update your recovery. Just replace the init files and add your recovery script.

This fixes the large log window & time fetching without even using time_daemon btw. You might consider using this?
[Xperia Z1 Compact Android Development] [NUT]:
If you used any private patches, then no: I want to be able to build it myself...
[Xperia Z1 Compact Android Development] Riyal:
I didn't use any patches :D Just pulled the latest twrp code and compiled it using CM10.2 repo. I made the device tree for Z1 Compact though.

https://bitbucket.org/Don2x/android_device_sony_amami

Anyways to pinpoint the overflowing text issue in log window it's not about the device resolution nor the dpi from compile time. It was on the graphics.c on twrp minuitwrp folder.

Regarding the time I don't know lol! I just like compiled it then tested it and the date time just works perfectly. Checked the ramdisk and init.rc and there's no time_daemon used. So I guess it just works like it should and time_daemon messes it up?
[Xperia Z1 Compact Android Development] thermalboyz:
Cheers [NUT] for this recoveries, just a headsup that TWRP has new version 2.7.0.0

http://teamw.in/project/twrp2
[Xperia Z1 Compact Android Development] [NUT]:
https://github.com/xNUTx/android_device_sony_amami <-- did this one myself.

:p

anyway... I'll see what you did to your device repo and compare it with mine :)
[Xperia Z1 Compact Android Development] Riyal:
Meh! Haven't seen it lol! I should have just pulled your device repo instead of creating my own... Anyways do you have any vendor repo also? I'm having a hard time looking for proprietary files to be used since I'm planning on making a CM Rom.

Also the framebuffer size fix is not there. I added it in minuitwrp. Here it is.

http://pastebin.com/LWHyTwsu

I'm not sure if I should create a pull request on that since it might affect other devices :D They are still assuming all msm8794 devices are 1080p screens.
[Xperia Z1 Compact Android Development] TheQwertiest:
It seems that Philz touch has broken brightness control:

"E:Unable to create brightness sys file!"
[Xperia Z1 Compact Android Development] Riyal:
That's because it's using the conventional sys path for brightness... Sony uses a modified one.
[Xperia Z1 Compact Android Development] TheQwertiest:
Well, obviously :P

Is it impossible\hard to fix? =)
[Xperia Z1 Compact Android Development] Riyal:
It needs to be recompiled from source. You should ask Philz or [NUT] to recompile it with the correct sys path... :p I only like TWRP recovery so never had the chance to play with other recoveries.

[MENTION=4904057][NUT][/MENTION]

As far as I know Philz has 2 versions of his recovery. The 1st one is closed source and has some extra features while the other one is opensource but has less features. Which one are you using?
[Xperia Z1 Compact Android Development] [NUT]:
[MENTION=4386647]Riyal[/MENTION] actually, he poured his touch code in to a binary library a few weeks back. This allows anyone to compile it, including touch interface.

The Z1C version is actually producing this error because I grabbed a different base from a model which has slightly different by-name partition labels...

I'm experimenting with twrp 2.7 which requires a small adjustment to the device repo to make it compile. I've discovered that the basic graphics.c is working just fine, there is no need to keep the twrpgraphics.c, at least on the XZ and Z1 :)

I'll build new philz ramdisks soon, which will fix that issue. Too much to do, too little time to do them stuffz :silly:
[Xperia Z1 Compact Android Development] Riyal:
[MENTION=4904057][NUT][/MENTION]

Ahh... I see :D Too outdated now with these news haha! Only able to track his work when I was still active in HTC One forum...

BTW the twrp recovery I attached is already twrp 2.7. And I haven't encountered any issue with compiling it as far as I remember.
[Xperia Z1 Compact Android Development] [NUT]:
Oh yes, [MENTION=4451231]TheQwertiest[/MENTION], you can ignore that error, it will work fine other then that.

Yes, and I know why :cowboy:

https://bitbucket.org/Don2x/android...432d57b77ef54c/BoardConfig.mk?at=master#cl-58

You set all the TWRP options in BoardConfig.mk, pointing the TW_BOARD_CUSTOM_GRAPHICS to your own file.

As you can see the big daddy is settings free because of this bit.

This makes it load this setting .

The twrpgraphics.c in the common repo is outdated, but teamwin has moved on and the original need for the custom graphics file is gone, at least for the rhine and fusion3 boards.

So, comment out line 156 and remove the TW_BOARD_CUSTOM_GRAPHICS line from your device repo and it should work just fine, with no additional changes. :D
[Xperia Z1 Compact Android Development] [NUT]:
[MENTION=4451231]TheQwertiest[/MENTION], If you could try 2.7.95 now on the downloads page, it should fix the philz error. It should now also identify the device correctly and the font size should be device correct. Can you please confirm this?

[MENTION=4386647]Riyal[/MENTION] FYI: 2.7.95 now contains the TWRP 2.7 built with my graphics.c suggestion. If you could do some testing, that would be great. If I did it correct it should now also have the correct font size in the log view.
[Xperia Z1 Compact Android Development] TheQwertiest:
Thx, I will test it later today! =)
[Xperia Z1 Compact Android Development] TheQwertiest:
[MENTION=4904057][NUT][/MENTION] Nah... Same error as before... Anything I should've done besides flashing *2.7.95_flashable?
[Xperia Z1 Compact Android Development] [NUT]:
Nope, that should have been all :(

Can you help me fixing it by using Android Terminal to find the correct brightness path?

For the Z1 /sys/class/leds/wled:backlight/brightness is the correct working path, but I guess that's incorrect for the Z1 Compact (which is weird, but OK).

In the terminal, type the following.

You can stop as soon as you find the brightness file, but I've included all possible means to find it.

su
cd /sys
ls -la class/leds/

Do you see anything related to the backlight? if so, what it's name? If there are more then one, please list them all.

find . -iname "*brightness"

If you find anything useful, please take a screenshot to attach here. Prevents stupid typo's sending me off on a wild goose chase :good:
[Xperia Z1 Compact Android Development] TheQwertiest:
Adb is easier to use, coz typing all that using phone's screen is a huge pain in the back :P

Anyways, here we go. We have 2 files:

1970-01-26 03:25 lcd-backlight -> ../../de
vices/mdp.0/qcom,mdss_fb_primary.158/leds/lcd-backlight
1970-01-26 03:25 wled:backlight -> ../../d
evices/leds-qpnp-ee140600/leds/wled:backlight

Ya, it was created in 1970, long live the Android! =)

Both of them has these files, that store the brightness: max_brightness and brightness.

Anything else?

PS: We can always use some sort of IM to prevent the thread cluttering (and to remove the delay in communicating)

PPS: Current values are 255, 255 (brightness, max_br) for wled:backlight and 0, 4095 for lcd-backlight
[Xperia Z1 Compact Android Development] [NUT]:
Thanks for the help, you can use whatever you want of course ;)

http://nut.xperia-files.com/tmp/recovery.philz.cpio.lzma

Put this file inside /system/bin/ and try it again please :)
[Xperia Z1 Compact Android Development] TheQwertiest:
Nope, not this time either =)
[Xperia Z1 Compact Android Development] ulum.misbahul:
I can't use ClockWorkMod on firmware .242,
[Xperia Z1 Compact Android Development] peua79:
thanks!!!

now I'm on Lollipop :)
[Xperia Z1 Compact Android Development] craigster1991:
Lollipop issues

I used this on 4.4.4 and it was great - I then updated stock 5.0 OTA as expected root was lost. But now I can't get this working on Lollipop, is there anything anyone can suggest?

Thanks.
[Xperia Z1 Compact Android Development] mentalghost:
Well for the ones who got problems losing rooted and recovery trying a metohrd found will report back in a few ones tested to see if works then can boot into lolipop stock and then get this new modded badboy on it.
[Xperia Z1 Compact Android Development] barno_xvi:
Cyanogen Recovery Issue

Love the software, great work :) but I can't seem to use it. I'm running CM12, along with the recovery that comes with it (Cyanogen Recovery), but every time I try and flash this, it comes up fine with TWRP the first time when it reboots, I then try and go back into recovery afterwards and it just reverts to Cyanogen Recovery...

Any ideas? I've just had a mare with a nightly update and realised I didn't have my data backed up and Cyanogen Recovery doesn't give the option... fail.
[Xperia Z1 Compact Android Development] Radelos:
cant aces NUT site, alltime site unavailable. Can somewho pust a link to the latest Z1C-lockeddualrecovery*installer.zip ???? big big pls
[Xperia Z1 Compact Android Development] moonryder:
[MENTION=4904057][NUT][/MENTION]

i tried to change the background image of PhilZ - i think it is the stitch.png - (recovery.philz.gz and inside recovery.philz.cpio), but i can´t repack the .cpio file / .gz archive cause i have a windows computer :(

is there any workaround to do that?
[Xperia Z1 Compact Android Development] [NUT]:
Try visiting with a different isp or pc/browser mate, it's definitely just your end...
[Xperia Z1 Compact Android Development] Radelos:
thanks for tip it worked now i know where is the problem :)
[Xperia Z1 Compact Android Development] TECCC:
OS : CM12.1 , with m5 Kernel V9 everything works find, root and Adb debugging enabled.

when i install xzDualrecovery with installer (option 2: installed OS with Superuser) all works and i got the recovery.

But back in the OS , Superuser(root) does not respond anymore, Switching Off/On in developer Options does not fix it.

Could anyone help ?
[Xperia Z1 Compact Android Development] testman86:
[MENTION=4904057][NUT][/MENTION] First of all many thanks for your great work! Seems I need to buy you a beer :)

I used your kernel builder for latest CM12.1 (cm-12.1-20150815-NIGHTLY-amami.zip) to use. Was on latest stock with sony flashtool und unlocked bootloader, so a clean base. Then I used fastboot to flash boot.img in the /tmp folder of the .zip to get a working recovery. Everything was working fine, could flash CM12.1 then flash the Z1C-lockeddualrecovery2.8.21-RELEASE.flashable.zip to keep the recovery as mentioned in your tut. But after rebooting into recovery just the Original CM12.1 Recovery was left. I tried with your APK, but no different which recocery I choosed as primary, I got back to CM.12.1 stock.

Any clue why flashing yours after flashing ROM does not keep recovery? Mabye some changes in latest CM12.1? They also added a seperate recovery in latest three builds see here: http://download.cyanogenmod.org/?device=amami thanks for your reply and have a nice weekend!
[Xperia Z1 Compact Android Development] [NUT]:
You lost xzdr because the rom package flashes the kernel as well.

Fastboot flash the cm kernel, which you can repatch using the kernel builder. Extract it from the rom zip, upload, see the magic happen and download it again. Fastboot flash it and you're done.