Help with apktool - Nook Touch General

I am having an interesting time with apktool. Much of the problem is due to ignorance on my part and I've done some reading and searching but it's still opaque to me. Just to be sure I was even close to getting a result I did the following:
1. Installed a copy of the framework-res.apk from my NST ("1.apk")
2. Decompiled the apk I'm working on ("Books_1.5.2")
3. Recompiled the same app, without changes
Almost immediately I get a string of errors as shown in the attached image. They don't mean a lot to me, but I have suspicions that I don't have the minimum requirements of JRE or JDK or something of the sort on my machine. I don't want to go the whole SDK route if I can avoid it. I just want to play around a little.
I've tried several versions of apktool and always get a similar result. Can someone help?

Um, you don't copy the framework to 1.apk, you make it.
Code:
apktool if [i]myframeworkres.apk[/i]
Errors out of apktool are difficult.
Maybe it really just can't find aapt.exe, Android Asset Packaging Tool.
It should be in myandroidsdkdir\build-tools\version\aapt.exe

Renate NST said:
Um, you don't copy the framework to 1.apk, you make it.
Code:
apktool if [i]myframeworkres.apk[/i]
Errors out of apktool are difficult.
Maybe it really just can't find aapt.exe, Android Asset Packaging Tool.
It should be in myandroidsdkdir\build-tools\version\aapt.exe
Click to expand...
Click to collapse
Thanks. My bad with the framework. That is what I did but it also turned out to be the problem. I saw a suggestion somewhere to skip that step and when I did everything worked fine!
Always something...

Related

(Dev) Here goes nothing

