Dec 9, 2013 - Android    Comments Off on Editing an .xml file on Android

Editing an .xml file on Android

(These instructions assume the .xml file is located inside an .apk file, in the res/xml folder)

  • Locate the .xml file. If it’s inside an .apk package, you’ll need Root Explorer.
  • Once you have Root Explorer, find the .apk package and long press it, hit Copy and Paste it on the root of your SD card and go ahead and rename it to filename.apk.bak
  • Connect to your PC and mount the phone
  • Drag over the filename.apk.bak and rename it to filename-res.zip (I use WinZip, some people use 7zip but since this is not a data app it really isn’t necessary)
  • Open the .zip file and find the navigate to res/xml and this is where you will see the .xml file
  • Drag it over to your computer and to edit it, you will need a Hex Editor (I use HxD (Google It). It’s easy and free)
  • Once you have HxD downloaded and installed, open it and drag the .xml file inside of it
  • On the right-hand side you will see the contents
  • Edit as needed…
    • Save it and open your filename-res.zip again
    • Go back to res/xml and drag your newly edited .xml file into this folder and it will overwrite the old .xml file
  • Remount your phone to your PC and drag the filename-res.zip to the root of your SD card
  • Unmount and go into Root Explorer and find the filename-res.zip and rename it to filename-res.apk (your original file should still be on your SD card named framework-res.apk.bak)
  • I use Better Terminal to push my framework back into the system. You can also use ADB.
    • In Better Terminal:
su
sys -rw
cd /sdcard
cp -R filename-res.apk /system/framework
sys -ro
sync
reboot

(make sure the spaces are before the slashes and dashes or you will get errors)

 

These Terminal Commands are good for Bugless Beast 0.3-0.4 someone else will have to post Terminal commands for other ROMS if it’s even needed, I am not sure as I said I know what has worked for me

As always have a good backup!