[Q] [Apktool] Parsing error - Android Q&A, Help & Troubleshooting

Hello,
I'm trying to recompile an app that I have translated, but I got this error message:
error parsing xml not well-formed invalid token
Click to expand...
Click to collapse
This is probably due to accented characters, so how can I encode this special characters in the XML file ?
Thank you

Related

[Q] I want to fix touchbug

Hi there
I have korean optimus1
I can change kernel...
I want to fix touchbug
I tried P500's touchbug source..
but it has error
How can I fix touchbug?
I add two files
one is a touchscreen file (mcs6000_ts.c)
another is has error file when I add a lagfix source (lg diag keypress.c)
this is error message when I make
arch/arm/mach-msm/built-in.o : In function 'LGF_KeyPress' "
/home/user/Downloads/kernel/arch/arm/mach-msm/lge/lg_diag_keypress.c:164: undefined reference to 'Send_Touch'
make: ***[.tmp_vmlinux1] Error 1
When you fix files
please send file to '[email protected]'
Just flash dercaveman kernel from lg p500 android development room then youre good to go
Sent from my LG-P500 using XDA Premium App
sondw said:
Hi there
I have korean optimus1
I can change kernel...
I want to fix touchbug
I tried P500's touchbug source..
but it has error
How can I fix touchbug?
I add two files
one is a touchscreen file (mcs6000_ts.c)
another is has error file when I add a lagfix source (lg diag keypress.c)
this is error message when I make
arch/arm/mach-msm/built-in.o : In function 'LGF_KeyPress' "
/home/user/Downloads/kernel/arch/arm/mach-msm/lge/lg_diag_keypress.c:164: undefined reference to 'Send_Touch'
make: ***[.tmp_vmlinux1] Error 1
When you fix files
please send file to '[email protected]'
Click to expand...
Click to collapse
i think u shoud try this too provided my mik http://forum.xda-developers.com/showthread.php?t=929941
sondw said:
Hi there
I have korean optimus1
I can change kernel...
I want to fix touchbug
I tried P500's touchbug source..
but it has error
How can I fix touchbug?
I add two files
one is a touchscreen file (mcs6000_ts.c)
another is has error file when I add a lagfix source (lg diag keypress.c)
this is error message when I make
arch/arm/mach-msm/built-in.o : In function 'LGF_KeyPress' "
/home/user/Downloads/kernel/arch/arm/mach-msm/lge/lg_diag_keypress.c:164: undefined reference to 'Send_Touch'
make: ***[.tmp_vmlinux1] Error 1
When you fix files
please send file to '[email protected]'
Click to expand...
Click to collapse
thanks
I solve it

PDroid/Autopatcher/CM10.1: Activity.smali in framework.jar cannot be remedied

While trying to patch I get the following error message:
"error: failed android/app/Activity.smali in framework.jar cannot be remedied"
Autopatcher v2.9.9313
Rom: cm-10.1-20130725-NIGHTLY-i9300.zip
What's wrong?

[Q] I need a developers help. Please

I need a developer to please help me with my first rom mod.
I have decompiled the settings.apk "(4.4.2 kitkat apk)" I'm using windows 7 32 bit. have java installed, and android multitool. "for decompiling/compiling"
I'm trying to add things like rom toolbox and android tweaker to my settings menu for starters Then later I would like to add things like center clock, status bar color changes, icons, etc... I have made my changes to the xmls. "based off a guide found here in xda site" and now trying to compile the apk back and just keep getting these errors. I have checked and rechecked for missing symbols, etc... can't find anything. here is the error log. please someone teach me.
I haven't made any changes to any smali files just xml and added images to drawable file. I can provide any files and the changes I have made.
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[35,4] Error for input '.parameter': Invalid directive
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[36,4] Error for input '.parameter': Invalid directive
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[35,15] mismatched input '"f"' expecting END_METHOD_DIRECTIVE
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[45,4] Error for input '.parameter': Invalid directive
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[46,4] Error for input '.parameter': Invalid directive
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[45,15] mismatched input '"f"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: android/support/v13/app/FragmentCompat$BaseFragmentCompatImpl.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:72)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:56)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:337)
at brut.androlib.Androlib.buildSources(Androlib.java:298)
at brut.androlib.Androlib.build(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:233)
at brut.apktool.Main.main(Main.java:88)
The system cannot find the file specified.
The system cannot find the file specified.
LiquidT said:
I need a developer to please help me with my first rom mod.
I have decompiled the settings.apk "(4.4.2 kitkat apk)" I'm using windows 7 32 bit. have java installed, and android multitool. "for decompiling/compiling"
I'm trying to add things like rom toolbox and android tweaker to my settings menu for starters Then later I would like to add things like center clock, status bar color changes, icons, etc... I have made my changes to the xmls. "based off a guide found here in xda site" and now trying to compile the apk back and just keep getting these errors. I have checked and rechecked for missing symbols, etc... can't find anything. here is the error log. please someone teach me.
I haven't made any changes to any smali files just xml and added images to drawable file. I can provide any files and the changes I have made.
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[35,4] Error for input '.parameter': Invalid directive
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[36,4] Error for input '.parameter': Invalid directive
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[35,15] mismatched input '"f"' expecting END_METHOD_DIRECTIVE
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[45,4] Error for input '.parameter': Invalid directive
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[46,4] Error for input '.parameter': Invalid directive
..\Decompiled_apk\Settings\smali\android\support\v13\app\FragmentCompat$BaseFragmentCompatImpl.smali[45,15] mismatched input '"f"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: android/support/v13/app/FragmentCompat$BaseFragmentCompatImpl.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:72)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:56)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:337)
at brut.androlib.Androlib.buildSources(Androlib.java:298)
at brut.androlib.Androlib.build(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:233)
at brut.apktool.Main.main(Main.java:88)
The system cannot find the file specified.
The system cannot find the file specified.
Click to expand...
Click to collapse
Have you installed
1) framework-res.apk
2)tw-framework.apk
3)systemUI.apk
of your current working rom ??
IF not then installed them first in your apk-multitool
and then decompile the settings.apk !!
It will work

