yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] sambastrakan:
How to, AutoApkTool ...

Hello,

I think I missunderstood something :

1- I decompile an apk

2- I modify .xml .png files

3- I recompile the apk

4- I rebuild the apk

Then, in the new build, there is the old xml file I just modified.

I found the modded one in the apk generated in _OUT_APKTOOL_DIST directory. So I was able to extract it and put it in the new buiild (overwrite in zip). I don't need to resign the apk, so I can also extract the META-INf from the apk builded in _OUT_APK and put it in the apk generated in _OUT_APKTOOL_DIST ... But it's not a quicker solution.

Is there an easier way to simply recompile/rebuild all in just one time/operation ?

thanks !
[Desire Android Development] 1982Strand:
After recompile, goto INPUT_APK, take your edited png's and xml's from the "build" folder within the apk folder and put them in CUSTOM_RES folder, in the right folder structure. This will have a compiled binary of the files and overwrite the old ones in the apk.

Then "build usable". When done, your working apk is located in OUT_APK.

Hope this helps :-)
[Desire Android Development] xavierjohn22:
Raffie, better place the directory where there is no space,

You see it stops @ "HTC " and did not catch the "HTC Desire" ......

I will handle it next release

In the autodeodex tool, the optimization is separate.

-after deodexing all files will be here

deodexed_JAR

deodexed_APK

-if you want to run optimization it will just compressed those files and pu it in optimized_APK and optimized_JAR

- i separate it so you have the option to do so, some apks FC after optimization that is why it is separated. (for us miui users, the soundrecorder as a sample does not like being handled with optimization)

The compression does not vary too much, thats another reason why i separate the feature. you can verify the size after, it's almost the same when you have little file size to work with
[Desire Android Development] Raffie75:
Oke, thnx it not something i did wrong... Ill wait for the next release and try again.

It looks very fancy :) hope i can work with it because somehow i could'nt get it right with the previous AutoAPKTool versions.
[Desire Android Development] Hatman41:
No I was talking about the autoapktool command line one. I did not see a way of selecting com.htc.recources...it is not an issue anymore as I got the windows version to work.
[Desire Android Development] xavierjohn22:
Okay. Anyways.

Re: commandline autoapktool

I think it is somewhere in 30 plus. Install another. Cant remember but i put it. If not there i missed uploading it.

But that is why it was bumped to 1.0.7 in the first place. To have capability to install another.

Sent from Singapore Desire
[Desire Android Development] MvSt:
To find the needed ocx files spends a cupple of time...

Here i have a zip file containing all needed ocx files for you.

View attachment NeededOCXFiles.zip
[Desire Android Development] xavierjohn22:
lol, in our coding forum in another site posting ocx is not allowed that's why i dont do it, we let users find them, wahahahaha. maybe its okay here, i dont know.

yeah it is free all over microsoft and the web, only in that forum it is not allowed thats why i did not post it here, might be same thing. he he he

if i was sure its okay here, i would have created a separate cmd + those ocx which will register it to users machine and uploaded it in the OP
[Desire Android Development] shoman94:
Whats this log mean?

[*] C:\Users\Jason\Desktop\AutoAPKTool1.0.7\AutoAPKTool1.0.7\_INPUT_APK\framework-res

recompiling C:\Users\Jason\Desktop\AutoAPKTool1.0.7\AutoAPKTool1.0.7\_INPUT_APK\framework-res...

W: Could not find sources

I: Building resources...

I: Building apk file...

It causes my sounds and locations and security menu in settings menu to force close.

Thanks
[Desire Android Development] xavierjohn22:
Theres so many factors its hard to answer that.

What apktool version. The apktool ia 1.3.2 by default. What aapt file. Options when recompiled? Etc.

Try it out with manual commandline on apktool.jar you are using. If it does not fc then use that one.

Sent from Singapore Desire
[Desire Android Development] shoman94:
I'm on 1.0.7

Well.... I just decompiled and recompiled with no changes and I get the same error. I wonder if its because it has PNG's and xml's that were copy and pasted into it.

Also when I try with 1.3.1 it creates 2 sets on drawable folders. V4 and non-v4 hdpi folders.
[Desire Android Development] xavierjohn22:
use 1.3.2

i use 1.3.1 mainly on froyo

