[GUIDE]How to DEODEX Apps Using ONLY Android Phone.

Search This thread

TheFixItMan

Senior Member
Jul 8, 2012
7,844
4,052
London
I have pushed the apk many timed to system/app/ and set permsn to rw-w-w and even rw-r-r too but didn't work. The apk is from 4.3 JB stock ROM and i m applying it on 4.3 only as Bali bro's E2 is base on 4.3JB. And, if i am not wrong, Balli bro's E2 ROM is deodex and i m trying to push an apk with/without odex file from stock rom to its system/app/. is it possible..? if so in either way than pls point me to the direction. I have tried android apktool, Xultimate and Cygwin-with-Packages___Kitchen to deodex the apk but didn't succeed. Pls find the email apk with .odex file in the attacment.zip


Rgrds
Gusato

iv done some research - the email app should be set to api level 16 in order to deodex it - I'll have a quick look else you will have to deodex it yourself if it fails on mine as I may need all the framework and im not downloading all the that considering this is the galaxy y 5360 forum but I have one attempt this time

unable to deodex - your phone model is probably not supported for deodexing without additional work which im not doing as I dont have your device and this is the wrong forum for support

I suggest downloading and installing an already deodexed copy of the email app for example from a copy of cyanogen mod 10 or 11
 
Last edited:
  • Like
Reactions: gusato

gusato

Senior Member
Jun 4, 2014
77
18
Nagaland
How to set API level

iv done some research - the email app should be set to api level 16 in order to deodex it - I'll have a quick look else you will have to deodex it yourself if it fails on mine as I may need all the framework and im not downloading all the that considering this is the galaxy y 5360 forum but I have one attempt this time

unable to deodex - your phone model is probably not supported for deodexing without additional work which im not doing as I dont have your device and this is the wrong forum for support

I suggest downloading and installing an already deodexed copy of the email app for example from a copy of cyanogen mod 10 or 11

Though its not the right forum, however you have tried to solve my problem. Thank you for your try, i have also tried to deodex it but no luck. As you said that the email app needs to be set to API level 16 and i don't know how to do. I have android sdk and eclipse installed on my pc, just need a tutorial to use it. I'll be very nice if you can show or point me to the right direction as you have already done so much.


Regards
Gusato
 

MidnightHarvester

Senior Member
Apr 16, 2010
153
78
In the VAST
You can save a lot of time by never messaging with original apk/jar period until you're finished creating a dex file. There's no need to move the Ali source into a /small directory in the decomposed apk/jar. Just click the source folders and choose compile and it will create a dex file for you. Rename that to classes.dex and do this at a command prompt (so we don't need up having to decompress the apk/jar)

Code:
su
zip -j [path-to-original.apk] [path-to-classes-dex]

This process skips having to decompile any of the archives which tend to be quite large compared to the source in the odex
 

BlinkYDroid

New member
Jun 4, 2014
3
1
error

When I try to recompile, I get this
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
 

razor knight

New member
Jul 7, 2014
1
0
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
The same error for me:(
 

E:V:A

Inactive Recognized Developer
Dec 6, 2011
1,447
2,222
-∇ϕ
@marcussmith2626

Trying to use your tool, but keep getting permission denied. The pop-up window closes to quickly to see any other details and logcat is not helpful. I tried with both -armhf and -armel versions. Same problem. I'm on GT-I9195 with JB4.2.2 SE. Another SEAndroid problem?

Please post how to use commands manually from shell, so that we can debug.
 

Howard(06)

New member
Mar 31, 2015
2
0
I follow your instruction but this what always show when I recompile system ui :eek:
 

Attachments

  • Screenshot_2015-03-31-22-21-07.png
    Screenshot_2015-03-31-22-21-07.png
    99.6 KB · Views: 269
  • Screenshot_2015-03-31-22-21-29.png
    Screenshot_2015-03-31-22-21-29.png
    105.2 KB · Views: 284

Robshr

Senior Member
Oct 8, 2012
2,603
3,129
Allentown
OK so I think I followed the instructions to a tee but when I try to import the framework-res.apk I get this. sh:/data/data/per.pay.apktool/mydata/apktool.sh: No such file or directory
 

meliodas23

Member
Aug 2, 2015
7
0
that's my problem too...

---------- Post added at 06:30 PM ---------- Previous post was at 06:26 PM ----------

Happiesky did you if it's this guide is the same as for frameword?
 

jimbomodder

Senior Member
Importing framework gave this...

ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded: ignored.
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:562)
at brut.androlib.Androlib.installFramework(Androlib.java:473)
at brut.apktool.Main.cmdInstallFramework(Main.java:250)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:102)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 5 more


Sent from my GT-I9195
 

itsmedRb

Senior Member
Oct 14, 2015
736
143
Kolkata
I: Smaling...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/lix/aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, /data/data/per.pqy.apktool/APKTOOL671562997858480279.tmp, -0, arsc, -I, ?/apktool/framework/1.apk, -S, /storage/extSdCard/Project Apps/SystemUI_ESS_src/res, -M, /storage/extSdCard/Project Apps/SystemUI_ESS_src/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
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.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/lix/aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, /data/data/per.pqy.apktool/APKTOOL671562997858480279.tmp, -0, arsc, -I, ?/apktool/framework/1.apk, -S, /storage/extSdCard/Project Apps/SystemUI_ESS_src/res, -M, /storage/extSdCard/Project Apps/SystemUI_ESS_src/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/lix/aapt, p, --min-sdk-version, 19, --target-sdk-version, 19, -F, /data/data/per.pqy.apktool/APKTOOL671562997858480279.tmp, -0, arsc, -I, ?/apktool/framework/1.apk, -S, /storage/extSdCard/Project Apps/SystemUI_ESS_src/res, -M, /storage/extSdCard/Project Apps/SystemUI_ESS_src/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
Caused by: java.io.IOException: Cannot run program "/data/data/per.pqy.apktool/lix/aapt": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
... 10 more


