FORUMS
Remove All Ads from XDA

[LB] The definitive root Remount-Reboot fix!

5,379 posts
Thanks Meter: 10,419
 
Post Reply Email Thread
11th June 2013, 01:38 PM |#11  
Carceri's Avatar
Member
Flag Aarhus
Thanks Meter: 35
 
More
My daemon does exit once it has killed ric and made sure it cannot start again.

Whatever respawns init keeps checking, so deleting the file, making it non executable or replacing it with a dummy all works. If you chmod 755 it again, ric does respawn on my phone, so something (probably init) keeps trying to start it if it isn't running.

On my phone (before killing ric) mounting / rw does not cause a reboot, but mounting /system rw does. Weird.
 
 
11th June 2013, 02:41 PM |#12  
Quote:
Originally Posted by Carceri

My daemon does exit once it has killed ric and made sure it cannot start again.

Whatever respawns init keeps checking, so deleting the file, making it non executable or replacing it with a dummy all works. If you chmod 755 it again, ric does respawn on my phone, so something (probably init) keeps trying to start it if it isn't running.

On my phone (before killing ric) mounting / rw does not cause a reboot, but mounting /system rw does. Weird.

That would be init indeed, as it's a service without 'oneshot' (fires only once, then init stops monitoring) or 'disabled' (init never fires it but it waits for an explicit call to get that service started).

I've found a guide on the Android init daemon/process, I'll post a link to it in this thread tonight, it's an interesting read

I never tried to restart the init process to be able to disable the service though, might be attempting to do so some day. It is what the recoveries do with the chargemon hijack method, they stop all services, unmount everything, cleans up the ramdisk and then unpacks the recovery to start it's init binary.

I'll try that some time soon and see if that will work as well, that would probably be the cleanest way, it would render killric.sh and your application useless as they would no longer be needed, simplifying and 'niceifying' the entire process.
12th June 2013, 01:56 PM |#13  
shoey63's Avatar
Recognized Contributor
Flag Somewhere in Oz...
Thanks Meter: 3,608
 
Donate to Me
More
Yep, this fix works perfectly!
Flashed stock .307, unlocked bootloader, flashed @DooMLoRD kernel then rooted through recovery, flashed root fix, flashed stock .307 kernel and then restored TA partition.
Rebooted and used Root explorer in system with R/W permissions. No reboots
Congrats @[NUT]
The Following User Says Thank You to shoey63 For This Useful Post: [ View ] Gift shoey63 Ad-Free
12th June 2013, 03:51 PM |#14  
@Carceri

Quote:
Originally Posted by [NUT]

I never tried to restart the init process to be able to disable the service though, might be attempting to do so some day. It is what the recoveries do with the chargemon hijack method, they stop all services, unmount everything, cleans up the ramdisk and then unpacks the recovery to start it's init binary.

I'll try that some time soon and see if that will work as well, that would probably be the cleanest way, it would render killric.sh and your application useless as they would no longer be needed, simplifying and 'niceifying' the entire process.

I've been experimenting with that and so far I have not been very successful... apart from not working as i hoped (it reboots after the second init attempt), it also repeats a few parts of the boot process as crtlaltdel is executed too late during the init and thus it will allow you to enter recovery twice for example

It might be needed to re-hijack the chargemon process as this is executed precisely at the right time for this idea to work... but doing so will break compatibility with all available recoveries... and throws in some caveats for the recovery users... just the thing i was trying to fix for all and any of the Z/ZL lovers

Stuff to ponder on...

*ponders on* Maybe I can use the ctrlaltdel script to 'fix' anything that breaks and then trigger a reboot to make sure the user gets to boot in to a good working android...

chargemon would be my new rickiller script, it checks for the flagfile it creates itself, if it's not found it will do the RIC fix, then create's the flagfile and restarts init. With the second init it will find the flagfile and will execute the re-hijacked chargemon hijack script to offer recovery. If not chosen to enter recovery it will just continue boot.

