[Question] How to remove the Discover page on Snapchat ? - Android Q&A, Help & Troubleshooting

Hello,
I would like to remove Snapchat Discover and stories.
I found that it might be possible by reverse engineering Snapchat's code, so I installed apktool, dex2jar and jd-gui and I converted the apk to a jar file, but I ran into issues that I couldn't fix :
- can not merge I and Z (best solution I found, but I don't know how to modify the dex by hand or modify the dex2jar code)
- and when I tried to decompile the apk using apktool, the command prompt displayed this :
I: Using Apktool 2.5.0 on Snapchat.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Invalid chunk type: expected=0x00000200, got=0x00000203
at brut.androlib.res.decoder.ARSCDecoder.checkChunkType(ARSCDecoder.java:544)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:88)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:790)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:67)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:59)
at brut.androlib.Androlib.getResTable(Androlib.java:66)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:236)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:118)
at brut.apktool.Main.cmdDecode(Main.java:179)
at brut.apktool.Main.main(Main.java:82)
Click to expand...
Click to collapse
All in all... I have no idea what I'm doing and since I'd rather not waste time with trial and error, I would really appreciate it if someone could tell me if this is even possible and give me some advice.
Thanks in advance, cheers

Related

[Q] Compile/Decompile using apktool or APK Multi Tool

