[SCRIPT] Toggle JIT on/off (updated instructions) - Nexus One Q&A, Help & Troubleshooting

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..

Related

[SCRIPT] Add BASH shell to your rooted Milestone

Don't know if this has been mentioned anywhere, but I'll post it anyway...
This utility will come in handy for those who use terminal emulators. "Bash" features command completion (by holding the center button on the directional pad) and can execute previous commands from history (by pressing Up on the direction pad).
Simply unzip the attachment to anywhere on your SD card, and, using a terminal emulator like ConnectBot do the following:
Code:
cd sdcard/[I]<folder where bash was saved>[/I]
su
sh bash.sh
Or, if you want to run from OpenRecovery, then unzip the files under /sdcard/OpenRecovery/scripts, then edit "bash.sh" so that the "cp bash/bash /system/bin" line is changed to "cp /sdcard/OpenRecovery/scripts/bash/bash /system/bin". To install it, use the "Miscellaneous->Run Script" option from OpenRecovery.
It will automatically take effect as your default shell the next time you start a terminal session or reboot. Or just type 'bash'
Thanks for the script , I havent had a chance to use it just yet but it would be extremely useful
~PsyCl0ne
PsyCl0ne said:
Thanks for the script , I havent had a chance to use it just yet but it would be extremely useful
~PsyCl0ne
Click to expand...
Click to collapse
No problem! It's a time saver for me... no more need to re-type commands or type out the long folder names.
Isnt busybox sh acting the same way ? whats advantage over busybox sh ?
http://www.faqs.org/faqs/unix-faq/shell/shell-differences/
Scroll down till you see a table...
zewelor1 said:
Isnt busybox sh acting the same way ? whats advantage over busybox sh ?
Click to expand...
Click to collapse
I think the most visible is the permanent history.
Busybox has the permanent history as compile option but nobody cares to enable it.
For the rest the busybox's shell is more than enough for the limited usage on a cellphone.
oh this is awesome.
Gonna come in real handy for ro/rw mounting. I'd been cheating by throwing a bunch of common commands into the 'first command' line and saving different connection profiles in ConnectBot
-----
*edit*
bummer, couldn't get Terminal Emulator to initialize the session. Attached is a zip with sh.sh to restore your shell to sh - actually, it just redirects the sym. link from bash to sh (sh0 binary), so you could use it to swap back and forth if you want - bash is left on the system.

Launcher(any) lag fix

