Error while recompiling APK - Android Q&A, Help & Troubleshooting

Hello XDA brothers.
I am running Android APK MULTI TOOL for recompiling and decompiling an APK. When I decompile it, it goes smoothly. But when I attempt recompiling, it gives A LOT of errors stating at the end "... is not defined". This is not an after-mod error because I tried recompiling it right after decompiling, without even opening the decompiled folder. It still gives the same error. Kind of frustrating. So, can anyone help?¿

dominator96 said:
Hello XDA brothers.
I am running Android APK MULTI TOOL for recompiling and decompiling an APK. When I decompile it, it goes smoothly. But when I attempt recompiling, it gives A LOT of errors stating at the end "... is not defined". This is not an after-mod error because I tried recompiling it right after decompiling, without even opening the decompiled folder. It still gives the same error. Kind of frustrating. So, can anyone help?¿
Click to expand...
Click to collapse
comform that you have install proper framework and systemui

Vaibhav Chauhan said:
comform that you have install proper framework and systemui
Click to expand...
Click to collapse
I am not decompiling a system file. Its YA weather apk app. Do I still want the system ui and framework? Btw my phone's not rooted so is it possible to pull these files from phone?

dominator96 said:
I am not decompiling a system file. Its YA weather apk app. Do I still want the system ui and framework? Btw my phone's not rooted so is it possible to pull these files from phone?
Click to expand...
Click to collapse
you need to deodex this files and then install it to the tool then it will compile according to this apks

Vaibhav Chauhan said:
you need to deodex this files and then install it to the tool then it will compile according to this apks
Click to expand...
Click to collapse
Deodex a normal app which is available at PlayStore? :/ Is it possible?

dominator96 said:
Deodex a normal app which is available at PlayStore? :/ Is it possible?
Click to expand...
Click to collapse
nope its not contain odex files

Vaibhav Chauhan said:
nope its not contain odex files
Click to expand...
Click to collapse
But you just said to deodex them files -.- Hold on, lets start again.
I want to decompile a non-system apk file and then recompile. Decompile goes smooth but while recompiling, it states a BUNCH of errors saying "........ is not defined". This is what I want to fix about

dominator96 said:
But you just said to deodex them files -.- Hold on, lets start again.
I want to decompile a non-system apk file and then recompile. Decompile goes smooth but while recompiling, it states a BUNCH of errors saying "........ is not defined". This is what I want to fix about
Click to expand...
Click to collapse
no no
understand properly
firstvyou need to deodex systemui app and framework app
tthen install it to the multitool
then compile the other apps
it will be compile

Vaibhav Chauhan said:
no no
understand properly
firstvyou need to deodex systemui app and framework app
tthen install it to the multitool
then compile the other apps
it will be compile
Click to expand...
Click to collapse
Oh so that's it,
But my phone is not rooted. Can I use any system ui and framework or do I have to use only my phone's system ui and fframewok?

Vaibhav Chauhan said:
no no
understand properly
firstvyou need to deodex systemui app and framework app
tthen install it to the multitool
then compile the other apps
it will be compile
Click to expand...
Click to collapse
hey, can I use your system ui and framework to compile apps?

dominator96 said:
Oh so that's it,
But my phone is not rooted. Can I use any system ui and framework or do I have to use only my phone's system ui and fframewok?
Click to expand...
Click to collapse
yes can use non rooted phones apps but first deodex it
if you will use my phone's apps then it will run on my phone not in yours

Vaibhav Chauhan said:
yes can use non rooted phones apps but first deodex it
if you will use my phone's apps then it will run on my phone not in yours
Click to expand...
Click to collapse
I want to modify an APK and then share it with everyone. How can I make it applicable on all phones?

dominator96 said:
I want to modify an APK and then share it with everyone. How can I make it applicable on all phones?
Click to expand...
Click to collapse
sorry but it can not run on all phones
it will run in that phone on which you sign app or the similar phones

Related

[Q] SystemUI is killing me with force close..please help