This is my attempt to get some more creativity, innovation, and roms here on xda. alot of people here have incredible skills but they cant be harnessed because they dont know what to do. if you are an artist we need you make icon packs. you have made 30 roms but you cant sign them. blah blah.
so no one abuse this but i attached a toolkit to do anything and everything with android on windows. im pushing this to be used for creating themes. hopefully it can help. but i thought it would be nice if everyone had this and the opensource community could start to grow even more.
i like this idea because it can help fellow Devs and even the watchers. everyone can get involved and give something to the community.
And now i present the Avabox
Any questions post them up.
OUTLINE------------------------------------------------------------
unyaffs-you have the ability to take system.img and data.img from you nandroids and get specific items from them.
Autosign- sign anything and everything. name your zip update.zip and follow the readme. roms themes, apps, anything.
Baksmali- put in apk in the folder. read readme. edit any icons wallpapers, anything. close it up and enjoy.
Perlscripts- this opens the boot.img for you.
Read the readme on all of these programs.
So this is going to be a quick tutorial Im gonna put up a video soon on how i got this to work on my computer
First things first download Avabox and unzip it in your C folder (same place you put androidsdk).
then get the java runtime from here not to be confused with the java development kit but since your there might as well grab it as well.
Install the java runtime then reboot
then open up avabox and click on autosign and place the zip you want signed in that folder and name it update.zip (dont add the .zip part it should already be a zip file).
then open up command prompt and type:cd\
cd Avabox/auto-sign
java -jar signapk.jar testkey.x509.pem testkey.pk8 update.zip update_signed.zip
After that last enter give it a second and look in your avabox/update file and you'll notice a new file called update_signed.zip
I know that this is almost word for word from the read me but a few differences can go along way expect a video shortly..... well around wednesday or whenever i can get someone to help with this
porting
im interested in learning how to port and combine different aspects of themes and other mods. will this do it or is there other software i need. I can do the work if shown the way. I read all the post everday with peopl;e asking for this and that and i do it myself. If shown I would help with requests as much as possible. HELP PLEASE
Thank you Avalaunch!!
so with this software, can i take a signed theme mod (like launcher or taskbar) and it will grab the images for me to edit, and then repack and sign to a flashable zip?
Everyone that knows how to use bak/smali, I have a question.
The modifications I made to the extracted pngs aren't getting transferred back to the original apk when I close it back up. Any Ideas? I'm getting really close to a breakthrough for 2.1. Any help would be appreciated
regaw_leinad said:
Everyone that knows how to use bak/smali, I have a question.
The modifications I made to the extracted pngs aren't getting transferred back to the original apk when I close it back up. Any Ideas? I'm getting really close to a breakthrough for 2.1. Any help would be appreciated
Click to expand...
Click to collapse
hm ill have to check into it. it should be making a new classes.dex too. i never really used it on edits.
Avalaunchmods said:
hm ill have to check into it. it should be making a new classes.dex too. i never really used it on edits.
Click to expand...
Click to collapse
It changes the classes.dex and resigns it it looks like, but doesn't copy the mods of the pngs to the apk.
regaw_leinad said:
Everyone that knows how to use bak/smali, I have a question.
The modifications I made to the extracted pngs aren't getting transferred back to the original apk when I close it back up. Any Ideas? I'm getting really close to a breakthrough for 2.1. Any help would be appreciated
Click to expand...
Click to collapse
What do you mean? Baksmali and Smali are for decompiling classes.dex and opening it up for the .smali files that are inside. Smali takes that output and recompiles it back into classes.dex for your .apk or .jar file.
You need to update the baksmali and smali .jar's. You have older versions and that will cause issues with certain .jar and .apk's when decompiling. baksmali-1.2.1.jar and smali-1.2.1.jar are the latest versions and will not require the BOOTCLASS PATH to be included...
Does the autosign work windows 7 (64 bit)? I've heard issues with other autosigns on 7. If it doesn't, no biggie I got xp in a VM... lol
obannvi said:
What do you mean? Baksmali and Smali are for decompiling classes.dex and opening it up for the .smali files that are inside. Smali takes that output and recompiles it back into classes.dex for your .apk or .jar file.
Click to expand...
Click to collapse
Yeah I get it now, after playing with it for a while.
Avalaunch, you should change the first post.
Baksmali- put in apk in the folder. read readme. edit any icons wallpapers, anything. close it up and enjoy.
Click to expand...
Click to collapse
that description is a little confusing to a person that NEVER used smali/baksmali before. It makes it seem like after you edit the unzipped files, you could just run smali and it will put al the changes in the new apk. I figured out that's not how it works lol I feel pretty stupid now looking back at my last question haha
regaw_leinad said:
Yeah I get it now, after playing with it for a while.
Avalaunch, you should change the first post.
that description is a little confusing to a person that NEVER used smali/baksmali before. It makes it seem like after you edit the unzipped files, you could just run smali and it will put al the changes in the new apk. I figured out that's not how it works lol I feel pretty stupid now looking back at my last question haha
Click to expand...
Click to collapse
What im trying to figure out is why would you even need to use baksmali/smali to edit .png's inside an .apk. All that needs to be done is opening of the .apk with 7zip, modify whats in /res/drawable etc then close...No need to sign .apks or anything. If anything, the script needs to contain something to extract /res/ * from the .apk to edit.
obannvi said:
What im trying to figure out is why would you even need to use baksmali/smali to edit .png's inside an .apk. All that needs to be done is opening of the .apk with 7zip, modify whats in /res/drawable etc then close...No need to sign .apks or anything. If anything, the script needs to contain something to extract /res/ * from the .apk to edit.
Click to expand...
Click to collapse
I'm actually doing more than that. I am changing the code to look for instead of <name of file>.jpg to <name of file>.png
While also putting the new png in the apk. Think that's possible? I changed all of the locations where that file comes up in the smali code.
regaw_leinad said:
I'm actually doing more than that. I am changing the code to look for instead of <name of file>.jpg to <name of file>.png
While also putting the new png in the apk. Think that's possible? I changed all of the locations where that file comes up in the smali code.
Click to expand...
Click to collapse
I gotcha. So you're looking in blah.smali for any reference to .jpgs and changing that reference to look for .png instead??
obannvi said:
I gotcha. So you're looking in blah.smali for any reference to .jpgs and changing that reference to look for .png instead??
Click to expand...
Click to collapse
yeah, not working too well atm, but working on it.
I think this is what I've been looking for. Downloading now.
Just noticed that ActivePerl was for 64bit. I am downloading 32bit as I have only have 32bit Vista Pro installed and not the 64bit.
regaw_leinad said:
Yeah I get it now, after playing with it for a while.
Avalaunch, you should change the first post.
that description is a little confusing to a person that NEVER used smali/baksmali before. It makes it seem like after you edit the unzipped files, you could just run smali and it will put al the changes in the new apk. I figured out that's not how it works lol I feel pretty stupid now looking back at my last question haha
Click to expand...
Click to collapse
i guess i need to explain more. i use baksmali to make apks easier to search through. for me at least. instead of changing the type and everything i just put it in the folder and baksmali then do changes and create a new archive. sign and change .apk. if you smali it back to apk then it wont save edits. sorry about that anyways has this helped people so far? i love showing that windows can be a dev platform
&RoidRage said:
I think this is what I've been looking for. Downloading now.
Just noticed that ActivePerl was for 64bit. I am downloading 32bit as I have only have 32bit Vista Pro installed and not the 64bit.
Click to expand...
Click to collapse
yes just google active perl i use win 7 64bit and when this toolbox was made, it was only made for certain people who had 64bit.
Sorry for the n00b question, but I have searched and haven't had much luck. Hopefully, this is the best place for this question. I just started editing .png's and updating some apk's files to customize some things on my phone for looks. However, I am really interested in modifying the taskbar and notification screen, but I have no clue where to start. Is there a guide somewhere I could follow to learn how to change them? What programs, if any additional ones will I need etc..?
Thanks for your help!
Figured it out on my own. framework.apk and resources.apk

