[DEV ONLY] Dual Recovery for Xperia Z1 (LOCKED BOOTLOADERS)

Status
Not open for further replies.
Search This thread

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,191
39,698
Pune
info:

this is based on the XZU recovery for locked bootloaders by @Krabappel2548

This thread will stay a dev and discussion thread for further development issues and fixes!

Download link can be found here: XZU recovery for locked bootloaders

THIS IS INTENDED FOR LOCKED BOOTLOADER DEVICES! But works on Unlocked bootloader too


THIS IS STILL IN DEVELOPMENT STAGE!


DO NOT EXPECT IT TO WORK PROBLEM FREE!


requirements:

rooted Xperia Z1


how to enter recovery:

when you see the Sony bootlogo and when device vibrates/leds light up u can use the entry keys to enter the corresponding recovery

VOLUME UP -> CWM
VOLUME DOWN -> TWRP


what works:

BOTH CWM 6.0.3.6 and TWRP 2.6.3.0 work
you can enter both recoveries and flash small files


what doesnt work:

in this particular version of CWM, adb doesnt work; it will be fixed later.. for debugging use TWRP

Shoudl be fixed:
TWRP and CWM both can destroy /cache and /system when trying to format it. Restoring your phone using an FTF is the only option left if that happens. You can however try to not format but use rm -rf instead in TWRP (TIC BOX!!), which will do for now.

regards,

Krabappel2548,
[NUT]
DooMLoRD

Last edit by Krabappel2548 on 19-10-'13

XDA:DevDB Information
Dual Recovery for Xperia Z1 (LOCKED BOOTLOADERS), a Tool/Utility for the Sony Xperia Z1

Contributors
DooMLoRD, [NUT], krabappel2548

Version Information
Status: Testing
Current Beta Version: 0.3
Beta Release Date: 2013-10-15

Created 2013-09-23
Last Updated 2013-10-19
 

raimondomartire

Senior Member
Nov 9, 2005
3,582
4,894
Salerno
Look also L2 Error detected! in 1089 Line. Usb don't work right and i think because we can't write in memory stack stack(0xe4859e70 to 0xe4859eb8) for lock bootloader. Problem it's in arch / arm / mach-msm but i don't find where!
 

Bin4ry

Inactive Recognized Developer
Nov 14, 2008
2,007
5,906
Berlin
Oh now I got marked. I'll take a look at the weekend I don't have time Today sorry!

But just for me to know, ist that selfcompiled or a copy n paste version with a unpacked -> repacked ramdisk?
Have you checked against my posted recovery in Z Ultra forums? I can remember there was a similar problem on the locked bl recovery, you guys really seem to screw it somehow.
Also can i get a gdrive link to the files? Then I can grab it over my different systems more easy ;)

Gesendet von meinem C6903 mit Tapatalk 4
 
Last edited:
  • Like
Reactions: pivop and [NUT]

[NUT]

Senior Member
Oh now I got marked. I'll take a look at the weekend I don't have time Today sorry!

But just for me to know, ist that selfcompiled or a copy n paste version with a unpacked -> repacked ramdisk?
Have you checked against my posted recovery in Z Ultra forums? I can remember there was a similar problem on the locked bl recovery, you guys really seem to screw it somehow.
Also can i get a gdrive link to the files? Then I can grab it over my different systems more easy ;)

Gesendet von meinem C6903 mit Tapatalk 4

It was a self-compiled version by @DooMLoRD, with a ramdisk slightly modified to get it to work for the Z1. What did you do to get it to work on the ZU? @krabappel2548 tried and failed there too...

EDIT: Just to be clear: it's not that the recovery does not work, it does, it's the kernel which triggers a reboot after 40 seconds because it seems to be unable to initialize the modem.
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,191
39,698
Pune
Oh now I got marked. I'll take a look at the weekend I don't have time Today sorry!

But just for me to know, ist that selfcompiled or a copy n paste version with a unpacked -> repacked ramdisk?
Have you checked against my posted recovery in Z Ultra forums? I can remember there was a similar problem on the locked bl recovery, you guys really seem to screw it somehow.
Also can i get a gdrive link to the files? Then I can grab it over my different systems more easy ;)

Gesendet von meinem C6903 mit Tapatalk 4

