yashsingh1/xdaforums huggingface dataset:
[IDEs, Libraries, & Programming Tools] barth2:
Hi

So I managed to decompile and recompile one app and one theme. Yippee! This is farther than I got with apktool. I have two general questions.

1/ what's the best way of putting the apk back onto my device? (Nook HD+ running 4.4.4 PAC man ROM.). I naively just used ES explorer to copy the apk from /data/app to my PC, then reinstall the apk by opening it through ES explorer again. Of course Android complains there is an existing app with different signature, so I have to uninstall the original first. Is there a better way?

2/ my eyes are bad and I have a hard time with the built in editor. Any way to change the font? In any event, it doesn't matter if I use my own editor outside of the IDE on the decompiled files, right? When I build, they will all get picked up?

3/ I don't understand why the tree structure in apkstudio does not match the directory structure in the decompiled folder. For example, I may see res/com.android.systemui/colors.XML in the directory but in the IDE I may see com > res > colors.XML. it skips android.systemui

4/ I got into playing with apk because a lot of apps use dark theme which I like but they use dim text rather than white or near white text. Drives me nits because I need the contrast. What's a good strategy for modding this. Right now I'm kind of rooting around blindly trying to change color values. It's pretty tedious and I feel I can do this more systematically and intelligently.

Thanks.
[IDEs, Libraries, & Programming Tools] kusumakc:
The Create Button is disabled. I don't know what to fill in for framework.
[IDEs, Libraries, & Programming Tools] barth2:
You just need to fill out a name for the project, select an apk, select a folder for the project. The files will be decompiled to selectedfolder/projectname. You need to select a folder with the browse button, you just can't type in the name of a folder. That's a little quirk.

I don't know if it'll make a difference, but you can get framework-res.apk from your device. Use a root explorer and copy the file to your pc. It's in /system/framework and may have a slightly different name depending on the device.
[IDEs, Libraries, & Programming Tools] user1408:
anyone can help with this?
[IDEs, Libraries, & Programming Tools] GnatGoSplat:
I was able to get a clean build. I copied the file rebuilt.apk from the build folder to my tablet, tried to run it, but I get "Parse error". A lot of times when I've seen this, it's because of no signature/aligned, but the description says this produces aligned and signed apks, so not sure what I did wrong. Also tried searching the thread and didn't see anyone else mention this. Any ideas what I did wrong?
[IDEs, Libraries, & Programming Tools] Syntaxer:
How about converting bytecode to java readable code? Or am I using the app wrong? :D
[IDEs, Libraries, & Programming Tools] hotter:
I have similar problem. Can any one tell why and how to fix this?
[IDEs, Libraries, & Programming Tools] barth2:
Did you by any chance use any character other than letter in your project name? It does not like that.
[IDEs, Libraries, & Programming Tools] partyhead:
decompile ap

try to use lewa-res.apk instead framework-res.apk

if you try decompile apk from lewa . works for me
[IDEs, Libraries, & Programming Tools] ssaguiar:
Missing libQt5PrintSupport.so.5

Installed, but, when I try to run it, I get:

./apkstudio: error while loading shared libraries: libQt5PrintSupport.so.5: cannot open shared object file: No such file or directory

I installed the QT5 Studio, but the error is still present.

Any clues?

Thanks
[IDEs, Libraries, & Programming Tools] crazytrain86:
Yep. Same problem. It doesn't actually isntall any of those for you. Just run it like so:

$ LD_LIBRARY_PATH=. ./apkstudio

My question is how to get this thing to actually load up apks. It keeps erroring out on me

Exception in thread "main" java.lang.UnsupportedClassVersionError: brut/apktool/Main : Unsupported major.minor version 51.0

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

at java.lang.ClassLoader.defineClass(ClassLoader.java:643)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)

at java.net.URLClassLoader.access$000(URLClassLoader.java:73)

at java.net.URLClassLoader$1.run(URLClassLoader.java:212)

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

at java.net.URLClassLoader.findClass(URLClassLoader.java:205)

at java.lang.ClassLoader.loadClass(ClassLoader.java:323)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)

at java.lang.ClassLoader.loadClass(ClassLoader.java:268)

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

---------- Post added at 04:47 AM ---------- Previous post was at 04:36 AM ----------

Figured out my own problem. I had installed the java from Ubuntu's repos as well as normal java from Oracle. If I preempt to ensure that this app is getting the "real" java version, then all is fine.

I do think this tool REALLY REALLY needs at least a "Readme" to explain how to install/run and caveats. Otherwise I'm guessing the lack of documentation will push away those non-xdadev forum users.
[IDEs, Libraries, & Programming Tools] ek3nk4r:
solution For failure to install Framework

ok maybe its a solution for installing framework-res.apk

Go setting -> binares - > Chang it to = >> ./binaries

and thats it Save Exit and open Akp Studio

setting and add framework

enjoy it :X
[IDEs, Libraries, & Programming Tools] barth2:
Is there an easy way to do push install from the IDE? Right now, I just drop to command line to use ADB. A one click build and install (if no build error) would be awesome.
[IDEs, Libraries, & Programming Tools] gregcavaretta:
Error

hey i get this error when recompiling

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'

has value '1.8', but '1.7' is required.

Error: could not find java.dll

Error: Could not find Java SE Runtime Environment.

now what i did was just run 1.7 and uninstall 1.8
[IDEs, Libraries, & Programming Tools] lamike:
I think someone hit upon this earlier...simple install instructions for windows, Linux, and mac. I have googled and YouTube for install instructions,and the only one that at got for my os (Linux mint) was 2years old...also xda no clear cut installed info.I am new to android .
[IDEs, Libraries, & Programming Tools] Icon000:
I've run into the same issue when trying to decompile. Have you run into any issues on you computer as a result of running 1.7 instead of 1.8?

Also I wounder if it would be a challenge [MENTION=5490832]vaibhavpandeyvpz[/MENTION] to fix this error?
[IDEs, Libraries, & Programming Tools] gregcavaretta:
I've run into it too when decompiling but as for getting errors when running 1.8 no I have not.

But here is a work around to the problem

Open RegEdit.exe
HKEY_LOCAL_MACHINE\
SOFTWARE\
Wow6432Node\
JavaSoft\
Java Runtime Environment
CurrentVersion

change the version from 1.8 to 1.7 and that'll do the trick...i haven't had any problem since.

View attachment 2976879
[IDEs, Libraries, & Programming Tools] ensarman:
please may you put the dependences in first post? like java, android skd, etc

i get unable to install framwork...
[IDEs, Libraries, & Programming Tools] vaibhavpandeyvpz:
done!
[IDEs, Libraries, & Programming Tools] mr_absinthe:
conflicting signature

I was able to get a clean build, the apk I've used was framework-res.apk. I copied the file rebuilt.apk from the build folder to my SD card, renamed to framework-res.apk, tried to run it, but I get "Application not installed" error - An existing package by the same name with a conflicting signature is already installed.

Can you please help me to correct the signature? I was trying to look through settings and did not find anything.
[IDEs, Libraries, & Programming Tools] DallasCZ:
framework

Hello,

i am trying to decompile camera.apk from my device ZTE V5 V9180, i made an deodexed rom using Android Kitchen.

Now i loaded framework-res.apk and nubia-res.apk as frameworks.

Then i try to load the camera apk, and always got this

i cant see any other framework files than the two mentioned above.

Please Help
[IDEs, Libraries, & Programming Tools] nicesoni_ash:
Ignore please.
[IDEs, Libraries, & Programming Tools] barth2:
Is it possible to sign apk with original signature with apk studio
[IDEs, Libraries, & Programming Tools] miloytyn:
If you have the correct key available.
[IDEs, Libraries, & Programming Tools] barth2:
Could you elaborate. Is the key in the original/ folder after decompilethe.
[IDEs, Libraries, & Programming Tools] danivancouver:
Hello, I have problems with some apk to compile, this is the result

I: Using Apktool 2.0.0-Beta9

I: Loading resource table...

Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:54)

at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:604)

at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)

at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)

at brut.androlib.Androlib.getResTable(Androlib.java:49)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:93)

at brut.apktool.Main.cmdDecode(Main.java:169)

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

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:43)

at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:95)

at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)

... 7 more
[IDEs, Libraries, & Programming Tools] miloytyn:
You have the key if you have originally signed the app. Naturally, the key is not available for downloaded apps. Where the security would be if you could just replicate the signing?

Signing isn't just simple copying of certain data, first you calculate hash of the data and sign the hash with private key, you can then use public key to verify the signature.

So short answer to your question is no you cannot sign with the original key.
[IDEs, Libraries, & Programming Tools] NetSpeedZ:
Decompiled an .apk, recompiled with no errors, however, apk shows in the /system/app folder but not App drawer. Ensured permissions of file are set correctly. What would be causing this?

Any assistance would be appreciated.

------------
[IDEs, Libraries, & Programming Tools] PJF16:
Can anybody provide a mirror to the linux or windows version? Downloading from the homepage is really sloooooooow!

EDIT

Now all worked fine....
[IDEs, Libraries, & Programming Tools] Shaftamle:
Can't remember exactly off hand, but it needs to be specified in the android manifest. It should look something like this

<intent-filter>

<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>

</intent-filter>

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

149ThemedGoogleKeyboards!!!!!!

If you root your phone, you need to know this!!

MyColorScreen
[IDEs, Libraries, & Programming Tools] NetSpeedZ:
Never had to do anything with the manifest before - especially when all I'm doing is changing existing images.