As mentioned here and here:
adding "echo ro.HOME_APP_ADJ=1" to /data/local.prop fixes the launcher redraw lag.
Documentation:
http://code.google.com/p/sipdroid/wiki/FAQ
Due to limited memory home screen often takes several seconds to load. Luckily these phones allow root access. Issue the command "echo ro.HOME_APP_ADJ=1 >/data/local.prop" and reboot, to lock home screen in memory.
Click to expand...
Click to collapse
update:
it does seem to made a difference
Here are the commands: (batch file to do this here,post#5)
Code:
adb remount
adb pull /system/build.prop .
edit build.prop with a decent text editor and add these two lines a the end
#fix for screen redraw lag
ro.HOME_APP_ADJ=1
Click to expand...
Click to collapse
Code:
adb push build.prop /system/
adb reboot
you could try
Code:
adb shell stop
adb shell setprop ro.HOME_APP_ADJ=1
adb shell start
if it works you just have to add ro.HOME_APP_ADJ=1 to build.prop.
g4rb4g3 said:
you could try
Code:
adb shell stop
adb shell setprop ro.HOME_APP_ADJ=1
adb shell start
if it works you just have to add ro.HOME_APP_ADJ=1 to build.prop.
Click to expand...
Click to collapse
tried:
Code:
adb shell stop
adb shell setprop ro.HOME_APP_ADJ 1
adb shell start
My phone hot rebooted after the last command.
After it rebooted I ran
Code:
C:\Users\meeee>adb shell getprop ro.HOME_APP_ADJ
4
Since its 4. I guess it did not stick.
Also tried setting it and immediately reading it, did not stick.
Code:
C:\Users\meeee>adb shell setprop ro.HOME_APP_ADJ 1
C:\Users\meeee>adb shell getprop ro.HOME_APP_ADJ
4
The setting stuck after putting it in build.prop, time to check if it made any difference...
Code:
C:\Users\meeee\Desktop>adb shell getprop ro.HOME_APP_ADJ
1
Don't reboot, try the commands and watch out if your problem got fixed. If it works like that you can add the line to build.prop.
g4rb4g3 said:
Don't reboot, try the commands and watch out if your problem got fixed. If it works like that you can add the line to build.prop.
Click to expand...
Click to collapse
It did it on its own.
seems to be working, updated op with the commands.
britoso said:
seems to be working, updated op with the commands.
Click to expand...
Click to collapse
Added this cmd to build.prop but see no changes... what lags you talking about btw?
For me my home screens were sluggish. There was a delay when I tried to switch desktops.
I made a little bat.file, which adds those 2 lines to your build.prop.
- put "Launcher_lag_fix.bat" in ..Android/tools/
- doubleklick
- and wait till reboot.
rori~ said:
I made a little bat.file, which adds those 2 lines to your build.prop.
- put "Launcher_lag_fix.bat" in ..Android/tools/
- doubleklick
- and wait till reboot.
Click to expand...
Click to collapse
thanks rori.
No one has posted yet what the command actually does. All it does is tell Android to try to keep the launcher in memory.
Shouldn't affect anything like the scrolling or any response while actually using the launcher, but will fix some lag for when going back home from any other app, as it doesn't have to re-launch the launcher if it was kicked out of memory.
Various options like this exist in some launchers, and I think Cyanogenmod has this option in the settings too. They are not all the same as this command though, so this may work better for some people while the other ways to do it may work better for others.
Clarkster said:
No one has posted yet what the command actually does. All it does is tell Android to try to keep the launcher in memory.
Click to expand...
Click to collapse
As per this it locks the 'screen' in memory. (maybe they mean the screen buffer)
Due to limited memory home screen often takes several seconds to load. Luckily these phones allow root access. Issue the command "echo ro.HOME_APP_ADJ=1 >/data/local.prop" and reboot, to lock home screen in memory.
Click to expand...
Click to collapse
Makes sense as I always have had launcher locked in memory before this and was still having my home screen redraw very slowly when I switched to it.
A good find
Btw just for info there were issues in apps from pre release system dump of arc
However if u r using apps from the retail dump 'they don't lag'
Sent from my U20i using XDA App
rori~ said:
I made a little bat.file, which adds those 2 lines to your build.prop.
- put "Launcher_lag_fix.bat" in ..Android/tools/
- doubleklick
- and wait till reboot.
Click to expand...
Click to collapse
can you specify where is the android/tools mentioned, can it be found in all android phones?
Btw, I have seen ">>" and ">" then "space" /data/local.prop in other websites, while in the sipdroid article, it is exactly
"echo ro.HOME_APP_ADJ=1 >/data/local.prop".
otivaeey said:
can you specify where is the android/tools mentioned, can it be found in all android phones?
Btw, I have seen ">>" and ">" then "space" /data/local.prop in other websites, while in the sipdroid article, it is exactly
"echo ro.HOME_APP_ADJ=1 >/data/local.prop".
Click to expand...
Click to collapse
adb comes with the sdk, for my windows machine its at
C:\android-sdk-windows\platform-tools
in unix ">" sends text to a file (deletes whatever was there) and ">>" appends at the end of a file. If you're not familiar its easiest to just add the one line manually at the end of build.prop.
Hey y'all, wondering if anybody can help me with this:
I'm at work and don't have access to ADB. Can I use Root Explorer to copy the file to the sdcard, mount the card on a PC, edit it, and then use Root Explorer to copy it back again? Or will that cause issues with permissions or something?
EDIT: Well it's intellectual now, I nandroided back to my previous ROM due to some other issues. I'd still like to know though.
Ya the root explorer thing should work but just to be safe I would nandroid first cause worst case scenario your phone freezes you pull battery boot into recovery restore nandroid. But seriously I don't think it will be a problem.
Just out of curiosity I wanted to see if I could do this without a computer at all and turns out all you really need to do is download estrong (or any other root explorer), turn root explorer option on, mount /system and go and edit build.prop through the the built in note editor in estrong. So that might be an alternate solution for you kippswanson.

[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.

[Q] Stuck at "Touch Android To Begin" after reboot

I rooted my DS7 and changed the "phone.apk" name, and I couldn't get past "Force Close" message, so I reset (Vol+ + Power?).
I got the option of "0. Boot", "1. Wipe"..., and selected 1.
Rebooted and was stuck at "Touch Android To Begin" - Android turns white, but does not move forward.
I reset and selected a different option of complete wipe of internal and personal data.
Rebooted and am still stuck at "Touch Android To Begin".
Any suggestions?
I have 2 SD7's, so do I need to back up a ROM off the good one and reflash the stuck one? If so, how would I do that?
Change the name of phone.apk back and see if that helps. You ought to change phone.apk, get a bunch of force closes, and then be able to restart and have it work OK. If you restarted and still had issues, then I'm not sure why that would be (unless you didn't also change telephonyprovider.apk).
Z4nd4r said:
Change the name of phone.apk back and see if that helps. You ought to change phone.apk, get a bunch of force closes, and then be able to restart and have it work OK. If you restarted and still had issues, then I'm not sure why that would be (unless you didn't also change telephonyprovider.apk).
Click to expand...
Click to collapse
I never got a chance to change telephonyprovider.apk . After changing phone.apk, I kept getting force close messages without a chance to do anything...reboot, shut down, etc., so I just reset and did a "wipe"/restore...or at least I thought it was a restore to factory. Maybe I should have waited and tried the reboot first.
Anyways, I'm stuck now. If I cannot get past the Android, how would I even change the file name back to phone.apk ? Also, shouldn't a wipe/restore/clear cache have changed all of that...by replacing all files/kernal/rom to factory?
S4F4M said:
I never got a chance to change telephonyprovider.apk . After changing phone.apk, I kept getting force close messages without a chance to do anything...reboot, shut down, etc., so I just reset and did a "wipe"/restore...or at least I thought it was a restore to factory. Maybe I should have waited and tried the reboot first.
Anyways, I'm stuck now. If I cannot get past the Android, how would I even change the file name back to phone.apk ? Also, shouldn't a wipe/restore have changed all of that...by replacing all files/kernal/rom to factory?
Click to expand...
Click to collapse
Wipe/restore, if I understand it correctly, only wipes out cache and data; basically, all of your personal information and files for apps and such (not your SD card). This leaves the kernel as it was.
Do you have CWR on there? If so, simply install a new ROM. If not, you can flash it on there via ADB, I think (check the CWR thread).
Your other option is to change the file name via ADB, or push a new one to it. I've uploaded the stock Phone.apk here:
http://www.megaupload.com/?d=EEBPHB4H
You can push it by doing
Code:
adb push Phone.apk /system/app
I think there's an adb command to simply rename, but I don't recall what it is. Once you do this, you ought to be good to go. Get signed in, then change/move both the apps and restart. It might be annoying with the force closes; not sure if you'll have to use the pinhole reset.
Good luck!
Thanks, Z4nd4r! I'll give it a whirl.
I just moved/deleted the files to test it out (and run some battery tests). I had the force close issue to the point that I couldn't do anything, so I used the pinhole reset. Booted up fine and no cell signal, just as it ought to.
What Z4nd4r recommended worked.
1. Had to install ADB and drivers.
2. Had to point Command Prompt to drivers
- Go to the Windows "Control Panel".
- Click on "System".
- Click on "Advanced system settings" in the left column of the window you're in.
- Find the button called "Environment Variables" in the window that opens (it's at the bottom on the first tab).
- Scroll down in the "System variables" box until you find "Path".
- Select "Path" and click the "Edit" button.
- At the very beginning of the input field called "Variable value" enter where the ADB drivers were located.
For example: "C:\program files\android-sdk\platform-tools;" (without the quotes).
NOTE: Do not remove any of the other paths, and make sure you have a semi colon at the end of the new path you're adding.
- OK/APPLY > EXIT
3. Root tablet with SuperOneClick.
4. Mounted /system directory as Read/Write (have to use the appropriate /dev/block device path. I found it by typing the following
# adb shell
# su
# cat /proc/mounts
# mount -o rw,remount -t yaffs2 /dev/block/**** /system
where **** is the appropriate device path from the list generated by cat /proc/mounts
5. Making sure that the ADB file was in the same folder as the phone.apk, push apk to /system/app:
adb push Phone.apk /system/app
Yes, it was a pain, but I figured it all out.
S4F4M said:
What Z4nd4r recommended worked.
1. Had to install ADB and drivers.
2. Had to point Command Prompt to drivers
- Go to the Windows "Control Panel".
- Click on "System".
- Click on "Advanced system settings" in the left column of the window you're in.
- Find the button called "Environment Variables" in the window that opens (it's at the bottom on the first tab).
- Scroll down in the "System variables" box until you find "Path".
- Select "Path" and click the "Edit" button.
- At the very beginning of the input field called "Variable value" enter where the ADB drivers were located.
For example: "C:\program files\android-sdk\platform-tools;" (without the quotes).
NOTE: Do not remove any of the other paths, and make sure you have a semi colon at the end of the new path you're adding.
- OK/APPLY > EXIT
3. Root tablet with SuperOneClick.
4. Mounted /system directory as Read/Write (have to use the appropriate /dev/block device path. I found it by typing the following
# adb shell
# su
# cat /proc/mounts
# mount -o rw,remount -t yaffs2 /dev/block/**** /system
where **** is the appropriate device path from the list generated by cat /proc/mounts
5. Making sure that the ADB file was in the same folder as the phone.apk, push apk to /system/app:
adb push Phone.apk /system/app
Yes, it was a pain, but I figured it all out.
Click to expand...
Click to collapse
Glad to hear it worked!
Are you going to brave removing the files, again? You know you want to!
Z4nd4r said:
Glad to hear it worked!
Are you going to brave removing the files, again? You know you want to!
Click to expand...
Click to collapse
Oh, I did. What was left out of the procedure I found was the mention of continuous FORCE CLOSE and the use of the pin reset.
I will write up detailed instructions for a new thread in case anyone else wanted to know.
I know this is a really old thread, but I am stuck on this as well in the same situation that the OP had. However, SuperOneClick 2.2 and 1.55 both seem unable to root the streak so I can use the adb server to push the proper apk back! Anyone have any advice? I need to rename or push both TelephonyProvider.apk *and* Phone.apk. I have tried using adb and of course it errors since the device is unrooted.
turn device vertical.
start upper right touch
lower right touch
lower left touch
upper left touch

A pure C implementation of 'cuber' using OpenSSL's BigNum library

In case anybody cares, here's a pure C reimplementation of 'cuber.py'
(my own earlier reimplementation of @vortox's signature.py).
This is what I'm using in my '1-Click' bootloader unlock VM...
See 'grep ^gcc' for "build instructions".
Hack, you can probably build this for ARM and run it right on your very HDX tablet... (-;
UPDATE (JanuaryFebruary 2017):
OK; so, @zivimo had built this for ARM, but people still haven't noticed.
I repacked his binary from a .tar.gz to a .zip archive and decided to spell out the instructions for use.
Perhaps, this helps... With the right bootloader in place, and adb/fastboot installed (and working),
the unlock is as easy as follows...
Download and extract unlock.zip (SHA256: e40e3010f8eccfa9cbd1e73eecac30cf799099d183de23b2d256fc3407f143f6e5db0b8d82c8fd2a25a22b0a598014d22a2ec33cef27a8d4b65a36acde08f27a)
to the same directory that holds the adb and fastboot executables (unless you have added them to your PATH)
Click on get_code.bat in the extracted folder
-- optional (but commonly required) step(s) --
fix root (roll back, if you need to), flash vulnerable bootloader
[you'll definitely need to perform at least some of these if the last step fails]
Click on unlock.bat in the extracted folder
The archive also includes .sh variants of the .bat files for convenience.
You could also just click to show the hidden section and cut&paste... (-;
Code:
[STRIKE]unzip cuber.zip[/STRIKE]
adb push cuber /data/local/tmp/
adb shell chmod 0755 /data/local/tmp/cuber
adb shell 'id=$(cat /sys/class/block/mmcblk0/device/{manfid,serial}); echo "$id"; echo 0x${id:6:2}${id:11:8} | /data/local/tmp/cuber > /sdcard/unlock.code'
adb pull /sdcard/unlock.code
adb shell rm /sdcard/unlock.code /data/local/tmp/cuber
adb reboot-bootloader
fastboot -i 0x1949 flash unlock unlock.code
NOTE: download and extract the attached 'cuberunlock.zip' and run the above commands
in the directory where 'cuber' got extracted to.
Nice job! Originally I wanted to use OpenSSL BigNum too, but I hadn't enough time and Python was easier to use
hey,
made a static compile with an arm debian (jessie). seemed the easiest solution to me. compile command:
Code:
# gcc -fPIE -static cuber.c -o cuber -lssl -lcrypto
# strip cuber
# ldd cuber
not a dynamic executable
# ./cuber
Usage: cuber [RSA-bytes] < data > sig
seems to work. arm(!) binary attached.
ok draxie, you pointed me here but something seems to be missing. i downloaded unlock.zip, put the files in my adb directory. when i run get_code.bat, it pushes cuber to the kindle in the right directory, changes permissions (dont see any errors there) but then stops saying the system can't find the specified path. Whats funny is i used es file explorer to check the paths in the script, and they are there so not sure where the hang up is.
chin_bone said:
ok draxie, you pointed me here but something seems to be missing. i downloaded unlock.zip, put the files in my adb directory. when i run get_code.bat, it pushes cuber to the kindle in the right directory, changes permissions (dont see any errors there) but then stops saying the system can't find the specified path. Whats funny is i used es file explorer to check the paths in the script, and they are there so not sure where the hang up is.
Click to expand...
Click to collapse
Did you check all three paths?
/data/local/tmp
/sdcard
/sys/class/block/mmcblk0
The 2nd one _may_ be problematic if you're on SafeStrap.
I don't know why. I'm yet to install that on one of my test
devices to investigate. (Or, was that the 1st... )
The 0 in the 3rd one may actually be a 1 on some systems.
I have a few extra lines in my VM script to work around
that, I can easily add that here as well, if that turns out
to be the issue.
BUT, to try and troubleshoot: how far does the script get?
If it didn't complain with the permissions, the 1st path is probably OK.
Does it print your manfid/serial?
If so, mmcblkX would be right as well.
Any chance that you're on SafeStrap?
Can you push/pull to/from /sdcard?
- - - - -
On a second thought: I've only ever tested this on Linux.
String quoting on Windows may work differently, and could *royally* mess up how that more complex command is interpreted.
I'll test tomorrow; it's like 20 past 1am here. I need to get some sleep.
In the meantime, as a workaround, you could just hard-code your manfid/serial, and replace this line:
Code:
adb shell 'id=$(cat /sys/class/block/mmcblk0/device/{manfid,serial}); echo "$id"; echo 0x${id:6:2}${id:11:8} | /data/local/tmp/cuber > /sdcard/unlock.code'
by the decidedly much simpler:
Code:
adb shell 'echo 0xmmssssssss | /data/local/tmp/cuber > /sdcard/unlock.code'
draxie said:
Did you check all three paths?
/data/local/tmp
/sdcard
/sys/class/block/mmcblk0
The 2nd one _may_ be problematic if you're on SafeStrap.
I don't know why. I'm yet to install that on one of my test
devices to investigate. (Or, was that the 1st... )
The 0 in the 3rd one may actually be a 1 on some systems.
I have a few extra lines in my VM script to work around
that, I can easily add that here as well, if that turns out
to be the issue.
BUT, to try and troubleshoot: how far does the script get?
If it didn't complain with the permissions, the 1st path is probably OK.
Does it print your manfid/serial?
If so, mmcblkX would be right as well.
Any chance that you're on SafeStrap?
Can you push/pull to/from /sdcard?
- - - - -
On a second thought: I've only ever tested this on Linux.
String quoting on Windows may work differently, and could *royally* mess up how that more complex command is interpreted.
I'll test tomorrow; it's like 20 past 1am here. I need to get some sleep.
Click to expand...
Click to collapse
It's all good draxie, i figured out what i was doing wrong with the other procedure, that damn STEP 2, once i did it, everything fell into place. Bootloader unlocked and now just trying to figure out which rom to try first. Thanks again, you guys are great and i know how valuable everyones time is. :good:
I keep hitting road blocks, I am rooted and on Fire OS 4.5.5.2 I click get code a screen flashes up then I click Unlock and my Kindle boots to the Grey Kindle screen with Fastboot underneath and nothing else happens. Same happens when I copy and past the code into ADB. What step am I failing at? Thanks for the help!
pdanforth said:
I keep hitting road blocks, I am rooted and on Fire OS 4.5.5.2 I click get code a screen flashes up then I click Unlock and my Kindle boots to the Grey Kindle screen with Fastboot underneath and nothing else happens. Same happens when I copy and past the code into ADB. What step am I failing at? Thanks for the help!
Click to expand...
Click to collapse
@draxie - I have no experience with this tool; python/gmpy2 works reliably for me. Sorry to pull you in ...
Davey126 said:
@draxie - I have no experience with this tool; python/gmpy2 works reliably for me. Sorry to pull you in ...
Click to expand...
Click to collapse
I am up and running now, unlocked and running kk-fire-nexus-rom-thor-20161017. Play store is also up and running.
pdanforth said:
I am up and running now, unlocked and running kk-fire-nexus-rom-thor-20161017. Play store is also up and running.
Click to expand...
Click to collapse
Did you end up using some other method, or did these scripts work for you in the end?
Either way, others may find useful if you could share whatever worked for you. (-;
Unfortunately, I still haven't had a chance to test these scripts in Windows;
so, I couldn't answer your first call for help in a good way. If there's something
wrong and there's enough interest, I'll be happy to fix it as soon as I can.
draxie said:
Did you end up using some other method, or did these scripts work for you in the end?
Either way, others may find useful if you could share whatever worked for you. (-;
Unfortunately, I still haven't had a chance to test these scripts in Windows;
so, I couldn't answer your first call for help in a good way. If there's something
wrong and there's enough interest, I'll be happy to fix it as soon as I can.
Click to expand...
Click to collapse
@stangri did my unlock file and I used this thread to unlock https://forum.xda-developers.com/kindle-fire-hdx/general/thor-unlocking-bootloader-firmware-t3463982
I had trouble making the Unlock file, once that was done and some help from other users I am now up and running!

Categories

Resources