yashsingh1/xdaforums huggingface dataset:
[Android Software Development] roids87:
I have, i should have included the errors that come along with com.htc.resources.apk

* com.htc.resources.apk Found Installing

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
[Android Software Development] raziel23x:
htc......Thoughs always give trouble when trying to decompile for some reason or recompiling have you tried reporting this to ibotpeaches apktool thread as I have no clue how to fix this as this is a apktool binary issue
[Android Software Development] RagzDog:
hello guys.... i've a problem with decompiling .apk - i'm building a rom but i am locked here

when i search to decompile systemUI of galaxy s3 with emb5 firmware , compare me this errror

this problem there is also with secSettings and framework-re.apk

excuse me for the lenguage :o
[Android Software Development] raziel23x:
Re: [Windows XP/VISTA/7/8][UTILITY][TOOL] APK Multi-Tool

Have you tried the latest experimental build?
[Android Software Development] RagzDog:
No.... crashed me

Now i can to do it newli

Where i can find it ??
[Android Software Development] raziel23x:
Re: [Windows XP/VISTA/7/8][UTILITY][TOOL] APK Multi-Tool

Original post
[Android Software Development] RagzDog:
i've the same problem with experimental release'
[Android Software Development] raziel23x:
Re: [Windows XP/VISTA/7/8][UTILITY][TOOL] APK Multi-Tool

Are you puking all the APK files from the framework folder of you're room and installing them
[Android Software Development] RagzDog:
I didn"t know ... sorry
[Android Software Development] D-m-x:
Is there any trick to de and recompile Google Apps. I keep trying to change a line in the Google Currents Code but as soon as i try to install the apk later im getting a "Parsing Error" or "App not installed".

Worked fine for other Apps from the Market though, so i have no clue where to look/what to change.
[Android Software Development] careenprokop85:
log error is as follows:

|Mon 04/01/2013 -- 13:06:54.39|

--------------------------------------------------------------------------

'mode' is not recognized as an internal or external command,

operable program or batch file.

java version "1.7.0_17"

Java(TM) SE Runtime Environment (build 1.7.0_17-b02)

Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode, sharing)

not having any luck finding anything about this error log. any ideas? im just trying to decompile an app called dragonvale for testing some stuff and basically to expand my own knowledge on how this modding, editing apks works lol
[Android Software Development] raziel23x:
Re: [Windows XP/VISTA/7/8][UTILITY][TOOL] APK Multi-Tool

From the looks of it you jagged a corruption in your registry
[Android Software Development] RagzDog:
Anyone can help me ??
[Android Software Development] raziel23x:
Re: [Windows XP/VISTA/7/8][UTILITY][TOOL] APK Multi-Tool

With what
[Android Software Development] RagzDog:
Ecco .... i ve installed framework-res .. twframework and sidtemUI

Opening setup.bat in apkmultitool folder
[Android Software Development] raziel23x:
Re: [Windows XP/VISTA/7/8][UTILITY][TOOL] APK Multi-Tool

It is telling you what to do to pull though files also and install them from the frameworks folder of the ROM system and manually install them
[Android Software Development] D-m-x:
Any clue, someone?
[Android Software Development] raziel23x:
Re: [Windows XP/VISTA/7/8][UTILITY][TOOL] APK Multi-Tool

There are some apk which we call magic apk files which will never function after being edited kinda like little black boxes
[Android Software Development] D-m-x:
Thank you, I did not know that.

Gesendet von meinem Nexus 7 mit Tapatalk 2
[Android Software Development] RagzDog:
hello :o

i've a problem

when i open setup.bat for install twframework-res e framework-res compare me : adb was not found, but i've installed correctly jdk
[Android Software Development] raziel23x:
Which version are you using
[Android Software Development] RagzDog:
Experimental release
[Android Software Development] baySF:
Can someone help me out here? I've never used APK Tool before because I always had UOT Kitchen do it for me. Anyways. I'm editing a CM10 Theme but all I did was replace a few icon png images in the res folder. My steps were:

1. extracted apk.

2. replaced images.

3. opened archive through 7zip.

4. deleted original res folder.

5. dragged and dropped the extracted res folder into the theme apk file.

