Big Thanks: original [email protected] [http://classic.cx/android/dexo-universal-odex-tool/]
ADVANTAGES & DISADVANTANGES OF RE-ODEX
Advantages:
-All needed things are in one apk, so modding/theming is (better) possible
-Needs less space on /system
Disavantages:
-Needs more space on /data
-Is not so stable than a odexed rom
-Slower on first boot(because a odexed rom has already execute ready .odex files, a deodexed rom needs to generate dalvik cache)
===============================================
First step, please make a nandroid if you are unsure of what you are doing.
Second step, install busybox if it is not already installed. Either from the app or
from the binary I included (ie, adb shell busybox –install /system/xbin/)
Third step, push the four files zip, zipalign, dexo and dexopt-wrapper to /system/bin/
Fourth step, give the three files executable permissions (ie, chmod 755 zip zipalign dexo dexopt-wrapper)
Fifth step, run it!
Once the script is done, your phone will reboot. Your device will appear to be “frozen” until it reboots. That is ok.
Then all you will have to do is run:
adb pull /system/framework # JUST INCASE...YOU CAN SKIP THIS STEP.
adb pull /system/app # JUST INCASE...YOU CAN SKIP THIS STEP.
You are now done! The tool will automatically remove the classes.dex from your files as well as zipalign them. So you are optimized and ready to go.
Sample Terminal/Command prompt session. Basically you can copy and paste, ignoring the text after the # of course:
# Commands on Host computer
cd Downloads/universal-odex # change to the location you unzipped the odex tool.
adb remount
adb push dexo /system/bin/
adb push dexopt-wrapper /system/bin/
adb push zip /system/xbin/
adb push zipalign /system/xbin
adb push busybox /system/xbin # you may or may not already have busybox installed, but this will ensure that you have the correct applets installed
# Commands in ADB SHELL
adb shell # you just entered your Device’s shell
chmod 755 /system/bin/dexo /system/bin/dexopt-wrapper /system/xbin/zip /system/xbin/zipalign /system/xbin/busybox
busybox –install /system/xbin # maybe fail in this step..but it seems okay,go to the next step anyway.
dexo # this will be the last command before your exit adb shell and your device reboots
# The “dexo” command executes SUPER fast. It should be done within 30s-1m, depending on ROM and device
# Commands on Host computer
cd Desktop
mkdir framework
mkdir app
adb pull /system/framework framework
adb pull /system/app app
# Rejoice.
If it doesn’t work for you, then you did something wrong. This is version 3.1 of the script and I’d like to think that I’ve fool-proofed it pretty well.
If you have any questions, comments, or suggestions, please post here.
Exclusive to theMikMik.
Tommy
enjoy the possibilities…
FILES_NEEDED:
View attachment re_odex_needed.tar.gz
Bro, you mean de-odex instead of re-odex??
Or even re-de-odex lol
Sent from my Nexus 7 using Tapatalk 2
kingCV said:
Bro, you mean de-odex instead of re-odex??
Click to expand...
Click to collapse
yesyes..
Related
Just for fun I have been looking at getting Rosie on to the Android Emulator and to see what I can do. All is well I believe except I am missing some shared librarys and a permisions file...
adb push com.htc.android.easopen.jar /system/framework/
adb push com.htc.android.pimlib.jar /system/framework/
adb push com.htc.framework.jar /system/framework/
adb push com.scalado.util.ScaladoUtil.jar /system/framework/
adb push com.htc.resources.apk /system/framework/
adb push framework-res.apk /system/framework/
adb push com.htc.framework.xml /etc/permissions/
Any way - I cant get these on to the relevant directory due to them ( framework / permissions ) been read only. I'm trying to do this in a way that wont massivly change a rom so i was hoping that I would be able to install to an unrooted device by changing just those directorys permissions.... in fact I assumed the emulator would be unrooted ???
Any way - pointers for this Android noob would be much apprciated......
PS I started by using the Android Toggle.bat so cudos to the Dev who started that.... I forgot your user name
Also is there any way to read the dependancys of an apk ? The know what they need and I am guessing by using logic..... might help to optimise my mess.
Heres the rest as is.... still a lot of messing to go...
Code:
@echo off
:start
cls
ECHO ********************************************************
ECHO * 1. Install HTC 2. Nothing to See *
ECHO ********************************************************
ECHO.
:opt
Set /p xch=Select Option:
If '%xch%'=='1' Goto choice1
If '%xch%'=='2' Goto choice2
ECHO That is not a valid choice, please try again.
ECHO.
Goto opt
:choice1
ECHO.
ECHO **********************
ECHO * Installing HTC *
ECHO **********************
adb push com.htc.android.easopen.jar /system/framework/
adb push com.htc.android.pimlib.jar /system/framework/
adb push com.htc.framework.jar /system/framework/
adb push com.scalado.util.ScaladoUtil.jar /system/framework/
adb push com.htc.resources.apk /system/framework/
adb push framework-res.apk /system/framework/
adb push com.htc.framework.xml /etc/permissions/
adb install AndFTP.apk
adb install AndExplorer.apk
adb install FlashPlayer.apk
adb install framework-res.apk
adb install com.htc.resources.apk
adb install Launcher.apk
adb install Rosie.apk
adb install com.htc.TwitterWidget.apk
adb install com.htc.MusicWidget.apk
adb install com.htc.StockWidget.apk
adb install com.htc.WeatherWidget.apk
adb install AccountManager.apk
adb install AndroidMarket.apk
adb install HTC_CIME.apk
adb install HtcAddProgramWidget.apk
adb install HTCAlbum.apk
adb install htccalendarwidgets.apk
adb install HtcClockWidget.apk
adb install HtcContacts.apk
adb install htccontactwidgets.apk
adb install HtcFootprints.apk
adb install HtcFootprintsWidget.apk
adb install htcinternetwidget.apk
adb install HtcLocationPicker.apk
adb install HtcLocationService.apk
adb install HtcLockScreen.apk
adb install HtcLog.apk
adb install htcmailwidgets.apk
adb install htcmsgwidgets.apk
adb install HtcMusic.apk
adb install com.htc.WeatherWidget.apk
adb install HTCNew.apk
adb install HtcPhotoWidget.apk
adb install HtcRingtoneTrimmer.apk
adb install htcsearchwidgets.apk
adb install HtcSettingsProvider.apk
adb install htcsettingwidgets.apk
adb install HTCSetupWizard.apk
adb install HtcSoundRecorder.apk
adb install HtcStreamPlayer.apk
adb install HtcTwitter.apk
adb install IM.apk
adb install ImProvider.apk
adb install Stk.apk
adb install SocialNetworkProvider.apk
ECHO.
ECHO Completed! Rebooting...
Pause
adb shell reboot
Exit
:choice2
ECHO.
ECHO **********************
ECHO * Nothing to see *
ECHO **********************
Exit
Terran
It would be easier to create a ROM that did not require the SWAP file, then flashing it into a G1, then doing a nandroid backup and using that for the Emulator (and adding much more RAM in the emulator.)
ivanmmj said:
It would be easier to create a ROM that did not require the SWAP file, then flashing it into a G1, then doing a nandroid backup and using that for the Emulator (and adding much more RAM in the emulator.)
Click to expand...
Click to collapse
Can you please elaborate on this a bit? How do I translate a nandroid backup into an avd file that the emulator can boot? I wanted to do this exact thing but never really figured out how. Will really appreciate your step by step?
devsk said:
Can you please elaborate on this a bit? How do I translate a nandroid backup into an avd file that the emulator can boot? I wanted to do this exact thing but never really figured out how. Will really appreciate your step by step?
Click to expand...
Click to collapse
This is a step by step walkthrough:
http://forum.xda-developers.com/showpost.php?p=3952890&postcount=7
If you get it up and running, I'd appreciate a copy of that system.img (without the swap partition requirement). ^_^
ivanmmj said:
It would be easier to create a ROM that did not require the SWAP file, then flashing it into a G1, then doing a nandroid backup and using that for the Emulator (and adding much more RAM in the emulator.)
Click to expand...
Click to collapse
MMmmmm - where I was trying to get to was the point where some one could just run this batch and update their eum / phone with out messing around with custom roms etc.... I have a feeling I am flogging a dead donkey going down that route though.
Terran
ccsnet said:
Just for fun I have been looking at getting Rosie on to the Android Emulator and to see what I can do. All is well I believe except I am missing some shared librarys and a permisions file...
adb push com.htc.android.easopen.jar /system/framework/
adb push com.htc.android.pimlib.jar /system/framework/
adb push com.htc.framework.jar /system/framework/
adb push com.scalado.util.ScaladoUtil.jar /system/framework/
adb push com.htc.resources.apk /system/framework/
adb push framework-res.apk /system/framework/
adb push com.htc.framework.xml /etc/permissions/
Any way - I cant get these on to the relevant directory due to them ( framework / permissions ) been read only.
Click to expand...
Click to collapse
You can make /system rw by using a remount command. It's not enough to just push the framework files onto system though. They need to be added to BOOTCLASSPATH in the init.rc as well. You'll have to unyaffs boot.img
Also is there any way to read the dependancys of an apk ? The know what they need and I am guessing by using logic..... might help to optimise my mess.
Click to expand...
Click to collapse
Look in the AndroidManifest.xml
jashsu said:
You can make /system rw by using a remount command. It's not enough to just push the framework files onto system though. They need to be added to BOOTCLASSPATH in the init.rc as well. You'll have to unyaffs boot.img
Look in the AndroidManifest.xml
Click to expand...
Click to collapse
Thanks....
Terran
EDIT - Remount command info - http://groups.google.com/group/andr...7ecb631689/da581f1b398fdf8b?#da581f1b398fdf8b
Hey everyone,
wesgarner said:
Zip Align reduces the amount of RAM used during processing running for a major speed increase in running the apps: http://developer.android.com/guide/developing/tools/zipalign.html
Click to expand...
Click to collapse
I had been messing about with a script to pull apks off my phone, zipalign them and then push them back, but then I saw wesgarner's CM build with a binary and script for use on your phone. I don't really want to mess round with flashing a ROM just for that though, so I've ripped them out and uploaded them below. Another reason is I want to run this manually (with GScript) rather than on boot (as it does in wesgarner's ROM).
I take no credit for this, the binary and script were both taken from wesgarner's CM buiild.
To "install" this, just adb push the two files in the zip below onto your phone with:
Code:
adb shell mount -o remount,rw /system
adb push zipalign /system/bin
adb push zipalign_apks /system/sd/zipalign_apks.sh
adb shell chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
adb shell mount -o remount,ro /system
Then anytime you want to run the script just do:
Code:
adb shell sh /system/sd/zipalign_apks.sh
Or in terminal:
Code:
su
sh /system/sd/zipalign_apks.sh
Has been tested on CM 4.2.7.1
ZipAlign
senab said:
Hey everyone,
I had been messing about with a script to pull apks off my phone, zipalign them and then push them back, but then I saw wesgarner's CM build with a binary and script for use on your phone. I don't really want to mess round with flashing a ROM just for that though, so I've ripped them out and uploaded them below. Another reason is I want to run this manually (with GScript) rather than on boot (as it does in wesgarner's ROM).
I take no credit for this, the binary and script were both taken from wesgarner's CM buiild.
To "install" this, just adb push the two files in the zip below onto your phone with:
Code:
adb shell mount -o remount,rw /system
adb push zipalign /system/bin
adb push zipalign_apks.sh /system/sd
adb shell chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
adb shell mount -o remount,ro /system
Then anytime you want to run the script just do:
Code:
adb shell /system/sd/zipalign_apks.sh
Or in terminal:
Code:
su
sh /system/sd/zipalign_apks.sh
Has been tested on CM 4.2.7.1
Click to expand...
Click to collapse
i do not even know what zipalign does .. but i did add this to my script
# lucid -z
so .. what does it do exactly?
Sweet... Thanks...
I was surprised that more than half of the Apps I have were already ZipAligned...
LucidREM said:
i do not even know what zipalign does .. but i did add this to my script
# lucid -z
so .. what does it do exactly?
Click to expand...
Click to collapse
APKs (as you probably already know) are just zip files. zipalign simply aligns the APK on 4-byte boundaries which Android is more efficient wrt memory access.
You can read more from Jean-Baptiste Queru at http://android-developers.blogspot.com/2009/09/zipalign-easy-optimization.html
Vermithrax said:
Sweet... Thanks...
I was surprised that more than half of the Apps I have were already ZipAligned...
Click to expand...
Click to collapse
Since the 1.6 SDK was released, the ADT does this automatically on APK export. Therefore any app which has been updated since ~September (and was developed using the ADT Eclipse plugin) will be zipalign'd. I was more surprised that 12 out of the 43 apps on my phone weren't aligned!
ZipAlign
senab said:
APKs (as you probably already know) are just zip files. zipalign simply aligns the APK on 4-byte boundaries which Android is more much efficient wrt memory access.
You can read more from Jean-Baptiste Queru at http://android-developers.blogspot.com/2009/09/zipalign-easy-optimization.html
Click to expand...
Click to collapse
that's awesome .. thanks for the link .. i hadn't read about that
Thanks much for this!
Here is a simple gscript to install zipalign after a wipe or new build flash.
You must first create directory /sdcard/zipalign and place zipalign from the zip in the OP there. Path to the file should now be /sdcard/zipalign/zipalign.
Place this script in your gscript folder (after removing .txt from the name) and load it in gscript with su permissions.
I also find it easier to run the script in the zip from the OP in Gscript as well. Instead of placing it in /system/sd run this (assumes zipalign_apks.sh is at root of C:\)
Code:
adb remount
adb push C:\zipalign_apks.sh /sdcard/gscript/zipalign_apks.sh
Then just load it into Gsrcipt with su permissions as with the other script.
Easiest of all may just be to use the commands within Lucid's script. But, I'm comfortable with Gscript, and I can make it 2 clicks away.
EDIT: First execution, you may want to run the original way, because guess what? Gscript isn't zipaligned. But it worked fine just the same.
worked great thanks.
Thanks. I didn't want to flash whole ROM to zipalign apps, so script was very handy.
Actually I've zipaligned only 2 apps, one of them was everybody loved Linda
so anyone wanna bless me with a terminal code to install the script?
garz said:
so anyone wanna bless me with a terminal code to install the script?
Click to expand...
Click to collapse
Read, its on the first post....xD
ZipAlign
garz said:
so anyone wanna bless me with a terminal code to install the script?
Click to expand...
Click to collapse
# lucid -z
yeah so su? then #lucid -z? cause that did nothing for me...
LucidREM said:
i do not even know what zipalign does .. but i did add this to my script
# lucid -z
so .. what does it do exactly?
Click to expand...
Click to collapse
I put a quick explanation of my script on my ROM page: here ya go (rough explanation)
Zip Align reduces the amount of RAM used during processing running for a major speed increase in dex-opt and running the apps, along with the RAM hack and a CC (or your userinit) boots speeds incredibly and better usability of apps (boot and system) in Android: http://developer.android.com/guide/d.../zipalign.html
Most developers have not used this yet (CM does ZipAlign his apps), but this does for the system apps provided from the now old Google Apps
Click to expand...
Click to collapse
senab said:
Since the 1.6 SDK was released, the ADT does this automatically on APK export. Therefore any app which has been updated since ~September (and was developed using the ADT Eclipse plugin) will be zipalign'd. I was more surprised that 12 out of the 43 apps on my phone weren't aligned!
Click to expand...
Click to collapse
Agreed. The Market won't let non-zipaligned apps be uploaded.
AndroidAppCritic said:
Agreed. The Market won't let non-zipaligned apps be uploaded.
Click to expand...
Click to collapse
it will really, it doesn't detect the diff
Also, SDK4 didn't really include an enforced ZipAlign like SDK5 (eclair) does
Plus I built the ZipAlign from source from eclair - so this script may not update them all perfectly
garz said:
yeah so su? then #lucid -z? cause that did nothing for me...
Click to expand...
Click to collapse
Unzip the files to your SD Card, then:
Code:
su
mount -o remount,rw /system
mv /sdcard/zipalign /system/bin
mv /sdcard/zipalign_apks /system/sd/zipalign_apks.sh
chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
mount -o remount,ro /system
Post deleted becoz it was redundant
can someone make a script for windows or a bat file that can zipalign a batch of apks? I am not that ofay with line commands and when i create a new theme (which i often do), i then have to go and zipalign every single apk i have altered 1 at a time..... i do:
Code:
zipalign -f -v 4 E:\app\theapp.apk E:\app\theapp.apk.out
senab said:
Unzip the files to your SD Card, then:
Code:
su
mount -o remount,rw /system
cp /sdcard/zipalign /system/bin
cp /sdcard/zipalign_apks.sh /system/sd
chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
mount -o remount,ro /system
Click to expand...
Click to collapse
This isnt working for me bc of the .sh after zipalign_apks .. do i rename the zipalign_apks to zipalign_apks.sh after unzipping?
edit:that worked THANKS!
Original post HERE from r2beta0
DANGER!!! Its NOT for Defy! Needs to mobify the 2nd-init first
Hopping some devs to fix it for Defy!
r2beta0 said:
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
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/
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!
Click to expand...
Click to collapse
As r2beta0 said for defy porting:
r2beta0 said:
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
Click to expand...
Click to collapse
Thanks, that looks interesting. I'll look into it later.
Just a big WARNING: if it behaves at it is described on the Defy, DON'T DO THAT, at least not with Tenfar or Kb7sqi 's CWM recovery ports, as booting into Recovery you won't have root adb shell access.
Someone can explain me what is it?
adlx.xda said:
Just a big WARNING: if it behaves at it is described on the Defy, DON'T DO THAT, at least not with Tenfar or Kb7sqi 's CWM recovery ports, as booting into Recovery you won't have root adb shell access.
Click to expand...
Click to collapse
Install SD Recovery of the market
Disable Debugging
Reboot your phone to the Recovery, while plugged in to a computer
Check if you can use adb... I was able to yesterday
diamond_lover said:
Someone can explain me what is it?
Click to expand...
Click to collapse
I'm guessing this is the first step to being able to go into clockwork mod recovery from a cold boot.
Sent from my Moto Defy using Tapatalk
So, anyone tried? Or is working in that?
So figured I would give this a shot, and well it doesnt work. Phone just sticks at moto logo.
Yes its true in clockwork you cant get root (#) - so I just pulled the .rc files I needed to edit ahead of time and pushed them to the phone before the first reboot. Thus avoiding needing to boot into clockwork after the described bootloop.
If I get time I will play around with this some more.
What is thisss ??
Sent from my MB525 using XDA Premium App
fritolays said:
So figured I would give this a shot, and well it doesnt work. Phone just sticks at moto logo.
Yes its true in clockwork you cant get root (#) - so I just pulled the .rc files I needed to edit ahead of time and pushed them to the phone before the first reboot. Thus avoiding needing to boot into clockwork after the described bootloop.
If I get time I will play around with this some more.
Click to expand...
Click to collapse
or you can just make a flashable zip, which i had no luck with.
Okay, this was my first time trying to root my phone and it would figure that non of the automated methods worked for me. Still, I was able to get root on my US Cellular Samsung Galaxy S Mesmerize (SCH-i500 for the kids keeping track at home) and these are the steps that I took. I hope this helps others who may be scratching their head wondering what to do when the developers haven't gotten around to (read: forsaken) us.
The nice thing about this method is that it doesn't require Windows (though you still do download SuperOneClick).
NOTE: This is only for an officially updated Mesmerize. Rooting is unnecessary for the leaked version.
APOLOGY: I can't post any links to anything outside the forum as I am a newer member, so, sorry for not being able to post URLs.
1. Download the Android SDK from the Android developer website and install/unzip it. You may need to add the path to the adb tool (found under platform-tools for me) to your PATH variable.
2. Download the SuperOneClick tool and unzip it
3a. If you are using Windows, then make sure to install the drivers for your phone. I don't have Windows, so don't ask me which file to download. Sorry.
3b. Enable USB Debugging on your phone (Settings->Applications->Development->Check "USB Debugging").
4. Connect your phone to your computer using the USB cable
5. Open a shell (or command prompt on Windows) and change directories to where you unzipped SuperOneClick
6. Run the following commands to copy files to your device
A. adb push psneuter /data/local/tmp/psneuter
B. adb push busybox /sdcard/busybox
C. adb push su-v2 /sdcard/su
NOTE: A quick note of each of these files.
A. psneuter - an exploit to gain root access temporarily on your phone
B. busybox - a compilation of common unix commands to help you along the CLI world
C. su - the super-user command used to gain elevated privileges
7. Run the following command to get a command line interface to your device
adb shell
At this point, you should see a $ prompt indicating that you are on your phone.
From here, you will change directories to where you put the exploit, change the permissions so you can run it, copy over the files that we need to sustain root access, and finally, install the Superuser.apk app so that you can manage root access from the UI.
Execute the following commands:
$ cd /data/local/tmp
$ chmod 777 psneuter
$ ./psneuter
Here, you will be disconnected from your device. This is normal. Just run "adb shell" again to get back in, though now, you will notice that the prompt has changed to a #. The following commands will reflect that.
# mount -t rfs -o remount,rw /dev/block/st19 /system
# cd /system/xbin
# cat /sdcard/busybox > busybox
# cat /sdcard/su > su
# chmod 4755 busybox
# chmod 4755 su
# exit
Now, you will be back on your computer. Type the following to install the Superuser.apk app.
adb install Superuser.apk
That should do it! You now have root access. Go ahead and try to install Titanium Backup (requires root). You can also install a terminal app or anything else.
I hope this helps. Report your successes/failures in the comments.
Hi guys,
i got one question to ask - how to deodex my phone?
I used xUltimate and deodexed the apps but the commands to coppy it to the phone seems not to work at all.
So how to copy done_app and done_framework to phone? I tried to use cmd in windows and adb shell but it says that cd command is not valid.
cube7 said:
Hi guys,
i got one question to ask - how to deodex my phone?
I used xUltimate and deodexed the apps but the commands to coppy it to the phone seems not to work at all.
So how to copy done_app and done_framework to phone? I tried to use cmd in windows and adb shell but it says that cd command is not valid.
Click to expand...
Click to collapse
FOLLOW THIS:
http://forum.xda-developers.com/showthread.php?t=1068027
Deodex
Advantages or disadvantages
- Odexed ROMs are slightly faster, deodexed ROMs are slightly slower
+ You can make custom themes for your ROM
+ Performance los is negligible.
Requirements:
Download XUltimate
Busybox installed
Root
1. Connect phone to computer
2. Start xUltimate, we will now get the required files from our phone to deodex and zipalign it which we will describe in the 3rd step.
3. On the main menu of xUltimate, choose option 5 (Pull and deodex all). Everything will be done for you here. Don't worry. You will see all your finished files in the folders 'done_app' and 'done_frame' which are located in the installation directory of xUltimate.
4. move folders 'done_app' and 'done_frame' folders to your sdcard, you can find these folders in the directory of xUltimate as described in the previous step.
5. Make sure the sdcard is not mounted to pc anymore
6. Open Windows Command Prompt and type the following commands.
adb shell
su
stop
mount -o remount,rw /dev/block/stl12 /system
rm /system/app/*.odex
rm /system/framework/*.odex
busybox cp /sdcard/done_app/* /system/app/
busybox cp /sdcard/done_frame/* /system/framework/
chmod 644 /system/app/*
chmod 644 /system/framework/*
mount -o remount,ro /dev/block/stl12 /system
sync
reboot recovery
7. Now data and cache reset in the recovery menu...
8. reboot
If one of the commands, for example 'cp' is not found, try putting busybox in front of the command:
eg: busybox cp /sdcard/done_frame/* /system/framework/
both ways don't work. The program seems not to recognize this commands. Can i do it via root explorer?
cube7 said:
both ways don't work. The program seems not to recognize this commands. Can i do it via root explorer?
Click to expand...
Click to collapse
Explain me the exact scenario.
This given method should work by all means. There is no escape.
Check the USB drivers.
Check the connectivity.
Then do it again.
drivers must be right 2 days ago i've flashed the phone. maybe it's adb, i copied it from one click folder.
i will copy the text from cmd as soon as i will be home.
btw, the process is ok till 6th point of the instruction. then it fails at cp command (busybox cp also).
cube7 said:
drivers must be right 2 days ago i've flashed the phone. maybe it's adb, i copied it from one click folder.
i will copy the text from cmd as soon as i will be home.
btw, the process is ok till 6th point of the instruction. then it fails at cp command (busybox cp also).
Click to expand...
Click to collapse
Try booting linux on ur pc as sometimes adb doesnt work for me on windows but for linux users it worked perfectly
Sent from my GT-i5801 using XDA App