[FYI] JIT - Tilt, TyTN II, MDA Vario III Android Development

I enabled jit on misons latest build and the performance gain is phenomenal just as an fyi if interested later tonight I will try to get the info gathered for everyone
UPDATE:
I used the procedure from here http://forum.xda-developers.com/showthread.php?t=659756 follow the instructions to a T.
Just to be clear this is completed using adb shell
In the instructions there is a reboot command this does not work, either use the shutdown command or shutdown your phone normally and then restart as usual. Make sure to backup your data in the installer menu as a fail safe
Clearing dalvik cache is easier done in the installer menu as well
Once you have the phone backup wait till everything settles down and reboot again it seems to get good and stable on the second reboot.
I could not get this procedure here to work It may work for you though. http://forum.xda-developers.com/showthread.php?t=637419
MFLOP's
Polymod
before 1.6 average
after 3.4 average
MSSMISON
before 2.3 average
after 3.1 - 3.6 average
IMO I feel that polymods 2.1d build is a little snappier and flows a little better than misons build keyboard seems to lag with misons build not with poly's. This is with autokiller set at aggressive as well and 500 overclock
It says somewhere that you can modify JIT and your build.prop to get a little more out of it Does anyone have any Ideas
I will keep this updated if I find anything worth noting
I have been having problems running Polymods build overclocked at 500 using rogue parts it wants to lockup when it tries to wake from sleep I am
trying something a little different I will update when I have come to a solid conclusion

Any chance for getting this to work on Incubus26Jc's Super Eclair Lite 2.1 [RLS 5]?

it should work with any eclair rom 2.1 and some 1.6's that have bits of the eclair kernel i think. http://forum.xda-developers.com/showthread.php?t=637419 is the original thread, more detailed and you'd probably find more definitive answers than mine. i have noticed a couple of quirks once i enabled it. might be worth it to read through the thread.

Is it stable? Like nothing wrong when running it? Can you show us a before and after benchmark?

Dukenukemx said:
Is it stable? Like nothing wrong when running it? Can you show us a before and after benchmark?
Click to expand...
Click to collapse
I have been playing around a lot of stuff with this. with mison latest before benchmark 1.6 avg mflops after 3.4 avg mflops. So far the stability is great I have just changed over to polymods 2.1d and am playing around with it I seem to like his build a little better so now what I have done is parted and pieced the two together and came up with a mash up so to speak and am now getting 3.4 avg mflops. Now I dont know much about this whole JIT and Mflops but I know JIT has done wonders for my phone and I guess the higher the mflops the faster the OS.
Here is the procedure I used http://forum.xda-developers.com/showthread.php?t=659756 If you chose to do so follow this guys instructions to the T! this so far is the only one I have found to work I will update 1st post as well to make it easier to find. I tried the other one earlier this morning while doing a google search and it didn't work for me caused a lot of FC's made system unusable.

does this have to be done with linux or from within the android terminal

I tried following that guide and ****. I feel half the time the adb shell stuff works and the other half it doesn't. The guild isn't too helpful either, for example it said the build.prop file would appear in c:/android/tools folder, but for me it ended up in the c:/users/username folder.
I followed the guide until the WIPE DALVIK CACHE section. Cause at that point I'm not sure if I'm doing it right. In DOS I was entering that stuff in with "#" in front. Soon as I pasted the command it would just go down to another #.
There needs to be a androidupdate for this or something.

Dukenukemx said:
I tried following that guide and ****. I feel half the time the adb shell stuff works and the other half it doesn't. The guild isn't too helpful either, for example it said the build.prop file would appear in c:/android/tools folder, but for me it ended up in the c:/users/username folder.
I followed the guide until the WIPE DALVIK CACHE section. Cause at that point I'm not sure if I'm doing it right. In DOS I was entering that stuff in with "#" in front. Soon as I pasted the command it would just go down to another #.
There needs to be a androidupdate for this or something.
Click to expand...
Click to collapse
The adb shell does work however there are a few things that have to be omitted and changed to deal with our devices specific. I always pull straight to c:\ It makes things easier to find for me
The reboot command does not work for our devices so for example here is what I did
To pull your build.prop
adb pull /system/build.prop c:\
modify your build.prop per instructions then
adb push c:\build.prop /sdcard/jit
To enable JIT:
cd /sdcard/jit/bin
cp -f dalvikvm /system/bin/
busybox chmod 755 /system/bin/dalvikvm
cd /sdcard/jit
cp -f libdvm.so /system/lib/
cp -f libnativehelper.so /system/lib/
cat build.prop >/system/build.prop
chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libnativehelper.so
chmod 666 /system/build.prop
sync
shutdown
Turn Phone back on the go into the installer where it says hold dpad center
this is where you want to clear dalvik cache
exit and you should be good to go
TIP: as a note once this gets fully booted up and settled shut down your phone and restart it again It will speed up just a little and be a little more stable atleast from my experience
The problem with an update.tar is not everyone might be using the same build since a build.prop is involved so this is something you are gonna have to do device specific what you could do is make one yourself if you know how but I also speculate that an update will not work unless it is done on a fresh install. I built this into a full polymod build last night and it does work as a new install but I did end up with a locked up phone this morning which I have found poly's builds do when they are overclocked so I may revert to misons build I might even try incubus build I made a couple little tweaks to my current build so I'll see how that goes for today.

I'll be trying this later, but for now a few notes , ( what else were you expecting? ).
Mflops: Millions of FLoating point Operations Per Second, in other words, the higher your Mflops, the faster information is being processed.
Not to be confused with Mips, which is Millions of Instructions Per Second, which is a measurement of the number of instructions per second a processor can do.
Scarily enough an intel 486 DX4/100 has an Mflop rating of about 6, ( yes I know theres a difference in architecture to consider), which means that compared to a desktop computer our devices rate at about the same speed as a 486 DX2/66 or so. What this also means is that perhaps Mflops is not the best measurement of speed

jit enabler
Hi,
after some problems I found this before i can start with the copy process:
Add the following line to the end of the build.prop:
dalvik.vm.execution-mode=int:jit
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
cd /sdcard/jit/bin
cp -f dalvikvm /system/bin/
busybox chmod 755 /system/bin/dalvikvm
cd /sdcard/jit
cp -f libdvm.so /system/lib/
cp -f libnativehelper.so /system/lib/
cat build.prop >/system/build.prop
chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libnativehelper.so
chmod 666 /system/build.prop
sync
shutdown
I solved the Keyboard problem with the app "Connect Bot". Thanks for the manual
MT