Hi everyone,
I'm trying desperately to edit some files inside SystemUI.apk and framework-res.apk but I'm having some troubles...
I wanted to post in the specific thread of the program : http://forum.xda-developers.com/showthread.php?t=1310151 but I'm not allowed to, because it's my first post here.
First I used only apktool, I managed to decompile my 2 files with no problems, I replaced a few *.png files and tried to recompile it but I'm getting errors... (I only manage to recompile the files if I don't edit a thing)
Then I tried APK Multi Tool, I achieved to decompile my 2 files (with the option 9 in the program), but I can't recompile them after editing my files. So I decided to make a test, I tried to decompile and recompile (I hit 9 then 11 in the choice case) them WITHOUT changing a thing and I get errors anyway...
If I use the choice 1 (only extract the apk), do my editing and then zip the project (with the choice 3), directories are wrong inside the new *.apk, I get "projects\SystemUI.apk\(res or smali, etc...)" so the *.apk result is not usable
Here is the log file when I try to recompile WITHOUT changes :
Code:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\David\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\David\AppData\Local\Temp\APKTOOL8476784424403325139.tmp, -I, C:\Users\David\apktool\framework\1.apk, -S, C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\res, -M, C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\David\AppData\Local\Temp\APKTOOL8476784424403325139.tmp, -I, C:\Users\David\apktool\framework\1.apk, -S, C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\res, -M, C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, Le fichier spécifié est introuvable
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: CreateProcess error=2, Le fichier spécifié est introuvable
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
Thanks in advance if you can help me
I managed to recompile my edited files with apktool by placing classes.dex and resources.arsc in the folder oh the extracted archives.
I signed my SystemUI.apk and framework-res.apk with signapk.jar but my ROM still won't boot...
I'm getting the same error
I've emailed the dev. Will let you know if I get a response.
Can you try removing the spaces in the folder name ? "APK Multi Tool" ?
My Windows user name has spaces in it, I was just wondering if that could be an issue.
Just a hunch since spaces can sometimes cause problems.
Let me know if that works !
---------- Post added at 08:10 AM ---------- Previous post was at 07:46 AM ----------
Well ignore my previous post. I created a new user and tried to compile. Still getting the same error
Funny, i'm having the EXACT same thing happen to me.
I used to use linux and I know that when I was originally installing it(on linux) it wouldn't run without a file called "aapt". I had to download and insert the file with the others in a specific area.
Unfortunately I had to wipe linux and reinstall win7 for school purposes. So now here I am trying to test everything on windows, which is a blur to me since I haven't used it in so long.
In the error log we are getting, it's mentioning something about "aapt", and when I go searching for it in the APK-multi tool folders, it's nowhere to be found. This file may be what's causing the issue of de/recompiling.
EDIT: I figured it out, well kinda. I uninstalled version 1.0.2, and downloaded and installed version 1.0.0 of apk multi tool from his website. Tested again and this time everything went ok. there must be some sort of bug in the newest one.
Try this, it will work
Place apk in modding folder
Hit #1to extract apk
go to project folder and make your mods
now hit #3 to zip apk
then hit #1 to retain system signature for system files (system.ui, framework.res etc...)
go into modding folder and get the new unsigned apk and rename it to what it was before
place in sd card or use adb to push to where ever it needs to go
this works everytime for me, never had problems hope this helps
that works for editing images only...but I want to edit some .xml files, and when I extract I don't get them
thats where we need decompile/compile
Im getting this same issue..
I have the same issue every apk creates with a project/*.*.apk
Anyone fix it?
Ok so dropped back to version 1.0.1 and it works
when I hit option 3 in 1.0.1 I see
compressing res\
But in version 1.0.2 I see
compressing project\FILESNAME.apk\res\
Hope that helps
Test This
Do you Have instaled Android SDK Tools?
You Have Downloaded de Google Api 15 for Android SDK Tools or others Api for your version of Android?
Andersondj said:
Do you Have instaled Android SDK Tools?
You Have Downloaded de Google Api 15 for Android SDK Tools or others Api for your version of Android?
Click to expand...
Click to collapse
Andersondj, thanks for your reply.
Maybe it will solve my problem, coz i had installed API 14 (4.0) and now i`ll try install API 15.
Thanks bro, and see you on BrasilDroid.
Which version of Android are you on? Apktool doesn't work too well with ICS.
still no luck
Ticklefish said:
Which version of Android are you on? Apktool doesn't work too well with ICS.
Click to expand...
Click to collapse
i hv every method but still its not recompiling
Dygreg said:
Here is the log file when I try to recompile WITHOUT changes :
Code:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\David\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\David\AppData\Local\Temp\APKTOOL8476784424403325139.tmp, -I, C:\Users\David\apktool\framework\1.apk, -S, [B][COLOR="Red"]C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\res[/COLOR], -M[/B], C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\AndroidManifest.xml][/QUOTE]
See point 1, spaces in paths have given me issues before and spent ages trying everything before finally realizing it's how I'd named the folder. If that doesn't work, assuming you've installed all the necessary resource apks I'm not sure what to suggest. apktool never gave me issues [user=4315551]@Ticklefish[/user]?
[QUOTE="raziel23x, post: 18558251, member: 2968938"][B][COLOR=Red]Got problems ?[/COLOR][/B]
[B]1. [COLOR="Red"]Make sure your path has no spaces[/COLOR]
2. Your filename has no wierd characters
3. Java/adb are in your path
4. It's not a proprietary rom's apk (aka Sense,Motorola,Samsung) (If u are, then use option 11 and drag the required framework, eg com.htc.resources, twframework-res...etc)
5. It's not a themed apk (if it is, expect .9 png errors, use as close to stock as possible)
6. Look at the log to know whats happening
7. If all else fails, post as much info as possible and we will try to assist you.[/B]
[/QUOTE]
Click to expand...
Click to collapse
Guys, need your help!, while compiling an APK, what I get in the keep folder is the four files
1. Meta-inf
2. res
3. AndroidManifest
4. resources.arsc
what files do I need to remove before compiling?

Problems decompiling/compiling settings.apk in KitKat mediatek mt6592

Hi all!
I was trying to make some changes in Settings.apk from my Elephone P8, a mt6592 device with kitkat (4.4.2), when I had a problem: it's impossible to decompile/recompile this apk!!
Here, you can see a log of simple decompile-compile action, with no changes in any file
Code:
[[email protected] ~]$ cd apktool/
[[email protected] apktool]$ ./apktool if framework-res.apk
I: Framework installed to: /home/javi/apktool/framework/1.apk
[[email protected] apktool]$ ./apktool if SystemUI.apk
I: Framework installed to: /home/javi/apktool/framework/127.apk
[[email protected] apktool]$ ./apktool d Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
I: Loading resource table...
W: Skipping "android" package group
I: Loading resource table...
W: Skipping "android" package group
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/javi/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
[[email protected] apktool]$ ./apktool b Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:247)
at brut.androlib.Androlib.build(Androlib.java:266)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:243)
... 4 more
[[email protected] apktool]$
What i've tried:
- Installing dependencies from: mediatek-res.apk, Systemui.apk, Settings.apk, ext.jar, etc... nothing worked ;/
- Using another tools as apk multitool, advanced apk tool, etc... not working also
- Copying original resources.asrc and classes.dex from original Settings.apk to Settings folder after decompiled. This compile Settings apk, but no encoded, so it's unuseful
- Ussing differente enviroments: BBQ linux, Ubuntu, Windows 8.1... Not working in any of them
I'v tried to do the same with another mt6952 device, the BQ Aquaris E5 FHD with similar results... so it's a mediatek kitkat common problem.
Can you help me, guys????? Any idea what can I try next??
johnnybra said:
Hi all!
I was trying to make some changes in Settings.apk from my Elephone P8, a mt6592 device with kitkat (4.4.2), when I had a problem: it's impossible to decompile/recompile this apk!!
Here, you can see a log of simple decompile-compile action, with no changes in any file
Code:
[[email protected] ~]$ cd apktool/
[[email protected] apktool]$ ./apktool if framework-res.apk
I: Framework installed to: /home/javi/apktool/framework/1.apk
[[email protected] apktool]$ ./apktool if SystemUI.apk
I: Framework installed to: /home/javi/apktool/framework/127.apk
[[email protected] apktool]$ ./apktool d Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
I: Loading resource table...
W: Skipping "android" package group
I: Loading resource table...
W: Skipping "android" package group
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/javi/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
[[email protected] apktool]$ ./apktool b Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:247)
at brut.androlib.Androlib.build(Androlib.java:266)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:243)
... 4 more
[[email protected] apktool]$
What i've tried:
- Installing dependencies from: mediatek-res.apk, Systemui.apk, Settings.apk, ext.jar, etc... nothing worked ;/
- Using another tools as apk multitool, advanced apk tool, etc... not working also
- Copying original resources.asrc and classes.dex from original Settings.apk to Settings folder after decompiled. This compile Settings apk, but no encoded, so it's unuseful
- Ussing differente enviroments: BBQ linux, Ubuntu, Windows 8.1... Not working in any of them
I'v tried to do the same with another mt6952 device, the BQ Aquaris E5 FHD with similar results... so it's a mediatek kitkat common problem.
Can you help me, guys????? Any idea what can I try next??
Click to expand...
Click to collapse
Well see that's the issue. As they seldom use official software. You will have to make sure to only use the framework from you device. Make sure to install them all. Also make sure the rom is deodex or you won't be able to decompile anything.
Thank you.
All files are from the same device (elephone p8), extracted and deodexed by me and working well in a ROM.
UPDATE: I succesfullly recompiled settings.apk!!! I installed mediatek-res.apk, but apktool.yml did not use it, so I edited the file including it and ... voilá!
Thank you, friend, without your words it couldn't be possible
johnnybra said:
Thank you.
All files are from the same device (elephone p8), extracted and deodexed by me and working well in a ROM.
UPDATE: I succesfullly recompiled settings.apk!!! I installed mediatek-res.apk, but apktool.yml did not use it, so I edited the file including it and ... voilá!
Thank you, friend, without your words it couldn't be possible
Click to expand...
Click to collapse
Explain exactly how you did it?
marsapa said:
Explain exactly how you did it?
Click to expand...
Click to collapse
Hi, friend. Glad to see you here Your Roms are awesome.
You must decompile settings.apk installing framework-res.apk and mediatek-res.apk first.
Then, before recompiling, you must open apktool.yml and you'll see a line that point to used dependences. Something like "- 1". Simply add after this one a new line with "- 2" if you installed dependences using default mode. Then save the changes and compile in normal way.
johnnybra said:
Hi, friend. Glad to see you here Your Roms are awesome.
You must decompile settings.apk installing framework-res.apk and mediatek-res.apk first.
Then, before recompiling, you must open apktool.yml and you'll see a line that point to used dependences. Something like "- 1". Simply add after this one a new line with "- 2" if you installed dependences using default mode. Then save the changes and compile in normal way.
Click to expand...
Click to collapse
I'm sorry I did not understand, unfortunately I'm arguing with the framework-res.apk of 6595, I published the change that you made so I try the new soc?
marsapa said:
I'm sorry I did not understand, unfortunately I'm arguing with the framework-res.apk of 6595, I published the change that you made so I try the new soc?
Click to expand...
Click to collapse
I'm sorry, I'm with Tapatalk. This afternoon I'll post some screenshots of what I'm saying, OK?
marsapa said:
I'm sorry I did not understand, unfortunately I'm arguing with the framework-res.apk of 6595, I published the change that you made so I try the new soc?
Click to expand...
Click to collapse
ok i have solve, thaks
marsapa said:
ok i have solve, thaks
Click to expand...
Click to collapse
With the soc mediatek 6595 I have a problem installing, decompile and compile the framework-res.apk with apktool v2.0.0RC3 I can not even decompile the framework and have this error: Log For : framework-res.apk
Log Type : Decompiling
Log Recorded At : 09 2014-12- 10:03:34,86
Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak
------------------------------------------------------
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010e0045 integer/config_mobile_mtu, config=-mcc460
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:186)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:157)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:125)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:606)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:75)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:67)
at brut.androlib.Androlib.getResTable(Androlib.java:61)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:206)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
while with earlier versions it, but still not what recompile is the log: .
For the rest mediatek.res.apk installing and making the change to apktool.ylm decompilo and recompile all files including settings.apk
Tips?
marsapa said:
With the soc mediatek 6595 I have a problem installing, decompile and compile the framework-res.apk with apktool v2.0.0RC3 I can not even decompile the framework and have this error: Log For : framework-res.apk
Log Type : Decompiling
Log Recorded At : 09 2014-12- 10:03:34,86
Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak
------------------------------------------------------
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010e0045 integer/config_mobile_mtu, config=-mcc460
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:186)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:157)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:125)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:606)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:75)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:67)
at brut.androlib.Androlib.getResTable(Androlib.java:61)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:206)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
while with earlier versions it, but still not what recompile is the log: .
For the rest mediatek.res.apk installing and making the change to apktool.ylm decompilo and recompile all files including settings.apk
Tips?
Click to expand...
Click to collapse
Are you trying to decompiling for meizu mx4??? I'll tried it too, but I couldn't find the way to install framework as dependence. Same error as yours.
That's because they use files that differ from stock Android that apk tool is not set to use and the apktool dev already stated he will not add support for it.

[Q&A] [UTIL][Oct 5 2014] Apktool v2.0.0 RC2 - a tool for reverse engineering apk fil.

[Q&A] [UTIL][Oct 5 2014] Apktool v2.0.0 RC2 - a tool for reverse engineering apk fil.
Q&A for [UTIL][Oct 5 2014] Apktool v2.0.0 RC2 - a tool for reverse engineering apk files
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [UTIL][Oct 5 2014] Apktool v2.0.0 RC2 - a tool for reverse engineering apk files. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Great! Thank alot! :good:
chung cư linh đàm
When use on MIUI 6
I got errors like:
invalid resource directory name: D:\Android\ApkIDE\Work\android\res/values-mcc9460-mnc9000
invalid resource directory name: D:\Android\ApkIDE\Work\android\res/values-mcc9998-mnc9999
can help me?
jazchen.tw said:
When use on MIUI 6
I got errors like:
invalid resource directory name: D:\Android\ApkIDE\Work\android\res/values-mcc9460-mnc9000
invalid resource directory name: D:\Android\ApkIDE\Work\android\res/values-mcc9998-mnc9999
can help me?
Click to expand...
Click to collapse
mnc max value is 999. Those are invalid values, not to mention you have backslashes mixed with forward slashes. You could either remove the folders or change them to mnc900 and mnc999.
iBotPeaches said:
mnc max value is 999. Those are invalid values, not to mention you have backslashes mixed with forward slashes. You could either remove the folders or change them to mnc900 and mnc999.
Click to expand...
Click to collapse
Those directories are miui official added.
Probably used to distinguish china edition or international edition (global edition).
I understand the part about the backslash, remove these directories can be done properly.
Can anyone take a look and let me know what i need to do? Thank you.
C:\>cd \apktool\apktool
C:\Apktool\Apktool>apktool d app.apk
Destination directory (C:\Apktool\Apktool\app) already exists. Use -f switch if
you want to overwrite it.
C:\Apktool\Apktool>apktool d app.apk
I: Using Apktool 2.0.0-RC2 on app.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\David Weidman\apktool\framework\1.
apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
touchscreenBlocksFocus, value=0xffffffff
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x0101048f
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:3
6)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:369)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamD
ecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
07)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:9
1)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:322
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:123)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)
at brut.apktool.Main.cmdDecode(Main.java:170)
at brut.apktool.Main.main(Main.java:86)
C:\Apktool\Apktool>
Hello,
I'm modding APK's for a while but today, I got a problem with an APK. When I'm decompiling and recompiling the APK without making changes then signing, it just closes on Android (No FC error) It worked for months, but since today's update not. So how can I fix this? Is the APK protected? Please help!
dr_w said:
Can anyone take a look and let me know what i need to do? Thank you.
C:\>cd \apktool\apktool
C:\Apktool\Apktool>apktool d app.apk
Destination directory (C:\Apktool\Apktool\app) already exists. Use -f switch if
you want to overwrite it.
C:\Apktool\Apktool>apktool d app.apk
I: Using Apktool 2.0.0-RC2 on app.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\David Weidman\apktool\framework\1.
apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
touchscreenBlocksFocus, value=0xffffffff
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x0101048f
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:3
6)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:369)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamD
ecoder.java:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
07)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:9
1)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:322
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:123)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)
at brut.apktool.Main.cmdDecode(Main.java:170)
at brut.apktool.Main.main(Main.java:86)
C:\Apktool\Apktool>
Click to expand...
Click to collapse
Did you install all the resources?
Errors in the apktool are always in the very first section.
Yours states it couldn't decode something, so if you haven't I would try installing all the resources again
Sent from my SM-N900T using Tapatalk 2
你发布这个版本的apktool 无法在 Android 5.0 上面使用,egg pain
lil' problem
hello there!
im not a newbie in theming, but i just wanna ask..
why i always need to copy both META-INF and the AndroidManifest in order install the stock app (like Settings)..
i always need a custom rom where i can edit apks without copying those both files,...
it gives me the creeps.. i hate doing that since it consumes a time..
i cant make changes for some of my deodexed stock apps..
i still wondering how the devs make some changes for some apps..
i hope you got my point..
Apktool rc3
HI
can anyone help me?
i want to change the navbar size of my n4
i decompile framework-res.apk and change some of thinks. :
what i did ?
--
1 java -jar apktool.jar if framework-res.apk
2 java -jar apktool.jar d framework-res.apk
3 change the size in apktool/framework-res/res/value/dimens.xml
4 java -jar apktool.jar b framework-res
5 change framework-res.apk to .zip and move framework-res/build/apk/Androidmanifest.xml to framework-res.zip
6 change framework-res.zip to apk
is this ok or not ?
sorry for my bad english
Hi,
I'm trying to use apktool as a library inside another app, but it seems (at first glance at least) that a lot of the processing depends on setting files and the process working to take the compressed data in the apk, decode it, and write the output to a directory structure.
Is there already a sort of "simple" way to pass in an APK (or better yet, an InputStream or byte array) and have that return an XML document or even just a text stream of a resources file (values files or AndroidManifest.xml)? Or am I basically on my own to setup the objects/change the source to be able to access this sort of functionality?
Thank you!
GI0\/\NNI said:
Hello,
I'm modding APK's for a while but today, I got a problem with an APK. When I'm decompiling and recompiling the APK without making changes then signing, it just closes on Android (No FC error) It worked for months, but since today's update not. So how can I fix this? Is the APK protected? Please help!
Click to expand...
Click to collapse
try to disable signature verification,.. i think it would help..
i have the same prob,..
im not newbie in theming but when i start modding system app from my deodexed stock rom .. i got that prob..
an hour ago,.. i found a solution,.. (not yet tried) . from Pyler's post ..
ee this thread
http://forum.xda-developers.com/xposed/modules/xposed-disablesignaturecheck-t2783480
hope it helped you
My rockchip rk3066 ft970 tab not boot i think its bricked. I don't have backup. How to recover by rkbatchtool i successfully installed driver in rkbatchtool green box appears but when i flash cwm.img error that firmware is missing. So how i get firmware for my tab please help I'm new to xda and all
Thanks in advance
Can anyone help me decompiling this apk ?
Dropbox.com/s/05kj2x4zie734b9/com.asobimo.iruna_en-1.apk?dl=0
I can decompile with a Lot of errors and then many smali files have no .end method which makes recompiling impossible.
Decompiling errors for Multiple resources
Hello there
I've tried to decompiling and evectually install some framework-res.apk, miui6, mine lenovo A806 framework, on three different so, ubuntu 64bit, bbqlinux and, last, win7, with the same results:
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010e0047 integer/config_mobile_mtu, config=-mcc460
detail on:
pastebin.com/isMFnP0v
BBq and Ubuntu are 64bit with lib32 enabled.
apktool ver. 2.0.0 RC3
Other frameworks as mediatek-res works well
Any idea?
Thanks
S.
ultimacorsa said:
Hello there
I've tried to decompiling and evectually install some framework-res.apk, miui6, mine lenovo A806 framework, on three different so, ubuntu 64bit, bbqlinux and, last, win7, with the same results:
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010e0047 integer/config_mobile_mtu, config=-mcc460
detail on:
pastebin.com/isMFnP0v
BBq and Ubuntu are 64bit with lib32 enabled.
apktool ver. 2.0.0 RC3
Other frameworks as mediatek-res works well
Any idea?
Thanks
S.
Click to expand...
Click to collapse
Solved!
Thanks
S.
Uncompressed unknown files becomes compressed.
Issue:
https://code.google.com/p/android-apktool/issues/detail?id=769&thanks=769&ts=1424960582
I believe it prevents monodroid/xamarin apk from working.
ultimacorsa said:
Solved!
Thanks a lotv1 e v2
S.
Click to expand...
Click to collapse
Thanks a lotv1 e v2
---------- Post added at 06:52 PM ---------- Previous post was at 06:44 PM ----------
ultimacorsa said:
Thanks a lotv1 e v2
Click to expand...
Click to collapse
I need to reach 10 posts
---------- Post added at 07:41 PM ---------- Previous post was at 06:52 PM ----------
Hello, decompile with apktool rc4, via dos cmd line or linux shell
insert value-xx (xx=lang)
Recompile with some warning about the default strings
Insert in the new lenovosettings.apk META-INF and AndroidManifest.xml, substituite the file in the priv-app, restart the phone...But the settings return an error message: the application blocked anomaly mode, more o less.
The courios is that the USB message is translate as the new apk laguage.
Any suggestion?
Thanks a lot
S.
Hello. I have a problem with APK tool.
I`m making localization for my phone (Motorola Razr M) since last year.
I made couple builds and its was fine. But when i did last one, i found a bug in my mod: Google Now cant launch - it just hangs screen (need to turn screen on\off to make it work)
I found out that problem is in framework-res.apk. if decompile and recompile it back even without any changes - bug persist. My previous builds was ok, and i used same Java version and same apktool version. Framework compiles without any errors. Tried different pc, different java versions (different builds of 7 and 8 java), even tried different phone.
Tried to use non-modified (original) framework-res.apk as framework, tried localized version.
Even tried to change file modification date.
Nothing helps. Dunno where to look.
sorry for bad english

Need Help Modifying and Recompiling Settings.APK

Hello there, as of late, I've been trying to exploit the Settings.APK on the HTC One M9 (specifically the verizon version, although the APKs are the same there is just a value on the device itself that is different which triggers the "block" on the APK), as you can see here:
http://forum.xda-developers.com/ver...verizon-enable-oem-lock-t3281994#post64568917
I've discovered that it is possible to patch/overwrite the existing Settings.APK with adb install -r -d (overwrite and downgrade), even a modified one I've worked on with APKTools (without root). However, I've run into several issues, mainly modifying the java code and getting it to recompile (with the APK Multi-Tool I'm using to compile "system APK files) WITH the apk.
What I mean to say is that when I place the java code in /src it will compile but I don't see the changes taking effect.
EDIT: Now when I try to compile I get an error.
Code:
Building Apk
I: Using Apktool 2.0.1-825476-SNAPSHOT
I: Checking whether sources has changed...
I: Building java sources...
"An Error Occurred, Please Check The Log (option 26)"
Press any key to continue . . .
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
A subdirectory or file modified-system-apk-files-here already exists.
Exception in thread "main" java.lang.UnsupportedOperationException: Not yet implemented
at brut.androlib.java.AndrolibJava.build(AndrolibJava.java:32)
at brut.androlib.Androlib.buildSourcesJava(Androlib.java:390)
at brut.androlib.Androlib.buildSources(Androlib.java:299)
at brut.androlib.Androlib.build(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
EDIT EDIT: Apparently I need the smali code instead. I'm going to try to convert java to smali and hopes this works. Fingers crossed!
APKTools is having an issue decompiling the resources in the first place,
Code:
C:\Program Files (x86)\Minimal ADB and Fastboot\modified settings>java -jar apktool.jar d Settings.apk
I: Using Apktool 2.0.2 on Settings.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f100000 bool/config_allow_edit_carrier_enabled, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:223)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:191)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:159)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:116)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:544)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:63)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:55)
at brut.androlib.Androlib.getResTable(Androlib.java:65)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:197)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:96)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
which leaves me with a resources.arsc presumably containing many files I need. I've downloaded APKtoJava_RC2, and managed to decompile it into java code using that (and I'm not sure if the classes.dex matters), and modify the APK to where I can enable the OEM unlock feature, but I need to recompile it. I'm trying to recompile the thing, but I'm running into issues (I've tried putting the modified java in src and deleting the resources.arsc when compiling) when installing.
EDIT EDIT EDIT: I've just been trying to edit the SMALI code to let me access the OEM unlock, I guess it's going to be trial and error for me. :v
So, here's what I need to do, in all essentiality:
1. Decompile Settings.APK to the point where I can modify it.
2. Recompile Settings.APK with the same signature.
I'm not sure if this is possible (editing the java while keeping the same signature), but root is NOT an option.
If anyone is willing to give me some insight, I'd really appreciate it.
Ok, so I know how to modidy the .smali, everything would work fine, if not for this final step.
I'm getting [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION] when I extract the .smali files from the classes.dex, and then recompile the .smali files into my own classes.dex-- EVEN IF I DON'T MODIFY THE .SMALI files. There is either an issue with extraction or compilation (maybe both)-- and I've tried several programs, and several methods.
EDIT: http://leonjza.github.io/blog/2015/...re-into-android-reversing-and-smali-patching/
Shows me that it has something to do with the signature. I'll see what I can do.
EDIT EDIT: Further research shows http://www.herongyang.com/Android/Project-META-INF-Files-Digest-Signature-and-Certificate.html that I MIGHT have to somehow get the certificate to work with the modified file properly. God help me now. I assume I'm not the first person to run into the certificate roadblock. Must find a way.
For all the heavens I can't seem to find a way to edit the .dex file in a way that leaves the certificate intact-- I suppose this is why the system was developed in the first place. Back to square one again, I suppose. (Or to giving up and buying a XTC 2 Clip)

[PLEASE HELP] Compile Error [APKTool]

Hello there,
I've been trying desperately long to change an Android app, but it just does not work. :crying:
This app is SecSettings.apk and is of a Samsung Galaxy S5 Mini Deodexed ROM. Yesterday I still have them easily change decompile and then recompile can (without signing).
I can change the Launcher Icons and a few options successfully.
It has then everything works well on the device.
Then few minutes have passed and I still wanted to make a small change. I was able to successfully recompile the app again. I then got back to system / privapp / SecSettings moved, set the correct permissions, but after restarting the app will not be installed.
I then tried with signing, zipalign and both, but unsuccessfully.
I also have the app again Decompiles and then recompiled without signing again, without making a change, but then I do not know yet had a parsing error on the device, as previously with the app.
I also once again postponed the original app on the device and it works. I then Mr. downloaded ApkTool again, Java JDK and JRE again Mr. downloaded and reinstalled, but also the app and the necessary framework (Framework res.apk and twframework-res.apk) reinstalled. But all without success. Have it with another system app (Seccontacts.apk) tried, but without success.
Before I could even install everything successfully De / Compiling. :crying:
Now also appears from even a (error) when Decompiling on (he has still Successfully De / recompiled).:
Code:
I: Using Apktool 2.0.3 on SecSettings.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Gregor\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
S: Could not decode file, replacing by FALSE value: drawable-xhdpi-v4/tw_ab_bottom_transparent_dark.holo.9.qmg
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I do this not for the first time and am already hierdrin know (if I may judge for yourself).
I inquired already on the internet, but found nothing useful about these error.
I can upload the apks, if they are needed.
If my English is not good, then I apologize herewith.
Now I hope someone can help me here.
Best regards,
sonnenklar
[please help]
Nice. Not an answer.
Please answer my Question.

Categories

Resources