Related
I have been trying to edit an apk file, basically change some pngs. But after iam done I can't install it anymore. Why is that?
I used 7z to open the apk archive and replaced a few pngs. I put the apk on the sdcard, open to install, goes thru installing then fails. Any help would be appreciated.
Sent from my PC36100 using Tapatalk
dont you have to sign it again or something.. did you keep the same file names for the pngs?
I kept the same file names and sizes. Do I need to sign them?
jasongthang said:
dont you have to sign it again or something.. did you keep the same file names for the pngs?
Click to expand...
Click to collapse
Sent from my PC36100 using Tapatalk
just delete all the stuff in the META-INF folder, make edits, rezip, and resign. easy
What's the easiest way to sign an apk?
dkdude36 said:
just delete all the stuff in the META-INF folder, make edits, rezip, and resign. easy
Click to expand...
Click to collapse
Sent from my PC36100 using Tapatalk
soulassasin187 said:
What's the easiest way to sign an apk?
Sent from my PC36100 using Tapatalk
Click to expand...
Click to collapse
You need an apk signing tool. Basically, you put the modified apk, in the signer folder, without the meta-inf folder, and run a quick command, your signed apk is then spit out. I'll attach the one I use when I get back to my laptop.
Hey... I think this thing makes phone calls too!
Here is the APK Signing Tool that I use.
Just unzip it somewhere, put the apk in the auto sign folder, open a command prompt to the folder, and run sign.bat, it should run you through it. There's a read me file in there, read it in case I forgot something.
Also, when editing market apps, they need to be resigned, but if ur editing built in app from the system, they do not. The HTC signature needs to remain intact on those.
Worked perfectly. Thank you.
JTNiggle said:
Here is the APK Signing Tool that I use.
Just unzip it somewhere, put the apk in the auto sign folder, open a command prompt to the folder, and run sign.bat, it should run you through it. There's a read me file in there, read it in case I forgot something.
Also, when editing market apps, they need to be resigned, but if ur editing built in app from the system, they do not. The HTC signature needs to remain intact on those.
Click to expand...
Click to collapse
Sent from my PC36100 using Tapatalk
Trust me I have searched t'internet to no avail.
I don't need or want people asking me why I want to cheat in this game...needless to say I had a Galaxy S II stolen and lost a 12hour worth save of this game.
I'm amazed that the iPhone version has an easy hack... but nobody has been able to do this in the wonderful Android community....
Anyway... I offer a beer to whoever can help me with this (or the first person to haha)... I promise.
Thanks in advance.
Really, nobody has a clue on this one? I previously found a couple of properties files but for some reason can't find them now...
I'm serious about donation too
Sent from my GT-I9100 using XDA App
kickassdave said:
Really, nobody has a clue on this one? I previously found a couple of properties files but for some reason can't find them now...
I'm serious about donation too
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
Really not that much harder than doing it on the iphone.
If you got titanium backup then backup the game then open com.KelliNoda.Battleheart-20110702-203401.tar
you get a folder called data.
then thers some folders inside it.
correct path to the directory where the file is you want to edit is data\data\com.KelliNoda.Battleheart\shared_prefs
thers an XML file in there, edit that one to your liking.
For the gold i edited this line
<int name="1gold" value="xxx" />
where x is the amount of gold you currently have on the what i assume is first save
i changed it to <int name="1gold" value="999" />
and i had 999 gold.
basically just edit it along and see what happens.
Not really sure where this XML file is located on your phone but since titanium is free on market you might as well use it
Some quote for an easier editing
Also if you want to change their level just look for
1partyDB#level. Replace the # with 0-8. Each number corresponding to a party member.
To edit their power and defense, look for
1partyDB#power and 1partyDB#defense. Replace the # with 0-8.
Click to expand...
Click to collapse
the # correspond with the heroes that you have. 0 is lucille, 1 is shepherd. and so forth
here's an example:
<key>1partyDB1power</key> <---- the first '1' corresponds to the save file. the second '1' correspond to the character (shepherd)
<integer>75</integer> <---- change this to change his attack power.
take a look at the picture I've attached to get a better understanding.
Please note that this was done with version 1.0.0.
I haven't tried it with the newer version yet.
Edit: I tried it with the newer version and it works still.
Also the best way to look for the hero's value is just to search for their name and then most of the value you would want to change would be just right above their name. [power level is right below their name though]
Click to expand...
Click to collapse
To change lucilles level look for
1partyDB0level and change it to
Code:
<int name="1partyDB0level" value="30" />
for shepherd look for 1partyDB1level and chance it to
Code:
<int name="1partyDB1level" value="30" />
so both
here's my xml file http://www.mediafire.com/?27gtc0ch59exxob where i got all possible partymembers at lvl 30 and lucille/shepherd at lvl 40 and and little over 23 million gold.
firstly make sure you got a folder called TitaniumBackup on your SDcard, if its not there then open titanium backup and make a backup of battleheart or if you havnt made a backup of battleheart then make sure you do that before moving on.
Put the above mentioned file into the TitaniumBackup dir.
unmount your SDcard
run titanium and choose to restore data only to battleheart.
then run battleheart and you should find a savegame called goa200
I'm also sure you could simply do
Code:
ADB push com.KelliNoda.Battleheart.xml /data/data/com.KelliNoda.Battleheart/shared_prefs/
but i dont have adb on this laptop so i never tried
just make sure you kill the battleheard process first
Thank you very much for your help. I owe you a beer. On my phone just now but you got a donate option I can send to?
I managed to work out how to do it from your first post. Only wanted to modify the gold but again thank you very much for the other information as well
Sent from my GT-I9100 using XDA App
kickassdave said:
Thank you very much for your help. I owe you a beer. On my phone just now but you got a donate option I can send to?
I managed to work out how to do it from your first post. Only wanted to modify the gold but again thank you very much for the other information as well
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
No need for any donate. i play battleheart as well and never thought it was that easy to cheat =)
kickassdave said:
Anyway... I offer a beer to whoever can help me with this (or the first person to haha)... I promise.
Thanks in advance.
Click to expand...
Click to collapse
I did promise! I think it's fair... but if you are sure it's ok... fair enough!
kickassdave said:
I did promise! I think it's fair... but if you are sure it's ok... fair enough!
Click to expand...
Click to collapse
and i kindly refuse said offer as it wasnt much of a thing to do =)
goa200 said:
No need for any donate. i play battleheart as well and never thought it was that easy to cheat =)
Click to expand...
Click to collapse
That's very nice of you dude, we appreciate the help. Thank you!
no matter how i edited the value, it wont stick. it kept returning back to original value.
edited: finally got it to work, i was using root explorer and it automatically restore backup file. thanks for the guide.
MorRoquen said:
That's very nice of you dude, we appreciate the help. Thank you!
Click to expand...
Click to collapse
I knew I wasn't the only person trying to work out how to do this... ended up doing a wee level hack as well haha.
Sent from my GT-I9100 using XDA App
when i edit the values it dont change, it back to the original, why?
My values go back to normal or the game force closes, what am I doing wrong? Nd I'm using version 1.13 arm
goa200 said:
here's my xml file http://www.mediafire.com/?27gtc0ch59exxob where i got all possible partymembers at lvl 30 and lucille/shepherd at lvl 40 and and little over 23 million gold.
firstly make sure you got a folder called TitaniumBackup on your SDcard, if its not there then open titanium backup and make a backup of battleheart or if you havnt made a backup of battleheart then make sure you do that before moving on.
Put the above mentioned file into the TitaniumBackup dir.
unmount your SDcard
run titanium and choose to restore data only to battleheart.
then run battleheart and you should find a savegame called goa200
I'm also sure you could simply do
Code:
ADB push com.KelliNoda.Battleheart.xml /data/data/com.KelliNoda.Battleheart/shared_prefs/
but i dont have adb on this laptop so i never tried
just make sure you kill the battleheard process first
Click to expand...
Click to collapse
thanks for the tip!
just a noob question. how do i edit the xml file inside the .tar.gz file? i tried extracting the contents and then editing the xml file but winzip cannot put it back into the .tar.gz file.
Y0sHii said:
My values go back to normal or the game force closes, what am I doing wrong? Nd I'm using version 1.13 arm
Click to expand...
Click to collapse
two things:
1) don't edit in windows. it inserts carriage return characters not compatible in Android/Linux/Mac's/etc. Download a text editor onto your phone (I used TextWarrior) or do it in Linux
2) make sure edited xml file has same owner, group and permissions as original xml file. Root Explorer can easily change owner/group/permissions.
aussiebum said:
2) make sure edited xml file has same owner, group and permissions as original xml file. Root Explorer can easily change owner/group/permissions.
Click to expand...
Click to collapse
I couldn't set owner/group even after the file was in /data/data/com.KelliNoda.Battleheart/shared_prefs/. Instead I just checked read/write for "Others" under permissions and that made it show up.
aph said:
I couldn't set owner/group even after the file was in /data/data/com.KelliNoda.Battleheart/shared_prefs/. Instead I just checked read/write for "Others" under permissions and that made it show up.
Click to expand...
Click to collapse
You can do it on a PC
If you take out the file and edit it using notepad, you can overwrite the file within the tar using 7zip without having to decompile and recompile the tar.
Open it up using 7zip, browse to the location of the XML file and click and drag your edited version in to overwrite. You'll get a couple of messages, ok them both and you're done. Now just move the tar file back to your titanium backup folder overwriting the original. Now restore your backup and hey presto.
Sent from my GT-I9100 using XDA App
kickassdave said:
You can do it on a PC
If you take out the file and edit it using notepad, you can overwrite the file within the tar using 7zip without having to decompile and recompile the tar.
Open it up using 7zip, browse to the location of the XML file and click and drag your edited version in to overwrite. You'll get a couple of messages, ok them both and you're done. Now just move the tar file back to your titanium backup folder overwriting the original. Now restore your backup and hey presto.
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
Using TB restore data on Battleheart yields FC's for me 100% of the time. After a phone crash, I've been working on restoring my chars (not interested in cheating) for 4 days, trying at least 2 dozen potential solutions.
The "Others r/w" hack works for me at the moment and after days of effort, I'm sitting happy getting it to work at all.
If it breaks again I'll give your method a shot. Thanks for the input!
Everywhere i look redirects to apkmanager.. Which is not working for me.. Can someone tell me the manual way to recompile an apk.. Or an alternative to apk manager...
Sent from my SPH-D710 using XDA Premium App
What apps are you trying to mod?
What OS?
agat63 said:
What apps are you trying to mod?
What OS?
Click to expand...
Click to collapse
I got it figured out, was trying to mod Blend ICS apps.. need de-odexed ones..
Ok new question.. This is obviously my first time figuring out how to put these back together... heres my issue: Im using the multi-tool the app im adjusting is mms.apk.. after I extract and edit the images in the res folder I choose option 3 to zip it up and then 5 to zip align and then it creates the new unsigned apk, which I then rename to Mms.apk ... when I dump it onto my phone it doesnt have the icon in astro, it looks like the white icon with the gear on it.. when i try to install it gives a parsing error... I assume its because its a system file and I need to adb it onto the phone.. but why isnt it showing up with the original mms icon? and then secondly.. I cant get multitool to adb push to my galaxy s2 it just says waiting on device.. is there something I need to do besides usb debugging and connect it to the computer? sorry for all the noobness.. gotta start somewhere right?
Oh also Im using fireworks to edit the png's and exporting them back and i noticed when i sent it back out it was like 29kb so I image export and optimized down to 2kb does that even matter?
You can't dump unsigned app into your phone.
I never workred with tool you mentioned but I think you should have sign option there.
Or you just drug modified images and xml files from that unsigned app into your original one.
It has the option to have signed or unsigned ... both ways result in the same issue...
As I said try to drag modded files and png's into original app and try to flash that.
agat63 said:
As I said try to drag modded files and png's into original app and try to flash that.
Click to expand...
Click to collapse
Ok trying..
Worked like a charm.. Makes me wonder what the point of apk manager is at all? Just 7zip unzip.. Edit and rezip...
Sent from my SPH-D710 using XDA Premium App
You can't edit xml files if you just unzip them. You have to decompile them in order to be able to edit them.
Hi
If you want to disable led lights in bottom of phone, you need only a Root Explorer , go here:
/sys/class/leds/button-backlight
open this file ( brightness ) in text editor and change 1 to 0 , now save the file, it should turn off your led lights.
but it effect untill your phone is on after restart it goes back to defaults.
May be you can make script to apply at boot.
Make a zip that pushes the edited file into the system, perhaps i can make it
Sent from my HTC Sensation
iok1 said:
Make a zip that pushes the edited file into the system, perhaps i can make it
Sent from my HTC Sensation
Click to expand...
Click to collapse
Would be awesome , i can do that too if you'd like
Sent from my GT-S5660 using xda premium
please do that, thanks
i think it is no use.
中国人正在尝试提高!
(translation:Chinese people are trying to improve themselves!)
Thanks! On stock it was very annoying!
useful for at night, when reading with my dimmed screen
how do i edit button-backlights,it just show me a folder and when i opens that folder my root explorer crashes and then force closes.
muzaffarhassan64 said:
how do i edit button-backlights,it just show me a folder and when i opens that folder my root explorer crashes and then force closes.
Click to expand...
Click to collapse
Hold press on it and press edit
Sent from my GT-S5660 using xda premium
Thatgrass said:
Would be awesome , i can do that too if you'd like
Sent from my GT-S5660 using xda premium
Click to expand...
Click to collapse
if you can please do that ,i am waiting for your job.
Taka random meta inf folder and grab the file place it at system/lib
Modify updaterscript
Mount and extract system
Create .zip
test if it works
Done
Sent from my GT-S5660 using xda premium
muzaffarhassan64 said:
how do i edit button-backlights,it just show me a folder and when i opens that folder my root explorer crashes and then force closes.
Click to expand...
Click to collapse
Mine had an error opening it. Copy to SD card edit and out back and it works
Sent from my GT-I9300 using XDA
Hi, i have a theme installed on my sgs 2 but have found a pic that i would like to add to my settings tab, heres what i have done, i took the zip file i am using and extracted framework-res.apk, i then decompiled apk and i have deleted the pic thats on my settings now and replaced it with the pic i would like to use, recompiled apk and then rezipped, however when i flashed it all seemed to go ok but phone doesnt get past the first splash screen on boot, just stays black, i am not in anyway trying to make my own theme just would really like this pick in settings tab, could someone help me as to where i have gone wrong!! Thanks in advance
sn0wman1 said:
Hi, i have a theme installed on my sgs 2 but have found a pic that i would like to add to my settings tab, heres what i have done, i took the zip file i am using and extracted framework-res.apk, i then decompiled apk and i have deleted the pic thats on my settings now and replaced it with the pic i would like to use, recompiled apk and then rezipped, however when i flashed it all seemed to go ok but phone doesnt get past the first splash screen on boot, just stays black, i am not in anyway trying to make my own theme just would really like this pick in settings tab, could someone help me as to where i have gone wrong!! Thanks in advance
Click to expand...
Click to collapse
54 views and no replies, can any one help, please!! :crying:
I assume the original image is actually in framework-res.apk?
If so, I suspect it's a decompiling/recompiling problem.
Also, if it's just a png or jpg you're replacing, there's no need to decompile - just drop the new image into the correct folder in the apk using 7-Zip.
Spannaa said:
I assume the original image is actually in framework-res.apk?
If so, I suspect it's a decompiling/recompiling problem.
Also, if it's just a png or jpg you're replacing, there's no need to decompile - just drop the new image into the correct folder in the apk using 7-Zip.
Click to expand...
Click to collapse
Hi, thanks for reply, basically i have just taken a pic from someoneone elses theme and swapped pic with that of the theme i am using so should be right format (right?) but how when i have extracted with 7zip how do i get it all back as .apk file... i used a program called formatter to do it first time!!
Don't extract it, make sure the image you want to replace is named the same and it isn't a .9.png...open the framework-res with 7zip (open archive) navigate to the necessary folder and drop your new png in. That should work
If you extract it you break the signature, that's why you're getting a bootloop.
Sent from my GT-I9100 using xda premium
sn0wman1 said:
Hi, thanks for reply, basically i have just taken a pic from someoneone elses theme and swapped pic with that of the theme i am using so should be right format (right?) but how when i have extracted with 7zip how do i get it all back as .apk file... i used a program called formatter to do it first time!!
Click to expand...
Click to collapse
Spannaa said:
I assume the original image is actually in framework-res.apk?
If so, I suspect it's a decompiling/recompiling problem.
Also, if it's just a png or jpg you're replacing, there's no need to decompile - just drop the new image into the correct folder in the apk using 7-Zip.
Click to expand...
Click to collapse
Thanks matey, just done itand it works great, didnt realise it was that easy...
EDIT: Also thanks to you m1keyb, you answered as i sent this post!! lol :good:
If the picture you're replacing is in the same apk and is the same format (png, jpg) and has the same name and is the same size (px x px) then it ought to be OK.
If the picture you want use is OK, open the apk with 7-Zip (don't unzip it), and simply drop the picture in the correct folder and it'll replace the picture that's already there.
Edit: sn0wman1 edited the post I was replying to and m1keyb replied too - lol, I'm slow!
Hey, you guys seem to know what you are talking about!!, is there a way to get a full image on my lockscreen instead of having to crop about a third of it.. Thanks again for your help
sn0wman1 said:
Hey, you guys seem to know what you are talking about!!, is there a way to get a full image on my lockscreen instead of having to crop about a third of it.. Thanks again for your help
Click to expand...
Click to collapse
resize the pic to same size as lockscreen:laugh:
Thanks matey, what size would that be?
SGS2 - 480px X 800px