PLEASE HELP, Just stuck in 1 tiny step! - Legend Q&A, Help & Troubleshooting

SO I Followed this tutorial chrg.zxq.net/htc-legend-root.html done everything perfectly until this step
"Then we have to type the following into CMD:"
/data/local/flash_image misc /data/local/misc1-2.img
When i type in the above i get this data/local/fash_image: not found
this is what i have in my android sdk platform-tools folder.
please help

Hi pappa9,
try to start crackin.bat before that

You need to move the following files from "C:\android-sdk\platform-tools" to "C:\android-sdk\tools":
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
It's the "tools" folder you're supposed to extract the hack4legend, & crackin.bat.
So not in "platform-tools".
It might work to use the crackin.bat from "platform-tools" folder instead of "tools", it didnt work for me at least. But you need to make sure the above mentioned files are located in the same folder as crackin.bat
I had similar issue, and this worked for me. Hope it helps!

Related

[SOLVED] How to deodex?

Hi, is it possible to just deodex one apk or do you have to do an entire ROM?
Basically I have a 'Rosie.apk' and 'Rosie.odex', but want to deodex it so I can get to the 'classes.dex' file. Can someone let me know how I might go about this?
Try apktool? Might be Linux only, can't remember sorry.
Sent from my HTC Hero using XDA App
Have successfully done what I wanted now
For info, this is what I did.
Created a new folder called 'system' in c:\android-sdk\tools. Obtained the odexed framework folder and placed that in the system folder. Then created a folder called app in the system folder and placed the Rosie.apk and Rosie.odex inside.
Then via cmd, entered the 'system/app' folder, so for me it was...
c:\android-sdk\tools\system\app
From there I ran the following command to end of that path: baksmali.jar -d ../framework -x Rosie.odex
This produced an out folder will all the decompiled .smali files etc. From there I was able to get to the Launcher.smali that i wanted, but to recompile to a classes.dex file you simply run the following command: smali.jar out
This produces an 'out.dex' that you can rename to 'classes.dex'
I am sure there are other commands that you can use to name files accordingly etc but this is what worked for me for what I wanted, so hopefully it will be of some help to people... if they can understand anything I've written.
jpool81 said:
Have successfully done what I wanted now
For info, this is what I did.
Created a new folder called 'system' in c:\android-sdk\tools. Obtained the odexed framework folder and placed that in the system folder. Then created a folder called app in the system folder and placed the Rosie.apk and Rosie.odex inside.
Then via cmd, entered the 'system/app' folder, so for me it was...
c:\android-sdk\tools\system\app
From there I ran the following command to end of that path: baksmali.jar -d ../framework -x Rosie.odex
This produced an out folder will all the decompiled .smali files etc. From there I was able to get to the Launcher.smali that i wanted, but to recompile to a classes.dex file you simply run the following command: smali.jar out
This produces an 'out.dex' that you can rename to 'classes.dex'
I am sure there are other commands that you can use to name files accordingly etc but this is what worked for me for what I wanted, so hopefully it will be of some help to people... if they can understand anything I've written.
Click to expand...
Click to collapse
If I needed to, how can I recompile back to Rosie.odex (for example). Do I just rename the out.dex file to Rosie.odex or is there another step to get it back to the original version. Here is why I am asking...I wanted to change a few lines in a file in the services.odex file. I deodexed it with the method explained above and now I want to put that file back on my device. Am I going about this the wrong way? Do I need to follow a different process to get it back to the services.odex file?
Thanks.
Could somebody possibly deodex this apk file for me, Ive been at it all day...
I'll be forever in your debit
Code:
http://speedy.sh/4dJ6f/deodex3.rar

( ADB Help ) how-to set ADB & Windows $Path

