I am trying to edit the arrays.xml file in the framework-res.apk file to do the hotspot hack, however, when I copy the new framework-res.apk file to my system folder, change permissions to 0644, then move it to framework, the phone crashes and goes into soft brick. Even if I push it over by adb shell and issuing stop, it still soft bricks on reboot. Everything appears to be good, the APK file says completed with no errors, etc. Any thoughts?
NOTE: I know there's a different hotspot hack available, but I was wanting to try something new to me, which is editing the files myself.
rodin95 said:
I am trying to edit the arrays.xml file in the framework-res.apk file to do the hotspot hack, however, when I copy the new framework-res.apk file to my system folder, change permissions to 0644, then move it to framework, the phone crashes and goes into soft brick. Even if I push it over by adb shell and issuing stop, it still soft bricks on reboot. Everything appears to be good, the APK file says completed with no errors, etc. Any thoughts?
NOTE: I know there's a different hotspot hack available, but I was wanting to try something new to me, which is editing the files myself.
Click to expand...
Click to collapse
I don't believe it will work by pushing it into system via a file explorer or adb. I have flashed it using a zip in custom recover, i.e. safestrap. Glad to see someone trying to learn. I commend you for that.
I was able to copy the Verizon framework file over using the same method, and the phone works fine, except there are a few minor issues using that framework (items are not labeled correctly, incorrect ASCII characters in random places on screen, etc.
When I modify the framework file, it sits on the white ATT screen, and flashes "bright to dark" every 10 seconds or so..like it does when it does a normal boot, but it never boots.
Always willing to learn
Related
I flashed nonsensikal 8.2 to my Eris and attempted to load my apps back. I have one called vRecorder, which contrary to popular opinion, worked great for recording phone calls. However, when I attempted to reload it I found it is unavailable and no longer supported. After trying several other call recorders, all failures, I'm left with trying to install my old one. The problem is, it isn't a .apk file, it's a .zip file. I originally downloaded this off the market, but since then the developer has packed up his bags and I can't get in touch with them. The .zip file located in the /data/app folder contains the following files:
AndroidManifest.xml
res (folder which contains four more folders all of which contain image and xml files)
resources.arsc
Since I cannot back this up using Astro and it's a zip format, is there any way to either convert it to .apk or flash it like a rom? I tried simply renaming it to apk and it acted like it installed, but gave me the message saying 'application not installed' when it completed. Any help would be appreciated.
Rhordae said:
I flashed nonsensikal 8.2 to my Eris and attempted to load my apps back. I have one called vRecorder, which contrary to popular opinion, worked great for recording phone calls. However, when I attempted to reload it I found it is unavailable and no longer supported. After trying several other call recorders, all failures, I'm left with trying to install my old one. The problem is, it isn't a .apk file, it's a .zip file. I originally downloaded this off the market, but since then the developer has packed up his bags and I can't get in touch with them. The .zip file located in the /data/app folder contains the following files:
AndroidManifest.xml
res (folder which contains four more folders all of which contain image and xml files)
resources.arsc
Since I cannot back this up using Astro and it's a zip format, is there any way to either convert it to .apk or flash it like a rom? I tried simply renaming it to apk and it acted like it installed, but gave me the message saying 'application not installed' when it completed. Any help would be appreciated.
Click to expand...
Click to collapse
Try resigning it. You can find out how to do that in the Eris roll up thread
rename it back to zip... pull it to your computer... then adb install -r appname.zip
Actually just rename it to a .apk
hakkeshou said:
Actually just rename it to a .apk
Click to expand...
Click to collapse
I already tried renaming it and installing it that way but after I ran it, it went through the install process and ended with the message "Application not installed." I will try what vinylfreak89 suggested by installing SDK on my pc and trying the adb install. I'm also trying to find how to resign in the rollup thread. I'll let you know how it goes.
Are you sure the program didn't download to the phone's DATA/APP folder as a ZIP as well as an APK in DATA/APP-PRIVATE?
I am having the same problem re-installing with a 'protected' Market program.
My app-private folder is empty (using Root Explorer). However, I found a call recorder that seems to be working for me. It's called rVoix and can be found in thread 806451 in this forum.
My Eris has been rooted and I'm using nonsensikal 8.2 black rom (I highly recommend this rom, it's awesome).
Did you nandroid before you flashed the new rom? If so, restore the old rom, use titanium to back up the app, nandroid back to the current rom, and restore the app.
Sent from my ERIS using XDA App
I've figured out all apk files are really just zip files, but why am I not able to unzip the framework-res.apk file, edit the images within, then save it again without causing my phone to hang on boot?
Is there some step I am missing? I've tried rezipping with normal compression, store only, and only photoshopping and resaving a single image within the apk and still it fails.
How are images edited and updated? What am I missing?
I use apkmanager myself for most theming. You might look into it
Sent from my SCH-I500 using XDA App
An apk is a zip, but it's a *signed* zip
Sent from my SCH-I500 using XDA App
Here is the way I do it. I use 7zip to do this and I think it is the only program that can do it.
The way you can do it is to extract the drawable-hdpi folder within the framework-res.apk then do all your edits and save them with the exact same file names. Then you can go back into your framework-res.apk and drag and drop the drawable-hdpi folder back in and it will over write the original ones. Now just hit the Up (like to move up a directory) button until you see the message "framework-res.apk has been changed. Update it in the archive?" then click yes. Now you can put it on your phone without force closing. If you were just editing framework-res and it was not within another .zip file then you won't get that message and that is fine.
APK Manager.
You can use extract/zip (2/3) for image-only edits, but you need to decompile/compile (9/11) to mess with xml files.
Do *not* sign system apks (like framework-res.apk). Do sign other apks.
Btw, this is in the wrong forum.
(Next step: learn about the update.zip packaging script. Remember to name it something besides update.zip afterwards, because on the Fascinate we're installing everything through Clockwork, which should be the only file actually called update.zip.)
s44 said:
APK Manager.
You can use extract/zip (2/3) for image-only edits, but you need to decompile/compile (9/11) to mess with xml files.
Do *not* sign system apks (like framework-res.apk). Do sign other apks.
Click to expand...
Click to collapse
Oooh! I didn't know this app made xml's editable. That opens up a whole new set of theming fun. I can't wait to release my new theme. It should be well received (I hope)
Btw, this is in the wrong forum.
Click to expand...
Click to collapse
I considered putting this in Themes, but this was a theme development question, so here it ended up. If the Theme and Development forums ever hook up and have a few drinks, then spawn a sub-forum, Theme Development, I assure you it would have been a much easier decision to make
Thanks everyone for helping me out. My last time playing with a phone is an old WinMo 5 device. Anroid seems limiting in it's own ways (no dedicated theme files (can't update without losing the apk theme), but much better for customizing for a 'look' of the OS.
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Just hit the thanks button, he doesn't bite your finger!
This is an easy way to edit the images only(icons,wallpaper,etc),not XML files,Smali's and such.I do this using the kitchen,easy way if you theme alot.
Diablo67 said:
This is an easy way to edit the images only(icons,wallpaper,etc),not XML files,Smali's and such.I do this using the kitchen,easy way if you theme alot.
Click to expand...
Click to collapse
You don't have to use this guide just for images. That was just the example. You can use it for almost any file inside an .apk. I was just saying that SOME folders aren't there.
Can you guide me to how do i keep same apps of diff versions.
i tried to modify a 3rd party app e.g whatsapp and when i tried installing i got an error which said "the app is not signed", may u kindly assist!
tendyfish said:
i tried to modify a 3rd party app e.g whatsapp and when i tried installing i got an error which said "the app is not signed", may u kindly assist!
Click to expand...
Click to collapse
You also have this tool
Easy Apk Dissassembler
http://forum.xda-developers.com/showthread.php?p=14049173
How do I use a flashable to get rid of .apks??? ₩
On the app I have here it returns 20 results that it scrapes from a website. I only want it to return 3 or 4. How do I get in there and change that value?
I want to change values on touchwiz launcher on my note 3, to use it in 440 dpi. When I use it there is so much margin on all sides, and I need to reduce. I need to add a new icon row as well. Can I do that just by modifying the app?
Sent from my GT-I9505 using Tapatalk
are the .xml files encrypted or something? when i try to edit them, it is a bunch of strange characters
Hi,
I would like to modify the tinychat.apk so that i can find how to change my device info/platform from android to something else, like pc or whatever. I dont want to be identified as using an android device. Is this possible?
Regards.
ksaul said:
are the .xml files encrypted or something? when i try to edit them, it is a bunch of strange characters
Click to expand...
Click to collapse
Yes, depending on what tool you use to decompile the apk files it may or may not decrypt them. I use apktool and it decrypts them just fine.
I think this method is no longer working for 4.3+
Modify JAR files
littlejoelgriffo said:
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Click to expand...
Click to collapse
That's very helpful thank you for sharing. Is there a way to modify JAR files the same way?
gilbertgk said:
That's very helpful thank you for sharing. Is there a way to modify JAR files the same way?
Click to expand...
Click to collapse
rename the jar to apk..after done,rename it back to jar
zamzameir said:
rename the jar to apk..after done,rename it back to jar
Click to expand...
Click to collapse
Can this work on my note 3 4.3 not rooted?
gilbertgk said:
Can this work on my note 3 4.3 not rooted?
Click to expand...
Click to collapse
idk..but you can try n report back
littlejoelgriffo said:
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Click to expand...
Click to collapse
Thnax for great guide but,my gopro app has a update and I have changed the icon on it but the app store dosent show me the update button. How to fix so I can update?
What do I need to change in an app to substitute it for another app?
OK so I've installed a new ROM and it comes with a kernel setting app preinstalled. This app has been integrated into the system settings portion of the ROM. I want to replace this kernel settings app with one of my choice but I want to be able to integrate it into the system settings like the original app is. I tried disguising the new app by changing the name of the app and .apk files but that didn't work. Closest I got was being able to convert my app to system app but even though I changed the name, the app, when installed goes back to it's original name. Or what permissions or files do I need to change to allow the integration of my app into the settings interface. Thanks ahead of time, it's appreciated.
We have finally figured out how to change the boot video. This is the part where it says OUYA right before showing the launcher. Most people probably know this and that the video is part of the launcher apk. It is possible to switch the video out for one of our choice.
Here is a link showing our custom boot up vid.
https://www.youtube.com/watch?v=LmlyDxR7JMg
And another link to a write up I did so anyone can customize their own.
http://burdbroscustomarcade.us/forums/topic/how-to-create-your-own-ouya-boot-video/
These are the directions on how to have your own custom boot video when your OUYA starts up. This does not change the boot animation that comes before the video. If that’s what you are looking to do you can find info on that here. http://ouyabrew.com/custom-boot-animations-for-ouya/ This is my first guide so if you think I should add or change anything let me know.
Warning!!! Please Read!!!
If you do not follow these steps exactly and don’t have another launcher installed all you will get is a black screen. This can be fixed with adb though so it doesn't actually brick your ouya. I highly recommend installing a backup launcher in case something doesn’t work.
Your OUYA must be rooted for this to work and the system\ folder properties need to be set to RW so you can replace the launcher apk. You can do this under tools in es file explorer(turn on root explorer, mount r/w) and can be found in settings or properties on most other file explorers.
I’ll just go step by step of how I did it. You may know some of this but I will try to be as thorough as possible. I used apktool to decompile then recompile it. Make sure the apk is in the same folder as apktool. Otherwise you just have to include the entire path for the files and folders.
First off copy the file OUYALauncher.apk from syatem\app\ on your OUYA to your computer. Then install apktool on your computer. It works on both PC and mac. A Google search will find it quickly.
At this point it is a good idea to make a copy of your launcher and save it somewhere for backup just in case.
To decompile:
apktool d OUYALauncher.apk outputfolder\
outputfolder\ can be whatever you want. Just make sure to keep it consistent with all apktool commands.
Then switch out the video in the outputfolder\build\apk\res\raw\boot_video.mp4 with whatever mp4 you want. Just make sure to rename it exactly as the one you are replacing. In theory you could do the same for the audio but I haven’t tested this yet.
!!!!!!!!!!!!!!!! 5/24/14 The new update for the OUYA now has 2 different videos, boot_video.mp4 and boot_video_long.mp4 in OUYALauncher.apk. I replaced both with my custom video and it worked fine just as before. Do not use any OUYALauncher.apk from one update version with another update. This can cause the stock launcher to stop working. Always start with a fresh copy of the file to be safe. And once again I suggest installing a secondary launcher as backup in case you do mess something up. It makes it much easier to fix.
To recompile:
apktool b outputfolder\ nameof.apk
It doesn’t matter what you use as nameof.apk because you will have to rename it after signing anyways.
Then to sign it I use the app zipsigner on my phone or tablet using the test key that it selects by default. Once you have the signed apk just rename to OUYALauncher.apk and copy to system\app\ on your Ouya. I used es file explorer on my ouya but any file explorer should work. Select overwrite when it prompts you. The screen will go black. If you have another launcher it will switch to it automatically. If not then I wait a few seconds to let it settle then unplug the OUYA and plug it back in and start it. As long as the file is named right and signed you should be greeted with your new video after the boot animation.
If you have any questions or need help feel free to ask
I am really pissed about this one.. tried to make a Titanium Backup of my stuff before I unrooted and wiped the phone to ODIN the ANE update (it refused to update after being towelrooted).. So that was my first introduction to the bug that prevents TiBu from writing to the extSD.. I found several threads pointing to adding a line to the profiles.xml file in system/etc/permissions. Well I added the line using ES3 note editor (copied the original file to .bak first), saved and rebooted, and as soon as I unlocked the phone, the toasts started popping up that nearly everything was crashing - repeatedly. I went and deleted the modified file and changed the .bak back to normal, but it did not fix it. No apps would open, and I had no data connection (neither Wifi or 3G). The only thing that fixed it was booting into recovery and wiping it.
And then it happened AGAIN when I tried it again (after the ANE update was flashed via ODIN, so I know it was clean). So WTF is happening, and why does restoring the original file not fix it??
At this point I can't even get TiBu to back up to the internal storage.
Taz420nj said:
I am really pissed about this one..
Click to expand...
Click to collapse
There is no obvious reason why it shouldn't work of you reverted the changes. But of course that is the ultimate value of a tested backup method.. that ability to roll the clock back and revert accidental or inexplicable changes.
If you are certain that you reverted the edits.. no typos or line feed errors e.g.you used a linux aware file editor.. not notepad on a PC or something similar - then it's likely a permissions error.
What permissions does the file currently have? And what app did you edit the .xml with?
.
fffft said:
There is no obvious reason why it shouldn't work of you reverted the changes. But of course that is the ultimate value of a tested backup method.. that ability to roll the clock back and revert accidental or inexplicable changes.
If you are certain that you reverted the edits.. no typos or line feed errors e.g.you used a linux aware file editor.. not notepad on a PC or something similar - then it's likely a permissions error.
What permissions does the file currently have? And what app did you edit the .xml with?
.
Click to expand...
Click to collapse
As I said, I made a copy of the file and edited it with ES3 Note Editor right on the phone. Then I renamed the original file to platform.xml.bak, and copy/pasted the new platform.xml file into system/etc/permissions. When everything went haywire, I didn't try editing the file back (I couldn't - the toasts were popping up almost faster than I could clear them and Note Editor kept crashing), I just deleted the modified file and renamed platform.xml.bak back to platform.xml. I never edited the original file at all, so that's how I am 100% positive there are no errors in it - and that's why I can't figure out why renaming it back doesn't fix the mayhem.
Now I am a total weenie when it comes to Linux - I know OF the -rw-r--r-- permissions and what they mean, but I don't know how to make the phone tell me.. But in ES3 Explorer under file properties it simply says Readable: Yes Writable: Yes Hidden: No.
What sucks is I've had to go through and set the phone back up twice now, and lost all my settings/data in the meantime over this.. And I STILL don't have a working backup method, so if it borks again I'll be doing it all over again.. I am unwilling to blow the Knox fuse, hence not having a custom ROM at this point.. But I'm fine using Towelroot just so I can unbloat and install some things.
No one wishes for things to go awry. But of course they do sometimes and it would be imprudent not to plan for that eventuality. You didn't, nor do you seem to realize just how risky the changes you have been making are to your basic system stability. You are modifying critical, system level files and properties. The expected result if there is a typo or permissions error is chaos and corruption. If I was unable to have a working backup method (from refusing to increment Knox), I wouldn't risk the changes you are making.
It's all well and nice to customize features when things turn out smoothly. But all along you have been working without a safety net, so it's not reasonable to complain about the onerous amount of work it is to reinstall the firmware when fate bites you. You can't have it two ways at once. Either you incremement Knox, allowing inclusive backups and a way to recover. Or you accept that that you are taking crazy risks and having to start over the price for doing so.
You'd be in a better position if you had some basic tools to delineate what is going on. But you haven't taken the time to learn how to read file permissions. You are working deep within a linux filesystem, so this is a very basic and useful skill.
You don't use the same file manager as me, with mine (fx), you would long press and view details. Or even easier, use the ls command e.g. ls -la. There are a dozen ways you could check permissions and a simple forum search would elaborate on many of them. It sounds like you have permissions errors, i.e the system can't access the restored .xml sheet thereby causing numerous apps to crash.
.
Uhhh, except in order to implement the safety net I have to make this simple change to this one critical system file. It's no different than not having a means to backup before rooting/flashing (since TiBu requires root and you can't do a nandroid from stock recovery) and something goes wrong.
Adding the <group gid="media_rw" /> line to the profile.xml is posted in MANY locations as a "this is all you have to do" solution to this rather stupid quirk in 4.4, with no mention whatsoever of checking/verifying permissions or any other cautions, and other people are not having this issue.
I installed FX, and it lists the permissions of all the files (including the copies of platform.xml and platform.xml.bak that I had saved on the SD card, and the virgin file currently in use) as 0644.
Taz420nj said:
Uhhh, except in order to implement the safety net I have to make this simple change to this one critical system file
Click to expand...
Click to collapse
It's your phone so you can do as you like. But risks don't go away because you ignore them. There is nothing wrong with accepting a risk that you may have to start over if things go sideways. But plunging ahead recklessly then complaining about the work to recover is patently unreasonable
I had no problem effecting the changes you are attempting. Nor have many others. Perhaps you made a typo or followed a thread with erroneous advice. You may well have a permissions error because you didn't explicitly set it or check to see if it was correct.
It's all about attention to detail e.g. checking permissions and being prepared to deal with fallout when things go astray.
.