also when copying and pasting xml's make sure your xmls are the decompiled one in the build folder, those are converted to binary files already, else if you just simply paste your apk will FC. you may use the CUSTOM_RES folder so it is easy to copy
[Desire Android Development] xavierjohn22:
BETA 1.0.1 is out,

I ADDED some more features, see the changelog.

I also added a full rom deodexing and tested it on MIUI using a bootclass path specified in the file.

Deodexed a full rom while drinking beer!! Oh or having coffee (if having a hangover after drinking beer!)

Basically it will

- ask for a full rom zip to deodex

- extract those contents

- deodexed jars, deodexed apks

- compressed then repackage

- sign

PRESTO!!! a full deodexed rom! Output will be in the _FLASHABLES folder

NOTE:

A custom bootclass for a non stock rom needs to be determined so it will not fail. For MIUI i included the custom bootclass paths that will allow users to run the feature without errors.

Just check the checkbox then select the MIUI Chinese rom

Now anyone can upload a deodexed chinese rom, lol!
[Desire Android Development] Gunthermic:
For me, no matter what TABCTL32 will not register. Fairly brand new computer, and not a whole bunch of crap on it.

Tried your new version that has the files inclded and tried to manualy do it. All fail with an error acordign to MS means put the files into SysWOW directory..

Edit: Okay i got it to regis from cmd lin eonly.

Now upon decompiling your program throws an error 339. Problem with Richtxt ocx, which is regis, via your program. I have done it with command line...

The problem comes up when decompiling a single file.
[Desire Android Development] xavierjohn22:
The error is showing since "richtx32.ocx" is calling the form with richtextbox to show the log. That is why. It needs to be in your system and registered then it will go away.

Also all these ocx can be aquired at microsoft as an installer if you have problems.

Even when the files are in the syswow or system directory already it still has to be registered via cmd line. Or the run command regsvr32 ....

Sent from Singapore Desire
[Desire Android Development] Gunthermic:
yes understand that. All are registered. I as able to do it via the command line. The included tool sats it did, but did not.
[Desire Android Development] xavierjohn22:
the fileresiter.exe target only system32, i'll include syswow next release

so is it working now after using manual cmd line registering?
[Desire Android Development] Gunthermic:
Nope. I have registered it manually. And still erring out.

Runtime Error 339

Component "Richtx32.ocx' or one of its depedndencies is not correctly registered.

Finally got it to work. Went found another copy. I had been tyryign to use the one you included. But found a new one...
[Desire Android Development] Gunthermic:
Okay got it functioning. Oh man I just pee'ed my pants a little.. Wow..

Simplely amazing..
[Desire Android Development] xavierjohn22:
Glad it did work out now.

Yeah my ocx copies are old. Mine is from last year or i think the time i installed tha runtime way back jan 2010. Ms may have new ocx for new w7 pcs and laptops today.

Ill mention that in the OP.

Just test it for now and post whatever your thoughts are here.

Regards.

Sent from XJ's Desire... LOL
[Desire Android Development] Gunthermic:
Okay I am going to take a holistic approach. You may have thought of these already, or plan these, but it's what is crossing my mind.

1. Put somewhere in top bar which version of apktool/smalia etc you current have load to use.

2. The progress bar is a little overwhelming. It's big! LOL While there is not way to have a % based progress bar , becuase we never know how many files and how long it will take to be completed. So maybe a progres bar goign arcoss the bottom of screen. Save the main window realstate for the program itself.

Will referance each window left to right as #1, #2, #3

3. The decompiled selected and recompiled selected enabled toggle is off a bit.

Open program toggle enable selection and then and select a apk in #3 the decompile selected does not enable.

If upon opening program you however select the home #2 window and then toggle enable selection then it works as it's suppose to.

4. Suggest to save state of enable selection, so to turn it on or off upon opening program.

5. Logs, maybe create logs for each decompile. This is what i mean. Select decompile all is cool and you get a log for all decompiles. But as you try to fix a problem becomes cumbersome to look at a huge log file. Suggest to parse it and create a log file of each decompile as well. And then in #2 Mark the main folder (say com.htc.resources) next to the name - with errors in red or something. This highlights that there was errors decompiling/recompiling. Then make it possible to open that log fiel for that apk.

6. #3 You display files, in the window it apears you have it as two column, but you do utilize the second column. Display more files there or have it display date/timestamp of file

7. I like how it will open the .pngs. It does not however allow you to open apk's with 7-zip etc.

