[Q] Can i brick G1 by editing files in /system? - Android Q&A, Help & Troubleshooting

What is the worst thing that can happen if I edit some files in /system directory? Can I damage the recovery image or even brick the phone? Of course I know that I can (and probably will lol) damage currently installed system/ROM.
What I want to do is edit /system/usr/keylayouts/qwerty.kl file and reassign camera button as a search button.

Related

[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?

[Q] How to modify a system file?

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!

[Q] How do you change the wallpaper on settings submenus in CM7?

I currently use a HTC HD Mini (Photon) running the SCREAM ROM by Ling Gan. It has a few bugs for most of which there is either a workaround or fix but there is the one problem which has remained unsolved: the default wallpaper on everything BUT the home and lockscreens cannot be changed. It is of a tree in a meadow under a blue sky and when rotated to landscape changes to some smiling chinese lady in the "settings" submenu. Doesn't hamper use much but it is quite annoying.
I have tried a number of solutions some of which resulted in my having to reflash and others did nothing. I post this here because I think it is a CM7 issue. The ROM developers have so far been unable to post a solution within the thread and I am aware that a fix for similar problems on CM9 ROMs exists using ADB to edit framework-res.apk. I felt it was time the problem was tackled by the wider XDA fam. Used google translate to look on the chinese site where the ROM is native to (mobile-kon) but found no help as well. Any help would be greatly appreciated.
i think ur problem lays in the framework-res.apk it contains the look of the rom and the transition effects
you can mod apk with the apkmanager tool for ur computer in the frameworkresapk you should find the images u want to change replace them witch a black picture or something like that
if never done this befoure exept from changing some transition effects and i had a couple of errors among this
the easier way seems to search for the rom on another page cus the images ure stating are not standart in the cm7
SOLVED!
jiffer1991 said:
i think ur problem lays in the framework-res.apk it contains the look of the rom and the transition effects
you can mod apk with the apkmanager tool for ur computer in the frameworkresapk you should find the images u want to change replace them witch a black picture or something like that
if never done this befoure exept from changing some transition effects and i had a couple of errors among this
the easier way seems to search for the rom on another page cus the images ure stating are not standart in the cm7
Click to expand...
Click to collapse
Many thanks!
I started off looking through the "res" folder in framwork-res.apk using Root Explorer to identify the images for the wallpaper. They were
Res/drawable-land-mdpi/screen-background-dark-transparent.png
And
Res/drawable-mdpi/screen-background-dark-transparent.png
I then created a copy of framework-res.apk on my SD card and copied it onto my pc. I created new wallpapers to replace the ones I just mentioned, one in portrait, the other in landscape. They were 320x480 and 480x320 respectively. Using 7zip on the pc, I placed them in the corresponding folders (/drawable-mdpi for protrait and /drawable-land-mdpi for landscape).
I copied framework-res.apk back to my sdcard and then fired up terminal emulator to run the following commands
su
sys -rw
busybox cp /sdcard/framework-res.apk /system/framework
sys -rw
You might get error messages from running apps after this but ignore them and reboot. The idea is to replace the framework-res.apk in system/framework with the one you just edited.
After the reboot, you should have your newly created wallpaper showing up in settings in both landscape and portrait modes.
Please hit "thanks" for both jiffer1991 and I if this was helpful. Big ups to jiffer1991for pushing me in the right direction.
Hi,
i did something wrong.
So my Phone didn´t run.
He show me the Bootsceen and the Animation.
But the he will run again and again and again.
Can i handle my Phone via USB so i can restore the framework.resp.apk on my System? Or i have to reinstall Android again?
I have no backup and i don´t want to erase my system settings.
Thanks
Felix
obstgarten said:
Hi,
i did something wrong.
So my Phone didn´t run.
He show me the Bootsceen and the Animation.
But the he will run again and again and again.
Can i handle my Phone via USB so i can restore the framework.resp.apk on my System? Or i have to reinstall Android again?
I have no backup and i don´t want to erase my system settings.
Thanks
Felix
Click to expand...
Click to collapse
hm u got stuck in a bootloop thats what i meant when i mentioned errors =)
you could make a zip with the old framework res apk or reflash the cm rom
if u dont whipe data/cash ure setting will be safed
read some tutorials how to mod the framework res apk
I have an .zip file on the sd card.
Can i copy it to the Android system somehow?
Felix
P.S. can i zip the framework and remove the ".zip" to ".apk"?
It is most likely that the zip file you have is the ROM image from which you flashed in the first place. Changing the extension to apk is NOT what you want to do. I suggest you create a backup in CWM of you present configuration and after reflashing, you can then do a partial restore of your user data. But its like Jiffer1991 said, read up on CWM, theres an exhaustive guide on xda somewhere.
Thanks,
i installed my modified cm rom without wipe caches data or something.
And now i have my old datas back, with the new Background.

