Hello all,
For some strange reason, I am getting an exception when decompiling the Settings.apk on my Thunderbolt. I placed com.htc.resources.apk and framework-res.apk in the same directory, ran "apktool if" successfully on both files, and scoured Google for fixes after watching the apktool videos to no avail Any suggestions? This problem always occurs after the "Decoding values" line.
Settings.apk was taken from a rooted Thunderbolt running the latest OTA update and radio. My goal is to modify the AndroidManifest.xml to remove the "Mobile hotspot" option, then recompiling the darn thing.
Thanks in advance!
C:\Apktool>apktool d Settings.apk
I: Baksmaling...
testI: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: C:\Users\crafty\apktool\framework\1.apk
I: Loaded.
I: Loading resource table from file: C:\Users\crafty\apktool\framework\2.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind
ex out of range: 21
at java.lang.String.charAt(String.java:686)
at brut.androlib.res.xml.ResXmlEncoders.findNonPositionalSubstitutions(R
esXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders.enumerateNonPositionalSubstituti
ons(ResXmlEncoders.java:142)
at brut.androlib.res.data.value.ResStringValue.encodeAsResXmlValue(ResSt
ringValue.java:45)
at brut.androlib.res.data.value.ResArrayValue.serializeToResValuesXml(Re
sArrayValue.java:55)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResour
ces.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
The java error you are getting appears to be because its decoding from * to * which is infinite but it appears that in reality, the method only contains 0-20 so when it reaches 21, you are out of bounds because no data exists there. Im not sure if that section of code is even changeable though without modifying the actual program. Its odd though because * is supposed to only include all the given lines yet its checking beyond those if you are getting the out of bounds error. Not sure on a fix to this.
Did you try APK manager 5.0.2? I had issues on 4.9 lastest version fixed for me
Sent from my Thunderbolt using Tapatalk
nolimitzr2 said:
Did you try APK manager 5.0.2? I had issues on 4.9 lastest version fixed for me
Sent from my Thunderbolt using Tapatalk
Click to expand...
Click to collapse
apkmanger is just a wrapper for apktool.
Related
Deprecated.
Screen Calibration
Deprecated
TV Out
Deprecated
I have tried every program I can to decompile my settings.apk but I can't seem to find the HtcDisplayFeatureFlags.smali file. All I get are an assets folder, an res folder, an AndroidManifest.xml file and an apktool.yml file. I have searched all over this site as well as google but cannot find out what I might possibly be doing wrong. Could someone please point me in the right direction as to how I'm supposed to decompile the settings.apk in order to get the smali files?
SSG27 said:
I have tried every program I can to decompile my settings.apk but I can't seem to find the HtcDisplayFeatureFlags.smali file. All I get are an assets folder, an res folder, an AndroidManifest.xml file and an apktool.yml file. I have searched all over this site as well as google but cannot find out what I might possibly be doing wrong. Could someone please point me in the right direction as to how I'm supposed to decompile the settings.apk in order to get the smali files?
Click to expand...
Click to collapse
are you decompiling or extracting the apk .
the full root to it is Settings.apk\smali\com\android\settings\framework\flag\feature
Ajthescot said:
are you decompiling or extracting the apk .
the full root to it is Settings.apk\smali\com\android\settings\framework\flag\feature
Click to expand...
Click to collapse
Tried both. When I decompile it, I've tried both apktool and multitool aka apk manager but the results are settings.apk/res and settings.apk/assets. When I use apktool, the following is shown on the screen when I run the apktool.bat file in command prompt:
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: C:\Users\Bonnie\apktool\framework\1.apk
I: Loaded.
I: Loading resource table from file: C:\Users\Bonnie\apktool\framework\2.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Afterwards, I check the output folder and only the assets and res folders are there along with AndroidManifest.xml and apktool.yml
I'm attempting to create my first app (specifically, a GOSMS skin).
For the first three attempts or so, everything was honky-dory. I was compiling my .apk with no issues each time.
Now, however, every time I attempt to compile a .apk with Apk Changer, I receive the following error(s):
Code:
--------------------------------------------------------------------------
|Fri 07/13/2012 -- 19:34:56.61|
--------------------------------------------------------------------------
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode, sharing)
I: Copying raw classes.dex file...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: G:\Users\Jason\apktool\framework\1-api15.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
The system cannot find the path specified.
Could Not Find G:\Users\Jason\Desktop\apk\other\app\MyApk.conf
Could Not Find G:\Users\Jason\Desktop\apk\out\MyApk\*.bak
Could Not Find G:\Users\Jason\Desktop\apk\out\MyApk\*.rej
Could Not Find G:\Users\Jason\Desktop\apk\out\MyApk\*.orig
I: Copying classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Odd thing it, I can navigate to \apk\other\app and MyApk.conf does exist. The others (.bak, .reg, .orig) do not exist in \out\MyApk,
I get this every single time - I can decompile any random .apk and immediately re-compile it without making any changes and still receive this error. To my knowledge, I made no changes to my Apk Changer settings. I even attempted to delete and extract a fresh copy of Apk Changer - no dice.
I'm sure I'm missing something blatantly obvious, but can't figure it out for the life of me.
Any ideas?
xDA, I had an issue when decompiling a stock app for my Sony Ericsson. It's running 4.0.4,
C:\Users\Callison10\Desktop\Programs\Android\apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\Callison10\apktool\framework\Conversations.apk
C:\Users\Callison10\Desktop\Programs\Android\apktool>apktool d Conversations.apk MMS
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Callison10\apktool\framework\Conversations.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x0202000d
W: Could not decode attr value, using undecoded value instead: ns=android, name=background, value=0x0202000d
I: Decoding values */* XMLs...
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info.
I solved this issue,
C:\Users\Callison10\Desktop\Programs\Android\apktool>apktool if SemcGenericUxpRes.apk
I: Framework installed to: C:\Users\Callison10\apktool\framework\2.apk
C:\Users\Callison10\Desktop\Programs\Android\apktool>apktool d Conversations.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Callison10\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\Callison10\apktool\framework\2.apk
I: Loaded.
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\Users\Callison10\Desktop\Programs\Android\apktool>
To solve the issue, use SemcGenericUxpRes.apk !
I get the same error when trying to decompile stock Conversations.apk. But I can decompile any other apks without errors. I tried by installing different frameworks. But nothing solved the problem. If you (OP) are successful decompiling Conversations.apk, let me know.
RavinduSha said:
I get the same error when trying to decompile stock Conversations.apk. But I can decompile any other apks without errors. I tried by installing different frameworks. But nothing solved the problem. If you (OP) are successful decompiling Conversations.apk, let me know.
Click to expand...
Click to collapse
I found out how! I'll let you know soon as the needed file is on my computer.
Callison10 said:
I found out how! I'll let you know soon as the needed file is on my computer.
Click to expand...
Click to collapse
Thanks! Waiting for your reply
Solved !
RavinduSha said:
Thanks! Waiting for your reply
Click to expand...
Click to collapse
The answer is to Use SemcGenericUxpRes.apk !
Re: [Q] Decompiling Fail?
Add solved to title if you problem is solved it would save precious time of users and moderators
Sent from my A116 using Tapatalk 2
sak-venom1997 said:
Add solved to title if you problem is solved it would save precious time of users and moderators
Sent from my A116 using Tapatalk 2
Click to expand...
Click to collapse
Your wish is my command.
Callison10 said:
The answer is to Use SemcGenericUxpRes.apk !
Click to expand...
Click to collapse
Thats right!! Successfully decompiled my Conversations.apk
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.
Hi all guys
I read all the guides I found
And I can't find why I got an error
D:\>D:\apktool d -f D:\SecSettings.apk
I: Using Apktool 2.4.1 on SecSettings.apk
I: Loading resource table...
W: Skipping "android" package group
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\office\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files.
D:\>D:\apktool b D:\SecSettings
I: Using Apktool 2.4.1
W: Could not find sources
I: Checking whether resources has changed...
I: Copying raw resources...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
in fact . The app does not work. Even without changing anything.
phone : samsung Young android 4.1.2
app : SecSettings.apk
dvash01 said:
Hi all guys
I read all the guides I found
And I can't find why I got an error
D:\>D:\apktool d -f D:\SecSettings.apk
I: Using Apktool 2.4.1 on SecSettings.apk
I: Loading resource table...
W: Skipping "android" package group
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\office\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files.
D:\>D:\apktool b D:\SecSettings
I: Using Apktool 2.4.1
W: Could not find sources
I: Checking whether resources has changed...
I: Copying raw resources...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
in fact . The app does not work. Even without changing anything.
phone : samsung Young android 4.1.2
app : SecSettings.apk
Click to expand...
Click to collapse
You need to install your framework-res.apk into apktool first.
Code:
apktool if framework-res.apk
Then try to decompile your settings app. After you've made your changes and recompiled the app, open the original apk and your new apk in WinRAR or 7zip, and copy meta-info folder & AndroidManifest.xml from the original apk to your new one. Drag it from one apk to the other, don't extract them at all. This will resign your app with the original system signature. This is usually needed if you're working on system apps or you'll get a bootloop and/or force closes. Hope this helps!
Spaceminer said:
You need to install your framework-res.apk into apktool first.
Code:
apktool if framework-res.apk
Then try to decompile your settings app. After you've made your changes and recompiled the app, open the original apk and your new apk in WinRAR or 7zip, and copy meta-info folder & AndroidManifest.xml from the original apk to your new one. Drag it from one apk to the other, don't extract them at all. This will resign your app with the original system signature. This is usually needed if you're working on system apps or you'll get a bootloop and/or force closes. Hope this helps!
Click to expand...
Click to collapse
Thanks my friend for the answer
I did
And if I do as you say. I get more errors See:
D:\>D:\apktool b D:\SecSettings
I: Using Apktool 2.4.1
W: Could not find sources
[Fatal Error] :1:1: Content is not allowed in prolog.
I: Checking whether resources has changed...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
That's why I also took the resources.arsc file from the original
And so I only get this error
dvash01 said:
You need to install your framework-res.apk into apktool first.
Thanks my friend for the answer
I did
And if I do as you say. I get more errors See:
D:\>D:\apktool b D:\SecSettings
I: Using Apktool 2.4.1
W: Could not find sources
[Fatal Error] :1:1: Content is not allowed in prolog.
I: Checking whether resources has changed...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
That's why I also took the resources.arsc file from the original
And so I only get this error
Click to expand...
Click to collapse
So if I understand you try to decompile and APK and it doesn't work ?
Usually it means that you've made an error modifying your APK.
You already tried to decompile-recompile your APK without modifying anything, but I'll ask you to do it once again, just enter those commands:
apktool d [name of the app].apk
apktool b [name of the app].apk -c
(-c allows to keep the original signature when recompiling)
Tell me if you go an error.
Also, when doing that, don't move any other file in the the decompiled apk, I need to know what happens when the only thing you do is decompile-recompile.
Thanks !
Raiz said:
So if I understand you try to decompile and APK and it doesn't work ?
Usually it means that you've made an error modifying your APK.
You already tried to decompile-recompile your APK without modifying anything, but I'll ask you to do it once again, just enter those commands:
apktool d [name of the app].apk
apktool b [name of the app].apk -c
(-c allows to keep the original signature when recompiling)
Tell me if you go an error.
Also, when doing that, don't move any other file in the the decompiled apk, I need to know what happens when the only thing you do is decompile-recompile.
Thanks !
Click to expand...
Click to collapse
First of all thank you very much for your patience
I tried to disassemble without changing anything
Now I added C as you said
That's what came out
D:\>D:\apktool d -f D:\SecSettings.apk
I: Using Apktool 2.4.1 on SecSettings.apk
I: Loading resource table...
W: Skipping "android" package group
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\משרד\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
D:\>D:\apktool b D:\SecSetting -c
-c/--copy-original has been deprecated. Removal planned for v2.5.0 (#2129)
I: Using Apktool 2.4.1
brut.directory.DirectoryException: java.io.FileNotFoundException: D:\SecSetting (The system cannot find the file specified)
And if I add the two original files,
AndroidManifest.xml resources.arsc
that's what came out
D:\>D:\apktool b D:\SecSettings -c
-c/--copy-original has been deprecated. Removal planned for v2.5.0 (#2129)
I: Using Apktool 2.4.1
W: Could not find sources
I: Checking whether resources has changed...
I: Copying raw resources...
I: Copy original files...
I: Copy AndroidManifest.xml...
I: Copy META-INF...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
But please explain to me
Opening Is Not An Error
W: Skipping "android" package group