yashsingh1/xdaforums huggingface dataset:
[Android Software Development] bovirus:
Done (Thanks...)

C:\AndroidMultitool\Program_Files>apktool

Apktool v2.0.0-Beta9 - a tool for reengineering Android apk files

with smali v2.0.3 and baksmali v2.0.3

Copyright 2010 Ryszard Wi?niewski <brut.alll@gmail.com>

Updated by Connor Tumbleson <connor.tumbleson@gmail.com>

usage: apktool

-advance,--advanced prints advance information.

-version,--version prints the version then exits

usage: apktool if|install-framework [options] <framework.apk>

-p,--frame-path <dir> Stores framework files into <dir>.

-t,--tag <tag> Tag frameworks using <tag>.

usage: apktool d[ecode] [options] <file_apk>

-f,--force Force delete destination directory.

-o,--output <dir> The name of folder that gets written. Default is apk.out

-p,--frame-path <dir> Uses framework files located in <dir>.

-r,--no-res Do not decode resources.

-s,--no-src Do not decode sources.

-t,--frame-tag <tag> Uses framework files tagged by <tag>.

usage: apktool b[uild] [options] <app_path>

-f,--force-all Skip changes detection and build all files.

-o,--output <dir> The name of apk that gets written. Default is dist/name.apk

-p,--frame-path <dir> Uses framework files located in <dir>.

For additional info, see: http://code.google.com/p/android-apktool/

For smali/baksmali info, see: http://code.google.com/p/smali/

C:\AndroidMultitool\Program_Files>
[Android Software Development] Flextrick:
Okay, it recognizes the apktool.jar. So far so good..

Now do this:

java -jar apktool.jar d [your apk location here]

for example:

java -jar apktool.jar d C:\AndroidMultitool\Files\SystemUI.apk
[Android Software Development] bovirus:
Thanks. I will reply this evening.. Thanks..
[Android Software Development] 88EVGAFTW:
Been trying to make some edits to SystemUI on Galaxy S3 Sprint Kitkat 4.4.2 and I have success in decompiling the SystemUI, making changes to some PNGs, recompiling but when I push back to phone, SystemUI crashes right away and on reboot, I am missing the entire UI. I put METAINF and AndroidManifest back in and same result. The recompiled file is a few hundred Kilobytes bigger than original, is that normal?
[Android Software Development] kermage:
Sign it with its Original Signature then zipalign, also check your mods as it could be something you've done. Just because it builds doesn't mean it will work.
[Android Software Development] 88EVGAFTW:
I'll have to look into that because I have no clue how any of that works
[Android Software Development] bovirus:
[MENTION=4642185]Flextrick[/MENTION]

C:\AndroidMultitool>java -jar apktool.jar d C:\AndroidMultitool\Files\system-app-mover.apk

apktool.jar not recogized

cd Program_Files

C:\AndroidMultitool\Program_Files>java -jar apktool.jar d C:\AndroidMultitool\Files\system-app-mover.apk

C:\AndroidMultitool>cd Program_files

C:\AndroidMultitool\Program_Files>java -jar apktool.jar d C:\AndroidMultitool\Files\system-app-mover.apk

I: Using Apktool 2.0.0-Beta9 on system-app-mover.apk

I: Loading resource table...

I: Loading resource table...

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Documents and Settings\Administrator\apktool\framework\1.apk

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Baksmaling...

testI: Copying assets and libs...

I: Copying unknown files/dir...

I: Copying original files...

But the folder for decompield apk is under C:\AnroidMultitool\Program_Files folder.
[Android Software Development] Flextrick:
Ok, nice.

So I'll have to look into my code.

It's normal that it's located under /Program_files because the apktool location is there.

Flex
[Android Software Development] kermage:
Yes, because it uses the directory you are currently on. You can specify the output folder by adding "-o" parameter

java -jar apktool.jar d -o [prefered output location] [apk location]
[Android Software Development] bovirus:
Deoompile

java -jar c:\androidmultitoool\program_files\apktool.jar d -o [decompile_program_folder] [folder_&_ffilename_apk]

Which are the dos command line

- compile apk starting from a folder

- sign an apk
[Android Software Development] kermage:
what do you mean? :confused:
[Android Software Development] mausolï¿½e:
Hello!

