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

Root Decompile/Recompile Question?

Phubu

Android Enthusiast
May 15, 2012
452
33
Miami, Fl.
I'm currently modding an apk app for me and to share with you guys, i have decompiled it successfully, but i get and error when i go to recompile it.

Hopefully someone with experience in this field can help me out.

Below is the recompile log:
Code:
[*] C:\AutoAPKTool2.0.4\_INPUT_APK\MiuICS-Signed 
recompiling C:\AutoAPKTool2.0.4\_INPUT_APK\MiuICS-Signed... 
I: Smaling...
I: Building resources...
aapt: warning: string 'stop_scanning_files' has no default translation in C:\AutoAPKTool2.0.4\_INPUT_APK\MiuICS-Signed\res; found: zh_CN
C:\AutoAPKTool2.0.4\_INPUT_APK\MiuICS-Signed\res\values\colors.xml:97: error: Error: Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'button_text_color' with value '##00FFFF').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Versatil\AppData\Local\Temp\APKTOOL2465779067603724837.tmp, -I, C:\Users\Versatil\apktool\framework\1.apk, -S, C:\AutoAPKTool2.0.4\_INPUT_APK\MiuICS-Signed\res, -M, C:\AutoAPKTool2.0.4\_INPUT_APK\MiuICS-Signed\AndroidManifest.xml]
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
	at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
	at brut.androlib.Androlib.buildResources(Androlib.java:248)
	at brut.androlib.Androlib.build(Androlib.java:171)
	at brut.androlib.Androlib.build(Androlib.java:154)
	at brut.apktool.Main.cmdBuild(Main.java:182)
	at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Versatil\AppData\Local\Temp\APKTOOL2465779067603724837.tmp, -I, C:\Users\Versatil\apktool\framework\1.apk, -S, C:\AutoAPKTool2.0.4\_INPUT_APK\MiuICS-Signed\res, -M, C:\AutoAPKTool2.0.4\_INPUT_APK\MiuICS-Signed\AndroidManifest.xml]
	at brut.util.OS.exec(OS.java:83)
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
	... 6 more
The system cannot find the drive specified.
 
it may look something like this

button_text_color: (0, 255, 255)

I changed it to RGB values

but idk how it looks like as I need to look at the full code, this is similar to kernels so I understand the errors


EDIT: in your hex you put in 2 # instead of 1, in the file you're recompiling....
 
Upvote 0
it may look something like this

button_text_color: (0, 255, 255)

I changed it to RGB values

but idk how it looks like as I need to look at the full code, this is similar to kernels so I understand the errors

EDIT: in your hex you put in 2 # instead of 1, in the file you're recompiling....


yup your right i had noticed a few mins ago that i put in an extra #, i took it of and tried again. Log came out different.
 
Upvote 0
yiou using backsmali and smali? the design of the app will determine how many times you need to change the color value, there will be a xml file for each screen within the app, and there may be many instances or the color change, one for each line of the text, when writing the laoyout in xml each line of text needs to be defined by a color, so changing one line will most likely not change the color for every line of text. if you really want to understand how it works and wht you will need to change, install eclipse and download a learning android apps ebook or pdf, and write a app within the program, and look at each file in text format to see what all goes into it, once you ahve a basic understanding of the layout, it will be much easier to edit an existing app.

Edit: I zipped up a bunch of the ones i used to re-learn java and get an understading of how to build apps, im uploading them to dropbox now, will post a link when done

here is a link to eclipse galileo for java and report devs, this will get you started will allt he right components.

http://www.eclipse.org/downloads/packages/eclipse-ide-java-and-report-developers/galileor

you will also need the java jdk and the android sdk for windows to test, debug, and get the proper APIs for the android platform

Heres the books: https://dl.dropbox.com/u/42841380/Android%20Books.zip
 
  • Like
Reactions: dden4012 and Phubu
Upvote 0
yiou using backsmali and smali? the design of the app will determine how many times you need to change the color value, there will be a xml file for each screen within the app, and there may be many instances or the color change, one for each line of the text, when writing the laoyout in xml each line of text needs to be defined by a color, so changing one line will most likely not change the color for every line of text. if you really want to understand how it works and wht you will need to change, install eclipse and download a learning android apps ebook or pdf, and write a app within the program, and look at each file in text format to see what all goes into it, once you ahve a basic understanding of the layout, it will be much easier to edit an existing app

Yeah i think im about to do that, its already becoming difficult to just hunt around for the code and trying to change it.

Does Eclipse give previews as your coding and building?
 
Upvote 0
eclipse does give you previews of the xml files yes, however, it will not work properly if you try to open a smali, ie, decompiled app, it needs to be in its original uncompiled form. and if you have everything installed and working together, you can run a android emulator to test the app without compiling it, so you can figure out what changes you need to make
 
Upvote 0
eclipse does give you previews of the xml files yes, however, it will not work properly if you try to open a smali, ie, decompiled app, it needs to be in its original uncompiled form. and if you have everything installed and working together, you can run a android emulator to test the app without compiling it, so you can figure out what changes you need to make

So u open eclipse, choose the apk and modify from within? i have the emu installed so im good to go.
 
Upvote 0
yiou using backsmali and smali? the design of the app will determine how many times you need to change the color value, there will be a xml file for each screen within the app, and there may be many instances or the color change, one for each line of the text, when writing the laoyout in xml each line of text needs to be defined by a color, so changing one line will most likely not change the color for every line of text. if you really want to understand how it works and wht you will need to change, install eclipse and download a learning android apps ebook or pdf, and write a app within the program, and look at each file in text format to see what all goes into it, once you ahve a basic understanding of the layout, it will be much easier to edit an existing app.

Edit: I zipped up a bunch of the ones i used to re-learn java and get an understading of how to build apps, im uploading them to dropbox now, will post a link when done

here is a link to eclipse galileo for java and report devs, this will get you started will allt he right components.

Eclipse IDE for Java and Report Developers | Eclipse Packages

you will also need the java jdk and the android sdk for windows to test, debug, and get the proper APIs for the android platform

Heres the books: https://dl.dropbox.com/u/42841380/Android%20Books.zip


oh great thx, i just downloaded O reilley's book on android also.
 
Upvote 0
No you can't open the APK in eclipse, you won't really be able to do anything with an existing app within eclipse, however using it to learn how to write a basic app will give you better knowledge of what to look for when decompiling an app that you want to edit. Eclipse can't work with smali files, it doesn't see them as java. You may beer able to open them and edit them in eclipse, but eclipse won't know what to do with them after that
 
Upvote 0
No you can't open the APK in eclipse, you won't really be able to do anything with an existing app within eclipse, however using it to learn how to write a basic app will give you better knowledge of what to look for when decompiling an app that you want to edit. Eclipse can't work with smali files, it doesn't see them as java. You may beer able to open them and edit them in eclipse, but eclipse won't know what to do with them after that


got it.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones