[Q] How to modify a system file? - Android Q&A, Help & Troubleshooting

Hi there,
I upgraded my Galaxy 551 to Gingerbread 2.3.6. All went well. Unfortunately it seems to be a common side effect that the Z and Y keys (and some others) get swapped. The fix is apparently to modify the file /system/usr/keychars/sec_keypad.kcm.bin. The ideal thing is to put the old file from before the FW update back in, but of course I don't have that anymore! But the existing one can apparently be altered. If I can copy it to the SD card I can alter it in a hex editor and put it back.
So, I rooted my phone with that one click application, and that went OK too. I installed root explorer and found the file. There were also some others in the same folder I may be able to use. But, I cant make the folder R/W (pressing the button does nothing) so cant do anything with the file. I also tried Super Manager with no luck.
I am new to the phone fiddling stuff so noob level instructions would be appreciated!

Think I have it sorted. I installed superuser and then Root Explorer allowed me to select read/write. Now to try sort out this file!

OK, seems that you need to edit the file /system/usr/keylayout/sec_keypad.kl. Did that. DO'H now my keyboard doesn't work at all! Glad it saved a backup for me! Not sure what I did wrong, only edited two characters in a text file! Even the power button doesn't work. Got to pull that battery out LOL!
It seems when the file was saved it was saved with zero size. When I try to delete it to replace it with the backup it says cant delete, read only. So, not sure how I am meant to replace this and fix this problem.
Any ideas, remembering that I cant actually use any buttons on the phone!

Related

[Solved][Q] .apk file questions

