Help work out bugs in CM9/10/sense4/aokp- smali/baksmali and more to come.. - HTC Amaze 4G

How can I contribute to development?
Post #1 is a tutorial for how to decompile/recompile jar files to help with the project.
Post #2 will have information on how to pull a proper logcat and how to post your logcat
___________________________________________________________________
I'll write up a quick little guide for smali/baksmali that can be used with the previous resource I posted.
First, windows will work just fine. You will have to install the java JDK(not sdk, you can have both however), this is straightforward, just google and follow directions.
Next, download http://smali.googlecode.com/files/smali-1.3.2.jar and http://smali.googlecode.com/files/baksmali-1.3.2.jar (both are also attached)
If you can already type "adb" in the command prompt of windows, then the path was set for the tool.. find where you have ADB at, and paste those files into the same directory. If not follow the directions in the following quote, except you will be putting the above downloaded files in the directory you chose.
There's two simple ways to get there:
1 way = click Start > Control Panel > System icon.
2nd way = click the Start button, right-click “My Computer”(Computer for Vista/7) and select “Properties”.
If your using XP, your there. If your using Vista/7, click on Advanced system settings on the left side.
You should now be in the System Properties window.
Click on the Advanced tab.
Click on the Evironment Variables... button
In the System variables(lower box), scroll through the list until you see Path under the Variable column.
Click on it to highlite it, click on the Edit... button.
We are going to add our path to adb, where we installed the SDK, in the Variable value: box.
Make sure your cursor is at the end of the last entry, and type this:
;C:\android\tools\
Click to expand...
Click to collapse
Press the windows button or click start button, type cmd and press enter(to open command prompt), and type "java -jar baksmali-1.3.2.jar -o out/rogers/dexout/rogers-classes.dex" and see if the error it gives you shows you that there is no "rogers-classes.dex" file, if so then you've done everything right thus far.
Now you should look at the resource I had posted before, so you don't have to search, here it is again http://rootzwiki.com/topic/19262-protip-getting-data-working-on-that-epic-port-you-just-did/
For this example, look under where it says "Data:", I am going to do what it says for the framework.jar file. Jar files are basically zip files, rename framework.jar to framework.zip, then unzip it with whatever program you use, making sure you know where it is located. Do this for BOTH the cm9 rom, and also with the stock rom(we should be able to use any rom we currently have, ARHD, energy, speedrom, etc). I would name the stock rom zip folder "base" and the cm9 zip folder "port", so you can keep track easily.
If you have followed along this far, you will have a file called classes.dex, this will be what we are decompiling for both cm9 and stock, then we will copy files as needed, and recompile just the cm9 classes.dex, so again, pay attention to which is which, and what the path is. Ignore the other file that was unzipped for now, just know when you rezip it, you have to replace the original classes.dex file and zip it up with the other file that it was unzipped with.
So lets say this is the result, I have a folder c:\android\porting\base folder that contains a classes.dex file, and a c:\android\porting\base(I renamed the unzipped folder after I unzipped each) that also contains a classes.dex file.
Here is a post that explains what we are about to do if you need a reference. http://forum.xda-developers.com/showpost.php?p=4152564&postcount=2
To decompile(if you correctly installed the java jdk and set the path correctly for baksmali/smali) you would type this in:
Code:
java -jar baksmali-1.3.2.jar -o out/base locationOFyour/classes.dex
the "out/base" is where it will put the output files, in a directory called OUT in your USER folder. Quick protip if you are unsure how to type in the location of the classes.dex file, just type in "java -jar baksmali-1.3.2.jar -o out/base" and then DRAG the classes.dex file from your file explorer to the command prompt window, and IT will put the correct path(it should be something like ~/android/porting/base if I remember correctly). I am working on OSX, so you may have to do this if the example isn't helpful enough. Protip #2: Write all this $h*t down! Create a text document with every step you do, then you can just copy/paste the line above, and modify it as needed- this also helps keep track of what you are doing- aka a changelog.
If you followed protip #2 above, copy the same command you just typed in, but change where it says "base" in the path, to "port". If you have two folders in your OUT folder, one called base, and one called port, you have done everything correctly thus far.
Since this is an example, this is what the resource I posted above on rootzwiki says to do with the result output files:
android/net - the ConnectivityManager classes and interfaces as well as all the NetworkStateTrackers.
android/telephony
com/android/internal/telephony
Click to expand...
Click to collapse
So basically I am just copying everything from the above folders from my BASE, to the PORT, overwriting each file in the port. Once done, you will type this:
Code:
java -Xmx512M -jar smali-1.3.2.jar out/port -o new-classes.dex
This is because we are recompiling the files in our PORT, and it will create a file in the root of your USER folder called new-classes.dex. Rename the file classes.dex, unzip the CM9 framework.jar and replace the original classes.dex, rezip it, then rename framework.zip to framework.jar.
This concludes the tutorial. Once you have everything setup, if you follow protip #2, the matter of baksmali/smali is a quick copy/paste into command prompt, so modifying a jar file will take less than 5 minutes. Push the resulting jar file into the appropriate folder on your phone, reboot your phone, run a logcat(I have a good guide linked in the BIBLE in my signature how to logcat like a pro), and see if data(for this example, you could be working on GPS or whatever) is working any better.
Protip #3: You've just learned quite a bit, the same can be done to most apk's- rename whatever.apk to whatever.zip, unzip it, then baksmali the resulting classes.dex file- this is how many programs are backported to older versions of android, hacked, etc. If you want to see the simple edit that was made to the ext.jar using this same process that got data working, you can see it here: http://forum.xda-developers.com/showpost.php?p=25786037&postcount=13
If anyone wants to try to push the file I just created and attached, feel free.. if you have major issues, create a logcat, if not, post your result. My changelog:
In android/net I copied over ConnectivityManager.smali and each file beginning with "NetworkState"
In android/telephony I copied over all the files
There was no com/android/internal/telephony directory, so it was skipped
Click to expand...
Click to collapse
This is all I have time for at the moment, I have to go to work soon so I cannot test the file.. this tutorial took a bit to do, so I am hoping someone at least gives it a try to make it worth my time. I can give some assistance, but would prefer that if it is something you can figure out on your own with some basic googling, please do so.

I will update on different methods to pull a proper logcat in the near future, for right now please post what rom you are on, and what you expect the log to contain such as "I was enabling data"..

Also reserved just in case

As posted in the previous thread, there are probably 250+ more constants in the base rom than there is the in the cm9 RILConstants.smali file. Are these the kinds of glaring differences we need to look for, or is this just the difference between sense/aosp...
I'm pushing your framework.jar and seeing how it works out. I'll get back to you in a moment.
Just boot loops...

Hey, just wanted to throw this out there. I found an amazing studio that makes digging around in apk and jar files incredibly easy to do.
You can check it out here - http://www.virtuousrom.com/p/ten-studio.html
I haven't tried any jar files with it but it says they are supported. Might be worth checking out.

Ok I just tried switching it our with your framework.jar and it got to upgrading the 82 apps now it's stuck in a bootloop after that

Sure wish we could get some if those Kats over here. The virtuous team always had something cool for the g2
Sent from my HTC_Amaze_4G using xda app-developers app