Apktool and Rosie.apk

Okay I am trying to make some changes to my Rosie. I'm not going to ask how to make the changes I want I will hopefully figure it out myself....My question is about apktool. I keep getting FC on startup after trying to decompile and the build the rosie apk without making changes. What I've done
1) apktool d Rosie.apk
no errors ( Yes I have put the correct htc framework into apktool fw)
2)I Made no changes at all
cd Rosie
apktool b
3)I go to the build dir and the apk is there from here I have tried two different things
3a) Sign the apk using
java -jar signapk.jar testkey.x509.pem testkey.pk8 Rosie.apk your_app_signed.apk
3b)Leave the apk alone withouot signing it since it's a system app I dont think it needs to be signed, but I'm not sure
4) I put into a flashable file, in my update script I wipe dalvik cache as well, everything installs fine and I know this step isn't the issue
5) I reboot nand get constant FC so I have to pull the battery
I can't figure out why I'm getting this error so If anyone can help I would appreciate it alot....Thanks
it's not just Rosie I cant get to work....It's any apk...I decompile and build and they dont work with non changes....any ideas?
Hey bro I just started a thread on this in the theming section I'm with you on the Rosie.apk can't get it to work.
I haven't done system apps before, but I have successfully used apktool. There is (if it's different or maybe I'm just losing my mind) and additional tool called apk manager that utilizes the apk tool. That's what I've used that's so successful. It basically just gives you a list of choices with what to do with your apk. All you do is place the apk in the specific folder where the script can reach it and then run he script, make your choices, and bam. You have what you want. That could be either a system apk, regular apk, or a folder that's been decompiled. (I used a tool after that called j2gui that let's you take the .classes file and see a near perfect reproduction of the original java code).
Jack Attack!
I have had my fair share of dealings with Rosie, but apktool can do the job.
Everything up to Step 3 is good, although I don't 'cd' into Rosie, I just run:
apktool b Rosie from the previous folder.
Anyway, system files like Rosie do not need to be signed so scrap that route. The issue you have is with the new Rosie.apk that's been compiled not containing the original META-INF folder so won't be accepted by the system.
Check out this post that describes in full what I am trying to say. You'll want to focus on Step 3 and onwards in that post
i'm trying to do the same thing and i'm having a ton of different problems.
I believe about a month ago I checked the Apktool website and checked their list of bugs. There is a really nasty bug in the newest version (at the time I read it) where if you generated your .apk, then some things would be written incorrectly and of course would be the reason why your apps no longer work.
I'm gonna suggest you all check what versions you have and go to the previous version which worked great, or they might have fixed that already.