[MOD][PORT][CM11][XU] Smallapps/Taskswitcher plugin from Z1 Android 4.3

Not compatible with other roms
Small apps and Taskswitcher port for CM11 4.4.4 Weekly Final on Xperia U
All credits to @lukakas and @Kevin-0100. I just made small changes in their files
Not working:
- turn widgets into small apps
- some small app don't work
Download:
Click here
Screenshots in attach​
Heitezy said:
All credits to @lukakas and @Kevin-0100. I just used their instructions
Download and test:
link
Attention!
I didn't test it. Post screenshots and logcats in this thread.
Click to expand...
Click to collapse
Nice to see SmallApps to another 4.4 rom. Might I suggest you provide screenshots to pursuade other users to download this?
Just keep in mind (for other users) that the modded files provided are only for the XU AOSX rom. When flashed to another rom/device will probably cause a bootloop.
Kevin-0100 said:
Nice to see SmallApps to another 4.4 rom. Might I suggest you provide screenshots to pursuade other users to download this?
Just keep in mind (for other users) that the modded files provided are only for the XU AOSX rom. When flashed to another rom/device will probably cause a bootloop.
Click to expand...
Click to collapse
Can you help me for smallapp Task Switcher ?
gamzekal said:
Can you help me for smallapp Task Switcher ?
Click to expand...
Click to collapse
Could you be a little more specific?
With what would you need help?
@Kevin-0100, I can't test it, 'cause I'm on JB and have no time to flash AOSX. On Friday I maybe will do this and post results.
But everyone can test it now.
Kevin-0100 said:
Could you be a little more specific?
With what would you need help?
Click to expand...
Click to collapse
Link:
http://forum.xda-developers.com/showthread.php?t=2460877
There isnt any folder in this step (10 and 11)
10 - Go to smali/com/android/systemiu/recent/ and open RecentsActivity.smali
Find these names below:
recents_pluginview_container
recents_layout
plugin_view
status_bar_recent_panel
recents_root
config_recent_item_min_alpha
recents_pluginview_container
recents_return_to_launcher_enter
recents_return_to_launcher_exit
This is log.txt
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[19,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[19,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[34,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[35,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[34,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[53,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[54,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[53,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[55,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[73,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[74,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[73,15] mismatched input '"packageName"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[104,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[104,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[159,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[159,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[270,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[271,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[272,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[395,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[396,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[395,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[425,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[425,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[506,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[507,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[506,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[562,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[562,15] mismatched input '"event"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[601,4] Error for input '.parameter': Invalid directive
..\out\SystemUI\smali\com\android\systemui\recent\RemotePluginView.smali[601,15] mismatched input '"visibility"' expecting END_METHOD_DIRECTIVE
..\out\SystemUI\smali\com\android\systemui\usb\R$styleable.smali[13,11] Class Lcom/android/systemui/R$styleable; has already been interned
..\out\SystemUI\smali\com\android\systemui\usb\R.smali[9,8] Class Lcom/android/systemui/R; has already been interned
Can you Add Guide for Cm11 ?
I couldnt continue
@gamzekal, pm him, not here.
hey can you make a mirror please...bacause my downloadingstucks on 99%...
EDITOWNLOAD COMPLETED..
tested but systemUI gives fc...
I will see what's wrong tomorrow.
As AOSX is dead I did it for CM11
OP's updated

Need Help to recompile custom-framwork-res.apk

Whenever i tried to recompile any custom framework-res.apk (like oppo-framework-res.apk, oxygen-framework-res.apk, lenovo-res.apk, vivo-res.apk) i got error
errors are like:
W: Could not find sources
oxygen-framework-res.apk\res\layout\preference_dialog_colorpicker.xml:4: error: Error: No resource found that matches the given name (at 'id' with value '@id/colors_row_1').
preference_dialog_colorpicker.xml:6: error: Error: No resource found that matches the given name (at 'id' with value '@id/check_0'
oxygen-framework-res.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:465)
at brut.androlib.Androlib.buildResources(Androlib.java:403)
at brut.androlib.Androlib.build(Androlib.java:291)
at brut.androlib.Androlib.build(Androlib.java:261)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
No issue with decompile
I can decompile and recompile any other apps including framework-res.apk, just problem xxxy-framework-res.apk
please help...
how decompile framwork-res.apk?
pradeepsmehra said:
Whenever i tried to recompile any custom framework-res.apk (like oppo-framework-res.apk, oxygen-framework-res.apk, lenovo-res.apk, vivo-res.apk) i got error
errors are like:
W: Could not find sources
oxygen-framework-res.apk\res\layout\preference_dialog_colorpicker.xml:4: error: Error: No resource found that matches the given name (at 'id' with value '@id/colors_row_1').
preference_dialog_colorpicker.xml:6: error: Error: No resource found that matches the given name (at 'id' with value '@id/check_0'
oxygen-framework-res.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:465)
at brut.androlib.Androlib.buildResources(Androlib.java:403)
at brut.androlib.Androlib.build(Androlib.java:291)
at brut.androlib.Androlib.build(Androlib.java:261)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
No issue with decompile
I can decompile and recompile any other apps including framework-res.apk, just problem xxxy-framework-res.apk
please help...
Click to expand...
Click to collapse
ARe you installing all the frameworks files? Could be that apktool is not updated to work with that os. It is a common thing with china based OS that they make changes that apktool cant and wont support.
zelendel said:
ARe you installing all the frameworks files? Could be that apktool is not updated to work with that os. It is a common thing with china based OS that they make changes that apktool cant and wont support.
Click to expand...
Click to collapse
Thanks for reply ,
buddy i am using latest apktool version 2.02
only two framework are available in ROM both are installed.
yes ..i was thinking same that they are modding apk so that apktool not able to do re-engineering.
i also post error in apktool thread in github lets see if iBoatPaches will add support in next version of apktool ...
Have you tried installing systemui as well as the frameworks? It might be worth a shot usually helps with dummy files
Sent from my SM-N920C using Tapatalk
sawdoctor said:
Have you tried installing systemui as well as the frameworks? It might be worth a shot usually helps with dummy files
Sent from my SM-N920C using Tapatalk
Click to expand...
Click to collapse
yes buddy, i also tried that..
if i tried recompile in normal way its giving very log error log. then i tried to rename framework-res.apk into 1.apk and oxygen-framework-res.apk into 2.apk and place them c:/apktool/
now the error log is short, only 4xml value showing no resource.
C:\apktool\oxygen-framework-res\res\values\styles.xml:40: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.BaseDialog'.
C:\apktool\oxygen-framework-res\res\values\styles.xml:44: error: Error retrieving parent for item: No resource found that matches the given name'@android:style/Theme.Material.Dialog.BaseAlert'.
C:\apktool\oxygen-framework-res\res\values\styles.xml:51: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.SearchBar'.
C:\apktool\oxygen-framework-res\res\values\styles.xml:54: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.CompactMenu'.
pradeepsmehra said:
yes buddy, i also tried that..
if i tried recompile in normal way its giving very log error log. then i tried to rename framework-res.apk into 1.apk and oxygen-framework-res.apk into 2.apk and place them c:/apktool/
now the error log is short, only 4xml value showing no resource.
C:\apktool\oxygen-framework-res\res\values\styles.xml:40: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.BaseDialog'.
C:\apktool\oxygen-framework-res\res\values\styles.xml:44: error: Error retrieving parent for item: No resource found that matches the given name'@android:style/Theme.Material.Dialog.BaseAlert'.
C:\apktool\oxygen-framework-res\res\values\styles.xml:51: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.SearchBar'.
C:\apktool\oxygen-framework-res\res\values\styles.xml:54: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.CompactMenu'.
Click to expand...
Click to collapse
Have you tried a different apktool? I had to switch back to android 2.00 to decompile marshmallow framework
Sent from my SM-N920C using Tapatalk
sawdoctor said:
Have you tried a different apktool? I had to switch back to android 2.00 to decompile marshmallow framework
Sent from my SM-N920C using Tapatalk
Click to expand...
Click to collapse
yes i tried 2.0 also...
pradeepsmehra said:
yes i tried 2.0 also...
Click to expand...
Click to collapse
if any body can help, please here is the uploaded framework files. and error log
http://pastebin.com/KPbExsRE
https://drive.google.com/file/d/0B4wqBB_yOlMwNGh0YzZoWlFmSEk/view?usp=sharing

Categories

Resources