• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Boost Mobile] Compile android.policy.jar

jimsmith80

Android Expert
I am still in the process of learning android, and am working on my own rom. The devs here are great, but I would rather do everything myself rather than use someone else's work (I am making an exception for the kernel. Thanks DTM). I have searched here and XDA, but can not find how to compile android.policy.jar using smali.jar. The code to decomplie is
java -jar baksmali.jar -x android.policy.jar -o classout
which I found here on AF. I'm running a linux machine and prefer to do everything through command line. I feel that it is the only true way to learn. Thanks in advance
 
If I remember, the command is java -Xmx512M -jar smali.jar classout -o classes.dex from the command line. This will produce classes.dex which you can drop back into the original JAR file. You also may need to sign it - I use test keys for this and it seems to work fine.

I have to say, I admire your approach! In making my ROM, I also refused to add pre-built mods and instead opted to do them all by hand, with the exception of the kernel of course and maybe one or two others. It took me forever to figure out the power menu hacks lol

I guess we're just old-school like that :)
 
That looks really like something I had seen on XDA. I was just missing the part about dropping the classes.dex back into the original jar file.

My opinion the old school hands on approach is the only way to go. I was looking at WOEM 2.0. I will have to give it a run once you have it completed. Surprisingly it is very similar to what I have in mind. Your a few steps ahead of me though.
 
...
My opinion the old school hands on approach is the only way to go.

I couldn't agree more. It's one thing to copy and paste someone else's work (which I've had to do on some components) but I enjoy doing my own work whenever possible. It's flat-out the best way to learn :-)



I was looking at WOEM 2.0. I will have to give it a run once you have it completed. Surprisingly it is very similar to what I have in mind. Your a few steps ahead of me though.

Cool, I appreciate all the input I can get on it. I'll have to give yours a try as well! Apparently we're both more similarly old school than I first thought lol
 
Back
Top Bottom