yashsingh1/xdaforums huggingface dataset:
[Motorola Atrix 2] rdavisct:
CWM ON EVERY BOOT WITH GPS WORKING

What Is This??

This is a mod to achieve ClockWorkMod Recovery on Every reboot/boot with a fully functioning GPS. So far this is the only method to have CWM On boot without breaking GPS.This methos uses IBMc PowerBoost 2.0.
​

Things you will need:

1. Jrummy16's BusyBox Installer (download on market)

2. Download PB-2dot0_final.zip and place on sdcard

3. Terminal Emulator (download on market)

INSTRUCTIONS:

Step 1. Reboot into CWM using Atrix Bootstrapper and

Step 2. flash PB-2dot0_final.zip and reboot

Step 3. Once rom loads up , uninstall AtrixBootstrapper or set permissions in SuperUser for it to "denied" (i would uninstall AtrixBootstrapper after quickly setting to deny,you wont need it)

Step 4. Download Jrummy16's Busybox Installer from market,open it,and click install. You want to install latest 1.19 Busybox over 1.17 that you probably have. looks like this:

Step 5. Open Terminal emulator and type the following one line at a time,hitting ENTER after each line is typed:

su

mount -o rw,remount /dev/block/mtdblock3 /system

chmod 755 /system/xbin/powerboost

powerboost

now you should see this:

Step 6. It will ask you if you want it to install Jrummy16's BusyBox Installer,just type N for "No" and hit enter as we already installed this.

Step 7. Now it will Prompt you to select a number. type in 5. "CWR On Every Boot"

Step 8. After "Installation Complete" only takes about 2 seconds, you will type 8 for a Reboot,and type Y for yes.

Step 8. Enjoy!

If you like my work,hit the thanks button,if not,hit the back button : P

If you plan on using this in your projects all i ask is for you to simply credit me in your OP.

CREDITS: BMc08GT (creator of the PowerBoost Script)
[Motorola Atrix 2] Gadgetz:
You are the man!

Thanks....cant hit the button on my mobile app but will when i get to my pc.

So terminal emulator, can that always be used to push adb commands?
[Motorola Atrix 2] rdavisct:
yes and no, for apks i run adb from pc otherwise u run into problems.
[Motorola Atrix 2] bookhouseboy23:
Does this also fix the battery issue where it won't turn on or charge from 0%?

Sent from my MB865 on lfaber06's Supercharged ROM V 5, Update 2
[Motorola Atrix 2] partie:
You're my hero today. Ha! Thanks for this...
[Motorola Atrix 2] nephillim:
Out of curiosity... Does this work with PB 2.5 as well?
[Motorola Atrix 2] cogeary:
This is great, thanks a lot rdavisct!
[Motorola Atrix 2] :
Edit: Nevermind, figured it out.
[Motorola Atrix 2] KEB64:
Question

Question. Does the bug still exist wherein the battery discharges completely and the phone is unable to regain a charge with CWM on Recovery script installed? I haven't personally experienced this because I've never let my battery drain. I've seen it posted in another thread.

http://xdaforums.com/showthread.php?t=1543792&page=12
[Motorola Atrix 2] rdavisct:
Yea thats his phone.not a roms doing
[Motorola Atrix 2] rdavisct:
So to answer ur question no,u have nothing to worry about
[Motorola Atrix 2] KEB64:
Oh I thought it was a cwm on recovery exclusive bug. BTW, congratulations on inheriting ifaber's work. I'm looking forward to V6. V5 is one of my favorites.
[Motorola Atrix 2] 41rw4lk:
I can't get the script to stick. After I do the setup and reboot, I boot into CWM like it should, but once I power off and boot again it just boots normally. I followed the directions exactly, and tried the process again, but the same results.

I assume it's because I'm not creating this script where it wants to go. Any advice or help? Thanks

