Hi.
Sorry, I wasn't sure if it should be in "Themes", so I posted in General.
I've got neo V with root made on .42 (with ZergRush) and .62 stock fw installed via OTA. I was trying to change the number of desktops in Home.apk. What I do, generally:
1. Decompile Home.apk
2. Edit "number_of_desktop_panes" in values/integers.xml
3. Edit values/styles.xml to avoid compilation error (as advised here).
4. Edit DesktopModelManager.smali (as adviced here), but there's slightly different code (different line number and variable (?) name).
5. Recompile, replace with /system/app/Home.apk
The replace process is 100% good, because restoring original Home.apk do not cause any problems.
I do it from adb. I made the /system/tmp/ dir and given it 777 chmod to do it faster (without /sdcard). I mount /system as R/W, push Home.apk to /system/tmp/, change chmod to 644, then replace /system/app/Home.apk with it. Sometimes I try "sync", sometimes not.
It works only with stock Home.apk.
The problem is with recompiled apps.
I tried:
- xdaAutoTool
- ApkMultiTool
- ApkTools (from here)
- ApkTools (from here)
I also tried signing the app and not signing it (as mentioned here).
I also tried installing another launcher (GO Launcher EX), changing it to default, then replacing Home.apk, then changing again.
I also (huh) tried recompiling the app without any changes (except the one in styles.xml, without it, compilation would not succeed).
I also (getting boring) tried skipping the .smali edit.
Nothing works. If I replace Home.apk without reboot, the Home button doesn't work (single press) and if I was on the desktop when replacing app - it becomes black, no dockbar, nothing.
If I reboot - the phone freezes on SE logo, fortunately I can access it with ADB - when I replace Home.apk with stock one, the phone boots in a couple of seconds without a reboot.
I've got Win7 Professional x64, the newet JRE and JDK for x64, tried newest and older apktool.jar, smali.jar and other files. ApkMultitool was working on the yesterday-updated Android SDK folder. And I have no idea, what am I doing wrong... Do you have any ideas?
EDIT:
- earlier I successfully replaced SystemUI.apk with the changed one (Ultrans v2b) - no problems here
- I've got locked BL and I didn't install any recovery
If i understood corect your problems seems because busybox check your version;
and it easy to work with apk manager here is the link:http://forum.xda-developers.com/showthread.php?t=695701
umarian said:
If i understood corect your problems seems because busybox check your version;
Click to expand...
Click to collapse
Why busybox would check the Home.apk version? Or maybe I misunderstood you? If it was about busybox's version, I've got 1.18.4
umarian said:
and it easy to work with apk manager here is the link:http://forum.xda-developers.com/showthread.php?t=695701
Click to expand...
Click to collapse
Like I said, I tried it (ApkMultiTool). Decompiles, recompiles, signs (or not) correctly. Just the .apk doesn't work.
Man send a pm my english it not so good and i try to to help if i can
umarian said:
Man send a pm my english it not so good and i try to to help if i can
Click to expand...
Click to collapse
Thanks, I sent you a PM.
I will also check the procedure on 32bit system in a couple of hours. If anyone has another idea, please let me know.
Just checking you know semc home has a dependancy app and won't compile correct with out said app /framework or semcgeneric.apk
Sent from my Xoom using Tapatalk
kormatoes said:
Just checking you know semc home has a dependancy app and won't compile correct with out said app /framework or semcgeneric.apk
Click to expand...
Click to collapse
I had no idea, compile and decompile didn't report any errors so I assumed it should be OK.
As I never changed apk with dependencies, can you explain me two things?
1. Which files from /system/framework should I pull and where to place them before decompiling with ApkMultiTool?
2. Will files from framework be changed or are they only needed as resources and are left untouched?
WRonX said:
I had no idea, compile and decompile didn't report any errors so I assumed it should be OK.
As I never changed apk with dependencies, can you explain me two things?
1. Which files from /system/framework should I pull and where to place them before decompiling with ApkMultiTool?
2. Will files from framework be changed or are they only needed as resources and are left untouched?
Click to expand...
Click to collapse
Honest it's been months since I used,
decompile with dependency ie framework-
Res.apk then change stuff
Then recompile and in keep folder remove what you changed including resources if xml were changed hopefully you get what im saying
Sent from my MT15i using Tapatalk
OK, I think I got this - SemcGenericUxpRes.apk
Home.apk decompiled with dependencies from this file, then I changed it and compiled. Still the same thing.
Maybe the res file was wrong? Or should I sign it with ApkMultiTool?
WRonX said:
OK, I think I got this - SemcGenericUxpRes.apk
Home.apk decompiled with dependencies from this file, then I changed it and compiled. Still the same thing.
Maybe the res file was wrong? Or should I sign it with ApkMultiTool?
Click to expand...
Click to collapse
Try framework-res.apk
Then try and get different apk tool we use apkmanager
Sent from my MT15i using Tapatalk
kormatoes said:
Try framework-res.apk
Then try and get different apk tool we use apkmanager
Click to expand...
Click to collapse
You were right, thanks. I must have tried with the wrong file earlier, because I was quite sure I tried framework-res.apk - and I didn't. And yes, the app should be signed after build.
Now, the Home.apk is working with my changes, but only after this little "hack" from Chainfire.
But I've got another stupid problem - the only thing that doesn't work is the "Photos and Videos" widget... I think I'll give up...
WRonX said:
You were right, thanks. I must have tried with the wrong file earlier, because I was quite sure I tried framework-res.apk - and I didn't. And yes, the app should be signed after build.
Now, the Home.apk is working with my changes, but only after this little "hack" from Chainfire.
But I've got another stupid problem - the only thing that doesn't work is the "Photos and Videos" widget... I think I'll give up...
Click to expand...
Click to collapse
Now you get it keep going If you changed layout of desk top
widgets need doing to tho
Sent from my MT15i using Tapatalk
kormatoes said:
Now you get it keep going If you changed layout of desk top
widgets need doing to tho
Click to expand...
Click to collapse
Thanks, but in case of widgets I don't even know, where to start from. Why the hell only a couple of them doesn't work now? Photos and Videos, Music Player and Timescape Widget - I think that's all. I have no idea, where it came from :/
EDIT: OK, now I have an idea, but it scares me. As I can see, the only way to compile and run the .apk was to remove
Code:
android:sharedUserId="com.sonyericsson.home"
From AndroidManifest. Now, if I understand properly, the widget needs Home.apk to HAVE that ID? Because logcat says:
Code:
W/System.err( 3399): java.lang.SecurityException: Requesting code from com.sonyericsson.advancedwidget.photo (with uid 10004) to be run in process com.sonyericsson.home (with uid 10138)
Long story short: WTF?!
WRonX said:
Thanks, but in case of widgets I don't even know, where to start from. Why the hell only a couple of them doesn't work now? Photos and Videos, Music Player and Timescape Widget - I think that's all. I have no idea, where it came from :/
EDIT: OK, now I have an idea, but it scares me. As I can see, the only way to compile and run the .apk was to remove
Code:
android:sharedUserId="com.sonyericsson.home"
From AndroidManifest. Now, if I understand properly, the widget needs Home.apk to HAVE that ID? Because logcat says:
Code:
W/System.err( 3399): java.lang.SecurityException: Requesting code from com.sonyericsson.advancedwidget.photo (with uid 10004) to be run in process com.sonyericsson.home (with uid 10138)
Long story short: WTF?!
Click to expand...
Click to collapse
android:sharedUserId="com.sonyericsson.home that's the problem try replacing the compiled resources in a fresh apk
Sent from my MT15i using Tapatalk
I tried removing the same ID from AndroidManifest in PhotoWidget.apk, but it didn't work.
The only thing I've managed to get to know is that no widget from com.sonyericsson.advancedwidget.framework will work and also that I'm not the only one, who has problems with it
kormatoes said:
try replacing the compiled resources in a fresh apk
Click to expand...
Click to collapse
Forgive me, but I don't understand. Can you explain it?
I'm unsure what your trying to do but if you get the resources fileand any thing else you changed from the home apk that you made,
and then put IT inside a fresh home apk -ie new untouched home.apk
this should help with what you're saying your problem is
Sent from my MT15i using Tapatalk
kormatoes said:
I'm unsure what your trying to do but if you get the resources fileand any thing else you changed from the home apk that you made,
and then put IT inside a fresh home apk -ie new untouched home.apk
this should help with what you're saying your problem is
Click to expand...
Click to collapse
OMG, I did it
First of all - I didn't understand you at the first time, about resources and "new" .apk. Now I think I got it (not everything, but enough to get this to work).
The problem I found on my private PC (earlier I was using other PC) was the "Sorry thats not the dependee apk, try again" error when trying to decompile Home.apk with framework-res.apk. It didn't happen before, but I was so tired with all of that, I wanted to try the shortest way, so here's what I did:
1. Decompiled Home.apk without dependencies
2. Made some changes I wanted to make
3. Just compiled the app, answering "y" for question about system app, but without copying "additional files".
4. Replaced resources.arsc file inside original (stock) Home.apk with the one from just compiled unsignedHome.apk, installed and...
- working Home.apk - checked
- working widgets - checked
- happy me - checked!
Thanks!
Your wellcome
Sent from my MT15i using Tapatalk 2 Beta-5
Related
Guys,
Need your advise on this problem that I'm facing right now. I did some Mod on the Phone.apk but somehow the Phone.apk will FC. I won't see the Pin number entry and it won't detect any mobile signal. If it did pass the two processes mentioned before, it will FC when...
1. I hang up a call.
2. the screen on during the call. (proximity sensor activity)
I did a simple compilation by decompile the original Phone.apk and compile it without any changes and still can't work, even with signed and unsigned APK. Any kind soul able to give me an advise on what to look at...
FYI,
1. The original (stock) deodexed Phone.apk was working flawlessly.
2. ROM - KI4
3. Tools - APK Manager, Brut Apktool
4. Signer - Zipsigner2 (autotest & platform key), APK Manager option number 12; both did not make any difference
Thanks in advance.
Repair permissions?
This often helps. Maybe give it a try.
donalgodon said:
Repair permissions?
This often helps. Maybe give it a try.
Click to expand...
Click to collapse
You mean the file permission. Yup I already did that. Even wiping the dalvik.
Is the phone.apk dependent on other apk? Maybe I signed it incorrectly?
Go to manage application and wipe data of phone.apk
Don't delete the app just wipe data
Solved
Managed to solve it. Seems that any compiled Phone.apk did not work correctly. I had to manually compiled classes.dex and replaced it together with resources.arsc on top of the original Phone.apk
Weird but it does not FC so far.
Bugeca said:
Managed to solve it. Seems that any compiled Phone.apk did not work correctly. I had to manually compiled classes.dex and replaced it together with resources.arsc on top of the original Phone.apk
Weird but it does not FC so far.
Click to expand...
Click to collapse
old post, but i am having the same trouble as you not being able to decompile and recompile a untouch stock phone.apk. what did you do to resolved this? how did you manually compiled the classes.dex file? sorry for being a noob.
How to change the status-bar background?
i want to change the transparent black background with the image in attachment so that it match my theme.
So which files i have to replace with this background?
Using xPeria Mini with stock ICS ROM
So no help?:crying:
piousheart said:
So no help?:crying:
Click to expand...
Click to collapse
Try to post in Themes and Apps section.
Publiuss said:
Try to post in Themes and Apps section.
Click to expand...
Click to collapse
What is this thread?
mobilephone01 said:
What is this thread?
Click to expand...
Click to collapse
Actually this thread was in general but i moved it
And guys will you all please stick to the topic..any help?
maybe this ??
http://forum.xda-developers.com/showthread.php?t=1786889
iiandskater said:
maybe this ??
http://forum.xda-developers.com/showthread.php?t=1786889
Click to expand...
Click to collapse
See here is my systemUI.apk please add the image at OP (opaque)
piousheart said:
See here is my systemUI.apk please add the image at OP (opaque)
Click to expand...
Click to collapse
Why not do it yourself? There is plenty of TUT's around that help you decompile and recompile apks.
evilbarcode said:
Why not do it yourself? There is plenty of TUT's around that help you decompile and recompile apks.
Click to expand...
Click to collapse
I tried but when i recompile it & push it in system\app with proper permission, after rebooting phone it stuck bootlogo..
The same happens when i tried to decompile DefaultThemes.apk & MusicWidget.apk they both were not installed...
then i searched & found that we have to compress the resources.arc blablablaaa... & signing with recompiling system apk..
Still after giving a lot of tries i dont understand how to use signing & compress resources.arc blablaballl idk..
If you know than may be you can teach
Rebooted my phone 100z of time to check every method i found but no success
Now i dont wana harm my phone, rebooting it again & again for the things that isn't working for me...
See this thread, i asked on xda but people aren't explaining properly, they just stop answering after certain question:crying:
piousheart said:
See this thread, i asked on xda but people aren't explaining properly, they just stop answering after certain question:crying:
Click to expand...
Click to collapse
Well, I am a bit on the busy side.... I assume you didn't try my tool then?
To do this manually, you need to first recompile your apk after you've done all your changes. You already know this bit.
Then:
Make a copy of the old apk
Use 7zip to open both the copy and the recompiled apk
Drag the 'res' folder from the recompiled apk to the copy
Close the copy
Extract 'resources.arsc' from the recompiled apk
Add 'resources.arsc' to the copy, selecting 'STORE' compression
Close the recompiled apk
Open the copy and check that resources.arsc has the same size and packed size
Reboot the phone and go into recovery
Mount the /system partition
Push the apk straight to the right folder
Unmount the /system partition
Reboot the phone
Wait for it all to load
Wait a bit longer
Wait a bit longer still
And you're done.
If you've pulled the app from the phone to a Windows PC then you don't need to worry about permissions. That's only when you copy the app to your sdcard or pull the app using Linux.
Going into recovery might not be needed. Pushing system apps while the phone is running can cause some nasty bugs so I always use recovery just to play it safe. You'll need to reboot most of the time anyway to see the changes you've made.
Instead of pushing, you could make a flashable zip. As an amazing coincidence, Tickle My Android can do that too.
Ticklefish said:
Well, I am a bit on the busy side.... I assume you didn't try my tool then?
To do this manually, you need to first recompile your apk after you've done all your changes. You already know this bit.
Then:
Make a copy of the old apk
Use 7zip to open both the copy and the recompiled apk
Drag the 'res' folder from the recompiled apk to the copy
Close the copy
Extract 'resources.arsc' from the recompiled apk
Add 'resources.arsc' to the copy, selecting 'STORE' compression
Close the recompiled apk
Open the copy and check that resources.arsc has the same size and packed size
Reboot the phone and go into recovery
Mount the /system partition
Push the apk straight to the right folder
Unmount the /system partition
Reboot the phone
Wait for it all to load
Wait a bit longer
Wait a bit longer still
And you're done.
If you've pulled the app from the phone to a Windows PC then you don't need to worry about permissions. That's only when you copy the app to your sdcard or pull the app using Linux.
Going into recovery might not be needed. Pushing system apps while the phone is running can cause some nasty bugs so I always use recovery just to play it safe. You'll need to reboot most of the time anyway to see the changes you've made.
Instead of pushing, you could make a flashable zip. As an amazing coincidence, Tickle My Android can do that too.
Click to expand...
Click to collapse
Thank you brother i will try it
and yes i have your tool too, it helped me to restore system fonts when i messed with it & had a bootloop:victory:
Great tool:good:
BTW can i use winrar instead of 7zip?
Where is 'STORE' compression can be found in winrar?
How to check that resources.arsc has the same size ( same size compared to with file? ) and packed size?
piousheart said:
Thank you brother i will try it
and yes i have your tool too, it helped me to restore system fonts when i messed with it & had a bootloop:victory:
Great tool:good:
BTW can i use winrar instead of 7zip?
Click to expand...
Click to collapse
Excellent. I'm glad it helped.
Technically, you could use any archival program but it has to be one that lets you add files to an archive without compressing them. I find 7zip to be fairly quick and user-friendly. Plus, it's free which is always a good thing.
Ticklefish said:
Excellent. I'm glad it helped.
Technically, you could use any archival program but it has to be one that lets you add files to an archive without compressing them. I find 7zip to be fairly quick and user-friendly. Plus, it's free which is always a good thing.
Click to expand...
Click to collapse
Where is 'STORE' compression can be found in winrar?
How to check that resources.arsc has the same size ( same size compared to with file? ) and packed size?
piousheart said:
Where is 'STORE' compression can be found in winrar?
How to check that resources.arsc has the same size ( same size compared to with file? ) and packed size?
Click to expand...
Click to collapse
I don't know. I don't even know if winrar can do it. That's why I suggested using 7zip instead.
To check sizes, just open the app (again, this is using 7zip) and look at the numbers to the right of resources.arsc. One is the original size of the file, the other is the size it's been compressed to. These need to be the same.
Ticklefish said:
I don't know. I don't even know if winrar can do it. That's why I suggested using 7zip instead.
To check sizes, just open the app (again, this is using 7zip) and look at the numbers to the right of resources.arsc. One is the original size of the file, the other is the size it's been compressed to. These need to be the same.
Click to expand...
Click to collapse
Leme have my hands on some app..
Edit : I tried this but when ever i put it back to sdcard and look at it the app loses its icon ( just a green android logo ) and when i put it in syste\app with proper permission & then restart it doesn't install and even i tried to install as normal apk then it says parse problem..
What i am doing wrong i followed the same procedure above & also the size of resources is same.
piousheart said:
Leme have my hands on some app..
Edit : I tried this but when ever i put it back to sdcard and look at it the app loses its icon ( just a green android logo ) and when i put it in syste\app with proper permission & then restart it doesn't install and even i tried to install as normal apk then it says parse problem..
What i am doing wrong i followed the same procedure above & also the size of resources is same.
Click to expand...
Click to collapse
I got your pm asking me to reply to this. I do most of my android modding stuff during spare moments at work because I don't have the time at home so I'd have gotten round to answering this in time.
I'm not sure what you're doing wrong here. Since you're got my tool installed, try using that first. If that works, then we know that there's something going wrong with the manual procedure and we can fix it.
If it doesn't work, then there's something wrong with the mod you're doing and we need to fix that instead.
Ticklefish said:
I got your pm asking me to reply to this. I do most of my android modding stuff during spare moments at work because I don't have the time at home so I'd have gotten round to answering this in time.
I'm not sure what you're doing wrong here. Since you're got my tool installed, try using that first. If that works, then we know that there's something going wrong with the manual procedure and we can fix it.
If it doesn't work, then there's something wrong with the mod you're doing and we need to fix that instead.
Click to expand...
Click to collapse
Okay thanks..
So i tried to mod even after knowing that it wont work as before..
So what i did in DefaultThemes.apk is edited the Androidmanifest & string files to change the name & nothing else
is i am doing it editing wrong file and yes how can i use your tool for this?
Originally Posted by Ticklefish<br />
I got your pm asking me to reply to this. I do most of my android modding stuff during spare moments at work because I don't have the time at home so I'd have gotten round to answering this in time.<br />
<br />
I'm not sure what you're doing wrong here. Since you're got my tool installed, try using that first. If that works, then we know that there's something going wrong with the manual procedure and we can fix it.<br />
If it doesn't work, then there's something wrong with the mod you're doing and we need to fix that instead.
Click to expand...
Click to collapse
<br />
<br />
Okay thanks..<br />
So i tried to mod even after knowing that it wont work as before..<br />
So what i did in DefaultThemes.apk is edited the Androidmanifest & string files to change the name & nothing else<br />
is i am doing it editing wrong file and yes how can i use your tool for this?
Click to expand...
Click to collapse
To be honest, I don't know how to change the name of an app. It's something I've never done before.
I suspect that you've gotten the mod wrong somewhere but unfortunately I can't advise on where that could be.
Sorry, mate.
Question:
I'm trying to add toggles in statusbar editing SystemUI.apk following this porting guide. I ported toggle on ICS but to do this in JB I have to add two lines in AndroidManifest.xml.
Once I edited AndroidManifest.xml when I recompile SystemUI.apk with edited file I corrupt original signature and at boot OS do not load SystemUI.apk, so it do not work in the rom, any help?
It can be done because an user in this thread done it but i'm unable to do.
Answer:
Ok, after more then an year i answered at my question by myself.
Editing the AndroidManifest.xml we will corrupt the signature and for this the edited apk will not be loaded at system boot. The proposed solutions are disable the signature check in the services.jar or resign every apk in the rom but these are not the only solutions.
After editing the AndroidManifest.xml in a system's apk we can check the edited apk's signature in .apk/META-INF/CERT.RSA (keytool -printcert -v -file .apk/META-INF/CERT.RSA) and re-sign every system apk that has its same signature.
Here a detailed article on my blog.
I am already using the Brazilian version OTA Blur_Version.982.124.17.XT910.Brasil.en.BR which when I compile the thumbs HR GPS and Mobile Data
My problem is that I think for most CDMA roms present here at XDA, this conflicts with something in the GSM file here.
So far I have not found too that conflict or error.
All help is welcome.
Mentor.37 said:
I'm trying to add toggles in statusbar editing SystemUI.apk following this porting guide. I ported toggle on ICS but to do this in JB I have to add two lines in AndroidManifest.xml.
Once I edited AndroidManifest.xml when I recompile SystemUI.apk with editet file I corrupt original signature and at boot OS do not load SystemUI.apk, so it do not work in the rom, any help?
It can be done because an user in this thread done it but i'm unable to do.
Click to expand...
Click to collapse
Correct. It will probably only boot on your running rom, not in a ROM.zip. Possibly a few options..
1. Edit your services.jar to disable system signature checks.. Google or search xda for it - not sure of effectiveness or compatibility with JB.
2. Re-sign all apks (maybe jars too? Not certain) - the ones that are not updated in Play Store (or those with matching signature dates in the apks) - never actually did it, but have heard of others using this method.
3. This one's a guess, and I just thought of it.. Switch out the SystemUI after install and first boot with a script or zip.. Might not even work though.. Not sure.
4. Build from source.
5. Figure out a way to do it without editing the AndroidManifest..
Sorry, never tried to do the toggle mod on JB yet..
Sent from my MB865 using xda app-developers app
I edited AndroidManifest.xml and if I use the original signature, it will work provided the ROM has booted at least once...but I don't like that...so I made a script which re-signs all system and framework apks (except gapps stuff or those published in market)...it will now then work right away after a clean flash...
alteredlikeness said:
Correct. It will probably only boot on your running rom, not in a ROM.zip. Possibly a few options..
1. Edit your services.jar to disable system signature checks.. Google or search xda for it - not sure of effectiveness or compatibility with JB.
2. Re-sign all apks (maybe jars too? Not certain) - the ones that are not updated in Play Store (or those with matching signature dates in the apks) - never actually did it, but have heard of others using this method.
3. This one's a guess, and I just thought of it.. Switch out the SystemUI after install and first boot with a script or zip.. Might not even work though.. Not sure.
4. Build from source.
5. Figure out a way to do it without editing the AndroidManifest..
Sorry, never tried to do the toggle mod on JB yet..
Sent from my MB865 using xda app-developers app
Click to expand...
Click to collapse
I tried on my running rom, i tested it but at boot time os do not load it or it crashs.
Can you explain me the step 3?
Ryuinferno said:
I edited AndroidManifest.xml and if I use the original signature, it will work provided the ROM has booted at least once...but I don't like that...so I made a script which re-signs all system and framework apks (except gapps stuff or those published in market)...it will now then work right away after a clean flash...
Click to expand...
Click to collapse
I know this but i would not re-sign all system and framework apks.
I would do as this user did.
Err...I don't get it... what he did? It's about odexed mods...
He modded too SystemUI.apk to add toggles in statusbar following the porting guide that i posted above and to do this on JB he added in the AndroidManifest.xml this two lines:
<uses-permission android:name="android.permission.WRITE_SECURE_SETT INGS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
without lose original signature.
Yea... that's what I meant... Edit AndroidManifest.xml and retain original sig...but you must apply it AFTER at least after a single boot...or else, factory reset and the statusbar will be gone...
I did this.
I edited AndroidManifest.xml retaining original signature and i applied it after a lot of boot with original SystemUI.apk but OS wont load edited SystemUI.apk; If i try resign it OS loads SystemUI bat it crashs.
Hmm...you decompiled and did the edits, then recompile right? And kept the original META-INF folder? Sometimes, it might be caused by other mods you have done in conjunction...
Mentor.37 said:
I did this.
I edited AndroidManifest.xml retaining original signature and i applied it after a lot of boot with original SystemUI.apk but OS wont load edited SystemUI.apk; If i try resign it OS loads SystemUI bat it crashs.
Click to expand...
Click to collapse
Are you sure your edits you made to the SystemUI are working?
Like, did you flash the SystemUI after adding the toggle mod, but before editing the AndroidManifest (so you would have the two broken toggles) - or it has never booted with your edited apk?
Sent from my MB865 using xda app-developers app
Ryuinferno said:
Hmm...you decompiled and did the edits, then recompile right? And kept the original META-INF folder? Sometimes, it might be caused by other mods you have done in conjunction...
Click to expand...
Click to collapse
Yes, i kept the original META-INF folder.
I will retry tomorrow.
alteredlikeness said:
Are you sure your edits you made to the SystemUI are working?
Like, did you flash the SystemUI after adding the toggle mod, but before editing the AndroidManifest (so you would have the two broken toggles) - or it has never booted with your edited apk?
Sent from my MB865 using xda app-developers app
Click to expand...
Click to collapse
Yes, I'm sure my edits are working because i tested SystemUI.apk with only toggle mod without AndroidManifest.xml edited and it works, i have toggles but SystemUI force close when I use gps and data toggles so to solve this problem i have to edit AndroidManifest.xml .
Mentor.37 said:
Yes, I'm sure my edits are working because i tested SystemUI.apk with only toggle mod without AndroidManifest.xml edited and it works, i have toggles but SystemUI force close when I use gps and data toggles so to solve this problem i have to edit AndroidManifest.xml .
Click to expand...
Click to collapse
Are you making a whole ROM.zip?
Or.. You just want to make flashable zip packages with the mods?
If a ROM, then sounds like you should try this:
Ryuinferno said:
I edited AndroidManifest.xml and if I use the original signature, it will work provided the ROM has booted at least once...but I don't like that...so I made a script which re-signs all system and framework apks (except gapps stuff or those published in market)...it will now then work right away after a clean flash...
Click to expand...
Click to collapse
Great idea, btw..
Sent from my MB865 using xda app-developers app
what i have to try? to resign all system app?
The big problem is that you do not edit the Manifest because FC and the GPS data, since when the reissues manifest the systemui for working.
Provisionally decided to give this way:
In quickpanel_quick_settings Layout folder, removed the GPS and DATA lines and rearranged the order of the toggles then went on QuickPanel smali folder and deleted the smalis working with the same, recompiled and replace the modified files inside the original apk using 7zip .
Most wanted GPS and data working.
Hugs.
alteredlikeness said:
1. Edit your services.jar to disable system signature checks.. Google or search xda for it - not sure of effectiveness or compatibility with JB.
Click to expand...
Click to collapse
This is working very well on JB
Here's a little tutorial: http://forum.xda-developers.com/showthread.php?t=1698352 :laugh:
niaboc79 said:
This is working very well on JB
Here's a little tutorial: http://forum.xda-developers.com/showthread.php?t=1698352 :laugh:
Click to expand...
Click to collapse
Thanks buddy,
yes I am now with 8 shortcuts on the status bar :good:
Why take such a pain
Just use XPOSED framework mods
Sent from my GT-S5302 using Tapatalk 2
Mentor.37 said:
what i have to try? to resign all system app?
Click to expand...
Click to collapse
Have you solved your problem????
I have the same problem, i have to edit Framework-res.apk "androidmanifest.xml" but after i recompile and replace on the path, i have the same problem.
In my situation i don't have a boot because the framework error give me the unable to boot, but i have tried with other app (settins.apk for exemple), and after the boot my settings.apk is not installed on the smartphone.
Someone can tell me what's the correct method to edit the "androidmanifest.xml"?????
cuvetto said:
Have you solved your problem????
I have the same problem, i have to edit Framework-res.apk "androidmanifest.xml" but after i recompile and replace on the path, i have the same problem.
In my situation i don't have a boot because the framework error give me the unable to boot, but i have tried with other app (settins.apk for exemple), and after the boot my settings.apk is not installed on the smartphone.
Someone can tell me what's the correct method to edit the "androidmanifest.xml"?????
Click to expand...
Click to collapse
The problem is not with mainfest
It's the signature that's causing the issue sign system apks with system signature using DIXDA kitchen more on this in the kitchen thread
Sent from my GT-S5302 using Tapatalk 2
So, I managed to find out where the default homepage setting is located, but I couldn't seem to recompile my cooked browser package without ending up with either the app not showing up on the launcher, or initially showing up but disappears on reboot. It's the AOSP one found on an Allwinner A13 tab, and I wanted to change the system homepage to Google instead of the Manta website.
I already tried clearing the dalvik caches as what Fsebentley suggested, but it didn't seem to work.
Can anyone point me as to how can I properly edit this app using APKtool or the APK Multi-Tool?
blakegriplingph said:
Can anyone point me as to how can I properly edit this app using APKtool or the APK Multi-Tool?
Click to expand...
Click to collapse
Assuming you've edited it correctly have you given the app the right permissions?
Yep, permissions appear to be correct. Same with ownership.
EDIT: Mucking around with Virtuous Ten Studio seemed to do the trick, idk why. I've done what's on the tutorial with the manual, commandline-based methods, but all I get is a browser app that doesn't show up on the launcher after a restart.
blakegriplingph said:
Yep, permissions appear to be correct. Same with ownership.
EDIT: Mucking around with Virtuous Ten Studio seemed to do the trick, idk why. I've done what's on the tutorial with the manual, commandline-based methods, but all I get is a browser app that doesn't show up on the launcher after a restart.
Click to expand...
Click to collapse
VTS sometimes has problem with signatures. That may be the issue. You can decompile and recompile it directly via apktool.
See the link in Xperienced signature for tutorial of apktool
And this for apk multitool
http://forum.xda-developers.com/showthread.php?t=2326393
Thing is, the browser worked properly when I used virtuous instead of APKTool.
blakegriplingph said:
Thing is, the browser worked properly when I used virtuous instead of APKTool.
Click to expand...
Click to collapse
Oh. Then there must be a problem that it wouldn't have been signed in APK MultiTool.
:good:
iamareebjamal said:
Oh. Then there must be a problem that it wouldn't have been signed in APK MultiTool.
:good:
Click to expand...
Click to collapse
You mean like do I have to sign it manually or something?
EDIT: Seems like it had something to do with signing things or something. I tried manually doing a signapk job using the JAR and certs bundled with Virtuous and zipaligned it, and it now seems to work.
Now my question is that would a self-generated cert work on a system APK? I.e. the one that you just churned out on OpenSSL?
Hi guys,
my father recently bought a so-called China phone (Doogee X5max) that comes with several malwares right out of the box.
Most of the are quite easy to remove, two of them give me the creeps.
I am no pro when it comes to Android and so I stumbled across several problems.
First of all I managed to remove the malware from Settings.apk and SystemUI.apk by decompiling, editing and odexing the files and compiling them again. Easy going...
So far so good.
Now for the hard part.
How to get those files back into the ROM? Since those files need to be resigned with the same certificate that was used signing all the other system files I am kind of stuck here. Resigning the files with Zipsigner (using all possible types, "platform", etc.) did not work which leads me to the conclusion that Doogee did not use the AOSP certificates to sign their ROM. Am I right?
The only possible solution seems to be creating a custom ROM out of the Doogee X5max stock ROM. Is this correct?
I googled a lot but have not found up-to-date or understandable manuals/instructions on how to do this.
Can someone please help me or give me a hint at least?
Thanks in andvance
deomaki
deomaki said:
Hi guys,
my father recently bought a so-called China phone (Doogee X5max) that comes with several malwares right out of the box.
Most of the are quite easy to remove, two of them give me the creeps.
I am no pro when it comes to Android and so I stumbled across several problems.
First of all I managed to remove the malware from Settings.apk and SystemUI.apk by decompiling, editing and odexing the files and compiling them again. Easy going...
So far so good.
Now for the hard part.
How to get those files back into the ROM? Since those files need to be resigned with the same certificate that was used signing all the other system files I am kind of stuck here. Resigning the files with Zipsigner (using all possible types, "platform", etc.) did not work which leads me to the conclusion that Doogee did not use the AOSP certificates to sign their ROM. Am I right?
The only possible solution seems to be creating a custom ROM out of the Doogee X5max stock ROM. Is this correct?
I googled a lot but have not found up-to-date or understandable manuals/instructions on how to do this.
Can someone please help me or give me a hint at least?
Thanks in andvance
deomaki
Click to expand...
Click to collapse
After recompiling your modded apk, unzip it and the original apk, replace everything in the original apk with what is in your modded apk except meta-inf and Android manifest. Zip back up, change it from .zip to .apk. That is what you use to replace your system apk. That only goes for system apks. You sign the others.
Tulsadiver said:
After recompiling your modded apk, unzip it and the original apk, replace everything in the original apk with what is in your modded apk except meta-inf and Android manifest. Zip back up, change it from .zip to .apk. That is what you use to replace your system apk. That only goes for system apks. You sign the others.
Click to expand...
Click to collapse
Hi,
Thanks for your reply.
Before giving this a chance, just one question: By "Android manifest" I suppose you mean manifest.ms?
Kind regards
deomaki
deomaki said:
Hi,
Thanks for your reply.
Before giving this a chance, just one question: By "Android manifest" I suppose you mean manifest.ms?
Kind regards
deomaki
Click to expand...
Click to collapse
I have never seen a manifest.ms but I suppose so if that is what is in yours.
Tulsadiver said:
I have never seen a manifest.ms but I suppose so if that is what is in yours.
Click to expand...
Click to collapse
The manifest.ms resides inside the META-INF folder...
Trying to installl the so manipulated original apk via adb results in [INSTALL_PARSE_FAILED_NO_CERTIFICATES].
Am I supposed to uninstall the original settings.apk from the device first (which I did) or just replace the original apk on the device with the newly created one and delete the odex in oat/arm?
Thanks in advance
deomaki
deomaki said:
The manifest.ms resides inside the META-INF folder...
Trying to installl the so manipulated original apk via adb results in [INSTALL_PARSE_FAILED_NO_CERTIFICATES].
Am I supposed to uninstall the original settings.apk from the device first (which I did) or just replace the original apk on the device with the newly created one and delete the odex in oat/arm?
Thanks in advance
deomaki
Click to expand...
Click to collapse
You leave the original meta-inf like I said. You use the original apk replacing everything in it with the modded stuff, res, resource.arsc if any and any classes.dexs. Don't worry about any oat folders.
Tulsadiver said:
You leave the original meta-inf like I said. You use the original apk replacing everything in it with the modded stuff, res, resource.arsc if any and any classes.dexs. Don't worry about any oat folders.
Click to expand...
Click to collapse
Hi Tulsadiver,
I followed your advice and replaced everything except the menta-inf folder from the original apk. Then I copied over my modded apk and restarted the device (just to be sure).
After rebooting the Settings icon was gone from my homescreen and the app drawer, leaving me unable to start the settings.
Tapping the seetings.apk using a file browser left me with the error, that there was an error while parsing...
Regards
deomaki
deomaki said:
Hi Tulsadiver,
I followed your advice and replaced everything except the menta-inf folder from the original apk. Then I copied over my modded apk and restarted the device (just to be sure).
After rebooting the Settings icon was gone from my homescreen and the app drawer, leaving me unable to start the settings.
Tapping the seetings.apk using a file browser left me with the error, that there was an error while parsing...
Regards
deomaki
Click to expand...
Click to collapse
I actually said, everything but the original meta-inf folder and original Android manifest....
Steps
Decompile apk.
Edit your apk
Recompile apk.
Unzip both modded and original apk
Delete everything in the original apk except meta-inf and Android manifest.
Copy everything from modded apk over to original apk except for the meta-inf and Android manifest.
Zip it back up, change it from .zip to .apk.
Copy this apk to the root of your phone.
Change permission to 0644
Copy/Move to replace the existing apk.
Reboot
Tulsadiver said:
I actually said, everything but the original meta-inf folder and original Android manifest....
Steps
Decompile apk.
Edit your apk
Recompile apk.
Unzip both modded and original apk
Delete everything in the original apk except meta-inf and Android manifest.
Copy everything from modded apk over to original apk except for the meta-inf and Android manifest.
Zip it back up, change it from .zip to .apk.
Copy this apk to the root of your phone.
Change permission to 0644
Copy/Move to replace the existing apk.
Reboot
Click to expand...
Click to collapse
Hi again,
thanks for your efforts by the way
That's exactly what I did except taking the original androidmanifest.xml since I had to change some things in it...
Will the whole process be not applicable then?
Regards
deomaki
deomaki said:
Hi again,
thanks for your efforts by the way
That's exactly what I did except taking the original androidmanifest.xml since I had to change some things in it...
Will the whole process be not applicable then?
Regards
deomaki
Click to expand...
Click to collapse
Unclear. I've seen some doogee posts on here. Maybe try one of those?
Tulsadiver said:
Unclear. I've seen some doogee posts on here. Maybe try one of those?
Click to expand...
Click to collapse
mmmh, maybe if will have to find out all system apks that use the same certificate framework-res.apk does and resign them with a new cert including the modded system.apk.
I was trying to find a way around that, but maybe I have to go the hard way...
I think that should solve my problem, what do you think?
Regards
deomaki