HOW-TO Fix **ADB is not recognized in the CMD**ā€‹
Navigate to & Left_Click on Start >
Right_Click on Computer >
Left_Click on Advance System Settings >
Left_Click on Environment Variables >
Left_Click on New ( User Variables ) >
Variables Name: ADB ( Or anything you want )
Variables Value: ;C:\SDK\tools ( Just like this, This is the Path of my adb.exe )
You must put a ; in front of ;C:\ ( adb Path goes here / Variables Value: )
That's it.. You now have set up adb to work Global via cmd prompt on win7
~Eugene
eugene373 said:
HOW-TO Fix **ADB is not recognized in the CMD**ā€‹
Navigate to & Left_Click on Start >
Right_Click on Computer >
Left_Click on Advance System Settings >
Left_Click on Environment Variables >
Left_Click on New ( User Variables ) >
Variables Name: ADB ( Or anything you want )
Variables Value: ;C:\SDK\tools ( Just like this, This is the Path of my adb.exe )
You must put a ; in front of ;C:\ ( adb Path goes here / Variables Value: )
That's it.. You now have set up adb to work Global via cmd prompt on win7
~Eugene
Click to expand...
Click to collapse
or you can just open up command prompt and cd^ (adb folder location)
thesparky007 said:
or you can just open up command prompt and cd^ (adb folder location)
Click to expand...
Click to collapse
or copy the exe and the needed dll's to system32
however when i type adb it better just work regardless of what folder I'm in...
If you are running .bat & a Noob it will never work.... Just follow the Directs posted in OP
Thanks OP for the tip.
This is the easiest way to start adb.
OK, so I don't know what I did wrong but I named the variable name to adb and then the variable value ;C:\Program Files (x86)\Android\android-sdk\platform-tools which is where my adb.exe is located. But if I open up a command prompt and do adb devices it says:
C:\Users\Tiffany>adb devices
'adb' is not recognized as an internal or external command,
operable program or batch file.
If I cd to that location adb works but I thought it would be cool to just open a command prompt and be able to use adb but it's not working for me. Any suggestions or do u see anything wrong?
Tiffany84 said:
OK, so I don't know what I did wrong but I named the variable name to adb and then the variable value ;C:\Program Files (x86)\Android\android-sdk\platform-tools which is where my adb.exe is located. But if I open up a command prompt and do adb devices it says:
C:\Users\Tiffany>adb devices
'adb' is not recognized as an internal or external command,
operable program or batch file.
If I cd to that location adb works but I thought it would be cool to just open a command prompt and be able to use adb but it's not working for me. Any suggestions or do u see anything wrong?
Click to expand...
Click to collapse
Tiffany, try this from a cmd prompt:
path = %path%;C:\Program Files (x86)\Android\android-sdk\platform-tools
then adb should work regardless of where you are in cmd
RyteSyde said:
Tiffany, try this from a cmd prompt:
path = %path%;C:\Program Files (x86)\Android\android-sdk\platform-tools
then adb should work regardless of where you are in cmd
Click to expand...
Click to collapse
AHH, You are awesome. That worked. So should I delete that variable that I added or just leave it there?
Edit: Ok. So it works when I add that path but if I close that prompt and then reopen and try to use adb with out adding that path again I get the error. So do I have to do that every time I open the command prompt?
Tiffany84 said:
AHH, You are awesome. That worked. So should I delete that variable that I added or just leave it there?
Edit: Ok. So it works when I add that path but if I close that prompt and then reopen and try to use adb with out adding that path again I get the error. So do I have to do that every time I open the command prompt?
Click to expand...
Click to collapse
No you shouldn't have to if you open the cmd window with admin rights and set the path=. Run cmd as administrator or use the posts above and edit the path variable and add a ; to the end of it and then the path to platform-tools
either way should work
and if you get that to stick you won't need the other variable you added before
RyteSyde said:
No you shouldn't have to if you open the cmd window with admin rights and set the path=. Run cmd as administrator or use the posts above and edit the path variable and add a ; to the end of it and then the path to platform-tools
either way should work
and if you get that to stick you won't need the other variable you added before
Click to expand...
Click to collapse
Ok, so I ran the cmd prompt as admin and it still won't stick. So your saying I need to add ; before C: and at the end of it? Sorry. Not the greatest with pc's. Thanks for trying to help though.
Tiffany84 said:
Ok, so I ran the cmd prompt as admin and it still won't stick. So your saying I need to add ; before C: and at the end of it? Sorry. Not the greatest with pc's. Thanks for trying to help though.
Click to expand...
Click to collapse
whatever is in your path variable, leave that and just add this to the end:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
RyteSyde said:
whatever is in your path variable, leave that and just add this to the end:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
Click to expand...
Click to collapse
I named it adb and then the blank spot for the value I just copied and pasted what u had and still nothing. I give up. I guess stuff isn't meant to be easy for me. Story of my life. Thank u so much for trying to help.
Tiffany84 said:
I named it adb and then the blank spot for the value I just copied and pasted what u had and still nothing. I give up. I guess stuff isn't meant to be easy for me. Story of my life. Thank u so much for trying to help.
Click to expand...
Click to collapse
I was referring to updating the system path. Where you created the variable, underneath that should be the "System variables" section. Scroll down in that the the variable "path" and double click it. Move the cursor to the end of the line entry and paste in the ;C:\...etc... line from above
RyteSyde said:
I was referring to updating the system path. Where you created the variable, underneath that should be the "System variables" section. Scroll down in that the the variable "path" and double click it. Move the cursor to the end of the line entry and paste in the ;C:\...etc... line from above
Click to expand...
Click to collapse
BAM!!!!!!!!!!!!!!!!!!!!! Thank u for not giving up on me even though I had. That did it. I"M giving u all my thanks for the day. Thank u again. I really appreciate it.
Tiffany84 said:
BAM!!!!!!!!!!!!!!!!!!!!! Thank u for not giving up on me even though I had. That did it. I"M giving u all my thanks for the day. Thank u again. I really appreciate it.
Click to expand...
Click to collapse
it's no root but glad I could help
RyteSyde said:
it's no root but glad I could help
Click to expand...
Click to collapse
Definitely not root but hey, still pretty cool.
Thread moved to General as not development, thanks for sharing though
I always wanted to know how to set adb so you can use it anywhere. Editing the path in the system variable worked for me. Thanks RyteSyde.
The right way to avoid weird issues.... [Noob Proof sorry in advance]
It actually works perfect if you just do the following:
1. Right Click My Computer -> Properties
2. On the left pane, Find and Click "Advanced system settings"
3. Under the "Advanced" Tab Find and Click "Environment Variables..."
4. In the box for "User variables for [your name here; e.g. David]" there will be a button that says "New..." Click it.
5. Now you have a box in front of you with two fields:
1. Variable name: entering path here is really safer and can help to avoid clogging up the environment namespaces (cluttering your ram/registry)
Code:
Path
2. Variable value: directory containing the adb.exe you want to use**; i.e.
Code:
C:\Android\sdk\platform-tools
**to find this with ease search for "adb.exe" or look for it in "...sdk\platform-tools\" or "sdk\tools".
**This is a version dependent thing for the Android SDK which folder its in.
6. Click OK on all the dialogs and exit the windows we opened here.
7. Hit the windows key + R and type cmd.exe; hit Enter
8. Type adb into the newly opened cmd window. hit Enter
9. If adb runs all is well. Your DONE. If not continue to step 10.
--If it work stop here!--
10. At this point we are going to select our entry from step 5. (in Environment variables...)and delete it. Otherwise windows has two pointers to our adb.exe.
11. Navigate in the "System variables" box and scroll down until you see Path in the Variable Column. Select it and Click "Edit..."
12. Click inside "Variable value:" go to the very end of this and drop a ";" no spaces. Enter the value from Step 5.2
13. Click OK/Apply on all dialogs and reboot your PC.
14. Repeat steps 7-9 and if all is well your done. If not you may need to redownload the AndroidSDK from here: http://developer.android.com/sdk/index.html then repeat this guide.
The reason for first trying to do this under "User" as opposed to "System" is if you need to track your changes to Path in case anything goes wrong as it can be a daunting task to go through the System version (its really full of stuff that needs to be there XD )
But don't take my word for it: My path
Code:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static
and my Windows is brand new Store-bought not OEM. It tends get get bigger the more stuff windows needs to globally keep track of that doesn't live in C:\Windows\
Hope this helped!
RyteSyde said:
whatever is in your path variable, leave that and just add this to the end:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
Click to expand...
Click to collapse
I could really use some help I have a windows vista 32-bit
The first time I tried to set up adb I messed up bad and deleted my original environment variable path
so now I can't even do it because I need my original environment variable path then ;C:\Program Files (x86)\Android\android-sdk\platform-tools
I didn't create a system restore point so I am screwed is there anyway I can recover my original environment variable path?
Grandkai said:
I could really use some help I have a windows vista 32-bit
The first time I tried to set up adb I messed up bad and deleted my original environment variable path
so now I can't even do it because I need my original environment variable path then ;C:\Program Files (x86)\Android\android-sdk\platform-tools
I didn't create a system restore point so I am screwed is there anyway I can recover my original environment variable path?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2317790
I would personally use this seeing it's one click go.

