1. Are you ready for the Galaxy S20? Here is everything we know so far!

[Boost Mobile] smali / baksmali

Discussion in 'Android Devices' started by MyndCTRL, Aug 19, 2012.

  1. MyndCTRL

    MyndCTRL Well-Known Member
    Thread Starter

    I'm having a hard time with a few things concerning smali / baksmali. I'm in the process of making my own rom, it's tough starting out since I have no friggin clue as to what im doing. I've learned a ton of information and I feel like i got the basics. Apollo so graciously let me use his Unitology rom as a base, but for learning sake I decided to start off from the stock rom and work my way up using unitology as a guide. Ive run into a problem and I cant seem to solve it. Here are the steps as to how I get my problem:

    1) Took a fresh copy of stock b08c rom into dsixda kitchen.
    2) Setup my working folder in kitchen
    3) Went to system/framework and copied the android.policy.jar file and pasted a copy into my directory to work with smali / baksmali
    4) Now I enter the following command:

    Code (Text):
    1. java -jar baksmali.jar -x android.policy.jar -o classout
    and this is what I get:

    Code (Text):
    1. UNEXPECTED TOP-LEVEL EXCEPTION:
    2. org.jf.dexlib.DexFile$NoClassesDexException: zip file android.policy.jar does not contain a classes.dex file
    3.      at org.jf.dexlib.DexFile.<init><DexFile.java:298>
    4.      at org.jf.baksmali.main.main(main.java:269)
    Then it sends me back to my command prompt. Now the reason why I brought up Unitology rom is because I followed the same steps with that rom as I did with the stock rom, but without the error on the android.policy.jar file when it was being disassembled. I'm wondering if the two files are different, but I don't really think so...

    Now granted I am only trying to do this for the extended power menu with reboot, recovery and download options and it probably really isnt needed but it's a nice feature to have and I really want to incorporate it into my rom. Also this is probably a really good learning experience. Im stuck though so any advice would be welcomed :)

    Edit: Just remembered I forgot to mention that smali / backsmali is the latest version, latest JDK and Java. Im also running windows vista home premium 32bit if the OS really matters.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. jetx2x

    jetx2x Android Expert

    Have you deodexed the rom?

    Sent from my N860 using Tapatalk 2 Beta-5
     
  3. MyndCTRL

    MyndCTRL Well-Known Member
    Thread Starter

    Actually I haven't. What would that procedure be? Setup in the kitchen, deodex, build and then grab the file?
     
  4. jetx2x

    jetx2x Android Expert

    Have you deodexed the rom?

    Edit&&&&: because if you haven't deodexed yet then the classes.Dex file isn't contained within the android.policy.jar... which would explain the error you're getting... it can't locate the classes.dex

    Sent from my N860 using Tapatalk 2 Beta-5
     
  5. MyndCTRL

    MyndCTRL Well-Known Member
    Thread Starter

    That makes a lot of sense. I've been spending days on this power menu and with every little step I stumble and managed to figure everything out until now. But that sounds like an idea, I'll deodex the stock rom and try again, thanks for the suggestion! I'll get back to you :cool:
     
  6. jetx2x

    jetx2x Android Expert

    Haha... you can't do all that much modding to a rom until its deodexed... all of the smali code is contained in the classes.dex file of ever jar or apk... if you don't deodex then it is contained outside of the apk or jar

    Sent from my N860 using Tapatalk 2 Beta-5
     
    MyndCTRL and Alsaces Daddy like this.
  7. Prinny

    Prinny Resident Linux Nutcase

    Smali editing...no bueno...I'm not a fan of those...I spent days modifying one to get mms working once...never again, I vowed..
     
  8. MyndCTRL

    MyndCTRL Well-Known Member
    Thread Starter

    Currently de-odexing in the kitchen. I think you were exactly spot-on when you told me to try that. Thanks so much. But now I got another question. If you remove an .apk from /system/app, is it safe to remove the corresponding .odex file as well?
     
  9. Prinny

    Prinny Resident Linux Nutcase

    Once you deodex the Rom, you don't need the .odex files anymore
     
  10. MyndCTRL

    MyndCTRL Well-Known Member
    Thread Starter

    Wow worked like a charm, I got baksmali working with my android.policy.jar file now. Man im well on my way to something special lol thanks gang I appreciate it
     
    IonDev likes this.
  11. I will b the first to use yo rom:D
     
  12. MyndCTRL

    MyndCTRL Well-Known Member
    Thread Starter

    alright! I'll def let you know when im gettin close. I have a lot of learning to do and I keep gettin stuck. Right now im tryin to figure out why I cant flash my rom after i build it in the kitchen. I keep gettin the status code 7. I fix my mount points, replace the updater-binary but it still wont install in cwm. So im workin on that problem now
     
  13. jetx2x

    jetx2x Android Expert

    Use hroarks cwm templates

    Sent from my N860 using Tapatalk 2 Beta-5
     
  14. MyndCTRL

    MyndCTRL Well-Known Member
    Thread Starter

    Now that I got his templates, which one's do I use, and how do I use them?

    Edit: I threw something together real quick and i might have a successful installation in CWM! *crosses fingers*
    Edit2: It def worked, my first rom was successful but needs massive amounts of work :)
     
  15. jetx2x

    jetx2x Android Expert

    rom installer is to install an entire rom... rom updater is to add or replace files without erasing everything everything else is pretty much self explanatory

    Sent from my N860 using Tapatalk 2 Beta-5
     
  16. MyndCTRL

    MyndCTRL Well-Known Member
    Thread Starter

    Thanks Jet, I got it to work. I flashed my first rom and I'm already using it. This is so great. Pretty soon i'll have a new rom for people to test. As for versioning, im still stuck. Dont know how to do it
     
  17. Deleted User

    Deleted User Guest

    ro.build.display.id=
    In build.prop
     

ZTE Warp (N860) Forum

The ZTE Warp (N860) release date was October 2011. Features and Specs include a 4.3" inch screen, 5MP camera, 512GB RAM, Snapdragon S2 processor, and 1600mAh battery.

October 2011
Release Date
0
Reviews
Loading...

Share This Page

Loading...