[Q] Modded Camera.apk hardkeys - Verizon Droid Charge

Got the modded Camera.apk from Here. I changed my hardkey Search button to function like a Menu key (my menu hardkey won't work properly). I liked the search key as a snapshot key for the camera but now with me changing 217 "SEARCH" to MENU" it doesn't work.
I downloaded APKTool and decompiled modded .apk. Now the only problem is I can't find where to change the key to take a snapshot with "MENU" pressed. I have been looking through the .smali files and not having any luck. Menu key as far as I have seen has no function in the camera app anyways so this shouldn't be a problem.
Last question I would have (which I could probably search) would be how to take the decompiled .apk and compile it back to .apk.

Is the code for the menu button 217 or is that independent of the button?
Sent from my SCH-I510 using xda premium

Within /system/usr/keylayout/qwerty.kl "key 217 SEARCH" I changed to "key 217 MENU" also I changed /system/usr/keylayout/s3c-keypad.kl "key 217 SEARCH" to "key 217 MENU".
That is how I got Search button to open Menu.

I'll take a look for you. It probably won't take too long.

Yeah it should just be changing the key event code from the search key to the menu key in a few places.

dwitherell said:
Yeah it should just be changing the key event code from the search key to the menu key in a few places.
Click to expand...
Click to collapse
The problem for me is I can't find those few places. lol Searching through all these .smali files I think I'm gonna need my search button back lol.
Edit: I opened all of the files in NotePad++ and did a search for "search" and found several items but I don't know what to change or leave.
I think what I need to change is in AbstractCameraActivity.smali

Enlightened_Rogue said:
The problem for me is I can't find those few places. lol Searching through all these .smali files I think I'm gonna need my search button back lol.
Click to expand...
Click to collapse
I'm sure substanceD will get it for ya, but camera.smali and camcorder.smali are 2 at least. It'll be in the onkeyup and onkeydown event methods (just looked at this, but memory is a bit sketchy...)

dwitherell said:
I'm sure substanceD will get it for ya
Click to expand...
Click to collapse
As you see I don't mind doing the leg work, I'm not one of these beggers out there that just want someone to build a app just for me. Thanks for giving me some pointers. I'm just trying to learn as I go. New to modding phones (trying to get better).

Enlightened_Rogue said:
As you see I don't mind doing the leg work, I'm not one of these beggers out there that just want someone to build a app just for me. Thanks for giving me some pointers. I'm just trying to learn as I go. New to modding phones (trying to get better).
Click to expand...
Click to collapse
All right, let's see if I can be helpful without doing the work for you. The Android key codes are published here: http://developer.android.com/reference/android/view/KeyEvent.html. The smali files have the hex values for these key events without the extraneous zeros. For example, you'll notice that KEYCODE_POWER is sprinkled throughout the code as 0x1a. Try to find a block of code that refers to the common keys (power, search, menu, etc.) and see how it delegates them.

OK I replaced 0x54(Search) with 0x52(Menu) [14 instances] and then Compiled with APKTool. Moved Camera.apk to /system/app/ and now phone doesn't recognize Camera.apk. I restarted, tryed setting permissions to rw-r--r-- then restarting as well and still not being recognized.
Edit: Noticed when I moved your modded the permissions where rwxrwxrw- and it still showed up without restarting.

Enlightened_Rogue said:
OK I replaced 0x54(Search) with 0x52(Menu) [14 instances] and then Compiled with APKTool. Moved Camera.apk to /system/app/ and now phone doesn't recognize Camera.apk. I restarted, tryed setting permissions to rw-r--r-- then restarting as well and still not being recognized.
Edit: Noticed when I moved your modded the permissions where rwxrwxrw- and it still showed up without restarting.
Click to expand...
Click to collapse
Did you sign it (don't)? Also, there are some sound files in /res/raw that need to stay UNcompressed for things to work properly.

All I did to compile was from Here.
Code:
apktool b <directory of decoded apk>
Never compiled any apk before. How do you not sign it and not compress some of the resource files?
Edit: Just seen this at the bottem, but I'm using APKTool 1.4.3
idroid84 said:
Issues;
I noticed that while the new version 1.2 works great on the framework-res.apk file, it seems to have issues with other System/app files like Settings.apk,Phone.apk, etc. For these files use version 1.1.1.
Click to expand...
Click to collapse

Enlightened_Rogue said:
All I did to compile was from Here.
Code:
apktool b <directory of decoded apk>
Never compiled any apk before. How do you not sign it and not compress some of the resource files?
Edit: Just seen this at the bottem, but I'm using APKTool 1.4.3
Click to expand...
Click to collapse
Well the first part shouldn't be an issue I don't think. For the second - an apk is similar to a zip file. I would use something like jzip or winrar to extract out those sound files, delete them from the apk, then drop them back in using store or storage (i.e. no) compression. Though I am doubtful not doing this would cause the phone to not recognize the apk to be honest.

I opened the Original Modded .apk with 7zip moved the res files over just playing around waiting for a response and still no luck. Also I noticed while doing that the Modded on had a META-INF folder which I moved over to my Mod and after all that moved to phone /system/app and restarted phone still no Camera in App Drawer.
Original Mod I decompile: Camera 5-14-12
My Decomipled and editied:Camera - Menu Button

I was messing around with my phone and decided to install PBJ Kernel 0524. After installing that now Root Manager won't allow Mount R/W so now I can't change system files. I guess I'm stuck with what I got for now.
Edit: Complete noob moment... Went into CWM -> Mounted System -> Installed SU again. Now works. Back to working on Camera

Enlightened_Rogue said:
I was messing around with my phone and decided to install PBJ Kernel 0524. After installing that now Root Manager won't allow Mount R/W so now I can't change system files. I guess I'm stuck with what I got for now.
Edit: Complete noob moment... Went into CWM -> Mounted System -> Installed SU again. Now works. Back to working on Camera
Click to expand...
Click to collapse
Yeah the lost root is just a permissions thing - a number of ways to fix it, and installing su is definitely one of them. Glad you got that figured out.
I looked into this more - you changed too many 0x54s... not all of those were relevant to what you wanted (only 6 were). On top of that, only two of them were changing 0x54 to 0x52 (CamcorderRecordingMenu.smali) - the other 4 (2 in Camcorder.smali and 2 in Camera.smali) were simply changing the :sswitch_ value associated w/ 0x52 to that associated w/ 0x54.
Anyhoo - end result should now be power, menu, and search take pics/start video. Here's the apk - just rename to Camera.apk and push. If it doesnt show up right away and a reboot doesnt fix it, you could try to push in recovery, or dump it in a cwm-flashable zip and flash it. Hope it works for ya!

Thank you. I figured I probably changed too many. I just opened notepad++ and find/replaced in files. I was looking through but was having a difficult time tracing what was needed and was not. How did you compile just like I posted earlier? And how did you get META-INF and not compressing resources?

Enlightened_Rogue said:
Thank you. I figured I probably changed too many. I just opened notepad++ and find/replaced in files. I was looking through but was having a difficult time tracing what was needed and was not. How did you compile just like I posted earlier? And how did you get META-INF and not compressing resources?
Click to expand...
Click to collapse
I was lazy and used one of the gui-ized apktool approaches (apkmultitool). It took care of keeping things in order. After recompiling, I opened the apk in jzip, pulled out the oggs in /res/raw, deleted them from the apk, then put them back in and set compression to store. It should be noted that you could go about things without dealing with any of this - just pull out the classes.dex from the apk, use baksmali to decompile and smali to recompile, and place new classes.dex into the apk.
I take it the apk worked for you then?

Yes it worked perfectly! Thank you. Instead of just getting what I want then not saying anything I was decompiling yours and seeing what needed to be changed. Hopefully soon I will be able to to much much more. Just a little time devotion patients and people like you to help. Thank you so much!

Related

Need someone to compile an APK for me

Alright, so I decompiled the apk, edited the XML files I needed to. And now it won't compile. Keeps throwing java errors. Would someone be so kind to compile this for me?
This is a System APK so it needs to be compiled and signed. If you're curious or it needs extra files pulled from somewhere, it's the SystemUI.apk in the CM7 Droid nightly build 88.
Thanks!!
Here's what I need compiled:
http://mikelierman.com/SystemUI.apk.zip
0vermind said:
Alright, so I decompiled the apk, edited the XML files I needed to. And now it won't compile. Keeps throwing java errors. Would someone be so kind to compile this for me?
This is a System APK so it needs to be compiled and signed. If you're curious or it needs extra files pulled from somewhere, it's the SystemUI.apk in the CM7 Droid nightly build 88.
Thanks!!
Here's what I need compiled:
http://mikelierman.com/SystemUI.apk.zip
Click to expand...
Click to collapse
What did you use to decompile it? APK Manager from this thread?
http://forum.xda-developers.com/showthread.php?t=695701
Oh and once you compile it, you don't have to sign it because is a system app and not a regular app.
0vermind said:
Alright, so I decompiled the apk, edited the XML files I needed to. And now it won't compile. Keeps throwing java errors. Would someone be so kind to compile this for me?
This is a System APK so it needs to be compiled and signed. If you're curious or it needs extra files pulled from somewhere, it's the SystemUI.apk in the CM7 Droid nightly build 88.
Click to expand...
Click to collapse
What errors are you getting from apktool? It's going to be hard for someone else to compile an apk that has not been decoded by them and not knowing what files have been changed. Letting us know at least what .png or .xml files were modified would be a start but will work best if we could just figure out why you aren't able to build with your modifications.
The first thing I noticed from the zip you attached is that it's missing the apktool.yml file that should get created a package is decoded. Second, make sure to pull /system/framework/framework-res.apk so resources can be decoded/built properly. If you are using APK Manager, use option 10 to decode with framework-res.apk. If you are just using apktool run the command "apktool if framework-res.apk" before decoding.
mazdarider23 said:
Oh and once you compile it, you don't have to sign it because is a system app and not a regular app.
Click to expand...
Click to collapse
SystemUI.apk actually does get signed using the platform key. The easiest way to do so in my opinion is to use ZipSigner 2 on your phone. Also, once you've placed the modified SystemUI.apk into /system/app make sure it's permissions are rw-r--r--(chmod 644 /system/app/SystemUI.apk) and it's owner:group is root:root(chown 0:0 /system/app/SystemUI.apk). Next reboot to recovery, wipe dalvik-cache and cache, then reboot.
MongooseHelix said:
What errors are you getting from apktool? It's going to be hard for someone else to compile an apk that has not been decoded by them and not knowing what files have been changed. Letting us know at least what .png or .xml files were modified would be a start but will work best if we could just figure out why you aren't able to build with your modifications.
The first thing I noticed from the zip you attached is that it's missing the apktool.yml file that should get created a package is decoded. Second, make sure to pull /system/framework/framework-res.apk so resources can be decoded/built properly. If you are using APK Manager, use option 10 to decode with framework-res.apk. If you are just using apktool run the command "apktool if framework-res.apk" before decoding.
SystemUI.apk actually does get signed using the platform key. The easiest way to do so in my opinion is to use ZipSigner 2 on your phone. Also, once you've placed the modified SystemUI.apk into /system/app make sure it's permissions are rw-r--r--(chmod 644 /system/app/SystemUI.apk) and it's owner:group is root:root(chown 0:0 /system/app/SystemUI.apk). Next reboot to recovery, wipe dalvik-cache and cache, then reboot.
Click to expand...
Click to collapse
Well I'm glad you told me because little old me has been modifying system apps since the days of the nexus one and I've yet to sign one....I think is all depends on who's doing the modification...hahahaha....Good luck 0vermind on finding someone to compiling your systemui.apk!
mazdarider23 said:
Well I'm glad you told me because little old me has been modifying system apps since the days of the nexus one and I've yet to sign one....I think is all depends on who's doing the modification...hahahaha....Good luck 0vermind on finding someone to compiling your systemui.apk!
Click to expand...
Click to collapse
I'm not quite sure what to make of that comment...I certainly wasn't trying to step on your toes so I apologize if it came across that way. Just wanted to help avoid and rule out any issues that might come up. With APK Manager or by using 7zip, you can move the manifest and/or META-INF folder containing the signature from the original but to imply that system apps are not signed is incorrect.
I also think it is important that those messing with system apps understand that there are different keys used to sign apps. For anybody reading this that wants to figure out how certain packages are signed, here's a bit of an explanation. If we extract SystemUI.apk, we see a directory called META-INF. This holds the key/signature info. The key's serial number can be determined with the following command:
Code:
keytool -printcert -v -file SystemUI/META-INF/CERT.RSA | grep SerialNumber
You can check other apks/jars and noticing which have matching serial numbers, meaning they are signed with the same key...
platform key - SystemUI.apk, Settings.apk, Phone.apk, etc
shared key - Contacts.apk, UserDictionaryProvider.apk, etc
test key - Calendar.apk, DeskClock.apk, etc
google proprietary key - Vending.apk, Talk.apk, etc (including some market user apps like Maps, VoiceSearch, Docs)
MongooseHelix said:
I'm not quite sure what to make of that comment...I certainly wasn't trying to step on your toes so I apologize if it came across that way. Just wanted to help avoid and rule out any issues that might come up. With APK Manager or by using 7zip, you can move the manifest and/or META-INF folder containing the signature from the original but to imply that system apps are not signed is incorrect.
I also think it is important that those messing with system apps understand that there are different keys used to sign apps. For anybody reading this that wants to figure out how certain packages are signed, here's a bit of an explanation. If we extract SystemUI.apk, we see a directory called META-INF. This holds the key/signature info. The key's serial number can be determined with the following command:
Code:
keytool -printcert -v -file SystemUI/META-INF/CERT.RSA | grep SerialNumber
You can check other apks/jars and noticing which have matching serial numbers, meaning they are signed with the same key...
platform key - SystemUI.apk, Settings.apk, Phone.apk, etc
shared key - Contacts.apk, UserDictionaryProvider.apk, etc
test key - Calendar.apk, DeskClock.apk, etc
google proprietary key - Vending.apk, Talk.apk, etc (including some market user apps like Maps, VoiceSearch, Docs)
Click to expand...
Click to collapse
Thanks, I didn't know this! I'm glad there's people like you and mazdarider23 on this forum that know **** like this!!!

[MOD] jholtom's CRT animation on Screen Lock

jholtom said:
Hi, All,
I got it working for screen off only
The changes are in framework-res.apk
Attached is the apk for Prime 2.0.4 ONLY!
To Use:
remove the unsigned- part from the name and use root explorer or adb push to put it in system/framework/
and then reboot!
To do this mod to another rom:
Decompile using apktool or apkmanager (which utilizes apktool) and then...
find bools.xml in res/values of a decompiled framework-res and then find this line
Code:
<bool name="config_animateScreenLights">true</bool>
and change the true to false
save and recompile and push or use root explorer to apply the new file
Click to expand...
Click to collapse
I'm quoting and reuploading to this post in case anyone else wants to try it out.
Jholtom do you mind if I post this on RootzWiki as well, giving you full credit?
+1
Would be nice.
Nothing so far. I too have been looking.
http://forum.xda-developers.com/showthread.php?t=1267728
I know you already mentioned it but there's actually two apps
Sucesss!!!!!!!!!!!!!!!
Hi, All,
I got it working for screen off only
The changes are in framework-res.apk
Attached is the apk for Prime 2.0.4 ONLY!
To Use:
remove the unsigned- part from the name and use root explorer or adb push to put it in system/framework/
and then reboot!
To do this mod to another rom:
Decompile using apktool or apkmanager (which utilizes apktool) and then...
find bools.xml in res/values of a decompiled framework-res and then find this line
Code:
<bool name="config_animateScreenLights">true</bool>
and change the true to false
save and recompile and push or use root explorer to apply the new file
Made a stupid mistake!! I can't remember how to push the file using ADB and my Transformer is force closing like crazy hahaha. Can someone give me some quick instructions? Watched a couple videos but they're all different and not working. I've got ADB running, it's mounted, the .apk is in the ADB folder but I can't get it to push. Please help! Thanks so much!
EDIT: Nevermind. Also a stupid mistake haha, that was a close one.
Thanks for doing this jholtom, I've wanted this for a while as well!
awesoe works nice man ought to make a thread for it so people can find it... or edit this one...
Sent from my Optimus Prime Transformer
Nice work. Seems I have to choose between this or the battery percentage mod but not both.
Thanks jholtom . You should contact roach so he can have it built in the rom!
It works! Tha mate.
I dont really mind where it gets posted
Credit is always nice though
jholtom said:
Decompile using apktool or apkmanager (which utilizes apktool) and then...
find bools.xml in res/values of a decompiled framework-res and then find this line
Code:
<bool name="config_animateScreenLights">true</bool>
and change the true to false
save and recompile and push or use root explorer to apply the new file
Click to expand...
Click to collapse
Can't seems to find res/values (using apkmanager do I need to decompile or extract APK?)
^ decompile.
Sent from samsung vibrant
Alex9090 said:
^ decompile.
Sent from samsung vibrant
Click to expand...
Click to collapse
Thanks. Yeah finally figured how to decomplie. Changed the field from true to false. Just trying to see what i'm doing wrong cause after compiling it back it doesn't have the crt shut down
Theres some sort of setting that can apparently cause it to work about 7/8 of the time but not that other 1/8. I'm looking around to see what it is and how it can be resolved.
And just in case did you push or install with root explorer?
jholtom said:
Theres some sort of setting that can apparently cause it to work about 7/8 of the time but not that other 1/8. I'm looking around to see what it is and how it can be resolved.
And just in case did you push or install with root explorer?
Click to expand...
Click to collapse
I used Root Explorer, I'll try to push it to see if it's any better.
EDIT: I just compile again and it seems to be working better. Thank you.
Hi all! First off, thanks to jholtom for figuring this out. I have thrown this mod in my PCB Blue theme (beta testing only now), and confirm that it works, BUT only when on the homescreen. I.E. if you are in any other app, the CRT animation will not run. Switching back to the homescreen does allow it to work again though. Another trick (if you have the kb dock) is to hit the "LOCK" key (top-right) while in another app, and then the CRT animation appears to play on further on/off toggles, but without unlocking the screen.
Not sure what the cause/solution of that may be, but I did find this thread on RootzWiki that also shows how to edit a .smali file in 'services.jar'. I am too lazy to decompile 'services.jar' and the .smali script, but if someone else is able to, maybe we can see if the further mods will allow it to work 100% of the time. Here's that thread:
[DEV] Enabling CRT ON & OFF Animation in Roms [HOW-TO]
I hope Roach gets wind of this, and maybe his expertise will point us in the right direction for how to get it working perfectly. It is such a simple animation overall, but one that gives us such joy and pleasure
Cheers!
Was hoping you would catch wind of this scar45 and put it in your theme. And nice work to you jholtom!
I hadn't looked at the CRT off animation for HC before as I read it didn't work right but I also didn't know about the potential fix in the services.jar file.
I'll have a wee play about and see what I can come up with.
Can any tell me if the issue still exists where it only works in landscape?
Roach2010 said:
Can any tell me if the issue still exists where it only works in landscape?
Click to expand...
Click to collapse
It work while in portrait also but the animation only shut down in landscape.
Like on the phone it only shut down in portrait. Hope I make sense.
It only work when you're on one of the home screen and not anywhere else.
Yeah, I got it working for screen on and off but only from the Home Screen. When you do if from within an app the TF flips out.

[Q] Guide Request-- How to Implement Krylon's CIQ Removal

Hello. I would like to know if anyone has an actual beginner's guide to CIQ removal. For a minute, there was a guide that didn't quite have all the bugs worked out of it, but it was removed. I've been trying to follow Krylon's thread on rootzwiki, but it seems to stop short of telling people how to actually recompile everything and push it back to the phone. It would be helpful and informative to be walked through this process once the CIQ files have been deleted from the decompressed classes.dex files and .xml manifest.
Thanks
Note: So far, I have figured out that autosmali can be used to smali the files back into a classes.dex file, which can be reincorporated into the associated .jar files using 7zip. Seems simple enough. However, the process of getting framework-res updated seems to be more complicated, and requires answering some questions about. Specifically: 1. Option 11 asks (a) Is this a system apk? (b) Aside from the signature, would you like to copy over any additional files that you didn't modify from the original apk in order to ensure least # of errors? I have answered "yes" to 1.(a) and "yes" to 1.(b), which told me to delete the .xml and the resources.arcs file from a temp directory before completing the compile. This whole process has left me with three modified files (framework.jar, android.policy.jar, and framework-res.apk (unsigned)). Now what do I do with them?
Note 2: Looks like I can sign the framework-res.apk file using option 12.
Once you are done modifying the files you need to either put them in an update.zip and flash or push them with adb to their respective folders.
As for someone giving a step by step I doubt that will happen. It seems like the ones that do know how to do alot of the modifications to roms, are pretty vague when they post how to's. Most of the time it seems like they just don't want to share the information. Why I don't know, but that is just my opinion. I am sure I will probably get flamed for saying this but again this is just my opinion.
You can search the forums and find most of the information here and there. Then you need to put it all together and hope it works.
My thought's would be to have a seperate area in the forum to post just Tips, Techniques and How To's. Then alot of the people that want to learn how to theme and build roms would have an better source to find their answers than having to search all the forums. Again just my .02 cents worth...
Hope no one is offended by this as that is not my intention.... XDA is a great source for information...
quick steps..
Decompile Framework.jar, delete the entire carrieriq dir and all it's contents, recompile.
delete /system/xbin/iqbridger
DONE
Makes the rest dead code.
tablador said:
Hello. I would like to know if anyone has an actual beginner's guide to CIQ removal. For a minute, there was a guide that didn't quite have all the bugs worked out of it, but it was removed. I've been trying to follow Krylon's thread on rootzwiki, but it seems to stop short of telling people how to actually recompile everything and push it back to the phone. It would be helpful and informative to be walked through this process once the CIQ files have been deleted from the decompressed classes.dex files and .xml manifest.
Thanks
Note: So far, I have figured out that autosmali can be used to smali the files back into a classes.dex file, which can be reincorporated into the associated .jar files using 7zip. Seems simple enough. However, the process of getting framework-res updated seems to be more complicated, and requires answering some questions about. Specifically: 1. Option 11 asks (a) Is this a system apk? (b) Aside from the signature, would you like to copy over any additional files that you didn't modify from the original apk in order to ensure least # of errors? I have answered "yes" to 1.(a) and "yes" to 1.(b), which told me to delete the .xml and the resources.arcs file from a temp directory before completing the compile. This whole process has left me with three modified files (framework.jar, android.policy.jar, and framework-res.apk (unsigned)). Now what do I do with them?
Note 2: Looks like I can sign the framework-res.apk file using option 12.
Click to expand...
Click to collapse
Don't use option 12.
NEVER SIGN A SYSTEM APK
krylon360 said:
Don't use option 12.
NEVER SIGN A SYSTEM APK
Click to expand...
Click to collapse
Thanks krylon for the quick fix.
If, for completeness, I wanted to put all of these modified files on my phone (unsigned), how would I do it? Last time I tried, I used a root file explorer and my phone started bootlooping immediately after placing framework-res.apk on the phone. Adb was not available, so I had to reflash in order to put the file back the way it was. I was thinking maybe to adp push the file instead of copying it with the explorer.
adb push then reboot.
but, it's best to do it as a fresh install.
Thanks, I will give that a try.
Followed these directions 3x, but when I boot up my phone with these changes, the Android System process stops responding every time i boot my phone. I can bypass the error message fine, though.
edit: Well, after reflashing it 2 more times with the exact same rom, it doesn't happen anymore. MEH, who knows?
One of Raver's ROMs did that too. I think it is a dependency to something you removed. It was fine on the ROM. One FC when you boot ROM and that was it.

[Q] Tweaks apk flashable zip?

Is there any in existence? I mean roman's tweaks settings, for adding battery percentage and crt animations for our phone.
Sent from my DoubleShot Lite using Tapatalk
masterkamon842 said:
Is there any in existence? I mean roman's tweaks settings, for adding battery percentage and crt animations for our phone.
Sent from my DoubleShot Lite using Tapatalk
Click to expand...
Click to collapse
have you tried hitting up Blue, since he is the keeper of the ROM that roman started? otherwise, how about pulling the tweaks.apk out of a Bulletproof ROM and putting it into /system/app of your current ROM? i'm not sure if it's that simple or not, but could be worth a try.
yogi2010 said:
have you tried hitting up Blue, since he is the keeper of the ROM that roman started? otherwise, how about pulling the tweaks.apk out of a Bulletproof ROM and putting it into /system/app of your current ROM? i'm not sure if it's that simple or not, but could be worth a try.
Click to expand...
Click to collapse
I tried pushing it to system but it wasn't that easy... Didnt work for me. Ill see if I can get blue's attention. I'll keep this thread posted for future reference.
Sent from my DoubleShot Lite using Tapatalk
masterkamon842 said:
I tried pushing it to system but it wasn't that easy... Didnt work for me. Ill see if I can get blue's attention. I'll keep this thread posted for future reference.
Sent from my DoubleShot Lite using Tapatalk
Click to expand...
Click to collapse
What you can do is use Root Explorer to move it to /system/app while the phone is on, then set the permissions (long press on it, permissions is in the menu that pops up - scroll down) to look like the permissions of every other file in the /app folder.
Edit: to quote myself from explaining how to do it before:
Stop all apps that require market licensure to work, halt the market processes, delete the old vending.apk. Then you have to delete the market data directory at /data/data/com.android.vending and find the dalvik-cache file that belongs to the market ( [email protected]@[email protected] ) and delete that too.
Then you rename the new market .apk file to Vending.apk and use root explorer to copy it into your /system/app directory. Once there, you long-press on the Vending.apk file and select 'permissions' from the menu that pops up.
Change the permissions to read/write for owner, read for group, read for others, and nothing for the bottom 3 check boxes. Now it reads rw-r--r-- like all the other apps in the /system/app directory.
Then you reboot your phone and it should work, but you should clear the whole dalvik-cache in recovery, and you should clear cache in recovery too, so all the dependencies on the market get rebuilt the right way.
Click to expand...
Click to collapse
Then, reboot the phone, and see how much of the app works.
You should be able to get it installed that way, but if not my thread on Replacing the Google Market would be a good place to start learning how to make your own flashable zip file.
Just replace the market with whatever app you can't push to /system/app normally and you should be good.
Some third party apps don't run well or at all from the /system/app partition, they just expect to be in /data/app ... but some will. The one you're playing with works fine from in the /system/app directory.
Might want to look into this thread by Romanbb: Extended Quick Settings as well.
Romanbb's awesome tweaks are worth the work - I couldn't imagine using the device without them now, and am definitely looking at playing with it some. The one thing i'm struck by as a user more then anything else, i'd like to be able to change the order of the quick settings in the actual pull-down menu.
I want flashlight first, full settings second, then i'll figure out the rest of the order as I go, but both volume settings go dead bottom with me.
I haven't had the time to sit down and do it, but that's the next ability i'm interested in acquiring with regards to that. I can't wait to get my phone back so I can start making some progress again.
Meantime, i'll be in and out and others floating around here I know can steer you right if you need it - you lose nothing 'cept time for trying (you did do backups before you started playing around, right?).
Hi, I made Tweak.zip (i extracted tweak.apk from booletproof 1.1) for flash it by CWM, but don't works fine.
After flashed, the app is in /system/app with 0644 permissions, but with no visible changes, where was i wrong?
Can you help me? In attach my file.
antonaq said:
Hi, I made Tweak.zip (i extracted tweak.apk from booletproof 1.1) for flash it by CWM, but don't works fine.
After flashed, the app is in /system/app with 0644 permissions, but with no visible changes, where was i wrong?
Can you help me? In attach my file.
Click to expand...
Click to collapse
The tweaks need coded into the ROM, It's not as simple as just installing the apk, I would think some SystemUI smali needs edited also for any tweaks to Rosie, the Rosie.apk smali files will need an edit, so it knows what to change otherwise your just looking at the possibilities of the tweaks app.
I just did a Rosie remap for my Sense 2.1+3.0 Speedy ROM, and even though the option had always been in MikTweaks I had decompile tweaks to activate the remap option for my ROM ( by default It's turned off for Sense 2.1 ROMS ). Then I had to decompile Rosie and make the smali change. Then compile and resign both apps and i was good.
Sent from my myTouch_4G_Slide using Tapatalk 2
If you are really needing those tweaks, you can use the kitchen to apply most of them.
Compile? Decompile? More difficult for me then... I abadone the idea to realize Tweaks.zip.
Sorry.
Inviato dal mio Bulletproof_Doubleshot con Tapatalk 2

modding .xml in framework-res.apk with apktool?

i know there are hunderds of threads about this, but none of them helped me and niether of them describes my situation.
i had to change some values in bools.xml in framework-res.apk of a deodexed cm7.2 rom. so, i decompiled and recompiled using apktool and tried the folowing things (in all cases i remembered to chmod to 664):
- pushed the compiled file without signing. Boot loops.
- wiped dalvik cache. still boot loops.
- signed the compiled file. IT BOOTED! but all system apps fc. And i see a blank status bar. clearing dalvik cache doesnt help.
- copied the compiled resources.asec to original apk with winrar. NO FCs this time. still a blank status bar. Rotating the phone freezes the system instantly. but even if you dont rotate, system soon freezes, within 30 secs. logcat shows repeating messages of "cpu may be pegged. trying again". (no i havent overclocked).
how do u guys mod the frameworkres successfully?
Well, I don't know exactly what the problem you're having is since it may depend on the type of mod you're doing but..
I decompile framework-res.apk with apktool, make my changes and recompile. Then I use 7zip to copy the res folder from the new apk to the old one (just open both and drag across). Next, I extract resources.arsc from the new apk and add it to the old one, making sure to use 'store' compression. If resources.arsc is compressed at all, it causes problems.
So the original framework-res.apk now has a new res folder and resources.arsc at the right compression ratios. If you sign the new apk file, you have to make sure all the other system apps are signed the same way and it's just more trouble than it's worth.
Then I reboot into recovery, mount the system and push straight to the framework folder. I used to do this while the phone was running normally but I'd get all kinds of odd bugs if I made any change to anything other than a drawable. I'd get strange FC's, I'd lose wifi connection, all kinds of things.
And that's about it. As long as the changes I'm making don't stop the phone from working properly anyway, the above works perfectly every time.
Sent from my U20i using xda premium
arnab321 said:
(in all cases i remembered to chmod to 664):
Click to expand...
Click to collapse
Did you made a typo, or did you really have set the permissions to 664?
Its 644.
brainmaster said:
Did you made a typo, or did you really have set the permissions to 664?
Its 644.
Click to expand...
Click to collapse
that was actually a typo, and once i also accidentally made a typo on adb, but it still boots fine. i dont think giving extra permissions will screw things up.
the problem "cpu may be pegged" is rom/kernel related, because it is still there after a fresh install... sometimes it happens, sometimes not.
but i dunno anything about the blank status bar... i was trying to set "has_soft_keys" to true, to use tablet tweaks on my phone, does that cause a blank statusbar? anyone else got the same problem?
Wait, why are you using framework-res.apk for that? I think you need to change local.prop in /data to do this.
Have you actually got the line "has_soft_keys" already in the bools.xml?
Ticklefish said:
Wait, why are you using framework-res.apk for that? I think you need to change local.prop in /data to do this.
Have you actually got the line "has_soft_keys" already in the bools.xml?
Click to expand...
Click to collapse
yes it had that line, and setting it to true does bring the softkeys stuff in tablet tweaks menu. But the status bar always stays empty, nothing on it.
what needs to be changed in local.prop? There's nothing related to softkeys there on my phone.
umm, my ROM had the center clock mod on status bar, is that an issue?
Sent from my LG-P500
edit:
yes it was due to the center clock. tried anoher rom and i got the softkeys just by modding the bools.xml
First of all never sign system apps.
try using apk manager(I know it uses apk tool to do these operations) so try to set compression level to zero and heap size to 512.
I think above solutions should solve your problem but revert if u face any problem.
Sent from my Micromax_A70 using Tapatalk

Categories

Resources