I am having a problem when editing an apk :eek:, by exempls take to the latest rom kitkat mms.apk. , I change the bubble and recompile the folder, any report tells me no error ;) Cares it and qe theming black and light system works more :(

It remains always in dark,

Thank you for reading me

PS: I copy of the manifest file.XML and META.INF
[Android Software Development] kermage:
Something you have done in your edits, it is not tool-related.
[Android Software Development] bovirus:
Which are the parametre for commamnd line to compile and sign

Compile

java -jar c:\androidmultitoool\program_files\apktool.jar xx xx xx

Sign

java -jar c:\androidmultitoool\program_files\apktool.jar xx xx xx
[Android Software Development] Flextrick:
for signing you have to execute the signing tool in the program files folder.

Flex
[Android Software Development] mausolï¿½e:
HELLO

I tried decompiled / recompiled a file nothing changed for tried :) A file of my pulse directly "Xpéria" and that I reinjectere for tried ;)

A question before I force try it? The tool (superb) and compatible kitkat 4.4.2 custom ROM like ressurction or CRom ? and for copied file METAINF/.xml file decompiled to the compiled second "win7" because in the file decompiled it is an .apk ;), is this normal this manipulation?

PS: sorry for the ineffective of the LOL translator
[Android Software Development] kermage:
Compile:

java -jar apktool.jar b -o [prefered output location] [apk location]

Sign:

java -jar signapk.jar -w [certificate location .pem] [key location .pk8] [apk location] [prefered output location]
[Android Software Development] bovirus:
Command line summary

Decompile

java -jar [AndroidMultitoolPath]\programm_files\apktool.jar d -o [decompile_program_folder] [folder_&_ffilename_apk]

Compile

java -jar [AndroidMultitoolPath]\programm_files\apktool.jarapktool.jar b -o [prefered output location] [apk location]

Sign

java -jar [AndroidMultitoolPath]\programm_files\apktool.jarsignapk.jar -w [certificate location .pem] [key location .pk8] [apk location] [prefered output location]
[Android Software Development] kermage:
For GENERAL USE

Decompile:

java -jar [apktool.jar location]\apktool.jar d -o [prefered output location] [apk location]

Compile:

java -jar [apktool.jar location]\apktool.jar b -o [prefered output location] [apk location]

Sign:

java -jar [signapk.jar location]\signapk.jar -w [certificate location .pem] [key location .pk8] [apk location] [prefered output location]
[Android Software Development] bovirus:
Thanks

Decompile

java -jar [apktool.jar location]\apktool.jar d -o [prefered output location] [apk location]

Compile

java -jar [apktool.jar location]\apktool.jar b -o [prefered output location] [apk location]

Sign

java -jar [signapk.jar location]\signapk.jar -w [certificate location .pem] [key location .pk8] [apk location] [prefered output location]

I believe that as standard text is more readable...
[Android Software Development] kermage:
Well, ok, if that suits you ;)
[Android Software Development] evildog1:
I found a small bug. when i decompile apk file with some space in file name. it says file not found. i have to remove all spaces to get it to work.
[Android Software Development] Flextrick:
That's no bug, that's normal under java. You have to live with this..
[Android Software Development] kermage:
No, it's not java related, you can have a workaround for that. :angel:
[Android Software Development] Flextrick:
Please tell me, I'm open for learning.

Flex
[Android Software Development] kermage:
It's just about managing the parameters passed to the target.
[Android Software Development] Flextrick:
Yes, but I have no infuence to the apktool.

Flex
[Android Software Development] swat4samp:
[MENTION=4642185]Flextrick[/MENTION] Please provide batch decompile/compile in future :fingers-crossed:
[Android Software Development] Flextrick:
Uploaded new to provide a mirror: https://drive.google.com/file/d/0B6-9-IIam8f-X21aTkNITnowQmc/edit?usp=sharing
[Android Software Development] rockadz9:
thanks mate!:good:
[Android Software Development] Hamidreza2010:
cool tools

thanks
[Android Software Development] ClubWDW:
I'm missing something here. . . .

I have decompiled, changed what I want, and then recompiled. I understand the need to on this: "After compiling you have to copy the AndroidManifest.xml and the META-INF folder from your old apk to your newly compiled one!! Otherwise you´ll get bootloop!" What I don't understand is the How-To. . . .that is to say, how do I get those into a compiled apk? By definition because it's compiled, it would need to be decompiled again in order to add anything to it and then recompiled, Or, do I open it with 7Zip and just copy the files into the "root" of the apk? Also, there appears to already be an AndroidManifest.xml file already in the recompiled apk (as I view it in 7Zip). . .am I replacing this or just what is in the file it was found in? (In my apk, it was a folder called "original"). Sorry for the questions. . . .it's my first time and I did a search of this thread before asking. . . .