6. closed it out.

Do I need to sign this apk still or can I just install it? How do I go about signing it if I have to? Sorry if this is a noob question.
[Android Software Development] AndyOpie150:
Do You have the latest Java jdk6 installed? If so do you have the old class path deleted (the 1.7.0_17), and the class path to the Java jdk6's java exe in it's place?

I got the same error until I did those things I described.
[Android Software Development] 3to4:
Thank you. I was able to decompile and compile SecPhone.apk with this great tool. None of apktools I tried worked..
[Android Software Development] raziel23x:
You just have to place the APK in the the modify APK folder run the proper script then depending on the option you choose you may or may not have to sign
[Android Software Development] baySF:
This thing is unbelievably confusing. All I want is to sign and zipalign or whatever it is I have to to do be able to use a CM10 theme that I modified and I have no idea what to do or even how to begin.
[Android Software Development] Brakiss:
having issues getting my apk to zipalign and sign for sense 4+ Here is log:

java version "1.7.0_17"

Java(TM) SE Runtime Environment (build 1.7.0_17-b02)

Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

at brut.androlib.Androlib.readMetaFile(Androlib.java:164)

at brut.androlib.Androlib.build(Androlib.java:183)

at brut.androlib.Androlib.build(Androlib.java:176)

at brut.apktool.Main.cmdBuild(Main.java:228)

at brut.apktool.Main.main(Main.java:79)

Caused by: brut.directory.PathNotExist: apktool.yml

at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)

at brut.androlib.Androlib.readMetaFile(Androlib.java:160)

... 4 more

'zipalign' is not recognized as an internal or external command,

operable program or batch file.

Could Not Find C:\android\APK-Multi-Tool\place-apk-here-for-modding\signedMms.apk

The system cannot find the file specified.

The system cannot find the file specified.

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

at brut.androlib.Androlib.readMetaFile(Androlib.java:164)

at brut.androlib.Androlib.build(Androlib.java:183)

at brut.androlib.Androlib.build(Androlib.java:176)

at brut.apktool.Main.cmdBuild(Main.java:228)

at brut.apktool.Main.main(Main.java:79)

Caused by: brut.directory.PathNotExist: apktool.yml

at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)

at brut.androlib.Androlib.readMetaFile(Androlib.java:160)

Ideas?
[Android Software Development] raziel23x:
Zipalign broken I will fix it next commit
[Android Software Development] baySF:
Every time I run the script it tells me that Java was not found. I have java installed. Can someone help me?
[Android Software Development] raziel23x:
There is instructions in the Doc folder in the Manual help file
[Android Software Development] RobAndroid:
I had this problem too. Make sure you have 64bit Java installed for a 64bit OS. Most browsers just download the 32bit version they autodetect because the browser is 32bit.
[Android Software Development] baySF:
It says I have to set the PATH. I read all that and It literally is all jibberish to me. I'm not a complete dummy with things or computers for that matter. I know my way around things but this PATH thing is just not registering in my brain right.

EDIT: Never mind I figured it out. Just had to take it slow and think.
[Android Software Development] baySF:
I'm trying to edit a CM theme and I've replaced all my images but when I go to sign it after I've zipped it, it says that there is an error and when I view the log it's just an endless scrolling of errors and it wont sign. If I try to to option 7. zip/sign/install, it will sign the apk and then I'll just copy the signed apk to my devices SD card and install it that way, it works but my images aren't there. All I'm trying to do is replace the battery icon and the airplane mode icon on the status bar. Any help?
[Android Software Development] raziel23x:
Email me the files and changes as well as the systemui and the APK files from the frameworks folder of the system folder of the ROM
[Android Software Development] raziel23x:
I hopefully fixed the zipalign.exe not being detected.

I also did some minor tweaks to the scripts that may fix a few issues
[Android Software Development] sga999:
Minor nit. EVHO (instead of ECHO) is at the beginning of one line in script.bat. I have the experimental build. Thanks for an amazing tool.
[Android Software Development] baySF:
Just to be clear, you want me to email you the CM theme APK, the .PNG edits, and my ROM's systemui and framework?
[Android Software Development] raziel23x:
There should be a folder in your system folder called Framework

