How would I go about making the launcher in my regular Ion ROM have 5 icons across instead of the normal 4? If this isn't in the correct forum, please move.
if you had the source code for ion's launcher it would be as simple as editing the source code of the launcher.apk and recompiling, signing and copying onto the device. You could also compile the source code from the cupcake trunk and try to use that one although im not sure if it would work due to framework differences between the ion and the cupcake branch.
Another way to get this to work would be to dissassemble the classes.dex file using baksmali (by JF), editing it, reassembling using smali (again by JF), signing it and pushing it to the phone. I have tried this method with the Rogers build im using at the moment to no avail, as everything just force closes on boot :S.
Good luck
Related
I'm trying to get HTC's WorldClock.apk to work on CM 6.1 RC2 (Incredible). I de-odexed and repackaged the APK, and it installs fine. However, when I try to run it, it force-closes because it can't find what appears to be a shared HTC class.
I found that the class in question lives on the original HTC system image in /system/framework/com.htc.framework.jar. So, I de-odexed and repackaged that JAR, but simply putting it in the /system/framework/ folder did not resolve the original WorldClock FC.
Next, I figured that updating the BOOTCLASSPATH in init.rc to include the new jar would fix this. I followed the instructions at [h t t p://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images] to try building a new boot image with an updated init.rc, but I can't get mkbootimg to work. I can't compile a version of it from source, and the only compiled ones I can find give me the following error when I execute them, regardless of what arguments I specify:
mkbootimg: 1: Syntax error: "(" unexpected
I'm starting to wonder if I'm going about this the right way. Is there an easier way to get this to work?
I thought about trying to "import" or "merge" the HTC framework jar and resources APK into the WorldClock.apk, but I don't know how to do this (I would have to merge the manifests and resources, etc.)
Does anyone have ideas?
In general, I like having a modded system, but there are definitely some HTC apps/widgets that I liked, and the clock was one of them. It would be nice to find a technique for getting these apps to work under CM.
Thanks in advance,
Steven
Unlikely you'll ever get this to work. The HTC widgets only work when you have the Sense launcher running. So even if you have a sense rom and switch to ADW or Launcher Pro your HTC widgets will not be available.
Thanks for the info. Does the same apply for regular apps (i.e. not widgets)?
I am working on combining Draya's Red GB theme and stock OTA. I have run into trouble trying to make the 10% battery increments actually display the images. I was wondering if someone could offer assistance.
I have tried decompiling framework-res.apk with apk manager and recompiling it with the changes in stat_sys_battery.xml. Although for some reason when I recompile and install via update.zip I bootloop.
This update.zip currently works perfectly, although it only displays battery in increments of 20%.
Here is a link to the themes current update.zip. http://db.tt/LV6Y9i9
Sent from my DROIDX using Tapatalk
Are u recompiling as a system apk? If you try to recompile with just an apktool command for instance as if it
were an app, it wont recompile correctly.
Sorry if you already knew this, not trying to sound condescending in any way. Just ran into this same issue myself a while ago.
Sent from my DROIDX using XDA App
I actually didn't. I have just started trying to learn to do all if these modifications.
I have learned that I can do hex editing to change colors and change the .png's but I am still working on learning to compile my own .9.png's and trying to figure out how to decompile and recompile so that I can modify the xml in standard text vs. hex because I would have no idea how to add my own text to an xml while still in hex form and I believe I read somewhere that if you change the file to much you need to include a new resources file or something.
Do you have any directions in decompiling and recompiling system apk's so that they are editable?
The way I was trying was with apk manager 4.9 as a system apk I believe. I am thinking option 11 or option 9 if I remember right...
I had also switched the apktool version to 1.3.1 because of the issue in 1.3.2 that I read on the apktool page.
Sent from my DROIDX using Tapatalk
I've looked around for some good tutorials on decompiling APKs using APKTool but haven't been able to get a few questions answered. Hoping someone can guide me with this process a bit since I'm really new at it.
A few things first: I am running CM 7.1 on a Droid Incredible (orig) and I'm also on Windows, not Linux. I'm looking to make some changes to the code of an APK and have APKtool downloaded. Questions I have so far are:
1) Do I need to use the CM 7.1 framework-res.apk file for any decompiling / /recompiling work on this 3rd party APK? Or can I do all the work without it? No one seems to have a clear answer on that and I'm not sure exactly what the framework-res.apk is for exactly.
2) After I decompile an APK and make code changes to a SMALI file, is there anything I need to do special before running the compile command?
3) After I have a newly compiled APK, what do I need to do to make this work on my phone? If I do nothing, the overall file size of the compiled APK seems much smaller than the original one that I decompiled so it seems like something is wrong. Plus it won't install. I saw one video where the newly compiled APK is renamed to .ZIP and the contents are put into the ORIGINAL APK (also renamed to .zip), overwriting all the original contents. Is this required?
4) I've also read that APKs need to be signed to install on Android. Is this correct? I found "SignApk" online which seems like it just asks you to rename your APK to app.apk and it does the signing by running a .BAT file. Is that all I have to do before installing the APK on my phone?
Would really appreciate any help on this. Or if there's a great tutorial out there on doing this, I'd be happy to read through.
Thanks for any help in advance!
I want to know these too! Hope someone helps
Hi all -
I'm using a GSM Galaxy Nexus with stock Android 4.1.1, and I'm trying to reduce the dim level, which kills my eyes at night. This is determined by a value "config_screenBrightnessDim" found in framework-res.apk. (In the source tree, it is found at frameworks/base/core/res/res/values/config.xml.)
I tried using apktool to decompile/recompile the stock framework-res.apk, but it doesn't seem to work with Jelly Jean. So, I instead attempted to replace the stock framework-res.apk with one I compiled from AOSP. When I do this, I get stuck at the boot animation. I assume this has something to do with the fact that my AOSP framework-res.apk is signed with a different certificate than the stock one. However, I also noticed that my AOSP file was ~10MB, while the stock one is only ~9.8MB, so there could be some other issue.
Any help with this would be greatly appreciated. Thanks!
(PS: Another modification I made was successful: I replaced the stock audio.primary.tuna.so with one I built from AOSP with a higher maximum volume. So, I think I am at least replacing the files correctly!)
Don't sign the framework file. Leave it unsigned and just move the cert from the stock framework. Also I would be interested in your audio boost file if you wouldn't mind sharing.
Sent from my Galaxy Nexus using Tapatalk 2
Thanks for the advice –*I'll try it out. I'll "unsign" my framework-res.apk by removing all the META-INF files in it. If it doesn't work, do you know a way to find the logs from the failed boot? Also, is there anything I should do (wipe cache, etc) after copying over the new framework-res.apk?
I've attached a zip containing three versions of the library audio.primary.tuna.so, found at /system/lib/hw/audio.primary.tuna.so: orig, loud, and aosp. "orig" was pulled from my phone with stock 4.1.1, "aosp" was built from aosp (the command you need is "make audio.primary.tuna"), and "loud" was made from aosp with the "device/samsung/tuna/audio/audio_hw.c" file altered to change the volume. Enjoy!
Geo411m said:
Don't sign the framework file. Leave it unsigned and just move the cert from the stock framework. Also I would be interested in your audio boost file if you wouldn't mind sharing.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
This worked! Thanks so much!
Great! Glad it worked for you. Also thanks for the Audio file.
How do you build just framework-res.apk from AOSP?
I've followed a tutorial and built the whole system, but I don't know where fraemwork-res.apk is built from in the source or how to only build it.
Edit:
figured out to build specific packages:
make (package name)
...omg
If you figure out how to use a framework-res.apk built from AOSP to replace one on the stock rom, let me know. I never did get that method to work.
michaelmotes said:
How do you build just framework-res.apk from AOSP?
I've followed a tutorial and built the whole system, but I don't know where fraemwork-res.apk is built from in the source or how to only build it.
Edit:
figured out to build specific packages:
make (package name)
...omg
Click to expand...
Click to collapse
There are some (most) things that you can modify in framework-res.apk and just copy over the old META-INF.
There are some things (like AndroidManifest.xml) that you can not modify and use the old META-INF.
The most radical solution is to resign your entire system with a new signature.
If the particular APK (not FW-R) does not use a sharedid, you might get away with just signing that.
(The above observations might be different on different versions Android.)
First I want to say thanks in advance for anyone who might be able to help - my guess is I'm missing something stupid, but I'm having some issues working it out. I've recently ported a Sense 4.1 ROM from a VilleC2 RUU to my device (HTC Holiday/Vivid) and have been working out some bugs. One of them was readding the hardware menu button functionality in Rosie. After some battling, I added the proper methods in the .smali, flashed it, menu button worked. Awesome, or so I thought. I baked the new Rosie.apk into the ROM, full wiped, flashed, and Rosie/Sense crash immediately after setup. So I full wiped, flashed the previous version of the ROM and all was well. Flashed the fixed Rosie.apk and all was even better. My question is what am I doing that the new Rosie.apk won't install properly from a full wipe/flash? Here are all the things I've tried that work/don't work...
First, what works..
Using VTS - if I make the edits and sign with either a test key, or the original key, the fix is applied as long as it's installed on top of an already working/stock Rosie (whether it's a dirty flash from a full build, or a standalone recovery flashable package)
What doesn't work..
Baking the "fixed" apk into the ROM and flashing after a full wipe. This results in Rosie/Sense crashing immediately after setup.
Trying to flash/install the fixed apk over the flashed ROM that had it baked in
I've tried using APKTool to decompile/edit/recompile, both using the newly outputted apk, as well as replacing classes.dex in the original .apk with the newly edited one, and this just results in Rosie crashing (whether it's baked in or installed on top of a working Rosie)
I've also tried the above with the outputted classes.dex from VTS (injecting into the original Rosie.apk), which also results in Rosie crashing.
Fixing permissions and/or wiping cache and dalvik doesn't fix the crashes.
While I am relatively new at this, I somewhat know my way around .apks and have been editing them without (too many) issues for a while now, but this one has me stumped...What am I doing wrong???
Edit: Maybe this was better in Chef Central > Android? If it needs to be moved, please do
Edit 2: I was just being stupid - while trying to not break the signature I was continually breaking the signature. This thread can be closed. Method used to get it to flash correctly with the ROM (I guess it helps to know how to PROPERLY use the tools available to you):
Decompile with apktool
Make edits
Build with apktool
Put META-INF folder and AndroidManifest.xml frin the original apk into /build/apk/
Build with apktool again
Use apk from /dist/