Once ctrlaltdel gets started it checks if the md5sum of the chargemon script is what it's supposed to be. If not, it will create a backup of that chargemon file for execution by the re-hijacked chargemon script that it copies from a backup file somewhere (probably simply in /system/bin) corrects permissions and then triggers a reboot...
13th June 2013, 12:21 AM |#15  
PRECAUTION: This post is on the file attached, it has no meaning regarding the OP: that fix works just fine.

Well, I'm putting my scripting online that i wrote on the above idea for those in the know, I'm not sure why it does not work but

THIS DOES NOT WORK

For anyone who wants to help out, you are welcome to take a look... you can even try it (put the 2 files inside /system/bin) but note the warning above...

To recover from the tantrum it throws, be sure to have an unlocked bootloader and DooMKernel installed. You will need TWRP to get you out of trouble, which is easy: mount system, use advanced -> filemanager and look inside /system/bin. chmod chargemon and ctrlaltdel to 644. Reboot and you're out of trouble.

Who has any idea why this does not work?
Attached Files
File Type: gz fixer2.tar.gz - [Click for QR Code] (1.6 KB, 115 views)
14th June 2013, 06:24 PM |#16  
Senior Member
Flag Zurich, Switzerland
Thanks Meter: 41
 
Donate to Me
More
well, it sadly doesn't help me.. I'm on Odexed Stock ROM .307

if I try to rename / delete / add an apk into /system/app/ my phone still reboots..
14th June 2013, 07:55 PM |#17  
Quote:
Originally Posted by FSN

well, it sadly doesn't help me.. I'm on Odexed Stock ROM .307

if I try to rename / delete / add an apk into /system/app/ my phone still reboots..

Can you check if there is a file called killedric in /tmp?

Sent from my C6603 using xda app-developers app
14th June 2013, 07:57 PM |#18  
Senior Member
Flag Zurich, Switzerland
Thanks Meter: 41
 
Donate to Me
More
Quote:
Originally Posted by [NUT]

Can you check if there is a file called killedric in /tmp?

Sent from my C6603 using xda app-developers app

I don't have this file. Locked BL, flashed w/ TWRP 2.4.0.0
14th June 2013, 08:53 PM |#19  
Quote:
Originally Posted by FSN

I don't have this file. Locked BL, flashed w/ TWRP 2.4.0.0

Right, then check things in succession, stop and report which you stopped at:

1. Check if /system/bin/killric.sh exists.
2. Open /system/bin/ctrlaltdel to see if it looks like the one on the OP.
3. Open a terminal app and see if killric.sh is running by typing the command 'ps | grep killric.sh'

If you have to say no to 1 and 2, reflash the zip. Then try again, if it still fails send me the logs from /cache/recovery

Sent from my C6603 using xda app-developers app
14th June 2013, 08:59 PM |#20  
Senior Member
Flag Zurich, Switzerland
Thanks Meter: 41
 
Donate to Me
More
Quote:
Originally Posted by [NUT]

Right, then check things in succession, stop and report which you stopped at:

1. Check if /system/bin/killric.sh exists.
2. Open /system/bin/ctrlaltdel to see if it looks like the one on the OP.
3. Open a terminal app and see if killric.sh is running by typing the command 'ps | grep killric.sh'

If you have to say no to 1 and 2, reflash the zip. Then try again, if it still fails send me the logs from /cache/recovery

Sent from my C6603 using xda app-developers app

1. Yes
2. Yes
3. If it returns 1 it runs, right?

Could it have something to do with the exFAT patch (for 64GB sd cards)?
14th June 2013, 09:54 PM |#21  
Quote:
Originally Posted by FSN

1. Yes
2. Yes
3. If it returns 1 it runs, right?

Could it have something to do with the exFAT patch (for 64GB sd cards)?

No, tbh... If it returns 1 it didn't find it.

I don't know about how the exfat patch works... So I'm not in the position to answer that question... Yet. I'll be working on exfat support for XZDualRecovery in the coming week, so I'll know more about it then.

Sent from my C6603 using xda app-developers app
Post Reply Subscribe to Thread

Tags
awesomeness!, cwm, recovery, remount, root

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

Advanced Search
Display Modes