it will contain files such as for example:

framework-res

twframework-res

com.htc.resources

SemcGenericUxpRes

and then your systemui

then the CM theme APK, the .PNG edits
[Android Software Development] sga999:
I'm having a problem with making a change to SystemUI.apk.

First, I made no changes, just to try the simplest case. I did steps 9 and 11, replied y, then went to the keep folder and deleted resources.arsc. The resulting apk worked well. (I probably didn't need to delete resources.arsc, but I was just doing what some other posts said to do).

Then I wanted to do an actual change. I did step 9. Then I made a simple one line change to /res/xml/strings.xml. I did step 11. Then, here's where I get confused.

I've tried multiple ways:

If I reply y, then go to keep folder and delete resources.arsc (because I want to get my change to strings.xml, right?), the resulting apk does NOT get the change.

If I reply n, the resulting apk loses the navigation and status bars.

So, if I'm just changing something in strings.xml, what should be the sequence of steps after I do step 9/make a change/do step 11?
[Android Software Development] raziel23x:
Have you downloaded the latest build of the experimental which is today ABCs tried that version
[Android Software Development] sga999:
I have the experimental from yesterday. I could try the new, but let me ask this again anyway. What steps should I do after step 9, make change to strings.xml, and step 11? I mean, do I say y or n, and if I say y, what should be deleted from keep?
[Android Software Development] sga999:
Line 685 in Script.bat is causing a problem for me. Here's the line:

7za x -o"%~dp0projects/temp" "%~dp0place-apk-here-for-modding/%capp%" resources.arsc -r

If I comment it out, my change that I mentioned above DOES get incorporated. This is the case where I answer y and then delete resources.arsc from keep folder. It seems like that line will always cause the original resources.arsc to be used because it comes AFTER the prompt to delete files from keep folder. I don't see how that ever works! (I mean, if anything has changed in resources.arsc, it will not get included).

(If that line is deleted, the next 2 lines are unnecessary because temp does not exist)

.

I still have no idea about why answering n causes my bars to go away. I would think this case would work for me as well since it's saying I don't want to 'keep' anything from the old, i.e. just use all the recompiled stuff.

To summarize, removing that line above, answering y works for me. Answering n doesn't work, causing a "bad apk" where bars don't show. I'm still unclear whether I should be picking y or n. But since picking y and deleting resources.arsc from keep works. I'll stick with that for now.

EDIT: I'm still on experimental from yesterday. I looked at the newer one, but with no change to Script.bat, I stayed on the earlier one.

EDIT2: I got the n way to work by modifying the script to use AndroidManifest.xml from the original apk. The script already uses the original META-INF with this line:

7za x -o"%~dp0projects/temp" "%~dp0place-apk-here-for-modding/%capp%" META-INF -r
[Android Software Development] raziel23x:
I will fix this with my next commit and will add a option to use the original Android manifest as well hopefully this will fix allot of issues
[Android Software Development] raziel23x:
Fixed the issue with changes not happening when compiling the scripts using the wrong resources.arsc
[Android Software Development] sga999:
Maybe I'm missing something. I see the change you made (I know you made other changes, but I'm only looking at line 685 since I'm working with SystemUI.apk). But you're still using the original resources.arsc from the "for-modding" folder. I don't understand that....I'm trying to get at my NEW resources.arsc.

Also, you prepended 'system' before the name. That file name is only in the "for-signing" folder. So maybe you meant to change the folder name to "for-signing" too? But if that's true, I still don't understand this change. Your comments right above that section say: "IF you have modified any xml, then delete resources.arsc from that folder as well". No matter which resources.arsc you put on this line, it will be putting it in the NEW "for-signing" apk. It seems like that's overriding the choice we got by either deleting resources.arsc from 'keep' or not. So it seems like just deleting lines 685-687 is the right way.

By the way, just curious about why you want to prepend 'system' in front of the file name in the "for-signing" folder.

EDIT: I haven't been using the 'adb push' feature, but I just noticed this:

"%~dp0other\adb.exe" push "place-apk-here-for-modding\system%capp%" /system/app/%capp%

Just as I said above, I don't think there's any system%capp% in "for-modding", only in "for-signing".
[Android Software Development] raziel23x:
It keeps the modified files from overwriting the original apk and it keeps thing organized and since it is a system file it has the signature file transferred to the modified system file on hand.

the changes is suppose to take the resources.arsc out of the modified apk file and decompress it then place it back inside since most apk files will not function correctly when the resources.arsc is compressed
[Android Software Development] sga999:
But your code is not getting the resources.arsc out of the modified apk....you have for-modding/system%capp%. which doesn't exist. It only exists in "for-signing".

Here's what I see in your experimental Script.bat. I think you mean "for-signing" in the first line.

7za x -o"%~dp0projects/temp" "%~dp0place-apk-here-for-modding/system%capp%" resources.arsc -r

7za a -tzip "%~dp0place-apk-here-for-signing/system%capp%" "%~dp0projects/temp/resources.arsc" -mx%resusrc% -r

Now I do understand what you mean about the compression/decompression. However, just leaving those lines out entirely works for me, so maybe my compression was already okay. I'm just using the resources.arsc that's in the NEW for-signing apk.
[Android Software Development] raziel23x:
thanks i did not even noticed that lol I fixed that one typo just this second it now reads

7za x -o"%~dp0projects/temp" "%~dp0place-apk-here-for-signing/system%capp%" resources.arsc -r
7za a -tzip "%~dp0place-apk-here-for-signing/system%capp%" "%~dp0projects/temp/resources.arsc" -mx%resusrc% -r
[Android Software Development] sga999:
You didn't fix several lines that are about 'adb push'. I mentioned this in post #1048. Again, you must want "for-signing".

Here's one of the lines;

"%~dp0other\adb.exe" push "place-apk-here-for-modding\system%capp%" /system/app/%capp%
[Android Software Development] raziel23x:
thanks again keep with all the reports like these and This will fix a lot of issues unlike most everyone else who is just saying its not working please fix
[Android Software Development] sga999:
I'm happy to help. But I've only looked at a limited part of the script that I've needed, which is about system apps. If you'd like, I can take a look at other parts. Are there specific areas that people are saying are not working? It will be easier for you to tell me than for me to search the whole thread!
[Android Software Development] raziel23x:
Option 13 is the main issue but I am thinking they are just having registry issue with the install location of java
[Android Software Development] sga999:
I tried option 13 and got errors because it can't find jarsigner. It looks like that's part of the JDK, but I only have the JRE installed. I've seen another script with lines to do signing, but it looks something like this.

java -Xmx%heapn%m -jar signapk.jar -w testkey.x509.pem testkey.pk8 unsigned.apk signed.apk

I guess this won't work for you though because you want to generate keys? Sorry, I'm not very familiar with signing.

It would be nice if we do not have to get the whole JDK to do this signing step. Maybe you can just find jarsigner.exe and put it in your 'other' folder? However, I don't know if it would require other files also.
[Android Software Development] raziel23x:
I tried that already but it complained About not being installed correctly with explaining what's missing so I have up on that
[Android Software Development] Anon9mouz:
im having trouble compiling. idk if i even set the path right need help. decompiled just file just cant compile
[Android Software Development] raziel23x:
I can't help you if you do not supply more info logs what you did what options ect....
[Android Software Development] bovirus:
New programs version avialble

wget.exe (1.14)

aapt.exe (Android sdk)

adb.exe (Android sdk)
[Android Software Development] raziel23x:
I have a custom compiled versions
[Android Software Development] sga999:
This is in the experimental version. Shouldn't this line that's in both :nq7 and :nq8 change as shown?

7za x -o"%~dp0projects/temp" "%~dp0place-apk-here-for-signing/%capp%" resources.arsc -r

7za x -o"%~dp0projects/temp" "%~dp0place-apk-here-for-signing/unsigned%capp%" resources.arsc -r

EDIT: Sorry, I meant :nq5 and :nq7.

EDIT2: On :nq7 and :nq8, the rename command has 2 problems. You need backslash instead of forward slash. And the path must not be specified on the output file. Here's the old and new.

rename "%~dp0place-apk-here-for-signing/unsigned%capp%" "%~dp0place-apk-here-for-signing/OriginalSignedKey%capp%"

rename "%~dp0place-apk-here-for-signing\unsigned%capp%" "OriginalSignedKey%capp%"
[Android Software Development] bovirus:
Do you have a custom compiled version for all files wget and aapt.exe/adb.exe (AAndroid SDK)?
[Android Software Development] raziel23x:
Apktool.jar requires a special build of aapt because of htc and a few other custom roms break with out a few patches to aapt see the apktool thread by IBotPeaches http://xdaforums.com/showthread.php?t=1755243 to read up on what it is needed so it is just easier to build it all from source. And as for wget I do the same as there is always more patches on the source branches then the releases.
[Android Software Development] bovirus:
Thanks for the explanation.
[Android Software Development] raziel23x:
fixed
[Android Software Development] sga999:
I'm not sure if I understand what you said here. You fixed some changes I showed you for the system app case, when answering y. But I was also asking about answering n, and I wanted the original AndroidManifest.xml to be used (you already are using the original META-INF). I thought you meant you were going to change this for the n case, but maybe I misunderstood?

Here's the line I added after the META-INF line (I mentioned this in post 1045, and you answered in 1046).

7za x -o"%~dp0projects/temp" "%~dp0place-apk-here-for-modding/%capp%" AndroidManifest.xml -r

EDIT: This isn't very important, but it might help me remember to go make my changes. I was wondering if there could be a prompt saying to go modify things in projects, either after a decompile or before the compile. Something like:

ECHO You can make changes to projects/%capp% now.
[Android Software Development] raziel23x:
Ever thought about forking it on Github and doing pull request
[Android Software Development] raziel23x:
I am waiting on adding that option just yet as I want to add it as a option of y or n when compiling
[Android Software Development] sga999:
Thank you! I look forward to the change.

I added an EDIT to my prior post asking for something else. As I said there, it's not important, but I thought I'd ask. (Too bad editing doesn't cause a notification so that the edit is not overlooked).
[Android Software Development] raziel23x:
when you are prompted with this message when you select the keep folder options for both the system and the non system apk files unless you delete the AndroidManifest.xml from the keep folder the script will use the AndroidManifest.xml from the original apk

ECHO In the APK Multi-Tools folder u'll find

ECHO a keep folder. Within it, delete

ECHO everything you have modified and leave

ECHO files that you haven't. IF you have modified

ECHO any xml, then delete resources.arsc from that

ECHO folder as well. Once done then press enter

ECHO on this script.

The only time that the AndroidManifest.xml is used from the newly compiled apk is when you opt to only transfer the META-INF or to create a unsigned modified version of the apk file.

I hope this better explains things and will not cause confusion with anything so I could Modify the scripts menu:

ECHO 1. Create an unsigned apk using the keep folder option

ECHO 2. Create an unsigned apk

ECHO *Notice* Options 3 and 4 are experimental use with care *Notice*

ECHO 3. Create an apk using the original Signature using the keep folder option

ECHO 4. Create an apk using the original Signature

ECHO *Notice* Options 3 and 4 are experimental use with care *Notice*

to read this:

ECHO 1. Create an unsigned apk using the keep folder option

ECHO 2. Create an unsigned apk using the original AndroidManifest.xml

ECHO 3. Create an unsigned apk

ECHO *Notice* Options 4-6 are experimental use with care *Notice*

ECHO 4. Create an apk using the original Signature using the keep folder option

ECHO 5. Create an apk using the original Signature

ECHO 6. Create an apk using the original Signature and original AndroidManifest.xml

ECHO *Notice* Options 4-6 are experimental use with care *Notice*

I hope this better explains things and look forwards to your input and anyone else for that matter

As for this I could take this a step forward

ECHO Would you like to make changes to projects/%capp% now.? (y or N)

ECHO Selecting yes will open up the Directory of the decompiled apk file

set /P INPUT1=Type input: %=%

IF %INPUT1%==y (call :abc)

IF %INPUT1%==n (call :xyz)

:abc

%SystemRoot%\explorer.exe "%~dp0projects/%capp%"

or

:abc

START "%~dp0projects/%capp%"

:xyz

goto restart