today I tried to replace default sounds for the TickTick app with custom ones, but I failed miserably. I tried apktool to decompile the app, replace the sound files in resources, compile it back, but this is the end for me, because apktool doesn't work with my setup (Ubuntu 21.10), not even if I run apktool d base.apk; then immediately apktool d base. It just crashes with this error.
So I tried directly modifying .apk file, replacing sounds, zipaligning result and signing the app (tried apksigner, jarsigner); also tried deleting whole META-INF, not deleting it, deleting only .SF, .RSA files.
When I use the combination of not deleting META-INF, modifying the sound files, zipaligning/not zipaligning before signing, then signing the app it can be installed, but when I try to run it, only black screen gets displayed.
Logcat gives me below information.
04-15 19:09:29.442 E/AndroidRuntime(26166): at com.ticktick.task.TickTickApplicationBase.initKernelManager(TickTickApplicationBase.java:2)
04-15 19:09:29.442 E/AndroidRuntime(26166): at com.ticktick.task.TickTickApplicationBase.onCreate(TickTickApplicationBase.java:19)
04-15 19:09:29.442 E/AndroidRuntime(26166): at com.ticktick.task.TickTickApplication.onCreate(TickTickApplication.java:1)
Since I cannot turn on debug mode, because apktool doesn't work for me I am lost. Is there anyone with more knowledge on this subject than me, who would be willing to help?
Thanks for reading this far.
So it turns out apktool currently has a bug, so once I used workaround from user Gourov, I was able to use apktool. I encountered another problem however - APK exported from my mobile wouldn't start once altered, so I went to apkmirror.com to retrieve APK for the app, decoded it using apktool, replaced audio files with mine, built it using apktool, signed it with apksigner, installed it on my phone using adb install and it just works :)
Related
I was developing an Android app for more than a month, but my computer crashed and I lost all the code from it. I have a compiled app installed on a test phone and tablet. Is there any way to extract source code from it?
I followed some guide for game modders (they are probably doing something similar), and I have extracted .apk with an app called Total Commander. Now the guide states that I should extract it with the apktool. But all files are still in binary (when I opened them I got random chars). Now, is there any tool (for Linux) that can decompile .apk back to source code, or maybe some feature of apktool I miss?
Note: I also tried this answer from 10 but also without success.
EDIT: javadecompileonline also did not decompile binaries correctly,
so this should be .json file:
<m*/��%kي%jTƴ���69/�t��
č �Cx���Q�đš?������i�
ć���/��i�JRᙱg�.�s
First you go to Android studio's welcome page there is a option to extract source code from APKs.
Another way is to install this apk extractor application from play store then you can extract source code from APKs Link : https://play.google.com/store/apps/details?id=com.ext.ui
I am currently working on an android app but my hard drive unfortunately crashed and I lost all the data on it... I am trying to recover my source code from the debug APK I had installed on my phone (using dex2jar and jd-gui) however, it seems like the classes are not present in the classes.dex and classes2.dex (both files are tiny and do not contain any of the classes in my code, see photo).
I used apk extractor to get the apk from my installed app and I cant seem to get anything close to my original classes... I am wondering if I am doing something wrong to get the APK from the installed app; any help would be greatly appreciated.
Thanks.
For de-compiling your APK to Java classes you can go to this site -
http://www.javadecompilers.com/apk
Just upload your apk and click on decompile. It should work for you !
Alright, so I have a problem with decompiling apks with apktools. I am currently trying to edit the current version of snapchat so that I can have unlimited caption length without root. To do this I decompiled the apk with apktools, edited the smali file needed and then recompiled it, but it will not install on the phone for some reason.
I then tried to just decompile and recompile the apk without any edits and it also did not work.
Is there some special signing that needs to happen for the app to be built and installed properly? Or maybe something that I am missing with apktools? I have decompiled many other apks and they worked fine, but snapchat is not having any of it. Any help is appreciated, thanks.
Well yes. You forgot to sign the apk, but assuming you did sign you will run into another bug which affects the functionality of the application which I've noted below. Check out signapk.jar for information on signing an apk.
This is a known bug (859) in apktool. Basically you have this string
<g id="username">$1%s</g> is typing...
which apktool decodes as
<g id=username>$1%s</g> is typing....
Apktool uses a different decoder for arrays.xml <items> (which is where these strings reside). You can manually fix these arrays (happens in multiple places) after decode by re-adding the double quotes. This should fix the problem.
I'm trying to modify the Androidmanifest.xml for the browser on my device so that I can execute an app by loading a URI in the browser.
I've been running around the file system in ADB SHELL all day, but can't seem to find it. Plus there is no FIND, nor LOCATE command on the system.
You can theoretically find the Androidmanifest.xml file in the APK.
Every APK contains the compiled source code of the application. There is no useable decompiler for APKs at the moment so it is not possible to change the content of one.
In addition to the compiled code and the other resources of the application, an APK also contains a signature from the developer, which will become invalid when the content is changed to verify the source of an APK. An Android system won't install an APK with an invalid signature, so even if you could change the content of the APK, you still couldn't use it.
The conclusion: You cannot do what you are trying to do.
Android Studio on Windows 10/11, it’s in: app/src/main.
I compiled and ran a project on my phone through eclipse which is still install there currently. While doing some directory cleaning I accidentally deleted the source code so the only remaining version of the code is in the apk installed on my phone. Is there anyway to export the app back to my computer?? It isn't signed or anything either.
Thanks!
You can set up to be able to copy files on/off your phone via the USB connection - heres where you can look to find it:
Does Android keep the .apk files? if so where?
Then after you get the .apk off look at these questions for decompiling:
Is it possible to decompile an Android .apk file?
decompiling DEX into Java sourcecode
You CAN pull the APK off of the phone, but it's going to be Java Bytecode, not your source code (regardless of whether or not it's signed). You would have to reverse-engineer the classes to retrieve your code. If it's not a VERY large app, I'd say your time would best be spent simply re-creating it.