craigtut said:
Hey, just wanted to throw this out there. I found an amazing studio that makes digging around in apk and jar files incredibly easy to do.
You can check it out here - http://www.virtuousrom.com/p/ten-studio.html
I haven't tried any jar files with it but it says they are supported. Might be worth checking out.
Click to expand...
Click to collapse
Yep, I saw that and saved it to my read it later account.. but I never even boot into windows anymore, lol. If someone wants to try it out, if it streamlines things.. would definitely be pretty awesome. I didn't know it did jars, I thought it just did apks.
Learning how to do it still has its own value I think tho Thanks for sharing craig
bos2333 said:
Ok I just tried switching it our with your framework.jar and it got to upgrading the 82 apps now it's stuck in a bootloop after that
Click to expand...
Click to collapse
I noticed afterwards that I included a few too many files, I should have done just the one file rather than 3.. I think we will have much more success by making single changes, seeing if it improves things, or at LEAST continues to boot, rather than making broad sweeping changes.
Even if it gets stuck in a bootloop, see if it will post a logcat, the errors it puts out will help figure out what was too much.
Also, I think the mentioned guide would be MUCH more direct for porting sense4- as both have all proprietary htc files, and therefor the different flags in the smali file will help a ton.. as far as porting cm9, we will likely have to be much more concise about the changes- it likely won't take much, just a few changes here and there.

bos2333 said:
Ok I just tried switching it our with your framework.jar and it got to upgrading the 82 apps now it's stuck in a bootloop after that
Click to expand...
Click to collapse
Here's the logcat from replacing framework.jar with the one you supplied...I had to zip it though because it's too big apparently

Silentbtdeadly said:
Yep, I saw that and saved it to my read it later account.. but I never even boot into windows anymore, lol. If someone wants to try it out, if it streamlines things.. would definitely be pretty awesome. I didn't know it did jars, I thought it just did apks.
Learning how to do it still has its own value I think tho Thanks for sharing craig
Click to expand...
Click to collapse
i guess ill give it a go

ill mess with it too once i get my straight talk plan. (cause right now i dont have a plan so i cant check data )