not get the apk. why?
 

miroslavkrle

New member
Jun 19, 2013
1
0
please help me how to do that on pc with twrp backup

because not getting root permission on apk tool , can you help me how to do the same process on pc thanks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 29
    Hello everyone...
    First thing.. sorry for my Bad English..
    Many times it happens that we want to install app from another rom which may be odexed...or we don't have PC/laptop to deodex app...
    But now using only Android phone it is possible to deodex app ...
    What you need is..
    [1] Rooted android phone.
    [2] any advance file manager installed.
    [3] apktool installed on your phone :
    Steps to install apktool on android:
    1) Download apktool 4.1.1 apk from link:
    http://code.google.com/p/apktool/downloads/detail?name=Apktool4.1.1.apk&can=2&q=

    2) download apktool4.1_armel.zip from link: http://code.google.com/p/apktool/downloads/detail?name=apktool4.1_armel.zip&can=2&q=

    3) extract above zip file ...you will get apktool folder.
    Place apktool folder in root of SD card..

    4) now install apktool apk and give it root permission...

    5) now go to /system/framework/
    And click on framework_Res.apk and list will come..now select import as framework...
    Now select twframework.apk(if present) and again import it as framework....

    6) Now you are ready to use apktool....

    Steps to deodex apps:
    [1] Make a folder on sdcard.and place the file you want to deodex and their respective odex file..

    [2] now click on appname.apk file and select decompile all and wait till complete.
    After completion you will see new folder namely appname_src.
    Similarly click on appname.dex and select decompile all...after completion you will see folder appname_odex..

    [3] Now go to any file manager.And open appname_src folder ...and create new folder having name "smali" (without quotes).

    [4] Now go to folder apkname_odex and copy / move all files inside that folder to apkname_src/smali/here...

    [5] now go to apktool apk and click on folder apkname_src and select recompile all....
    After recompile process complete ..
    There will be new apk in folder named appname_src.apk...

    [7] now you have to sign that apk file..you can sign it by either zip signer apk or by clicking that apk and then selecting sign apk option ....

    NOW INSTALL APK AND ENJOY......

    If you have any problem please post here..
    And You can press thanks....
    Sent from my GT-S5360 using xda app
    1
    Haven't tried yet bt this was what i was searching for.....will report soon

    Sent from my GT-S5360 using Tapatalk 2
    1
    This Works Quite Well...

    Hello everyone...
    First thing.. sorry for my Bad English..
    Many times it happens that we want to install app from another rom which may be odexed...or we don't have PC/laptop to deodex app...
    But now using only Android phone it is possible to deodex app ...
    What you need is..
    [1] Rooted android phone.
    [2] any advance file manager installed.
    [3] apktool installed on your phone :
    Steps to install apktool on android:
    1) Download apktool 4.1.1 apk from link:
    http://code.google.com/p/apktool/downloads/detail?name=Apktool4.1.1.apk&can=2&q=

    2) download apktool4.1_armel.zip from link: http://code.google.com/p/apktool/downloads/detail?name=apktool4.1_armel.zip&can=2&q=

    3) extract above zip file ...you will get apktool folder.
    Place apktool folder in root of SD card..

    4) now install apktool apk and give it root permission...

    5) now go to /system/framework/
    And click on framework_Res.apk and list will come..now select import as framework...
    Now select twframework.apk(if present) and again import it as framework....

    6) Now you are ready to use apktool....

    Steps to deodex apps:
    [1] Make a folder on sdcard.and place the file you want to deodex and their respective odex file..

    [2] now click on appname.apk file and select decompile all and wait till complete.
    After completion you will see new folder namely appname_src.
    Similarly click on appname.dex and select decompile all...after completion you will see folder appname_odex..

    [3] Now go to any file manager.And open appname_src folder ...and create new folder having name "smali" (without quotes).

    [4] Now go to folder apkname_odex and copy / move all files inside that folder to apkname_src/smali/here...

    [5] now go to apktool apk and click on folder apkname_src and select recompile all....
    After recompile process complete ..
    There will be new apk in folder named appname_src.apk...

    [7] now you have to sign that apk file..you can sign it by either zip signer apk or by clicking that apk and then selecting sign apk option ....

    NOW INSTALL APK AND ENJOY......

    If you have any problem please post here..
    And You can press thanks....
    Sent from my GT-S5360 using xda app

    Your instructions are clear and precise. Thank you for this wonderful tool, it works quite well.

    I do have a few questions:

    Do the framework-res files (TouchWiz and regular) need to be imported each time one decompiles/recompiles an odexed apk, or is once enough?

    Also, where does the app leave its folders while it does its work? I noticed that while running the app, it appeared to pull the framework files into subfolders. Are these files left on the phone's internal storage, root of the phone, or removed after a session? These questions, of course, are related, but the bottom line is I am trying to understand the application's impact on resources and memory.

    Thanks for your help!
    1
    Quick question, how long does it usually take to decompile?
    1
    can I suggest ***** as a deodexer and odexer app..It's quite easy to use

    Sent from my GT-S5360 using Tapatalk 2

    and its also banned for warez use so I would suggest removing that post