[Q] translating a chinese opera... - Galaxy Y GT-S5360 and Duos 6102 Q&A, Help & Troubl

I was trying to translate a chinese opera browser. So I decompiled the apk with apktool. To test if it works, I edited app_name_title in /res/values/strings.xml. Then recompiled and signed it. After installing, it worked because it's app name was changed according to the translation but when i launch the app it force close after showing the Opera logo. What can i do now ?

madboy777 said:
I was trying to translate a chinese opera browser. So I decompiled the apk, edited /res/values/strings.xml. Then recompiled and signed it. After installing, when i launch the app it force close after showing the Opera logo. What can i do now ?
Click to expand...
Click to collapse
logcat it then you read the logs and find out what is causing the force close

marcussmith2626 said:
logcat it then you read the logs and find out what is causing the force close
Click to expand...
Click to collapse
Yes, I tried "logcat -v long" and "logcat /E" but can't figure out the problem. Actually I don't understand it fully. What i saw is that when i launch the app two shared lib files are loaded and nothing else.

madboy777 said:
Yes, I tried "logcat -v long" and "logcat /E" but can't figure out the problem. Actually I don't understand it fully. What i saw is that when i launch the app two shared lib files are loaded and nothing else.
Click to expand...
Click to collapse
did the app work before you edited it?
it may be that the name you changed is referenced in different locations
other than that cant really help you

marcussmith2626 said:
did the app work before you edited it?
it may be that the name you changed is referenced in different locations
other than that cant really help you
Click to expand...
Click to collapse
No i changed the chinese name that appeared on the launcher. OK I will edit something other than this tomorrow. Thank you very much.

marcussmith2626 said:
did the app work before you edited it?
it may be that the name you changed is referenced in different locations
other than that cant really help you
Click to expand...
Click to collapse
I just decompiled and compiled without editing. The app doesn't work. So apktool is the real problem. That app worked before i decompiled and recompiled.
What can i do now ???

madboy777 said:
I just decompiled and compiled without editing. The app doesn't work. So apktool is the real problem. That app worked before i decompiled and recompiled.
What can i do now ???
Click to expand...
Click to collapse
make sure you are using the correct framework-res to decompile and recompile
most 3rd party apps use jb framework
you may also need to resign the apk

marcussmith2626 said:
make sure you are using the correct framework-res to decompile and recompile
most 3rd party apps use jb framework
you may also need to resign the apk
Click to expand...
Click to collapse
Where can i download jb framework ? I signed the apk and it installed so signing might not be any problem.

madboy777 said:
Where can i download jb framework ? I signed the apk and it installed so signing might not be any problem.
Click to expand...
Click to collapse
here you go
http://d-h.st/zAg

marcussmith2626 said:
here you go
http://d-h.st/zAg
Click to expand...
Click to collapse
Thank you very much... Gonna try ASAP...

marcussmith2626 said:
here you go
http://d-h.st/zAg
Click to expand...
Click to collapse
apktool shows this error while installing framework-res.apk ...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:54)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource
s.java:611)
at brut.androlib.Androlib.installFramework(Androlib.java:469)
at brut.apktool.Main.cmdInstallFramework(Main.java:253)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000000
at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:219)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:179)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:167
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:133)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
8)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 5 more
Press any key to continue . . .

madboy777 said:
apktool shows this error while installing framework-res.apk ...
Click to expand...
Click to collapse
either the file didnt upload properly or it didnt download properly or theres a problem with your apktool cause it works fine on mine using apktool if framework-res.apk
i'll download my upload and check
edit
iv checked my uploaded and that framework installs fine on my apktool
either it didnt download properly on your computer or theres a propblem with your apktool
I suggest downloading the file again and make sure you have the java developent tools JDK installed

marcussmith2626 said:
either the file didnt upload properly or it didnt download properly or theres a problem with your apktool cause it works fine on mine using apktool if framework-res.apk
i'll download my upload and check
edit
iv checked my uploaded and that framework installs fine on my apktool
either it didnt download properly on your computer or theres a propblem with your apktool
I suggest downloading the file again and make sure you have the java developent tools JDK installed
Click to expand...
Click to collapse
ok, md5 cheaksum of framework-res.apk matches with dev host. I have java(JDK) installed. downloading apktool_2.jar...