8. Can #3 be set up to show thumbnail of .png's?

9. A real wild idea. How about bottom of your workspace to have a #4 window that is explorer, so we can drag and drop files as well. Make you program the one stop program to do modding/themeing etc.

Well that is my first blush. I onyl suggest so much since it's in the begining of the process.

Please feel free to totally disregard any and all parts..

This is a great start!!!
[Desire Android Development] Gunthermic:
That's what I thought, but will not do it. I will retry again this evening. Let me digest all the other answers. Plus I am sure I will have more. I pam putting it through it's paces sir!
[Desire Android Development] Gunthermic:
I like where you are going.

As far as the bottom, i was talking about incorperating a windows like explorer view within program. so we can just say for example move to a directory on drive and click on a png and drag it up to #3 window to replace or add a png to the drawable folder.

Using Visual Basic? .Net? I understand having those buttons hidden by the progres bar. Why not make the properties not visable instead?

I dont think I mentioned it before, but not only making the current apktool you are using (as well as smali) in the main screen, instead make it a drop down list so it can be selected on the fly?

I will have more... LOL.
[Desire Android Development] xavierjohn22:
yeah VB.

right now that's the fastest workaround, lol, cover it

rather one line of code than to loop through the buttons and hide it, some buttons are in array some are not yet.

dropdown can also be done on apktool version, that would be the part when the tool is being streamline of user interface.

(i think but supports version latest to lowest so there's not much changing of apktool version, his release would be from froyo to honeycomb you can decompile, compile)

ill have my weeks first on the phone explorer as well as adb functionality

UI will still change over time
[Desire Android Development] Gunthermic:
Yea, I could be wrong but isn't 1.4.1 for Honeycomb, while 1.3.1 and 1.3.2 is froyo? I still use 1.3.1 almost always, 1.3.2 had some bugs decompiling.

Good old VB.. I cant say I completely miss it. LOL

I think the idea of allowing listview and such in #3 is a good idea.

Also add to the right click, the 7Zip feature as well. I am sure you have a list of stuff to add there.

Awaiting saturday or so, when we can see next bunch of goodies.
[Desire Android Development] xavierjohn22:
Vb with addin

Anyways ill send you a pm after 10 mins

Sent from XJ's Desire... LOL
[Desire Android Development] 1982Strand:
Whoa! Got your hands full there XJ ;)

Good ideas coming up in here..

I also like where this is going! Great job so far..
[Desire Android Development] 1982Strand:
Is there a "build usable" for single apk's? Well, it is probably being worked on already, or am i just missing it somewhere in the tool?
[Desire Android Development] xavierjohn22:
If i remember it correctly it is in the right click. Right click on an INPUT apk in the files window. Third one.

Will try to upload tomorrow for next beta 1.0.2 and also work with miui. Im out at the moment.

Sent from XJ's Desire... LOL
[Desire Android Development] Gunthermic:
Correct. It is within the right click on a apk.
[Desire Android Development] 1982Strand:
Ah! Great, thanks...

One more thing, when using the DEODEX FULL ROM feature, i get an error saying file not found??

Here's the log:

Error:

cannot find archive

7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Scanning

C:\Users\Administrator\Desktop\xdaAutoTool\_TEMP\miui_Desire_1.6.10_h55xzsw5d2_2.3\: WARNING: Den angivne sti blev ikke fundet.

Creating archive C:\Users\Administrator\Desktop\xdaAutoTool\_TEMP\Deodexed_miui_Desire_1.6.10_h55xzsw5d2_2.3.zip

WARNINGS for files:

C:\Users\Administrator\Desktop\xdaAutoTool\_TEMP\miui_Desire_1.6.10_h55xzsw5d2_2.3\ : Den angivne sti blev ikke fundet.

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

WARNING: Cannot find 1 file

--- And "Den angivne sti blev ikke fundet" = "Path not found"

What am i doing wrong? I click the button, locate the rom (downloaded directly from miui.com), click ok and then i get the error. Do i have to do something before? Aren't it supposed to more or less be a 1-click thing?
[Desire Android Development] Gunthermic:
The solution is easy. The ROM zip must be located in the _TEMP folder to start with. Copy it there and re-run and all will be fine!!!
[Desire Android Development] 1982Strand:
OMG? Haha! Don't i look like a fool now, huh! :)

