[Solved] Need help fixing CWM for locked bootloaders - Sony Xperia T, TL, TX, V

OK, so here's the problem. We have a CWM for locked bootloaders but as of .489 JB firmware you can't get to it by pushing vol+ on boot. This is somehow kernel related because it works again if you flash a .223 kernel but then the phone doesn't boot after rebooting from CWM (which is sort of expected). I've found a workaround but it's ugly and tedious to do every time you want to go to recovery.
The script I made to automate this process doesn't really work and I don't have much know-how in this department so would really appreciate some help on improving the script or better yet, tackle the problem at the root.
Now I'll go into some more detailed description of the problem and the things I've already tried.
The way the CWM for locked bootloaders works is by replacing /system/bin/chargemon with a script that looks for the keypress and subsequently starts the recovery boot process. (I've attached the whole script, just remove .txt)
Code:
${CAT} /dev/input/event0 > ${WORKDIR}/keycheck &
For reasons yet unknown to me the keypress is not logged to the keycheck file, the file is empty, whereas on .223 you see symbols recorded to this file. Thinking no key has been pressed, the script continues normal boot.
My workaround was to comment out lines 108 & 178, the keycheck condition, forcing it to go to recovery. The downside to that is that the phone will keep rebooting to recovery unless you flash the CWM zip again before leaving recovery, or recovering the original chargemon with adb shell.
I made a script to copy chargemon to /system/bin and setting the permissions, then rebooting,
Code:
#!/system/bin/sh
# script to boot to recovery
# on Xperia T 9.1.A.0.489
# by TiMiN8R
mount -o remount,rw /system
mv /system/bin/chargemon /sytem/bin/chargemon.bak
cp chargemon /system/bin
chown 0.2000 /system/bin/chargemon
chmod 0755 /system/bin/chargemon
reboot
reboot
but I keep getting "failed on chargemon: no such file or directory". Of course the file is there, this is some stupid permissions issue, the shell script not having proper rights to manipulate the file or something, but my knowledge of this is too limited. I've googled and tried stuff like changing permissions and ownership of the script but to no avail. Also tried running the sript with Gscript and SManager but with same results.
So please, anyone with some shell scripting experience, shine your light on this. It'd be much appreciated by me and a lot of other people!

TiMiN8R said:
OK, so here's the problem. We have a CWM for locked bootloaders but as of .489 JB firmware you can't get to it by pushing vol+ on boot. This is somehow kernel related because it works again if you flash a .223 kernel but then the phone doesn't boot after rebooting from CWM (which is sort of expected). I've found a workaround but it's ugly and tedious to do every time you want to go to recovery.
The script I made to automate this process doesn't really work and I don't have much know-how in this department so would really appreciate some help on improving the script or better yet, tackle the problem at the root.
Now I'll go into some more detailed description of the problem and the things I've already tried.
The way the CWM for locked bootloaders works is by replacing /system/bin/chargemon with a script that looks for the keypress and subsequently starts the recovery boot process. (I've attached the whole script, just remove .txt)
Code:
${CAT} /dev/input/event0 > ${WORKDIR}/keycheck &
For reasons yet unknown to me the keypress is not logged to the keycheck file, the file is empty, whereas on .223 you see symbols recorded to this file. Thinking no key has been pressed, the script continues normal boot.
My workaround was to comment out lines 108 & 178, the keycheck condition, forcing it to go to recovery. The downside to that is that the phone will keep rebooting to recovery unless you flash the CWM zip again before leaving recovery, or recovering the original chargemon with adb shell.
I made a script to copy chargemon to /system/bin and setting the permissions, then rebooting,
Code:
#!/system/bin/sh
# script to boot to recovery
# on Xperia T 9.1.A.0.489
# by TiMiN8R
mount -o remount,rw /system
mv /system/bin/chargemon /sytem/bin/chargemon.bak
cp chargemon /system/bin
chown 0.2000 /system/bin/chargemon
chmod 0755 /system/bin/chargemon
reboot
reboot
but I keep getting "failed on chargemon: no such file or directory". Of course the file is there, this is some stupid permissions issue, the shell script not having proper rights to manipulate the file or something, but my knowledge of this is too limited. I've googled and tried stuff like changing permissions and ownership of the script but to no avail. Also tried running the sript with Gscript and SManager but with same results.
So please, anyone with some shell scripting experience, shine your light on this. It'd be much appreciated by me and a lot of other people!
Click to expand...
Click to collapse
change your script like this and try that
Code:
#!/system/bin/sh
# script to boot to recovery
# on Xperia T 9.1.A.0.489
# by TiMiN8R & Crazymister
su
mount -o remount,rw /system
cd /system/bin
mv chargemon chargemon.bak
cd /
cp chargemon /system/bin/
cd /system/bin
chown 0.2000 /system/bin/chargemon
chmod 0755 /system/bin/chargemon
reboot
it's a little dirty scripting, but it seems to work in adb at least. so should work from terminal emulater also is you save it as yourfilename.sh

Thanks but doesn't work,. Gives me same errors I had before. But I've devised a better method. I'll post it tonight when I get home.

Re: [Q] Need help fixing CWM for locked bootloaders
Maybe event7 now?

peetr_ said:
Maybe event7 now?
Click to expand...
Click to collapse
I'll give it a shot. Care to explain?

Re: [Q] Need help fixing CWM for locked bootloaders
Try it in terminal.
Input changed.

Re: [Q] Need help fixing CWM for locked bootloaders
Yes! Thank you so much. Glad it is so easy. Changed event0 to event7 in the chargemon script and successfully got into CWM.
Sent from my LT30p using xda app-developers app

TiMiN8R said:
Yes! Thank you so much. Glad it is so easy. Changed event0 to event7 in the chargemon script and successfully got into CWM.
Sent from my LT30p using xda app-developers app
Click to expand...
Click to collapse
so if i understand correctly, if you change evento > event 7 volume up/down works?

Re: [Q] Need help fixing CWM for locked bootloaders
Yup, changing to event7 means we can use vol up again to get to recovery.
Sent from my LT30p using xda app-developers app

Re: [Q] Need help fixing CWM for locked bootloaders
I am glad, it helped.

Related

[Q] busybox and nandroid issues

I have been experimenting with my new droid/milestone the past couple of days, odd problems which I am past now but still curious about.
Firstly after flashing the 2.1 sbf with rsd it will autoboot and screen slider will be there, then when I reboot, screen slider will be missing. This only happend when I flashed an sbf from the sbf site(2.1 uk version, not service), doing a factory reset didn't have any problem -could reboot as many times and slider would be there.... then suddenly after factory boot it would dissapear after first boot. Anyway solved this problem by installing screen mode widget after first boot after flash, solved problem, but still weird. Fixed this now but still curious about it.
Next, nandroid backup is missing from recovery menu, I have rooted and can execute root commands after typing "su" via Android Terminal emulator, so pretty sure is rooted. So why no nandroid? I thought I could do nandroid backup after rooting.
Next busybox won't install, tried the app, did the "searching system" for over an hour(not exagerrating), eventually gave up and uninstalled.
Trying to do a "manual busybox install" now, using this guide:
Busybox How-to? - Android Forums
Can't execute commands via usb/adb in recovery mode as the other guy suggested so been trying these commands both with terminal emulator on phone, and usb-debugging mode with windows shell. Using these I can go "su" and type "ls" to see files on my droid phone....but when I try to "mount /system" or /sdcard from windows I just get a print about mount options, when I try to "cat /sdcard/busybox > /system/xbin/busybox" I get a "file is read only" error.
I would like advice on how to install busybox, I would like to do it manually(because the app seems to not work for me, remember I waited over an hour while it "searched") and I want to learn to manually do stuff anyway. I tried to chmod /system/xbin too, but that didn't seem to change it from read only.
Also any thoughts on why nandroid backup is missing from my recovery menu even though my droid is rooted. I thought it was meant to appear.
I am still learning and researching, and appreciate any links or tips.
droidtech1 said:
Next, nandroid backup is missing from recovery menu, I have rooted and can execute root commands after typing "su" via Android Terminal emulator, so pretty sure is rooted. So why no nandroid? I thought I could do nandroid backup after rooting.
Click to expand...
Click to collapse
This is odd. Which OpenRecovery did you install? Androidiani? GOT? Or the "original" OpenRecovery? Are you aware, that you come into OpenRecovery by starting Recovery Mode and apply update.zip?
droidtech1 said:
Next busybox won't install, tried the app, did the "searching system" for over an hour(not exagerrating), eventually gave up and uninstalled.
Trying to do a "manual busybox install" now, using this guide:
Busybox How-to? - Android Forums
Click to expand...
Click to collapse
Using the app from the market worked like a charm for me. No idea, what might have gone wrong for you...
droidtech1 said:
Can't execute commands via usb/adb in recovery mode as the other guy suggested so been trying these commands both with terminal emulator on phone, and usb-debugging mode with windows shell. Using these I can go "su" and type "ls" to see files on my droid phone....but when I try to "mount /system" or /sdcard from windows I just get a print about mount options, when I try to "cat /sdcard/busybox > /system/xbin/busybox" I get a "file is read only" error.
Click to expand...
Click to collapse
For remounting, try "mount -o rw,remount /dev/block/mtdblock6 /system" and for undoing this, use "ro" instead of "rw".
droidtech1 said:
I would like advice on how to install busybox, I would like to do it manually(because the app seems to not work for me, remember I waited over an hour while it "searched") and I want to learn to manually do stuff anyway. I tried to chmod /system/xbin too, but that didn't seem to change it from read only.
Click to expand...
Click to collapse
You should download busybox and put the "busybox"-file in the directory /sdcard. After that do:
Code:
# su
# mount -o rw,remount /dev/block/mtdblock6 /system
# cp /sdcard/busybox /system/xbin
# cd /system/xbin
# chmod 755 busybox
# ./busybox --install
# mount -o ro,remount /dev/block/mtdblock6 /system
One thought at the end: How did you root?
I rooted by flashing "vunerable recovery" using RSD lite, copied milestone-root.zip to sd card, renamed it update.zip, rebooted into recovery mode, flashed update.zip from there.
I didn't realise I had to install something like open recovery, think because I remember not having to do that on my pulse? Anyway will try and install one of those now.
Thanks those commands at the end helped, actually managed to copy busybox to /system/xbin, however the 2nd last one "./busybox --install" gave me a load of errors -all being no such file or directory, for example "/usr/bin/wc: no such file"
about 30 of those path errors. Maybe the command path "./busybox" needs to be something else?
ah, okay. sorry, I thought you already installed an openrecovery. for many cool features you will need it (e.g. nandroid, for overclocking it's not a must but a nice-to-have). please don't use GOT, it's rather old already. androidiani is okay, I think.
I think your previous attempts to install busybox via the app etc. mixed up some internal links in the device. please reboot and try again (the above steps except the "cp ..."). seems like the app tried to install busybox to /usr/bin but failed... I hope this failed attempt will be fixed by a simple reboot. otherwise it would be great to have the output of:
Code:
# su
# ls /usr/bin
No I re-flashed my main sbf and also did a factory reset to do a clean start, only thing since that full wipe I have done is rooting in the method I described, installed the screenmode widget, textedit, and android terminal emulator.
I have no such file /usr, are you sure I should have this in droid/milestone?
Here is my full output of my root system using ls:
tmp
pds
cdrom
sqlite_stmt_journals
config
cache
sdcard
d
etc
system
sys
sbin
proc
init_prep_keypad.sh
init.rc
init.mapphone_umts.rc
init.mapphone_cdma.rc
init.goldfish.rc
init
default.prop
data
root
dev
perhaps "/usr" is a sub inside one of the above folders? I tried using "find" to find it but that command dosn't seem to work since it won't even find the ones I can see with ls
I found it, /usr is inside /system... so if busybox was moved to /system/xbin, I'm guessing the ./ means install it to the parent directory which was /system which /usr is also in.
The errors I got said no such file "/usr" so It seems like it is trying to install to the wrong directory.... perhaps the command should be "busybox --install" or "/busybox --install" I don't want to experiment and mess things up before your opinion on this.
*edit almost forgot, output of /system/usr is
keychars
bin
srec
keylayout
share
output of /system/usr/bin is
panic_daemon
gki_pd_notifier
nvm_daemon
clean_dex.sh
brcm_guci_drv
bplogd_daemon
This is really strange. Maybe your busybox-file is corrupt.
Where did you download the busybox-file?
Which sbf did you flash?
So for explanation-purposes: When you put an executable or script file in any directory, you can execute it by first making it executable ("chmod 755 /system/xbin/busybox"), changing to that directory ("cd /system/xbin") and then executing it by adding "./" in front of it. The dot slash always stands for the _current_ directory. The _parent_directory has two dots "../".
If you want, you may try:
# /system/xbin/busybox --install
instead of
# ./busybox --install
Or maybe try this one:
# /system/xbin/busybox --install -s /system/xbin
Last time, I installed busybox into the directory /data/busybox, which worked brilliantly, but this path turned out to be unpractical. So I wanted to reinstall it in a different directory. I removed everything from /data/busybox including the directory itself and tried to start the whole procedure with /system/xbin. But that time it protested, that there were no files in "/data/busybox/...". Conclusion: The last busybox-install affected the second one. When I remember correctly I rebooted after that and used the app from the market *g*
My main sbf I flashed was android 2.1(uk version).
I downloaded busybox 1.17.2(won't let me post url here), was from droidforums dot net.
I don't remember if I tried all of his commands, but the last one on that forum seems to have worked.. I think......... it was:
"busybox --install /system/xbin/"
After remounting with your commands and typing the above command, I didn't get any errors, I synced and rebooted and now when I "ls /system/xbin" it shows a bunch of files/names which look like busybox commands. When I type "busybox" it outputs a bunch of commands too... so I am guessing this means it has succesfully installed? I can't say I tried these before attempting install so I have no comparison but I assume I would have a different output if busybox wasn't installed.
So assuming it worked, why would
"busybox --install /system/xbin/" work, and
"/system/xbin/busybox --install" not?
I also managed to install open recovery and do a nandroid backup succesfully
I have another short question, not specific to android but happens in all terminals I use, windows and linux alike. Sometimes I cannot execute commands anymore and it just becomes text in the terminal(just re-echo'ing my text output, without executing any functions)... can't remember specifically when it happened on my windows or linux pc shells, but on my android it happens whenever I have to give "SU" permission to the terminal, I have to quickly close the terminal and reload it again to get su access. I'm sure there is a name for this "state" where you are locked out of using commands in the shell and just typing text but I can't find a way to get out of it(without closing and re-opening terminal), there must be some key combination to be able to execute commands again in the current terminal session. If you have any idea what I am talking about?
Thanks for all your help so far.
droidtech1 said:
My main sbf I flashed was android 2.1(uk version).
Click to expand...
Click to collapse
Don't want to try one of the 2.2?
droidtech1 said:
I downloaded busybox 1.17.2(won't let me post url here), was from droidforums dot net.
I don't remember if I tried all of his commands, but the last one on that forum seems to have worked.. I think......... it was:
"busybox --install /system/xbin/"
After remounting with your commands and typing the above command, I didn't get any errors, I synced and rebooted and now when I "ls /system/xbin" it shows a bunch of files/names which look like busybox commands. When I type "busybox" it outputs a bunch of commands too... so I am guessing this means it has succesfully installed? I can't say I tried these before attempting install so I have no comparison but I assume I would have a different output if busybox wasn't installed.
Click to expand...
Click to collapse
Yes, this sounds very much like installation was successful.
droidtech1 said:
So assuming it worked, why would
"busybox --install /system/xbin/" work, and
"/system/xbin/busybox --install" not?
Click to expand...
Click to collapse
typing "busybox" without the path in front of it worked, because busybox is in the directory /system/xbin, which is already in your $PATH-variable (try "echo $PATH"). So the command interpreter (shell) will automatically look up "busybox" in /system/xbin.
I had a look at the busybox syntax and it's actually
Code:
busybox --install [-s] [INSTALLDIR]
So you have to put the directory you want to install in at the end. That's what your last command makes use of
droidtech1 said:
I have another short question, not specific to android but happens in all terminals I use, windows and linux alike. Sometimes I cannot execute commands anymore and it just becomes text in the terminal(just re-echo'ing my text output, without executing any functions)... can't remember specifically when it happened on my windows or linux pc shells, but on my android it happens whenever I have to give "SU" permission to the terminal, I have to quickly close the terminal and reload it again to get su access. I'm sure there is a name for this "state" where you are locked out of using commands in the shell and just typing text but I can't find a way to get out of it(without closing and re-opening terminal), there must be some key combination to be able to execute commands again in the current terminal session. If you have any idea what I am talking about?
Click to expand...
Click to collapse
Sounds like this is just the state, when shell is busy, i.e. when the last process you started is still running and no prompt ($ or #) is displayed. You may kill the last process in linux using CTRL+C, which will hopefully bring back the shell prompt. No idea which shortcut replaces this on the milestone/droid. I never use any android terminals, but only the ADB-Shell: http://developer.android.com/guide/developing/tools/adb.html
I'm learning to build apps for android so I thought having 2.1 on my droid would be better for testing (instead of 2.2). I also have a Nexus-S with 2.3 and a tmobile-pulse with 1.5. So I want to keep the most native version on each phone since most consumers won't install custom roms, although some will get updates anyway.
I use my droid a lot when I am out and use the terminal a lot so having busybox too has given me more to play around with. I actually find my droid much better working on than the nexus s, love the keyboard and dpad.

[MOD] 4.1.57 deodexed framework and app files (AT&T Only)

Here are the App and Framework system files for 4.1.57 fully deodexed.
You must already have Root access in 4.1.57.
Typical disclaimer as always...
USE AT YOUR OWN RISK.
This is for experienced users only please.
Remember to make a backup of your existing framework and app folders BEFORE you do this.
Link: Atrix-1.57deodexed IGNORE the instructions in the zip. Updated ones below.
Feel free to mirror.
Note: Photoedit.apk was pulled form the 1.26 Adeo file as the 1.57 version would not deodex properly.
This file did not change from 1.26. to 1.57, so I see no issue with using it.
UPDATE: The instructions contained in the zip have an error... oops.
This is why I don't write scripts. I type to fast.
Hopefully some of you guys caught that before entering the commands.
Again, backup your original system/framework and system/app files BEFORE you do this in case you want to revert back to an odexed system.
Here is the correction:
Put your phone in USB Mass Storage Device mode.
Copy the app and framework directory and their contents from the zip file to the root of your sdcard.
***Verify the copy was successful before you continue.***
Set USB mode back to None.
Type the following commands via ADB.
Code:
adb shell
su
stop
mount -o rw,remount /dev/block/mmcblk0p12 /system
cp /sdcard/app/* /system/app/
cp /sdcard/framework/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount /dev/block/mmcblk0p12 /system
reboot
Thanks, you beat me to it!
lindsaytheflint said:
Thanks, you beat me to it!
Click to expand...
Click to collapse
I deodexed them last night, but wanted to run through some testing before I packaged them up.
Anyone feel like scripting this, go for it.
I must have done something wrong in shell... soft brick, certain it was my fault.
tl_bull said:
I must have done something wrong in shell... soft brick, certain it was my fault.
Click to expand...
Click to collapse
Not your fault... I found an error in my instructions.
cp /sdcard/frame/* /system/framework/
should be
cp /sdcard/framework/* /system/framework/
rjohnstone said:
Here are the App and Framework system files for 4.1.57 fully deodexed.
Typical disclaimer as always...
USE AT YOUR OWN RISK.
This is for experienced users only please.
Link: Atrix-1.57deodexed IGNORE the instructions in the zip. Updated ones below.
Feel free to mirror.
Note: Photoedit.apk was pulled form the 1.26 Adeo file as the 1.57 version would not deodex properly.
This file did not change from 1.26. to 1.57, so I see no issue with using it.
Been running all day with these files with no issues.
UPDATE: The instructions contained in the zip have an error... oops.
This is why I don't write scripts. I type to fast.
Hopefully some of you guys caught that before entering the commands.
Here is the correction.
Copy the app and framework directory to the root of your sdcard.
Type the following commands via ADB.
Code:
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/app/* /system/app/
cp /sdcard/framework/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
reboot
Click to expand...
Click to collapse
Another error with the commands
it should be the following for the mounts command:
mount -o rw,remount /dev/block/mmcblk0p12 /system
mount -o ro,remount /dev/block/mmcblk0p12 /system
lpsi2000 said:
Another error with the commands
it should be the following for the mounts command:
mount -o rw,remount /dev/block/mmcblk0p12 /system
mount -o ro,remount /dev/block/mmcblk0p12 /system
Click to expand...
Click to collapse
Thx. Updated OP.
The mount commands I originally posted did work for me without any issue though.
Sent from my MB860 using XDA App
It looks like this isn't complete. There are some files in framework that you did not deodex, installing this on any phone will very likely brick.
Ririal said:
It looks like this isn't complete. There are some files in framework that you did not deodex, installing this on any phone will very likely brick.
Click to expand...
Click to collapse
What is missing?
Running on mine without any issues at all.
EDIT:
I see what you're talking about and it's a non-issue if you follow the commands to load them.
The 4 files missing from the framework folder were not odexed to begin with, so the originals will remain.
Remember, I'm not having anyone delete the entire contents of the framework folder, only the .odex files AFTER they copy over the deodexed versions first.
rm /system/framework/*.odex
These files are not odexed to begin with, so they are not touched.
blur-res.apk
framework-res.apk
moto-res.apk
android.test.runner.jar
You will also notice that 19 files are missing from the app folder as well... again, I'm not deleting any .apk files in the instructions, only the .odex files.
The 19 .apk files that are not included in my zip file are already present on a 1.57 system in a deodexed state.
I saw no point in adding them.
Make sense now?
Sent from my MB860 using XDA App
I followed every step however when I attempt to run the following command
mount -o rw,remount /dev/block/mmcblk0p12 /system
I'm receiving Permission denied.
Edit:
Had to use usb port on the rear instead of the front when rooting.
zeyoner said:
I followed every step however when I attempt to run the following command
mount -o rw,remount /dev/block/mmcblk0p12 /system
I'm receiving Permission denied.
Click to expand...
Click to collapse
Sounds like you don't have root access.
Do you see a $ or a # in your command prompt?
i have $ in my root access... i'm getting permission denied at when i type 'su' but im pretty sure i rooted it earlier today
edit fixed i wasnt rooted
rjohnstone said:
What is missing?
Running on mine without any issues at all.
EDIT:
I see what you're talking about and it's a non-issue if you follow the commands to load them.
The 4 files missing from the framework folder were not odexed to begin with, so the originals will remain.
Remember, I'm not having anyone delete the entire contents of the framework folder, only the .odex files AFTER they copy over the deodexed versions first.
rm /system/framework/*.odex
These files are not odexed to begin with, so they are not touched.
blur-res.apk
framework-res.apk
moto-res.apk
android.test.runner.jar
You will also notice that 19 files are missing from the app folder as well... again, I'm not deleting any .apk files in the instructions, only the .odex files.
The 19 .apk files that are not included in my zip file are already present on a 1.57 system in a deodexed state.
I saw no point in adding them.
Make sense now?
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
Yeah I looked it over again, should be fine.
EDIT: Nvm saw you updated.
I'm working on a new method to automate this, I'll post something when I have it working reliably.
looking for another way
Question, possibly a dumb one but anyway it is. . . I couldn't get the script for root on update to work so if I go this route is it the same as getting from moto and is it possible to still have root with it?
Very nice contribution!
Rad ryan said:
Question, possibly a dumb one but anyway it is. . . I couldn't get the script for root on update to work so if I go this route is it the same as getting from moto and is it possible to still have root with it?
Click to expand...
Click to collapse
This won't work without having root access first.
Sent from my MB860 using XDA App
I am still on 4.1.26 rooted and deodexed. Do I have to update my phone to 4.1.57 before copying the framework and apps folder? I know the script in OP won't work in my case but I can come up with another script. Thanks.
Immix said:
I am still on 4.1.26 rooted and deodexed. Do I have to update my phone to 4.1.57 before copying the framework and apps folder? I know the script in OP won't work in my case but I can come up with another script. Thanks.
Click to expand...
Click to collapse
Right - this is only for 4.1.57. If you do it on 4.1.26 you'll get a soft brick.
rjohnstone, its always best to do stuff like this under Early USB Enumeration mode. It is possible to get it to stop the automatic rebooting by typing "stop" into the console.
shawnbuck said:
Right - this is only for 4.1.57. If you do it on 4.1.26 you'll get a soft brick.
rjohnstone, its always best to do stuff like this under Early USB Enumeration mode. It is possible to get it to stop the automatic rebooting by typing "stop" into the console.
Click to expand...
Click to collapse
Thx for the tip.
I did use the stop command in my process and was able to prevent a reboot.
The process is so quick that I didn't see a single FC during the copy.
I think it should be mentioned in the OP that root is required.

[Q] Rooting TELUS Optimus Black

Anyone figured out how to do it? I've tried following the guides with no success (gingerbreak). Model is P970g and software is 10a. Country code is TLS.
Anyone have a Telus OB and been able to root it? How did you do it?
I've rooted a couple of them, both 10a on Telus, one of them was pretty easy using z4root. Another one wouldn't work with z4root, latest superoneclick, gingerbreak or manually using adb shell to gingerbreak, rageaggainstthecage & psneuter. I did finally get the stubborn one to root wither an older superoneclick; version 1.6.5. Attached it below as it doesn't seem available in CLShortFuse's thread anymore.
Goodluck
alexredford said:
I've rooted a couple of them, both 10a on Telus, one of them was pretty easy using z4root. Another one wouldn't work with z4root, latest superoneclick, gingerbreak or manually using adb shell to gingerbreak, rageaggainstthecage & psneuter. I did finally get the stubborn one to root wither an older superoneclick; version 1.6.5. Attached it below as it doesn't seem available in CLShortFuse's thread anymore.
Goodluck
Click to expand...
Click to collapse
I tried both z4 and the superoneclick you suggested to no avail.
Do you think it's safe to try flashing another vulnerable rom? 10b or 10c? I'm worried the basebands may be different and the phone will have no voice/data connection.
Running out of ideas.
Attempted to root another one, same model, same version and none of the previous methods worked, was able to root this one as well using a combination of SOC 2.1.1 and the attached ADB Shell.
1. Download and run SuperOneClick 2.1.1, choose psneuter and click Shell Root
2. It should get stuck on step #4, run task manager, end superoneclick and terminate any adb.exe processes. (You should have Shell Root now)
3. Extract ADB.zip and open a command prompt to where you extracted it.
4. Enter the following commands
Code:
adb push su /tmp/
adb push Superuser.apk /tmp/
adb shell
mount -o rw,remount -t ext3 /dev/block/mmcblk0p8 /system
cat /tmp/su > /system/bin/su
cat /tmp/superuser.apk > /system/app/Superuser.apk
chown root.root /system/bin/su
chmod 06755 /system/bin/su
chown root.root /system/app/Superuser.apk
chmod 0644 /system/app/Superuser.apk
reboot
The permissions on /system/bin/su didn't stick the first time for me, and the phone rebooted a couple times, but eventually it all went through. To verify permissions on su, type "adb shell", then "ls -l /system/bin/su". The permission should read -rwsr-sr-x, if it doesn't repeat the shell root process and type
Code:
adb shell
mount -o rw,remount -t ext3 /dev/block/mmcblk0p8 /system
chmod 06755 /system/bin/su
ls -l /system/bin/su
Ok, i've figured out what the problem is. As soon as the adb process from SOC is shut down, the phone soft reboots and I lose temporary root. I've tried the psneuter exploit in the same adb command shell, but it hangs just like SOC. I've tried to be "quick" and get the commands in before the reboot, but it isn't possible.
Suggestions on how I may bypass that? Otherwise i'll wait for the official 2.3 update in september and try again then.
One of the phones I tried it on, did the same thing, ended the adb process and phone would reboot, pushed a file, phone would reboot, set permissions, phone would reboot. Occasionally the phone would appear to hang, buttons flash at the bottom for awhile, phone becomes unresponsive. Just wait a minute or 2 and it should return to normal. I also tried creating a script to do all of the above before the device had time to reboot and it didn't help.
Persistence was the key.
Did you try that ? If following the instructions don't work for you, I let you know how it works for me.
EDIT : Sorry, forget link's thread : http://forum.xda-developers.com/showthread.php?p=14458927
Sent from my LG-P970 using xda premium
Hey i am having the same problem and am fearing bricking my phone from making a mistake. is there an easier method than those above mentioned?
Android 2.2.2
software: v10a
Sobralobo said:
Did you try that ? If following the instructions don't work for you, I let you know how it works for me.
EDIT : Sorry, forget link's thread : http://forum.xda-developers.com/showthread.php?p=14458927
Sent from my LG-P970 using xda premium
Click to expand...
Click to collapse
This method worked when rooting my wife's P970g.
KDZ file
hey does anyone have the Telus firmware KDZ file? i will need it to restore my phone back to original state to cash in on a waranty (ended up bricking it, had to install a german 1&1 firmware to get it back)
s0dhi said:
This method worked when rooting my wife's P970g.
Click to expand...
Click to collapse
...which ROM did you use, the v10a EEU from the thread?
I'm worried cause on Telus 970g as well.
The_non_rootable said:
hey does anyone have the Telus firmware KDZ file? i will need it to restore my phone back to original state to cash in on a waranty (ended up bricking it, had to install a german 1&1 firmware to get it back)
Click to expand...
Click to collapse
http://lg-phone-firmware.com/index.php?id_mod=1

BusyBox problem: installed twice, removed one, damaged system

Hello guys, please help me out with this problem! I've been working on all day but my phone is still bad...
When I rooted my device BusyBox was supposedly installed by the toolkit I used to root (mskip's).
Then I installed BusyBox installer market app (Stericson's) and it said "BusyBox location could not be found". I thought it wasn't installed so I used the "smart install" with the default values, so it was installed to /system/bin and all the applets were listed as symlinked to /system/bin/busybox
After a while I realized that it was installed both in /system/xbin (by the root toolkit) and in /system/bin (by busybox installer). I used the uninstall option from the busybox installer app to remove it from /system/bin again and leave just one installation to avoid conflicts. This was not a good idea it seems. After uninstalling and rebooting, the phone started to work incorrectly, wifi doesn't work.. and most importantly, USB connection is dead with Android fully booted. the battery charges but the PC doesn't detect it. (It works on Recovery mode though).
I have an idea of what may be wrong. I think the "BusyBox installer" changed all the symlinks to system/bin/busybox, so when it was uninstalled, the phone was left without any of the applets of busybox even though the file /system/xbin/busybox is still present.
Or maybe I'm not really rooted anymore? However, the su binary is still present in /system/xbin/su but I still can't get to work commands like "mount".
How can I fix this problem? I will greatly appreciate any suggestions.
I think it might be fixed by installing busybox to /system/bin or even just copying the /system/xbin/busybox file to /system/xbin/busybox but because the phone is not working correctly I haven't been able to do that...
Here's the information I've gathered so far for you guys to PLEASE help me out with this:
SuperSU is installed and seems to works fine.
"BusyBox Free" installer app doesn't work. If I open it, it shows only black with the three buttons in the bottom but they can't be "clicked. It has been granted root permissions.
"ES File Explorer" gets root permissions but is unable to mount /system as writable (to copy the file).
In a terminal emulator application (Jack Palevich's), this is what I get:
Code:
$ which busybox
/system/xbin/busybox
$ ls
ls: not found
$ busybox ls
(works, outputs the directory content correctly)
$ mount -o remount,rw /system
mount: not found
$ busybox mount -o remount,rw /system
mount: permission denied (are you root?)
$ su
(the terminal emulator app has root permission, but when issuing "su" command, the cursor stays inactive for several minutes and when it finally responds, the following operations are still not succesful. The "su" doesn't seem to work.
$ busybox mount -o remount,rw /system
mount: permission denied (are you root?)
$ /system/bin/busybox --install -s /system/bin
busybox: /system/bin/zcat: Read-only file system
busybox: /system/bin/mountpoint: Read-only file system
busybox: /system/bin/nohup: Read-only file system
My plan is to make the USB work so I can use the toolkit again to restore a stock firmware and clean this mess. Oh, I have stock recovery and stock boot image if that's of any help to know it.
How can I issue the commands I need? or fix this problem?
I have basic linux experience so if you need the output of any command please let me know.
Any help is appreciated. Thank you!
... i think that flashing cwm recovery(.tar.md5) with odin and flashing a root+busybox.zip with cwm recovery should be the fastes way to fix this .... only thing is that it erease your "costum binary count" but with the "Triangel Away" app you can reset that counter ...
Thank you for the hint, enox. I'm will try to install the custom recovery now.
Thanks again enox for pointing me in the right direction. The phone is working again. I'm sharing what I did in case it helps someone in the future:
1) Installed the custom recovery 'twrp', provided by the toolkit (program_folder/recovery/recovery-twrp-2.4.3.0-GTI8190.tar) using odin with the phone in download mode.
2) Flashed this busybox uninstaller using twrp recovery. The phone wasn't working fine yet, so I continued to the following step.
3) Flashed a root+busybox.zip provided by the toolkit (program_folder/root/SuperSU-1.25-Busybox-RenameRecoveryRestore.zip) using twrp recovery.
At this point, the phone was working fine but to be sure that all symlinks were correct, I ran an additional cleaning script which you can find at the end of this post, along with my comments talking to myself while I was troubleshooting the problem.
I'll go to sleep now. Thank you.
Got a PM and I thought it would be better if I reply to it in the forum so others can benefit as well:
andr0id_n00b said:
hey i saw your problem here http://forum.xda-developers.com/showthread.php?t=2233942 and iam glad u solved your problem
can you please tell me what toolkit do you use ??
Sent from my GT-I8190 using xda app-developers app
Click to expand...
Click to collapse
mskip's toolkit for Samsung Galaxy S3 Mini:
http://forum.xda-developers.com/showthread.php?t=2185700
Big thanks to him too, for providing that noob friendly yet full-featured toolkit
same with xperia mti27i
ive exactlly made the same but with my xperia mt27i android4.0 ics i dont i know what to do i dont have exp. with android so please help

[HOW TO] Debrand boot animations without flashing new ROM

** Requires ROOT+Busybox and either Terminal or a capable File Manager
So you don't feel like flashing a new ROM and losing all your data, but your carrier's boot up and shutdown branding is getting on your nerves? Here is what you do, the basic idea is the same as putting on a new boot animation
I'll assume you're using a Terminal and bootsamsung.qmg for the rest of this, the other files follow the same method
Copy stock boot and shutdown animations onto your SD card, I'll call the path to this location %sd%. A copy of the stock files in the attached archive.
Open terminal and become root
Code:
su
You may need to remount your /system partition as writable, if you're connecting via ADB, adb.exe may crash here - that's fine, just re-connect the USB cable and you shouldn't need to repeat this step again
Code:
mount -o remount,rw [COLOR="RoyalBlue"]/system[/COLOR]
Copy bootsamsung.qmg from %sd% to /system/media/,
Code:
busybox cp -f "[COLOR="RoyalBlue"]%sd%[/COLOR][B][COLOR="Green"]bootsamsung.qmg[/COLOR][/B]" "[COLOR="RoyalBlue"]/system/media/[/COLOR][B][COLOR="Green"]bootsamsung.qmg[/COLOR][/B]"
Set the permissions of the file to 644,
Code:
chmod [COLOR="red"]644[/COLOR] "[COLOR="RoyalBlue"]/system/media/[/COLOR][B][COLOR="Green"]bootsamsung.qmg[/COLOR][/B]"
Get rid of the SD card copy if you don't want it anymore,
Code:
rm -f "[COLOR="RoyalBlue"]%sd%[/COLOR][B][COLOR="Green"]bootsamsung.qmg[/COLOR][/B]"
Clean up any overriding animations, I had this happen for my shutdown animation where my carrier had a shutdown directory in /system/media/video/ which contained another copy of shutdown.qmg, so check for the existence of these and remove them, e.g.
Code:
if [ -f [COLOR="RoyalBlue"]/system/media/video/[/COLOR][B][COLOR="Purple"]bootsamsung[/COLOR]/[COLOR="Green"]bootsamsung.qmg[/COLOR][/B] ]; then
rm -f [COLOR="RoyalBlue"]/system/media/video/[/COLOR][B][COLOR="Purple"]bootsamsung[/COLOR]/[COLOR="Green"]bootsamsung.qmg[/COLOR][/B]
fi
Reboot and see what happens!
Extra notes: Always keep backups of original files. If you can't get past the boot animation, restore the backups.
paulie-uk said:
** Requires ROOT+Busybox and either Terminal or a capable File Manager
So you don't feel like flashing a new ROM and losing all your data, but your carrier's boot up and shutdown branding is getting on your nerves? Here is what you do, the basic idea is the same as putting on a new boot animation
I'll assume you're using a Terminal and bootsamsung.qmg for the rest of this, the other files follow the same method
Copy stock boot and shutdown animations onto your SD card, I'll call the path to this location %sd%. A copy of the stock files in the attached archive.
Open terminal and become root
Code:
su
You may need to remount your /system partition as writable, if you're connecting via ADB, adb.exe may crash here - that's fine, just re-connect the USB cable and you shouldn't need to repeat this step again
Code:
mount -o remount,rw [COLOR="RoyalBlue"]/system[/COLOR]
Copy bootsamsung.qmg from %sd% to /system/media/,
Code:
busybox cp -f "[COLOR="RoyalBlue"]%sd%[/COLOR][B][COLOR="Green"]bootsamsung.qmg[/COLOR][/B]" "[COLOR="RoyalBlue"]/system/media/[/COLOR][B][COLOR="Green"]bootsamsung.qmg[/COLOR][/B]"
Set the permissions of the file to 644,
Code:
chmod [COLOR="red"]644[/COLOR] "[COLOR="RoyalBlue"]/system/media/[/COLOR][B][COLOR="Green"]bootsamsung.qmg[/COLOR][/B]"
Get rid of the SD card copy if you don't want it anymore,
Code:
rm -f "[COLOR="RoyalBlue"]%sd%[/COLOR][B][COLOR="Green"]bootsamsung.qmg[/COLOR][/B]"
Clean up any overriding animations, I had this happen for my shutdown animation where my carrier had a shutdown directory in /system/media/video/ which contained another copy of shutdown.qmg, so check for the existence of these and remove them, e.g.
Code:
if [ -f [COLOR="RoyalBlue"]/system/media/video/[/COLOR][B][COLOR="Purple"]bootsamsung[/COLOR]/[COLOR="Green"]bootsamsung.qmg[/COLOR][/B] ]; then
rm -f [COLOR="RoyalBlue"]/system/media/video/[/COLOR][B][COLOR="Purple"]bootsamsung[/COLOR]/[COLOR="Green"]bootsamsung.qmg[/COLOR][/B]
fi
Reboot and see what happens!
Extra notes: Always keep backups of original files. If you can't get past the boot animation, restore the backups.
Click to expand...
Click to collapse
Hello, I'm interested in debranding my verizon s5. I'd love to get rid of the Verizon screen at bootup. I read through your directions and it seems that you are suggesting overwriting the animation with the stock that you provided. All good. It is the use of the terminal that I am completely unfamiliar with. I tried using adb.exe in a command window inside of windows 7 and it didn't even like the first command 'su' My phone is rooted with a custom rom and busybox in developer mode. Could you help me out with what terminal to use and how to connect etc. to enter the commands? I have a decent filemanager installed but It doesn't let me write to system. Thanks for this post.
Eaglebiker said:
Hello, I'm interested in debranding my verizon s5. I'd love to get rid of the Verizon screen at bootup.
Click to expand...
Click to collapse
My first comment must be to say I have a G900F, the international version of the phone and it's using a stock ROM with a few tweaks, e.g. root. A custom ROM will have changed the system partition already so this method shouldn't be applicable there - if it shows a carrier logo on a custom ROM then it's in another partition, not system
Eaglebiker said:
I read through your directions and it seems that you are suggesting overwriting the animation with the stock that you provided. All good. It is the use of the terminal that I am completely unfamiliar with.
Click to expand...
Click to collapse
I gave terminal instructions so people could do it only using their phone but as you've noticed, it's not the only option
Eaglebiker said:
I tried using adb.exe in a command window inside of windows 7 and it didn't even like the first command 'su'
Click to expand...
Click to collapse
If you are using adb, make sure that adb can gain root - the flag should be somewhere in your superuser's settings - then with your USB connected launch adb into shell mode from your computer. This makes adb act as a terminal
Code:
adb shell
If you see a $ then you are not root and will need to gain root, i.e. run su
If you see a # then you are root and don't need to do that
Eaglebiker said:
My phone is rooted with a custom rom and busybox in developer mode.
Click to expand...
Click to collapse
All good things!
Eaglebiker said:
Could you help me out with what terminal to use and how to connect etc. to enter the commands?
Click to expand...
Click to collapse
The terminal I use is can be found here (though I used v1.0.65). Most custom ROMs already include it so you may find it in your apps already. It's all on your phone so you'd type on your phone's keyboard as normal. You shouldn't have to use this if you want to use ADB.
Every time I wrote a %path% you will need to enter the real path for what you have on your device, e.g. %sd% may be /extSdCard/
Eaglebiker said:
I have a decent filemanager installed but It doesn't let me write to system.
Click to expand...
Click to collapse
What doesn't let you do this? If it's "read only" then you may need to remount the /system partition (my step 3). File managers like the one you get with CM do let you do root things but it needs to be in root mode or prompt mode (see it's settings). To find /system in a file manager, the easiest way is to keep going up until you're at /, then you should be able to go down through [/B]/system[/B]
Eaglebiker said:
Thanks for this post.
Click to expand...
Click to collapse
Thank you for letting me give some meaningful answers in post 3!
The Rom I'm using would be better described as a stock lollipop rom for the 900v with a few tweaks.
I now understand that you can have a terminal on the s5. I've installed the terminal and greatly prefer it. Using a terminal on the s5 hadn't even occurred to me and it sounds much easier then hooking to a computer needlessly. Awesome.
I manage to get su access #. in step 2.
in step 3 I type in the mount command and nothing seems to happen. no errors
in step 4 it tells me the folder or file doesn't exist. I'm certain it does. I can see it in my file manager. in the folder /extSdCard/bootsamsung.qmg and the destination folder is /system/media as well. I've tried it with and without quotes and no joy. Any clue what is going on?

Categories

Resources