------------
[IDEs, Libraries, & Programming Tools] Shaftamle:
You may be right. I'm sure your more experienced with this than I am. I'm pretty new to development. This is were I got my info. Its in several different articles and seems to be important, but I'll let you decide that.;) Sorry I couldn't help more.

http://stackoverflow.com/questions/11455731/android-application-is-not-showing-up-in-the-app-drawer

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

149ThemedGoogleKeyboards!!!!!!

If you root your phone, you need to know this!!

MyColorScreen
[IDEs, Libraries, & Programming Tools] A N K E S H:
Error on Import

When I am trying to import the apk file it alwasy end up with this log file

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"

Let me know how to fix this.
[IDEs, Libraries, & Programming Tools] Shaftamle:
What version of java do you have installed and is it in you path like the OP states to do? That looks like the problem.

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

149ThemedGoogleKeyboards!!!!!!

If you root your phone, you need to know this!!

MyColorScreen
[IDEs, Libraries, & Programming Tools] dabizstan:
I was able to decompile an APK from play store (runtastic), but when recompiling I receive errors in a style.xml file even without doing any change!

After removing some problematic lines on that file I was able to recompile, but then I copy the app to my phone and when I try to reinstall it says "error by parsing"... any clue?
[IDEs, Libraries, & Programming Tools] Dzepar:
Did you sign the apk? I usually get that when I forgot to sign apk.

Sent from my D2303
[IDEs, Libraries, & Programming Tools] dabizstan:
I think I also tried that, but not complete sure. I'll give it a try today again.

How do you singn the app? I used a script but not sure if it worked properly...
[IDEs, Libraries, & Programming Tools] Dzepar:
I readed that there is app on play store, search it.

Sent from my D2303
[IDEs, Libraries, & Programming Tools] Shaftamle:
Easiest most beginner friendly way is right below. Its done on the phone. Works really well.

https://play.google.com/store/apps/details?id=com.stericson.signapktic

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

149ThemedGoogleKeyboards!!!!!!

Friends don't let friends buy iPhones!

MyColorScreen
[IDEs, Libraries, & Programming Tools] kroart:
It gives me:

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'm using windows
[IDEs, Libraries, & Programming Tools] borce_razor:
Getting this error

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'

has value '1.8', but '1.7' is required.

Error: could not find java.dll

Error: Could not find Java SE Runtime Environment.

1.7 is a must ?
[IDEs, Libraries, & Programming Tools] Shaftamle:
Yes it is

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

149ThemedGoogleKeyboards!!!!!!

Friends don't let friends buy iPhones!

MyColorScreen
[IDEs, Libraries, & Programming Tools] sepadl71:
java version "1.8.0_20"

Java(TM) SE Runtime Environment (build 1.8.0_20-b26)

Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
[IDEs, Libraries, & Programming Tools] rayjr13:
same can you even install an older java version . Guess I'll find out. Hopefully this didnt just become obsolete. I like it
[IDEs, Libraries, & Programming Tools] Birender Singh:
Please fix VM initialization problem.

Error occurred during initialization of VM

Incompatible minimum and maximum heap sizes specified
[IDEs, Libraries, & Programming Tools] vikraminside:
What JVM you use? Jrockit or Sun? Usually heap problems are fixed by xms(min) and xmx(max) parameters.

The industry best practice is to set both min and max to same eg:512,512 1024,1024 MB depending on available RAM memory.

Sun JVM requires permgen parameters to be set as a general practice. It is faster than JRockit as always in terms of speed.

Sent from Moto (G)od. THANKS for pressing thanks.
[IDEs, Libraries, & Programming Tools] denshigomi:
I was able to decode an apk, but when I try to recompile it, the message at the bottom of APK Studio says:

And the log (regardless of whether verbose is toggled or not) says:

I checked and recompiled.apk exists and has content, while signedapk.apk exists and is 0 bytes.

Any ideas?
[IDEs, Libraries, & Programming Tools] ThisIsBoldText:
Does anyone have the links to the dropbox at hand? The website (vaibhavpandey.com/apkstudio) is down and the release on codeplex seems very old.

With the 2.0.3b I get "java.lang.UnsupportedClassVersionError: brut/apktool/Main : Unsupported major.minor version 51.0"

It would be nice if I could override the java runtime path since I have multiple java versions installed for work.
[IDEs, Libraries, & Programming Tools] neutronz:
cant decompile the latest web version of whatsapp
[IDEs, Libraries, & Programming Tools] nicesoni_ash:
Download latest version of apktool and replace with the one that comes with this app.

_____________

Sent from my "GT-I9300/1+1" powered by Carbon Rom & Boeffla/ak Kernel

