GT-I5500 tools & modifications - Android Software/Hacking General [Developers Only]

This is intended to be a list of useful tweaks and many other useful pieces of information.
Kernel modules:
tun.ko for android 2.1
Useful for: getting OpenVPN to work
mediafire.com/?59c1c15pfyt61d7
Tweaks:
Uninstall Swype
Useful for: freeing more RAM memory, removing it if you're not using it
How to do it:
1) root using androot
2) install android terminal emulator
3) in android terminal emulator run:
rm /system/app/Swype.apk
4) in manage applications, remove the 50-200KB app which has "input" in its name
Note: This removes Swype for good from your ROM
Development:
I'm looking for help on getting a kernel built for this device. I need to get a diff between the kernel from the released "GT-I5500 OpenSource" from Samsung and a clean unpatched samsung kernel. Any help would be appreciated.
I'd also like to port CM to GT-I5500.
update: I built a patched kernel with all the patches one applies against the sources to improve performance and stability. Flashing it failed.

i can't thank you enough... i'll try this one thanx

Edited: Oh, it's you flying_dutchman, i thought that someone else want to port cm

good man!
ive tried building the kernel from samsung but just wouldnt play nice for some reason, gonna have another stab at it tonight if i can
think i may have thought up a way to flash this in theory too...
from what i saw when i flashed froyo using odin, when your flashing "one package" files there doesnt appear to be any checks or anything. so replacing the files already in a tar could work...?

Sc0pEz said:
good man!
ive tried building the kernel from samsung but just wouldnt play nice for some reason, gonna have another stab at it tonight if i can
think i may have thought up a way to flash this in theory too...
from what i saw when i flashed froyo using odin, when your flashing "one package" files there doesnt appear to be any checks or anything. so replacing the files already in a tar could work...?
Click to expand...
Click to collapse
Not really. It still checks the signatures.
Don't flash anything you build just yet. There are quite a few unsolved issues regarding the flashing process. Once I have the full process, we can flash.

yea found that out already, tried it last night and failed, just thought about it since when loading up the package it didnt check like it does with individual firmware files
has anyone had any luck with the recovery image? make life hellish easier if we can get a custom recovery on there

Waiting for your CM Port
A little info... for unnistalling Swype.. we can use titanium backup...

Waiting the port...

Hello!
I am very glad to hear about the port.
Here's a simple tweak for the I5500. It's easy to do with adb shell but requires a rooted device. The tweak is for skipping the boot/shutdown animation, and it provides quite a speedup.
Code:
su
mount -o remount,rw /dev/mtdblock3 /system
cd system/media
mv bootani.qmg _bootani.qmg
cd video/shutdown
mv shutdown_1.png _shutdown_1.png
mv shutdown_2.png _shutdown_2.png
mv shutdown_3.png _shutdown_3.png
mv shutdown_4.png _shutdown_4.png
mv shutdown_5.png _shutdown_5.png
mv shutdown_6.png _shutdown_6.png
mv shutdown_7.png _shutdown_7.png
mv shutdown_8.png _shutdown_8.png
mv shutdown_9.png _shutdown_9.png
mv shutdown_10.png _shutdown_10.png
mv shutdown_11.png _shutdown_11.png
mv shutdown_12.png _shutdown_12.png
mv shutdown_13.png _shutdown_13.png
mv shutdown_14.png _shutdown_14.png
mv shutdown_15.png _shutdown_15.png
mv shutdown_16.png _shutdown_16.png
mv shutdown_17.png _shutdown_17.png
mv shutdown_18.png _shutdown_18.png
mv shutdown_19.png _shutdown_19.png
mv shutdown_20.png _shutdown_20.png
mv shutdown_21.png _shutdown_21.png
mv shutdown_22.png _shutdown_22.png
mv shutdown_23.png _shutdown_23.png
mv shutdown_24.png _shutdown_24.png
mv shutdown_25.png _shutdown_25.png
mv shutdown_26.png _shutdown_26.png
mv shutdown_27.png _shutdown_27.png
mv shutdown_28.png _shutdown_28.png
mv shutdown_29.png _shutdown_29.png
mv shutdown_30.png _shutdown_30.png
mv shutdown_31.png _shutdown_31.png
mv shutdown_32.png _shutdown_32.png
mv shutdown_33.png _shutdown_33.png
mv shutdown_34.png _shutdown_34.png
mv shutdown_35.png _shutdown_35.png
mv shutdown_36.png _shutdown_36.png
mv shutdown_37.png _shutdown_37.png
mv shutdown_38.png _shutdown_38.png
mv shutdown_39.png _shutdown_39.png
mv shutdown_40.png _shutdown_40.png
cd /system/etc
mv poweron.snd _poweron.snd
Edit: I also have a tweak for calibrating the accelerometer, but I'm quite lazy right now. I'll return in case anyone requests that.

Version 2.2 is out for I5500L.
I'm a beginner Java coder, and have that phone.
If i can do anything to help you, just let me know.

Any news?
Sent from my GT-I5500L using XDA App

I assume this phone doesn't have custom recovery. I am willing to port it, just need you all to follow the steps on http://www.androidtablets.net/forum.../3607-porting-clockwork-recovery-tablets.html and reply here or there.
btw, I know its not a tablet but its the same steps and I made the guide, don't feel like pasting it here and there
Also, froyo won't boot on a 2.6.29 kernel without some patches and even then cm won't boot without some extra changes in kernel...

there is no /proc/mtd directory on SG5

i think on the galaxy 5 it is /proc/stl
i may be wrong though and cant check right now as dont have my phone to hand

News?
Sent from my GT-I5500L using XDA App

Any news yet ?

I have sucefully compiled a cyanogen port for the i5500
Now i have to wait for my device to come back from the repair since i managed to erase the bios by using my recovery
I decided to avoid playing with the recovery and flashing cyanogen directly via ODIN
If any one wants to try out my compilation send me an email : motafoca at alquest.com.br

motafoca said:
I have sucefully compiled a cyanogen port for the i5500
Now i have to wait for my device to come back from the repair since i managed to erase the bios by using my recovery
I decided to avoid playing with the recovery and flashing cyanogen directly via ODIN
If any one wants to try out my compilation send me an email : motafoca at alquest.com.br
Click to expand...
Click to collapse
Before you erased your bios, did everything worked, like wifi, camera...?

I didnt manage to test it
But there some people testing it as we speak

Boogie manzor or anyone, can you share the kernel+the patches you built?
I have a way to test it
Thanks

Related

[HACK] (!update 04/26/2010) JIT enabled Dalvik VM on Android 1.6 (Dusted Donuts)