I should note that I'm on stock 3.6 and have only rooted and installed the bootstrapper previously.
[Motorola Atrix 2] rdavisct:
Sounds like you are not mounting the /system first. Make sure u type it exactly in terminal emulator as i posted before running powerscript like so "mount -o /dev/block/mtdblock3 /system" without the quotes
[Motorola Atrix 2] KEB64:
Does the removal script work with this setup?
[Motorola Atrix 2] 41rw4lk:
I typed it just as it is, and even done it in adb shell with copy and paste, but it would never create the init.d folder or the 99cwr script. So I opened root explorer to see what was going on. The system was mounted as rw, but it just wouldn't create it. So I made the init.d folder myself and ran powerboost again and it created the 99cwr script, but still, normal bootup. I guess it needs to be called during boot or whatever, but idk where to set that. Any suggestions or advice? Thanks
[Motorola Atrix 2] cogeary:
It's because the stock ROM doesn't have init.d support. Flash this then try again.
[Motorola Atrix 2] 41rw4lk:
Nice! That was it. Everything works as it should now. Thanks
[Motorola Atrix 2] rdavisct:
Sorry. Read too fast.assumed you were already had init.d support
[Motorola Atrix 2] ewandroid:
i still can't get it to work..me also have the same problem as @41rw4lk,but after i flash the init.d file I still cannot get it to work:'(

stock rooted 2.3.6

---------- Post added at 07:00 PM ---------- Previous post was at 06:33 PM ----------

sorry a noob question, where do i need to install the busybox? system/bin or system/xbin
[Motorola Atrix 2] Calundle:
Do we have to remove the original CWM on boot script first? I applied it and get CWM on boot, but no GPS lock.
[Motorola Atrix 2] 41rw4lk:
If you have init.d support, d/l Jrummy16's busybox installer, open it, and just click install. That will install bb1.9+ where it belongs. Open terminal, su, remount system "mount -o rw,remount /dev/block/mtdblock3 /system" then type powerboost and finish off like the tutorial says. Should be good to go.

Note - Make sure you have the Atrixbootstrapper set to denied and uninstalled.
[Motorola Atrix 2] ari197:
do we have to use that particular busybox ?

thing is, for some reason, Play Store said that the apps is incompatible with my phone (probably because I'm outside the US) ..

or can I use the installer from the script ?
[Motorola Atrix 2] 41rw4lk:
I don't know about the script, I assume it would just install busybox but I don't know that for sure, nor do I know what version. There is another installer app that should work for you here. I installed version 1.19.4 with jrummy16's installer and the installer I linked to is capable of doing the same with the same version. If that doesn't work for you, then maybe another member can get you where you need to be. I hope that helps.
[Motorola Atrix 2] ari197:
I actually had that busybox installed already .. but I think some busybox had some different parameters (or maybe some missing tools) compared to the others ..

anyway, let me try .. hopefully, even if it fails, it doesn't break the phone :D
[Motorola Atrix 2] alcatel444:
Hello,

I installed successfully . and also uninstalled and set to deny for bootstrap but still the GPS is not accurate and many times not working . Any Solutions?

Thanks
[Motorola Atrix 2] rdavisct:
What rom are you running it on?
[Motorola Atrix 2] alcatel444:
Thanks for your quick reply

Thanks for your quick reply . i am running on stock deoxded rom + arabic patch applied nothing more nothing less. another issue i just found it only booted once into recover then it never booted into recovery
[Motorola Atrix 2] rdavisct:
Does it already have init.d support? ..check a couple posts back in this thread. Cogeary posted a link to enable init.d support.that is my first guess
[Motorola Atrix 2] bfinch:
I am also having the same problem. I did flash the init zip posted in the thread. I am running stock 2.3.6 rooted and nothing else. I didn't have Bootstrapper installed before this and denied permission/unistalled it properly. Any ideas?
[Motorola Atrix 2] rdavisct:
Honestly i am not there to see what u may be doing wrong. I would say start over. Double check your steps and try again. Sorry that i have no direct answer to why you are having issues.
[Motorola Atrix 2] chrisn91:
Not sure what I'm doing wrong I keep getting powerboost access denied. I'm using stock 2.3.6 rooted
[Motorola Atrix 2] mlcraig58:
You need a space between the chmod 755 and /system/xbin/powerboost
[Motorola Atrix 2] kojitabe:
does it works on stock rom 2.3.6 (odex)?

Please confirm if this works,because i like to use cwm on boot,but gps doesn't works is sucks.

Thanks everyone.
[Motorola Atrix 2] rdavisct:
Yes ,it does.
[Motorola Atrix 2] kojitabe:
Okay,i'll give it a try and will report back.

Thanks a lot rdavisct
[Motorola Atrix 2] kirkgbr:
I have never used powerboost but based on your screenshot, You are missing spaces between objects in your commands.

The first is:

mount -o rw,remount /dev/block/mtdblock3 /system

The second, as mlcraig58 already pointed out, is:

chmod 755 /system/xbin/powerboost
[Motorola Atrix 2] chrisn91:
Thanks for the help guys got it up and running
[Motorola Atrix 2] kindacrazyazn:
Congrats rdavisct for being featured on the xda portal!!!! you definitely deserve it. sorry this has nothing to do with the actual thread.
[Motorola Atrix 2] dickluo:
Is this work on ME865？
[Motorola Atrix 2] rdavisct:
Yes
[Motorola Atrix 2] socialx:
yes but not on 4.0
[Motorola Atrix 2] shamsud:
It does work on ics just flash init.d (see post 17)

after flashing create init.d folder in system/etc and follow the above steps
[Motorola Atrix 2] socialx:
let me try again.

I tried . It now does boot the recovery everytime I reboot the phone but the GPS is still missing and there is system updates everytime I reboot the phone. I think there are somethings wrong of the setting but I won't deal with it until the next update. Thank you very much.
[Motorola Atrix 2] shamsud:
will check gps later but no system update problem here
[Motorola Atrix 2] darchrnep:
i am having the same problem

whereby i am sure i flash the init.d script...

but i am getting an error

cp: can't create '/system/etc/init.d/99cwr : no such file in directory

---------- Post added at 01:48 PM ---------- Previous post was at 01:40 PM ----------

found the problem...

sorry for time wasting:angel:
[Motorola Atrix 2] sharingan92:
tried to flash zip but got E: cant open /sdcard/download/pb-2dot0_final_fixed (1).zip

(bad)

installation aborted

any ideas?? i have init.d and rooted stock rom
[Motorola Atrix 2] 41rw4lk:
Rename the zip from pb-2dot0_final_fixed (1).zip to pb-2dot0_final_fixed.zip

If that doesn't work just delete the copies you have, re-d/l and try again.
[Motorola Atrix 2] sharingan92:
all working fine now thank you but figured out powering off from recovery will cause it not to boot into recovery wen device is turned on again
[Motorola Atrix 2] :
Installed busy box v 1.19 . Where to type d commands ? I don't see anything called emulator here!
[Motorola Atrix 2] chrisn91:
U have to download the app called terminal emulator
[Motorola Atrix 2] :
Ok sorry for d qsn . got it now.:)
[Motorola Atrix 2] 41rw4lk:
Working Method for ICS (4.0.4) Leak?

I tried to set this up on the ICS leak. The procedure works, but the settings won't stick. I assume it's init.d related. Any advice or suggestions? The init.d support zip previously mentioned is a no go, most likely incompatible with ICS?
[Motorola Atrix 2] rdavisct:
Im looking into it today.one thing at a time.only thing ive done so far is deodexed.
[Motorola Atrix 2] mtnlion:
Share please?

Motorola lied and I'm still locked mb865
[Motorola Atrix 2] JRW 28:
It should be as simple as enabling init.d support, or at least that's what I would think
[Motorola Atrix 2] alteredlikeness:
I guess it's not so simple...

- first tried it straight off the shelf, step by step in the OP (except I installed the newest version of busybox 1.20.xx) - no go.

- enabled init.d by installing M.O. (which did not work), but it installed init.d folder with permissions, then again, no go.

(removed all of the 00optimize and .ko modules it installs, but left the init.d folder)

- installed the moto init.d support zip from tekahuna with the install-recovery shell script - nope.

- retried with busybox 1.19...

nothing sticks...

The folks with RAZR's have a new method to boot into recovery (as seen here). I PM'd the developer to see if it might work on the A2, but not likely - but it may be a start for us. Apparently, the original J.Y.Daddy Razr Bootstrap is now useless with ICS...
[Motorola Atrix 2] lukensteinz:
I'm going to see if I can redo the package for us. I had the defy boot menu working on my phone earlier, except it drew a garabaged screen.

I also know some scripts need tweaking and a few non working things removed.

Will try tonight when I get home
[Motorola Atrix 2] :
I followed all d steps here and was able to get d cwm working on ma phone. But when I boot it , it goes the normal way. I don't get into cwm. Sorry if that's noob but do I have to press like the volume keys or something to get to d cwm ?
[Motorola Atrix 2] alteredlikeness:
Nope. It's not sticking on every boot.

We'll get something working soon though... to put it optimistically..
[Motorola Atrix 2] Rayk1080:
Hello!

I have a quick question while I use this method. I'm working with a rooted Motorola Atrix 2 on AT&T currently running the newest official 2.3.6 (OTA)

Since the Atrix Bootstrapper app isn't working for me, can I use the stock recovery mode to flash the PB Zip? It appears I have no way to get into Clockwork.

If I use the up/down volume&power button method, select recovery from there and press up/down volume again, I'm able to enter a form of recovery that appears similar to Clockwork. Is it OK to use this mode for flashing any ROM onto the device? From there, I would flash the PB Zip.

Any help would be greatly appreciated! :D
[Motorola Atrix 2] jimbridgman:
No you will need to have both bootstrap and this CWM on boot, which is just a hack. After you have both installed and working you can remove the bootstrap apk, but you need it to flash this hack first.

Tell me what is happening with the atrix2 bootstrap and how it is not working/ what the error/issues are with it, I can help you. I am one of our devs in here...
[Motorola Atrix 2] Rayk1080:
Thanks so much for the reply!

I understand I need to use the bootstrap apk to flash the hack, I just was checking for a work around. I really appreciate the verification! :D

Anyway, the specific Atrix 2 bootstrap app issue: when I run the app and select the second option “reboot recovery", the phone reboots completely normally. It never enters Clockwork or any recovery mode. Imagine just selecting “reboot" from the power button menu (I don't think that's a choice from the stock ROM menu, but it appears that selecting the second option in the app just runs the same process as a regular reboot)

From my reading, I think this has to do with the boot loader being locked (and unlocking it looks like a really difficult process) but I'm not sure. That's just my guess (and I'm certainly not a dev or experienced hacker).

I really appreciate your assistance! :)

EDIT: if this helps, I started a thread where I asked a few specific questions regarding flashing generally and this Atrix 2 Bootstrap app was probably the main problem. http://xdaforums.com/showthread.php?t=1784613
[Motorola Atrix 2] jimbridgman:
OK the first time you ran the bootstrap app did it ask you to allow root or su permissions? It sounds to me like you either hit disallow or no to allow root permissions, that or your root is not working.

Try this, launch the Superuser app and right in that first screen should be the apps that are allowed or disallowed, find the Atrix2 bootstrap in the list of apps, then touch it, then in the next screen touch the trash can. Now launch the Atrix2 bootstrap again and make sure when the pop up asks you to allow super user or root that you click allow.

If the super user app is missing, then you need to root with root procedure in other general section, it is in the "noob" thread look for the 2.3.6 root procedure in there.
[Motorola Atrix 2] Rayk1080:
I'm pretty sure that I allowed access the first time, but I'm going go do whatever you suggest to get it working.

I know I have attained root successfully on this device because I have super user and am prompted before using ScreenShot ER and Titanium Backup. The root is fine. I used the one click method and was done in minutes.

Now what you're suggesting about permissions is interesting because I did what you instructed in Super user (btw when I looked at the log, Bootstrap appeared to be “allowed" as indicated by the smiling green android guy) and afterwards, ran the app again. This time, though, I wasn't prompted by super user at all.

Then I uninstalled and deleted bootstrap and reinstalled it. Again, when I ran it this time, superuser didn't prompt me at all.

Thanks a lot jimbridgman, I really appreciate your help :)

