Not sure if this is the right spot or should actually go in development or here since I got lectured for putting it in development the last time.
But what I am trying to do is decompile the framework file from the stock rom and change a xml and recompile so as to bypass the tetheringprovison call.
The last time I did this on the HTC One S I ran into the trouble that the recompiled verision didn't work and ended up just opening the recompiled apk as a zip pulling the xml and replacing it in the original apk and load that.
That seemed to do the trick on that phone.
I think the problem is with compression as the output apk I get after recompiling is never even close to the original size.
I am having the same issue when it comes to the file for the gs3.
So far I haven't tested a recompiled one yet since I haven't rooted yet but just working on the file.
That is a job for a little later on my days off where I don't need my phone.
But with this one the file I am looking for once it is decompiled shows in res/values/arrays.xml for this one. How ever if I open either the source file or the recompiled when I don't see those values folders anywhere inside.
I am not sure if they are just hidden in something else or where the other files are.
I am using the newest verision of apk multi tool to recompiling and decompiling with compression values tested at 1 and 0.
both the framework-res.apk and twframework files are loaded into it as well as dependencies.
Any ideas on the best way of changing out this one file?
Or if anyone can recompile one with the following arrays.xml file instead that I have attached.
When it is decompiled it does show the right folder string "\res\values" and the array.xml inside I have just made a change to the xml that would not check the tethering provision on the device to allow the built in tether to work again. and a recompiled verision with that file will bypass any tethering check
any help would be greatly appreciated.
*edited* to include the arrays xml
Anything found in the "values" directory are not going to be visible inside the apk they are files used to build the actual apk that tells the other XML and other files where things are. Compression won't break an apk. What exact file are you editing? Also you are going to have to root if you want to put the modded file back on the device..
Sent from my SGH-T999 using Tapatalk 2
Yeah will be rooton on day off so i dont have to worry about it too much.
But with the arrays file that has a call in it to consult a different program before starting tethering.
I have changed that file so it dont check anymore.
This worked on it before with it just unlocked and a different apn update came and dont work anymore.
I am just confused that why it recompiled before for the one and wouldnt work right.
Based on what i read should be no problem as long as both frameworks are installed to the apk multitool
M9x3mos said:
Yeah will be rooton on day off so i dont have to worry about it too much.
But with the arrays file that has a call in it to consult a different program before starting tethering.
I have changed that file so it dont check anymore.
This worked on it before with it just unlocked and a different apn update came and dont work anymore.
I am just confused that why it recompiled before for the one and wouldnt work right.
Based on what i read should be no problem as long as both frameworks are installed to the apk multitool
Click to expand...
Click to collapse
I decompile framework-res.apk all the time with no issues. What is the exact issue you're having?
Sent from my SGH-T999 using Tapatalk 2
Just that when I decompile the framework-res.apk replace one xml file and recompile it using the multitool (am using the system apk with dependancies and linking the twframework) and then try and load it on the phone it seems to cause it to crash.
M9x3mos said:
Just that when I decompile the framework-res.apk replace one xml file and recompile it using the multitool (am using the system apk with dependancies and linking the twframework) and then try and load it on the phone it seems to cause it to crash.
Click to expand...
Click to collapse
You cannot replace XML files with other XML files. You have to open the XML in notepad++ and edit the actual lines of code then recompile. And I thought you weren't rooted so how are you able to push the app back to the device? Also, are you setting correct permissions for the newly compiled apk?
Sent from my SGH-T999 using Tapatalk 2
Yeah sorry for the late reply.
I am still tinkering with it. I wanted to root just till I had a day off that it wouldn't kill me to have the phone down for a little.
I will be rooting it in the next day or two since I am off.
After recompiling the APK and pulling the XML out of that one and putting in the original was the only way I could get the change to take on the One S.
When I was testing then, and will try the same procedure with the GS3, is after recompiling it with the tool I would put on sd card then using twrp copy to the phone and chmod 644
Out of curiosity what would be the DD command for backing up the recovery to the sd card?
I am having trouble finding that.
I would like to have that to flash back on the phone as I am planning to try this again from within twrp and see what happens.
From my understanding for triangle away to work you need to be on stock recovery right?
Ok
Now I have a new problem I have stumbled upon.
I have modded the file but when I try and push it with ADB from the pc even after system mounted it tells me that permission is denied.
Any ideas why that is happening?
Tried copying over with root explorer and that froze during copy and then resulted I'm a boot loop.
Not sure if that was because of the method or a problem with the file I made.
When decompiling does that need to be done with the twframework dependence or just simple decompile?
Also then after switching the arrays.xml I can just recompile with no compression or do I have to do something with keeping files.
Since the arrays is in something else I'm not sure what it shouldn't keep.
Any ideas would be greatly appreciated.
And I can't find if should either be zipaligned or signed. Some articles say signed some say don't sign system apks
Holy crap... youre allllllllllll over the place one bite at a time.. Quick answers first:
You do not need to backup your recovery. It is flashable via Odin and is much safer to flash via odin then it is using DD. With DD, you could flash the wrong partition by a simple slip of a keystroke. IE you typed '9' instead of '0'
Secondly: You got that 'freeze' issue using Root Explorer because framework-res.apk is constantly in use by the system. The BEST way to apply any system file is by creating a flashable zip file then applying it through recovery.
Thirdly: You do NOT need stock recovery to use Triangle Away, ive used it twice now with CWM as my recovery.
About your issues with decompiling recompiling.. I dont think its necessary to install the twframework... i dont recall if i had to when i was on Frosty, but doing "java -jar apktool.jar if <twframework here>" wouldnt hurt.
Also what exactly are you trying to modify?
Yeah Sorry about that
was just as I was reading other things and playing with it I kept coming across other questions.
Was thinking about that with the recovery so I am just going to skip doing that and flash a custom one then.
Was trying to do it without switching to avoid tripping the counter but seems like that is un neesicary
I am looking to stay on the stock software of the phone but want to edit the arrays file out of the framework so it don't check for tethering provisions.
Previously I was able to tether just by changing the APNs on the device now I can't do that. Says I don't have a tmo tathering plan. But also not with T-Mobile so that is problematic.
M9x3mos said:
Yeah Sorry about that
was just as I was reading other things and playing with it I kept coming across other questions.
Was thinking about that with the recovery so I am just going to skip doing that and flash a custom one then.
Was trying to do it without switching to avoid tripping the counter but seems like that is un neesicary
I am looking to stay on the stock software of the phone but want to edit the arrays file out of the framework so it don't check for tethering provisions.
Previously I was able to tether just by changing the APNs on the device now I can't do that. Says I don't have a tmo tathering plan. But also not with T-Mobile so that is problematic.
Click to expand...
Click to collapse
Quick question, are you running Stock Jellybean? And who is your carrier? There was a hacked apk that enabled tethering.. not sure what its called. just read about it. Never tried/downloaded it.
i got this to work last night for frosty 11.2.1, AllenD87 over at the att forums helped me get it right.
I have the stock jellybean on tmo device and use with simple mobile service
Just checked out the other one hack/mod that was looking like the same kind of mod where made changes to the framework and put it back.
different firmware so I don't that I should try that on mine.
i just decompiled framework-res.apk made the changes and recompiled. put it in the rom and flashed the whole rom.
Trying to keep the absolute stock rom.
I just installed twrp since it has file manager so I don't need to make a flashable zip but just copy over and chmod 0644
first attempt gave me a boot hang so I am going to try compiling with a different tool
Ok found out the problem was the multi tool inwas using
Used the beta instead and everything worked ok
Please help.. Updated my T-Mobile GS4 to 4.3 and tried to fix the root access that was ruined by update.. Seemed to root ok, but custom recovery wouldn't stick.. keeps reverting back to stock... I read that a fix was to just "re-name" the system/etc/install-recovery.sh file to resolve the issue... I remembered doing this for a different phone with similar problem without a hitch.. Renamed "system/etc/install-recovery.sh" to "system/etc/fix-annoying.bug" Not only did this renaming fail to resolve problem, but it was causing new ones Can't even install custom recovery now... So I simply tried to change name back to normal, and look for a different fix for the custom recovery problem. But "now" I'm stuck with problems in that "etc" directory.. It seems I was able to rename the "install-recovery.sh" file back to normal, but ever since making the changes I can't install the custom recovery at all.. Renaming appeared to restore the install-recovery.sh file, but it left a residual copy of that "fix-annoying.bug" file in the "etc" directory... I tried to delete it, but the system attempts to delete it, but just freezes/hangs on the "delete" operation until I perform a battery pull... So now, I can't even install a custom recovery.. before renaming that file I could at least flash the custom recovery.. Yes it would quickly revert back to stock, but at least it would install... Now I can't even perform the install.. I assume it's because the system/etc files are messed up... Is there a way to replace them with "stock" versions of those files or that directory? already tried restoring phone to factory but that process doesn't affect those files... any help would be greatly appreciated.
It would be best for you to just Odin back to stock
My S4 Is Insane
DEVIANT DEVELOPMENT
Hi,
ES File Explorer when editing the build.prop file, change the name of the file build.prop and I did build.prop_old. But the new build.prop file in / system / folder without copying it, I restarted the phone.
My phone is now stuck at the boot screen. I was using the stock ROM. Rooted phone but not installed CWM. With volume up and volume down buttons when I press the power button, the Android Recovery utiliy can reach the screen.
Is there any way build.prop file copy to the phone?
I can Stock ROM reload. However, I have important data on the phone. I do not want to reset the phone.
Edit - deleted
Will delete /data/ partition?
Edit - deleted
thanks for your quick answer. but i don't want to this. my personal data is important.
Edit - deleted
Good morning fellow XDA'ers
I recently rooted my s4 to remove all the bloatware, along with samsung hub which i needed to resume screen rotation. I found a solution to fix that which is to paste libgnustl_shared.so in the lib file, which i did, then changed the permission to that (rw--r--r). After getting out of that folder I changed the permission of the entire lib file to (rw--r--r) (original was rwe--re--re). I was wondering if there is a recovery that allowed me to change the permission, or even format only the system files. I just prefer not to reset it. Any ideas will help
I am currently on stock 4.4.4 rooted, no knox (removed that).
PM me anytime
Why not go back into the folder and reset permission and save.
How do you know you changed permission?
Pp.
PanchoPlanet said:
Why not go back into the folder and reset permission and save.
How do you know you changed permission?
Pp.
Click to expand...
Click to collapse
because once i did that everything started to force close, endlessly and would continue to give pop ups
I edited my build.prop to tweak my phone. I made a oopyof the file as backup and named it, build.prop-Copy.. When I rebooted the phone stays stuck in "Samsung Galaxy S3" logo. I entered TWRP recovery to see if I can rename the backed up copy to build.prop and then delete the bad build.prop. But when I enter one of the options for file system in recovery, I cant find the file!! I went into /system and all I saw there was bin folder. I swear to f***ing god this makes no sense!!
I also made a nandroid before using CWM recovery. But I uninstalled Rom Manager but not CWM. I dont know if its still there. And I dont know where exactly this nandroid is.
Please help me guys!! This is seriously killing me!