Thanks again, i'll try this at once!
[Desire Android Development] Gunthermic:
Nope not at all. I did the same thing first time. LOL
[Desire Android Development] Oijkn:
Hi thank you for this good tools, i will give it a try :)
[Desire Android Development] kaufmanj67:
Sorry if this has been covered,but will this run on a 32 bit sys. If not can I make it work on a 32 ? Looks like a great tool would love to add it to my arsenal have tools but I'm stuck with this 32 bit laptop till the end of the dirt bike season our till I hit the lottery our the recession is over.....witch ever comes first
[Desire Android Development] xavierjohn22:
Actually its the space in the filepath thats why. Anyways ill upload later the day. Sleep first

Sent from XJ's Desire... LOL
[Desire Android Development] 1982Strand:
Yeah, it will run. I got 32bit windows 7 :)
[Desire Android Development] xavierjohn22:
The app is actually 32bit running on our 64. Yes it is made for a 32.

Be mindful it is still beta

Sent from XJ's Desire... LOL
[Desire Android Development] kaufmanj67:
Thanks guys downloading now and I totally understand beta. If it is half as good as it sounds will be awesome. Suppose everybody will try to become a themer when this turns into a release version.......LOL NOT FARE !!!!! learn the hard way like I did. Thanks a bunch will report what I think in a bit.
[Desire Android Development] xavierjohn22:
Just uploaded v1.0.2
[Desire Android Development] Madala_ZA:
Very happy I subscribed to this thread :) nice work!

So, does this tool support MIUI roms..? I see earlier you mention it is on the way, not sure if it's here yet.
[Desire Android Development] xavierjohn22:
This app can now deodex a full MIUI rom using the Misc tab, it can deodexed apks and jars separately using the custom bootclass sample included, tested on desire.

it's still beta but a lot has added to it already as users are sending or posting feedback

anything else you want to do with MIUI i think goes to apktool and smali baksmali usage.

In general, it allows any apk modder dev or user to do his/her job easily if using windows
[Desire Android Development] MvSt:
Great what your are working on!!!

Suggestion:

Could you insert at this (see picture) a context like open with?

I think it will be more easyer to edit files in apks
[Desire Android Development] xavierjohn22:
Sure.

Also download the latest beta though its not there yet but it has more menu

Sent from XJ's Desire... LOL
[Desire Android Development] MvSt:
I have the latest version :-)
[Desire Android Development] xavierjohn22:
Ah okay. Sorry i was mobile and i thought the icons are still 32 x 32. Lol

Sent from XJ's Desire... LOL
[Desire Android Development] theviruz:
i got this error :(

tried this FileRegister.exe

and regsvr32.exe C:\windows\SysWow64\RICHTX32.OCX

plz help i have win home prem. 64bit
[Desire Android Development] Raffie75:
Read some pages back... You need to install the OCX files.
[Desire Android Development] xavierjohn22:
Get the new richtx32.ocx. latest one should be compatible to your new workstation.

Sent from XJ's Desire... LOL
[Desire Android Development] SynisterWolf:
Ok so im new to all this and i was wondering if you can help me out.,

how would i do this. "If you are using latest w7 it may probably be registering in the wrong path so register manually."

i have the latest w7 64bit. is there a guide on how to do this somewhere?
[Desire Android Development] xavierjohn22:
Google or yahoo will display all the guides.

regsvr32 c:\windows\system32\xxxxx.ocx < this is the path for old machines

now if you are using win7 probably it is in syswow or syswow64 folder

google and yahoo will also be your friend

regsvr32 is comprehensively displayed also in those search engine.

You need to register because those ocx may not be in your machine, this will allow you to run the app once copied in the system directory and registered
[Desire Android Development] 1982Strand:
Don't know if it helps anyone, but i'm running win7, 32bit. I didn't register any files manually or with the FileRegister.exe, i just downloaded and put all the missing ocx files in my system32 directory, then it worked.. Eventhough i also have the syswow folders, but i didn't use them, not sure if it makes a difference though..

But that's possibly only on my machine it works like that :)
[Desire Android Development] eybee1970:
I've got a problem with xdaAutoTool.

Every time I try to deodex apps, I get an error and tool forcecloses.

Log says:

What can I do to solve this? Anyone else experienced that?

Thx in advance
[Desire Android Development] Kalashnikitty:
Yeah a guy on miui-germany got the same problem like you.... oh wait :eek:
[Desire Android Development] xavierjohn22:
Put the xdaAutoTool folder where there is no space in the PATH

L:/xdaAutoTool

That whitespace is not handled yet

delete the xdaAutotool.ini file in the folder after you moved it

I thought i placed that info in the OP already

EDIT:

You see it is stopping on the
[Desire Android Development] eybee1970:
yes, but the noobish mod on miui-germany could not help this guy :D
[Desire Android Development] xavierjohn22:
Hope i help this guy now, i explained why before this post, lol
[Desire Android Development] Kalashnikitty:
I banned eybee for his statment on miui-germany hahaha :D
[Desire Android Development] eybee1970:
thx XJ, I already did that --> same error
[Desire Android Development] xavierjohn22:
Can you post the latest error?

It seems you are deodexing,

i'm assuming all qualified framework files are in the right place as well as all files to deodex
[Desire Android Development] xavierjohn22:
Wahahahaha, anyways, you know me, i'm a happy guy, won't dive into much of that. I'll leave you guys to that.

:D:D:D
[Desire Android Development] eybee1970:
yes, here it is:

-----------------------------------------------------
Deodexing ApplicationsProvider.apk ...

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Util.ExceptionWithContext: Cannot locate boot class path file core.odex
at org.jf.dexlib.Code.Analysis.ClassPath.loadBootClassPath(ClassPath.java:237)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:145)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(ClassPath.java:110)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:98)
at org.jf.baksmali.main.main(main.java:278)