Fueled by 7000mAh ZeroLemon Battery
[IDEs, Libraries, & Programming Tools] ThisIsBoldText:
Hey guys, where can I get the latest compiled version of apkstudio?
[IDEs, Libraries, & Programming Tools] hotter:
I have the same problem how to fix it?
[IDEs, Libraries, & Programming Tools] barth2:
Try using apktool.jar latest

http://xdaforums.com/showthread.php?t=1755243

Down load rc3 and unzip content into <apkstudio_install_dir>/binaries/apktool
[IDEs, Libraries, & Programming Tools] MBaashar:
This looks pretty awesome ; looking forward to use it : )

I hope more apps like this come out.
[IDEs, Libraries, & Programming Tools] -pk-:
Downloading apktool 2.0.0rc3, then renaming and replacing the jar in apkstudio works. No more decompiling errors.
[IDEs, Libraries, & Programming Tools] simbilli:
I cant recompile an apk when I use api-21 code. I modifying styles.xml in values-21 but I am getting an error that no resources found giving attr...

I know issue about missing api resources. Is it about apkstudio or apk resources ? How can I add resources ?

Thanks in advance
[IDEs, Libraries, & Programming Tools] shefchenko:
can't start the apkstudio

Hello,

I'm trying to start the apk studio, on Ubuntu 12.04 64ibt, but with no success. In terminal this message is appear: "error while loading shared libraries: libQt5PrintSupport.so.5: cannot open shared object file: No such file or directory"

I installed 32libs - apt-get install ia32-libs, but again the apkstudio don't start. Can someone help me with this issue?
[IDEs, Libraries, & Programming Tools] simbilli:
Maybe this is a stupid question sorry for that if it is. Did you download Linux version ? Because I had a similar error with Windows version
[IDEs, Libraries, & Programming Tools] shefchenko:
Yes, I'm trying with the linux version, but still with no success :/
[IDEs, Libraries, & Programming Tools] karan_1317:
Unable to decompile apk

I am using apkstudio for the first time and getting below error while decompiling... Please help..

I: Using Apktool 2.0.0-Beta9 on imagepreviewchanger.apk

I: Loading resource table...

Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:54)

at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:604)

at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)

at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)

at brut.androlib.Androlib.getResTable(Androlib.java:49)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:93)

at brut.apktool.Main.cmdDecode(Main.java:169)

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

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:43)

at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:95)

at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)

... 7 more
[IDEs, Libraries, & Programming Tools] Lonnie Reeder:
This looks like a great tool

This looks like a great tool. I need to free up some of my time from work and stuff to try and play around with this.

Thanks
[IDEs, Libraries, & Programming Tools] punitthereddevil:
I come from a non tech background, so please help me out even though my questions may be noobish...

I wanted to delete some permissions from a particular app...so can this tool help me with it...? If yes, can u please tell me how...?

Thank you...
[IDEs, Libraries, & Programming Tools] vikraminside:
Hey great guys,

Can I get a tutorial or guide for using this? Please link if already exists?
[IDEs, Libraries, & Programming Tools] barth2:
If you are rooted I think there are some apps or xposed modules that control permission per app.

If you want to do this by decompiling, you can look in the AndroidManifest.xml and see what happens when you delete some of the permissions. It should be obvious what to do.
[IDEs, Libraries, & Programming Tools] Lovediamondz:
Getting Following Error !! Pls Help

Getting Error When Decompiling apk

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required.

Error: could not find java.dll

Error: Could not find Java SE Runtime Environment.
[IDEs, Libraries, & Programming Tools] simbilli:
You need to install jre 7
[IDEs, Libraries, & Programming Tools] barth2:
^^^ make sure you are using latest apktool.jar (I think currently it's 2.0 rc3)
[IDEs, Libraries, & Programming Tools] shawnjv:
Thanks for the suggestion. I tried it but still got the same error code. Something else I should try?
[IDEs, Libraries, & Programming Tools] barth2:
Try pulling framework-res.apk from your device and install it with

apktool if framework-res.apk

In think you can also add the framework directly in apkstudio (file > settings) but I haven't done it that way myself.
[IDEs, Libraries, & Programming Tools] shawnjv:
Ya so I was trying to do that but I couldn't for the life of me find it on my phone. I searched with es file explorer and couldn't find anything. I was going to show the link of a place I got the framework from but it won't let me till I have 10 posts :/

I'm very noob with this stuff and it's confusing for me, never messed with this kind of stuff before. Do you know an easy way to pull framework from my phone? It's a Galaxy S4 and I'm running latest version of the Goldeneye rom on it.

Thanks for helping a noob.

Edit: Ah so using the browser in Apk Studio I managed to find framework-res.apk and twframework-res.apk. Should I just use both at once or only one of them or.....

Edit: So I tried again using both framework files I found and still same error code. Idk wtf I'm doing wrong blah.