[Q] Some General Questions Regarding the editing of android.policy.jar

hello everyone
I have updated to kennethpenn's 4.5.91 Gingerbread Beta 4 (must say, it is truly a phenomally put together build !)
I have also noticed that many of the mods that i had applied to 1.8.3 have not been updated for 4.5.91, so i decided to make the changes myself.
Now, I have a pretty decent knowledge of Unix-based operating systems ( I have used Red Hat Linux, Ubuntu, SUSe Linux, OpenBSD, FreeBSD, Solaris, and now OS X) however, I would like to expand my knowledge to include Android.
The first one I attempted to do myself was the Wake on Volume Keys mod.
This is a very simple change to the android.policy.jar file, as you all well know.
For this, I used Windows XP, simply for the fact that I have 7zip and PeaZip installed on it. However, I can do all of this on OS X as well. The file archiver applications I have on OS X are:
1. The Unarchiver
2. Keka
I am going to list my method of applying this edit, and i would ask that someone with solid knowledge on this subject give me their feedback and guidance.
---------------------------------------------------------
My Method of editing android.policy.jar
---------------------------------------------------------
1. Using Root Explorer, I made a copy of /system/framework on my External SD Card
2. Mounting the Phone for USB Mass Storage on Windows XP that I have running in VirtualBox on my Macbook Pro, I moved the copy of the /system/framework directory to my Desktop
3. I downloaded smali-1.2.6.jar and baksmali-1.2.6.jar from code.google.com/p/smali/
4. I placed both of these .jar files in the copy of the framework-edited directory that I created on my Desktop
5. I renamed smali-1.2.6.jar to smali.jar and baksmali-1.2.6.jar to baksmali.jar for simplicity's sake
6. I moved the android.policy.jar file to /framework-edited directory on my Desktop
7. Using 7zip (I also have PeaZip, but for this, I used 7zip, if you think I should use PeaZip, please tell me) I extracted the files from android.policy.jar to end up with classes.dex and META-INF. I then moved classes.dex to /framework-edited so it is in the same directory as smali.jar and baksmali.jar
8. In Command Prompt, I entered:
Code:
cd C:\Documents and Settings\Owner\Desktop\framework-edited
in order to be working from the proper location where my files are located
9. Now, having Command Prompt working in the proper location, I entered the following commands:
Code:
java -jar baksmali.jar -o classout/ classes.dex
to create a new directory within /framework-edited called /framework-edited/classout
10. I then opened the /classout directory, and navigated to /classout/com/android/internal/policy/impl/ and opened the file KeyguardViewMediator.smali with Notepad
11. I used [Ctrl] + [F] to locate the line:
private isWakeKeyWhenKeyguardShowing(I)Zā€‹
12. I then looked at the lines DIRECTLY below the above line, and following the Original Post on how to manually apply this modification, I removed lines:
0x18
0x19ā€‹
13. Upon removing these lines, I simply did a File -> Save As -> KeyguardViewMediator.smali and saved the file to my desktop
14. I [Cut] + [Pasted] the edited KeyguardViewMediator.smali file back to /classout/com/android/internal/policy/impl/ and replaced the original KeyguardViewMediator.smali file
15. With the edited KeyguardViewMediator.smali file in place, I went back to Command Prompt and entered the following commands:
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
To create a new file called new-classes.dex
16. Changing the name of new-classes.dex to classes.dex, I took the original META-INF file, and my newly created classes.dex files, and, using 7zip, created a new android.policy.zip archive
17. I renamed my newly created android.policy.zip to android.policy.jar, and transferred it to my External SD Card
18. Using Root Explorer, I navigated to /system/framework on my phone, and renamed android.policy.jar to 1122android.policy.jar.bac and [Copy] + [Pasted] my edited android.policy.jar to /system/framework
19. I then immediately powered off my phone, and rebooted into CWM Recovery, and cleared my Dalvik Cache, then rebooted the phone normally through CWM Recovery.
At this point, to my knowledge, I had successfully edited my android.policy.jar file and had manually added the Wake on Volume Keys modification, however, once the phone was fully booted and showing my lockscreen, I unlocked the phone as normal by sliding the slider to the right. As soon as the phone unlocked, I saw pop-ups for processes that had failed and were terminated. I'm not sure what the exact message the pop-ups had, but it was the normal pop-up message you get when a process force-closes. My only option was to click "Ok" so I clicked it, only to have another force-close pop-up.
Apparently, every single process on the phone had force-closed, BUT, the phone was waking when I press a volume key while the screen was off. I had no choice but to pull the battery out.
I decided to reboot into CWM Recovery and "install .zip from SD Card", Nottach's 1% Battery Mod / No Carrier Mod Uninstall Script
I installed Nottach's uninstall script because I hoped that it had an unmodified copy of android.policy.zip in it.
After installing the uninstall script, and rebooting the phone once again, I got to the lock screen, unlocked the phone, and found everything to be in perfect working order, just as before I edited anything,
But the Wake on Volume Keys mod was still applied!
So now, my questions / requests to all of you are:
1. Explain to me what I missed or did wrong that resulted in the force-closure of every single process on the phone prior to installing Nottach's Uninstall script
and
2. Educate me on the proper process that you developers use to apply small modifications such as this one to the android.policy.jar file, or any other related file on the phone for that matter.
My plan is now to change the color of the text on my lock screen (Clock, Date, and possibly Carrier) following this [Guide]
Any and all feedback is welcomed and greatly appreciated, as you will be helping me learn the beginnings of modding and developing
bump . . . . .
Perhaps this may help
http://forum.xda-developers.com/showthread.php?p=18226553