Thanks in advance!
[Android Software Development] kermage:
Yes, open both the original and the newly compiled APK with 7zip then copy over the AndriodManifest.xml and META-INF folder from the original one to the newly compile one.
[Android Software Development] bovirus:
I trie toi use v. 3.40 under Windows XP but I can do it.

It works on Windows 7 but not in XP.

I just setup all things descrivbe in first post.

Install framework.apk -> Error: Impposible to find specifed path.

Should be possible to have more detailed log?
[Android Software Development] kermage:
here you make sure that path and filename contains no spaces or weird characters.
[Android Software Development] ClubWDW:
Do they get copied into any specific folder? In my decompiled apk the folder is called "original"...
[Android Software Development] kermage:
Yes, but after recompile, it should be at the same location (root) with the original APK.
[Android Software Development] ClubWDW:
Thanks for your patience with me, [MENTION=5704750]kermage[/MENTION]. This brings up a couple of questions for me..

1) The "same location" in the original apk is a folder called "original"... Do I just copy " original" and its contents into the new apk so that they appear in the same place?

2) The newly compiled apk already has a new manifest.XML in the "root" directory of the new apk. Do I delete this, as the manifest.XML I need is in the folder named "original", mentioned in my first question? Or do I copy from that "original" folder into the "root" folder, as well...this would mean there are two of the XML files throughout the new apk?