Hello,
I added a language values folder to the systemui.apk and then compile it back.
but always force close .
I am using honeycomb 3.2 and tried many apktools to do so.
any help will be nice.
thanks.
did you check the permissions settings ?
logic5 said:
Hello,
I added a language values folder to the systemui.apk and then compile it back.
but always force close .
I am using honeycomb 3.2 and tried many apktools to do so.
any help will be nice.
thanks.
Click to expand...
Click to collapse
system folders shouldn't be signed. Make sure you didn't sign it.
jonnypinkeyes said:
did you check the permissions settings ?
Click to expand...
Click to collapse
sorry, I don't know where are the permissions settings .
lithid-cm said:
system folders shouldn't be signed. Make sure you didn't sign it.
Click to expand...
Click to collapse
I Decompiled with dependencies.. then edited what I need then compile then the tool asked if it is a system apk I said yes then I deleted the recources.arsc and compile.
when the system boot I get a force close then the system bar disappear.
any idea please.
thanks

[Q] Deodex LewaOS

Does anyone know how to deodex LewaOS? I tried various tools but every tools got error
lozohcum said:
Does anyone know how to deodex LewaOS? I tried various tools but every tools got error
Click to expand...
Click to collapse
You could manually deodex the files using baksmali, I would recommend taking a look at this guide here for instructions on how to deodex the files.
shimp208 said:
You could manually deodex the files using baksmali, I would recommend taking a look at this guide here for instructions on how to deodex the files.
Click to expand...
Click to collapse
thank yoy I will try
api_level is always the same for all odex?
lozohcum said:
thank yoy I will try
api_level is always the same for all odex?
Click to expand...
Click to collapse
Yes you should use the same api level for all the apps you want to deodex to avoid inconsistencies.
So should I deodex each app individally using this scheme
baksmali -a 15 -x APP.odex -d framework -o APP
Click to expand...
Click to collapse
where APP is name of app I want to deodex (app from system/app and from system/framewok)
Am I right?
I want to be sure that I understand this process
Did you try dsixda kitchen?
lozohcum said:
So should I deodex each app individally using this scheme
where APP is name of app I want to deodex (app from system/app and from system/framewok)
Am I right?
I want to be sure that I understand this process
Click to expand...
Click to collapse
Correct that is the syntax that should be used, you could technically make the output directory name whatever you want it to be put for simplicity and organization I recommend making it the same as the app you are deodexing (So if your deodexing calculator it would be best to make the output directory calculator as well to keeps things organized).
I've just run deodexing on dsixda kitchen and it seems working, I had to set API level to 10.
I have problem with spktool. I have newest release and the problem is that I can decompile every app but when I try to compile anything back, there is no apk file in folder and lot's of errors in console. I tried it manually and using terminall tools but every way doesn't work for compiling :/
(I'm trying to translate MokeeOS and LewaOS)

[Q] How to remuve menus from settings.apk?

i want to ask if any body tried already to remove menus from settings like i want to hide the about phone on stock settings.apk deodexed on jb 4.2 i want to get rid of some menus in my settings i ported dakele os to mtk6589 so i would like to ask if how to? since it is a ported rom some of the menus are not a feature of my stock rom and i want to hide or remove them just to prevent boot loop for example like this in the attachment below i want to get rid of the ad block or sensor_cali .. ..
i badly need help kinda excited to release my ported rom hehe
TIA:good::fingers-crossed:
uppdate: ive done some experement in settings_header.xml i tried to change the name of about phone to phone only and it works so my conclusion is settings_headers changes the appearance of the settings menu
I have not used ICS or JB much but it's possible.
I know exact process of how to do that on GB but not ICS. You'll have to decompile Settings.apk and look for the xml which controls the layout of app.
iamareebjamal said:
I have not used ICS or JB much but it's possible.
I know exact process of how to do that on GB but not ICS. You'll have to decompile Settings.apk and look for the xml which controls the layout of app.
Click to expand...
Click to collapse
yes i think its the settings.header yet everytime i change something in that xml,recompile success, and push my mooded settings but the problem is it wont open systemUI stops everytime i try to open settings from the noti. bar and there's no icon for settings in the drawer ive check the permission its rw-r-r and its correct . ive also tried drag and drop signing still the same problem
marc2777 said:
yes i think its the settings.header yet everytime i change something in that xml,recompile success, and push my mooded settings but the problem is it wont open systemUI stops everytime i try to open settings from the noti. bar and there's no icon for settings in the drawer ive check the permission its rw-r-r and its correct . ive also tried drag and drop signing still the same problem
Click to expand...
Click to collapse
Which tool are you using to compile apps? And System apps don't need to be signed. Maybe that's the problem.
If you want, you can check out Ultimate Guide in Android Development Section which shows how to correctly compile system apps. Its sticky(noun, not an adjective ) there
iamareebjamal said:
Which tool are you using to compile apps? And System apps don't need to be signed. Maybe that's the problem.
If you want, you can check out Ultimate Guide in Android Development Section which shows how to correctly compile system apps. Its sticky(noun, not an adjective ) there
Click to expand...
Click to collapse
sorry gotta bad english here tnx gonna check it out
marc2777 said:
sorry gotta bad english here tnx gonna check it out
Click to expand...
Click to collapse
editing the xmls dose not change anything any suggestions but using apk multi tool works it didnt cause any systemui fc and the settings is properly installed but as i said as i edit xml it didnt change anything in the setting menus
marc2777 said:
editing the xmls dose not change anything any suggestions but using apk multi tool works it didnt cause any systemui fc and the settings is properly installed but as i said as i edit xml it didnt change anything in the setting menus
Click to expand...
Click to collapse
Then maybe that xml doesn't change it
Or, did you delete the modded files from keep folder?
marc2777 said:
editing the xmls dose not change anything any suggestions but using apk multi tool works it didnt cause any systemui fc and the settings is properly installed but as i said as i edit xml it didnt change anything in the setting menus
Click to expand...
Click to collapse
Are you extracting the resources.arsc from the new apk and dropping it back again after compiling?
XperienceD said:
Are you extracting the resources.arsc from the new apk and dropping it back again after compiling?
Click to expand...
Click to collapse
since im using multi tool i dont know if that resource.asrc is original from my original apk for example i already compiled my modded settings.apk shud i keep the resource.asrc or shud i get the resource.asrc from the original and unmodded settings.apk?
1757 fuchet
iamareebjamal said:
Then maybe that xml doesn't change it
Or, did you delete the modded files from keep folder?
Click to expand...
Click to collapse
ive read alot of tuts on how to add apps on settings menu yes it is possible since it is possible to add then maybe it is possible to delete ive tried to reverse the tuts on adding to delete the menus specially on the settings_header.xml and strings tried to edit those xmls after editing recompile i directly push it to my phone i tried to push unsigned and signed apks yet i get same results nothing change i got a feeling that resource.asrc has something to do with this
marc2777 said:
ive read alot of tuts on how to add apps on settings menu yes it is possible since it is possible to add then maybe it is possible to delete ive tried to reverse the tuts on adding to delete the menus specially on the settings_header.xml and strings tried to edit those xmls after editing recompile i directly push it to my phone i tried to push unsigned and signed apks yet i get same results nothing change i got a feeling that resource.asrc has something to do with this
Click to expand...
Click to collapse
If you've read my guide, you would know that you'll have to add resources.arsc from new app to old app and then push old app to your phone
iamareebjamal said:
If you've read my guide, you would know that you'll have to add resources.arsc from new app to old app and then push old app to your phone
Click to expand...
Click to collapse
can you lead mo to ur link/? so this means the created resources.asrc from my mooded apk will be transfered to my original apk am i ryt? and ill push my old apk ?
marc2777 said:
can you lead mo to ur link/? so this means the created resources.asrc from my mooded apk will be transfered to my original apk am i ryt? and ill push my old apk ?
Click to expand...
Click to collapse
Here you go
http://forum.xda-developers.com/showthread.php?t=2326393
I hope its good enough to make it clear
iamareebjamal said:
Here you go
http://forum.xda-developers.com/showthread.php?t=2326393
I hope its good enough to make it clear
Click to expand...
Click to collapse
tnx im reading this but as i check my log something is weird in the res forlder of settings.apk since this is a ported rom there are some folders that multi tool cant read
marc2777 said:
tnx im reading this but as i check my log something is weird in the res forlder of settings.apk since this is a ported rom there are some folders that multi tool cant read
Click to expand...
Click to collapse
Upload your apk.
XperienceD said:
Upload your apk.
Click to expand...
Click to collapse
http://www.4shared.com/account/home.jsp#dir=VTulsuo_ everything you need is in that link i hope you can help me im havng a hard time T_T
marc2777 said:
http://www.4shared.com/account/home.jsp#dir=VTulsuo_ everything you need is in that link i hope you can help me im havng a hard time T_T
Click to expand...
Click to collapse
Access denied?
XperienceD said:
Access denied?
Click to expand...
Click to collapse
access denied ? where sir? in the links?
marc2777 said:
access denied ? where sir? in the links?
Click to expand...
Click to collapse
Works now, but no Settings.apk?
XperienceD said:
Works now, but no Settings.apk?
Click to expand...
Click to collapse
o my god my settings.apk is gone reuploading demet

recompile apk

can you help me to recompile phone.apk with one change.
garik345 said:
can you help me to recompile phone.apk with one change.
Click to expand...
Click to collapse
Not really re-compiling, but have you tried xposed framework yet?
chicguy said:
Not really re-compiling, but have you tried xposed framework yet?
Click to expand...
Click to collapse
No, xposed framework bad to use with miui based rom.
garik345 said:
No, xposed framework bad to use with miui based rom.
Click to expand...
Click to collapse
So what do you want to do? de-compile Phone.apk, edit some files, then re-compile it? With apktool, right?
artit said:
So what do you want to do? de-compile Phone.apk, edit some files, then re-compile it? With apktool, right?
Click to expand...
Click to collapse
right, but when i want to do re-compile i get error.
i also take error when re-compile without changes.
garik345 said:
right, but when i want to do re-compile i get error.
i also take error when re-compile without changes.
Click to expand...
Click to collapse
Yes, I got that error when I try to pack Setting.apk. It's because MIUI apk use some directory notation that not standard to apktool.
Ex. values-hugeui
I solve this by changing values-hugeui to values-xxhdpi (or maybe values-xhdpi, don't know that hugeui means exactly). If values-xxhdpi exists, you can try to merge all files and config in it.
garik345 said:
right, but when i want to do re-compile i get error.
i also take error when re-compile without changes.
Click to expand...
Click to collapse
May I correct my wrong answer, MIUI use its own apktool & aapt. So to rebuild MIUI apk you should add ~/path/to//miui/tools to your $PATH environment and it should be at the start of $PATH to override other apktool & aapt.

[Q] question : how to decompile and compile protected apk ?

hi
i have a program that i want to decompile and change something and then compile it
and i use 2 way
first i use apktool that decompile it but when i want compile it , it show errors ( even withot change nothing )
second i rename apk with zip and extract all and then without change nothing I compress extracted file and rename it to apk and sign it and then the program not work .
the program attached
i think it use some protection or ...
any one have an idea ?
thanks a lot
zeytunak said:
any one have an idea ?
Click to expand...
Click to collapse
Update your apktool...
XperienceD said:
Update your apktool...
Click to expand...
Click to collapse
hi
thanks for your reply
now i update my apktool but after compile decompiled package its not work
even after i use below swith when decompilation
apktool d -s -r b15.apk
you can chack the compiled apk and signed not work correctly .
Is that after doing your mods, just because it builds with no errors doesn't mean the mod hasn't broke something.
Also alot of apps are starting to add code that will break it if it is modded in anyway. Many paid apps are doing this to prevent pirating the app or getting some of the paid features for free. There is nothing you can really do if this is the case.

Categories

Resources