Hi everyone, I am new to xda and relatively new to modifying my VZW LG G2. I am looking for some general information on making modifications to APKs as I am trying to change a few things on my phone's interface (rooted but running stock VS98011A 4.2.2 firmware with stock launcher). I am familiar with rooting, TWRP, flashing mods, Xposed modules, apktool, adb, and making basic changes to APKs. I have been able to use 7-Zip to modify images within system APKs to do things like change the app drawer icon and change the status bar icons to all white but for the most part that is the most I know about modifying APKs. I have used apktool to decompile a few APKs successfully (including loading framework files) but I am not really familiar with recompiling them (I always seem to get errors but the APK still builds successfully), signing them, etc.
Here are my general questions:
-Where do odex files play into decompiling and recompiling APKs and do I need any special tools to be able to deodex and decompile an APK, make changes to it then recompile and reodex it?
-Do system APKs need to be signed after being recompiled?
-What is the best tool to sign APKs?
-What are smali and baksmali and do I need them?
-When attempting to recompile a modified copy of LGSystemUI.apk using apktool, I get the messages "W: Could not find sources" and "aapt: warning: string 'sp_remote_info_NORMAL has no default translation in C:\Users\Sean\Desktop\LGSystemUI\res; found: [long list of languages]" but the APK still builds. Is this of concern? Does it have anything to do with the odex files or the framework files?
Sorry for the bombardment of questions. I have read several posts across multiple android forums and can't seem to figure all this out.
rooted VZW LG G2 VS980, stock firmware (4.2.2 VS98011A), stock launcher, running LG G2 Xposed module
bump
Related
Hey all,
I was wondering whats the process to modify the stock multi-touch keyboard for the Droid 2? I was able to do it with the multi-touch keyboard that Punk.Kaos ported to the Eris, using some Windows batch files for extracting the apk source, compiling, signing, etc. I just can't remember for the life of me what that little program was called. Any ideas?
Thanks!
it would be nice since the space bar is soooo small i keep pressing . instead of space 70% of the times
Alright, I was able to get the program I was thinking of, it is called APK Manager. But the keyboard is a odex file... Which I don't know how to extract the XML files from... Yet.
I'd de-odex before you try to extract. It will be a lot easier. There's the method I used here.
What exactly is de-odex'ing? How will it affect my phone?
Deodexing just means that all of the stray .odex files will be put back into the correct .apk files this is done mostly for theme purposes in order to edit the services.jar file which has to be de-odexed before it can be edited. It won't corrupt anything if you do it right nothing should change on the outside the phone devs leave the .odex files out for loading reasons but nothing significant should change but you might experience a slightly slower boot up process but like I said nothing significant. Most ROM's now are de-odexed though.
So I deodexed my phone so I could work on the LatinIME.apk package. Using the APK-Manager for Linux, I was able to (0) pull the APK from my phone. Then I (9) decompiled the APK, edited the XML files as I wanted.
Now, from here I'm not entirely sure which direction to take. I tried running (13) Compile APK / Sign APK / Install APK, but I got an error saying something on how the signatures didn't match up. Then I tried running (3) ZIP APK (5) Zipalign APK then (8) ADB push, but now I don't even have the keyboard on my phone anymore.
How can I go about doing the correct way to compile my modified code and install it on my phone?
Here are the options I can do, if you're not familiar with APK Manager:
Code:
------------------Simple Tasks Such As Image Editing----------------------
0 Adb pull
1 Extract apk
2 Optimize images inside (Only if "Extract Apk" was selected)
3 Zip apk
4 Sign apk (Dont do this if its a system apk)
5 Zipalign apk (Do once apk is created/signed)
6 Install apk (Dont do this if system apk, do adb push)
7 Zip / Sign / Install apk (All in one step)
8 Adb push (Only for system apk)
-----------------Advanced Tasks Such As Code Editing-----------------------
9 Decompile apk
10 Compile apk
11 Sign apk
12 Install apk
13 Compile apk / Sign apk / Install apk (All in one step)
---------------------------------------------------------------------------
14 Batch Optimize Apk (inside place-apk-here-to-batch-optimize only)
15 Sign an apk (inside place-apk-here-for-signing folder only)
16 Batch optimize ogg files (inside place-ogg-here only)
17 Quit
****************************************************************************
Anyone? I would love to get my stock keyboard back!
Sent from my DROID2 using XDA App
Hi,
I'm trying to decompile conversations.apk from the motorola stock rom, and am failing at it. Right now i have used the following framework files:
-blur-res.apk
-moto-res.apk
In addition all of these files are odexed. And again, i am failing at deodexing them.
Any help please?
I have multitool(apktool), virtuous ten studio (for the code modding, but first i must correctly decompile), and also have xUltimate (for deodexing)
Here... I have deodexed and decompiled Conversations.apk for you
P.S. Conversations.apk is from CEE 2.2.2. Froyo stock
Thanks =)
The files are corrupt (when trying to convert to jar file using dex2jar).
Are you sure you included all the BOOTCLASSPATH files when deodexing?
Hi!
I need help for a Reboot MOD for the Samsung S5 G900F with the new Android 5.0 Lollipop Firmware (BNL9).
I have allready make this MODs for other Devices and Android Versions (4.1.2 / 4.2.2 / 4.4.2) and all works, but nothing is working in the G900F with Lollipop.
So i try this Guides:
http://forum.xda-developers.com/showthread.php?t=1573032
and
http://forum.xda-developers.com/galaxy-note-3/development/dev-tw-lollipop-torch-5way-reboot-t2997748
My Posts: http://forum.xda-developers.com/gal...tw-lollipop-torch-5way-reboot-t2997748/page22 and the follow parts...
But nothing is working.... if i replace the android.policy.jar it is nothing change in the System. With a ZIP over Custom Recovery with wipe cache but also nothing is changed. I can delete the android.polica.jar and nothing change in system
If i check on Reboot Menu "Reboot" it comes the normal Screen with "Yes" or "No" but not the Reboot MOD.
Here are my files (Stock and modded) Download
The files deodexed with this Tool http://forum.xda-developers.com/and.../script-app-joeldroid-lollipop-batch-t2980857 (Only android.policy.jar is deodexed)
have u tried xposed?
it has option to enable 4-ways like soft reboot,reboot recovery etc.
check it out
First i do not like Xposed because i want to make it my self and second... Xposed is not working on Android 5.0 Lollipop at the Moment.
So i need to make it in the Code Section without Xposed.
make your own mod then
You can't use deodexed framework on Odexed system/
Simply pushing deodexed file and removing correcsponding .odex is true only in case of apk NOT jar
So if you want to use it on Odexed version you have to reodexed that modified jar and have to replace both files. Again I don't know on your device S5 any reOdexing script working or not. If you want to test your jar is properly modified or not then jst test on any DeOdexed ROM.
Okay thank you @dr.ketan for this explanation.
But i have look in the Original Files and i see that the android.policy.jar donĀ“t have a *.odex File.
My misstake that i wrote that i delete the *.odex file. I have test and do so much :silly: sorry.
So it is then the same Issue? Because the only changes i make are in the android.policy.jar
Yeah lollipop doesn't have Android. Policy. Odex but it's hidden and that's why it doesn't make any difference when you replacing deodexed Android.policy jar
Because hidden odex part is still there and which is responsible for normal view of reboot menu.
If you have did same with any other jar which have odex part and you have removed odex and pushed deodexed file, likely system wouldn't have booted.
Sent from my SM-N910G using xda premium
Ok thanks again.
Now i must deodex all files in the folder app, framework and priv-app then it must work?
Lollipop is a great Version but very difficult to mod and many too learn new.
there are several mods already
http://forum.xda-developers.com/galaxy-s5/development/mod-translatable-4-reboot-outsource-t2835432
http://forum.xda-developers.com/galaxy-note-3/development/dev-tw-lollipop-torch-5way-reboot-t2997748
deleted
Darkman said:
Hi!
I need help for a Reboot MOD for the Samsung S5 G900F with the new Android 5.0 Lollipop Firmware (BNL9).
I have allready make this MODs for other Devices and Android Versions (4.1.2 / 4.2.2 / 4.4.2) and all works, but nothing is working in the G900F with Lollipop.
So i try this Guides:
http://forum.xda-developers.com/showthread.php?t=1573032
and
http://forum.xda-developers.com/galaxy-note-3/development/dev-tw-lollipop-torch-5way-reboot-t2997748
My Posts: http://forum.xda-developers.com/gal...tw-lollipop-torch-5way-reboot-t2997748/page22 and the follow parts...
But nothing is working.... if i replace the android.policy.jar it is nothing change in the System. With a ZIP over Custom Recovery with wipe cache but also nothing is changed. I can delete the android.polica.jar and nothing change in system
If i check on Reboot Menu "Reboot" it comes the normal Screen with "Yes" or "No" but not the Reboot MOD.
Here are my files (Stock and modded) Download
The files deodexed with this Tool http://forum.xda-developers.com/and.../script-app-joeldroid-lollipop-batch-t2980857 (Only android.policy.jar is deodexed)
Click to expand...
Click to collapse
hi buddy, I have the same problem, can you help and share with me the solution?
https://forum.xda-developers.com/attachment.php?attachmentid=4307358&stc=1&d=1508394148
Any settings made in the value files found within framework-res.apk can be overlaid with new values if an archive called framework-res is placed in /system/media/theme/default.
The framework-res archive is just a zip file without the .zip extention and must contain a file called theme_values.xml
The format of the contents of theme_values.xml is critical and all value entries placed in the <MIUI_Theme_Values> section:
Code:
<?xml version="1.0" encoding="utf-8"?>
<MIUI_Theme_Values>
inset lines here
inset lines here
inset lines here
</MIUI_Theme_Values>
If you already have a framework-res file in /system/media/theme/default, this means you already have some overlaid settings. Just merge your wanted settings into the same file being careful not to contradict existing lines.
I have attached the decompiled value files that contain the majority of what you may wish to play with. Copy and paste lines from these files into theme_values.xml with your edited values.
The value files come from 6.12.29 but are almost universal across all MIUI8 ROMs.
I have also included a file called framework_tweaks.xml which is my quick reference for useful tweaks - it is by no means exhaustive. Remove my comments from lines if you copy directly from this file.
The big advantage in modding this way is that it is very easy to re-edit the mod and easily reversed by simply deleting the file. This is much easier than decompiling and recompiling the parent file every time you want to change something. Furthermore, some files simply will not recompile successfully.
Other overlay files that can be created and placed in /system/media/theme/default
com.miui.home
values from MiuiHome.apk
Commonly used to change grid size for launcher
com.android.systemui
values from MiuiSystemUI.apk
Commonly used to change Status bar and toggles grid
framework-miui-res
values from framework-ext-res.apk
Commonly used to set toggles grid columns
Mods that are pure overlays will be attached here.
A comprehensive MIUI Home Launcher grid mod will be added next time I run a ROM with stock launcher
Contributions to the mods welcome
This is amazing!!!
After trying so hard to decompile/recompile/package/sign etc the framework-res.apk just to change two values in dimens.xml AND FAILLING
This is SOOOO much easier!
THANK YOU SO MUCH FOR THIS!
@ugene1980 Download TickleMyAndroid from its XDA Thread for decompile/recompile apks - it will do everything you need. Don't re-sign framework files or system apps.
Note that the full complement of framework files consist of the following:
framework-ext-res.apk
mediatek-res.apk
framework-res.apk
miui.apk - rename this to miui-res.apk to be recognized as a framework file
miuisystem.apk - rename this to miusystem-res.apk to be recognized as a framework file
jajk said:
@ugene1980 Download TickleMyAndroid from its XDA Thread for decompile/recompile apks - it will do everything you need. Don't re-sign framework files or system apps.
Note that the full complement of framework files consist of the following:
framework-ext-res.apk
mediatek-res.apk
framework-res.apk
miui.apk - rename this to miui-res.apk to be recognized as a framework file
miuisystem.apk - rename this to miusystem-res.apk to be recognized as a framework file
Click to expand...
Click to collapse
Nice, i'll give it a try, hope it works for miui 9.
I'm assuming mediatek-res.apk won't be needed if the device uses a SD835 instead of a mediatek processor?
@ugene1980 It works on MIUI9. You assume correctly
Can I use this mod to create AMOLED theme? And which app will be themed?
Coz MIUI theme manager failed to theme other than icon and wallpaper on MIUI 9 (Marshmallow).
Thanks.
Hi, thanks so much for your hints.
I've created two mods for MIUI9 on MiMix2 8.1.26 Beta rom, com.miui.home and framework-miui-res.
The mods flaulessly work, but only if the phone is rooted.
- Firstly rooting was needed because I had to put the files on /system and change permissions... but once checked I created a flashable zip that makes the work from TWRP.
- Once created the flashable .zip... rooting is not needed to modify system partition... but it doesn't work without root.
- Looking at same files but inside /data/system/theme (files created by themes app) I discovered some things to try:
-- Put 0755 permission with 9801 owner and group
-- Make framework-miui-res with the same structure... with filters.xml and framework-miui folder
- No way... I cannot make it work without root... and all the attempts worked very well if the phone is rooted.
Do you know how to make it work withour rooting?
Best regards.
---------- Post added at 04:06 PM ---------- Previous post was at 04:04 PM ----------
jajk said:
@ugene1980 Download TickleMyAndroid from its XDA Thread for decompile/recompile apks - it will do everything you need. Don't re-sign framework files or system apps.
Note that the full complement of framework files consist of the following:
framework-ext-res.apk
mediatek-res.apk
framework-res.apk
miui.apk - rename this to miui-res.apk to be recognized as a framework file
miuisystem.apk - rename this to miusystem-res.apk to be recognized as a framework file
Click to expand...
Click to collapse
Only to get your attention
@Huexxx It could be an sepolicy issue. What version Android and what version security update will determine how hard it is to get something foreign in System to execute.
jajk said:
@Huexxx It could be an sepolicy issue. What version Android and what version security update will determine how hard it is to get something foreign in System to execute.
Click to expand...
Click to collapse
Alright, I'll look deeper inside the logs.
Thanks for the point.
Enviado desde mi Mi MIX 2 mediante Tapatalk
Hello people, I can't seem to manage recompiling essential's framework-res from latest P-BETA1.
I have latest apktool (2.3.3) and installed framework-res.apk from essential's beta-1 rom as the framework in apk-tool. But I can't manage to compile apks back, even if I don't make any changes.
I tried with framework-res, SystemUI. Normal non-system apks building just fine(duh). Anyone knows whether I'm missing something essential-specific? Is there a problem on my side?
Error logs added in attachment.