the boot hijack scripts, chargemon, are based on the ones for Xperia Z by @[NUT], with the necessary modifications, if any, for Xperia Z1

the ramdisks for the recoveries are using the same CPIO as the ones for unlocked bootloader...

recovery works well on unlocked bootloader with recovery integrated in kernel ramdisk...

will send u link over gtalk ;)


did u post recovery for LOCKED bootloaders for Z Ultra?
 
  • Like
Reactions: rambo420

Bin4ry

Inactive Recognized Developer
Nov 14, 2008
2,007
5,906
Berlin
Ok i did some first tests!
My own recovery works (see cm boot.img !). But this one does not work when ramdisk-recovery is integrated into your dualboot script!

So it is definetly a problem with the services from the "host" system. The ramdisks which get extracted also work fine when integrated into cm boot.img!

So wild guess here: You try to stop all services from host system but it seems not to work, since you dont really need anything running for recovery, but some of the host services dont want to stop here and waiting for the system to bootup. SOMETHING seems to reboot it then when nothing is happening :p
Need to see deeper whats happening, its quite a funny problem i think :p

Regards
 
  • Like
Reactions: delewer and harfot

[NUT]

Senior Member
Ok i did some first tests!
My own recovery works (see cm boot.img !). But this one does not work when ramdisk-recovery is integrated into your dualboot script!

So it is definetly a problem with the services from the "host" system. The ramdisks which get extracted also work fine when integrated into cm boot.img!

So wild guess here: You try to stop all services from host system but it seems not to work, since you dont really need anything running for recovery, but some of the host services dont want to stop here and waiting for the system to bootup. SOMETHING seems to reboot it then when nothing is happening :p
Need to see deeper whats happening, its quite a funny problem i think :p

Regards

Did you find anything useful yet?

I've been wandering around in the files again myself, i've checked the qcom modem init already but i rechecked it, it seems that before chargemon is started, it already initialized a lot of the radio/modem hardware... it seems that at least one service is responsible for the communications layer between the kernel and modem, but I have been unable to determine which one... seeing the 40 second timeout before a reboot occurs it probably accounts for the service needing some time to start up.
 

jos_031

Senior Member
Feb 21, 2011
393
201
London
Since kernel have initiated the modem, is it possible to write a procedure to set smem_get_entry flag. most likely to assign flag one to it.. New to android development..When i program a micro controller..we will be checking a flag in modem to see if it is initiated.. or sometimes.. i assigns a variable or memory address...so instruction will check that location for status rather than checking modem flag...as it takes more cycles...so i think this may be clearing some flags or memory or variable....
 
Last edited:
  • Like
Reactions: [NUT]

Bin4ry

Inactive Recognized Developer
Nov 14, 2008
2,007
5,906
Berlin
I did not had time yet to continue working but boyhood you guys should be correct. I am just thinking of the easiest way to fix it. Give me some more days please ;)

Gesendet von meinem C6833 mit Tapatalk 4
 

[NUT]

Senior Member
I did not had time yet to continue working but boyhood you guys should be correct. I am just thinking of the easiest way to fix it. Give me some more days please ;)

Gesendet von meinem C6833 mit Tapatalk 4

I've had a chat about it with Dees Troy from TWRP about it, he suggested RIL as a possible culprit, or maybe watchdogd...

I don't have a z1 so I'm unable to test it on my own...

Sent from my C6603 using xda app-developers app
 

jos_031

Senior Member
Feb 21, 2011
393
201
London
I've had a chat about it with Dees Troy from TWRP about it, he suggested RIL as a possible culprit, or maybe watchdogd...

I don't have a z1 so I'm unable to test it on my own...

Sent from my C6603 using xda app-developers app

For watchdog to reset an unexpected condition should occur.. for that something else have to go wrong...