What about battery life? anyone notice any increases or decreases in battery life with JIT enabled?

lauyanyameric said:
JIT works on Incubus26Jc's Super Eclair Lite 2.1 [RLS5].
Love it. the speed is comparable to DONUT.
Just carefully, follow the steps as instructed by garringm you're good to go.
Click to expand...
Click to collapse
Could you download linpack for android fromthe market and post some benchmarks I get a consistent 3.4 mflops with misons build
I am curious about these mips zenity is it possible to benchmark and tweak For this

I'm stuck at "busybox chmod 755 /system/bin/dalvikvm", where I get an error "busybox is not recognized as an internal or external command".

Dukenukemx said:
I'm stuck at "busybox chmod 755 /system/bin/dalvikvm", where I get an error "busybox is not recognized as an internal or external command".
Click to expand...
Click to collapse
Drop busybox and just try "chmod 755 /system/bin/dalvikvm"

odz said:
Drop busybox and just try "chmod 755 /system/bin/dalvikvm"
Click to expand...
Click to collapse
Nope, same as busybox. I have the Android SDK kit, but nothing in the tools folder has busybox or chmod.

zenity said:
Scarily enough an intel 486 DX4/100 has an Mflop rating of about 6, ( yes I know theres a difference in architecture to consider), which means that compared to a desktop computer our devices rate at about the same speed as a 486 DX2/66 or so. What this also means is that perhaps Mflops is not the best measurement of speed
Click to expand...
Click to collapse
Oddly enough, didn't those chips have a FPU? Considering that our chips don't have a FPU, that's pretty amazing. FPU was important back then if you wanted to play games like Quake, which required an FPU. There were ways to play Quake on a 486 without the FPU, but it was done on the integer part of the CPU.

Dukenukemx said:
Oddly enough, didn't those chips have a FPU? Considering that our chips don't have a FPU, that's pretty amazing. FPU was important back then if you wanted to play games like Quake, which required an FPU. There were ways to play Quake on a 486 without the FPU, but it was done on the integer part of the CPU.
Click to expand...
Click to collapse
The FPU is basically what does the Floating Point instructions that are the main part of the Mflops measurement, my point was that we should be aware of what we are measuring, and have a context for the results.
Benchmarking Mips should be easy, we already have the linux Bogomips measurement from the kernel, which sets a level playing field, since Bogomips is a kernel measurement, and will not change if we use JIT. There are probably benchmarking apps out there that will give results in Mips, I'll have to have a look and see what I can find.
However increasing clock speed will give a corresponding increase in both Mflops and Mips values, since they are both measurements of the processor throughput, what we really need is some way to consistently measure any gains in the OS itself, without changing clock speed.
I'll need to go do some research on this, see if there is an app that'll do what we need.

Dukenukemx said:
Nope, same as busybox. I have the Android SDK kit, but nothing in the tools folder has busybox or chmod.
Click to expand...
Click to collapse
Are you entering these commands through shell? It uses busybox and the comands from your phone I do not have the sdk installed on my laptop just the adb drives not trying to imply that your stupid or dumb but just to be clear I am using win xp pull up and enter the shell for adb.if I get time I may try to throw a script together for you to run on the phoneitself no promises though

garringm said:
Are you entering these commands through shell? It uses busybox and the comands from your phone I do not have the sdk installed on my laptop just the adb drives not trying to imply that your stupid or dumb but just to be clear I am using win xp pull up and enter the shell for adb.if I get time I may try to throw a script together for you to run on the phoneitself no promises though
Click to expand...
Click to collapse
I'm pretty stupid. I wasn't entering those commands with adb shell. So far everything seems working, but I have to benchmark it first.
BTW, I got 3.307 MFLOPS. Seems to be working just fine. It's funny how we're performing equivalent in speed compared to a G1, yet it still runs slow. The response time is delayed, yet Android made phones are snappy. I wonder if we need to cache data or something?

Dukenukemx said:
I'm pretty stupid. I wasn't entering those commands with adb shell. So far everything seems working, but I have to benchmark it first.
BTW, I got 3.307 MFLOPS. Seems to be working just fine. It's funny how we're performing equivalent in speed compared to a G1, yet it still runs slow. The response time is delayed, yet Android made phones are snappy. I wonder if we need to cache data or something?
Click to expand...
Click to collapse
Are you referring to compcache or maybe setting up a swap file. I haven't tried it with this but in the past I have always had bad experience with cc or swap. Here lately I have been considering buying a used g1 until I can afford a N1. From my readings lately I believe that will be my ultimate goal.
Maybe you can try enabling cc and report back your findings

Related

JIT ENABLED and working

READ BEFORE TRYING
I am cdma hero user and it works very well for me. This should work on gsm hero. I pulled this from HERE, it was for the Milestone Android phone which is a GSM phone.
Before enabling
*Change home laucher
*Delete htc lock screen
see below if you dont no how
Jit does not work with htc sense, it will give you many problems. I suggest using Helix launcher from market (free and its what i use daily with no issues). You can also try GDE and nexus launcher, or really anything other then sense.
To change launchers go to setting>applications>manage apps>htc sense And clear defaults. Press home and choose a different launcher.
OR download "Home Switcher" from market.. Its a free app that lets you change between launchers.
JIT does not like any HTC apps.. So delete your HtcLockScreen by doing this.
Code:
adb remount
adb shell rm /system/app/HtcLockScreen.apk
Here is the htc lock screen if you want it back
HtcLockScreen
JIT is in no way perfect on our htc hero's so MAKE A BACKUP before trying.
And you could very well run into TONS of problems, its just something to test out.
Though if used right, you wont have any problems. I use this daily.
THIS IS FOR JIT
Download: *View attachment vmlibs.zip*
Then follow these steps:
•Create 2 folders on your sdcard: “jit” & “dalbk”
•Extract the vmlibs.zip to the “jit” folder on your sdcard
•Using ADB pull your build.prop
Code:
adb remount
ADB pull /system/build.prop build.prop
-It will place the file in your c:/android/tools folder
-Edit this using notepad or similiar program.
•Add the following line to the end of the build.prop: dalvik.vm.execution-mode=int:jit
-Save the changes and move it to the directory c:/
•Push it back to your “jit” folder on the sdcard
Code:
ADB push C:\build.prop /sdcard/jit/build.prop
This will back up your current files. So you can disable jit.
Code:
ADB shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock6 /system
cp /system/build.prop /sdcard/dalbk/
cp /system/bin/dalvikvm /sdcard/dalbk/
cp /system/lib/libdvm.so /sdcard/dalbk/
cp /system/lib/libnativehelper.so /sdcard/dalbk/
This will enable jit on your phone.
Code:
cd /sdcard/jit/bin
cp -f dalvikvm /system/bin/
busybox chmod 755 /system/bin/dalvikvm
cd /sdcard/jit
cp -f libdvm.so /system/lib/
cp -f libnativehelper.so /system/lib/
cat build.prop >/system/build.prop
chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libnativehelper.so
chmod 666 /system/build.prop
sync
reboot
WIPE DALVIK CACHE AFTER ENABLING JIT.. This will cause your phone from sometimes going into a boot loop.
You dont have to wipe your whole phone.. Only dalvik cache. Your phone will take awhile to reboot since its rebuilding dalvik. Be patient. If it eventually freezes then reboot and it should go through fine after that.
TO DISABLE:
This should disable JIT and return phone back to defualt
Code:
adb remount
adb shell
su
cd /sdcard/dalbk/
cat build.prop >/system/build.prop
cp -f dalvikvm /system/bin
busybox chmod 755 /system/bin/dalvikvm
cp -f libdvm.so /system/lib/
cp -f libnativehelper.so /system/lib/
chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libnativehelper.so
chmod 666 /system/build.prop
sync
reboot
Post For help if the disabling gives you any problems.. If it does you can always do back up of your rom that you should of made.
Original site http://sholes.id.au/how-to/
Awesome.. I really hope that some of the hero devs can optimize this for the hero.
madsborelli said:
Awesome.. I really hope that some of the hero devs can optimize this for the hero.
Click to expand...
Click to collapse
I am hoping this also. Most devs dont work on things like this, or know enough about it to fix it.
The only real problem I have had was using htc widgets, htc sense, and htc lockscreen. When I use other home screens, and delete the htc lockscreen, I can run error free with JIT enabled.
Jus10o said:
I am hoping this also. Most devs dont work on things like this, or know enough about it to fix it.
The only real problem I have had was using htc widgets, htc sense, and htc lockscreen. When I use other home screens, and delete the htc lockscreen, I can run error free with JIT enabled.
Click to expand...
Click to collapse
Can you feel the difference in speed?
madsborelli said:
Can you feel the difference in speed?
Click to expand...
Click to collapse
Everything is really instant. I clicked and then closed and clicked and closed multiple apps on my screen and it never hung up or lagged.
Before jit, it was pretty quick but every once in a while would slow up on opening or closing, or switching apps specialy when recieving a call or text at the same time.
One example is. Before jit I was using the yellowpages app with voice command and it would take forever loading voice and then entering what i said into the text box. I tested with jit and it was all pretty instant and never paused or lagged after multiple test.
I posted this on cdma hero and this hero, it gets alot of views but no one seems to actually been trying it and posting about it.
I would like to know what kind of improvements its makes from JIT disabled and JIT enabled for other people.
I understand you all have completely different roms so the numbers can't be directly compared. But the improvement between stock and JIT should show some resemblance from my rom and gsm roms.
Jus10o said:
I posted this on cdma hero and this hero, it gets alot of views but no one seems to actually been trying it and posting about it.
Click to expand...
Click to collapse
OK, I'm also one of the readers
The most important thing why I do not try it to use is, that I wanna held the "Sense UI".
Thats would be also the main reason for the other readers
regards
Dominic
derDominic said:
OK, I'm also one of the readers
The most important thing why I do not try it to use is, that I wanna held the "Sense UI".
Thats would be also the main reason for the other readers
regards
Dominic
Click to expand...
Click to collapse
Yeah I understand. I was one of those people. But I have come to like the helix launcher and beautiful widgets combination. I dont use any of the htc widgets other then the clock, which has a replacement for it.
Also over in cdma hero, many of the people use other launchers and dont use htc sense. Just for speed or personal favorites. I dont know how it is with here.
You can also disable jit very easily by changing the build.prop and having all htc widgets and sense usable agian.
when i do this "mount -o remount,ro /dev/mtd/mtdblock6 /system" it says
mount: device or resource busy
Also how does one get the $ sign whenever i type adb shell it automatically goes to the next line showing me #
Also after running these commands my hero boots but get stuck when i try to unlock the screen by dragging it down, is this not compatible with roise? im running Be hero 1.2.6 which is an ERIS port(2.1).
eldrid said:
when i do this "mount -o remount,ro /dev/mtd/mtdblock6 /system" it says
mount: device or resource busy
Click to expand...
Click to collapse
should be remounted when you reboot anyway.
eldrid said:
Also how does one get the $ sign whenever i type adb shell it automatically goes to the next line showing me #
Click to expand...
Click to collapse
then $ means you are logged in as an unprivileged user, the # indicates that you are root. so if you get # after opening adb shell that is fine, you can skip the 'su' command then.
eldrid said:
Also after running these commands my hero boots but get stuck when i try to unlock the screen by dragging it down, is this not compatible with roise? im running Be hero 1.2.6 which is an ERIS port(2.1).
Click to expand...
Click to collapse
second line of the first post should clarify that...
eldrid said:
when i do this "mount -o remount,ro /dev/mtd/mtdblock6 /system" it says
mount: device or resource busy
Also how does one get the $ sign whenever i type adb shell it automatically goes to the next line showing me #
Also after running these commands my hero boots but get stuck when i try to unlock the screen by dragging it down, is this not compatible with roise? im running Be hero 1.2.6 which is an ERIS port(2.1).
Click to expand...
Click to collapse
The error i received to, dont worry about it.
Yes mine goes to #, ill edit the instructions.
And after it reboots to the screen. Press menu to unlock your phone, DO NOT SLIDE.. It rarely works sliding.
And once you press menu, go to settings, applications, manage applications. Find htc sense, and CLEAR DEFAULT...
Then go to the market and download helix launcher.. You need to do all of this if you want NO force closes and no problems. Once its installed you can press home and select helix as default. Reverse the step to put htc sense back on.
If you really want to use sense ui, you must disable JIT.. Boot up your phone, let it load to the lockscreen. Dont touch anything. Do the steps to edit build.prop and do
TO DISABLE:
CHANGING THIS IN build.prop... This should disable JIT (I have not tested this yet, will post if this works later)
dalvik.vm.execution-mode=int:jit
To:
dalvik.vm.execution-mode=int:fast
push it back to your phone, and reboot
Thank you Kendong2 for replying, I was typing it out when you posted. I didnt know you had helped already.
If anyone does try this, feel free to post what home screen launcher and what errors you come across. Other then htc related things.
I just enabled JIT. Doing some tests now.
---
Alright, this are the results in a "real world" environment:
JIT DISABLED/JIT ENABLED:
NeoCore with sound: 24.4/24.4
NeoCore without sound: 28.8/28.8
Softweg GPU test: 117/116
Lag test: 41/40
Linpack: 2.312/3.663
The only noticeable result was with Linpack, let's say, RAW processing power. All the graphics benchmarks show same performance with JIT enabled. I guess it's a good thing then right?
Just enabled it as well... will test and report
now running alright and seems to be stable. can't tell too much of a difference at the moment but here is the result from linpack.
ahero v0.71 with 64MB swap
Configured with: debugger profiler hprof with_jit show_exception=1
BSK
Is an update.zip possible ? I'm at work, can't use adb right now
ok, im trying to disable it but cannot?
where do i have to change from jit to fast? in the build.prop from sd card right?
@Arkymedes
if you edit build.props in /sdcard/jit then whilst your in that directory do a :
cat build.prop >/system/build.prop
chmod 666 /system/build.prop
sync
reboot
once you have rebooted, it might be worthwhile going back into adb shell and typing this :
dalvikvm -h
i think you should not see "with_jit" in the last line.
BSK
bluescreenkid said:
@Arkymedes
if you edit build.props in /sdcard/jit then whilst your in that directory do a :
cat build.prop >/system/build.prop
chmod 666 /system/build.prop
sync
reboot
once you have rebooted, it might be worthwhile going back into adb shell and typing this :
dalvikvm -h
i think you should not see "with_jit" in the last line.
BSK
Click to expand...
Click to collapse
Followed every step that you mentioned...
After reboot that's what I get in the last line after "dalvikvm -h":
Configured with: debugger profiler hprof with_jit show_exception=1
PS: anyway, I think it's disabled since the scores in Linpack are the normal ones, around 2.250 or something.
Well well...
I just enabled this and after first reboot absolutely everything crashes and I can't get past the lockscreen. Rebooting again now.
EDIT: Same again next reboot. Am on Androbin 2.1 Vanilla ROM
@Arkymedes
if you followed the instructions you should have backups in the /sdcard/dalbk/ folder. just use the instructions again to put them all back.
but it looks like it's not now using the JIT you just copied across anyway.
BSK

[GUIDE] Instructions to Root G2 [Temp Root]

NOTE: The below info is all pretty outdated now that the fantastic Paul O'Brien has created a one-click temp root app called VISIONary. I recommend using that - get it from his thread! In case you don't want to do that (what are you, some kind of masochist?), or want to see the old way of getting temp root, keep reading this thread.
Insert the usual disclaimers about "if this breaks your device, it's not my fault... do this at your own risk... voiding warranty... etc."
Note that for now, this is a TEMPORARY root. And things are now well over my head... I just got lucky with figuring out the first few steps. For now, I'm going to leave it to the fantastic folks over in the thinktank thread to figure out how to make this permanent, and will help out wherever I can.
Update 10/6/2010:
Per suggestions later in the thread, I've compiled a zip file of everything needed to set up a temp root. I've also made some tweaks to the root script, included in the archive as "root" - notably, it will now create symlinks to busybox for commands not included with default android (example: cp).
Here are updated instructions to use with the attached zip file. USB Debugging needs to be enabled:
Stage 1: On your PC
1. adb push su /sdcard/su
2. adb push Superuser.apk /sdcard/Superuser.apk
3. adb push rage /data/local/tmp/rage
4. adb push busybox /data/local/tmp/busybox
5. adb push root /data/local/tmp/root
6. adb shell chmod 0755 /data/local/tmp/rage /data/local/tmp/busybox /data/local/tmp/root
7. Disconnect phone from pc
Here's an alternate Stage 1, thanks to Aphotix:
Aphotix said:
If you really want to optimize (or be lazy if you are like me), just use this batch file (for windows obviously) using the pc side of the instructions already provided.
Code:
adb push su /sdcard/su
adb push Superuser.apk /sdcard/Superuser.apk
adb push rage /data/local/tmp/rage
adb push busybox /data/local/tmp/busybox
adb push root /data/local/tmp/root
adb shell cd /data/local/tmp; chmod 0755 rage busybox root;
just place it inside of the G2TempRoot folder and double click. Then its just two commands on the phones terminal and you have root.
Click to expand...
Click to collapse
BATCH FILE DOWNLOAD HERE
Stage 2: On your phone (Assumes you have already installed Android Terminal Emulator from the market)
1. Launch Terminal Emulator
2. /data/local/tmp/rage
3. Wait for the message: "Forked #### childs."
4. Menu > Reset Term - Terminal Emulator will exit.
5. Launch Terminal Emulator, it Force Closes. Launch a second time, and you'll have a root shell
6. /data/local/tmp/root
Stage One only needs to be done once. Stage 2 needs to be repeated every time you reboot your phone.
Follow the Thinktank thread for progress on a permanent root solution.
Special Thanks:
The dude that made rageagainstthecage - http://c-skills.blogspot.com
gariak, for the ideas in the root script
rpmccormick - improvements in the later PC steps
Aphotix - Windows batch file to make the first part easier
You're a beast. Thank you.
So do we get any roms soon after rooting?
Sent from my T-Mobile G2 using XDA App
Well, that's up to the rom developers. Will probably take time.
Note that currently, this is a TEMPORARY root. And things are starting to get a bit over my head... I just got lucky with figuring out the first few steps. For now, I'm going to leave it to the fantastic folks over in the thinktank thread to figure out how to make this permanent. I'm working to figure out what I can, but I fear my own usefulness is fading
(added that info to OP, since it's probably important)
Ill wait til its permanent
Sent from my T-Mobile G2 using XDA App
This is interesting.. you need to try to get a rooted recovery made.. from there once you get this temp root working try to flash the recovery through terminal.. if it takes then you would be able to flash rooted roms... i wonder if clockwork is working on a recovery already??...
Whew, I was starting to think the phone might be unrootable.
Sent from my T-Mobile G2 using XDA App
OgBrog said:
Whew, I was starting to think the phone might be unrootable.
Sent from my T-Mobile G2 using XDA App
Click to expand...
Click to collapse
What the heck are you talking about? This phone hasn't even been released officially and you are already tired of waiting on root? why don't you learn some stuff and crotribute to helping us get root?
Guys, I know the thought of developing on linux is scary but you can always start with simple stuff like boot animations and themes. Don't you notice how most developers have left xda because all people do here is ask and not give. quit crying, complaining, and posting stupid ****! learn to contribute!
sorry I was up all night last night and got no sleep working on trying to ROOT this damn phone and figuring out what the deal is with our missing storage space on the g2. I'm just cranky. and btw, this isn't directed just at this guy but a lot of people here. sorry to single you out. nothing personal.
weird I dont know what I messed up because the commands for the phone are alot of typing so I copied that text and made a script minus the '#' symbol for all lines and when I run it can;t kill process says can't find and won't remount but if I type it into the phone working fine
here is exactly what I put in on the script for terminal on device
/data/local/tmp/busybox killall rageagainstthecage-arm5.bin
mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
/data/local/tmp/busybox cp /sdcard/Superuser.apk /system/app/Superuser.apk
/data/local/tmp/busybox cp /sdcard/su /system/bin/su
/data/local/tmp/busybox cp /sdcard/busybox /system/bin/busybox
chmod 4755 /system/bin/su
chmod 4755 /system/bin/busybox
mount -o ro,remount -t ext3 /dev/block/mmcblk0p25 /system
sino8r said:
What the heck are you talking about? This phone hasn't even been released officially and you are already tired of waiting on root? why don't you learn some stuff and crotribute to helping us get root?
Guys, I know the thought of developing on linux is scary but you can always start with simple stuff like boot animations and themes. Don't you notice how most developers have left xda because all people do here is ask and not give. quit crying, complaining, and posting stupid ****! learn to contribute!
sorry I was up all night last night and got no sleep working on trying to ROOT this damn phone and figuring out what the deal is with our missing storage space on the g2. I'm just cranky. and btw, this isn't directed just at this guy but a lot of people here. sorry to single you out. nothing personal.
Click to expand...
Click to collapse
I think you may have singled out the wrong person. As I understood it, his post was stating that he was worried we weren't going to be able to root the phone at all...intending the post to be a 'sigh of relief' if you will. There was no implication of being impatient.
And I know it's annoying when people demand stuff without contributing, but if were to open a restaurant and everything on the menu was free, guess what? You'd have a crapload of customers, and they'd all be asking for stuff for free. Once development picks up, there will be a lot less posts about people wanting root and such...just be patient. Coming from a guy who pre-ordered the g1, I think I know a little bit about waiting for good things to happen.
M9x3mos said:
weird I dont know what I messed up because the commands for the phone are alot of typing so I copied that text and made a script minus the '#' symbol for all lines and when I run it can;t kill process says can't find and won't remount but if I type it into the phone working fine
here is exactly what I put in on the script for terminal on device
/data/local/tmp/busybox killall rageagainstthecage-arm5.bin
mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
/data/local/tmp/busybox cp /sdcard/Superuser.apk /system/app/Superuser.apk
/data/local/tmp/busybox cp /sdcard/su /system/bin/su
/data/local/tmp/busybox cp /sdcard/busybox /system/bin/busybox
chmod 4755 /system/bin/su
chmod 4755 /system/bin/busybox
mount -o ro,remount -t ext3 /dev/block/mmcblk0p25 /system
Click to expand...
Click to collapse
That IS strange...I don't see anything wrong with what you've posted here...but I can say that I've seen some strange happenings lately. I'm getting rid of a samsung epic for the g2, and if I used the cable that came with it, nothing through adb would work properly, I had to use a better quality one I got off amazon.
InGeNeTiCs said:
That IS strange...I don't see anything wrong with what you've posted here...but I can say that I've seen some strange happenings lately. I'm getting rid of a samsung epic for the g2, and if I used the cable that came with it, nothing through adb would work properly, I had to use a better quality one I got off amazon.
Click to expand...
Click to collapse
I agree or try a different driver (pdanet one). It is showing under adb devices right? that cable that came with was giving me hell while trying to charge it last night. I'm not sure as using it to tether for adb because I used my old one for the pc.
sino8r said:
What the heck are you talking about? This phone hasn't even been released officially and you are already tired of waiting on root? why don't you learn some stuff and crotribute to helping us get root?
Click to expand...
Click to collapse
I didn't mean to sound ungrateful, it's just that every other phone I've ever
owned already had a root method when I got it. After reading that no previous
root methods work I worried it might be locked like the droid X.
I really don't know too much about rooting and I doubt that there's anything that
I could think of or do that someone more knowledgeable hasn't already done.
CM on G2
Cyanogen said he has already written the device config profile. So as soon as there is root ans the BBQ is over there will be CM!
hendusoone said:
Well, that's up to the rom developers. Will probably take time.
Note that currently, this is a TEMPORARY root. And things are starting to get a bit over my head... I just got lucky with figuring out the first few steps. For now, I'm going to leave it to the fantastic folks over in the thinktank thread to figure out how to make this permanent. I'm working to figure out what I can, but I fear my own usefulness is fading
(added that info to OP, since it's probably important)
Click to expand...
Click to collapse
Sweet
Sent from my T-Mobile G2 using Tapatalk
OgBrog said:
I didn't mean to sound ungrateful, it's just that every other phone I've ever
owned already had a root method when I got it. After reading that no previous
root methods work I worried it might be locked like the droid X.
I really don't know too much about rooting and I doubt that there's anything that
I could think of or do that someone more knowledgeable hasn't already done.
Click to expand...
Click to collapse
The reson none of the old methods have worked so far is because this is an entirely new device. With this device we have new hardware and stock software that has not been seen/hacked yet. We are getting there so just hold out a little while, this device will rock when rooted, and after the BBQ this weekend we should have a few more guys looking into this with us.
Back on topic now
Sent from my T-Mobile myTouch 3G Slide using XDA App
AWESOME!
hendusoone said:
Insert the usual disclaimers about "if this breaks your device, it's not my fault... do this at your own risk... voiding warranty... etc."
I used the rageagainstthecage binary from the download in this blog post: http://c-skills.blogspot.com/2010/08/droid2.html
On PC:
adb push rageagainstthecage-arm5.bin /data/local/tmp
adb shell
cd /data/local/tmp
chmod 0755 rageagainstthecage-arm5.bin
exit
On G2:
Open terminal emulator
cd /data/local/tmp
./rageagainstthecage-arm5.bin
Wait a bit for it to say "Forked #### childs." Then hit enter. Should have a $ prompt.
Try running "ps" - should say Cannot fork.
Exit terminal emulator with back button, launch an app (I launched Twidroid, probably doesn't matter which app you pick)
Launch Terminal Emulator again - it will force close, hit Force Close
Launch Terminal Emulator a second time and you have a root shell
Additional info from gariak, from here:
Currently working on further instructions to make this a permanent root... will edit those in once ready. Others are doing a bunch of work on it, too... keep an eye on the root thinktank thread for further developments - the fun starts at this post!
Note that for now, this is a TEMPORARY root. And things are starting to get a bit over my head... I just got lucky with figuring out the first few steps. For now, I'm going to leave it to the fantastic folks over in the thinktank thread to figure out how to make this permanent. I'm working to figure out what I can, but I fear my own usefulness is fading
Click to expand...
Click to collapse
This is awesome! Will certainty be following this rather then all of the ghey fags in general complaining like a bunch of women.
Now we just need a root SPL or something to flash in the root shell right?
You can follow the happenings in the thinktank thread. Best to just follow or test what is suggested if you feel comfortable.
On a side note the other build posted makes for a good un-root so I would keep it named PC10IMG.ZIP on the root of your sdcard, should anything bad happen to your phone you should be able to flash that from bootloader
Sent from my T-Mobile myTouch 3G Slide using XDA App
What's the username and pwd to get the file?
The other build has radio 12.21.something. My g2 came with 12.22.something. So you would have to downgrade your radio. Should work though.
Everything else looked to be the same though.
edit: Nevermind, after reviewing the numbers I read them wrong. Everything does look to be the same. Apologies, with my first drill weekend with the army reserves and still moving into a new house I guess my head wasn't completely in the game.

[Q] default shell? "#!/system/bin/sh" line not interpreted correctly

Does anyone know what the #! first line of a shell script is interpreted by?
I've been playing around with gingerbread, and it does not seem to be interpreting the "#!/system/bin/sh" line correctly. All the google searching I could manage just told me that it's a linux kernel thing, but it works in every build before gingerbread.
The problem is that e.g.
Code:
/system/bin/sh /system/bin/odex.sh
does work, but
Code:
/system/bin/odex.sh
does not work, even though the first line is #!/system/bin/sh
I'm not sure if this would be an Android specific problem or a general linux problem, but I thought I'd put it up here in case any of you clever people have seen this before or know what's going on
Also, my default shell in my passwd file is sh, but I don't know if this is changed somewhere else on boot.
EDIT: the reason for this being a problem is that there is some shell script with an if statement in it that is running continuously in the background, so I get loads of errors on the "Fn +left" screen, and I'm pretty sure its not helping my speed or battery life!

[GUIDE] Setting Up and Activating SWAP Partition Without Breaking USB Mass Storage

Okay, many of you complain about USB MASS STORAGE not working with swap enabled. So heres a guide, using CWM (latest version) to set it up with working USB.
NEEDED:
MicroSD (i use class 4 sandisk 8gb)
Root+Busybox
CWM Recovery* (see post 2 for reasons of the *)
Terminal Emulator/ADB
Download this file http://dl.dropbox.com/u/1169731/swap_enabler.sh and place it IN THE ROOT OF YOUR SD!!!
Precautionary:BACKUP EVERYTHING ON MICRO SD CARD.
Steps:
Making the partition
Make sure you have everything backed up, as this WILL wipe your SD.
Boot into clockworkmod recovery.
Go to Advanced->Partition SD Card->EXT and Swap. I chose 128mb for EXT and 256 for SWAP.
Activating Through ADB
Make sure you downloaded that file earlier.
Type this into the CMD:
Code:
adb shell
chmod 755 /mnt/sdcard/swap_enabler.sh
sh /mnt/sdcard/swap_enabler.sh
And reboot
When your phone has rebooted, go back into ADB, and type:
Code:
adb shell
free
and if you didnt not get 0's next to SWAP, it worked.
Activating through Terminal Emulator
Load up Terminal Emulator
Type in this:
Code:
su
chmod 755 /mnt/sdcard/swap_enabler.sh
sh /mnt/sdcard/swap_enabler.sh
reboot. when your phones has booted back up, load terminal emulator once more, and type:
Code:
su
free
and if there isnt a bunch of 0's next to SWAP, it worked
And thats that!
Enjoy
TO DISABLE THROUGH ADB:
adb shell (skip if you're already in adb shell)
sh /mnt/sdcard/swap_enabler.sh disable
Click to expand...
Click to collapse
TO DISABLE THROUGH TERMINAL EMUALTOR
su
sh /mnt/sdcard/swap_enabler.sh disable
Click to expand...
Click to collapse
NEW QUICK EASY WAY (HIT AND MISS)
1) download script manager from the market
2) run swap_enabler.sh with script manager
3) reboot
SPECIAL THANKS TO: Nv for the script, and cimer for the original guide.
also, thanks to cjward for reminding me to put in the thanks ;D
* this guide is for CWM recovery, as the steps for 4EXT may be different. Also, when i tried to do it with 4EXT, it never activated the swap partition correctly.
Man, I've been trying to get this right. Think I messed up because I did not restart after running the script, so when I did the free command I got them zeros.
enserio said:
Man, I've been trying to get this right. Think I messed up because I did not restart after running the script, so when I did the free command I got them zeros.
Click to expand...
Click to collapse
what SD card you have? also, i have noticed it does not work on some roms, but most it does.
I used this method to set swap up to use with virtuous 3.5 and work great for me on my first try. It definately helps out.
Sent from my HTC Vision using xda premium
xT4Z1N4TRx said:
what SD card you have? also, i have noticed it does not work on some roms, but most it does.
Click to expand...
Click to collapse
The 8GB one that came standard with the G2 in the US, Dec 2010. If you need me to take it out and confirm what kind, I will, because this something I want to learn how to do. Also, I tried it with the ILWT Rom. I was trying to get to to work because I wanted to flash that Virtuous 3.5
PS - Anyone have a better method for backing up the SD card besides creating a folder on the desktop and dragging everything in there?
when i type su in terminal emulator I get
"[1] + Stopped (signal)"
I'm now getting a +2 error.
This is mildly frustrating because it seems so easy. I've learned several other processes to do to my phone, and THIS is the one that I get hung up on?
Latest debacle:
I wipe using G2+Superwipe. Make partitions of 128 and 256. Sdcard goes completely blank, so I have to mount it in recovery, and load up a nandroid. I figure, its still all good, go through with it. So I run the commands in Terminal Emulator and get the +2 error. damn damn damn
enserio said:
I'm now getting a +2 error.
This is mildly frustrating because it seems so easy. I've learned several other processes to do to my phone, and THIS is the one that I get hung up on?
Latest debacle:
I wipe using G2+Superwipe. Make partitions of 128 and 256. Sdcard goes completely blank, so I have to mount it in recovery, and load up a nandroid. I figure, its still all good, go through with it. So I run the commands in Terminal Emulator and get the +2 error. damn damn damn
Click to expand...
Click to collapse
Have you tried with ADB?
Sent from my Desire Z running @ 2GHZ
now on terminal emu i get: arith: syntax error: "65 on +2"
I'd try adb but i dont know much about adb
Hi everybody
I was asking myself, before doing it, do I really need it ?
I mean, I'm on Cyanogen Nightly and I've seen it's needed on virtuous (awesome) roms. But on CM, will it change something to activate swap ?
Thanks in advance
xT4Z1N4TRx said:
Have you tried with ADB?
Sent from my Desire Z running @ 2GHZ
Click to expand...
Click to collapse
well, new SDK is giving me problems setting up on my mac. Now you have to use SDK manager, which says to run 'android' file, and when I do it gives me an error just as its about to finish setting up.
Ugh, I want this to happen.
EDIT: got ADB fixed. gonna gee it a go this way.
KeitaroSenpai said:
Hi everybody
I was asking myself, before doing it, do I really need it ?
I mean, I'm on Cyanogen Nightly and I've seen it's needed on virtuous (awesome) roms. But on CM, will it change something to activate swap ?
Thanks in advance
Click to expand...
Click to collapse
This I would also like to know! Thx!
While I can't be 100%, I would say that it wouldn't help you much at all, on any CM based ROMs. Just the ones that are RAM intensive (i.e., sense roms). I know that I only want it to run the Virtuous 3.5 ROM.
Can anyone tell me is there a difference between doing it this way, or just using the app "swapper for root" from the app market..?
Thanks
Thought I would pop in. Doing it via terminal does not normally work you need to do it via ADB. If you're unfamiliar with ADB please go to here: http://theunlockr.com/2009/10/06/how-to-set-up-adb-usb-drivers-for-android-devices/ and learn about it. It can be such a useful tool. You do not need swap for CM7,MIUI, or Sense 2.1. It can be needed for Sense 3.0 or Sense 3.5 because Sense is such a memory hog at those version levels.
fredcorp6 said:
Can anyone tell me is there a difference between doing it this way, or just using the app "swapper for root" from the app market..?
Thanks
Click to expand...
Click to collapse
Yes, using this way restricts it to one partition, whereas using swapper allows it to use the FAT partition. This means, with this only your swap part will get corrupted over time, whereas with swapper your FAT will, losing your data.
Sent from my Desire Z running @ 2GHZ
Ah ok I see.. cheers
Anyone able to overcome the +2 error? Using Umaro kernal on EliteMod CM7.
Code:
# sh /mnt/sdcard/swap_enabler.sh
sh /mnt/sdcard/swap_enabler.sh
* Some tests.
/mnt/sdcard/swap_enabler.sh: arith: syntax error: "65 on +2"
EDIT:
Probably something not being compatible either busybox or CM7 but I got it to work by doing the following after looking at the code in the swap_enabler.sh file.
Since it was "65 on + 2" I figured that the cut commands weren't being executed properly somewhere and that it should have been 65 + 2 = 67..... =)
in shell i typed swapon /dev/block/vold/179:67
and it worked. Of course I had to manually make an entry in init.d and test it =)....
Maybe this can help OP edit the code.
Nshih422 said:
Anyone able to overcome the +2 error? Using Umaro kernal on EliteMod CM7.
Code:
# sh /mnt/sdcard/swap_enabler.sh
sh /mnt/sdcard/swap_enabler.sh
* Some tests.
/mnt/sdcard/swap_enabler.sh: arith: syntax error: "65 on +2"
EDIT:
Probably something not being compatible either busybox or CM7 but I got it to work by doing the following after looking at the code in the swap_enabler.sh file.
Since it was "65 on + 2" I figured that the cut commands weren't being executed properly somewhere and that it should have been 65 + 2 = 67..... =)
in shell i typed swapon /dev/block/vold/179:67
and it worked. Of course I had to manually make an entry in init.d and test it =)....
Maybe this can help OP edit the code.
Click to expand...
Click to collapse
Why do you want to use swap on cm7. There are zero benefits. But there are disadvantages, it could affect battery life, performance and wear your sdcard out faster
Sent from my HTC Vision using Tapatalk

[ROOT] All 360 Mods

Yesterday, @dproldan and I were editing my build.prop file for the 360. I figure that this might be a good thread to talk about what you have done with your build.prop and what it does.
ro.ambient.enable_when_plugged=false
and not sure if this is also needed,
ro.ambient.force_when_docked=false
This will turn your screen off when the device is docked.
@dproldan also suggests TRYING the CPU throttling property.
hw.cpu.throttle.state=1
If it doesn't work, just change it back to default.
ALWAYS remember to make a copy of the build.prop before you alter it.
XDA:DevDB Information
[ROOT] All 360 Mods, Device Specific App for the Moto 360
Contributors
abuttino, abuttino
Version Information
Status: Testing
Created 2014-10-17
Last Updated 2014-10-16
Yes! no more worries about the display getting the image persistence issue or the wife complaining about the room being illuminated by the watch.
About the throttle property. It is used in the /init.minnow.rc file, at the end you'll see that when it's not set (0), the max frequency is 1GHz, when it's set (1), the max frequency is 600MHz. It does so by writing a value to /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
The valid frequencies, set in the kernel, are 300MHz, 600MHz, 800MHz and 1 GHz. so you can write directly to that and get a direct result:
Code:
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
This doesn't mean that It will use less battery, but it's something to try.
Awesome! Any chance of turning off automatic HRM? I'm really curious how much battery increases since it turns on every 5 min.
HRM?
abuttino said:
HRM?
Click to expand...
Click to collapse
Heart Rate Monitor
I found the name of the apk that needs to be modified for the HRM but I'm not at home to message dproldan
Any way to change the ambient mode to be always on and/or adjust the brightness?
PsychDrummer said:
Awesome! Any chance of turning off automatic HRM? I'm really curious how much battery increases since it turns on every 5 min.
Click to expand...
Click to collapse
We need to edit a Motorola package, but that will take some time.
For the moment, you could disable the constant monitoring with:
Code:
pm disable com.motorola.targetnotif
This will remove the automatic heart monitoring, but also the default watchfaces and the connection to the motorola app in the phone. The rest of the functions are not modified. You can still access the HRM with the google Fit app.
dproldan said:
We need to edit a Motorola package, but that will take some time.
For the moment, you could disable the constant monitoring with:
Code:
pm disable com.motorola.targetnotif
This will remove the automatic heart monitoring, but also the default watchfaces and the connection to the motorola app in the phone. The rest of the functions are not modified. You can still access the HRM with the google Fit app.
Click to expand...
Click to collapse
Thanks! Will running that command with "enable" instead of "disable" reverse it?
Tonight was a very productive night for the 360!
@dproldan and I were on a conversation on the freenode IRC chat #moto360 and he and I have tested some things out that seem to work extremely well.
The first and most requested thing was to disable the unattended heart rate monitor called "Heart Activity"
So, with your rooted watch in a root/su shell prompt type:
pm disable com.motorola.targetnotif/com.motorola.omni.HealthActivity
Now, until we figure out which EXACT activity is using the pedometer, he suggested we kill the fit app altogether by using this command:
pm disable com.google.android.apps.fitness
If you feel that you MUST disable the Heart Rate program that DOES NOT take your heart rate unattended, or use any battery unless you run it yourself:
pm disable com.motorola.targetnotif/com.motorola.omni.HeartRateActivity
I've seen this mentioned a few times and, figure I would at least put it out there for people to try if they need to.
If you need to root your watch, @dproldan is selling a cradle that he designed and, is a LOT more stable than a self built cat5e connector that can short at any time.
http://forum.xda-developers.com/moto-360/development/cradles-moto360-usb-conection-sale-t2901110
The 360 community needs more devs and people willing to test. If you have any requests, solutions please post in this thread. If you need help with rooting your watch; please don't be afraid to post in the Q&A section of the 360 forum.
PsychDrummer said:
Thanks! Will running that command with "enable" instead of "disable" reverse it?
Click to expand...
Click to collapse
Yes.
Just got Rooted and and been doing little mods here and there, some inverted apps and such. The thing I'm having an issue with is writing to system, the keep getting permission failed, is any one else successfully writing to system. I even edited the 360 superboot.Img to install busybox and still no success. If any one has a solution to this I can start adding some cool mods and possible features.
Did you rename it to boot.img?
I just Rooted using the utility, I have root, just if I try pushing something to system I get a permission denied error, samething with adb remount.
Get the boot image from the post here, rename it to boot.img and do this:
"fastboot boot boot.img"
Stick with the tried and true methods
ok ill try that right now. one question are you pushing to system with the adapter or over BT?
Fastboot is always over USB. ADB commands can be done over b/t
steal25 said:
ok ill try that right now. one question are you pushing to system with the adapter or over BT?
Click to expand...
Click to collapse
To push things to /system, you need to make the partition writable. With previous devices, you'de do that with "adb remount", but the moto360 over bluetooth doesn't allow that, AFAIK. We also don't have a root adb yet, so you need to put things in /storage/sdcard0 from the computer, then move them to the final folder from a root shell
What I've been doing is:
Code:
computer: adb -e shell
moto360: su
moto360: mount -o rw,remount /dev/block/mmcblk0p14 /system
moto360: exit
moto360: exit
computer: adb -e push whatever-you-want-to-push /storage/sdcard0/
computer: adb -e shell
moto360: cp /storage/sdcard0/whatever-you-want-to-push /where-you-want-to-place-it
I hope that makes sense. I have only moved simple things yet, but I hope we'll find better ways soon.
You can push the build.prop over Bluetooth and should be able to remount system too. I've done it every time I've edited my build.prop
dproldan said:
To push things to /system, you need to make the partition writable. With previous devices, you'de do that with "adb remount", but the moto360 over bluetooth doesn't allow that, AFAIK. We also don't have a root adb yet, so you need to put things in /storage/sdcard0 from the computer, then move them to the final folder from a root shell
What I've been doing is:
Code:
computer: adb -e shell
moto360: su
moto360: mount -o rw,remount /dev/block/mmcblk0p14 /system
moto360: exit
moto360: exit
computer: adb -e push whatever-you-want-to-push /storage/sdcard0/
computer: adb -e shell
moto360: cp /storage/sdcard0/whatever-you-want-to-push /where-you-want-to-place-it
I hope that makes sense. I have only moved simple things yet, but I hope we'll find better ways soon.
Click to expand...
Click to collapse
Yep makes sense, been driving me nuts, I even edited the Rooted boot . Img to install busybox and it works but when I ran busybox mount..... It returned couldn't find etc/Fstab. I'll do a little more digging when i get home

Categories

Resources