[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 =)

Development: Files to APK....?

Hi,
Sort of new in the development world, been workign with some examples and changign some files around , but i have no apk yet.
I have all the folders, and files. as in the picture enclosed
-Assests
-bin
-gen
-res
-src
-.classpath
.project
AndriodManifest.xml
default.properties
So my question is.
How can i make this into an APK file? I have the files, already made and since the example was provided to me in ZIP file, i dont have many options..
I know and read that i would need eclipse etc for programming, but i figure the program is already made Just not in APK
so how do I make this an APK file?
I tried Apk manager, but u need an APK for it
Uhm, yeah, I don't think this is going to work like that. Install eclipse, ADT plugin and import the Project and then you can try to build the apk!
You cant compile code into an executable apk without a development environment, such as eclipse.
Sure you can. Check out:
http://developer.android.com/guide/developing/building/building-cmdline.html
I would STRONGLY suggest you install eclipse (or equivalent) because it makes things so much easier. You'll struggle otherwise.
An APK can be made, completely from scratch, from the command line but why on earth would you want to?
Yeap, eclipse does everything.
You can compile it on an AVD via eclipse, or even straight to your phone, if you connect it by the time you run the program in eclipse.

Can't decompile SecSettings ApkTool

Hi
I try to decompile SecSettings by apktool and i get this:
Code:
C:\apktool>apktool d secsettings.apk SecSettings23
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x7f020052 drawable/avatar_default_6, config=-hdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
5)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
What to do ??
Thanks
Please any help?
Same issue here
osherdadon said:
Please any help?
Click to expand...
Click to collapse
Using a Note 3 from T-Mobile, I pulled the file with the adb command, with root explorer, and extracted it from the stock ROM file all giving me the same error. For some reason I also don't get any smali files out of my SystemUI.apk which has been driving me crazy. I can't seem to find any working answers yet... Fail...
Basically bumping this thread a half a year later...
SOMEONE HELP US
You have the relevant frameworks installed and java in your path?
Learned a lot in 24 hours
DSA said:
You have the relevant frameworks installed and java in your path?
Click to expand...
Click to collapse
Summary/Lessons Learned in the last 24 hours:
I must have been too tired, went to sleep got up again and went at it. I realized a few things, main thing was deodexing, I learned all about that. Converting the .odex file to a class.dex file inside the SystemUI.apk and SecSettings.apk so decompiling would work properly (I was originally missing the smali folder without deodexing my app). Second I needed to pull all the framework files from my device instead of just the two I had, then I used "apktool if framework-res.apk" then "apktool if twframework-res.apk" then "apktool d SystemUI.apk" then "apktool d SecSettings.apk". This time it actually worked, I proceeded to try and re-compile them just to test. The SystemUI.apk worked flawlessly but the the SecSettings.apk had errors then I realized I needed to copy the AndroidManifest.xml and resources.arsc from the original app to the decompiled folder and the SecSettings.apk compiled with no issues. I had to get the original file out of the stock ROM, it had gotten damaged somehow with zipping/raring/7zipping so quicktip no one should be zipping the files you're about to work on get it fresh from the ROM.
Current Issue:
Now that all that's done I'm onto what I was trying to get at when I started this whole project. I need to modify both of these apps which are now perfectly deodexed and on my stock device. Every time I try to modify these files I lose my status bar and my settings stop working, I'm obviously breaking it, this is the XDA guide I was following.
Any help or redirection on where to post would be greatly appreciated, thanks
Easiest thing - put your mod back in and get the status bar to disappear/fc whatever
Then, pull a log (catalog from appstore works fine)
Post that log at pastebin and link it here
We won't be able to solve your issue without knowing what it is, in the first place
Like this?
This was before I restarted: Log 1
Then I recorded for a little after I restarted probably pointless but that's where the error would have been: Log 2
DSA said:
Easiest thing - put your mod back in and get the status bar to disappear/fc whatever
Then, pull a log (catalog from appstore works fine)
Post that log at pastebin and link it here
We won't be able to solve your issue without knowing what it is, in the first place
Click to expand...
Click to collapse
Not sure exactly how to record it and send it to you, I pressed record but when the phone finished rebooting CatLog was closed so I reopened it and it keeps scrolling endlessly.
Research progressed a little
I came across a post here in the Flashlight Mod development thread which made me realize I'm not getting the ID's correct. They suggest compiling the modded SystemUI.apk to get the ID's into the apk file under the /res/values/public.xml file, then decompiling it to read the ID values. I'm missing a step or doing something wrong, I can't replicate it to find the ID values I need so I can add them to the .smali file and recompile a final time. I'm sure this is the only reason for the missing status bar and the force closes. I guess I need help understanding, a different set of instructions or just more detailed?
I can't post in that thread yet so I'm getting my posts up over here, I already posted in the Q&A thread but no one has responded yet, any help is greatly appreciated!
I get this when decompiling the modded apk: Modded SystemUI ApkTool Decompile
All these errors look like the file is broken now or something, I'm just lost at this point. I tried ApkTool 1.5.2 and 2.0 as well.
EDIT:
Additional info below for troubleshooting purposes since it seems my issue recompiling at the end to get the values for my public.xml
STEPS:
1. deodex (universal deodexer v5)
2. decompile (apktool 1.5.2 & 2.0 separate tests)
3. modify (add flashlight .png's and .smali file from 4.4kk flashlight mod files)
4. recompile (apktool)
5. decompile (apktool)
=
Errors <<<<< These errors solved in edit below
EDIT:
I forgot to use "apktool if SystemUI.apk" when loading "framework-res.apk" & "twframework-res.apk" now I get through decompiling and recompiling like I thought I should be and I even located the values int he public.xml, replaced them in the .smali and everything went peachy. Only problem is I never get the status bar after I reboot, not really getting any FC's but the status bar, if my goal were to get it to be invisible I would be so happy omg lol If you're curious I've also tested by signing and even another test with zipalign, nothing zip/zero/zilch...
EDIT... Again I know still no sleep, durp durp:
So my main issue was not using apktool v1.5.2 to decompile and v2.0 to compile EVERY SINGLE TIME, NO EXCEPTIONS. When I followed that simple rule I get it onto my device and she has no status bar... Hmmmmm..... And a logcat for anyone smart enough to help me
EDIT:
Maybe I'm in the right direction with an error I saw in the log at this post? I thought it was so I installed the DisableSignatureVerification Mod from the Xposed Modules and still nothing.
Calling All Developers
It's been like 2 weeks just curious if anyone has even looked at this, I haven't been able to make any progress so I started learning how to develop apps. I made two small apps basic flashlight and a counter app but I really want to know why I'm totally unable to mod a file on my phone. I can't get the ink effect to work with finger input either I've been really trying to get this flashlight mod and the ink effect for months. If I could get pointed in the direction of a developer that can actually help me I don't see why I couldn't donate like $10 or $20 to the one who helps me. I'm on android 4.4.2 (NK3) on my Note 3 from T-Mobile.

Categories

Resources