Thanks for your help!
[Android Software Development] kermage:
copy the contents inside the original folder which is the "META-INF folder" and "AndroidManifest.xml" to the "root" directory of the new APK.
[Android Software Development] bovirus:
Coorect path (Mulitool is unpacked under C: and fiel didn't contain spaces in teh filename/path.

Same settings under Windows7 and it works.
[Android Software Development] kermage:
well then, let the OP (Flextrick) check on this. :good:
[Android Software Development] matrixzone:
I am new to this. I am getting the below error while installing the framweork:

java.lang.UnsupportedClassVersionError: brut/apktool/Main : Unsupported major.minor version 51.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClassCond(Unknown Source)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$000(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

Could not find the main class: brut.apktool.Main. Program will exit.

Exception in thread "main"

I have followed the instructions in the OP
[Android Software Development] Flextrick:
Hi guys, I checked the last few posts in here, I can't answer to all, so I'll answer generally.

If you receive errors like "unsupported version of...." or "flag size blablabla" you can try another apktool version. Check them here: https://code.google.com/p/android-apktool/

How to change the apktool:

Download your prefered apktool version

Rename it to "apktool.jar" (MUST be like this)

Replace your new apktool with the one in the Program_files Folder

Scnd issue with XP:

Imho it's also apktool related. I can't imagine that Android Multitool is the problem because it just gives the commands to the apktool and they're not different on XP. Please try if the apktool works on XP (standing alone)
[Android Software Development] ClubWDW:
Thanks to [MENTION=4642185]Flextrick[/MENTION] for this wonderful resource!!!
[Android Software Development] JT1510365:
question

can i decompile and recompile framewor-res.apk and systemui.apk with this tool?
[Android Software Development] Flextrick:
Of course
[Android Software Development] Flextrick:
Update

v3.5:

code rework

fix UI freezing on long tasks

add progress bar

many other small fixes

Download: https://www.mediafire.com/?kn9q6xvp555pebs
[Android Software Development] swat4samp:
Will u add batch decompile/compile please :o
[Android Software Development] Flextrick:
Batch? Why?

Flex
[Android Software Development] swat4samp:
Found a bug. "Finished decompiling, check for errors" message is showing twice after decompiling/compiling apks. Sometimes its even compiling twice
[Android Software Development] Flextrick:
Will look at it, thanks!

Flex
[Android Software Development] bovirus:
[MENTION=4642185]Flextrick[/MENTION]

The MultiTool didn't work under XP (but works fine with the same configuration under W7/W8).

But many tools (like MTK Droid, SP Flash Tools) didn't work so fine under W7/W8 (and worked fine under XP) so please fix the problem under XP to have all tools working under XP.

If I can help you in any way making some test please tell me.

I posted the problems some posts ago.
[Android Software Development] Flextrick:
I'll do some research for that!

Flex
[Android Software Development] Flextrick:
Hello,

appears an error?
[Android Software Development] shreddintyres:
any time i try to launch the exe no matter if its on the root of the C or elsewhere i get the following

Problem signature:

Problem Event Name:	CLR20r3

Problem Signature 01:	androidapktool.exe

Problem Signature 02:	1.0.1.0

Problem Signature 03:	51d87f8a

Problem Signature 04:	AndroidApktool

Problem Signature 05:	1.0.1.0

Problem Signature 06:	51d87f8a

Problem Signature 07:	4

Problem Signature 08:	15

Problem Signature 09:	System.IO.FileNotFoundException

OS Version:	6.1.7601.2.1.0.768.3

Locale ID:	1033

Additional Information 1:	82e2

Additional Information 2:	82e23b36efee975bd0e9417ff09fe7bb

Additional Information 3:	2745

Additional Information 4:	27451e59242951f0120bc31fa88d8fba

Read our privacy statement online:

http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:

C:\Windows\system32\en-US\erofflps.txt
[Android Software Development] Flextrick:
Ok, have you installed .NET framework?
[Android Software Development] shreddintyres:
Yep have .NET version 4.x
[Android Software Development] Taxi341:
Up to now the best apktool

​
[Android Software Development] Flextrick:
Thanks man!

~ via Nexus
[Android Software Development] Flextrick:
What OS are you running?

~ via Nexus
[Android Software Development] shreddintyres:
win 7 x64, it was recently brought to my attention that java 6 is necessary, though i had it installed i also have java 7 so im gonna uninstall java in its entirety and just leave java 6 on it and report back probably tomorrow
[Android Software Development] Skyburn:
Hey mate, great app! Thanks for this.

I do have one request - its not a big one, I hope. After doing any process - installing, decompiling, etc - there is a popup that says "Finished! Check log for errors"; I read that as there must be errors to check for, even if actually there are none.

How easy/hard is it to have a check in there and only display the check log message if there actually ARE errors? If no errors, the popup would read: Process completed successfully.
[Android Software Development] Flextrick:
Hello,

that's tricky. The log shows the whole cmd text, so it would be impossible to compare what of this text is an error and what not.

So all I can do is writing a different message, like: Finished, check log! Maybe there are errors. (just an example)

The log should ever be checked, even if it (de)compiles well. :)

~ via Nexus
[Android Software Development] J0KER!:
hi.

i tried to mod my viber.apk (messenger)

but after installation it try to start and chrashes! (i think it crashes while connecting)

i cant find my fault.

i hope someone can help me
[Android Software Development] Flextrick:
Hello,

compiling and recompiling worked without errors?

Some more information would be recommended.

~ via Nexus
[Android Software Development] J0KER!:
its full of errors :( i have to say its my first decompiling) the following i tried without any moddings. i just decompiled and recompiled to see it working..

here the logs:

install framework:

C:\AndroidApktool>cd C:\AndroidApktool

C:\AndroidApktool>apktool if framework-res.apk

C:\AndroidApktool>W: Config flags size > 36. Exceeding bytes: 0x2000000.

W: Invalid config flags detected: drawable-nodpi-v8-ERR0

W: Config flags size > 36. Exceeding bytes: 0x2000000.

W: Invalid config flags detected: drawable-v8-ERR1

W: Config flags size > 36. Exceeding bytes: 0x2000000.

W: Invalid config flags detected: drawable-hdpi-v8-ERR2

I: Framework installed to: C:\Users\m 0512\apktool\framework\1.apk

decompile app:

C:\AndroidApktool>apktool d viber_orig.apk

C:\AndroidApktool>I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\m 0512\apktool\framework\1.apk

W: Config flags size > 36. Exceeding bytes: 0x2000000.

W: Invalid config flags detected: drawable-nodpi-v8-ERR0

W: Config flags size > 36. Exceeding bytes: 0x2000000.

W: Invalid config flags detected: drawable-v8-ERR1

W: Config flags size > 36. Exceeding bytes: 0x2000000.

W: Invalid config flags detected: drawable-hdpi-v8-ERR2

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Done.

I: Copying assets and libs...

recompile:

C:\AndroidApktool>apktool b C:\AndroidApktool\viber_orig

C:\AndroidApktool>I: Checking whether sources has changed...

I: Checking whether resources has changed...

I: Building apk file...
[Android Software Development] Flextrick:
Ok. Does it run when you make no changes like above?

Java is installed? And which OS are you running?

~ via Nexus
[Android Software Development] J0KER!:
java is installed. i use windows 7 and no. even with no changes it dont really run. i can install it, start the app, but then it crashes.

(if i restore my data it show me the chat overview but i cant get in a chatthread. it crashes; if i make the installation without restoring my data, i can open viber. then i have to write my ID (phone-number) write the connection-code i get via sms and than it crashes, because of this i think it crashes while connecting but i dont really know!
[Android Software Development] Flextrick:
That's strange. The problem seems to be that the framework doesn't install correctly. You can try to download the newest apktool and replace it with the current one. (only the apktool.jar and aapt)

~ via Nexus
[Android Software Development] lacoursiere18:
Hi I'm kind of new to this stuff but trying to learn.. Where do i find the META-INF folder.. The one from my rom.. bc I do not see it in any folder where my apktool is located.. I see my new framework-res.apk under /dist and the AndroidMainfest.. but no META-INF folder.. thanks! If you need more info let me know I will try to provide more =):good:
[Android Software Development] J0KER!:
but it is correct if i take the framework-res.apk of my current rom right? i use pac man rom 23.0.0
[Android Software Development] Flextrick:
It's in the originally apk, which one you decompiled. Also the AndroidManifest.xml is in there.

Yes, that should work. But you can try also with the Stock one.

~ via Nexus
[Android Software Development] lacoursiere18:
All i have is framework-res/build/apk..

in there is res, AndroidManifest and resources.arsc... No META-INF

---------- Post added at 12:19 PM ---------- Previous post was at 12:04 PM ----------

In my Contacts.apk decompile i see a /smali folder and that has the contents of a META-INF file.. but nothing in framework-res decompile??
[Android Software Development] bovirus:
[MENTION=4642185]Flextrick[/MENTION]

Could you add more log options/messages to dientify better the problem under XP?

I want ti use until you will fix under XP the command line

Decompile

java -jar [apktool.jar location]\apktool.jar d -o [prefered-output-location] [apk-location]apkname.apk

Compile

java -jar [apktool.jar location]\apktool.jar b -o [prefered-output-location] [apk-location]apkname.apk

Sign

java -jar [signapk.jar location]\signapk.jar -w [certificate-location .pem] [key location .pk8] [apk-location\apkname.apk] [prefered-output-location]

Which is the command line to install framework-res.apk
[Android Software Development] bovirus:
Batch for XP

I create myself a batch a main interface for the Multitool under XP (the GUI didn't work fine under XP).

adb.exe/appt.exe update

Could you update adb platform tool (adb services and adb compilation tool)?

manifest as unknown file

The apktol.jar unpack the app but didn't recognize the manifest file and put it into unknown folder. Is it right?

the apktool.jat is the latest version?

apktool.jar (could be updated?)

I compiled the apktool.jar from iBotPeaches github but is different than the version that you included in your program.

baksmali.kar/smali.jat (could be updated)

The current version of baksmali/smali jar pps in Multitool is 1.4.2

The current version availabel forbaksmali/smali is 2.0.3.

Do you have a plan to update ot in Multitool?

Manual copy of AndroidManifest.xml file/META-INF folder

Please consider to automatize this process extracting the file/folder from original PAK and update into recompield apk.
[Android Software Development] Flextrick:
Thanks, I'll push an Update soon with your requests!
[Android Software Development] JT1510365:
if i have latest java jre installed will I be able to decompile my google search app and then recompile it again with this program?
[Android Software Development] innocence07:
sorry the search tabs isnt working so im asking.. im getting an error "Can't find the file File" im editing a systemui.apk please help
[Android Software Development] bovirus:
Please post all details (OS, operations that you did, etc).
[Android Software Development] Flextrick:
Update

v3.5.1:

updated all files

Download: https://drive.google.com/file/d/0B6-9-IIam8f-Z2RCbERXZ2pQekk/edit?usp=sharings

[MENTION=637263]bovirus[/MENTION]

I'll add an option to do all available actions with self written batch files, I haven't had enough time because I'm on holidays right now. When I'm back, I'll publish an update again!
[Android Software Development] bovirus:
[Thanks a lot for you updates...

Please take the right time (the holidays are holdiays... nbot working days...)

---------- Post added at 07:18 AM ---------- Previous post was at 06:25 AM ----------

@Flextrick

A repository of the latest APKTool.jar (iBotPeaches).

http://d-h.st/users/gu5t3r/?fld_id=30132

Is it right that in Advanced tab, "Donate" image is so big? Please check the screenshot attached.