Hi everyone! I'm still relatively new to all these customizations that can be made on these phones, and I am curious about all these .apk files I keep seeing around. Everyone time one is posted, it says to push it to your phone to replace whatever file is there... The thing is, every time I read about it I find a new way of doing it. Some say to use root explorer, some say SGS tools app, some say to use easy installer, and I think I've even read to use ADB? I just was wondering what's the best method? Easiest method? Can you screw your phone up by replacing these files? I keep reading things like if you want to switch a camera in your ROM to a different version, just install the .apk! Or, if you want to use live wallpapers in a ROM that doesn't come with it, here is the .apk for that!
Any help is much appreciated!
Thanks guys!
tarastaryo said:
Hi everyone! I'm still relatively new to all these customizations that can be made on these phones, and I am curious about all these .apk files I keep seeing around. Everyone time one is posted, it says to push it to your phone to replace whatever file is there... The thing is, every time I read about it I find a new way of doing it. Some say to use root explorer, some say SGS tools app, some say to use easy installer, and I think I've even read to use ADB? I just was wondering what's the best method? Easiest method? Can you screw your phone up by replacing these files? I keep reading things like if you want to switch a camera in your ROM to a different version, just install the .apk! Or, if you want to use live wallpapers in a ROM that doesn't come with it, here is the .apk for that!
Any help is much appreciated!
Thanks guys!
Click to expand...
Click to collapse
You CAN screw your phone up if you do it to the wrong APK (like /system/framework/framework-res.apk, if you install a bad one, your phone won't boot, but there is an easy fix, nandroid!).
Basically all the methods do the same thing. In Android "Installing" an app is as easy as moving it to the correct location. All of these methods do just that.
The easiest way IS to probably use Root Explorer because you can rename the old one just in case, and it will handle the system read/write mounting for you. Plus GUIs are always easier.
So here's how it works: user apps go in /data/app, and system apps go in/system/app. User apps can't really mess anything up, but be careful with System ones. Live wallpapers, things of that nature usually don't hurt. Camera is ok to mess around with, too.
Edit: my ramblings are probably confusing, don't hesitate to ask me to clear something up
usually most apk files can be installed easily by transferring the file to the root of your internal sd card then go to MY FILES locate the apk file and click on it and it will ask you to install. Thats it. You can also root explorer and just place it in the system/app folder then reboot. I install all of my apks through the first way I mentioned. On my wife's Mytouch4g there is no my files so use Astro file manager. Come to think of it any file manager from the market will do. Good luck...
tarastaryo said:
Hi everyone! I'm still relatively new to all these customizations that can be made on these phones, and I am curious about all these .apk files I keep seeing around. Everyone time one is posted, it says to push it to your phone to replace whatever file is there... The thing is, every time I read about it I find a new way of doing it. Some say to use root explorer, some say SGS tools app, some say to use easy installer, and I think I've even read to use ADB? I just was wondering what's the best method? Easiest method? Can you screw your phone up by replacing these files? I keep reading things like if you want to switch a camera in your ROM to a different version, just install the .apk! Or, if you want to use live wallpapers in a ROM that doesn't come with it, here is the .apk for that!
Any help is much appreciated!
Thanks guys!
Click to expand...
Click to collapse
An apk is a specialized application file used by android (uses the same file headers as .zip files).
You are correct that there are various methods to push or move apk's to appropriate directories with in the phone. now as to which is easier or best, all methods work about the same, though there are minute differences.
If you want to move apk's into a certain directory while using a phone i find it easiest to use a file manager like root explorer that has root permissions to move apks around. keep in mind that when moving system files most often you will have to reboot for the changes to take effect with out bugs.
If instead you want to use a computer personally i find ADB to be the easiest. After installing the android sdk you will have to navigate into the android sdk directory then to the platform-tools directory within the android sdk folder. then in command prompt type " adb push <directory of file on your computer> /<directory of where you want it on your phone> hit enter and all is gravy. keep in mind that pushing/moving files to your phone using adb works the best when in recovery mode.
as to which of these operations is the best is a personal decision personally i like to use adb to move around system files and root explorer for applications.
hope this helps
Thanks guys!! Ok, so just to be sure. I'm currently running the Malice rom, and somewhere in the threads is the LiveWallpaperPicker.apk
So all I have to do is download this, place it on the root of my internal SD card, go into file manager and find it, click on it, and it will ask me to install it? It's really that easy??
Or, should I download root explorer and copy and paste it to a specific place?
tarastaryo said:
Thanks guys!! Ok, so just to be sure. I'm currently running the Malice rom, and somewhere in the threads is the LiveWallpaperPicker.apk
So all I have to do is download this, place it on the root of my internal SD card, go into file manager and find it, click on it, and it will ask me to install it? It's really that easy??
Or, should I download root explorer and copy and paste it to a specific place?
Click to expand...
Click to collapse
For that file you will need to place it in /system/app (it can't be installed normally because it's a system app). So you need something like Root Explorer
I think EStrongs File explorer is a decent free alternative, but when I tried it a couple months ago I had no luck with it so I just bought Root Explorer (good investment)
The guide in my signature touches on this, but BT has you covered. I am also a huge advocate of Root Explorer.
Just take the .apk, move it to system/apps and I reboot, but it may not be necessary... no need to click on it and select install, as BT referenced.
Thanks so much everyone! Just purchased root explorer and will try this out.
IT WORKED IT WORKED IT WORKED!!!!!!!!!!!!!!!!!!!!
After I rebooted, none of my widgets could load, but I have live wallpapers again! I love learning new stuff! Thanks sooooooooooooooooo much! You guys are the BEST!!!
Odd about the widgets. Were you able to just remove them and re-add them back?
Yep, just deleted them off my home screen and added them back again. All of them had errors saying widget could not load

[Q] SGS2 after update to 2.3.5

Hi,
I cannot edit /default.prop after update.
To be more accurate, I can edit it, but after reboot it is the way it was before.
I have root, any idea what is happening?
CORRECTION it's 2.3.4
Could be a couple of things,
1. I've read a post on here before about a phone that couldn't be flashed with different firmware at all, possibly due to corrupted nand memory.. Hopefully yours isn't
2. How are you editing the file, are you using something like root explorer or copying the file onto pc then trying to push / paste it back to the phone, because either way you have to make sure you have write access to the system and file.
Hope you get it sussed
Sent via courier pigeon
Thanks for the reply, morg01.
I used for editing a pack of tools, first "super manager" to mount "/" as RW then either "script manager" to edit the file, or Terminal Emulator to add the needed line.
So far I've only found a workaround for the problem, by using ADW launcher, instead of original one. But even though it is very rich in options I prefer the TouchWiz. ADW is kind of lagging I have no idea why
What exactly is nand memory, and how could it get corrupted. I've experienced some problems lately, with a slight pressing of the back cover or if it is removed on the upper end of the battery the phone reboots.
Is it possible to be more than just a battery problem?

SystemUI.apk fix

Alright, I was trying to replace the SystemUI.apk with the new menu buttons. I renamed the old one to Systemui.apk.bak and after I did that ICS started acting up again and restarted by itself. When it turned back on, no menu bar, and the system won't let me rename it to the original or move the new one. I've tried everything I could think of, such as using adb through my pc and downloading multiple file explorer apps. Nothing works. Any help would be great cause I can't back out of an app without restarting the system.
Are you mounting the drive in R/O mode? Must be Read/Write to make changes.
Wow, I guess I should have thought of that. I got it working now. Thanks alot.

[Q] LG Realm Stock Recovery

Ok, I have root and have used it quite effectivly as well as the apps/programs available. That is, until now. While tired and foggy headed, I went ahead and copied a file into my System folder. However, the way I did it was oh so very stupid. Instead of actually copying the file itself over, I decided to copy the System folder that 1 file was sitting in over onto the device. Oh lucky day, doing that wiped everything but that one file from the System folder so that my phone had a heart attack and I had to pull the battery. Saying a prayer to the Root Gods, I turned my phone back on and, you guessed it, it went to the recovery screen with the happy Update Android sitting there. Due to not having a recovery image or file to be able to recover my phone, I am in need of some assistance. I hope someone out there can help me. Any further questions for me, please ask.
I really hope someone can help me with this.
Pammykins said:
I really hope someone can help me with this.
Click to expand...
Click to collapse
Don't have an LG Realm myself but I couldn't really understand the problem. Is it a Qcom or MTK device? Can you access recovery? Can you access ROM? Can you access Emergency/Download Mode? Does the device turn on?
I am attaching a pocture of the screen. After i wiped out the root system folder, the phone had to be hard restarted so i pulled the battery. When the phone went to restart, it didnt go to the loading screen. It went to the Android System Recovery screen. The android Installing System Update screen is there and all i can do is use the volume keys to go between options. One of them is Apply Update From External Sdcard, the rest are to apply from inside the phone, which cant happen because of my goof up. It also says E:missing bitmap stage_empty and missing stage_fill.
Pammykins said:
I am attaching a pocture of the screen. After i wiped out the root system folder, the phone had to be hard restarted so i pulled the battery. When the phone went to restart, it didnt go to the loading screen. It went to the Android System Recovery screen. The android Installing System Update screen is there and all i can do is use the volume keys to go between options. One of them is Apply Update From External Sdcard, the rest are to apply from inside the phone, which cant happen because of my goof up. It also says E:missing bitmap stage_empty and missing stage_fill.
Click to expand...
Click to collapse
What happens when you are pressing power button when on reboot system now?
I have actually tried all the options. Reboot brings me back to that screen after the LG splash screen. The other options look for the recovery in the phone, which is not there. That was why i was looking for a possible recovery file to put on my sdcard and use the external sdcard option.
Pammykins said:
I have actually tried all the options. Reboot brings me back to that screen after the LG splash screen. The other options look for the recovery in the phone, which is not there. That was why i was looking for a possible recovery file to put on my sdcard and use the external sdcard option.
Click to expand...
Click to collapse
How you managed to delete /system partition describe me please. The thing is that I don't find any Stock Rom you can flash... Well tell me how you got it deleted and if you made a backup somehow first.
Like i said in my op, i never did anything this stupid before. I ended up copying another system folder on top of the original. The one i copied only had 1 file in it that was for my signal. However, when it copied over, it replaced the folder with everything needed to keep my android phone working with the folder with just the one file. And like an idiot, i never made a backup of my phone after i rooted it. Like i said, i am actually not a beginner at this, just made a big mistake of instead of just moving the one file over.
Pammykins said:
Like i said in my op, i never did anything this stupid before. I ended up copying another system folder on top of the original. The one i copied only had 1 file in it that was for my signal. However, when it copied over, it replaced the folder with everything needed to keep my android phone working with the folder with just the one file. And like an idiot, i never made a backup of my phone after i rooted it. Like i said, i am actually not a beginner at this, just made a big mistake of instead of just moving the one file over.
Click to expand...
Click to collapse
It's **** we need to flash a new Firmware on your phone nothing where I can fine one there is a way though. Give me a pm with this:
Your IMEI
Your S/N
the name of phone (EX. LG P710) the number and letter if there is not Realm. Ofc IMEI S/N of the phone. Not here in pm .
this sounds exactly like my problem. I have two LG realms. I was messing around with the build.prop on one of them. I saved the original but somehow when I copied and pasted it back into sys file, the phone gets a black screen of death right after the boot screen. I am able to get into the stock recovery, but no further. I'm thinking that a copy of the stock firmware is my only help.
Sorry for bumping an old thread, but I have the same problem. Come on, don't leave us hanging please!

[Q] .kl file issues

I've been running my xperia Z2 for a month or two now and one of the first things I did was disable the camera button, and attempt to rebind it to a different button in the .kl files within system/usr/keylayout. Initially, it worked great. I commented out the key 212 camera in a few files with a #, and added a new line.
It's been a month or so since then and I hadn't been using the camera button and all, and recently I've noticed that the kl file changed back in one of my restores to just being commented out, so the camera button is now non functional. I attempted to add a line of code to change the camera to media next like this: key 212 MEDIA_NEXT, but was getting no response after restarting my phone. I removed the line, deleted the comment on the previous line in every file that I had disabled it in, and restarted the phone. Camera is still non functional even after confirming it stayed unchecked.
After this, I attempted to copy all of the files to my SD card and mass edited every single camera key reference to media_next for the sake of testing, and the button was still disabled. I completely purged my .kl files, and uploaded notepad++ edited copies and restarted my phone. None of my buttons worked. I did a restore from my SD card backup, and nothing worked after restarting, still. I did a backup from a TWRP backup and everything is functional again... however, I'm left wondering why my .kl files might not be reading.
I apologize for the long post, but I'm trying to understand where I've went wrong. I'm on a stock bell rom(canadian) firmware 4.4.2 model D6503 build 17.1.A.2.55. I'm rooted, with only minimal modifications to the device(cydia substrate, xposed framework using rootcloak, youtube adaway, a radio modification to allow headphoneless scanning and xposed additions).
Does anyone know where I might've went wrong? My end goal is to rebind a controller's R2(simple button) controller to the R2 axis as well as button press, so if anyone has any information on rebinding a key to a maxed out axis I would appreciate information on that as well(Eg. R2 key 105 to RTrigger 1.0 + key 105).
Not sure
Perhaps copy a working existing file and try from there
I had trouble understanding your problem
Envious_Data said:
Not sure
Perhaps copy a working existing file and try from there
I had trouble understanding your problem
Click to expand...
Click to collapse
I've restored a CRM backup and the .kl files all work great, but when I attempt to modify the files they don't seem to update any system functions or buttons unless I'm just disabling the button. Even if I copy the file to another directory, break all the buttons then overwrite it with the copy and restart, the buttons stay disabled until I restore a CRM recovery.
I hope that's a little easier to read, the phone just doesn't seem to update its internal system with button definitions except to disable them, and I'm trying to figure out why.
Zarreck said:
I've restored a CRM backup and the .kl files all work great, but when I attempt to modify the files they don't seem to update any system functions or buttons unless I'm just disabling the button. Even if I copy the file to another directory, break all the buttons then overwrite it with the copy and restart, the buttons stay disabled until I restore a CRM recovery.
I hope that's a little easier to read, the phone just doesn't seem to update its internal system with button definitions except to disable them, and I'm trying to figure out why.
Click to expand...
Click to collapse
Just a thought, not pretty sure.
When you are copying files from sd-card, you should also check for correct permissions.
Your permissions must match with original files, otherwise it may create an issue.
mvv1277 said:
Just a thought, not pretty sure.
When you are copying files from sd-card, you should also check for correct permissions.
Your permissions must match with original files, otherwise it may create an issue.
Click to expand...
Click to collapse
I hadn't even thought of that, thank you, I'll try that out

Categories

Resources