and not sure- Radio Interface Layer is it not part of baseband?
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 52
    info:

    this is based on the XZU recovery for locked bootloaders by @Krabappel2548

    This thread will stay a dev and discussion thread for further development issues and fixes!

    Download link can be found here: XZU recovery for locked bootloaders

    THIS IS INTENDED FOR LOCKED BOOTLOADER DEVICES! But works on Unlocked bootloader too


    THIS IS STILL IN DEVELOPMENT STAGE!


    DO NOT EXPECT IT TO WORK PROBLEM FREE!


    requirements:

    rooted Xperia Z1


    how to enter recovery:

    when you see the Sony bootlogo and when device vibrates/leds light up u can use the entry keys to enter the corresponding recovery

    VOLUME UP -> CWM
    VOLUME DOWN -> TWRP


    what works:

    BOTH CWM 6.0.3.6 and TWRP 2.6.3.0 work
    you can enter both recoveries and flash small files


    what doesnt work:

    in this particular version of CWM, adb doesnt work; it will be fixed later.. for debugging use TWRP

    Shoudl be fixed:
    TWRP and CWM both can destroy /cache and /system when trying to format it. Restoring your phone using an FTF is the only option left if that happens. You can however try to not format but use rm -rf instead in TWRP (TIC BOX!!), which will do for now.

    regards,

    Krabappel2548,
    [NUT]
    DooMLoRD

    Last edit by Krabappel2548 on 19-10-'13

    XDA:DevDB Information
    Dual Recovery for Xperia Z1 (LOCKED BOOTLOADERS), a Tool/Utility for the Sony Xperia Z1

    Contributors
    DooMLoRD, [NUT], krabappel2548

    Version Information
    Status: Testing
    Current Beta Version: 0.3
    Beta Release Date: 2013-10-15

    Created 2013-09-23
    Last Updated 2013-10-19
    14
    OK..

    I have no more 40sec reboot bug now.

    I backup my system by TWRP in this moment... work fine

    I can't mount external storage for now... another bug..

    I have change a lot of stuff in cpio CWM (cleam cpio), but not relevant for now.


    To repair the 40sec bug, do this :

    change in /system/bin/dualrecovery.sh
    <code>
    ECHOL "Start time_daemon..."
    /system/bin/time_daemon &
    EXECL sleep 2
    ECHOL "Kill time_daemon..."
    EXECL kill -9 $(ps | grep time_daemon | grep -v "grep" | awk -F' ' '{print $1}')
    </code>
    by
    <code>
    #ECHOL "Start time_daemon..."
    #/system/bin/time_daemon &
    #EXECL sleep 2
    #ECHOL "Kill time_daemon..."
    #EXECL kill -9 $(ps | grep time_daemon | grep -v "grep" | awk -F' ' '{print $1}')
    </code>
    12
    OK..

    I have no more 40sec reboot bug now.

    I backup my system by TWRP in this moment... work fine

    I can't mount external storage for now... another bug..

    I have change a lot of stuff in cpio CWM (cleam cpio), but not relevant for now.


    To repair the 40sec bug, do this :

    change in /system/bin/dualrecovery.sh
    <code>
    ECHOL "Start time_daemon..."
    /system/bin/time_daemon &
    EXECL sleep 2
    ECHOL "Kill time_daemon..."
    EXECL kill -9 $(ps | grep time_daemon | grep -v "grep" | awk -F' ' '{print $1}')
    </code>
    by
    <code>
    #ECHOL "Start time_daemon..."
    #/system/bin/time_daemon &
    #EXECL sleep 2
    #ECHOL "Kill time_daemon..."
    #EXECL kill -9 $(ps | grep time_daemon | grep -v "grep" | awk -F' ' '{print $1}')
    </code>

    Thanks a lot!!

    I'll release a beta based on this before this Sunday ends :D :thumbup:

    Sent from my C6603 using xda app-developers app
    7
    Additionnal information :

    "time_daemon" provide to give a correct time to device in "recovery mode" ; So, now the lines are unactivated in the "recovery.sh" script, we have bad time and hour in device and with the NANDROID files.

    It seem what it's not the daemon which reboot the device, but the "kill -9"

    So, i have tested, and work fine with this line activated :
    /system/bin/time_daemon &

    So, just add comment before the other lines i have notice in previous post, and let the time_daemon line "activated"

    Hour and date are correct, and no boot problems.


    It's just the beginning....
    6
    yes! with this fix recovery in your rom works fine except mounting from pc. :)

    fixed em all. but got delays before device listed in adb when in recovery. (same like happens to XZ, only shows up <= 2mins) :good:

    Here is complete package + my modded TWRP
    DooMLoRD-NUT-Z1-DualRecovery-LOCKED.7z (6.0 MB)