[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

Roll Back after Build.Prop deletion

Looking for a little help here.
In an effort to make some tweaks on my HDX, I somehow managed to delete the actual build.prop while I was in the process of trying to restore from a backup (build.prop.bak). I've tried removing build.prop.bak to build.prop, however Root Explorer keeps telling me that the Renaming Action has Failed.
I'm struggling to get my device to load/recognize on my PC with ADB. I'm looking for solutions to prevent my device from bricking.
Does anyone know if it would be possible to use the "Rollback" method from 4.5.3 to 3.2.8; or will not having a proper build.prop interfere with that?
The most aggravating thing, is I have a fully functioning build.prop backup, I just can't seem to get it to take as the actual build.prop
Any ideas are much appreciated
positivehxcgo said:
Looking for a little help here.
In an effort to make some tweaks on my HDX, I somehow managed to delete the actual build.prop while I was in the process of trying to restore from a backup (build.prop.bak). I've tried removing build.prop.bak to build.prop, however Root Explorer keeps telling me that the Renaming Action has Failed.
I'm struggling to get my device to load/recognize on my PC with ADB. I'm looking for solutions to prevent my device from bricking.
Does anyone know if it would be possible to use the "Rollback" method from 4.5.3 to 3.2.8; or will not having a proper build.prop interfere with that?
The most aggravating thing, is I have a fully functioning build.prop backup, I just can't seem to get it to take as the actual build.prop
Any ideas are much appreciated
Click to expand...
Click to collapse
Sounds like you are on 4.5.3 but lost root. Might try to reroot using Kingroot although I believe that involves a reboot. Pretty sure your device will not restart (effectively brick) without build.prop. You really need to get adb working to expand beyond those options. Keep your device on charge to prevent a shutdown due to low battery.
I absolutely would not attempt a 3.2.8 rollback. There is an outside chance a factory reset from stock recovery would restore a generic build.prop if none is found. It generally will not repair or replace a damaged file and involves a reboot which could be fatal. This becomes an last resort option imo.
If you device was purchased from Amazon it may still be under warranty. Sometimes that is the best/only path. Good luck.
I've managed to get it mounted as ADB, and have pulled the backup, and renamed the file.
I'm now running into a problem pushing the file to /system/ I'm going to assume it's because I've lost my root access (I'm guessing it's because the buildprop manages it?).
So Making advances, just now stuck here. I've tried editing the prop, and it's in read only. I've tried sending it to a different folder and copying it over, but that's also failing.
positivehxcgo said:
I've managed to get it mounted as ADB, and have pulled the backup, and renamed the file.
I'm now running into a problem pushing the file to /system/ I'm going to assume it's because I've lost my root access (I'm guessing it's because the buildprop manages it?).
So Making advances, just now stuck here. I've tried editing the prop, and it's in read only. I've tried sending it to a different folder and copying it over, but that's also failing.
Click to expand...
Click to collapse
You will probably need to root via adb which is challenging and by no means certain. Take a look at this thread for ideas. You may want to reach out to @myotai as he faced a similar problem.

Categories

Resources