you can use Winrar to extract .jar files so you don`t have to rename to .zip http://www.rarlab.com/download.htm download it here

Ok, so again, very new to this...I just merged the 4 MobileDataStateTracker files from Android/net from speedrom 5.1 to the cm9...same thing, boot loops.

bos2333 said:
Ok, so again, very new to this...I just merged the 4 MobileDataStateTracker files from Android/net from speedrom 5.1 to the cm9...same thing, boot loops.
Click to expand...
Click to collapse
Then you likely have the cause of the original boot loop. Two things you can do, check the logcat - it may tell you something useful.. another thing to do is get software to compare the files, I think for windows there's a free one called winmerge... The output files are usually text, and you may see some specific lines that would help us from the stock file and change those(things relating to data), leaving everything else alone.
Someone recently posted how to do a log for data errors, but I have a really good tutorial in the bible in my signature, logcat like a pro.
Sent from my HTC_Amaze_4G using xda app-developers app

i'm trying to learn my ways around the android ecosystem... please correct me if I have any incorrect info below
bascially, what you're doing for this tutorial is trying to decompile and debug problems, only going up to the assembly level (smali)
jar/apk = container like a zip... contains resources like compiled binaries and images etc
dex = compiled binary for the android system
you first disassemble the dex files to smali ("assembly") files
-> a developer here would make changes to the smali... lets say you don't make any
you reassemble back to dex, gather it into a jar/apk file to put on the phone
-------------
for porting a phone to use CM9/10/aokp, you basically use the base CM9/10/aokp system, copy over relevant jar/apk, and debug to fix any problems (like function calls, data etc)?
using logcat, you can see where function calls fail (or when you have a exception), and then try to fix it?
how good is debugging? basically you can see most of the source code?
would it be also possible to go dex->smali->java? like this post, though it says its not ideal either http://stackoverflow.com/questions/5582824/decompile-smali-files-on-an-apk

Silentbtdeadly said:
Then you likely have the cause of the original boot loop. Two things you can do, check the logcat - it may tell you something useful.. another thing to do is get software to compare the files, I think for windows there's a free one called winmerge... The output files are usually text, and you may see some specific lines that would help us from the stock file and change those(things relating to data), leaving everything else alone.
Someone recently posted how to do a log for data errors, but I have a really good tutorial in the bible in my signature, logcat like a pro.
Sent from my HTC_Amaze_4G using xda app-developers app
Click to expand...
Click to collapse
Yeah, I attached a logcat last page and looked at it, saw the errors. I'll do some searching tomorrow to see if I can work my way through some of them.
Sent from my HTC Ruby using xda app-developers app

paperWastage said:
i'm trying to learn my ways around the android ecosystem... please correct me if I have any incorrect info below
bascially, what you're doing for this tutorial is trying to decompile and debug problems, only going up to the assembly level (smali)
jar/apk = container like a zip... contains resources like compiled binaries and images etc
dex = compiled binary for the android system
you first disassemble the dex files to smali ("assembly") files
-> a developer here would make changes to the smali... lets say you don't make any
you reassemble back to dex, gather it into a jar/apk file to put on the phone
-------------
for porting a phone to use CM9/10/aokp, you basically use the base CM9/10/aokp system, copy over relevant jar/apk, and debug to fix any problems (like function calls, data etc)?
using logcat, you can see where function calls fail (or when you have a exception), and then try to fix it?
________________________________________________________________________________________________
how good is debugging? basically you can see most of the source code?
would it be also possible to go dex->smali->java? like this post, though it says its not ideal either http://stackoverflow.com/questions/5582824/decompile-smali-files-on-an-apk
Click to expand...
Click to collapse
Everything above the line=yes(ish). That is a fair explanation of things. If you mean how good is the debugging on smali'd files.. you should do it to some and find out
I'm not sure I understand what you mean by dex>smali>java.. dex is the compiled, smali is decompiled, it can't be more decompiled than smali to the best I can see. What that link you posted was talking about was different tools to get the job done- some can be helpful, tho many don't work properly with ICS as of yet.
Sorry if my answers are unclear, I wasn't sure of the questions perhaps..

So there are some smali edits in this miui4 porting guide that can be looked at to help understand how/what files matter.. furthermore, all ril specific edits could be looked at for our phone http://forum.xda-developers.com/showpost.php?p=28885450&postcount=2
Also, the third post has some great info on debugging and reading logs.. http://forum.xda-developers.com/showpost.php?p=28885450&postcount=3
That entire guide is extremely comprehesive, and the language isn't more complex than what you are already doing, so you will learn quite a bit. I may pull relevant info from that guide to the second post when I have more time.

Silentbtdeadly said:
Everything above the line=yes(ish). That is a fair explanation of things. If you mean how good is the debugging on smali'd files.. you should do it to some and find out
I'm not sure I understand what you mean by dex>smali>java.. dex is the compiled, smali is decompiled, it can't be more decompiled than smali to the best I can see. What that link you posted was talking about was different tools to get the job done- some can be helpful, tho many don't work properly with ICS as of yet.
Sorry if my answers are unclear, I wasn't sure of the questions perhaps..
Click to expand...
Click to collapse
my question is whether we decompile all the way back to the Java source instead of stopping at the assembly(smali) stage
from doing more searching, it looks like you might be able to get readable Java source code, but you can't recompile them as it'll be incomplete and as you said might not work on ics
I assume one would need to to flash the cm9/10 and then get those logcats

Silentbtdeadly said:
Then you likely have the cause of the original boot loop. Two things you can do, check the logcat - it may tell you something useful.. another thing to do is get software to compare the files, I think for windows there's a free one called winmerge... The output files are usually text, and you may see some specific lines that would help us from the stock file and change those(things relating to data), leaving everything else alone.
Someone recently posted how to do a log for data errors, but I have a really good tutorial in the bible in my signature, logcat like a pro.
Sent from my HTC_Amaze_4G using xda app-developers app
Click to expand...
Click to collapse
Ok, so I tried again this morning by only adding "HtcMobileDataStateReceiver.smali" to the port in the android/net, and I got the boot loops again. Checked the logcat and found this...
I/ServiceManager( 144): service 'media.audio_flinger' died
I/ServiceManager( 144): service 'media.camera' died
I/ServiceManager( 144): service 'media.player' died
I/ServiceManager( 144): service 'media.audio_policy' died
I/Netd ( 496): Netd 1.0 starting
D/AndroidRuntime( 497):
D/AndroidRuntime( 497): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
D/AndroidRuntime( 497): CheckJNI is OFF
I/dalvikvm( 497): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
D/dalvikvm( 497): Unable to process classpath element '/system/framework/framework.jar'
I/ ( 498): ServiceManager: 0x1293958
E/JNIHelp ( 497): Native registration unable to find class 'android/debug/JNITest', aborting
Any ideas? It seems like it's not taking my new classes.dex file for some reason.

Related

[HOWTO] Theming your Sense framefork for newbies

It's not much, but I thought everyone should be able to theme their Legend
Requirements: WinZip(or any other zipping program), Android SDK, testsign, some graphics editor...
So what you need to start with is your framework files:
framework-res.apk, com.htc.resources.apk ... both are located in SYSTEM:framework/
These files are just renamed zip files, so rename them back to .zip and extract them (you can also edit them inside WINRAR or something, but it is more comfortable if you extract them)
In these, images are usually saved in res/drawable-mdpi or such, but you have to think here, allways modify all files from one resource
Now locate the images you want to edit but I only know how to edit .png files (.9.png files are for a different howto, probably not by me as I've never really mastered it)
Pick those you want to edit, and edit them (I'm not gonna tell you how here, I usually use photoshop to do that )
Once you have edited those images, it is recomended to optimize those png's (Firstly to make them smaller, but more importantly, most of the times the png's from Windows graphics editor didn't work for me...)
To optimize png's you can use:
OptiPNG: DOWNLOAD This one is drag'n'drop batch conversion capable...
Pngcrush: DOWNLOAD Command line utility, but it has more settings
...or something else, but I find these two the best
Once you have these optimized, copy and re-write them to folders you took them from to edit...
Now you need to zip these back, for framework files I was told it is usual to zip them as "store", but correct me someone if I'm wrong.
After you have zipped those, they will have to be re-signed. To do this, use testsign from code.google.com
Then run this in cmd line (or create a .bat file as I did, it's much easier):
Code:
java -classpath testsign.jar testsign [COLOR="DarkRed"]file.zip[/COLOR] [COLOR="DarkRed"]file-signed.zip[/COLOR]
Now that you have signed it, it is recomended to zipalign it:
(zipalign.exe is located in /tools in your SDK)
Run this in cmd line:
Code:
zipalign 4 [COLOR="DarkRed"]infile.zip[/COLOR] [COLOR="DarkRed"]outfile.zip[/COLOR]
(4 is alignment in bytes)
Now that you have aligned the .zip, rename it to the original name and then you just need to push it back to your phone:
Code:
adb shell mount /system
adb push [COLOR="DarkRed"]com.htc.resources.apk[/COLOR] /system/framework/[COLOR="DarkRed"]com.htc.resources.apk[/COLOR]
or
adb push [COLOR="DarkRed"]framework-res.apk[/COLOR] /system/framework/[COLOR="DarkRed"]framework-res.apk[/COLOR]
And you're done
I hope this helps someone! Enjoy!
note: This way you should be able to modify any apk I think
Is this the thing that has the potential to break the power menu in BlaY0's ROM, among other things?
Amongst other things...but this works on any ROM as long as you follow the guide I've succesfully ported my BattMod and Cryshop's navbar/lockscreen to B0.8 while doing these exact steps
Dr.Romca said:
Amongst other things...but this works on any ROM as long as you follow the guide I've succesfully ported my BattMod and Cryshop's navbar/lockscreen to B0.8 while doing these exact steps
Click to expand...
Click to collapse
can you post them?
stegg said:
can you post them?
Click to expand...
Click to collapse
Why? He gave you quite simple instructions on how to construct it yourself, so he wouldn't need to do that for every single release for any of you.
Sent from my HTC Legend
Right on I think it's simple enough...besides, I had to figure this all out myself...
It's nice when people use that round head sitting on their neck
BlaY0 said:
Why? He gave you quite simple instructions on how to construct it yourself, so he wouldn't need to do that for every single release for any of you.
Sent from my HTC Legend
Click to expand...
Click to collapse
you have some personality disorder, you'd better see someone specialised in mental health care
stegg said:
you have some personality disorder, you'd better see someone specialised in mental health care
Click to expand...
Click to collapse
I will do that as soon as you contribute at least one theme for three different roms and then supply new updates for every new release of those roms...
Sent from my HTC Legend
stegg said:
you have some personality disorder, you'd better see someone specialised in mental health care
Click to expand...
Click to collapse
Oh come on stegg, that was uncalled for I just think it's a better idea to share how I did it rather then do all the work for you. Hell it would be a full time job - making themes for everyone
...too bad there isn't a "what the hell?" button ...
Question ; are there any limitations to what you can port like different functioning slide bar / nav bar?
Sent from my HTC Legend using XDA Premium App
This howto only tells you how to replace png's inside those framework .apk packages. And you can change navbar as well, but you'd have to make it in the same shape as long as you don't want to decompile the apk...
Cool thanks, I'm giving this a go now
Sent from my HTC Legend using XDA Premium App
I guess my device has to be rooted to do this?
You are correct, sir
Damn...

[Q] Making updater-script... doesn't make any sense!!

I was tying to make a fancy updater-script for an add-on for my ROM, but I kept getting a Status 6 error when flashing, so I stripped it back to nothing, just the most basic commands, and eventually got it to work. I made a copy, tried editing it to add the fancy stuff back in... broke again.
So I stripped the copy back to the basic commands... and it still breaks .
As far as I can see, the two files I have attached are identical in every single way, but one fails with a Status 6, the other flashes (BattMod works, update doesn't). Both are edited using gedit on Ubuntu, both zips are created in Ubuntu, neither are signed.
Can anyone see why, I am really tearing my hair out here... all I want to do is add some ui_prints and some progress bars .
I haven't looked it them yet, but make sure you are using the correct update-binary. Different ones support different number of parameters in the mount command.
Don't leave junk files in the update like updater-script.old, it's bad practice
My guess would be that since it's named update.zip, it's looking for a signature and it can't find one. Try renaming update.zip to battmod.zip and see if it works, or sign it first with testsign.
l0st.prophet said:
I was tying to make a fancy updater-script for an add-on for my ROM, but I kept getting a Status 6 error when flashing, so I stripped it back to nothing, just the most basic commands, and eventually got it to work. I made a copy, tried editing it to add the fancy stuff back in... broke again.
So I stripped the copy back to the basic commands... and it still breaks .
As far as I can see, the two files I have attached are identical in every single way, but one fails with a Status 6, the other flashes (BattMod works, update doesn't). Both are edited using gedit on Ubuntu, both zips are created in Ubuntu, neither are signed.
Can anyone see why, I am really tearing my hair out here... all I want to do is add some ui_prints and some progress bars .
Click to expand...
Click to collapse
With what are you editing it?
I've found out that editing it with notepad or any program won't work even if i'm using the right commands, so i decided to use amend2edify, you select an update-script (an update-script you can edit it with notepad without any problem) and it converts it into updater-script, updater-binary, but you have the possibility to edit anything in the output that you want and save it, or just copy-paste into the output the commands in your updater-script onto output by overwriting the converted output.
Don't know if i explained myself well.
Good luck
Try This One
Blank-CWM.zip
It's made for the Moto Photon, so you will need to:
1) Replace the update-binary with one from your phone.
2) Copy the file you wish to flash
3) Delete the txt files in it as well as any folders that you do not need to use in the process of flashing
4) Be sure to set the permissions to target the folder or file you are flashing. If you do NOT update this, you will end up in bootloops (Don't say I didn't warn you)
5) Flash away
Cheers!

Theming Guide Help.. These are the things I dont see How-Tos for.. plus some thoughts

This guide will assume the basics (image editing, apk manager setup, adb, etc..) are understood. Minus 9png's, I will go over that. The point is to have a base here for discussion on how to edit things properly. If anyone has something to add, please do.
OK, lets start with something that caught me off guard when switching to a phone with blur... there are certain apps that have dependencies. You have to set those dependencies up. The easiest way to do this is, from whatever ROM you are running, open the zip up with 7zip. Also open up your APK Manager and go into the "other" folder. From your ROM grab framework-res.apk, blur-res.apk, moto-res.apk, settings.apk and systemUI.apk and copy them into the "other" folder. Once there, open up a command prompt. change directories until you are in the "other" folder. Once there do this for each item. apktool d framework-res.apk and hit enter. Then, apktool if framework-res.apk. Do that for the rest.
9pngs.. Everyones afraid... they are a walk in the park. 1 extra step and its done. Decompile your apk, Edit it to your liking and save it. Open it up with draw9patch and add the guides back in and save it. The right and the bottom just make a big ass black line from one side of the image to the other (most of the time). The left and top side require a little fine tuning. Basic rule is to stick a dot in "the middle". Over on the right, see if it looks right. If it doesn't, adjust it. Once done, save it. Recompile and you are done. If using apk manager 4.9 or newer, make sure you delete the images you edited in the keep folder.
Editing xmls....
You are going to be editing xmls to either change background color or text color. Heres a general rule that will help... open the xml in notepad++ and hit ctrl +f. search for android:background .... you can change whatevers there to a hex color. like, if you wanted a dark red.. #ffbc1010. if changing text colors, do a search for android:textColor. Do the same thing with searching and changing.
Some edits will be found in the values folder... this would either take place in Colors.xml, drawables.xml or styles.xml
As I have found, some xmls just dont have a call to a bacground or text color so.. you just have to make one yourself. I always stick those in right after the androidrientation stuff. For example, you want a red background and nowhere in the xml can you find a spot to change it. No worries.. add this... android:background="#ffbc1010" . Good to go.
Some apks wont decompile with apk manager 5.01. You get an out of bounds error. Use apk manager 4.9 for those.. it will open them.
If you try to install an app and something doesnt work.. 1 minor thing, even though the rest does work.. do not try to install another re-edit until you have gone back to a fully functional version. Otherwise, none of your new edits will take hold even if they are correct. (Learned that one the hard way)
Remember, trial and error siis the Android Way!!!
Lastly, I leave you with this... each app has its own "fun-ness" to it. If you are ever stuck and need help, please feel free to ask. I can't do magic.. like looking at Sense... cause I dont have it.. but if you are running GB stock, Blur or its just an app for any phone.. please ask. I will answer, even if I dont know the answer and we have to work together to figure it out.
This is my contribution to XDA. Let's keep progression moving forward. I want to see more themers and more options!!!!
EDIT:
NEW INOFRMATION
I copied this over from my how to on DF... The links are probably still good (I just updated them) but just make sure you are getting the latest version... I wrote the how-to in January.
Since I see a lot of people trying to figure out how to get into theming and such, might as well share my knowledge...
I would also like to thank Devildog8791 and say that he went thru and added a lot to this via PM (which I then pasted here). He also made it a lot more detailed and easier to follow along for everyone.
Things you will need:
-APK Manager located here. It is the one from post #226. It uses apktool version 1.3.1 instead of the newest one, 1.3.2. The new version has some bugs that have not been worked out yet.
-Android SDK located here. There are two different files for Windows: a zip file and an .exe file. I downloaded the zip file, but you can try the .exe file.
-7zip located here. Make sure you pick the right installation for your setup (32-bit or 64-bit)
-Java JDK located here. Make sure you pick the right installation for your setup (32-bit or 64-bit)
Before I begin, please keep in mind that this is just how I did it. Maybe it's perfect, maybe its wrong, BUT... it worked for me.
NOTE: PLEASE READ THIS
Unless you are going to be pushing apks to your phone or pulling them directly from the phone, you do NOT need to bother with steps 3-6 and 9-11. You also only need to add the Java stuff to your Environment Variables.
OK here is how I set all this up and in the order that I did it.
1) Install the Java JDK. You probably don't need to, but I rebooted after the installation was complete.
2) Install 7zip.
3) Extract the android SDK file and move the extracted folder to the root of the C: drive. I renamed the folder "androidsdk", but you can rename it whatever you want. On my computer, the SDK is at C:/androidsdk (whatever you name this and anything in its filepath, make sure there are NO SPACES).
4) Go into your sdk folder and run "SDK Manager".
5) When the "Android SDK and AVD Manager" screen opens up, select "Available packages". Select the packages you want to install and click on "Install Selected". If the "Choose Packages to Install" screen comes up automatically, then select "Accept All" and click "Install". This will take a few minutes. Go ahead and get a drink and stretch your legs.
6) When your packages get done downloading and installing, close the "Installing Archives" and the "Android SDK and AVD Manager" screens.
7) Extract the APK Manager zip file and move the extracted folder to your user file. Mine is located at C:\Users\Tim\apk_manager_4.9.
8) Now you need to set your environment variables. To do this, click on "Start" and then right click on "Computer". Left Click "Properties" and in the left pane you will see "Advanced system settings". Click on that and it will open up a new window called "System Properties". Click on "Environment Variables" at the bottom of the screen.
9) Now that you are in the Environment Variables screen, you want to look at the top part of the screen first. Under "User variables for <your name here>", click on "New...".
10) In the "Variable name" section, type in ADB.
11) In the "Variable Value" section, type in C:\androidsdk\platform-tools\adb.
12) Now go to the bottom part of the screen and find "Path" on the left side under "Variable".
13) Double-click that "Path" section and it will bring up the edit screen.
14) Go to the end of the "Variable value" section and add the following: ;C:\Program Files\Java\jre6\bin;C:\Program Files\Java\jdk1.6.0_23\bin;C:\androidsdk;C:\androi dsdk\platform-tools;C:\androidsdk\tools. Verify that the bin file locations for java are in the same place as indicated here. They should be the same, but check it to be safe. Also, don't forget to change the name to whatever you named your sdk folder. One last thing is to make sure you have a semi-colon in between each path as indicated.
15) Click "OK" when done and close all the windows.
16) Reboot your computer.
Now that you have your environment variables set, you should be good to go to use APK Manager. One thing that you might have to do is set up your adb drivers for your phone. I have a Droid Incredible and I went to this site to get mine set up. If you have a Motorola Droid 1 (which most on this site do), then it should set up with the proper drivers when you plug it in the computer. My wife has a Droid 1 and that is what happened for me.
So, now you have 7zip, SDK, Java and APK Manager installed, setup and ready to use. Fantasmagorical!
Great, now, what the hell do you do with it...lol
1) You decide on an apk file (let's choose phone.apk) to use. You can grab it from the stock ROM your using, pull it off your phone, whatever...
2) Now that it is on your computer, move it into the APK Manager's "place-apk-here-for-modding" folder.
3) Run the script.bat and select option 22. Then choose the apk (project) you want to work with.
4) Now select option 9 to decompile the apk.
5) Once that's done select option 11 to recompile the apk. If it asks you if it's a system app (y/n) then you are in business. If it says there is an error, it is most likely that the apk has some .9.png images without guides. If this occurs, grab the stock images and stick them in by using 7zip and choose "open archive".
6) OK, so it works fine, now what? Just choose "N" and when it's done, go to the "place-apk-here-for-modding" folder and delete the "unsignedphone.apk" file.
7) Now go back to the script and choose option 9 to decompile again.
8) Once it's decompiled, navigate to the "projects" folder and go into the phone.apk folder.
9) Make all your xml edits.
10) Now, go back to the script and choose option 11. Choose "Y" and then choose "Y" again.
11) Now, go into the "KEEP" folder and delete the resources.arsc file and also delete every single xml you edited. Then go back to the script and "press any button to continue".
12) Once that is done, you are done. Go into the "place-apk-here-for-modding" folder and you will see an unsignedphone.apk file.
13) Put it in an update.zip that you can install to your phone and then rename it to phone.apk.
14) If you are wanting to now stick your own images in, use 7zip and select "open archive" and then drag your images into the proper folders.
15) Close 7zip and select "yes" to the box that pops up.
16) Now you are ready. Move the zip file to your phone, reboot into recovery and install it.
Going to add something blur related here. AK Manager 4.9 will give you errors recompiling phone, contacts and dialer. To fix it, go into the decompiled apk and open apktool.yml with notepad++ or similar. You will see 3 lines.. -1, -3 and -2. Put them in order.. -1, -2 and -3. Good to go.
Very nice thanks for this
Sent from my DROID X2 using Tapatalk
No problem. Get out there and make some good stuff!!
Hey thanks for the guide. I have a lot of programming experience but I am fairly new to android.
With that said, you state that: "This guide will assume the basics (image editing, apk manager setup, adb, etc..) are understood."
Is there a page were this things are explained, I have the image editing down, but have no idea about the apk manager,adb,etc...
I found this and I was wondering if this is the apk manager:
http://forum.xda-developers.com/showthread.php?t=1227179
Thanks, and sorry if this sounds too noobish.
Yes, that is apk manager. I would use 4.9 though because 5.01 will give you a lot of "out of bounds" errors when decompiling. 4.9 wont. And the apps work.
There is also another thread here on XDA .. So you want to make a theme.. or something like that.
I also wrote a How-To on installing java, apk, adb and setting all of your environment variables. That is in the "Team Inversion Conversion" area on droidforums.net.
Edit: Added the how to to the original post.
Question
So i wanted to theme and started reading guides on xda and came to the conclusion that it was a lengthy process requiring knowledge of may different programs, most of which was over my head. Just recently i started digging into roms wanting to change the lockscreen background and incall backgrounds. using 7z i located the lockscreen background file at system\framework\framework-res.apk\res\drawable-hdpi\zz_moto_gradient_bg2.png I then copied the file out and opened it and using paint, changed the image to a different one and then pushed the modified file back into the zip and then flashed the rom. I was very happy to end up with this
.
My question is, not using apk manager or apktool or a command prompt or any of the methods that ive read, am i doing something wrong? Will editing roms in this method run me into problems? Or is it just a noobish approach that actually works?
afm1118... There is absolutely nothing wrong with the way you are doing things. Just make sure you don't mess with any 9pngs. if you edit those with your method, it will break the signature. The image would still work but the guides would be gone. When I first started learning to theme, I didn't understand what a guide was. So, heres my explanation... look at your keyboard... in landscape mode, the buttons are bigger than they are in normal view. guided 9s will make the images stretch perfectly to fit the required dimensions. unguided 9pngs will just take the actual image and make it bigger. Kind of like if you went into an image editor and re scaled a 40x40 pixel image to 100x100 pixels. It would still be there but it would be a little distorted.
Yeah i just stay away from the 9pngs because i dont understand them and just know not to touch. You definitely helped me understand them better tho. What i dont understand is the need to use apk manager, or what recompiling/decompiling is. Like just using 7z i modified phone.apk in the same fashion i did the lockscreen, changing the incall background. Im guessing apk manager is necessary for editing xml. I really want to understand all this.
afm1118 said:
Yeah i just stay away from the 9pngs because i dont understand them and just know not to touch. You definitely helped me understand them better tho. What i dont understand is the need to use apk manager, or what recompiling/decompiling is. Like just using 7z i modified phone.apk in the same fashion i did the lockscreen, changing the incall background. Im guessing apk manager is necessary for editing xml. I really want to understand all this.
Click to expand...
Click to collapse
I dont do .9 pngs and I still create alot of themes, dont be scared to theme cuz u cant do .9.
TheMuffStuff said:
I dont do .9 pngs and I still create alot of themes, dont be scared to theme cuz u cant do .9.
Click to expand...
Click to collapse
Im not scared of um, i just thought i would figure them out when i wanted to change one. but so far,with nitros rom and with muffstuff xkape and funkencools themes along with uot kitchen ive been very happy. The themes are great, im looking forward to whats next.
afm1118 said:
Yeah i just stay away from the 9pngs because i dont understand them and just know not to touch. You definitely helped me understand them better tho. What i dont understand is the need to use apk manager, or what recompiling/decompiling is. Like just using 7z i modified phone.apk in the same fashion i did the lockscreen, changing the incall background. Im guessing apk manager is necessary for editing xml. I really want to understand all this.
Click to expand...
Click to collapse
TheMuffStuff said:
I dont do .9 pngs and I still create alot of themes, dont be scared to theme cuz u cant do .9.
Click to expand...
Click to collapse
.9s are integral to theming....cheating them and not doing them arent an execuse
Nitsuj. Instead of bringing negativity into the thread, try being useful. This is a help section not a your doing it wrong thread. If you would like to discuss it further pm me.
Sent from my Nexus S using XDA App
Nexus S.. Ha.. Editing the build.prop har further reaches than I thought.
Anyway, yes, editing an xml requires decompiling and recompiling... or does it? Not so fast. You can use a Hex editor to edit those colors but, I have no clue. I never went that route.
I guess the easiest way to think about apks that are compiled or decompiled is like this... lets say you have a game.. Football.exe on your computer. you click it, it opens. Now, to save space, you zip it up and its now in a zip file called Football.zip. You click it, it does NOT open. The OS cant read a zip file as an executable file.
You open a compiled xml, can't read it. you open a decompiled xml.. its all right there in plain English. Why would you want to edit an xml? Many reasons. I am going to give you an example right here...
This is the decompiled progress-horizontal.xml from the framework. It controls the color of the bar when you are dwnlading an ap, adjusting the ringer or media volume, etc..
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@id/background">
<shape>
<corners android:radius="0.0dip" />
<gradient android:startColor="#ffdfdfdf" android:endColor="#ffdfdfdf" android:angle="270.0" android:centerY="0.75" android:centerColor="#ff000000" />
</shape>
</item>
<item android:id="@id/secondaryProgress">
<clip>
<shape>
<corners android:radius="0.0dip" />
<gradient android:startColor="#ff000000" android:endColor="#ffbf0d0d" android:angle="270.0" android:centerY="0.75" android:centerColor="#ffbf0d0d" />
</shape>
</clip>
</item>
<item android:id="@id/progress">
<clip>
<shape>
<corners android:radius="0.0dip" />
<gradient android:startColor="#ffbf0d0d" android:endColor="#ffbf0d0d" android:angle="270.0" android:centerY="0.75" android:centerColor="#ff000000" />
</shape>
</clip>
</item>
</layer-list>
Im not going to go look at a hex chart but I think this is from when I was making an orange theme the other day. You can see there are 9 hex codes for color. You can edit those and make the progress bar have a different background and color. If I remember correctly, the first 3 control the background and the other 6 control the color of the bar. Play around and experiment til you see one you like. you can also add in transparencies and such to get fading and whatnot. like #80dfdfdf instead of #ffdfdfdf.
Some xmls wont be as clear cut.. it mught say something like android:background="@drawable/status_bar_bg"
This still can be changed. You can actually add something to a folder..image, color, etc.. but you also need to make an xml for it too. (I think, never done it).
You can make it point at a different item or, you can just give it a hex color.
ok so with the lockscreen i did, i could have done it two different ways. i could have changed the xml to target a different file or what i did, modify the image file itself. its just like html or any programing, its been a while.
correct man. Deciding which way to go is key. some of those images show up all over the place. In each instance just have to decide if its better to point it something else or just change what its pointing to looks like.
When I first themed ShapeWriter(back when I hadn't even heard of a .9) I got into a whole new mess with .smali, turns out that's where the tracer color was defined. You could never edit smali without decompiling first, although for theming its rare to have to.
Once you start theming you start learning little things here and there. And usually if your theming, it's cause your trying to do what no ones done yet; so most of what your going to learn is from a LOT of trial and error.
I'm not good at writing guides or anything but anyone can feel free to ask in my thread or pm me if you have some specific questions, etc..
Sent from my DROID X2 using XDA App
Also just thought I'd add: things may seem confusing sometimes but so would basic algebra if it hadn't been etched into your brain already.
Sent from my DROID X2 using XDA App
I was wondering is someone could explain to me a little better as to how to make a flashable zip.
I wanted to change the background image of the dialer, but when I have a finished apk I dont know hot to make it flashable.
Thanks
Electroniko said:
I was wondering is someone could explain to me a little better as to how to make a flashable zip.
I wanted to change the background image of the dialer, but when I have a finished apk I dont know hot to make it flashable.
Thanks
Click to expand...
Click to collapse
Well I could get pretty indepth but if you just want one that works you could borrow mine or probably anyone else's and change it for your needs(deleting my files adding yours).
without getting into the actually scripting the basics are:
A script that tells you what files/dir go where(among other things) and the files.
Usually it will just unpack everything in the zip to the "root" of your system partition. So if you were to use my zip i would keep my dir's and just delete the actual files.
basically if you want to put a file in "/system/framework/" on your phone you would put the file in "/system/framework/" in the zip.
also a note if you use mine; it will only copy to the system partition and not sd or sd-ext. even with that it should fit your needs.
Hope that all helps

[Dev]Files of interest in the system

Alright, just got my hands on a system dump courtesy of loglud so I will be posting files (text files will include content that peaked my interest) here so me and other devs can see what we are able to toy with.
systemdump download link: http://dl.dropbox.com/u/15069134/SystemDump.zip
Current list:
/system/media/bnapps_icons\ <-- we can mod the app icons that come with the device so we can make it less-sucky.
/system/etc/bluetooth/blacklist.conf <-- referencing the bluetooth chip meaning we just have to find a way to activate it
/system/app/settings.apk <-- anyone think they can actually replace this with another gingerbread apk or decompile and discover if there is a custom intent? Warning: It does NOT work at all. I suggest against swapping the apk's out as it causes a force close.
/system/bin/bootanimation *Was told where it searches for bootanimations first so goto this thread for a new bootanimation: http://forum.xda-developers.com/showthread.php?t=1361735
Indirect said:
Alright, just got my hands on a system dump courtesy of loglud so I will be posting files (text files will include content that peaked my interest) here so me and other devs can see what we are able to toy with.
Current list:
/system/media/bnapps_icons\ <-- we can mod the app icons that come with the device so we can make it less-sucky.
/system/etc/bluetooth/blacklist.conf <-- referencing the bluetooth chip meaning we just have to find a way to activate it
/system/app/settings.apk <-- anyone think they can actually replace this with another gingerbread apk or decompile and discover if there is a custom intent?
Click to expand...
Click to collapse
Nice finds. Bluetooth will be intesting to test (about to do it right now).
As you know the Nook has a heavily modified framework, so I don't know if the stock settings app will work (but I'm about to find out and probably fark up my tablet).
Let me know how it goes anlog.
Indirect said:
/system/app/settings.apk <-- anyone think they can actually replace this with another gingerbread apk or decompile and discover if there is a custom intent?
Click to expand...
Click to collapse
Hmm . . . let me get a hold of it and I'll look at it tomorrow, I've already taken the rest of the week off (Diablo III beta key came in tonight).
You may not need to change out the settings.apk but just add another one to it.
I decided to hold off on swapping the settings.apk. Losing access to the real settings app with all of the Nook options might not be a good idea.
The main reason I wanted a full settings menu was to be able to get into the accounts sync settings, but I found an app to launch it.
Warning: It does NOT work at all. I suggest against swapping the apk's out as it causes a force close.
Indirect said:
A
/system/bin/bootanimation <-- It's not a .zip or anything, just a file...anyone know how we can edit this?
Click to expand...
Click to collapse
It's a binary file. This app executes bootanimation resources.
Example: on T-Mobile MyTouch 4G resources are in /system/customize//resource/htc_bootanimation.zip
You should search for bootanimation.zip and you can edit this archive
Indirect said:
Warning: It does NOT work at all. I suggest against swapping the apk's out as it causes a force close.
Click to expand...
Click to collapse
I read note, if you want edit system apps like Settings.apk you should sign them by personal keys only...
I was looking through and couldnt find a bootanimation.zip in the system so I'm checking the data folders now.
edit: What the hell, still can't find it.
Indirect said:
I was looking through and couldnt find a bootanimation.zip in the system so I'm checking the data folders now.
edit: What the hell, still can't find it.
Click to expand...
Click to collapse
I was using Absolite system to see if I could replace the bootanimation because I couldn't find it either. I did manage to make it go away and just had the splash screen. I'll look into this further today as well. I'm starting to get ideas as to which files you can and can't replace right now. Some will force an immediate reboot and get stuck in a boot loop. I also am trying to find what triggers and handles the home button menu, I am sure it is in the framework. I have framework.jar and services.jar decompiled and going through those as well. Reviewing logcats to see what I can track down. I have some other interesting stuff going as well
romified said:
I was using Absolite system to see if I could replace the bootanimation because I couldn't find it either.
Click to expand...
Click to collapse
Hmmm... Usually bootanimation is in /data/local/ or /system/media. May be it has different name?
/system/bin/bootanimation is the program that actually displays the bootanimation.
Normally it plays the contents of /system/media/bootanimation.zip, but it can also be hardcoded to play a fixed animation or designed to play a completely different format. (Such as on Samsung devices, where it only plays Samsung's QMG format until you replace the program.)
conundrum768 said:
I've already taken the rest of the week off (Diablo III beta key came in tonight).
Click to expand...
Click to collapse
conundrum768
Don't take this the wrong way, but I really hate you right now!
I tried getting in on the Diablo III beta, no luck!
Here is a file of some interest, it it looks to be encrypted because it would be of interest.
/system/recovery-from-boot.p
.p files are encrypted .m files. Not sure if anything exists out there to crack into that one, but I am sure it would tell some very interesting information and possibly allow hi-jacking the factory restore process?
Anyone familiar with .p files (pcode files) ?
---------- Post added at 12:20 PM ---------- Previous post was at 12:08 PM ----------
Also of interest are some .xem3 files under /system/lib/ducati
base_image_app_m3.xem3 --- 57 mb
base_image_sys_m3.xem3 --- 1.5 mb
I think could be system image files possibly from the little bit of research I have done. Due to the size of one of these (57 mb) and the name of the file, I was thinking maybe this is where the restore was getting it's base image from, but until I dig further I am not sure of that. The size of the file is what got my attention, much larger than other files in lib. That's half the size of CM7 in just one file.
Edit: These now look to be possibly drivers/firmware/images for Ducati and/or Pandaboard ? That's a large driver file....
The .p file is very much of interest I would think.
conundrum768 said:
Hmm . . . let me get a hold of it and I'll look at it tomorrow, I've already taken the rest of the week off (Diablo III beta key came in tonight).
Click to expand...
Click to collapse
It looks like the normal XML files are not controlling the layout and it is done through the smali files to get the custom actions and layout. A separate app to access development may be best for now, as we have been doing.
Unless someone edits the smali files of course, that's possible but will prove tedious and time consuming unless you have a lot of experience with these.
If you review the logcats from going into settings, you will see which smali files are involved.
I have almost a full system dump on an ftp so ill see about letting it be accessed.
Sent by breaking the sound barrier
Please upload full system dump from Nook Tablet
Please upload full system dump from Nook Tablet
How-to
1. Get root
2. Run terminal (enter su if symbol $ -> it will be changed to #)
3. Execute command mount
4. From list of partitions search for /system
Code:
Example: /dev/block/mmcblk0p27 /system ext4 ro,relatime
5. Dump it to sdcard with command dd
Code:
Example: dd if=/dev/block/mmcblk0p27 of=/sdcard/system.img
It dumps only system image not personal data...
I'll just upload a .zip to dropbox.
Is there a sanim.zip anywhere? If so, that's the bootani. If not, ill sink back to silence lol
Sent from my Samsung Legendary 4G, a Universe UTES phone, running "two.three.five"
I looked through and there are only a few .zip files but none of them actually contained a bootanimation. It really is annoying lol. This device is such a bastardized version of android, I can't wait to get past the bootloader. lol.

How-To's

How to modify your framework-res.apk
There are plenty of "How-to's" out there that I've seen for modifying the framework-res.apk. I've tried probably 20 of them...all resulted in getting stuck in a bootloop. Finally figured out a method that works.
Here goes:
THIS IS FOR LINUX BASED USERS
Go to www.jokersax.com and grab my tool.zip under Th3Bill Mods
Extract it in your HOME folder
Inside it you will find 2 versions of apktool. There is a good reason for that, which you will see later.
You also need a good xml editor like Editra (available in most distros packages)
Need an archive manager as well (I recommend File Roller)
[COLOR="green"[B][U]]Initial Setup:[/U][/B][/COLOR][/SIZE]
[SIZE="3"]1) Open your Home folder and select to show hidden files
2) Open your .bashrc file
3) Add the following lines to the bottom of the file
export PATH=${PATH}:~/bin
export PATH=${PATH}:~/tool/reg
export PATH=${PATH}:~/tool/ics
Then save the file
4) Open your .profile file
5) Add the following line to the bottom of the file
PATH="$HOME/tool/ics:$HOME/tool/reg:$PATH"
Then save the file.
Now, on to editing
1) Navigate to the framework folder that your framework-res.apk is in.
2) Open a terminal
3) Type in "reg if framework-res.apk" no quotations and press Enter
4) Type in "reg d framework-res.apk" no quotations and press Enter Now minimize terminal (you'll use it later)
5) You should see in your file manager the folder called framework-res. This is your decompiled framework-res.apk
6) Make your edits. be careful....this file controls a TON of things in your system, and you can make some major problems for yourself if you edit things incorrectly.
7) Once your edits are done, go back to your terminal session
8) Type in the following "ics b framework-res" no quotations (where *username* is your account username) and press Enter.
9) It should recompile correctly. You'll have a framework-res.apk in the /framework-res/dist folder. DO NOT USE THIS ONE WILL CAUSE BOOTLOOPS!!
10) Open it with an archive manager and extract the resources.arsc as well as any files you edited in the xml folder.
11) Go back to your ORIGINAL framework-res.apk and open (not extract) it in your archive program
12) Add in the files you extracted from the edited framework-res.apk, placing them in the appropriate folders
13) You're done!
Cheers!
P.S. If you get a recompile error that mentions plurals, you have some work to do. Go to the values folders one at a time and look for the plurals.xml files. You will see a bunch of entries....scroll all the way down till you see a section that looks like this:
<plurals name="matches_found">
<item quantity="other">%d of %d</item>
<item quantity="one">1 match</item>
you need to edit this section to look like this:
<plurals name="matches_found">
<item quantity="other">%1$d of %2$d</item>
<item quantity="one">1 match</item>
This must be done for EACH plural.xml file...placing 1$ behind the first % and 2$ behind the second one. Save each as you go. Then recompile, and you should be good to go.
HOW TO LOGCAT PROPERLY
Here's how to logcat so that a dev can actually help fix your issue
SETUP
1) Download Android SDK from HERE
2) Place it directly in your HOME folder
3) Extract the file there and rename the folder android-sdk
4) Go to the platform-tools folder and double-click android
5) Download at least the tools and platform-tools. You can download other stuff, but that's unnecessary for this exercise.
6) Close SDK when it's done
Now to LOGCAT
1) Navigate to the /platform-tools folder.
2) Open a terminal
3) Type in either A or B depending on your system
A) (works on Ubuntu derivatives)
sudo ./adb kill-server
sudo ./adb start-server
B) (Suse, Fedora, etc)
su
(enter your password)
./adb kill-server
./adb-start-server
Now, the server should be running....leave it open!
4) Plug your phone into the PC (making sure that if it's ON, that you have android debugging enabled...or the proper edit in build.prop listed below)
5) If your phone is OFF(meaning you can't get it to boot from a rom/mod you did), follow A). If your phone is ON (meanint working but has a FC somewhere), follow B)
A) Type into the terminal the following
./adb logcat -C
and press enter. Should say waiting for device. Turn on your phone. When it gets to a section where you see a large amount of red pass by on the screen (like 8-10 lines), go to step 6
B) Be sure to turn off ALL apps that are NOT related to your FC (this makes it nice and neat for us to read the logcat)
Open terminal and type in the following
./adb logcat -C
and press enter. You should see it start to log stuff...it'll be going by really fast...don't worry about that right now.
NOW, do whatever it is that fcs (open the app, process, etc) and wait for it to FC. When it does, go to step 6
6) With the Terminal being your primary window in the PC, Press Ctrl +Z. This will stop the logcat output
7) Search through the logcat for the section with all the red (you'll see a bunch of E's). Don't cut this up on us...we may need some of the other info
8) Select about 30-40 lines ABOVE the red error section through about 10-20 lines AFTER the error section
9) Paste this into Pastebin. Please don't send us this in an e-mail...it just looks a hot mess that way.
10) Link to the Dev.
CHEERS!​
Blank flashable zip
For all of you out there wanting to flash an app or framework file, here is a flashable zip that is blank. It contains instructions inside it, so PLEASE
READ THE FILE LABELED "READ ME FIRST!!!!"
This will make a simple process of flashing the items you want to flash.
CHECK POST 8 FOR CORRECTED INFORMATION
Any questions...ask me
Could we use this to turn our phones into a space/time bending machine??
Lol jk. Thanks for the information and flash able zip!!!
Sent from my MB855 using XDA
tsdeaton said:
Could we use this to turn our phones into a space/time bending machine??
Lol jk. Thanks for the information and flash able zip!!!
Sent from my MB855 using XDA
Click to expand...
Click to collapse
Don't I wish...or an intelligence enhancer...LOL
Glad to share
th3bill said:
don't i wish...or an intelligence enhancer...lol
glad to share
Click to expand...
Click to collapse
lmao! +1476930593
Bad ass thread buddy thanks for the how to's and blank flash zips these will surely come in handy....
MIUI/ICS for the Photon
http://forum.xda-developers.com/showthread.php?t=1536161
For deodexed I'm guessing.
Th3Bill said:
For all of you out there wanting to flash an app or framework file, here is a flashable zip that is blank. It contains instructions inside it, so PLEASE
READ THE FILE LABELED "READ ME FIRST!!!!"
This will make a simple process of flashing the items you want to flash.
If you wish to flash other items, you simply need to make sure that the item you want is in the folder it would be in within your phone, so if you want something to go into /system/lib, make sure that you create a folder /lib inside the /system folder in the zip and put the file inside that folder.
Any questions...ask me
Click to expand...
Click to collapse
Also, I should add that I forgot something in the explanation for this file. Wherever you are putting the file you're flashing (app, framework), you will need to adjust the permissions portion of the updater-script to show that file. Otherwise, you will set your entire /system to those permissions and you will get wonderful boot-loops
So, for app Music.apk, that line would look like:
set_perm(0, 0, 0755, 0644, "/system/app/music.apk");
Here is the updated file with the corrected instructions inside it Sorry for any issues fellas!
Blank CWM2.zip
Go to the site to download the file
Cheers!
TOOLS
Who doesn't love tools?
I've seen a lot of confusion over which versions to use for decompiling. Magic values being off with the current version of Android being pushed to 4.0.4.
Here's a helpful little tool kit. Disclaimer: It's for Linux based systems(save for the Androidsuite). I will try to find all these for Windows at some point, but with MIUI for Photon and Atrix, CNA for Photon, and Kitchen Sinks for both Photon and Atrix, I'm spread a little thin for some of these how-tos. I will post more soon once Kitchen Sink is Beta.
Tool.zip
Go to the site and download the file.
There's a small file inside with an explanation of each tool. NOTE: I put that Android suite works in Wine. It does not. It will OPEN and look like it might work, but does not recompile or decompile anything. It's a windows only wonder...LOL
Is there any way you'd be able to write up a How-To on how to use Diff/Patch in the laments terms, with Android specific type files directions cuz I'm trying to figure it out but since all the info I find is for applying it to everything other than Android. I'm on a mac and have it all setup correctly but I fk shyt up cuz I lose a step or something.
By the way, thanks for this How to also. Awesome.
MoPhoACTV Initiative
moonzbabysh said:
Is there any way you'd be able to write up a How-To on how to use Diff/Patch in the laments terms, with Android specific type files directions cuz I'm trying to figure it out but since all the info I find is for applying it to everything other than Android. I'm on a mac and have it all setup correctly but I fk shyt up cuz I lose a step or something.
By the way, thanks for this How to also. Awesome.
MoPhoACTV Initiative
Click to expand...
Click to collapse
What are you trying to do? You looking to do rom porting? Try to change some features? Change colors in a menu? Need a bit more info. Depending on what you're wanting to do will determine what the steps will be.
Idiots guide to porting ROMs for Photon, now THAT would be great. Sure it'd be a PITA and 3/4 to make though lol, great work on keeping up this how-to thread and all your ROM work!
w0lf215 said:
Idiots guide to porting ROMs for Photon, now THAT would be great. Sure it'd be a PITA and 3/4 to make though lol, great work on keeping up this how-to thread and all your ROM work!
Click to expand...
Click to collapse
<<<[----RECOGNIZED CONTRIBUTOR now
I feel bad that I haven't written more "how to's" in a while, but with 6 downloads I'm currently doing (MIUI Photon, MIUI Atrix, CNA Photon, Kitchen Sink Photon, Kitchen Sink Atrix, TabletUI Photon), I'm being spread pretty thin....LOL. It's all good. I love doing this stuff.
I promise to write more of these as I get a chance. I like to have more people help with stuff.
Th3Bill said:
<<<[----RECOGNIZED CONTRIBUTOR now
I feel bad that I haven't written more "how to's" in a while, but with 6 downloads I'm currently doing (MIUI Photon, MIUI Atrix, CNA Photon, Kitchen Sink Photon, Kitchen Sink Atrix, TabletUI Photon), I'm being spread pretty thin....LOL. It's all good. I love doing this stuff.
I promise to write more of these as I get a chance. I like to have more people help with stuff.
Click to expand...
Click to collapse
I noticed that a little while ago, Congrats on the new title thats whats up.
btw check your pm
moonzbabysh said:
I noticed that a little while ago, Congrats on the new title thats whats up.
btw check your pm
Click to expand...
Click to collapse
Check yours...got a book in there for ya...LOL
Updated OP How Tos.....Framework-res edit and Logcatting
Th3Bill said:
Updated OP How Tos.....Framework-res edit and Logcatting
Click to expand...
Click to collapse
Just setting up on pc. Ready to try this. You may be hearing from me! LOL

Categories

Resources