marcussmith2626 said:
either the file didnt upload properly or it didnt download properly or theres a problem with your apktool cause it works fine on mine using apktool if framework-res.apk
i'll download my upload and check
edit
iv checked my uploaded and that framework installs fine on my apktool
either it didnt download properly on your computer or theres a propblem with your apktool
I suggest downloading the file again and make sure you have the java developent tools JDK installed
Click to expand...
Click to collapse
downloaded apktool 2 beta 9 and it accepts your framework-res.apk but still no luck. That app still force closes. Is it possible that a 3rd party app can not be modified with apktool and if you do it will not work ?

madboy777 said:
downloaded apktool 2 beta 9 and it accepts your framework-res.apk but still no luck. That app still force closes. Is it possible that a 3rd party app can not be modified with apktool and if you do it will not work ?
Click to expand...
Click to collapse
cant really answer that as im not doing the modding but you should be able to mod anything
im guessing your apktool was out of date and couldnt accept jb firmware

Related

[DEV][TOOL] EASYapkTOOLcompilerDECOMPILER v1.5 [2.1Beta 2012.09.05]

UPDATED 2012.09.05!!! Hey guys, if you can do some testing with the new version and give me some feedback, I fixed some errors with the drag and drop code, and included apktool versions (1.2.0, 1.3.2, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.5.0) you can add as many others as you like to the _bin folder, just create a separate folder with the version number and place it in there (make sure the file is named "apktool.jar" or the code won't work), if you want to set a default apktool version to use, so that you aren't prompted all the time, you can change the name of the "apktool.manual" file to (for example) "apktool.1.4.9" and from then on it will use that version instead of prompting... and you can always change it back, or change it to a newer/older version number as needed...
if this works well for you guys I will update the first post...
Code:
Beta Changelog
2.0 Initial Beta
2.1b
cleaned up some code issues (defualt file wasn't working properly)
added the newer unofficial apktool builds (1.4.5 -- 1.5.0)
here's the mediafire link: http://www.mediafire.com/?td20i8cv8lfq90l
First of all, I did not create apktool (DUH!) that credit goes to: Brut.alll what a wonderful tool. I have included version 1.3.1 because that is the version that seems to work best right now...
Note: Brut.alll, if you happen to read this and would like me to remove apktool from being included with my batch scripts, please contact me and I will happily do so.
Alright... the easyFLASHABLEzipBUILDER gave me the idea to do this... Basically it's a way to "automagically" compile/decompile (smali/baksmali via apktool) apk's and jar's for all you dev's or wannabe dev's who want an easier way about this... These are windows batch scripts and should work with anything win2k or newer.
how it works: said:
Extract to a directory, for simplicity we'll say "apktool"
Place whatever file/folder(s) you would like to compile/decompile in the root of "apktool"
The filenames are pretty self explanatory... the drag and drop options file will prompt for the options only, this way you can still have the ease of drag and drop, but only need to input the more specific options
The manual file will only ask for options and filename, if you decompile it will change the last "." before extension to a "_" so framework-res.apk would output to _out\framework-res_apk.
When you (re)build with ANY of the files if the given folder name is framework-res_apk then the output file will be framework-res_REBUILTsigned.apk
The manual and drag and drop files always preserve the extension, so if you modify the folder name before rebuilding leave the "_apk" or "_jar" alone.
I will add some error checking in later versions, but at the moment you'd probably have to be trying, to create an error, and it would only be an error with the batch, you wouldn't actually mess a file up or anything.
now outputs all files/folders to a subfolder "_out"
core files are now in "_bin" folder... batch files must be one level above this folder to work properly.
Drag and drop works from ANY folder, but always outputs to the "_out" folder.
rebuilt files are now signed with a test key, so shouldn't have any "unsigned" or "improperly signed" errors when trying to install after being rebuilt.
Click to expand...
Click to collapse
Let me know if you have any requests, or questions... happy to help in any way I can...
MEDIAFIRE [LATEST]: http://www.mediafire.com/?cablu617ijq22ac
benjamminzIS said:
Note: Brut.alll, if you happen to read this and would like me to remove apktool from being included with my batch scripts, please contact me and I will happily do so.
Click to expand...
Click to collapse
I'm always happy to see that someone uses and/or improves my tools
Brut.all said:
I'm always happy to see that someone uses and/or improves my tools
Click to expand...
Click to collapse
I know this will probably only appeal to the "newer" devs who are just getting started... but I'm a fan of less typing to accomplish the same goal, so I figured why not =)
thanks for your blessing, it's appreciated!
Linux compatable?
Daughain said:
Linux compatable?
Click to expand...
Click to collapse
not currently... but if linux supports drag and drop on scripts, I suppose I could look into porting it for linux... or if not I could just make a "manual" version for linux? (as in one that just prompts for for the options and filename and does the rest) I need to start familiarizing myself with linux anyways... so it would be a good learning experience for myself...
c'mon guys, over a hundred takers already and pretty much zero feedback! If there is anything functionality wise you looking for please let me know, I would like to be able to improve this for you guys, but if no one says anything, then I don't even know if it's working for you or not... 30seconds of your time to write a post isn't asking much =P
Great tool
2 of the 4 bat files worked great. The other 2 gave me the syntax usage be fore it said GOODBYE.
Working for me:
DRAGandDROPbuild.bat
DRAGandDROPdecompile.bat
Not working for me:
DRAGandDROPoptions.bat
APKtoolMANUAL.bat
Thank you. This would save sometime.
IamSonoma said:
Not working for me:
DRAGandDROPoptions.bat
APKtoolMANUAL.bat
Thank you. This would save sometime.
Click to expand...
Click to collapse
thanks for the feedback, I'll check it out... hopefully will have an update asap...
EDIT: main post updated, this patch is now obsolete...
nice, when i decompile a apk and change one string and then recompile it gives me application not installed (i am thinking its not signing the apk correctly)
for that matter if i dont change anything and decompile then recompile, same issue
benjamminzIS said:
can you try this out for me, and tell me if it solves your issue? if it does I will add to first post and update the main download...
Click to expand...
Click to collapse
Firmware: Froyo 2.2.1 KP5
Phone: Samsung Captivate
OS: Windows 7 and Windows XP
Code:
Batch File Tested: APKtoolMANUAL.bat
File Tested: Settings.apk
Decompile Errors: 0
Recompile Errors: 0
Folder Output: Settings_apk
Decompiled File Tested: Settings_apk\res\values\bools.xml
Edit made: <bool name="has_intrusive_led">false</bool> --> <bool name="has_intrusive_led">true</bool>
Changes took: Yes - <bool name="has_intrusive_led">true</bool>
Code:
Batch File Tested: DRAGandDROPoptions.bat
File Tested: Settings.apk
Decompile Errors: 1
Recompile Errors: N/A
Option chosen: d
Folder Output: Settings_apk.out
Result: Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.io.FileNotFoundException: C:\EASYapkTO
OLcompilerDECOMPILER_patch_v1.1" C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1\C:\EASYapkTOOLcompilerDECOMPILER_patch_
v1.1\Settings_apk (The filename, directory name, or volume label syntax is incorrect)
at brut.androlib.ApkDecoder.hasSources(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.directory.DirectoryException: java.io.FileNotFoundException: C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1" C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1\C:\Downloads\EASYa
pkTOOLcompilerDECOMPILER_patch_v1.1\Settings_apk (The filename, directory name,
or volume label syntax is incorrect)
at brut.directory.ZipRODirectory.<init>(Unknown Source)
at brut.directory.ZipRODirectory.<init>(Unknown Source)
at brut.androlib.res.util.ExtFile.getDirectory(Unknown Source)
... 4 more
Caused by: java.io.FileNotFoundException: C:\EASYapkTOOLco
mpilerDECOMPILER_patch_v1.1" C:\EASYapkTOOLcompilerDECOMPI
LER_patch_v1.1\C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1
\Settings_apk (The filename, directory name, or volume label syntax is incorrect
)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
... 7 more
Code:
More Testing
Batch File Tested: DRAGandDROPdecompile.bat
File Tested: Settings.apk
Decompile Errors: 0
Folder Output: Settings_apk
Decompiled File Tested: Settings_apk\res\values\bools.xml
Edit made: <bool name="has_intrusive_led">false</bool> --> <bool name="has_intrusive_led">true</bool>
Changes took: Yes - <bool name="has_intrusive_led">true</bool>
Batch File Tested: DRAGandDROPbuild.bat
File Tested: Settings.apk
Recompile Errors: 0
Folder Output: Settings_apk
Decompiled File Tested: Settings_apk\res\values\bools.xml
Edit made: <bool name="has_intrusive_led">false</bool> --> <bool name="has_intrusive_led">true</bool>
Changes took: Yes - <bool name="has_intrusive_led">true</bool>
Output File: Settings_REBUILT.apk
IamSonoma said:
Firmware: Froyo 2.2.1 KP5
Phone: Samsung Captivate
OS: Windows 7 and Windows XP
Click to expand...
Click to collapse
ok, will have to look into it... my apologies... looks like I'm handling the variables wrong...
No biggie. For the most part all is good. Plus I have been using cm7 and been busy.
Sent from my Captivate using XDA App
IamSonoma said:
No biggie. For the most part all is good. Plus I have been using cm7 and been busy.
Sent from my Captivate using XDA App
Click to expand...
Click to collapse
ok, looking at it a little closer, it looks as though you extracted the patch to a sub directory, if you ran the batch files from that subdirectory, then you will get errors as it is looking in that subdirectory for the _bin folder... try overwriting the original files, with the ones from the patch... then try again... let me know if you still get the error...
benjamminzIS said:
ok, looking at it a little closer, it looks as though you extracted the patch to a sub directory, if you ran the batch files from that subdirectory, then you will get errors as it is looking in that subdirectory for the _bin folder... try overwriting the original files, with the ones from the patch... then try again... let me know if you still get the error...
Click to expand...
Click to collapse
Ok. Thank you. Extracted the files again and moved folder to my e:\.
Working with contacts.apk it decompiled and recompiled fine. Contacts.apk did not work when I moved it to the system/app folder. I will test more later. the file was more compressed. I will recompile it later with winrar and the store command.
UPDATED!
fixed the syntax in DRAGandDROPoptions.bat and merged the fixes from the 1.1 patch...
also updated the thread name to be more proper... "compiler" instead of "builder" also updated the filename to match thread name... enjoy!
pyrator said:
nice, when i decompile a apk and change one string and then recompile it gives me application not installed (i am thinking its not signing the apk correctly)
for that matter if i dont change anything and decompile then recompile, same issue
Click to expand...
Click to collapse
I get the exact same problem no matter how I edit my apks and its confusing the hell out of me. Does anyone have any ideas on this? Happens with your tool here, and several others too.
Sent from my Nexus S
I have the same problem, and I think you are right about the signing.
I tried to resign the rebuilded file with autosign and I had the same resault. I mentioned that the file's size didn't change. I resigned again, using android commander' s sign option and at this time the file' s size incrased by 5K. The output file works without problems.
So, the problem seems to be with the apktoolj.
Thanks ill try that, it makes sense as I am trying to mod system apps such as camera and launcher2.
Thanks again! This could be what I'm looking for.
Sent from my Nexus S
strange, I thought apktool was supposed to sign as well? is it just not signing or is it improperly signing?
I am using the 1.3.1 version of apktool with this... I am using this version because 1.3.2 seems to have decompile/compile issues with many apk's...
I'm open to suggestions guys, please let me know if there is a "fix" I can implement and I will do so =)

[Q] editing framework-res.apk

Hey guys I need a bit of help..... I was trying to edit the drawables on my gf 's Eris in the framework-res.apk and when I recompiled the Rom and tried to flash my changes recovery tells me that the update script couldn't be verified due to framework-res.apk and aborts the installation.... what am I doing wrong? Do I need to sign this apk or something to make it work correctly? I did this on my Droid incredible the other day with no problem. I know there was another thread on this further down in Dec but unfortunately it didn't give me the answers I need...
Sent from my ADR6300 using XDA App
elixir911911 said:
Hey guys I need a bit of help..... I was trying to edit the drawables on my gf 's Eris in the framework-res.apk and when I recompiled the Rom and tried to flash my changes recovery tells me that the update script couldn't be verified due to framework-res.apk and aborts the installation.... what am I doing wrong? Do I need to sign this apk or something to make it work correctly? I did this on my Droid incredible the other day with no problem. I know there was another thread on this further down in Dec but unfortunately it didn't give me the answers I need...
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
I assume from reading your post that you updated the framework png's inside a Rom Zip package... You don't need to sign the framework, but you do have to resign the Rom Zip file. Try re-signing the rom file, that should get it working...
Macrodroid said:
I assume from reading your post that you updated the framework png's inside a Rom Zip package... You don't need to sign the framework, but you do have to resign the Rom Zip file. Try re-signing the rom file, that should get it working...
Click to expand...
Click to collapse
Any input on how to sign Rom files? I've never signed anything before
elixir911911 said:
Any input on how to sign Rom files? I've never signed anything before
Click to expand...
Click to collapse
You can sign it using gnarlycs kitchen.
Edit: another thing you could have done is just pushed your modded frameworkres to its folder and rebooted the phone.
Sent from my Incredible using Tapatalk
elixir911911 said:
Any input on how to sign Rom files? I've never signed anything before
Click to expand...
Click to collapse
find zip signer i believe its called u can use that
tazzpatriot said:
find zip signer i believe its called u can use that
Click to expand...
Click to collapse
Sterricson Zip Signer, or get SignApkTool from the market and sign it on your phone... Just make sure you use the test-keys for the rom file...
I used zip signer from the market.... is there anyway I can use this to sign apk 's like HTC messaging and HTC IME so that I can edit drawables in those apps?
Sent from my ADR6300 using XDA App
elixir911911 said:
I used zip signer from the market.... is there anyway I can use this to sign apk 's like HTC messaging and HTC IME so that I can edit drawables in those apps?
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Y don't u just download the kitchen so u can do it easier and do a bunch together...I think someone said this already I forget lol I need to look haha
Well I know how to sign sips I just want to know if I can sign apps like HTC messaging so they'll install on my device.... if I unzip and rezip afile it won't install on my device... will signing it fix this?
Sent from my ADR6300 using XDA App
i could never get that **** to recompile correctly. i gave up.
I use apk manager to decompile, compile, and sign apks. Unless I'm adding pngs I'm which case I use apktool. If your just editing or replacing what already exists apk manager is the easiest way in my opinion.
Sent from my ERIS using XDA App
elixir911911 said:
Well I know how to sign sips I just want to know if I can sign apps like HTC messaging so they'll install on my device.... if I unzip and rezip afile it won't install on my device... will signing it fix this?
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Those won't install...you need to push them to system/app and reboot. No need to sign them unless you resign a whole rom.zip
Conap said:
Those won't install...you need to push them to system/app and reboot. No need to sign them unless you resign a whole rom.zip
Click to expand...
Click to collapse
That's right.. thanks for adding that Conap. Also I was re-reading and just wanted to add as well that you don't want to unzip an apk to modify it and then zip it.. Use one of the other tools mentioned.. apktool or apkmanager
CondemnedSoul said:
That's right.. thanks for adding that Conap. Also I was re-reading and just wanted to add as well that you don't want to unzip an apk to modify it and then zip it.. Use one of the other tools mentioned.. apktool or apkmanager
Click to expand...
Click to collapse
Also for pc 7zip works good also. Just right click the file 7zip open archive drop your png where you want it. Close the apk and push it to system/app or where ever it came from.
If your on ubuntu just click your apk and drop your pngs. You don't even need an apk tool.
dinc¦rockin' the stock root
wildstang83 said:
Also for pc 7zip works good also. Just right click the file 7zip open archive drop your png where you want it. Close the apk and push it to system/app or where ever it came from.
If your on ubuntu just click your apk and drop your pngs. You don't even need an apk tool.
dinc¦rockin' the stock root
Click to expand...
Click to collapse
That does work as well but doing it that way you will need to optimize the .9's if you change them also. xultimate works great for that.
CondemnedSoul said:
That does work as well but doing it that way you will need to optimize the .9's if you change them also. xultimate works great for that.
Click to expand...
Click to collapse
Oh cool. I never really optimized any of them. What does that do?
dinc¦rockin' the stock root
ok big time mess up...I downloaded apk manager....I used the command prompt to adb pull Browser.apk. I put this in the modding folder and used the script.bat file to extract the apk....I edited my files annd hit re zip apk and chose the option to retain signature for system apps. Then when I adb push back it seems to work fine but when I reboot browser doesnt show up in my app list!!!!! help please!!! where did I mess up? I even tried to zip align to see if that would fix it.....If I try to use coommand prompt to adb push the original browser.apk back into place it says error read only file system.....I'm locked out! ah!
elixir911911 said:
ok big time mess up...I downloaded apk manager....I used the command prompt to adb pull Browser.apk. I put this in the modding folder and used the script.bat file to extract the apk....I edited my files annd hit re zip apk and chose the option to retain signature for system apps. Then when I adb push back it seems to work fine but when I reboot browser doesnt show up in my app list!!!!! help please!!! where did I mess up? I even tried to zip align to see if that would fix it.....If I try to use coommand prompt to adb push the original browser.apk back into place it says error read only file system.....I'm locked out! ah!
Click to expand...
Click to collapse
To push the original browser, /system needs to be mounted as r/w which can be done with the command "adb remount"
As for the problem with the modded browser not showing up, try this:
Code:
adb shell chmod 644 /system/app/Browser.apk
adb shell chown 0:0 /system/app/Browser.apk
#now reboot into recovery, wipe cache and dalvik-cache, and reboot
the string you typed for the modded browser....i type that into a normal command prompt not into apk manager correct? I tried to put my normal browser back with adb remount and it still doesnt show in my app list but if i look with a file explorer the apk is in the right place....why wont it show up?
OK i actually pushed my old browser successfully and it wouldnt show in my app list....I then followed your instructions and did adb shell chmod and chown and reboot wipe dalvik and cache and it still wouldnt show up. I really dont wanna have to flash a recovery image....
edit: If it has any importance this is actually on a droid incredible i was testing for my gf's eris. So idk if it changes anything that this is actually an inc.

Closed

I decompiled made all my changes,! Tried several times to get it recompiled.finally got it and the apk won't install parse package. Two days of code changing to make this,so if you can help me please advise on fix.Edit got it windows sucks...Linux rules.
blaz1nr said:
I decompiled made all my changes,! Tried several times to get it recompiled.finally got it and the apk won't install parse package. Two days of code changing to make this,so if you can help me please advise on fix.
Click to expand...
Click to collapse
You might want to try signing the apk,but then again,if you havent edited the manifest you wont need to sign it.Also make sure you drop the com.htc.resources.apk in the main CMD window before decompiling the apk. or it wont work.
Correct me if I'm wrong but...I didn't think you installed systemui like a normal app...if it recompiled without errors try pushing it to /system/app
Sent from my PC36100 using XDA
I was pushing it to system app. I think as it turns out it was my PC causing the problem. I'm fixing that right now. So I should be good to go.

[mod] ICS apk de/recompile script for APK Tool - Windows

ICS Framework-res.apk does not like to be decompiled and recompiled by APK tool.
The work around is to use 2 different versions of APK tool and keep swapping files for decompile and recompile.
I have put this in a handy little batch file package to manage all this. It really is basic stuff, but hopefully for those who are not quite sure, it will ease the pain a little.
Please feel free to test it. Enjoy:
This is an updated script to modify ICS *.apk using APK tool.
I take no credit for Apk tool or the process.
I have simply automated it for Windows as there are issues with ICS framework-res modification
Pre -requisites
1. WinRar
2. Java
Click to expand...
Click to collapse
Initial setup
1. Extract the apk folder from the .zip to the root of C:\
The structure should then look like c:\apk\ACTIONS
2. Go into c:\apk\ACTIONS\Install_files
3. Double click "Setup_Install.bat"
Click to expand...
Click to collapse
Usage
Simply double click START.bat and follow the instructions
Click to expand...
Click to collapse
Limitations
Can decompile any one .apk with any name at a time. Do not put any .apk files into the "in" folder until prompted to.
Click to expand...
Click to collapse
Thanks to Rob222 for confirming the method.
Updated the OP. Now can decompile / recompile any name .apk
Simple script. Double Click start and follow prompts.
hi!
got this problem
Ficheiro não encontrado
1 ficheiro(s) copiado(s).
Error: Unable to access jarfile C:\Windows\System32\\apktool.jar
Click to expand...
Click to collapse
any hint ?
i already made the java paths .. tryed java6 and java7
but always that error
ruizit0 said:
hi!
got this problem
any hint ?
i already made the java paths .. tryed java6 and java7
but always that error
Click to expand...
Click to collapse
What command did you run when you did that?
Did you run the setup file first?
You will need to be an administrator. Are you? If so try right click on the start script > Run as administrator
Just realised I somehow had left part of the usage instructions for the old version in the post by mistake. That maybe why some of you have issues.
Nice one bro... that was surely something that many have tried.. nice work..
Sent from my GT-I9300 using Tapatalk 2
Did not work
I set up the script as per the OP but I get the error attached
Think I need this. Getting errors trying to build apks.
Sent from my GT-I9300 using xda premium
Phone_Guru said:
I set up the script as per the OP but I get the error attached
Click to expand...
Click to collapse
Please walk me through, step by step what you did from downloading to receiving this error
Sent from my GT-I9300 using Tapatalk 2
Hey I'm a total noob with apktool on win. But I have unzipped apks on my phone using root explorer swapping res files and made working theme mods...
Could you guide to a good guide to doing this stuff on windows with a GUI I'm code illiterate virtually but know what's going on
Sent from my GT-I9300 using xda premium
I was able to get the CM 10 Framework-res to decompile and recompile using this version:
http://www.mediafire.com/?clk29i70rg7n8i9
The beauty of apks is that if you're swapping oranges for oranges, you don't need to decompile. You only really need to decompile if you're changing XML files.
To swap one image for another image with the same name is easy.
1)Download winrar (or 7zip - but I use winrar).
2)Open the apk with winrar (do NOT extract)
3)Delete the images you want to change
4)Drag the replacement images back in. When the window pops up with options, change "compression" to "store"
5)Close winrar
Sent from my GT-I9300 using Tapatalk 2
rootSU said:
The beauty of apks is that if you're swapping oranges for oranges, you don't need to decompile. You only really need to decompile if you're changing XML files.
To swap one image for another image with the same name is easy.
1)Download winrar (or 7zip - but I use winrar).
2)Open the apk with winrar (do NOT extract)
3)Delete the images you want to change
4)Drag the replacement images back in. When the window pops up with options, change "compression" to "store"
5)Close winrar
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Oh... yeah cool so this automates replacing different images in the apk with the same location... I just use a vrtheme skeleton CMW.zip folder and zip it when done for flashing.
So how do you decompile the arsc archive and mess with deeper stuff?
Sent from my GT-I9300 using xda premium
thankssssssssssssssssssssss Alot
first i Run Setup_instal.bat as administrator in "C:\apk\ACTIONS\Install_Files"
after that my problem solve (i have problem like post 2 and 3)
and thats Awsome ,
graffixnyc said:
content removed
Click to expand...
Click to collapse
Kindly remove your link. This thread is about the mod I am sharing, which I scripted. It is not about other mods.
rlorange said:
Oh... yeah cool so this automates replacing different images in the apk with the same location... I just use a vrtheme skeleton CMW.zip folder and zip it when done for flashing.
So how do you decompile the arsc archive and mess with deeper stuff?
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
No, you don't use this at all if you're going to be changing images. This is for the deeper stuff.
rootSU said:
Please walk me through, step by step what you did from downloading to receiving this error
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
I did exactly what the OP says, extracted the files into the root of the C drive, ran the setup and clicked on the start.bat and followed instructions. I now ran the setup again and took a screenshot of what appeared because it was so fast I couldn't see it. It said access denied and 0 files copied. I then took ownership of the System32 folder and ran setup again and it said 1 file copied. I now ran the start.bat again and got the attached error.
So am I right in thinking that you can't simply merge folders/files and zip like you can with root explorer because windows is not a Linux system?
Sent from my GT-I9300 using xda premium
Phone_Guru said:
I did exactly what the OP says, extracted the files into the root of the C drive, ran the setup and clicked on the start.bat and followed instructions. I now ran the setup again and took a screenshot of what appeared because it was so fast I couldn't see it. It said access denied and 0 files copied. I then took ownership of the System32 folder and ran setup again and it said 1 file copied. I now ran the start.bat again and got the attached error.
Click to expand...
Click to collapse
can you try right clicking the start.bat and run as administrator please? You're still getting access denied messages.
rlorange said:
So am I right in thinking that you can't simply merge folders/files and zip like you can with root explorer because windows is not a Linux system?
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
You can swap anything like-for-like. You can put in a replacement folder, xml file or png as long as everything has the same name.
If you want to edit an existing XML, you cannot do this without decompiling as when an xml is compiled, it does not appear as plain text. Similarly if you want to add more pngs or xml files, resources changed so it has to be decompiled too.
But if its simply swapping like-for-like, you can just use winrar or 7zip as mentioned earlier.
rootSU said:
can you try right clicking the start.bat and run as administrator please? You're still getting access denied messages.
Click to expand...
Click to collapse
I tried that and still got the error messages.

