EMERGENCY, please help with Apk Easy Tool, trying to compile an app but it shows this - Android Apps and Games

07/09/2019 18:20:25
Compiling APK file... (CMD mode: WriteLine)
/c "java -Xmx1024m -jar "C:\Program Files (x86)\APK Easy Tool\Apktool\apktool_2.4.0.jar" b -f -o "C:\Users\madani\Desktop\APK Easy Tool\recompiled\tyblate-recompiled.apk" "C:\Users\madani\Desktop\APK Easy Tool\decompiled\tyblate" "
I: Using Apktool 2.4.0
I: Smaling smali folder into classes.dex...
I: Building resources...
S: WARNING: Could not write to (C:\Users\madani\AppData\Local\apktool\framework), using C:\Users\madani\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
W: ERROR: 'C:\Users\madani\AppData\Local\Temp\APKTOOL7465868708093004443.tmp' exists (use '-f' to force overwrite)
brut.directory.DirectoryException: java.util.zip.ZipException: zip file is empty
------------------------------------------

Related

[Resolved] Newsbie question: apktool - recompiled binary is not installable

Hi,
first of all sorry for posting in a new thread, but I'm not allowed to post in apktool-thread (to few postings).
I'm trying to edit permissions of apk's with apktool.
Code:
C:\temp\android\apktool>apktool d -s -f "n:\Cut the Rope - Android\cut-the-rope.apk" test
I: Copying raw classes.dex file...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Carsten\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
No, errors.
I reassemble it unmodified.
Code:
C:\temp\android\apktool>apktool b test test.apk
I: Copying classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs...
I: Building apk file...
No, errors.
Installing the file
Code:
F:\android-sdk-windows\platform-tools>adb install c:test.apk
2327 KB/s (2931257 bytes in 1.230s)
pkg: /data/local/tmp/c:test.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
gives an error.
Code:
$logcat *:e
/PackageParser( 460): Package com.feelingtouch.physical has no certificates at entry assets/font/Plok.ttf; ignoring!
Any ideas what's wrong?
greetings
Carsten
found the solution. All packages have to be signed, even if they are installed via adb.
Debug test signing is enough:
Code:
jarsigner -verbose -keystore C:\Users\Carsten\.android\debug.keystore -storepass android c:test.apk androiddebugkey

[MOD][GUIDE]Enable Ripple Effect Samsung ICS ROMs

