Related
This will NOT work in CM5.0b4 as JIT has been disabled entirely
It seems like a lot of people are constantly pulling/editing/pushing build.conf in order to turn JIT on and off, so I threw together a short script to toggle it on and off.
It's nothing elaborate, but it gets the job done. This is meant to work with the build.prop that comes stock with cyanogenmod 5.0b2 but will most likely work with other build.props that have JIT.
Steps to run the script:
1) Download jit.txt, rename it jit.sh
2) If you downloaded from your computer, run "adb push jit.sh /sdcard" or mount your device and copy to your sdcard.
3) In terminal on Nexus One:
$ su
# sh /sdcard/jit.sh
JIT toggled ON
JIT enabled upon reboot
#
You can also set it up in GScript or GScript Lite so you can add an icon on your homescreen to toggle JIT more easily:
1) From command line: mv /sdcard/jit.sh /sdcard/gscript/jit.sh
2) Open GScript
3) Go to Menu->Add Script
4) Go to "Load file"
5) Select jit.sh
Then to make an icon on your homescreen:
1) Long press homescreen
2) Select Shortcuts
3) Select GScript(Lite)
4) Select jit
You must reboot for the changes to take effect after running the script. If you prefer, simply put "reboot" (without quotes) on it's own line at the end of the script and it will reboot automatically. Only do this after you have confirmed that the script works for you.
If you are using Windows, make sure you use the attached jit.txt rather than copying the code from this post. Copying/pasting the code will not work because of Windows CR/LF line breaks.
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
if grep -q fast /system/build.prop ; then
sed -i s/=int:fast/=int:jit/ /system/build.prop
echo "JIT toggled ON"
echo "JIT enabled upon reboot"
else
sed -i s/=int:jit/=int:fast/ /system/build.prop
echo "JIT toggled OFF"
echo "JIT disabled upon reboot"
fi
exit
mhaedo said:
It seems like a lot of people are constantly pulling/editing/pushing build.conf in order to turn JIT on and off, so I threw together a short script to toggle it on and off.
It's nothing elaborate, but it gets the job done. This is meant to work with the build.prop that comes stock with cyanogenmod 5.0b2.
Simply push the script to your phone (sdcard, or wherever you please) and run it. For example, put the quoted text into a file called jit.sh, push it to the root of your sdcard, and run "sh /sdcard/jit.sh" from a terminal. You can also set it up in GScript or GScript Lite so you can add an icon on your homescreen to toggle JIT more easily.
You must reboot for the changes to take effect.
Click to expand...
Click to collapse
Nice - been looking for just this, thanks. As a bit of a n00b, any idea why this doesn't seem to run in GScript Lite? I get the SU request OK, but then nothing - don't see the echo'd text at all, nowt. Running CM5b2 .29 kernel.
Ive installed pauls modaco patch wil this turn jlt off? its annoying me
Thanks for this script !
I just pull, nano, and push it back.
I don't think It's 100% stable.
push/pull? Shoot, I just use vi on build.prop from betterterminal. Don't have to mess with adb at all
Since you need to reboot anyway, couldn't we just put "reboot" in place of "exit"? I'm assuming that's not part of the script to save, since you have "fi" at the end of it. Personally, what I did is save 2 versions of build.prop to my sdcard and then built gscripts to swap 'em out. lol A little more crude, but just as effective.
when i try to run the jit.sh file in terminal i get:
failed: no such file or directoryk3 on /system : not found
sdcard/jit.sh : 13: syntax error: end of file unexpected (expecting 'then")
am i completely retarded?
trisl said:
Nice - been looking for just this, thanks. As a bit of a n00b, any idea why this doesn't seem to run in GScript Lite? I get the SU request OK, but then nothing - don't see the echo'd text at all, nowt. Running CM5b2 .29 kernel.
Click to expand...
Click to collapse
Yeah, I had the same problem. Remove the su request from superuser.apk. Then, run any script that requires root. Click remember, and allow. It will not work at this point. Back out to the homescreen with the back button, then go back into GScript Lite and run it again. It should work this time.
Guitarfreak26 said:
Ive installed pauls modaco patch wil this turn jlt off? its annoying me
Click to expand...
Click to collapse
Not sure. I would assume so, never seen the build.prop that's used but I don't see why it would be any different.
Mi|enko said:
Since you need to reboot anyway, couldn't we just put "reboot" in place of "exit"? I'm assuming that's not part of the script to save, since you have "fi" at the end of it. Personally, what I did is save 2 versions of build.prop to my sdcard and then built gscripts to swap 'em out. lol A little more crude, but just as effective.
Click to expand...
Click to collapse
That would be more efficient, but I just enjoy clicking my icon a few times and toggling it on and off Don't ask me why.
[email protected] said:
push/pull? Shoot, I just use vi on build.prop from betterterminal. Don't have to mess with adb at all
Click to expand...
Click to collapse
How would I do that? I have betterterminal emulator pro..
Four Fourty Four said:
How would I do that? I have betterterminal emulator pro..
Click to expand...
Click to collapse
$ su
# vi /system/build.prop
Proceed to edit (man vi, google vi). Bit of a pain in the ass though if you switch back and forth frequently.
mhaedo said:
$ su
# vi /system/build.prop
Proceed to edit (man vi, google vi). Bit of a pain in the ass though if you switch back and forth frequently.
Click to expand...
Click to collapse
Don't forget, you need to remount /system as rw also. it is a tiny bit of a pain, but I don't see much of a reason to switch back and forth all the time. Thus far I have yet to have any problems with JIT.
[email protected] said:
Don't forget, you need to remount /system as rw also. it is a tiny bit of a pain, but I don't see much of a reason to switch back and forth all the time. Thus far I have yet to have any problems with JIT.
Click to expand...
Click to collapse
The only time I consistently have problems with JIT is when tethering. Otherwise, I have yet to have any issues. I tether frequently, hence the script.
BTW, thanks for Apps2SD(2) and OpenOverclocker. They were very helpful to me at one point.
blakestimac said:
when i try to run the jit.sh file in terminal i get:
failed: no such file or directoryk3 on /system : not found
sdcard/jit.sh : 13: syntax error: end of file unexpected (expecting 'then")
am i completely retarded?
Click to expand...
Click to collapse
+1
I'm getting this message also.
blakestimac said:
when i try to run the jit.sh file in terminal i get:
failed: no such file or directoryk3 on /system : not found
sdcard/jit.sh : 13: syntax error: end of file unexpected (expecting 'then")
am i completely retarded?
Click to expand...
Click to collapse
Hm, strange. I can't duplicate this error. The steps I take are as follows:
1) Cut/paste the quoted code in the original post and save it in a document called jit.sh
2) On computer, adb push jit.sh /sdcard
3) In terminal on Nexus One:
$ cd sdcard
$ su
# sh jit.sh
JIT toggled ON
JIT enabled upon reboot
#
I'm sorry I can't be more help, but I'm not sure why you'd see that error.
mhaedo said:
Hm, strange. I can't duplicate this error. The steps I take are as follows:
1) Cut/paste the quoted code in the original post and save it in a document called jit.sh
2) On computer, adb push jit.sh /sdcard
3) In terminal on Nexus One:
$ cd sdcard
$ su
# sh jit.sh
JIT toggled ON
JIT enabled upon reboot
#
I'm sorry I can't be more help, but I'm not sure why you'd see that error.
Click to expand...
Click to collapse
Ok, I didn't do the whole adb push thing, I just copied it to my SDcard root from windows. Is that the problem?
BoostedSR20 said:
Ok, I didn't do the whole adb push thing, I just copied it to my SDcard root from windows. Is that the problem?
Click to expand...
Click to collapse
Ah, it's the line breaks. Windows uses a pair of CR and LF characters to terminate lines. Unix based system use an LF character only.
You can get a utility to convert the line breaks to unix style line breaks. I'm sure it will come in handy. I'll also upload the jit.sh with proper line breaks to the original post.
BoostedSR20 said:
Ok, I didn't do the whole adb push thing, I just copied it to my SDcard root from windows. Is that the problem?
Click to expand...
Click to collapse
Just tried pushing it to the sdcard, that went thru ok.
Still cant get it to run, same error. I've tried your command in the OP, and the what you wrote out a couple posts up. Same error on each one.
mhaedo said:
Ah, it's the line breaks. Windows uses a pair of CR and LF characters to terminate lines. Unix based system use an LF character only.
You can get a utility to convert the line breaks to unix style line breaks. I'm sure it will come in handy. I'll also upload the jit.sh with proper line breaks to the original post.
Click to expand...
Click to collapse
Ahhh, so it had to do with me making the file in the Windows Notepad. Got it..
I am trying to learn how to use ADB, so I can find the cause of a problem I am having on every 2.xx Rom I have tried, and I have tried them all!
So take a look at the screen shot, and you can see it finds my phone. For some reason thats as far as I have gotten, been screwing with it for 2 days but alas I have to ask!
Thanks for any help you can be!
Roman
OK, at a quick glance....
Instead of just typing "logcat", try "adb logcat". I think you'll have better luck.
Still looking through the rest, will edit in a few minutes.
EDIT 1: Don't actually put the "#" or the "$" on your command line. Those are prompts that the shell presents to you, not something you're supposed to type.
EDIT 2: Add the sdk\tools directory to your path. It will make your life much easier. You can get away with just doing a "cd" to that directory, but in the long run things will be much easier if you just put it in your path.
EDIT 3: "Operation not permitted"????? That command should have worked. Have you rooted your phone yet?
do adb "insert command here" logcat push pull install etc...
Cool thanks for the help subliminalurge, I think I got it now!
Now to start my bluetooth headphones with 1.5 and grab a log, then load up 2.1 and grab a log and see what the HELL is wrong!
Thanks again!
One last question, is it possible to save a whole string from CMD!
Also how do you do a dalvik wipe?
These are the 2 commands I have! Not sure if either one work or not!
DALVIK WIPE:
adb remount
adb shell
# cd /system/sd/dalvik-cache
# rm *
adb reboot recovery
adb shell mount /data
adb shell rm -r /data/dalvik-cache
I havent used adb since rooting my g1, since the release of the flashrec method.
Heres my noob question
Can terminal emulator do the same things as adb?
The only thing id ever use adb for is to push/pull, and i just use root explorer for that.
Jesus, youd think i became a senior just by spamming...
Terminal Emulator can not do the same thing as ADB. ADB is Android Developer Bridge (bridge as in computer to phone connection). Terminal Emulator, if you know Linux terms, emulates a Linux terminal on the phone... so, if you do "adb shell", you'll have the same commands as you would in terminal emulator... sorry I'm confusing
mrinehart93 said:
Terminal Emulator can not do the same thing as ADB. ADB is Android Developer Bridge (bridge as in computer to phone connection). Terminal Emulator, if you know Linux terms, emulates a Linux terminal on the phone... so, if you do "adb shell", you'll have the same commands as you would in terminal emulator... sorry I'm confusing
Click to expand...
Click to collapse
Lol i see what you mean.
You need adb to theme, dont you?
Windows man, through and through
(oh the irony, of being such an android patron...)
I don't know how I did it. I don't even know if it's a windows 7 thing, or a adb shell thing. But...
When I open adb shell and enter the "ls" or "ls -l" command, it returns the name of the file/dir in a strange format. Instead of just the name like "sdcard" I get:
<-[1;34msdcard<-[0m
I'm pretty sure it didn't always do this, so I must have enabled a switch somewhere (or I'm misusing the "ls" command). I do not have this problem with Terminal Emulator on the Captivate itself... just when using ADB shell on a Windows 7 machine. How do I turn this off? Any help would be greatly appreciated.
Thanks!
dc41 said:
I don't know how I did it. I don't even know if it's a windows 7 thing, or a adb shell thing. But...
When I open adb shell and enter the "ls" or "ls -l" command, it returns the name of the file/dir in a strange format. Instead of just the name like "sdcard" I get:
<-[1;34msdcard<-[0m
I'm pretty sure it didn't always do this, so I must have enabled a switch somewhere (or I'm misusing the "ls" command). I do not have this problem with Terminal Emulator on the Captivate itself... just when using ADB shell on a Windows 7 machine. How do I turn this off? Any help would be greatly appreciated.
Thanks!
Click to expand...
Click to collapse
ugh, this isn't garbage information or a mistake. this is windows command prompt (which isn't a proper terminal emulator) not being able to deciper the color coding techniques used in *NIX shells.
all these odd numbers are are simply color coding to "prettify" the shell if you're using a *NIX shell
Kaik541 said:
ugh, this isn't garbage information or a mistake. this is windows command prompt (which isn't a proper terminal emulator) not being able to deciper the color coding techniques used in *NIX shells.
all these odd numbers are are simply color coding to "prettify" the shell if you're using a *NIX shell
Click to expand...
Click to collapse
Thanks for the info! Now that I know what's going on, I should be able to find solution on the web.
Thanks!
dc41 said:
I don't know how I did it. I don't even know if it's a windows 7 thing, or a adb shell thing. But...
When I open adb shell and enter the "ls" or "ls -l" command, it returns the name of the file/dir in a strange format. Instead of just the name like "sdcard" I get:
<-[1;34msdcard<-[0m
I'm pretty sure it didn't always do this, so I must have enabled a switch somewhere (or I'm misusing the "ls" command). I do not have this problem with Terminal Emulator on the Captivate itself... just when using ADB shell on a Windows 7 machine. How do I turn this off? Any help would be greatly appreciated.
Thanks!
Click to expand...
Click to collapse
I've never had this happen when I use the adb shell on my Win7 machine. Which distro are you using? I have Home Premium x64.
miztaken1312 said:
I've never had this happen when I use the adb shell on my Win7 machine. Which distro are you using? I have Home Premium x64.
Click to expand...
Click to collapse
Ultimate 64, but like I said, it wasn't always like this. Some point in the lady week I must have changed a setting or something. Now I just have to figure out what I did and how to undo it.
I am guessing you switched ROMs? Seems to be the color setting in some of the ROMs on the LS command. It is not a windows bug, any terminal/shell that doesn't support colored directory/file names will give you this behavior.
See this thread for a fix:
http://forum.xda-developers.com/showthread.php?p=7714491
I have been having this issue since I upgraded to JH3 and SRE 1.2.1a (which included a new busybox 1.17.1 and proper symbolic links). SRE 1.2.1a also remove the stock ls command. I did not start looking into fixing it until tonight. Setting an alias for every adb shell session is annoying. Android does not include any of the profile start scripts like linux does or we would be able to stick an alias in some place like a .bashrc or /etc/bashrc.
Here is a permanent solution. I normally have a permanent alias setup on my linux machines with the switches below, you can modify the switches to your liking.
create a file in notepad with the following:
"ls -alh --color=never [email protected]" do not include the quotes.
Note the switches I am using:
a = show all files including hidden (the ones that start with a "." as a prefix on the name)
l = show files in long listing format/layout
h = show file size in human readable format eg and 1k instead of 1000.
Save the file as "ll" without an extension. You can use another name if you wish.
Use adb to push the file into /sdcard then adb shell to copy it to /system/xbin or copy via root explorer.
#assuming ll is in your SDK tools folder - move to sdcard
adb push ll /sdcard
#move to xbin folder
adb shell
su
mv /sdcard/ll /system/xbin/ll
I didn't touch the permissions (its working with -rw-rwxr-x) but just in case you can set permissions on the file.
chmod 755 ll
I rebooted my phone and I was still good to go using "ll" from adb shell.
adb shell ll
or adb shell
$ll
enjoy.
Mine does the same, looks nice when I am using on Ubuntu. I had flashed JH3 + SRE 1.2.1a also.
Did you try using the "dir" command? I think it comes with busybox 1.7.1. That one outputs fine for me when I am using the cmd prompt. Only little quirk is that I have to remember not to use ls when logged on Win7.
color codes were removed in SRE 1.2.2a: http://forum.xda-developers.com/showthread.php?t=751934
tikidroid said:
I have been having this issue since I upgraded to JH3 and SRE 1.2.1a (which included a new busybox 1.17.1 and proper symbolic links). SRE
Click to expand...
Click to collapse
Your fix worked perfectly for me!
Thanks!
tikidroid said:
Here is a permanent solution. I normally have a permanent alias setup on my linux machines with the switches below, you can modify the switches to your liking.
create a file in notepad with the following:
"ls -alh --color=never [email protected]" do not include the quotes.
Click to expand...
Click to collapse
Ahhh.... thank you so much for this post. This has been driving me crazy for a few hours, and I almost considered putting an alias to ll in init.rc (but I much prefer this less invasive method)
Useful workaround, thanks. Still needed, some two years later!
Is this so i can push files through my phone, without having to do it on the computer? How does this work. Anyone have a link? I did a search and came up with nothing. Just wondering, thanks!
It's the same as a Terminal on a unix/linux box or for that matter, command line on a windows box.
Terminal emulator app will give you command line access to your (rooted) phone. You can then go into SU mode, as well.
Yes, you are correct, it will allow you to do things that an ADB shell would allow, from a computer.
You can download it from the market.
im sure that you might have known this already, but when you are using a terminal emulator, and you get root access (su), you really should follow the directions to the letter. if you make a mistake in the typing, it is possible that you could do some damage.
it is also recommended to not enter in terminal commands unless someone with more experience than you (based off their post number) reports success in completing the wanted task. so essentially, use the terminal at your own risk.
(all this is pulled from my previous post which you can find in my signature - "Terminal/adb shell commands")
Adb commands are completely different than terminal commands.
First enter "su" to get substitute user (the # sign)
Then enter "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system" to make the root r/w
to copy files use "cp" command
to move files use "mv" command
to remove files use "rm" command
to change file/dir permissions use "chmod"
to change directories use "cd" - "cd .." will bring you back one directory - "cd //" brings you back to root
to list files in the dir use "ls"
to read/mod/combine a file use "cat"
to edit a value use "echo"
to see running processes use "top"
to kill a process use "kill -9 PID#HERE"
ex) cp /sdcard/download/myapplication.apk /data/app/myapplication.apk
If you know any linux commands then you should know your way around terminal emulator. If you want i can give you more examples just let me know. Hope this helped
What does "cat" mean?
Oh my bad i didn't see it in there, all the times i lookedO sorry.
where could i get this app?
i couldnt find it on market using keyword "terminal", "terminal emulator" or even "adb terminal emulator"
bla.k.offee said:
where could i get this app?
i couldnt find it on market using keyword "terminal", "terminal emulator" or even "adb terminal emulator"
Click to expand...
Click to collapse
https://market.android.com/details?id=jackpal.androidterm&feature=search_result
Terminal Emulator Hell!!!!
I have wiped and restored more times tonight than I can count....HELP!!!! I have a very lean rom. So lean it that it has no file explorer and I don't want to install gapps. All I want to do is install Titanium Backup (the .apk file is on the root of my SD card) with the terminal emulator and I'll be all set. I have had all different error messages, and I'm more confused now then when I started this adventur, 6+ hours ago. Any help would be great.
hockeyfamily737 said:
I have wiped and restored more times tonight than I can count....HELP!!!! I have a very lean rom. So lean it that it has no file explorer and I don't want to install gapps. All I want to do is install Titanium Backup (the .apk file is on the root of my SD card) with the terminal emulator and I'll be all set. I have had all different error messages, and I'm more confused now then when I started this adventur, 6+ hours ago. Any help would be great.
Click to expand...
Click to collapse
I keep TB on the root of my sdcard named TB.apk. Then I go into terminal emulator (it is in most roms already).
su
cp /sdcard/TB.apk /data/app/TB.apk
Then I back out of TE and TB is installed. Any commands you type in TE are case sensitive. All file names are case sensitive and spaces do not work well. So if your TB apk is "Titanium Backup-1.3.3.apk", I would rename it to something without the spaces like Titanium_Backup-1.3.3.apk.
I rename it TB.apk because who wants to type all of that?
kyouko said:
(all this is pulled from my previous post which you can find in my signature - "Terminal/adb shell commands")
Adb commands are completely different than terminal commands.
First enter "su" to get substitute user (the # sign)
Then enter "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system" to make the root r/w
to copy files use "cp" command
to move files use "mv" command
to remove files use "rm" command
to change file/dir permissions use "chmod"
to change directories use "cd" - "cd .." will bring you back one directory - "cd //" brings you back to root
to list files in the dir use "ls"
to read/mod/combine a file use "cat"
to edit a value use "echo"
to see running processes use "top"
to kill a process use "kill -9 PID#HERE"
ex) cp /sdcard/download/myapplication.apk /data/app/myapplication.apk
If you know any linux commands then you should know your way around terminal emulator. If you want i can give you more examples just let me know. Hope this helped
Click to expand...
Click to collapse
Sent you a pm
#Root/Hack_Mod-Always®
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.