Decompiling/compiling SystemUI.apk

I have been trying all night to compile SystemUI.apk
Does anyone have a quick link to a guide that they used to de/compile SystemUI.apk so i can change some smali and some .xmls??
all the guides ive found have not solved my compiling issues.
Download apktool and set it up correctly make sure the latest java is installed along with the most recent jdk. You have to load the framework usually before you edit a system apk, and remember system.apk's don't need to be signed. Sometimes it is necessary to load a secondary framework-res most likely for tw roms/firmware
apktool if framework-res.apk
apktool d SystemUI.apk
Leave window open
apktool b SystemUI blahblahblah.apk
After it's done
Drag meta-inf and androidmanifest.xml from old apk to new one, zip align and rename blahblahblah.apk to specific apk and voila push to system/app set permissions rw-r-r or chmod 644 reboot wipe cache and dalkvik fix permissions and you're ready to rock and roll
There is a thread on xda by ibotpeaches concerning apktool I would take a long hard look at it before you get into this stuff. Wouldn't want you messing anything up getting your phone stuck in a boot loop.
USMC0341 said:
Download apktool and set it up correctly make sure the latest java is installed along with the most recent jdk. You have to load the framework usually before you edit a system apk, and remember system.apk's don't need to be signed. Sometimes it is necessary to load a secondary framework-res most likely for tw roms/firmware
apktool if framework-res.apk
apktool d SystemUI.apk
Leave window open
apktool b SystemUI blahblahblah.apk
After it's done
Drag meta-inf and androidmanifest.xml from old apk to new one, zip align and rename blahblahblah.apk to specific apk and voila push to system/app set permissions rw-r-r or chmod 644 reboot wipe cache and dalkvik fix permissions and you're ready to rock and roll
There is a thread on xda by ibotpeaches concerning apktool I would take a long hard look at it before you get into this stuff. Wouldn't want you messing anything up getting your phone stuck in a boot loop.
Click to expand...
Click to collapse
I already know about installing the framework, and i installed both twframework-res.apk and framework-res.apk. i also installed SystemUI.apk as per several posts. I already read through ibotpeaches' post, that is where i got apktool afterall = ). in still running into compiling errors however.
Any ideas?
As implied, I have decompiled no problem, its compiling im running into issues with.
Nv1dia said:
I have been trying all night to compile SystemUI.apk
Does anyone have a quick link to a guide that they used to de/compile SystemUI.apk so i can change some smali and some .xmls??
all the guides ive found have not solved my compiling issues.
Click to expand...
Click to collapse
Here you go man he tells you exactly how to do it its not that hardhttp://forum.xda-developers.com/showthread.php?t=2279024
Sent from my GT-I9505 using xda premium
jthrasher47 said:
Here you go man he tells you exactly how to do it its not that hardhttp://forum.xda-developers.com/showthread.php?t=2279024
Sent from my GT-I9505 using xda premium
Click to expand...
Click to collapse
I am afraid this is not the answer as my errors look nothing like that. I remember reading a while back when i themed for the GS3 that i needed to move files out of apk before decompiling, i can't seem to find this page again however..... in any case thank you both for the help, i will just have to continue looking.
Nv1dia said:
I am afraid this is not the answer as my errors look nothing like that. I remember reading a while back when i themed for the GS3 that i needed to move files out of apk before decompiling, i can't seem to find this page again however..... in any case thank you both for the help, i will just have to continue looking.
Click to expand...
Click to collapse
Why haven't you posted the log so the compile error can be seen. How can you expect help without giving all the vital information?
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta
Nv1dia said:
I am afraid this is not the answer as my errors look nothing like that. I remember reading a while back when i themed for the GS3 that i needed to move files out of apk before decompiling, i can't seem to find this page again however..... in any case thank you both for the help, i will just have to continue looking.
Click to expand...
Click to collapse
That link is showing the framework-res.apk error. Your getting "style" errors correct? You need to modify 2 XMLs from the res/layout folder. And cause I'm a nice guy I'll link you to my DB that has the modified ones and originals. PM me and I'll share my DB folder with you. Its very easy. The aapt for apktool needs updating but we Ave to resort to workarounds for the time being. Same thing for framework-res.apk and others. We'll get ya straightened out!
Sent from my SPH-L720 using Tapatalk 2
reverepats said:
That link is showing the framework-res.apk error. Your getting "style" errors correct? You need to modify 2 XMLs from the res/layout folder. And cause I'm a nice guy I'll link you to my DB that has the modified ones and originals. PM me and I'll share my DB folder with you. Its very easy. The aapt for apktool needs updating but we Ave to resort to workarounds for the time being. Same thing for framework-res.apk and others. We'll get ya straightened out!
Sent from my SPH-L720 using Tapatalk 2
Click to expand...
Click to collapse
I have resolved the issue.. Thanks for the help though! Turns out a simple reboot of my computer was all i needed. I wasnt getting a styel error. It was a simple Java error is all. Thank you everyone for all your help!

Categories

Resources