While trying to find any hidden features Samsung may have kept hidden in the stock ROM for my Galaxy Ace II X (GT-S7560M), I found some smali code for the lockscreen options, that removed the option to toggle the ripple effect! If you don`t know what the ripple effect is, view this video. It replaces the stock Samsung slide unlock with what looks like a body of water. When you touch the screen, it makes a ripple in the water. Anyways, on to the mod.
I do not know if this mod will work on other Samsung ICS ROMs. All this mod does is make the option appear, by deleting a line of code (that makes the toggle not there). You can be on either an odexed or deodexed ROM, but the SecSettings.apk should be from a deodexed ROM, to make the process a lot easier. You can reodex the SecSettings.apk easily using this app. I`m assuming that you know the basics of decompiling and recompiling .apk files. I am in no way responsible for any damage done to your hardware. Let`s start:
--> Decompile SecSettings.apk (I use apktool)
--> Navigate to /smali/com/android/settings
--> Open LockScreenSettings.smali with your preferred text editor (I use Notepad++)
--> Search `mRippleEffect`, and search until you find the line with `mRippleEffect` that is above a line with the phrase `removePreference` in it.
--> Remove 4 lines - that `removePreference` line, and the 3 lines above it.
--> Save, recompile, push to /system/app/.
--> Decompile framework-res.apk
--> Navigate to /res/values
--> Open bools.xml
--> Search `config_isWaterRippleEnabled`
--> Change value from `false` to `true`
--> Save, recompile, push to /system/framework/
--> Change the permissions to 0644 (rw-r--r--)
--> Reboot, and enjoy!
An example of which lines to remove (taken from my SecSettings.apk, so code may differ slightly):
Code:
invoke-virtual {p0}, Lcom/android/settings/LockScreenSettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;
move-result-object v5
iget-object v8, p0, Lcom/android/settings/LockScreenSettings;->mRippleEffect:Landroid/preference/CheckBoxPreference;
invoke-virtual {v5, v8}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
You should find the option to toggle the ripple lockscreen under Security > Lock screen options. Make sure that swipe unlock is enabled so you can access the Lock screen options.
You can also enable some other hidden lockscreen settings (like the Information Ticker, Camera Quick Access, Wakeup Command which requires S Voice, et cetera depending on whether or not Samsung has chosen to include certain features in the ROM. I can`t guarantee that there`ll be no bugs if you`re trying to enable another hidden option) by following this general method (of deleting code that is telling the device to hide the option). If you have any problems, questions, or comments, post them here! If you choose to include this mod in your ROM, please give me some thanks!
Can u tell me what is size of apk u got after recompiling.I got both apk are less in size by 6 mb than stock one.thanks
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
25vikasp said:
Can u tell me what is size of apk u got after recompiling.I got both apk are less in size by 6 mb than stock one.thanks
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
Click to expand...
Click to collapse
There isn't a specific size, but it should be close to the size of the original apk. Have you used apktool before? You have to replace the AndroidManifest.xml and the META-INF folder with the ones from the original apk in this case. Make a backup of your stock ROM in case you get into a bootloop when you push the two modified apks to their respective locations. Set their permissions as rw-r-r (chmod 0644). If you still have problems afterwards, let me know and I'll willingly help you out.
Codename13 said:
There isn't a specific size, but it should be close to the size of the original apk. Have you used apktool before? You have to replace the AndroidManifest.xml and the META-INF folder with the ones from the original apk in this case. Make a backup of your stock ROM in case you get into a bootloop when you push the two modified apks to their respective locations. Set their permissions as rw-r-r (chmod 0644). If you still have problems afterwards, let me know and I'll willingly help you out.
Click to expand...
Click to collapse
I am new to apk tool but I read that tutorials and tried to do that.but I got error at the end when recompiling apk section.even I Got apk modded files then I placed those files to system and framework respectively.I got bootloop after that I recovered it by cwm package .ur codes are present in my smali files as u said so may be I can enable my ripple effects in my s duos.can u suggest any tutorial.I have Windows xp.thanks for ur reply mate
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
25vikasp said:
I am new to apk tool but I read that tutorials and tried to do that.but I got error at the end when recompiling apk section.even I Got apk modded files then I placed those files to system and framework respectively.I got bootloop after that I recovered it by cwm package .ur codes are present in my smali files as u said so may be I can enable my ripple effects in my s duos.can u suggest any tutorial.I have Windows xp.thanks for ur reply mate
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
Click to expand...
Click to collapse
The most important tool in Android development has by far got to be reading error messages/logcat. Paste the complete wall of text from when you recompile with apktool. Also, which apk is the one that're you're having issues with? framework-res.apk or SecSettings.apk? And before you decompile either, you have to "apktool if" (command to install a framework) framework-res.apk and twframework-res.apk (found under /system/framework/), with a path that directs apktool to the apk.
Codename13 said:
The most important tool in Android development has by far got to be reading error messages/logcat. Paste the complete wall of text from when you recompile with apktool. Also, which apk is the one that're you're having issues with? framework-res.apk or SecSettings.apk? And before you decompile either, you have to "apktool if" (command to install a framework) framework-res.apk and twframework-res.apk (found under /system/framework/), with a path that directs apktool to the apk.
Click to expand...
Click to collapse
Ok I will post logcat here thanks.I got problem in both related apk.thanks for reply
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
---------- Post added at 04:01 PM ---------- Previous post was at 03:42 PM ----------
see my logcat for secsettings
C:\Documents and Settings\vikas>apktool
Apktool v1.5.1PR2. - a tool for reengineering Android apk files
Copyright 2010 Ryszard Wi?niewski <[email protected]>
with smali v1.4.1, and baksmali v1.4.1
Updated by @iBotPeaches <[email protected]>
Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
Usage: apktool [-q|--quiet OR -v|--verbose] COMMAND [...]
COMMANDs are:
d[ecode] [OPTS] <file.apk> [<dir>]
Decode <file.apk> to <dir>.
OPTS:
-s, --no-src
Do not decode sources.
-r, --no-res
Do not decode resources.
-d, --debug
Decode in debug mode. Check project page for more info.
-b, --no-debug-info
Baksmali -- don't write out debug info (.local, .param, .line, etc.)
-f, --force
Force delete destination directory.
-t <tag>, --frame-tag <tag>
Try to use framework files tagged by <tag>.
--framework <dir>
Use the specified directory for framework files --keep-broken
-res
Use if there was an error and some resources were dropped, e.g.:
"Invalid config flags detected. Dropping resources", but you
want to decode them anyway, even with errors. You will have to
fix them manually before building.
b[uild] [OPTS] [<app_path>] [<out_file>]
Build an apk from already decoded application located in <app_path>.
It will automatically detect, whether files was changed and perform
needed steps only.
If you omit <app_path> then current directory will be used.
If you omit <out_file> then <app_path>/dist/<name_of_original.apk>
will be used.
OPTS:
-f, --force-all
Skip changes detection and build all files.
-d, --debug
Build in debug mode. Check project page for more info.
if|install-framework <framework.apk> [<tag>]
Install framework file to your system.
For additional info, see: https://github.com/iBotPeaches/Apktool
For smali/baksmali info, see: http://code.google.com/p/smali/
C:\Documents and Settings\vikas>apktool if framework-res.apk
I: Framework installed to: C:\Documents and Settings\vikas\apktool\framework\1.a
pk
C:\Documents and Settings\vikas>apktool b secsettings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
at brut.androlib.Androlib.build(Androlib.java:181)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:214)
at brut.apktool.Main.main(Main.java:74)
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
C:\Documents and Settings\vikas>apktool d secsettings.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Documents and Settings\vikas\apktool\fra
mework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\Documents and Settings\vikas>apktool b secsettings
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'crypt_keeper_button_text' has no default translation in C
:\Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_component_title' has no default translation in C:\D
ocuments and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_settings_summary' has no default translation in C:\
Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_settings_title' has no default translation in C:\Do
cuments and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_test' has no default translation in C:\Documents an
d Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_timeout_summary' has no default translation in C:\D
ocuments and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_timeout_title' has no default translation in C:\Doc
uments and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_timeout_zero_summary' has no default translation in
C:\Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'system_tutorial_list_item_summary' has no default transla
tion in C:\Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'system_tutorial_list_item_title' has no default translati
on in C:\Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'vibrate_title' has no default translation in C:\Documents
and Settings\vikas\secsettings\res; found: es pt
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.an
droid.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas
.android.com/apk/res/android); using existing value in manifest.
I: Building apk file...
C:\Documents and Settings\vikas>
i am giving u links for my original files u can edit it and give me just a request ok mate.i will try until success.thanks
https://www.dropbox.com/s/8pv8wqp32eclebi/SecSettings.apk
https://www.dropbox.com/s/ig48getu8l8w8y3/framework-res.apk
25vikasp said:
Ok I will post logcat here thanks.I got problem in both related apk.thanks for reply
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
---------- Post added at 04:01 PM ---------- Previous post was at 03:42 PM ----------
see my logcat for secsettings
C:\Documents and Settings\vikas>apktool
Apktool v1.5.1PR2. - a tool for reengineering Android apk files
Copyright 2010 Ryszard Wi?niewski <[email protected]>
with smali v1.4.1, and baksmali v1.4.1
Updated by @iBotPeaches <[email protected]>
Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
Usage: apktool [-q|--quiet OR -v|--verbose] COMMAND [...]
COMMANDs are:
d[ecode] [OPTS] <file.apk> [<dir>]
Decode <file.apk> to <dir>.
OPTS:
-s, --no-src
Do not decode sources.
-r, --no-res
Do not decode resources.
-d, --debug
Decode in debug mode. Check project page for more info.
-b, --no-debug-info
Baksmali -- don't write out debug info (.local, .param, .line, etc.)
-f, --force
Force delete destination directory.
-t <tag>, --frame-tag <tag>
Try to use framework files tagged by <tag>.
--framework <dir>
Use the specified directory for framework files --keep-broken
-res
Use if there was an error and some resources were dropped, e.g.:
"Invalid config flags detected. Dropping resources", but you
want to decode them anyway, even with errors. You will have to
fix them manually before building.
b[uild] [OPTS] [<app_path>] [<out_file>]
Build an apk from already decoded application located in <app_path>.
It will automatically detect, whether files was changed and perform
needed steps only.
If you omit <app_path> then current directory will be used.
If you omit <out_file> then <app_path>/dist/<name_of_original.apk>
will be used.
OPTS:
-f, --force-all
Skip changes detection and build all files.
-d, --debug
Build in debug mode. Check project page for more info.
if|install-framework <framework.apk> [<tag>]
Install framework file to your system.
For additional info, see: https://github.com/iBotPeaches/Apktool
For smali/baksmali info, see: http://code.google.com/p/smali/
C:\Documents and Settings\vikas>apktool if framework-res.apk
I: Framework installed to: C:\Documents and Settings\vikas\apktool\framework\1.a
pk
C:\Documents and Settings\vikas>apktool b secsettings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
at brut.androlib.Androlib.build(Androlib.java:181)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:214)
at brut.apktool.Main.main(Main.java:74)
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
C:\Documents and Settings\vikas>apktool d secsettings.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Documents and Settings\vikas\apktool\fra
mework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\Documents and Settings\vikas>apktool b secsettings
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'crypt_keeper_button_text' has no default translation in C
:\Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_component_title' has no default translation in C:\D
ocuments and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_settings_summary' has no default translation in C:\
Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_settings_title' has no default translation in C:\Do
cuments and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_test' has no default translation in C:\Documents an
d Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_timeout_summary' has no default translation in C:\D
ocuments and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_timeout_title' has no default translation in C:\Doc
uments and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'dream_timeout_zero_summary' has no default translation in
C:\Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'system_tutorial_list_item_summary' has no default transla
tion in C:\Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'system_tutorial_list_item_title' has no default translati
on in C:\Documents and Settings\vikas\secsettings\res; found: es pt
aapt: warning: string 'vibrate_title' has no default translation in C:\Documents
and Settings\vikas\secsettings\res; found: es pt
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.an
droid.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas
.android.com/apk/res/android); using existing value in manifest.
I: Building apk file...
C:\Documents and Settings\vikas>
i am giving u links for my original files u can edit it and give me just a request ok mate.i will try until success.thanks
https://www.dropbox.com/s/8pv8wqp32eclebi/SecSettings.apk
https://www.dropbox.com/s/ig48getu8l8w8y3/framework-res.apk
Click to expand...
Click to collapse
your problem is your not directing apktool to the settings folder.. use my QuickMod tool to decompile/compile it..
ricky310711 said:
your problem is your not directing apktool to the settings folder.. use my QuickMod tool to decompile/compile it..
Click to expand...
Click to collapse
Oh I would love to try.thanks.any link for that
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
25vikasp said:
Oh I would love to try.thanks.any link for that
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
Click to expand...
Click to collapse
click on my profile and view my threads to find quickmod tool
Hey mate I am using crt effects on off mod by xposed tweaking it is great.is there any way to make it default without xposed framework by modifying apks.
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
ricky310711 said:
click on my profile and view my threads to find quickmod tool
Click to expand...
Click to collapse
25vikasp said:
Oh I would love to try.thanks.any link for that
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
Click to expand...
Click to collapse
Niiiiiiiiiiiiiiiiiiiiiiice got it working on my GT-S7562 :good:
Thank you @ricky310711 for your great tool!! just had to edit two lines of the .bat to get it to sign the compiled apks (/%apk%/)
Thank you @Codename13 for this awesome idea
KlinkOnE said:
Niiiiiiiiiiiiiiiiiiiiiiice got it working on my GT-S7562 :good:
Thank you @ricky310711 for your great tool!! just had to edit two lines of the .bat to get it to sign the compiled apks (/%apk%/)
Thank you @Codename13 for this awesome idea
Click to expand...
Click to collapse
Oh worked.I am very thankful if u post step by step process in short here
Sent from my GT-S7562 modded ics 1.2 ghz using Tapatalk 2
followed instructions given
you got to edit the .bat of modtool to get the apks signed
it is explained in a post in the modtool thread search for /%apk%/
as i am lazy i put the signed apks in the zip of pmp_u_5.7.4 update package (replaced them)
installed through cwm et voila now it ripples
can explain more when back home
Sent from my GT-S7562 using xda app-developers app
works with galaxy s duos.thanks for quicktool
Sir if i permission Framework is dangerous because its going to bootloop my celpphone can u help me how to do that to avoid bootloop why changed permission the framework.
marvin14 said:
Sir if i permission Framework is dangerous because its going to bootloop my celpphone can u help me how to do that to avoid bootloop why changed permission the framework.
Click to expand...
Click to collapse
While changing bools nothing will happen to bootloop the device incase backup the Rom or make a flashable original framework
Sent from my GT-S7562 using xda app-developers app
A bit help........
Hey, trying hard to port CM 11 to Galaxy S Duos. Just need the Network working and dual-SIM... Further details are HERE. JUST take a look
@Codename13 So I'm trying to re-enable it with a GT S7560M like you have, however, when opening LockScreenSettings.smali, there are no instances of mRippleEffect in the file. I'm using this method of extracting the files from the APK, what am I doing wrong?
Team Fail said:
@Codename13 So I'm trying to re-enable it with a GT S7560M like you have, however, when opening LockScreenSettings.smali, there are no instances of mRippleEffect in the file. I'm using this method of extracting the files from the APK, what am I doing wrong?
Click to expand...
Click to collapse
A. Where'd you get the files from? Mod Pack II X has this already, so if the files are from there then that's why you can't find mRippleEffect instances.
B. Did you properly import the framework-res and the twframework-res with the decompiler tool?
Codename13 said:
A. Where'd you get the files from? Mod Pack II X has this already, so if the files are from there then that's why you can't find mRippleEffect instances.
B. Did you properly import the framework-res and the twframework-res with the decompiler tool?
Click to expand...
Click to collapse
A. I took the files directly from my phone. I'm on stock, without Mod Pack II X installed.
B. The instructions there said the TW framework to import was "framework_Res.apk", however it's different on my device (framework-res.apk) so I didn't. I'll try importing that one and re-decompile it and see how it goes.