Creating classes.dex...

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Cannot find file or directory "C:\xdaAutoTool\_TEMP\ApplicationsProvider"
at org.jf.smali.main.main(main.java:173)
Copying classes.dex to file...

7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Scanning

C:\xdaAutoTool\_TEMP\ApplicationsProvider\classes.dex: WARNING: The system cannot find the path specified.

Updating archive C:\xdaAutoTool\_SOURCE_APP\ApplicationsProvider.apk

WARNINGS for files:

C:\xdaAutoTool\_TEMP\ApplicationsProvider\classes.dex : The system cannot find the path specified.

----------------
WARNING: Cannot find 1 file
Moving file to deodexed framework folder...
Cleaning up source framework folder...
Cleaning up TEMP folder...
[Desire Android Development] xavierjohn22:
Now it's clear, The error is not the tool its the bootclass files.

Is this MIUI too?

When you have did this

1. Place all framework jars and odex jars and all content of the framework folder in the rom to _SOURCE_FRAMEWORK

2. Place the system/app (all files) in _SOURCE_APP

You have to pick this

- All-Custom

- A pop up window will appear, i have included the MIUI Bootclass in the app

- Choose it, hit ok

99% that would go away if all files are in the right place

EDIT:

Now what i have to do with my tool if there is an error like that where the bootclass is not specified or found, ill handle it so it stops and does not proceed. You see the error shows it is looking for the classes.dex generated where in fact there is none because it was not deodex, the baksmali and smali failed since bootclass path is not specified.
[Desire Android Development] eybee1970:
Yes, it's MIUI...believe me, xj: i did that before....i chose the right bootclasspath, REALLY!

I feel noobish now for my self...btw, I get the same error with Console-tool
[Desire Android Development] Kalashnikitty:
ha i got it.. eybee try to deodex the latest 1.6.16 closed beta for milestone.

i downloaded that one and tyr to deodex it. but it did not work!

desire 1.6.16 works fine.. so theres something wrong with the milestone one. :o

edit: milestone need another bootclasspath?
[Desire Android Development] eybee1970:
that sounds right for me :)
[Desire Android Development] Kalashnikitty:
so i found it. in the bootclasspath is a jar named "com.android.future.usb.accessory.jar"

This one is not in miui for milestone.. now it deodexed :)
[Desire Android Development] xavierjohn22:
Yes because they have different JAR files

So basically make a new bootclass file and define all those in the file. That should work.

Easiest way is to define all the content of the framework folder, though some of them are not included it would still work
[Desire Android Development] eybee1970:
ok, this mod is not noobish at all :):)

YO MADE MY DAY, KITTY!!! :D
[Desire Android Development] Kalashnikitty:
i know i know.. i made every day your day, cause i am so sexy :D
[Desire Android Development] xavierjohn22:
Okay. You can also deodex a full rom with that bootclass file and generate a full deodex rom without extracting contents manually.

Lol. Now thats pretty happy