FORUMS
Remove All Ads from XDA

[DEV][THINK TANK] Two step booting process on the Z2?

13,204 posts
Thanks Meter: 39,797
 
Post Reply Email Thread
3rd June 2014, 06:52 AM |#21  
DooMLoRD's Avatar
OP Recognized Developer
Flag Pune
Thanks Meter: 39,797
 
More
Quote:
Originally Posted by adfad666

Z2 is definitely aligned to the power button, like the rear logo too!

Attachment 2777337

ya exactly! i was just going to say the same thing!

(sorry for OT)


coming back to the topic... can we actually use this in some way?
 
 
5th June 2014, 08:38 PM |#22  
Junior Member
Thanks Meter: 0
 
More
So on this two step booting process, is that why I somehow have TWO recoveries installed at the same time? I installed DoomKernel as part of my original rooting process. I then installed Monx Rom, which installed TWRP. Using Rom Manager, I tried to put CWM back. Now, whenever I reboot to recovery, CWM will come up, but when I reboot system from CWM, it boots to TWRP. From there, when I reboot system, it then boots up to system. Some weird side effects to this too. I lose some installed apps when I finally get back to Android. RSA Secure ID and Go Launcger Ex seem to be the two that are constantly being "forgotten" when I go through this cycle. Also, I did a "Erase SD" from the settings menu. All was good, Ext SD was functioning fine, nice and clean. Then, Reboot recovery and go through the who double recovery cycle and WHAM! My ext sd has ALL the data I erased back on it.

So, is this double boot process you speak of responsible for this behavior?

Thanks,

-Hans
5th June 2014, 08:48 PM |#23  
DooMLoRD's Avatar
OP Recognized Developer
Flag Pune
Thanks Meter: 39,797
 
More
Quote:
Originally Posted by Hans.physics

So on this two step booting process, is that why I somehow have TWO recoveries installed at the same time? I installed DoomKernel as part of my original rooting process. I then installed Monx Rom, which installed TWRP. Using Rom Manager, I tried to put CWM back. Now, whenever I reboot to recovery, CWM will come up, but when I reboot system from CWM, it boots to TWRP. From there, when I reboot system, it then boots up to system. Some weird side effects to this too. I lose some installed apps when I finally get back to Android. RSA Secure ID and Go Launcger Ex seem to be the two that are constantly being "forgotten" when I go through this cycle. Also, I did a "Erase SD" from the settings menu. All was good, Ext SD was functioning fine, nice and clean. Then, Reboot recovery and go through the who double recovery cycle and WHAM! My ext sd has ALL the data I erased back on it.

So, is this double boot process you speak of responsible for this behavior?

Thanks,

-Hans

No

Sent from my D6503 using XDA Free mobile app
5th June 2014, 09:14 PM |#24  
defsix's Avatar
Senior Member
Thanks Meter: 79
 
More
Quote:
Originally Posted by Hans.physics

So on this two step booting process, is that why I somehow have TWO recoveries installed at the same time? I installed DoomKernel as part of my original rooting process. I then installed Monx Rom, which installed TWRP. Using Rom Manager, I tried to put CWM back. Now, whenever I reboot to recovery, CWM will come up, but when I reboot system from CWM, it boots to TWRP. From there, when I reboot system, it then boots up to system. Some weird side effects to this too. I lose some installed apps when I finally get back to Android. RSA Secure ID and Go Launcger Ex seem to be the two that are constantly being "forgotten" when I go through this cycle. Also, I did a "Erase SD" from the settings menu. All was good, Ext SD was functioning fine, nice and clean. Then, Reboot recovery and go through the who double recovery cycle and WHAM! My ext sd has ALL the data I erased back on it.

So, is this double boot process you speak of responsible for this behavior?

Thanks,

-Hans

Quote:
Originally Posted by DooMLoRD

No

Sent from my D6503 using XDA Free mobile app

LOL !

As for the dual recovery problem, i'd a similar problem on a Sony Tablet S , one boot cycle i had root and X number of apps, on the second boot i had no root and Y number of apps.
Factory reset , full re-flash, factory reset and finally root was the only way I got it back to normal.
6th June 2014, 10:28 AM |#25  
vishal_android freak's Avatar
Recognized Developer / Recognized Contributor
Flag Mumbai
Thanks Meter: 5,505
 
Donate to Me
More
Quote:
Originally Posted by Hans.physics

So on this two step booting process, is that why I somehow have TWO recoveries installed at the same time? I installed DoomKernel as part of my original rooting process. I then installed Monx Rom, which installed TWRP. Using Rom Manager, I tried to put CWM back. Now, whenever I reboot to recovery, CWM will come up, but when I reboot system from CWM, it boots to TWRP. From there, when I reboot system, it then boots up to system. Some weird side effects to this too. I lose some installed apps when I finally get back to Android. RSA Secure ID and Go Launcger Ex seem to be the two that are constantly being "forgotten" when I go through this cycle. Also, I did a "Erase SD" from the settings menu. All was good, Ext SD was functioning fine, nice and clean. Then, Reboot recovery and go through the who double recovery cycle and WHAM! My ext sd has ALL the data I erased back on it.

So, is this double boot process you speak of responsible for this behavior?

Thanks,

-Hans