EDIT: I now realize that I have to try running the process “reboot recovery" to get super user to prompt me. I did now and was prompted and selected “allow". Still, the phone just did a normal reboot.
[Motorola Atrix 2] lukensteinz:
Rayk1080.

Please look in /system/bin for 3 files..

Logwrapper.bin

Logwrapper symlinked to hijack, and

Hijack

If all 3 are there, check permissions are rwxr-xr-x

Neo saved me!
[Motorola Atrix 2] Rayk1080:
I'm using root explorer to check these files

I found Logwrapper in /system/bin and the permissions are rwxr-xr-r :good:

I couldn't find Hijack and I don't think I could find logwrapper symlinked to hijack either (I don't know what a symlink is, sorry). I really appreciate the help, though!
[Motorola Atrix 2] jimbridgman:
Did you by chance click on the button in the atrix2 bootstrap, that said "Bootstrap Recovery"? That should have created that hijack file and linked it to logwrapper.

Would you uninstall the Atrix2 bootstrap and re-install it, then click that "Bootstrap Recovery" button and then try to "Reboot Recovery".
[Motorola Atrix 2] Rayk1080:
THANK YOU SO MUCH! It worked, I'm in clockwork. Now I'm going to flash this zip so I always have Clockwork without the app. I really appreciate any help I was given here! :D:victory::highfive::good:
[Motorola Atrix 2] :
Should I flash init.d zip before the bootstrap method to get cwm on every boot?
[Motorola Atrix 2] haeffnkr:
Please share the solution.

I have followed the steps in OP and can not get past this error.

I have a stock 2.3.6 phone, installed the init.d zip, installed busybox 1.2.

Can not get past the error above.

any help would be appreciated.

thanks Kevin
[Motorola Atrix 2] haeffnkr:
My gps is broken .... how do I get ths working please?

Thanks Kevin
[Motorola Atrix 2] rdavisct:
Instructions are in the OP.what are you having issues with.
[Motorola Atrix 2] haeffnkr:
I had a stock phone and followed steps in the original post, including installing the init.d file and verifying the 3 files and permission were there, as posted in this thread.

I did the process 3 times and got the following error.

cp: can't create '/system/etc/init.d/99cwr : no such file in directory

I then gave up and installed 2 different roms and then noticed that the GPS was not working at all.

GPS Test application was not doing anything and the GPS icon was not on.

After a reboot of the phone I was able to get GPS working again.

I have not tried the original steps again to see if installing these roms would help resolve the original missing file error.

Let me know if there is anything else you want me to try in the meantime.

thanks/sorry

Kevin
[Motorola Atrix 2] rdavisct:
U need to flash the init d support. Ill link u when im home in 25min
[Motorola Atrix 2] girishvk:
Here's a interesting thing.

I installed the init.d support(from cogeary's post) and then tried to install cwm on every boot.

got the error below:

----------

cp: can't create '/system/etc/init.d/99cwr': No such file or directory

sed: /system/etc/init.d/99cwr: No such file or directory

Install complete

----------

But CWM still comes up on every boot. I know its a good thing..but wondering how its getting called where the 99cwr was not created under /system/etc/init.d.
[Motorola Atrix 2] jimbridgman:
That is not what calls the CWM on boot, that uses the boot hijack in /system/bin the hijack file is linked to the modified logwrapper script which has full on root abilities and ALWAYS started at boot.. then the real logwrapper is moved aside and called logwrapper.bin so that IT is not called, and the boot hijack is instead called.

The init.d does a few other things, and that is really what fixes the GPS issues. If I am not correct, I am sure rdavisct will chime in and point out where my logic is faulty.
[Motorola Atrix 2] Silas0220:
I'm having a similar problem to everyone else, even after flashing the init.d. I think it's related to Busybox. I tried downloading the app mentioned in the OP, but it said that it was unable to install busybox. I had previously, for other reasons, downloaded and installed "Busybox" from the market and that worked just fine. One thing I noticed between the two is that the one linked in the OP installs in /system/xbin and "Busybox" installs in /system/bin.

Is this perhaps part of the problem, and how might I go about fixing it?
[Motorola Atrix 2] 41rw4lk:
I used Jrummy's BB and installed 1.19.4 to start with. Then I flashed the init.d zip. I always had trouble getting the powerboost script to create the directory and file /system/etc/init.d/99cwr, so I manually created the init.d folder in /system/etc

Then I ran the script again and seen that it did it's job. So if you're having trouble, try that and you should be good to go.
[Motorola Atrix 2] Silas0220:
This seems to have fixed it! I got a successful install and CWM seems to be popping up on every boot so far. :)

EDIT: I spoke too soon. Once the phone boots up, and I unlock the screen, I get a motorola service force closing multiple times and a google partner service force closing and the phone reboots itself.
[Motorola Atrix 2] 41rw4lk:
Boot into recovery and wipe the dalvik cache and then fix permissions. Also, make you that you don't have the boot strapper still enabled, check your su permissions.

Sent from an IP address that is tracked by a GUI interface made in Visual Basic.
[Motorola Atrix 2] meshy:
failure

After hitting enter writng last line "powerboost" in terminal emulator it says permission denied

Wht nw
[Motorola Atrix 2] XploitMachine:
Are you rooted :confused:
[Motorola Atrix 2] ravvio:
Permission Denied on last step

i am getting the same error i am rooted

After hitting enter writng last line "powerboost" in terminal emulator it says permission denied

Wht nw
[Motorola Atrix 2] ravvio:
it worked

This time it worked..... Thanks a ton :good:
[Motorola Atrix 2] ravvio:
doesnt work on restart

It worked for the very first time but once restarted it didnt reload :crying:
[Motorola Atrix 2] kojobok2:
hm.. the istallation was ok.

but after reboot there was no CWM and my pone is now frozen on the paranaoidandroid logo :o

hm.. can you figure out why it doesn't work for me? :/
[Motorola Atrix 2] iamezio:
What did you try to do ? PA works with Boot menu so no need to install anything else..
[Motorola Atrix 2] kojobok2:
yea but im testing many ROMs, and mostly they frezes on there logo screen for me so i need the CWM for the restore my back up. with the CWM on every boot i dont need the PC for the fastboot mode. :P maybe im doing something false, im a noob in this things :D
[Motorola Atrix 2] iamezio:
Boot menu is CWM recovery that boots on every boot.
[Motorola Atrix 2] deveshmanish:
BMM is a CWM.Well not cwm exactly (as it ain't clockwork) but it is a custom recovery.And it sticks on every boot.You can take a backup with BMM and restore it too.

The thing that you did wrong here was that you flashed another recovery on previously existing recovery.Which will soft brick you for sure.Install BMM and stick to it.In my opinion it's the best recovery out there.

---------------------------------------------------

May the -Mass times Acceleration-be with You...