Update (fix for /cache/dalvik-cache 04-26-2010): Really only use this if your having issues using the symbolic link fixes posted by other members or are just out of free space on /cache. First the new issues people are experiencing is in cm-based-kernels from 4.2.15.x and not JIT enabled DalvikVM and people using danger/death spl will experience problems faster. Lack of space on /cache is a problem and will cause market downloads to fail as well as email attachments. The other problem is the kernel fails for various and unknown reasons to mount bind /cache/dalvik-cache to /data/dalvik-cache.
The other issue is the use to dalvik-cache clearing scripts and options in RA recovery, stop clearing your dalvik-cache, the .dex files are created when missing and you do not get any benefits by doing so and cause more wearing leveling of NAND, plus the script in RA recovery doesn't appear to look at /cache/dalvik-cache for dex files. This little update script (when installed correctly).
Understand that /cache/dalvik-cache is a newer option as a means to free up space on /data is by using /cache/dalvik-cache as a first storage of dex files then using the standard /data/dalvik-cache for over flow of dex files and newer installed apps. Somewhere along the way something may throw this and you get douplicate dex files in both locations, one way to check is to boot into recovery and
Code:
mount -a
and check dalvik-cache directories in both /cache and /data for douplicate dex files.
The script will fix these issues, or should at least:
Endless loop FCs on boot
broken /cache/dalvik-cache mount
no binded mount
missing user apps
missing system apps
failed market downloads
non-working symlink patches and installers (no need to run these, they will break this patch)
fixes duplicate dex files in both /cache/dalvik-cache and <target>/dalvik-cache (because it deletes /cache/dalvik-cache)
Will not Fix:
your ignorance
your unwillingness to read
your unwillingness to learn
your compulsive ROM flashing disorder
your compulsive dalvik-cache clearing syndrome
version 1.1.1(updated 4/27/2010 @ 10:10 PM) is current and was slapped together from Phonekenstein, it doesn't look for the existance of /cache/dalvik-cache it assumes it's there and deletes it wether it's a directory, a symlink or a file, re-creates a new empty /cache/dalvik-cache with Android default permissions and mount binds it to /data/dalvik-cache (be it a directory, a symlink or another binded mount) /cache/dalvik-cache will follow the target /data/dalvik-cache (no worries for apps2sd users or non-apps2sd users).
Script will turn on the blue LED when booting so you know it executed (if it annoys you then edit the script and make it pink)
Tested on Cyanogen MOD 4.2.15.1 and SuperD 1.10.3:
with and without apps2sd
with and without a /dev/block/mmcblk0p2 (apps2sd script nulled)
with and without a custom /dev/block/mmcblk0p4
with mount binded /ext/dalvik-cache (mmcblk0p4) to /data/dalvik-cache
with /data/dalvik-cache as a symbolic link to /ext/dalvik-cache (mmcblk0p4)
All scenarios experienced no failures as long as you set your permissions correctly on all targets and files and /cache/dalvik-cache followed and binded flawlessly.
install is simple and can be done through terminal:
1. download 86dalvik-cache-fix <--Long press and chose "save link as" (also attached to this post)
2. open terminal and issue these commands:
NOTE: COMMANDS ARE CASE sensitive in LINUX and as such ANDROID!!!!!!
ALL OFF THESE COMMANDS ARE IN lower case. SO Turn off your Auto-Caps options in your keyboard options. These command assume you downloaded the script using your the web browser on your G1/Magic whatever phone and the file is located in /sdcard/download (the default location for web browser downloads).
Code:
su
mount -o rw,remount /system
cp /sdcard/download/86dalvik-cache-fix.txt /system/etc/init.d/86dalvik-cache-fix
chown 0:2000 /system/etc/init.d/86dalvik-cache-fix
chmod 755 /system/etc/init.d/86dalvik-cache-fix
sync
reboot
Why 86dalvik-cache-fix? We want the script to execute after all scripts in /system/etc/init.d/ including /system/sd/userinit.sh (if you are using one) and before script 99. 86 because in 1987 everything got 86'd.
If you are having a problem getting the script to execute, copy it or merge it into /system/sd/userinit.sh (even if you aren't using a mmcblk0p2(ext partition)) it may make it work with FastTest builds, however the permissions on his builds appear to be root everything and I have problems getting the script to execute out of /system/etc/init.d even with root permissions.
--------------------------------------------------------------------------------------------------------------
Primer: Read this about Dalvik VM http://en.wikipedia.org/wiki/Dalvik_virtual_machine
Read this to: Google Groups post about JIT compiler for Dalvik VM from Android-Platform Link
From the post we see that this particular compiled library is ALPHA, so results can vary, but from reading most posts in this thread the results are right near the talked about 3x faster code, stability is going to vary on what apps and or widgets are running. More Widgets = slower performance as these have processes that are eating cycles. When testing with Linpack wait for the advertisement to load first then tap the benchmark button and remove your finger from the touch screen. Background process such that interrupt or having auto-rotate enabled while testing is going to give you slower benchmarks.
In short your apps should load faster and run faster, particularly 3D games. The web browser is faster and you can actually scroll through pages even while graphics are still loading.
The reboot when enabling it is long even appearing to hang at the G1 Screen for 5 minutes or more but once it starts booting past this you will know that your ROM is compatible. The cause is that the dex files are being optimized, after about a third reboot, your ROM should feel pretty snappy and launching apps should be quicker as well as switching apps. The snappiness lasts as well and as some may have said that it's a placebo effect are wrong. Bench mark readings prove it and more importantly a few ROM builders have included this in their 2.1 ROMs as experimental.
The libdvm.so that t3steve cross compiled for the DROID at the time was for Android 2.0, the library works for with newer ROMs Android 1.6 that have some eclair pieces built into the kernel, CyanogenMOD has been using bits and pieces for a while now, if other ROM builders have been using his kernel and framework than a good chance it will work for your phone as well.
I have nothing to do with the compiling of this or the exact functions of enabling JIT except that I had a hunch that the combo might work and it did, so I'm sharing it.
If you aren't good at typing in commands, or don't know how to extract a zip file and understand that a sub folder may or may not exist where you have extracted said zip file to, well.... you may run into some issues, maybe a video tutorial for basic command line on youtube would be a good place to learn.
I wanted to make a very detailed post on www.andoidonroids.com about how to mash the JIT enabled Dalvik VM library into Android 1.6 Donuts I'm calling the hack "Dusted Donuts" and take from the name for what you will. I have been using the JIT enabled Dalvik VM for about two weeks and i runs decent but not perfect. Anyhow a death in the family Sunday has kept me from making a decent post and haven't had the time to get to the website and post and cross post and give credit where due.
No doubt that aaraya1516 broke the news on http://forum.xda-developers.com/showpost.php?p=5703076&postcount=193 as he was first to break the hack on FastTest, not taking anything away from him on that.
My testing goes back two weeks or more even during the 580mhz & 780mhz hack, I was waiting for someone to compile a boot.img with some 2.x stuff and sure enough the carlospants boot.img from ctso worked with enabling JIT for Dalvik VM, but as we know now the overclocking doesn't work at the moment.
Thank Cyanogen and t3hSteve of which may not know that this was entirely possible. Cyanogen mixed in enough Eclair into his Donuts (he's like Willy Wonka) that makes it possible to use the cross compiled JIT enabled Dalvik VM library from 2.1 for the Motorola DROID 2.0.1 libdvm.so that t3hSteve of www.alldroid.com compiled for the custom roms on Droid.
WARNING: Using other methods supplied from other forum members that include replacing the build.prop may cause problems, using the build.prop from the original VMLIBS.ZIP (which is here for reference and original source for libdvm.so) is definitely going to cause ROM and application problems. Hello....use your head here... the VMLIBS.ZIP is for Motorola DROIDS, why would you put the build.prop file for a DROID on your G1 and expect your apps or ROM to work afterwards? It's so simple, you need 1 file, it's called libdvm.so it goes in /system/lib a file by the same name already exists there and it's in your best interest to at least back it up before overwriting it and gives you the ability in the event that your system doesn't boot up you can restore it through recovery console and get your phone to boot past the G1 screen.
FYI: Some ROMs have the option dalvik.vm.execution-mode=int:fast in the /system/build.prop file, this would need to be changed to dalvik.vm.execution-mode=int:jit or commented out or deleted. If you want to play with advanced options create /data/local.prop and fiddle in there with options available from typing dalvikvm -h in your console or terminal app.
Required:
1. Android 1.6 ROMS with a bit Eclair stuff in the Kernel and framework such as Cyanogen ROM 4.2.x, Super D 1.8 - 1.92, WG Y2.6, FastTest, KingKlick Eclair and more.. This libdvm.so works on Android 2.1 as well as it seems it should.. 1 st bootup is slow and I recommend you let it sit even when desktops are up for a couple of minutes and then reboot it, 2nd and 3rd bootups are faster and smoother response overall even for long durations, days.
FIX YOUR FILE SYSTEM FIRST !!!!!! Got to do it from Recovery Console, It's partly the cause of poorly running ROMS and takes seriously longer to type the command than to fix your unknowingly faulty file system. EXT2 is the worst offender and the built in function to repair falls short, even more so when checking EXT4.
Code:
#e2fsck -fcpDC0 /dev/block/mmcblk0p2
#reboot recovery
For the lazy fingers
#e2fsck -fcpDC0 /*/*/*0p2
#reboot recovery
1. Download www.androidonroids.com/dusted-donuts (File has 3 scripts backup, install, restore, 2 folders, 1 libdvm.so)
2. Extract zip to root of /sdcard or where ever you like (the zip has a folder containing the files named dusted-donuts)
3. Open Terminal or go to Recovery Console
FYI when running the install through Terminal your system may freeze or reboot and if it does I highly recommend that you prepare to enter Recovery Mode and check your file system. EXT2 corrupts quickly choosing this for apps2sd to use is not the best option especially if you are using custom ROMs that may lockup or reboot, basically that's a crash.
Code:
$su
#mount -o rw,remount auto /sdcard
#cd /sdcard/dusted-donuts
#sh backup
#sh install
#sync
#reboot
Check the Dalvik VM execution mode. look at the bottom line with_jit means the it is installed , and look at all of those options that can be jammed into your build.prop and local.prop files
Code:
$su
#dalvikvm -h
Phone won't boot past G1 screen? Go to recovery console and restore libdvm.so (give it at least 5 minutes first before giving up)
Code:
#mount -o rw,remount auto /sdcard
#cd /sdcard/dusted-donuts
#sh restore
#sync
#reboot
---------------------------------------------------------------------------------------------------------------------
prefer to use VMLIBS.ZIP from t3hSteve? This is how you can install using that.
Required:
1. Android 1.6 ROMS with a bit Eclair stuff in the Kernel and framework such as Cyanogen ROM 4.2.x, Super D 1.8 - 19.2, WG Y2.6, FastTest, KingKlick Eclair and more.. This libdvm.so works on Android 2.1 as well as it seems it should..
How to install: (easier to go in recovery mode but can be done through terminal)
1. Download the VMLIBS.ZIP from t3hSteve of allroid.com http://alldroid.org/download/file.php?id=1374
2. You only need the libdvm.so file of which appears to be JIT enabled by default.
3. Backup the original libdvm.so #cp /system/lib/libdvm.so /sdcard/libdvm.so
4. Copy the JIT enabled libdvm.so #cp -f /sdcard/vmlibs/libdvm.so /system/lib/libdvm.so
5. Set permissions on the file #chmod 644 /system/lib/libdvm.so
Optional for disabling: (easier to do vi through recovery console, since the back key escapes out of terminal)
To disable JIT MODE but want to keep the libdvm.so create a local.prop in /data and add dalvik.vm.execution-mode=int:fast
#vi /data/local.prop
press the i key to enter vi interactive mode
type dalvik.vm.execution-mode=int:fast
press back key to exit vi interactive mode
to write the file out and quit vi type :wq
or
restore your backed libdvm.so file from the sdcard.
-----------------------------------------------------------------------------------------------------------------------
Enjoi! the dusted donuts,
-Licknuts (me? I'm like Varuca Salt, I want another pony)
Vendor G1 roms around 1.2 Mflops, Custom G1 roms are around 2.4 MFlops/s and with JIT compiled Dalvik VM 3.6 MFlops/s. At most you will see 3.5 MFlops/s fairly consistently with a minimal load on your system and highs at 3.7 Mflops/s. Test before and after using Linpack from the Market, it's free.
The 13.236 Mflops/s is not normal and you will probably not see with your testing, I have seen 5.x & 7.x but these are far and few between and this took a while with tweaked configurations/settings with a persistent app to kill processes, it is attainable and I hope a ROM developer finds the sweet spot to exploit.
Looks nice.
Pre-JIT enabled: 2.194 Mflops/s
Post-enabled: 3.459 Mflops/s
Not quite getting the results you have there.
Running SuperD 1.9.2 Black W/ Nexus Theme. I copied it twice to make sure that the libdvm.so was copied correctly to the directory. Rebooted the phone, same results. Looks very promising though. If I did something wrong, lemme know.
Managed to get #10 on G1 Benchmarks with 3.583 Mflops/s... still nowhere near 13.~ Mflops/s
same here. Running Super D 1.9 on my magic
before JIT I got 1.xxxx Mflops/s
after i have 2.xxxx Mflops/s
how do you get the 13 Mflops/s ?
-edit-
with swap disabled i'm getting 3.5 Mflops/s
h.nocturna said:
Looks nice.
Pre-JIT enabled: 2.194 Mflops/s
Post-enabled: 3.459 Mflops/s
Not quite getting the results you have there.
Running SuperD 1.9.2 Black W/ Nexus Theme. I copied it twice to make sure that the libdvm.so was copied correctly to the directory. Rebooted the phone, same results. Looks very promising though. If I did something wrong, lemme know.
Managed to get #10 on G1 Benchmarks with 3.583 Mflops/s... still nowhere near 13.~ Mflops/s
Click to expand...
Click to collapse
I got 9 seconds on the pi benchmark
What will this do??
samsara00 said:
same here. Running Super D 1.9 on my magic
before JIT I got 1.xxxx Mflops/s
after i have 2.xxxx Mflops/s
how do you get the 13 Mflops/s ?
-edit-
with swap disabled i'm getting 3.5 Mflops/s
Click to expand...
Click to collapse
So I guess this only works with Swap off?
sabin123 said:
What will this do??
Click to expand...
Click to collapse
Speed your *hit up!
it works with and without swap.
Just the benchmark result is better when swap is turned off.
Got nearly the same as samsara00:
Rom: SuperD 1.9.2
Before (swap off): ~ 2.3 MFlops/s
After JIT enabling (swap off): ~ 3.5 MFlops/s
But the increase to 13.x seems so unreal, why is there only one result that high in the toplist of greene.com!?
Now to find out if this actually speeds up everyday use lol
CM4.2.14.1
Before: 2.3
After: 3.5
Wow! This made my 3G connection faster too. Was only getting 1500kbps before, now getting on average 3200kbps. Awesome. I'm located in Toronto, on Rogers.
Question: Is this Google's JIT? Will Myraids Dalvik Turbo be faster?
Doesn't boot past the G1 screen when using Dwangs 1.17.1 Assume thats because it has no Eclair in it, but it was worth the dream .
Waw!! great works!!
left is before - right one is after
on CM 4.2.14.1, enabled Swap 64MB, CC ON, RAM Hacked
So do we copy the zip to the root of our sd card? Do I extract it first and just copy the one file? The instructions are kind of vague.
G1ForFun said:
So do we copy the zip to the root of our sd card? Do I extract it first and just copy the one file? The instructions are kind of vague.
Click to expand...
Click to collapse
Not to be rude, but if you don't understand those directions, this isn't the sort of thing you should try to do yourself. Wait for a ROM builder to add this in. The directions are perfectly clear, you just need to understand command line use.
If you want to learn something about CLI use, install Linux on your computer and learn to use it without the GUI. If you don't want to do that, google for "cygwin" and use the bash shell they provide for Windows based machines.
Personally, I used adb and just pushed the darn file lol works perfectly fine, like everything else I've ever pushed. Just don't forget to set the permissions for the file.
tried in a terminal and with adb getting read-only file system when trying to copy over the libdvm.so file
SilentTweak said:
Personally, I used adb and just pushed the darn file lol works perfectly fine, like everything else I've ever pushed. Just don't forget to set the permissions for the file.
Click to expand...
Click to collapse
Nothing wrong with adb. Hell, I used SSH to do it. Just about anything will work, you just have to know what you're doing.
Damn.... I just rebooted and it took about half the time it used to.
Tried the Linpack benchmark, getting about 3.5 with SuperD 1.9.2 w/Compcache 16M swappiness=10. Fresh reboot, obviously. Lock your CPU to 528 (min and max) for more consistent results. When I have 128min 528max, it gives different results depending on the current CPU speed. SetCPU or Overclock Widget helps a lot here. No instability noticed yet, but this should probably be considered an unstable hack for now till we all get more experience with it. I know OpenEclair removed the JIT VM because of stability problems.
Sgt.EddieWinslow said:
tried in a terminal and with adb getting read-only file system when trying to copy over the libdvm.so file
Click to expand...
Click to collapse
Do "adb remount" first
ttabbal said:
Not to be rude, but if you don't understand those directions, this isn't the sort of thing you should try to do yourself. Wait for a ROM builder to add this in. The directions are perfectly clear, you just need to understand command line use.
If you want to learn something about CLI use, install Linux on your computer and learn to use it without the GUI. If you don't want to do that, google for "cygwin" and use the bash shell they provide for Windows based machines.
Click to expand...
Click to collapse
Obviously they are not clear to me. Why argue the point?
I have worked plenty with cmd type interfaces...so please...put down your know it all stick and be helpful.
edit: hope this helps somebody else...look better instructions posted in the fasttest thread!
download files here and copy them on the sdcard
created a folder /sdcard/jit and put the three files in it
make a folder /sdcard/dalbk and copy the original files
adb pull /system/build.prop .
Open in WordPad/Textpad and add as the last line: dalvik.vm.execution-mode=int:jit
SAVE IT, copy/push it on the /sdcard/jit folder
Sgt.EddieWinslow said:
tried in a terminal and with adb getting read-only file system when trying to copy over the libdvm.so file
Click to expand...
Click to collapse
Code:
C:\Android\tools>adb shell
# su
su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system/lib/libdvm.so
chmod 777 /system/lib/libdvm.so
# cp -f /sdcard/vmlibs/libdvm.so /system/lib/libdvm.so
cp -f /sdcard/vmlibs/libdvm.so /system/lib/libdvm.so
# chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libdvm.so
# reboot
Damn.... I just rebooted and it took about half the time it used to.
Click to expand...
Click to collapse
Indeed
Licknuts result : 3.1-3.5 (with Super-D 1.9.2)
My method of installing it:
adb remount
adb push libdvm.so /system/lib/libdvm.so
Then open console and type:
su
chmod 644 /system/lib/libdvm.so
reboot
I'm about to try this myself.. has anyone noticed an overall increase in speed? Benchmarks are great but it's all about how it actually performs!
I'll post my own findings in a bit.

[Guide]How I tweak, mod and hack my Defy

This thread is mostly to remind myself what needs to be done after a reflash. I reflash a lot. Tinkering, coding and hacking does *not* mate well with my ADHD (Attention Deficit ahh whatever), so I often find myself having to, pardon my french, unfuck my gear. Most of this thread will be links to the great work others have done, I'm just piling together the stuff I use. If you like your android experience to be nice and snappy, you might like these mods too. These steps work for me, your mileage may vary. If you screw something up, it's your own fault for taking advice from strangers over the Internet. But try asking for help here on XDA, somebody will most likely be able to help you.
So, either you've just unpacked your Defy or you have just had to flash an SBF after screwing something up.
Edit: 01/01/2011: Have added a few bits so the stuff below now applies to the 2.34.1 rom as well
0) Install LauncherPro
- Or ADW.Launcher, HELauncher or whatever you prefer. Press the Home button and set the new launcher as default.
1) Root the damn thing! Download Z4Root.apk here. You'll need to allow installation of non-market apps, as well as enabling USB debugging. Go to Settings -> Applications, tick the box for "Unknown sources" and go to Development to enable USB debugging. A file manager should be included in the stock rom, otherwise get one (I prefer ES File Explorer) from the Market. Once you have your file manager, dig up the z4root.apk you just downloaded, install it and run the app, press the appropriate button to root the phone and watch it reboot.
2) Get recovery!
The custom recovery for the Defy is described here. Mad props to Tenfar for his work, please buy him a beer, he's earned it. Here's the APK you'll need. Using the same process as for the Z4Root app, install and run the recovery system app. Press the "Install recovery system" button.
3) Get JIT'tery and deodexed
Superb work by Higgsy and Antibyte! They've not only gotten JIT (jfgi, mate) to run on the Defy, they've zipped it up nicely with the deodexed /system files from Paul at Modaco.com so you can all just install them as a zip file in one go. 2.21 Roms: Download the nicely packaged zip here, if you're running the 2.34.1 rom, get this version instead. Save the file to your SD card and remember where you put it.
4) Backup everything we've done so far
Start the System Recovery App and do a Recovery Boot. When booting into recovery, select Backup/restore and do a backup. I you have installed a bunch of apps, made a lot of changes to your settins, you might want to do a seperate backup of that (but not the rom), using Titanium backup from the Market.
5) Apply the coolness from step 3
After doing a backup, wipe all user settings as well as the Dalvik cache. Then select "Install zip from SD card" and install the zip you downloaded in step 3. Wipe alle settings and the cache again. Reboot when done. Note: The wiping may not be necessary, but not doing it could screw something up and have you back at re-flashing an SBF to your phone...
5.1) Re-root, using Z4Root.
Fire up the app and press "permanent root".
6) Weed out the bloat
This bit assumes that you have ADB or MotoDev studio installed and can connect to your Defy. If not? Search the forums. - Or read the US guide for trimming the Defy, tons of info right there, thanks a lot to Rob-T for elaborating many of the steps!
Assuming you have ADB fired up (or MotoDev Studio, which I prefer):
Gain root access:
Code:
su
Mount the /system partition with write access:
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
Switch to the /system/app dir:
Code:
cd /system/app
Now rename the apps you don't want: Thanks to NaeNee for proof-reading this hideous blob of commands!
Code:
mv AdService.apk AdService.rem; mv ArcPhotoworkshop.apk ArcPhotoworkshop.rem; mv ArcVideoEditorLite.apk ArcVideoEditorLite.rem; mv BlurEmail.apk Bluremail.rem; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem; mv BlurSNMessagingEngine.apk BlurSNMessagingEngine.rem; mv FBAndroid-1.3.2.apk FBAndroid-1.3.2.rem; mv Kindle-1.0.2-OEM-SingleSign.apk Kindle-1.0.2-OEM-SingleSign.rem; mv MySpace.apk MySpace.rem; mv StickyNoteWidget.apk StickyNoteWidget.rem; mv SocialMessaging.apk SocialMessaging.rem; mv Swype.apk Swype.rem; mv BlurUpdater.apk BlurUpdater.rem; mv CarDock.apk CarDock.rem; mv ContactsUnconnected.apk ContactsUnconnected.rem; mv amazonmp3_1.8.19_signed_zipaligned.apk amazonmp3_1.8.19_signed_zipaligned.rem; mv esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.apk esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.rem; mv Fota.apk Fota.rem; mv FriendFeed.apk FriendFeed.rem; mv HelpCenter.apk HelpCenter.rem; mv hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.apk hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.rem; mv truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.apk truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.rem; mv KPT.apk KPT.rem; mv HomeSyncWizard.apk HomeSyncWizard.rem; mv LiveWallpapers.apk LiveWallpapers.rem; mv LiveWallpapersPicker.apk LiveWallpapersPicker.rem; mv MagicSmokeWallpapers.apk MagicSmokeWallpapers.rem; mv MessagesWidget.apk MessagesWidget.rem; mv NewsWidget.apk NewsWidget.rem; mv Protips.apk Protips.rem; mv QuickContactWidget.apk QuickContactWidget.rem; mv Quickoffice_BasicViewer_2.0.42.apk Quickoffice_BasicViewer_2.0.42.rem; mv Quickoffice_BasicViewer_2.0.52.apk Quickoffice_BasicViewer_2.0.52.rem; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem; mv SocialMessaging.apk SocialMessaging.rem; mv StatusWidget.apk StatusWidget.rem; mv Stk.apk Stk.rem; mv ToggleWidgets.apk ToggleWidgets.rem; mv VisualizationWallpapers.apk VisualizationWallpapers.rem; mv UniversalInbox.apk UniversalInbox.rem; mv WeatherWidget.apk WeatherWidget.rem; mv WorkContacts.apk WorkContacts.rem
EDIT: NaeNee experienced a problem with the messaging app just closing (no FC or errors) after this... Update: This is caused by deleting or renaming BlurEmailEngine.apk, so it is no longer removed/renamed in the command above.
In case you want to undo the above rename:
Code:
mv AdService.rem AdService.apk; mv ArcPhotoworkshop.rem ArcPhotoworkshop.apk; mv ArcVideoEditorLite.rem ArcVideoEditorLite.apk; mv BlurEmail.rem Bluremail.apk; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk; mv BlurSNMessagingEngine.rem BlurSNMessagingEngine.apk; mv FBAndroid-1.3.2.rem FBAndroid-1.3.2.apk; mv Kindle-1.0.2-OEM-SingleSign.rem Kindle-1.0.2-OEM-SingleSign.apk; mv MySpace.rem MySpace.apk; mv StickyNoteWidget.rem StickyNoteWidget.apk; mv SocialMessaging.rem SocialMessaging.apk; mv Swype.rem Swype.apk; mv BlurUpdater.rem BlurUpdater.apk; mv CarDock.rem CarDock.apk; mv ContactsUnconnected.rem ContactsUnconnected.apk; mv amazonmp3_1.8.19_signed_zipaligned.rem amazonmp3_1.8.19_signed_zipaligned.apk; mv esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.rem esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.apk; mv Fota.rem Fota.apk; mv FriendFeed.rem FriendFeed.apk; mv HelpCenter.rem HelpCenter.apk; mv hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.rem hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.apk; mv truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.rem truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.apk; mv KPT.rem KPT.apk; mv HomeSyncWizard.rem HomeSyncWizard.apk; mv LiveWallpapers.rem LiveWallpapers.apk; mv LiveWallpapersPicker.rem LiveWallpapersPicker.apk; mv MagicSmokeWallpapers.rem MagicSmokeWallpapers.apk; mv MessagesWidget.rem MessagesWidget.apk; mv NewsWidget.rem NewsWidget.apk; mv Protips.rem Protips.apk; mv QuickContactWidget.rem QuickContactWidget.apk; mv Quickoffice_BasicViewer_2.0.42.rem Quickoffice_BasicViewer_2.0.42.apk; mv Quickoffice_BasicViewer_2.0.52.rem Quickoffice_BasicViewer_2.0.52.apk; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk; mv SocialMessaging.rem SocialMessaging.apk; mv StatusWidget.rem StatusWidget.apk; mv Stk.rem Stk.apk; mv ToggleWidgets.rem ToggleWidgets.apk; mv VisualizationWallpapers.rem VisualizationWallpapers.apk; mv UniversalInbox.rem UniversalInbox.apk; mv WeatherWidget.rem WeatherWidget.apk; mv WorkContacts.rem WorkContacts.apkk
I've noticed that some APK's change depending on the rom, these work for the UK 2.21 rom after applying the JIT/Deodex trick. If you get any errors, please check the exact names of the apk's in your rom:
Code:
ls
It simply renames all the app's I don't want to .rem instead of .apk. Want something back? Rename from .rem to .apk, say if you miss the weather widget:
Code:
mv WeatherWidget.rem WeatherWidget.apk
Update: Pretty slick way of listing the apps in your particular rom can be found here, props to Rob-T for that!
When you're done, reboot:
Code:
reboot
7) Overclocking time!
Install Milestone Overclock from the market and fire it up. Load the module and Press the menu button, go to settings and enter "1000000" as Custom rate and "54" as custom vsel. After pressing OK, pull the slider all the way to the right, so the selected frequency shows up as "1000MHz, 52vsel (Custom)". Click Apply and tick the box for "Autoload on boot"
8) Scaling
Install SetCPU from the market and start it up. Set scaling to "Ondemand" and tick the box for "Autoload on boot" and exit the program. Now it's time to make the vsel correspond to the cpu frequency and save some power, as explained so brilliantly by Higgsy. Buy the man a beer! My setscaling.sh is here, Higgsy's excellent startup script is here. Download both to the root of your SD card. Then connect your phone to your pc and fire up ADB/MotoDev Studio. Once connected to your phone, here's what you need to do:
Code:
su
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
Code:
cp /sdcard/setscaling.sh /system/xbin/setscaling.sh
Code:
cp /sdcard/install-recovery.sh /system/etc/install-recovery.sh
Code:
chmod 755 /system/etc/install-recovery.sh
Code:
chmod 755 /system/xbin/setscaling.sh
Code:
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Reboot your phone, and it should now be humming along nicely at 300-1000mhz, sipping only the power it needs, without being held down by Motobloat. Again, I didn't come up with any of this, I just wrapped it up
After doing all this, feel free to restore your apps and settings with Titanium backup, but ONLY user apps, don't re-install the old non-optimized system apps. Here's a few screenshots with all my stuff (including locale, pure calendar and other always-running apps) is installed, after running the above tweaks and mods:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The above is at 1ghz. The phone is nice and snappy, while still getting two days use from a single charge. Here's how 1.2ghz looks:
Happy hacking!
Nice man Someone should buy you a beer for taking the time to package all this together
Very nice try !
I started yesterday something similar but in document way (PDF guide or equivalent).
Maybe to avoid reading the long posts your linking to with fixes of issues and so on, you could maybe just detail a little bit more certain parts...
To give an example of my try with table of content and rooting part:
Table of content:
* How to Root the Defy
- Gain admin access
- Different methods for different versions of ROMs
* How to over clock the defy
- increase processor speed
* How to backup/install recovery
- allow installation of custom ROMs
- allow backup/restore of points of your Defy
* How to clean up system/apps
- uninstall not wanted apps or components
* How to add a theme
- make you phone look better
* How to deblur/deodexe your phone
- remove the installed moto blur to improve performance
* How to factory reset
- remove traces of what you have done
-understand the limits of the factory reset
All contributions are more than welcome to allow the completeness and improvement of this guide!
How to Root the Defy
All changes are done at own risk. I'm not responsible for a bricked phone. If you don't know what you do, stop reading here.
Default Root method for the Defy
This method was originally found by jboogie3 here urlOn modmobile 557910-motorola-defy-root-droid2method.html/url
let’s get started:
1. Put the phone in Debug Mode: Go to Settings > Applications > Development and check USB debugging box.
2. Extract the files from the zip below, connect the phone via USB, and copy them to the phone via ADB like this:
Code:
Code:
adb push Superuser.apk /sdcard/Superuser.apk
adb push su /sdcard/su
adb push busybox /sdcard/busybox
adb push exploit.bin /data/local/tmp/exploit.bin
3. Now we enter the phone's internal shell, also using ADB:
Code:
Code:
adb shell
4. Then we take advantage of the "fake" root exploit:
Code:
Code:
cd /data/local/tmp
chmod 0755 exploit.bin
./exploit.bin
5. Now after that last command you should be back to your normal console, not the phone one, so we need to connect to it again, and doing so we should now see that we have root permissions since the "#" symbol is displayed instead of "$".
Code:
Code:
adb shell
6. Now we mount the /system partition as writable and copy the necessary files there, and set them with the right permissions:
Code:
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/Superuser.apk /system/app/Superuser.apk
cp /sdcard/su /system/bin/su
cp /sdcard/busybox /system/bin/busybox
chmod 4755 /system/bin/su
chmod 4755 /system/bin/busybox
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
exit
7. Restart the phone and check if you have ROOT in a terminal by typing the "su" command, or by installing any other app that requires ROOT, and seeing it the SuperUser app pops up.
Rooting.zip > urlexternal url/url
Contains the fake root exploit, SuperUser version 2.3.6.1 and busybox
Alternative easy Root method
1. Download the z4root application on the market or elsewhere, install it
Apply the root / permanent root, that’s all !
Note: not working for all versions of phone, but dramatically easy to do.
Specific UK 2.51 ROM as of 29th of Dec 2010
1. Download attatched files
defy_2.21_boot_only.sbf
2.21boot.zip
defy_2.51_boot_only.sbf
2.51boot.zip
2. Flash the defy_2.21_boot_only.sbf via rsd lite then reboot in to system
Note: Power off DEFY. Then press 'Volume Up' and 'Power' together to boot to loader before you flash the SBF to your DEFY. Debug: If you RSD Lite did not recognize your DEFY, download the USB driver here:
urlmotorola docstools USB_Drivers/url
3. Open you phone's usb debug mode(settings>application>development>usb debug mode), then follow the standard process the root the Defy. When finished, your phone is rooted with superuser
4. Flash back the defy_2.51_boot_only.sbf via rsd lite.
Without links since iam newbee here.
Cheers,
Kribou
Good guide
Kribou said:
To give an example of my try...
...Without links since iam newbee here.
Cheers,
Kribou
Click to expand...
Click to collapse
That's one hell of a long example
yes sorry !
In fact you did a very nice work (that you tested a lot) and I wanted to do a bit the same with different options possible to save newbees from reading hours and hours of forums...
Cheers,
Kribou
Do you use a custom text-messaging application? After renaming some of the apks you suggest, the default text-messaging app closes after opening. Not a force-close, just a open and close without any error.
I'm putting everything back as it was until I've narrowed down the problem.
One more note:
You are suggesting users who want to follow your instructions, buy SetCPU from the market?
naenee said:
Do you use a custom text-messaging application? After renaming some of the apks you suggest, the default text-messaging app closes after opening. Not a force-close, just a open and close without any error.
I'm putting everything back as it was until I've narrowed down the problem.
Click to expand...
Click to collapse
I've had that error before, but not after applying the steps listed in the guide - running the UK 2.21 rom. No custom stuff here, so you've got me worried.
Here's the command to undo the renames:
Code:
mv AdService.rem AdService.apk; mv ArcPhotoworkshop.rem ArcPhotoworkshop.apk; mv ArcVideoEditorLite.rem ArcVideoEditorLite.apk; mv Bluremail.rem Bluremail.apk; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.rem revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.apk; mv BlurSNMessagingEngine.rem BlurSNMessagingEngine.apk; mv StickyNoteWidget.rem StickyNoteWidget.apk; mv SocialMessaging.rem SocialMessaging.apk; mv Swype.rem Swype.apk mv BlurUpdater.rem BlurUpdater.apk; mv CarDock.rem CarDock.apk; mv ContactsUnconnected.rem ContactsUnconnected.apk; mv amazonmp3_1.8.19_signed_zipaligned.rem amazonmp3_1.8.19_signed_zipaligned.apk; mv esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.rem esmusica_2_0_0012_embed_Signed_2010-04-13_11-05-17.apk; mv Fota.rem Fota.apk; mv FriendFeed.rem FriendFeed.apk; mv HelpCenter.rem HelpCenter.apk; mv hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.rem hiphopofficial_2_0_0012_embed_Signed_2010-04-13_11-08-31.apk; mv truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.rem truecountry_2_0_0012_embed_Signed_2010-04-13_11-06-12.apk; mv KPT.rem KPT.apk; mv HomeSyncWizard.rem HomeSyncWizard.apk; mv LiveWallpapers.rem LiveWallpapers.apk; mv LiveWallpapersPicker.rem LiveWallpapersPicker.apk; mv MagicSmokeWallpapers.rem MagicSmokeWallpapers.apk; mv MessagesWidget.rem MessagesWidget.apk; mv NewsWidget.rem NewsWidget.apk; mv Protips.rem Protips.apk; mv QuickContactWidget.rem QuickContactWidget.apk; mv Quickoffice_BasicViewer_2.0.42.rem Quickoffice_BasicViewer_2.0.42.apk; mv revolver_2_0_0012_embed_Signed_2010-04-13_11-07-08.remmv SocialMessaging.rem SocialMessaging.apk; mv StatusWidget.rem StatusWidget.apk; mv Stk.rem Stk.apk; mv ToggleWidgets.rem ToggleWidgets.apk; mv TtsService.rem TtsService.apk; mv VisualizationWallpapers.rem VisualizationWallpapers.apk; mv UniversalInbox.rem UniversalInbox.apk; mv WeatherWidget.rem WeatherWidget.apk; mv WorkContacts.rem WorkContacts.apk
Edit: Just added the undo-rename command to the original guide.
I've put back the package you linked to and messaging no longer closes. I'll stick to renaming only those APKs I know exactly of what their purpose is and only when I'm sure I do not need them - mainly Amazon MP3/DLNA and a few others.
Thank you for the prompt reply
Soren, good guide mate.. Thumbs up.. Just a small point: delete one of your noughts from para 7
Sent from my MB525 using XDA App
elblackmo said:
Soren, good guide mate.. Thumbs up.. Just a small point: delete one of your noughts from para 7
Sent from my MB525 using XDA App
Click to expand...
Click to collapse
Fixed!
Thanks for the heads up, 10 ghz might need a higher vsel...
Thinking about turning this whole thing into a rom... Maybe I should wait until the jit/deodex mod is working for the 2.34 or 2.51 releases?
I'm a bit of a newbie... so does this guide effectively hide MotoBLUR? (as well as prevent it from running to save resources..)
Looks good though. My Defy arrives in a few hours so I'll probably follow your instructions, this is my first Android phone.
Passa91 said:
I'm a bit of a newbie... so does this guide effectively hide MotoBLUR? (as well as prevent it from running to save resources..)
Looks good though. My Defy arrives in a few hours so I'll probably follow your instructions, this is my first Android phone.
Click to expand...
Click to collapse
The first step (0) will hide Motoblur, the rest of the steps will tweak and tune up the phone, making it run nice and smooth
Hi,
I see for JIT you use the Frozen Eclair package does that work with the JRDNEM_U3_2.34.1_DEBLUR Firmware? And hast it German Language?
mfG
good guy and good guide...
the|gamer said:
Hi,
I see for JIT you use the Frozen Eclair package does that work with the JRDNEM_U3_2.34.1_DEBLUR Firmware? And hast it German Language?
mfG
Click to expand...
Click to collapse
So far, the JIT/Deodex mod is only for the 2.21 firmware, but it works fine with the German/Austrian/Swiss rom. (Ich habe mein Defy aus www.getgoods.de gekauft )
The main difference between the 2.34 Central European rom and the 2.21 roms os that 2.34 has less Motobloat, but since we get rid of that in the guide, I don't think it'll make that much of a difference. As soon as the JIT/Deodex mod is available for 2.34 or 2.51, rest assured that I'll give it a try, though!
tenfar said:
good guy and good guide...
Click to expand...
Click to collapse
Thanks - I wouldn't have been possible without your great work!
Hm. Even though removing some of the apk files will free up (a fraction of the available) space on the Defy itself and while some of them not being there will decrease the amount of running services, I am wondering whether there is a real benefit.
Perhaps I should not make the comparison, but on Windows, there is something that a lot of users do - change the default state of services. However, nothing real is gained, while there is the potential to break something that users may need in the future, without realizing it at the time - being caught up in the thrill of 'tweaking'.
Amongst people who know what they're doing, it's generally accepted that the defaults are sensible nowadays and they should not be 'fixed', unless proven something is broken because of it.
I understand that many users here enjoy tinkering - I myself included, but since I prefer stability/usability to gaining a possible negligible increase in performance, especially in real-world situations compared to benchmarking, I'll stick to mainly default settings unless I can point to something and say 'That package there, it's the source of that feature not performing as well as it would do without it'.
That said, I do welcome and appreciate threads such as this, it gets people to try things out, weed out what is safe and what will break a system.
Hi,
Thanks for you Answer, you what
JIT/Deodex mod is available for 2.34
Click to expand...
Click to collapse
in Combination with Overclock mean?
That means whooopie!
Regards