Afaik, rom manager will install a recovery. tar format of recovery which works on chargemon hacking. Bcz we don't have a separate partition for recovery here. So that's why cwm exist in your system and twrp in your kernel :P

Sent from my Nexus 5 using Tapatalk
6th June 2014, 09:50 PM |#26  
waynekirby's Avatar
Senior Member
Flag Barnsley
Thanks Meter: 534
 
Donate to Me
More
Quote:
Originally Posted by vishal_android freak

Afaik, rom manager will install a recovery. tar format of recovery which works on chargemon hacking. Bcz we don't have a separate partition for recovery here. So that's why cwm exist in your system and twrp in your kernel :P

Sent from my Nexus 5 using Tapatalk

But we have FOTA kernel partition do we not? Wouldn't we be able to utilise that for dualbooting?

Sent from my D6503 using Tapatalk
8th June 2014, 11:26 AM |#27  
Member
Thanks Meter: 20
 
More
Quote:
Originally Posted by waynekirby

But we have FOTA kernel partition do we not? Wouldn't we be able to utilise that for dualbooting?

Sent from my D6503 using Tapatalk

I was just thinking about this while looking at the ROMs on offer at the moment. The googymax kernel I had on my S3 was great as it allowed me to use a stock ROM I could quickly boot in to and record in amazing quality instead of the custom ROM as that used the CM camera which couldn't use the same drivers as the official camera. The kernel also messed with my partitions and uninstalling it led me to have two recoveries, a CWM and a TWRP.

I'd love to see multiboot so I still have the bonus of a custom ROM but still have the option to boot to stock if I want better camera stuff.
1st October 2014, 11:25 AM |#28  
Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by DooMLoRD

Hey guys I dont know how many of you have noticed this but the Xperia Z2 has a "two step" booting process... first an initial kernel is booted, the one which shows the "Sony" logo.. and after that the custom kernel get booting... it might be using some sort of Kexec may be?

i noticed this when i saw that it was taking longer in boot process and it was not showing my custom bootlogo... so i investigated and this is waht i found in the dmesg:

Code:
root@D6503:/ # dmesg | grep logo
dmesg | grep logo
<6>[    3.378925] Skip drawing logo. Already drawn in boot.
<3>[    9.679902] init: cannot open '/initlogo.rle'
if i compare it against the Z1:
Code:
root@C6902:/ # dmesg | grep logo
dmesg | grep logo
<6>[    4.366685] Drawing logo.
<3>[   10.875083] init: cannot open '/initlogo.rle'
root@C6902:/ #
i have hacked the code to show my custom bootlogo so i am happy but it might be interesting to see what we can do if we can access that "base kernel"... may be we can explore proper multi-boot solutions?


what do you guys think?




P.S.: this is ment ONLY for DEVELOPERS to discuss... noobs/thank-you posts ARE NOT WELCOME!

only post if you have something useful to contribute...



regards,

DooMLoRD

Do you know how can I disable that sony boot logo?
The Following User Says Thank You to HenryAdda For This Useful Post: [ View ] Gift HenryAdda Ad-Free
28th July 2016, 11:48 PM |#29  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by DooMLoRD

Hey guys I dont know how many of you have noticed this but the Xperia Z2 has a "two step" booting process... first an initial kernel is booted, the one which shows the "Sony" logo.. and after that the custom kernel get booting... it might be using some sort of Kexec may be?

Did you manage to solve this? Any hints?
30th July 2016, 10:21 AM |#30  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by DooMLoRD

Hey guys I dont know how many of you have noticed this but the Xperia Z2 has a "two step" booting process... first an initial kernel is booted, the one which shows the "Sony" logo.. and after that the custom kernel get booting... it might be using some sort of Kexec may be?
DooMLoRD

@DooMLoRD I was able to locate the boot logo in my Z3C, i think in Z2 it is similar.

It is stored inside the aboot image, as a LZ4-compressed data. , which is decompressed shortly after display is initialized.

I used IDA-pro to dissassemble the aboot image as it is said in http://newandroidbook.com/Articles/aboot.html (strip the header, and provide correct "loading offset" from ImgBase from the header)
then i found "Decompressing logo failed" string in it, and a place where it is printed (dprintf)
right before it there is a call to function, which looks like LZ4_decompose_safe() and a little before it there are its arguments -- pointer to compressed data and size
(in my case: 7545 bytes at 0x0004a67c in the aboot image file)

some sorces of LK-loader and grub4android sources helped me a lot.

so, i see a way to replace it as:
1. compress the logo by LZ4
2. if it smaller than 7545 bytes, you can replace the original one, and fix the size constant (dword at 12 bytes before it)
3. or append the custom logo at the end of the image and fix the aboot headers, and data adresses inside the code.

I DID NOT test it yet, but I'll post the results as soon as get to this.
The Following 2 Users Say Thank You to svshift For This Useful Post: [ View ] Gift svshift Ad-Free
1st August 2016, 05:56 PM |#31  
Junior Member
Thanks Meter: 2
 
More
well, look like sony does not like tempering with aboot at all. It is impossible to reflash it via fastboot command,
and once i did it on the device with dd command, it simply bricked. completely. not even the fastboot. and i am sure, that i did not break any code section. I modified only the necessary constants and image data, i double checked.
now i'll have to wait to get to the closest JTAG debugger-reflasher, to see what's wrong there ж)
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes