[Q] How to sign Blur system apps - Defy Q&A, Help & Troubleshooting

i have modificate blurphone.apk ( just a png file) and after this steps (Link) I have no network and fc.
Somebody can help me? I have read a lot of things about how to sign and modificate apps but nothing yet about Motorola blur system apps.
Thx

If you are modifying simple png picture then you can do it without decompiling and compiling, just extract with 7zip and modify them and install it back via flashable zip.
Did you tried to put the apk without signing ?

NITRO_100 said:
Did you tried to put the apk without signing ?
Click to expand...
Click to collapse
Yes. I have try to put png via 7zip then put apk in system, change permissions and move it in system/app.
i don't now how to do via flashable zip.
i will try again tomorrow.
Thx

resolved
NITRO_100 said:
If you are modifying simple png picture then you can do it without decompiling and compiling, just extract with 7zip and modify them and install it back via flashable zip.
Did you tried to put the apk without signing ?
Click to expand...
Click to collapse
I think i haven't followed well your steps, so i have tried again and now it's run.
Thx very much.

Related

how do i deoxed single apks?

iv been looking but cant figure it out, no one gives instructions on how to use there deodex tools
Download AvaboxV2 Here
Unzip the download somewhere, open up the 'De-odexer' and view the readme.
I think you just put the apk and odex file inside the "de-odexer" folder and double-click the ''deodexall.bat" or "deall.bat", something along those lines.
Can't check right now since I'm on my phone
i down loaded an used but its not creating a Classes.dex
DubsideWICKED said:
i down loaded an used but its not creating a Classes.dex
Click to expand...
Click to collapse
AvaboxV2 won't do that, it will take both the APPNAME.apk & APPNAME.odex files and make it into a single de-odexed APPNAME.apk
If you want the classes.dex file check out smali tools I believe that should do it for you. It may decompile as out.dex, if it does just rename it back to classes.dex
Edit: instructions for it are HERE
I think apk manager will let you deodex files as well.... I think....
theimpaler747 said:
I think apk manager will let you deodex files as well.... I think....
Click to expand...
Click to collapse
if it does i have never seen it
i thought when u de-odexed a file that it created a classes dex. im still having problemswith all methods mentioned
attach the apk and the odex files in a zip so I can download them. when I have time I'll see if I can get the classes.dex file for you and let you know what I did to get it
kyouko said:
attach the apk and the odex files in a zip so I can download them. when I have time I'll see if I can get the classes.dex file for you and let you know what I did to get it
Click to expand...
Click to collapse
i think its the systemUI he is trying to deodex everything i have tried to deodex it errors out.
however i have circumvented it and i am excited
ya im tryin to do what kyle said. i just wanna edit the signal bars. is it possible to make a odex file for a apk.

Editing XML's

Sorry if this is the wrong place for this post. I have spent the last 2 hours looking for an answer to this. What is the easiest and best way to edit xml files to change font color in the theme i am working on. I cannot find a method that works. I have tried a few of the big name xml editors out there and they wont even open the files. I would like to be able to open and edit them on my computer. I used 7zip to pull the individual xml's i wanna exit out and into their own folder. Now i just need a way to edit them, then use 7zip to put them back into the Framework.res apk. Thanks in advance for any help.
willjohnson said:
Sorry if this is the wrong place for this post. I have spent the last 2 hours looking for an answer to this. What is the easiest and best way to edit xml files to change font color in the theme i am working on. I cannot find a method that works. I have tried a few of the big name xml editors out there and they wont even open the files. I would like to be able to open and edit them on my computer. I used 7zip to pull the individual xml's i wanna exit out and into their own folder. Now i just need a way to edit them, then use 7zip to put them back into the Framework.res apk. Thanks in advance for any help.
Click to expand...
Click to collapse
i wondered this too as i was learning how to theme, first you have to decompile the .apk i was advised to use notepad++ on windows, use apktool located in your tools folder of sdk to decompile and then open your xmls in notepad++ then after you're done editing use the command window to use apktool build > the directory of ur decompiled .apk
Funnyface19 said:
i wondered this too as i was learning how to theme, first you have to decompile the .apk i was advised to use notepad++ on windows, use apktool located in your tools folder of sdk to decompile and then open your xmls in notepad++ then after you're done editing use the command window to use apktool build > the directory of ur decompiled .apk
Click to expand...
Click to collapse
This is the best advice. I just started using apktool myself.
willjohnson said:
Sorry if this is the wrong place for this post. I have spent the last 2 hours looking for an answer to this. What is the easiest and best way to edit xml files to change font color in the theme i am working on. I cannot find a method that works. I have tried a few of the big name xml editors out there and they wont even open the files. I would like to be able to open and edit them on my computer. I used 7zip to pull the individual xml's i wanna exit out and into their own folder. Now i just need a way to edit them, then use 7zip to put them back into the Framework.res apk. Thanks in advance for any help.
Click to expand...
Click to collapse
You can't just pull them with 7zip, you have to decompile the apk the xml files are in and then you can simply use notepad++ or any xml editor to edit them.
Use APK Manager to decompile and recompile.
Sent from my DROIDX using XDA App
willjohnson said:
Sorry if this is the wrong place for this post. I have spent the last 2 hours looking for an answer to this. What is the easiest and best way to edit xml files to change font color in the theme i am working on. I cannot find a method that works. I have tried a few of the big name xml editors out there and they wont even open the files. I would like to be able to open and edit them on my computer. I used 7zip to pull the individual xml's i wanna exit out and into their own folder. Now i just need a way to edit them, then use 7zip to put them back into the Framework.res apk. Thanks in advance for any help.
Click to expand...
Click to collapse
You can also use apkmanager. This makes editing xml's and any images a breeze...
http://forum.xda-developers.com/showthread.php?t=695701
Wow, put up a post, go to bed, wake up and all my answers are here. Thanks a lot guys for the info and quick responses. I think i can figure it out with all the info you have supplied. Thanks again
Apkmanager ended up being my favorite method. But use version 4.8, I had issues with 4.9 not compiling apk's properly.
Apkmanager lets you pull apk's, extract, compile, zipalign, sign, and push them back to your device.
I have been trying the apk manager and have not been able to get it to work. I pull the framework-res.apk from my theme with 7zip. Then put in the folder for modding in the manager folder. Then decompile. Edit in the projects folder as per instructions for apk manager. Then when i am done i recompile, sign and put into the theme again with 7zip. I get an error everytime with recompiling it, but it lets me continue to the end anyway, so i tried it out and it made my phone bootloop on install. So i had to sbf and start over. I get the same errors everytime, has to do with the .9 patch files i think. Too many errors to list in other words.
Read the log file. All the pngs with problems that have issues are listed at the beginning. Also, if there are extra pngs that are not used by the framework then remove them.
Tip. Open the log.txt clear it and save. When done and you get it to compile, don't sign it (its a system apk and does not require it. Then after it is successfully compiled. Unzip it, delete the meta folder and android.manifest file.
Copy the meta folder and android.maifest from the original apk and drop them into the newly compiled apk, and then tada...
Working framework.
FYI: The pngs with issues, just decompile the original framework and use those same pngs to correct your .9.pngs. (.9.pngs use the border for formatting, so duplicate the border in the ones you goofed up).
Sent from my DROIDX using XDA App

[Q] Possible to change the Orange Selection Colour in Stock builds

Hi Guys,
Is it possible to change the colour of the selection colour in Stock Android (I think it's already Green in Sense Roms)? But in Stock it's Orange, I want to know if there's a way to change it to Green?
I'm guessing i just need to alter a colour code in some xml file somewhere but absolutely no idea where to start looking!
Cheers
Paul
Its in the framework-res.apk in the /system/framework folder. There are png files that you need to edit.
Use APK Manager 4.9 to decompile the file, then edit with Photoshop and compile the file again.
Make a flashable CWM zip file and flash it.
Search on the board for the how-to's.
brainmaster said:
Its in the framework-res.apk in the /system/framework folder. There are png files that you need to edit.
Use APK Manager 4.9 to decompile the file, then edit with Photoshop and compile the file again.
Make a flashable CWM zip file and flash it.
Search on the board for the how-to's.
Click to expand...
Click to collapse
Cheers Brain - Exactly what i was after! I'll give this a go this evening!
Well...if you succeeded, would you mind sharing it with us? Thats one thing im searching for since using gingerbread.

[Q] Is it possible?

... to "flash" or otherwise install theme type mods such as changing a notification icon, without recovery? I had experimented with framework type flashable zip files to do with on my GS3 and always flashed from recovery. I am trying to (at least for now) keep from tripping my KNOX.
Also is there a wifi hotspot app or mod that also does not require recovery?
With a towel root, I can probably do everything I want, and keep my KNOX at 0, if I can do these two things.
Bob
ParrSt said:
Is it possible? ... to "flash" or otherwise install theme type mods such as changing a notification icon, without recovery?
Click to expand...
Click to collapse
Sure. It's just more work. Having root gives you the necessary permissions to change system files and do anything that a (recovery) flashable zip file would.
But pragmatically, it wouldn't be reasonable to expect everyone going around writing custom install scripts for your theme mods when the common practice is to package them as a flashable zip.
The solution? It would be eminently useful to learn how to make manual changes yourself. Theme mods typically modify a system file e.g. TouchWizHome.apk or SystemUI.apk. You can make simple edits or replace packages with a root aware file browser e.g. FX. And more advanced edits with a decompiler like apktool.
.
fffft said:
Sure. It's just more work. Having root gives you the necessary permissions to change system files and do anything that a (recovery) flashable zip file would.
But pragmatically, it wouldn't be reasonable to expect everyone going around writing custom install scripts for your theme mods when the common practice is to package them as a flashable zip.
The solution? It would be eminently useful to learn how to make manual changes yourself. Theme mods typically modify a system file e.g. TouchWizHome.apk or SystemUI.apk. You can make simple edits or replace packages with a root aware file browser e.g. FX. And more advanced edits with a decompiler like apktool.
.
Click to expand...
Click to collapse
Oh I don't expect others to make my scripts. I was making the zip packages myself.
If I understand you correctly, I can use something like FX to replace the an icon in one of the .apks? Those are zip type files but FX can do that?
As I already said, yes you can. Icons are (usually) especially easy. It's literally just replacing an icon with a file browser, usually in the xxhdpi360 drawable folder of the apk.
Something like
Copy the apk to another directory or your PC
Temporarily rename the .apk to a .zip file
Use FX Root to browse the compressed file and locate the icon you want to change.
Delete the icon from the zip.
Drag and drop the new icon to replace it.
Rename the .zip back to .apk
Browse to the folder where you copied the apk from
Rename the original .apk to .bak in case you need it later
Move your modified apk to the directory
Confirm that the permissions are still 0644 (long press to check.. but I've never seen FX mess them up to start with).
Reboot
That may look like a lot of steps but they are all trivial and you can do the entire thing in about 60 seconds.
Features e.g. suppressing nags or some colour changes may require decompiliing an apk.
.

Edit the SystemUI_ZTE.apk?

Hi,
I want to edit the SystemUI_ZKE.apk, but when I use "APK Editor Pro" for instance the apk crashes after a reboot.
What would be the right way to do this? My goal is to delete the charging.ogg file that wakes my wife as I plugin a charger when I go to bed
Any other solution to *that* problem is welcome too.
I'm on a A2017G B06 btw.
Thanks in advance,
Cheers,
/Cacti
Edit: Sorry, wrong forum, should be posted in the Questions & Answers. @mods: please move it, thanks.
le_cactus said:
Hi,
I want to edit the SystemUI_ZKE.apk, but when I use "APK Editor Pro" for instance the apk crashes after a reboot.
What would be the right way to do this? My goal is to delete the charging.ogg file that wakes my wife as I plugin a charger when I go to bed
Any other solution to *that* problem is welcome too.
I'm on a A2017G B06 btw.
Thanks in advance,
Cheers,
/Cacti
Edit: Sorry, wrong forum, should be posted in the Questions & Answers. @mods: please move it, thanks.
Click to expand...
Click to collapse
You need to use apktool on Windows or Linux instead: https://ibotpeaches.github.io/Apktool/. You'll need Java already installed.
Your device also needs to be rooted and have TWRP recovery installed.
Put the apktool.jar and wrapper script in the system directory (C:\Windows on Windows)
Pull frameworks and SystemUI from your device with
Code:
adb pull /system/framework/framework-res.apk
adb pull /system/framework/framework-zte-res.apk
adb pull /system/priv-app/SystemUI_ZTE/SystemUI_ZTE.apk
Install frameworks to your computer:
Code:
apktool if framework-res.apk
apktool if framework-zte-res.apk
Decompile SystemUI_ZTE.apk:
Code:
apktool d SystemUI_ZTE.apk
Make whatever changes you want to make then recompile with:
Code:
apktool b SystemUI_ZTE
Use signapk.jar to sign the apk then put the apk into a flashable zip and flash to your device in TWRP.
If you want to make changes to smali you'll need to pull the SystemUI_ZTE odex file and deodex the apk with oat2dex and then use 7-zip or WinRAR to paste the classes.dex file into the apk before decompiling.
Gr8 tutorial. I'll try that tomorrow, hope I get it fixed. Thank you!
Cheers,
/Cacti
Sent from my ZTE A2017G using XDA-Developers Legacy app
Hi,
*
Earlier I tried with APK Editor Pro (https://play.google.com/store/apps/details?id=com.gmail.heagoo.apkeditor.pro)
What happened was (after replacing the SystemUI_ZTE.apk with the modified APK) after a reboot the system booted with parts of the UI nog working. Navigationkeys didn't work except for the home button, and I had no status bar at all. After rebooting again it only showed my wallpaper, and no matter what I did it wouldn't show me anything else. So I had to restore.
*
Modifying the APK with the APKTool gave me the exact same result. Only thing i did differently as to bkores guide was I signed it using ZipSigner (but that never failed me before) and I just replaced the file using TWRP, instead of flashing it through an installer zip. But I can't imagine that being the problem?
*
Anyways, anybody able to modify the SystemUI_ZTE.apk? All I need is the B06 (A2017G) with a replaced charging.ogg (with only silence).*Any tips are welcome.
*
TIA,
*
Cheers,
/Cacti
Sent from my ZTE A2017G using XDA-Developers Legacy app
le_cactus said:
Hi,
*
Earlier I tried with APK Editor Pro (https://play.google.com/store/apps/details?id=com.gmail.heagoo.apkeditor.pro)
What happened was (after replacing the SystemUI_ZTE.apk with the modified APK) after a reboot the system booted with parts of the UI nog working. Navigationkeys didn't work except for the home button, and I had no status bar at all. After rebooting again it only showed my wallpaper, and no matter what I did it wouldn't show me anything else. So I had to restore.
*
Modifying the APK with the APKTool gave me the exact same result. Only thing i did differently as to bkores guide was I signed it using ZipSigner (but that never failed me before) and I just replaced the file using TWRP, instead of flashing it through an installer zip. But I can't imagine that being the problem?
*
Anyways, anybody able to modify the SystemUI_ZTE.apk? All I need is the B06 (A2017G) with a replaced charging.ogg (with only silence).*Any tips are welcome.
*
TIA,
*
Cheers,
/Cacti
Click to expand...
Click to collapse
Try copying META-INF folder from old apk to new apk. If that doesn't work try copying resources.arsc from new apk to old apk and flash the old apk. Don't sign
Can it have anything to do with the .odex file?
I'll try the meta-inf thingy and see if that works
Cheers,
/Cacti
Sent from my ZTE A2017G using XDA-Developers Legacy app
Actually try this instead. I think the apk needs to be deodexed before it can be modified like you said.
Pull the odex file
Code:
adb pull /system/priv-app/SystemUI_ZTE/oat/arm64/SystemUI.odex
Get smali folder from the odex file with oat2dex.jar here: https://github.com/testwhat/SmaliEx/releases/tag/snapshot
Open command window in directory of odex file
Code:
java -jar oat2dex.jar smali SystemUI.odex
Decompile the apk and then copy and paste the smali folder into the directory of the decompiled apk.
Make your charging.ogg change and then recompile the apk. Copy and paste the META-INF from original apk to new apk.
Push apk to your device and delete the "oat" folder in the SystemUI_ZTE folder on your device.
Hi,
Thank you for your support so far, but that didn't work out eighter....
bkores said:
Code:
adb pull /system/priv-app/SystemUI_ZTE/oat/arm64/SystemUI.odex
Click to expand...
Click to collapse
Assuming you made a typo (since there is no SystemUI.odex) I used this instead:
Code:
adb pull /system/priv-app/SystemUI_ZTE/oat/arm64/SystemUI_ZTE.odex
bkores said:
Get smali folder from the odex file with oat2dex.jar
Click to expand...
Click to collapse
After the oat2dex command I don't have a smali folder, just 5434 smali files scattered over serveral folders, so I don't know how to proceed from there.
Cheers,
/Cacti
le_cactus said:
Hi,
Thank you for your support so far, but that didn't work out eighter....
Assuming you made a typo (since there is no SystemUI.odex) I used this instead:
After the oat2dex command I don't have a smali folder, just 5434 smali files scattered over serveral folders, so I don't know how to proceed from there.
Cheers,
/Cacti
Click to expand...
Click to collapse
Well then create a folder called smali in the directory of decompiled apk and paste the folders into smali
Can someone help me, i want to change framework.jar but there is no classes.dex in jar nor framework.odex in /system/framework/oat/arm64 (also arm). Because of it i can't decompile it with smali/baksmali tool. I want to change volume steps in AudioService exactly what VolumeSteps+ do but without Xposed. Any help? I'm on Nougat B10 Rom.
SkaboXD said:
Can someone help me, i want to change framework.jar but there is no classes.dex in jar nor framework.odex in /system/framework/oat/arm64 (also arm). Because of it i can't decompile it with smali/baksmali tool. I want to change volume steps in AudioService exactly what VolumeSteps+ do but without Xposed. Any help? I'm on Nougat B10 Rom.
Click to expand...
Click to collapse
Perhaps this can help a bit : https://forum.xda-developers.com/axon-7/themes/a2017-volume-steps-enabler-call-media-t3745747
If you want a decompiled framework, I can send you. Just pm me.
If you want I'll implement your mods and recompile again. Up to you to test
raystef66 said:
Perhaps this can help a bit : https://forum.xda-developers.com/axon-7/themes/a2017-volume-steps-enabler-call-media-t3745747
If you want a decompiled framework, I can send you. Just pm me.
If you want I'll implement your mods and recompile again. Up to you to test
Click to expand...
Click to collapse
I solved a problem, AudioService is not in framework.jar anymore, it's on services.jar. Check my post on your mentioned thread.

Categories

Resources