[Q] Optimus V root process

Sorry to post this here - this relates to this thread. The process seems to have some bugs. Specifically, once I am logged in, the steps say to execute the following:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
cat /sdcard/flash_image > /system/bin/flash_image
chmod 755 /system/bin/flash_image
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak
mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system
flash_image recovery /sdcard/recovery-RA-GNM-thunderc-s-1.1.0.img
reboot recovery
Click to expand...
Click to collapse
Sadly, when I try to move the recovery script, I get a file not found. A quick ls of the /system/etc dir shows there is no install-recovery.sh
# ls system/etc/*.sh
ls system/etc/*.sh
system/etc/init.goldfish.sh
system/etc/init.qcom.bt.sh
system/etc/init.qcom.coex.sh
system/etc/init.qcom.fm.sh
system/etc/init.qcom.post_boo
system/etc/init.qcom.sdio.sh
Click to expand...
Click to collapse
Am I missing something obvious here?
Thanks!
answer my own question
So what I'm seeing is that this step just gets omitted. E.g. (pretend I linked to http colon slash slash forum.androidcentral.com slash optimus-v/58654-custom-recovery-optimus-v.html) this thread at android central (pretend I closed the href here). I guess the script must have been for the S, maybe?
I'm running into the same issue. I looked it up and a lot of places just passed over it for the V. But then after I did that and rebooted into recovery, there was no
"Backup" option, was just the "Android system recover <3e>" with options like reboot, wipecache, and two others...tried multiple times with the same results. Am I just missing something?
- Wright
Did you end up flashing? I decided to go a different route, used superoneclick to get on, pushed a copy of su to the machine, and simply went in as superuser to delete the pre-installed apps that I didn't like. I've yet to actually flash mine.
I did actually...after like 5 attempts I gave up for like an hour. Then I came back, did the exact same thing, except this time it booted custom recovery? No idea why the recover took, but anyway...flashed with the rom, wiped and rebooted, got stuck at the LG screen, flashed/wiped again and it worked perfect?
But, the image in that thread we were using doesn't have a kernel that lets you go over 600 mhz. So just like 30 minutes after flashing I went and downloaded an Xionia rom and flashed it with that...specs are follows:
Rom info:
- Xionia 005 Kernel
- VM crapware removed (No WHERE, Air chat, etc)
- Boot Logo and sound are gone
- Deodexed
- ZipAligned
- Not overclocked (but the kernel IS overclockable using SetCpu or similar)
- Optimus S themes will not work with this rom.
- Overclockable up to 864Mhz (No guarantees on how fast your particular processor will go. Mine is only stable up to 825.)
- CIFS support
- Tons of speed tweaks (see the thread linked above for full details)
Just google like Stock Virgin Mobile + Xionia Kernel (BETA 2).
Now using Setcpu to keep it stable at 806Mhz.
But yeah, really no idea what made the recovery finally take. Although, haven't tested this, but after you set the usb mode to transfer, move the files, the use superone click. It resets the usb connection, and I usually go and turn back on the usb file transfer option, but I didn't the time it worked. Could be a connection, but maybe not? *shrug*
-Wright
(P.S. Sorry if I'm not making any sense, this is my first android phone and I just started trying to do all that last night, so I'm probably confusing terms and stuff I shouldn't be)
Interesting,
seriously people?
Alright. Tomorrow night if im not moving Ill make a video for you peeps
ITS SUPER EASY. But seeing as all of you joined this month and are probably new to rooting and installign custom roms ill cut you some slack.
BTW in a month or so Ill be buying the phone to make sweet roms for. So watch out for that
Looking forward to the new instructions...
Got this fon today & being a total newb...can't wait for an easy, clear-cut way to root.
Thx in advance.

[MOD][HOW TO][Update: 05-Aug-2011] 2nd-init port for Milestone2

Credit for koush for Droid2 Bootstrap
Credit for edgardcastro for sharing lots of information about 2nd-boot on Milestone1
Credit for Skrilax_CZ for 2nd-init and sh hijack
If you just want to install 2nd-init on your phone you can skip the whole guide and flash update-2nd-init.zip into your phone. As usual I will not hold responsibility to any damages it may cause.
WARNING: Use this ONLY if you know exactly what you are doing. This guide will make major changes in the /system partition and may turn the phone inoperative. I won’t hold responsibility if you brick your phone or to any damages it may cause.
Pre-requisites: A computer with Android SDK and ADB drivers installed and working. It’s recommended to have RSD Lite 4.9 and the appropriate SBF image just in case anything goes wrong.
This guide was made using a Brazilian Motorola Milestone2 based on Brazil Retail SBF and a computer running Windows Vista 32-bits. I started it from the scratch by flashing my phone with RSD Lite 4.9 and performing a full data/cache wipe, just to make sure any changes were discarded.
Note: Commands that should be entered in command prompt will be listed as: “C:\> <command>”. Commands issued to ADB Shell will be listed as: “# <command>”.
1. Enable USB Debugging on your phone;
2. Get permanent root. I used the app z4root which can be found here on XDA;
3. Install Droid2 Bootstrap. It may be downloaded from Market to support the developer. More info here http://www.koushikdutta.com/2010/08/droid-x-recovery.html;
4. Open Droid2 Bootstrap and click “Bootstrap Recovery”;
5. Use bootstrap to reboot into Clockwork Recovery and backup your phone;
6. Reboot;
7. C:\> adb remount
8. # stop
9. # mkdir /system/etc/rootfs
10. # cp /*.rc /system/etc/rootfs
11. # mkdir /system/etc/init.d
12. # cp /system/bin/sh /system/bin/_sh
13. # cp /init_prep_keypad.sh /system/bin
14. C:\> adb push sh_hijack.sh /system/bin/
15. C:\> adb push 2nd-init /system/bin/
16. C:\> adb push sysinit /system/bin/
WARNING: at this point you should keep a terminal window (adb shell) opened before replacing the 'sh' binary. This is so because you wont be able to open a new abd shell window to run the chmod command.
17. C:\> adb push sh /system/bin/
18. # chmod 755 /system/bin/sh
19. # chmod 755 /system/bin/sh_hijack.sh
20. # chmod 755 /system/bin/2nd-init
21. # chmod 755 /system/bin/sysinit
22. # ln -s /system/bin/busybox /system/xbin/mount
23. # ln -s /system/bin/busybox /system/xbin/rmdir
24. # ln -s /system/bin/busybox /system/xbin/cp
25. # ln -s /system/bin/busybox /system/xbin/umount
26. # ln -s /system/bin/busybox /system/xbin/run-parts
27. # reboot
28. At this point you should be getting into Clockwork Recovery every time, no matter how many times you have rebooted or if you’ve taken the battery of or not. THIS IS NORMAL. It means that the 2nd-boot + sh hijack is working as it should. The boots into clock recovery are caused by a conflict between sh hijack and logwrapper hijack (used by Droid2 Bootstrap). Continue the guide to fix this issue.
29. In clock recovery menu go to: mounts and storage>mount /system;
30. Open ADB Shell again (it will be available in clockwork recovery as well);
31. # cp /system/bin/logwrapper.bin /system/bin/mylogwrapper
32. C:\> adb pull /system/etc/rootfs/
33. Open init.rc and init.mapphone_umts.rc into a text editor that preserves unix end-line format (e.g.: notepad++). Find all entries of “/system/bin/logwrapper” replacing for “/system/bin/mylogwrapper”.
34. In init.mapphone_umts.rc find entry for “exec /init_prep_keypad.sh” replacing for “exec /system/bin/init_prep_keypad.sh”. Add the following text to the end of this file to be able to run all scripts in /system/etc/init.d at boot time:
Code:
service bootscripts /system/bin/sysinit
class post-zygote_services
disabled
oneshot
35. Save and close.
36. C:\> adb push init.rc /system/etc/rootfs/
37. C:\> adb push init.mapphone_umts.rc /system/etc/rootfs/
38. # chmod 755 /system/etc/rootfs/init.rc
39. # chmod 755 /system/etc/rootfs/init.mapphone_umts.rc
40. Choose “Reboot system now” in clock recovery menu;
You’re all set! Now it is just a matter of changing the rc files in /system/etc/rootfs to customize your system boot.
If you want to log the system boot you may also copy the provided log-init.sh script into /system/etc/rootfs and uncomment the line “exec /log_init.sh” from my init.rc file. Doing so will create the /data/logcat.log file that may get huge in sometime.
2nd-init files and my modified *.rc files attached.
Have fun!
UPDATED to version 2.0.0 (froyo) this version exploits /system/bin/mount_ext3.sh instead of sh binary. It's a new method I developed in order of starting 2nd-init earlier but also keeping compatibility with Droid2bootstrapper (recovery takes place first). This might help me booting Leaked GB from 2nd-init, which wasn't possible on the previous version. Take note it's not ready yet to apply on GB.
I just missed the exec /system/bin/init_prep_keypad thanks!
What is this for?
Sent from my A953 using XDA App
inheme said:
What is this for?
Sent from my A953 using XDA App
Click to expand...
Click to collapse
A method to customize initialization scripts of android system. It's a major hack used be some Milestone1 custom ROM's. I've succeeded into porting this to MS2, and I think some modders here of XDA may be interested into adding this to custom ROM's. It may be added to the stock ROM (as I did) but it is not something that everyone is willing to try.
Word of advise: If you don't know what it is you don't need it
Ok thanks for the explanation
So it means that custom roms will be easier to create?
Sent from my A953 using XDA App
That's some major news for our little community.
Tell me if I'm wrong, but since init starts after the kernel is loaded, it's not useful at all for loading a custom kernel, true?
But having a custom init script is a step to CyanogenMod 6 port on Milestone 2, still true?
Anyways, great job, and great howto.
momus87 said:
That's some major news for our little community.
Tell me if I'm wrong, but since init starts after the kernel is loaded, it's not useful at all for loading a custom kernel, true?
Click to expand...
Click to collapse
To load a custom kernel we'll need that kexec hack that team freemymoto is working on.
But having a custom init script is a step to CyanogenMod 6 port on Milestone 2, still true?
Click to expand...
Click to collapse
Well, it's possible, but I believe the big issue here is the impossibility of running custom kernels. Even so, a skilled Modder may be able to overcome that and port CM6 to MS2 using Motorola's stock kernel. It has been done for the MS1.
Anyways, great job, and great howto.
Click to expand...
Click to collapse
You're welcome.
Thanks, r2beta0... this is going to help us out a lot!
r2beta0 said:
Well, it's possible, but I believe the big issue here is the impossibility of running custom kernels. Even so, a skilled Modder may be able to overcome that and port CM6 to MS2 using Motorola's stock kernel. It has been done for the MS1.
You're welcome.
Click to expand...
Click to collapse
Guess that would be me
nah just kidding. I've just happened to have some luck porting Froyo and Gingerbread to the bootloader-locked x10 mini pro. I've just ordered my milestone 2 and I will work on CM6. AWESOME JOB on the 2nd init man! Really, thanks!!
edit: just can't stop thanking you! You saved me a lot of work and porting CM will be easy as sh*t for me now! THANKS
Mikevhl said:
Guess that would be me
nah just kidding. I've just happened to have some luck porting Froyo and Gingerbread to the bootloader-locked x10 mini pro. I've just ordered my milestone 2 and I will work on CM6. AWESOME JOB on the 2nd init man! Really, thanks!!
edit: just can't stop thanking you! You saved me a lot of work and porting CM will be easy as sh*t for me now! THANKS
Click to expand...
Click to collapse
You're welcome! You can count on me to provide as much help as I can to free our MS2's from Motorola's hand. I would be very grateful if you could share your knowledge of porting CM to locked devices. I was trying to port MIUI and Shadow mod BR to MS2 but I got stuck when dealing with proprietary files.
Sent from my A953 using XDA App
@r2beta0
Could this port work on Motorola defy?
Sent from my MOTO Defy
demolition23 said:
@r2beta0
Could this port work on Motorola defy?
Sent from my MOTO Defy
Click to expand...
Click to collapse
It's very likely, since the 2 devices are very similar. Most of the files I attached are from Milestone1 and works perfectly on MS2. Though I recommend you to NOT replace your *.rc files with the attached ones since they could be not compatible. It would be better if you edit your own files. Also try it ONLY if you have a working version of ClockworkMod Recovery (or other custom recovery). You may adapt this guide for your device and post it here on XDA, just remember to mention my name on credits
Already posted and hoping someone to port this..
http://forum.xda-developers.com/showthread.php?t=1003449
demolition23 said:
Already posted and hoping someone to port this..
http://forum.xda-developers.com/showthread.php?t=1003449
Click to expand...
Click to collapse
BTW, why do you want to use 2nd-init? You know, this guide is more inclined for devs/mods who want (need) to include this feature on their ROM's. With this you can change the way things are loaded on linux system before android starts up. But to take advantage of that you should know a lot about how linux works and so on. Regular users should look for a ROM based on the features he needs. Most ROM's already have 2nd-init implemented, but it's not something users are aware of.
Possible issue I've come across:
When replacing sh, i can no longer re-open the shell for obvious reasons... potentially I need to already have a second terminal open with shell running in it already?
SBFing and trying again :3
smacky_wolf said:
Possible issue I've come across:
When replacing sh, i can no longer re-open the shell for obvious reasons... potentially I need to already have a second terminal open with shell running in it already?
SBFing and trying again :3
Click to expand...
Click to collapse
I had no such issue here. When executing the steps of this guide I kept two windows opened all the time. One command prompt to run adb push/pull and another window running adb shell.
Thanks to point that out! I will post a warning in the main post. You should have a adb shell window already running to be able to run chmod just after replacing sh.
But don't worry, you don't need to SBF. Just reboot into clockwork recovery, mount /system via menu, and open your adb shell. It uses a different shell so you can fix the problem in /system/bin.
Looks like Motorola Defy now has CyanogenMod 7 using 2nd-init script! Wish same were the case for MS2.
syl0n said:
Looks like Motorola Defy now has CyanogenMod 7 using 2nd-init script! Wish same were the case for MS2.
Click to expand...
Click to collapse
I'm on it, but development is slow
No necessary to use 2nd init.
Just install "droid 2 bootstrap" and Rom Manager will work perfectly.
keylight65 said:
No necessary to use 2nd init.
Just install "droid 2 bootstrap" and Rom Manager will work perfectly.
Click to expand...
Click to collapse
What are you talking about? This guide isn't related to ROM Manager.

[Q] [i9020a] Nexus S - can't remove / rename install-recovery.sh

Hello,
I have a Nexus S which I am trying to root and flash CWM recovery on. I've followed "The Unlockr's Guide" which was a tremendous help as well as kursk's "Step by Step ROOT Nexus S via ClockworkMod Recovery image (i9023 and i9020A)".
I am having issues however, renaming / removing the "install-recovery.sh" script. I've tried to rename it using Android Mate. I get the error message "failed to rename to install-recovery-no.sh".
I've also tried to use ADB Shell by trying:
"mount -o rw,remount /dev/block/mtdblock3 /system" which go the following error:
mount: operation not permitted
so I couldn't perform the rename using the mv command.
I really don't know what else to try... Any help would be appreciated.
Thanks.
Just start from begin again and use this guide. I have also i9020a and I was done in 15 minutes, newer did it before with Nexus S. good lack
Wrong thread sir!!!
However, back on subjkect,
type adb shell
cd to /
the cd to system/etc
from there, # mv install-recovery.sh install-recovery.sh.bak
if you are still having problems, i have a zip file removing this recovery-install.sh script. forgot who was the author though.( just saying so that you know merit goes to someone else) . just fflash from recovery.
http://db.tt/ooDaCnU
I just renamed it using root explorer. Worked fine for me
Thanks deeren,
That worked. It removed the recovery-install.sh script altogether. One question, if I ever want to go back to the stock recovery, is there a script I can use to bring it back?
deeren said:
Wrong thread sir!!!
However, back on subjkect,
type adb shell
cd to /
the cd to system/etc
from there, # mv install-recovery.sh install-recovery.sh.bak
if you are still having problems, i have a zip file removing this recovery-install.sh script. forgot who was the author though.( just saying so that you know merit goes to someone else) . just fflash from recovery.
Click to expand...
Click to collapse
AnalogTrail said:
Thanks deeren,
That worked. It removed the recovery-install.sh script altogether. One question, if I ever want to go back to the stock recovery, is there a script I can use to bring it back?
Click to expand...
Click to collapse
If you are on stock rom, then you can just reflash any stock rom (without wiping , so that you do not loose your data) and it will put back the script back.
you could also pull the script from any stock rom and push it back to your phone using adb.
move along, empty post, nothing to see here
I think..just flash any Stock ROM..
and your Stock Recovery will be back...
cmiiw
deeren said:
Wrong thread sir!!!
However, back on subjkect,
type adb shell
cd to /
the cd to system/etc
from there, # mv install-recovery.sh install-recovery.sh.bak
if you are still having problems, i have a zip file removing this recovery-install.sh script. forgot who was the author though.( just saying so that you know merit goes to someone else) . just fflash from recovery.
http://db.tt/ooDaCnU
Click to expand...
Click to collapse
Can You tell me how to use that script ., I mean I am a noob . Can you tell me what exactly to do with that file. Coz I have been trying to remove that .sh file for 6 hours now. No matter what i do ., whenever i run the android recovery it creates a new file again and shows that triangle with exclamation screen ., :'(

Categories

Resources