[Q] Apktool problem

I want to decompile some system apps and I can't even get apktool to work. I installed java jre and jdk both and I get the following error in cmd:
Java is not recognized as an internal or external command
So I set my environmental system variables for Java on my windows xp computer as shown below:
View attachment 2825945
But I still get the same error as before! I need someone to please help me figure this out before I get even more frustrated!
Make sure you have installed apktool correctly
Windows:
Download The Following From Here
apktool1.5.2.tar.bz2
apktool-install-windows-r05-ibot.tar.bz2
Unzip both files with winrar and put the contents (there should be 3 files) in C:\Windows
if you have java jdk installed you should be able to type apktool and hit enter at the command prompt and if installed it will give you all the options for apkool
Linux:
Download apktool-install-linux-* file
Download apktool-* file
Unpack both to /usr/local/bin directory (you must have root permissions)
Mac OS X:
Download apktool-install-macos-* file
Download apktool-* file
Unpack both to /usr/local/bin directory (you must have root permissions)
did everything still not working
I Followed this guide here which is very similiar: http://androidforums.com/esteem-all-things-root/520917-guide-how-properly-decompile-recompile-apks-apktool.html
I stopped at installing framework because CMD would not let me be able to do so!
Any other advice?
I really need to get this working!
Thanks for your help!
JT1510365 said:
I Followed this guide here which is very similiar: http://androidforums.com/esteem-all-things-root/520917-guide-how-properly-decompile-recompile-apks-apktool.html
I stopped at installing framework because CMD would not let me be able to do so!
Any other advice?
I really need to get this working!
Thanks for your help!
Click to expand...
Click to collapse
what version of apktool are you using? maybe the apktool doesn't support it.. download de jar and the appt http://forum.xda-developers.com/showthread.php?t=1755243 , open the cmd window holding shift+ right button where the apktool is placed

Up to Date ADB and Fastboot [Mac]

Welcome
I was trying to unlock the bootloader for my Nexus 6P, but the commands were not working. I had to update the files for adb and fastboot, but it finally worked with the new command "fastboot flashing unlock" . So I have uploaded a zip with the up to date files so you guys can also use adb and fastboot.
If you haven't set up your fastboot/adb here is a quick guide on how to set it up easily.
---Guide---
1. Unzip the file, and copy the adb folder to your preferred destination.
2. Open up terminal and type : nano ~/.bash_profile
3. Use the path of the folder and add this line (replace kingmikel with your username, and replace Documents with your path) : export PATH=${PATH}:/Users/kingmikel/Documents/adb
Credits: @AshtonTS and his thread http://forum.xda-developers.com/showthread.php?t=1917237
Is there some reason to not do this with the SDK?
crachel said:
Is there some reason to not do this with the SDK?
Click to expand...
Click to collapse
This is easier. You don't have to download Java and then download the SDK.

Categories

Resources