Decompiling Settings.apk on Xperia V - Android 4.3

I'm using android 4.3 stock version of framework-res.apk to decompile Settings.apk but Apktool 1.5.2 & Apktool 2.0 beta are giving me this error :
"Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info."
any help ?
Found the Problem & fixed apktool
apparently I needed to install SemcGenericUxpRes.apk before decompiling the Settings.apk file, another problem presented itself at this point..
installing SemcGenericUxpRes.apk using apktool 2.0 beta 7 resulted an error :
Exception in thread "main" brut.androlib.AndrolibException: Multiple types: <emp
ty>
at brut.androlib.res.data.ResPackage.addType(ResPackage.java:168)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
9)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource
s.java:686)
at brut.androlib.Androlib.installFramework(Androlib.java:640)
at brut.apktool.Main.cmdInstallFramework(Main.java:249)
at brut.apktool.Main.main(Main.java:91)
so I did some research and fixed the 'Multiple types' bug in apktool (I'll attach the fixed version at the end of the post) ,and now every thing worked just fine ^_^
C:\apk>java -jar apktool-fixed.jar if framework-res.apk
I: Framework installed to: C:\Users\User\apktool\framework\1.apk
C:\apk>java -jar apktool-fixed.jar if SemcGenericUxpRes.apk
I: Framework installed to: C:\Users\User\apktool\framework\2.apk
C:\apk>java -jar apktool-fixed.jar d Settings.apk
I: Using Apktool 2.0.0-Beta7 on Settings.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\User\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Loading resource table from file: C:\Users\User\apktool\framework\2.apk
Cleaning up unclosed ZipFile for archive C:\Users\User\apktool\framework\2.apk
I: Loading resource table...
Cleaning up unclosed ZipFile for archive C:\Users\User\apktool\framework\1.apk
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...
fixed apktool 2.0 beta 7 (remove spaces from the url) : http :// www . mediafire . com /?cnstb97sszm476y
delete as I found the answer, please ignore

Error on compile with apktool

Apktool Version -2.6.1
Operating System -Windows
APK From -ROM android 12
log from apk easy tool:
[all log](https://github.com/iBotPeaches/Apktool/files/8921654/RecentLog-Instance1.txt)
```
I: Using Apktool 2.6.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: C:\Users\mor\Documents\APK Easy Tool\1-Decompiled APKs\MtkSettings\res\values\attrs.xml:55: error: duplicate symbol '@null'.
```
Frameworks:
framework-res.apk
framework dolder
APK:
https://drive.google.com/file/d/1XA3UTWS91GeF72Gdfj852ZLQIZc5kWkw/view?usp=sharing (settings app)
Thanks.

How do I compile Apktool into a Linux binary ?

Hello, I'm posting that thread because I need help to compile the Apktool JAR file into a Linux binary.
I need to compile it into a binary because my VPS can't run Java, when running Java, there is a lot of problems, maybe that because my portable Java installation is wrong, I dont know.
(my VPS provider dont provide Java and has disabled tools like APT, YUM, PACMAN, SNAP or DPKG...)
I thought it could be a better idea to compile the Apktool JAR file into a native Linux binary, and I've done it, but there is a problem in the binary.
Since my server is on Linux x86_64 (Unknown distribution) and my PC is on Linux x86_64 (MX Linux, Debian-based), it could work.
After a lot of searching, I finally installed GraalVM Native Image and made a command to compile the JAR file into a binary.
And after 15 minutes on my (bad) computer it generated a Linux binary file, but when trying to decompile an APK on my computer with it, it gaves:
$ ./apktool d myapp.apk -f
I: Using Apktool 2.7.0 on myapp.apk
I: Loading resource table...
Exception in thread "main" java.nio.charset.UnsupportedCharsetException: CESU8
at [EMAIL][email protected][/EMAIL]/java.nio.charset.Charset.forName(Charset.java:537)
at brut.androlib.res.decoder.StringBlock.<init>(StringBlock.java:277)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:52)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:79)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:51)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:780)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:64)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:56)
at brut.androlib.Androlib.getResTable(Androlib.java:74)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:251)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:109)
at brut.apktool.Main.cmdDecode(Main.java:175)
at brut.apktool.Main.main(Main.java:79)
But if on my computer I run the same command but with the JAR file, it gaves:
$ java -jar apktool.jar d myapp.apk -f
I: Using Apktool 2.7.0 on myapp.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/hg/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
(so it works on the same APK with the JAR file but not with the binary)
In this message, there will be the binary I've compiled. (for Linux x86_64 only)
Please note that I'm new to XDA Developers, but also to Java and GraalVM Native Image: I never touched one single line of Java code.
I made Python programms, but I never made any Java code. And I discovered GraalVM yesterday.
Can someone help me please ?
And, it is possible that I have problems with APK frameworks when running the binary on my server ?
I can only access to files under my home directory, will I need to install frameworks manually in an "apktool" directory on my home directory ?
Thanks in advance, HGStyleOfficial (my real nickname is HGStyle but it was allready taken on the forum by a random guy registered in 2010 and who didnt had many activities on the forum...)
Apktool version 2.7.0 (latest)
OpenJDK 11.0.18 for Debian
GraalVM 20.0.1 (Java 20, Linux x64)
native-image 20.0.1 2023-04-18

Categories

Resources