[Q] framework decompile help. - T-Mobile, Samsung Galaxy SIII

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

Related

[Q] Stock MMS app

I installed the stock MMS.apk file on my de'odexed stock rom (rooted of course). Everything worked well and the app runs, but when reading text threads there is an ugly white border around the edge of the screen, its strange. Its not present when viewing the list of conversations, only in the thread view. I'm not sure if that's how its supposed to look or not, but if not, anyone have any idea how to fix this?
I'll get a screenshot up as soon as I get home.
I first obtained the MMS.apk from the cyanogen rom, then thinking that it might be modified and thus creating my problem, I grabbed the AOSP version from this thread:
http://forum.xda-developers.com/showthread.php?t=789493
Any help will be greatly appreciated.
UPDATE:
Found another thread where people are experiencing the same issue, apparently its a problem with how sense handles the application:
http://forum.xda-developers.com/showthread.php?t=752604
I attempted to open up the Mms.apk (AOSP version) with APKtool and play around with the xml files for the UI, but wasn't able to get it to recompile and test any changes I made, the app would just crash on launch. I simply made a few changes to the colors, but I admittedly don't really know what I'm doing and it wouldn't run. If anyone who's more experienced in this area could offer some advice I'll try again.
That's a picture of the issue, it appears in both landscape and portrait mode.
Texts were blacked out just for privacy sake.
Well after a few hours of messing around in the XML files for the AOSP messaging app, I was able to find a solution to this issue. I modified the XML file to have it correctly display the black color background when using the black theme. I was not able to eliminate the border entirely, but by changing the scrollbar type from Inset to Overlay I was able to make it uniform and far more visually pleasing.
I have attached my modified Mms.apk file, feel free to test it out.
For the specifics of what I did for those who are interested:
Two files were modified in the apk
- /res/layout/compose_message_activity.xml
- /res/layout/compose_message_activity_black.xml
In both files I changed the scrollbarStyle propery to "insideOverlay", in addition to removing the reference to always show the scrollbar track.
In the black xml file I changed the background color to "@android:color/black".
The original XML files were extracted using APKTool and Recompiled to their binary format, then reinserted into the original apk without resigning.
This is awesome! ... Except it doesn't filter out the VVM message streams that come through. :|
I haven't encountered this problem though I use google voice so I'm not really sure what it is you're referring to.
Sent from my PC36100 using XDA App
ty!
beautiful ty!!!!!!!!!
Imma cry
I cant send mms!
Try turning off wifi while sending/receiving mms
no wifi
i don't have wifi on when i do this i just have 3g on so i can send mms!
i zipped the file with the one that had the white outline .is there a way to make this new apk. file into a .zip file for me ?
I'd imagine you could simply replace the APK file in your zip with my modified one and install that way. Use a program like winrar or 7zip to replace the apk within the zip.
tehpsyc said:
I'd imagine you could simply replace the APK file in your zip with my modified one and install that way. Use a program like winrar or 7zip to replace the apk within the zip.
Click to expand...
Click to collapse
sorry but i cant find either of thoses programs u mention to replace the APK file in my zip with your modified version .is there another program or a manual way of doing this process ?
how do i install this? since it's an APK, i thought i'd just install it from Astro but it says it's already installed and asked if i wanted to uninstall.
To install this you need to either delete or rename the Mms.apk that's already on your phone in the /system/app directory (I just rename to Mms.apk.bak) and then copy the modified one into that same directory followed by a restart of the phone. Because its a system app you cant install it the same way you would a regular apk, at least from my understanding.
You will need to get write access to the system directory to accomplish this (I used an app on the market called root explorer, though you can also do all this through the ADB shell)

[Q] question on editing framework-res.apk

hey guys.
i'm having a frustrating issue when editing framework-res.apk to include the rectangle battery mod.
this is a long post...please DO NOT POST GENERIC ANSWERS WITHOUT READING THE POST FIRST!!!
i'm used to editing framework-res.apk and all other .apks on my phone for various purposes. i use a combination of 7zip and apkmanager 4.9 to extract, replace, decompile/recompile, etc. depending on what i'm doing.
at this point here's what i'm trying to do:
DaGunn provided me with a modified framework-res.apk which includes a buttonized power control widget (from JsChiSurf's thread). this is v2.0 (on the 3.29 ota). previously i had v1.0 which I had fully customized to my liking.
the file provided to me by DaGunn has the buttonized look, and some smooth sense elements, as well as the super circle battery meter.
i opened framework-res.apk he provided with 7zip and replaced all the 901 images in res/drawable-hdpi with my own 901 image files from my existing framework. these files all have the same exact name and same exact extensions. (hence when I drag and drop into the new framework-res.apk in 7zip i get a direct replacement rather than having extra files).
this has worked countless times in the past. as a matter of fact, it worked 99% of the way this time. all the framework images went back to my customized images. except the battery disappeared.
i narrowed it down to the battery images. if i leave his 101 circle battery .pngs and replace every other file in framework-res, it works just fine. all my images show and the battery shows up in the circle style. if i then just replace his 101 circle battery .pngs with my 101 matted blues rectangle battery .pngs, which are the same exact names (i checked!) and extension, and after I optimized them almost exactly the same file size as well, everything goes to crap. the battery doesn't show up at all in the title bar.
if i plug in the phone, the rectangle charging animation works, the download animation works, all other smooth sense animations that I have replaced with the mattedblues files from my previous framework work. except for the battery.
now, if his .pngs work, and mine replace his directly with the same exact name and extension, why would the battery display suddenly disappear?!
I'm being told it has to do with resource IDs, but here's the problem. I was provided a "guide" on how to properly modify framework-res by one of the guys involved in MattedBlues (beatblaster). in it I was told that I only need to recompile framework-res after adding NEW .pngs, that if the .pngs were already accounted for in resources.arsc then trying to recompile would throw errors and instead I should replace those .pngs with 7zip. that's what i'm trying to do but as I said, then the battery meter doesn't work.
if i decompile DaGunn's original file, I'm able to recompile it just fine. keep in mind this file already has a lot of modifications on it as it is. but if i decompile his framework, and I replace his .pngs with mine, and try to recompile, I get thousands of lines of error in the log. all having to do with public.xml, which I'm being told goes back to resource IDs.
what am i missing here? i know how to remove the battery display from the title bar so I dont have that empty space, but I do enjoy my percentage battery and I would like to get this to work!
any input will be greatly appreciated...
+5 points for you if you read this far!
I'm not clear if you are recompiling or just dropping the images in, but if you are recompiling try making all your xml changes without adding the new images. Then after its compiled drop your new images in.
Sent from my PC36100 using XDA App
i'm not modifying any xmls. only replacing .pngs. it's specifically clarified in the OP.
the existing framework, with its modified .xmls and .pngs as given to me decompiles and recompiles just fine. if i decompile, then replace the .pngs with my own, and try to recompile, then it gives error. if i just open it in 7zip and replace the .pngs with my own, the battery disappears, but no force closes or error messages.
anyone else?
Are any of the .png files you are replacing have the 9.png extension? I know modifying these is very tedious and requires a more difficult process. Also can u post the errors in the apkmanager log?
Sent from my DROIDX using XDA App
nope. the files are stat_sys_battery_0 through stat_sys_battery_100. all .png not a single one in any other extension.
i can't post the apk manager log because it is literally thousands of lines of errors.
what I can do is give you the framework as I have it, working with his battery .pngs and a separate .zip with my battery .pngs, so you can try to do it yourself and see the problem/compile errors.
it really is weird...or stupidly simple!
Firstly you SHOULD NOT be decompiling just to swap images, even .9 pngs. You only need to decompile if you are editing xml files which by reading your post you aren't. To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
t3project said:
Firstly you SHOULD NOT be decompiling just to swap images, even .9 pngs. You only need to decompile if you are editing xml files which by reading your post you aren't. To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
Click to expand...
Click to collapse
+1
The reason I was confused about what you were trying to accomplish is because you don't need to decompile unless changing xml's.
Thats what I do for non system apps. I'll give it a try in the morning and see if it makes a difference.
Swyped from my HTC Evo 4G on the MetroPCS 1X network!
Ok first if you go to recompile something and you get errors usally the first error is the one causing the problem. Look and see what the first error is and fix it, like has been said what you are trying to do using 7 zip is a good way to do it, not decompiling. You said this is how you prefer way to do it anyway so that's good.
Second I have found at times that 7 zip does not properly replace threw images so weird things happen, only happens sometimes. With that said try using apk manager to unzip the apk replace the images and rezip it do not sign it. See if that works
Third. If all else fails download nijamorph from the market. Put the images you want on your scard where I can find them easy. Open nijamorph and start a new project navigate to your framework-res.apk.from here you can do two things first you can press existing project and find what you are looking for and change one at a time or the easy way. Close the app open your favorite file manager find the pngs you are going to use, copy them, then navigate to android themes/workspace in there you will find the framework-resapk folder, in there is everything just like the apk so paste the files were they go (that last step can all be done on the computer if that is easier for you.) Next open your nijamorph app and press finish project follow the prompts and let it do its thing. If your phone does not reboot reboot it.you should be good to go.
Like always do a backup before doing these steps
Good luck
Sent from my unrEVOked using xda app
Max_Pain said:
Thats what I do for non system apps. I'll give it a try in the morning and see if it makes a difference.
Swyped from my HTC Evo 4G on the MetroPCS 1X network!
Click to expand...
Click to collapse
it works the same way when replacing pngs. compiling and recompiling is only needed if making xml/code changes. i had to learn this the hard way too. just make sure you sign system apps with option 12 instead of option 4 like you would with a non-system app.
t3project said:
To change pngs only, you should use option 1 (extract) in apk manager. Then change all your pngs you want changed. Use option 3 to recompress your framework. Make sure to tell it that it is a system apk, and then use option 12 to resign. You should be good to go.
Click to expand...
Click to collapse
this worked!
dont know why I would have to extract, replace, compress, as I've NEVER done that with framework-res.apk, only when editing apps that need to be resigned. oh well, it worked
I think you misunderstood what I told you in the guide I gave you which is you only need to decompile/recompile when you are making XML code changes as stated above in a previous post. When I wrote that guide for you I wrote it thinking you wanted to add more features to the original power control widgets (such as smooth mods). If you want to simply replace PNGs, as stated previously, all you need to do is replace the PNGs without decompiling and recompiling.
In this instance, the problem you're running into is that you're trying to compile the framework using already-customized PNGs which will not work (another point that was stated in the guide as well )
So, in conclusion, if all you want to do is change the PNGs all you gotta do is (and you probably already know this but I'm including it to be thorough):
- Open archive (framework) in 7-zip
- Navigate to framework-res/res/drawable-hdpi
- Add your desired PNGs into the 7-zip window
- Close the 7-zip window and answer yes when 7zip asks if you want to update the archive
- Flash framework onto your phone
- All should be well
- When using this method there is no signing necessary!
Again, as stated previously, the only time you need to decompile/recompile is when you're going to edit an XML (or make any other code changes). So, for a final example of this, let's say you wanted to take DaGunn's power widgets framework but you wanted to change the "text highlight" color. What you would do then is this:
- Decompile DaGunn's framework in APK manager (option 9)
- Navigate to /projects/framework-res.apk/values/styles..xml
- Search for for "<item name="textColorHighlight">" and change the color HEX code
- Save the changes to styles.xml
- Compile the framework in APK manager (option 11)
- When asked if this is a system apk answer Y for yes
- When asked if you want to copy additional files to reduce the amount of errors answer Y for yes
- When prompted about the "keep" folder, open a file manager and navigate to /<apk_manager_folder>/keep and DELETE the resources.arsc file
- Go back to the APK manager window and press any button to finish the compile process
- Back in your file manager, go back to /<apk_manager_folder>/place-apk-here-for-modding/ folder, grab the unsignedFramework-res.apk, rename it to framework-res.apk and flash it however you flash it.
- Test your changes (in this example, the text highlight color)
This concludes my post.
thanks for the clarification beat.
but the problem was I was just opening framework-res.apk with 7zip, doing it like you're saying to do in the first part of your post above, and the battery meter would disappear instead of showing the mattedblues battery images instead of the circle ones.
if i left his .pngs in, the battery would show. if i replaced his with mine using 7zip, the battery would disappear.
this confused me because this is exactly the way that I've been integrating mattedblues into every framework i get. i open in 7zip, replace existing files with my own, and bam, everything works. this time it didnt!
this got fixed by extracting, replacing, and compressing again in apk manager 4.9.
i tried decompiling/recompiling simply because I was so out of ideas as to how else to go about it. I don't need to make any .xml changes to DaGunn's file because he had already integrated most of smooth sense with the percentage battery and v2 of the power widgets
anyways, thanks for the clarification.
beatblaster said:
So, in conclusion, if all you want to do is change the PNGs all you gotta do is (and you probably already know this but I'm including it to be thorough):
- Open archive (framework) in 7-zip
- Navigate to framework-res/res/drawable-hdpi
- Add your desired PNGs into the 7-zip window
- Close the 7-zip window and answer yes when 7zip asks if you want to update the archive
- Flash framework onto your phone
- All should be well
- When using this method there is no signing necessary!
Click to expand...
Click to collapse
max, not sure why this wouldnt work for you.
t3project said:
max, not sure why this wouldnt work for you.
Click to expand...
Click to collapse
no. this method is SUPPOSED TO WORK, as I said in the original post. this is how I've done every single change to framework-res.apk in the past. that is why I felt the need to ask for help. because the same thing that has always worked, suddenly wasn't working anymore!
for some reason, using 7zip WAS NOT WORKING to replace the battery .pngs....but ONLY those files. every other file was replaced using 7zip and they all worked. the only files I ended up having to replace through apk manager extract/compress method you gave me were the battery images.
thanks everyone
Max_Pain said:
no. this method is SUPPOSED TO WORK, as I said in the original post. this is how I've done every single change to framework-res.apk in the past. that is why I felt the need to ask for help. because the same thing that has always worked, suddenly wasn't working anymore!
for some reason, using 7zip WAS NOT WORKING to replace the battery .pngs....but ONLY those files. every other file was replaced using 7zip and they all worked. the only files I ended up having to replace through apk manager extract/compress method you gave me were the battery images.
thanks everyone
Click to expand...
Click to collapse
ohh i know. i use the way i told you because i just like to see the images while im playing with them. that way i know for sure whats up.

APN-Problems? - Maybe a solution to it.

Hey all,
I read some have problems setting up an apn in the settings menu, caused by a so-called funny sim. I did not encounter such a problem with the roms I used from the devs here.
But I want to give a you something that might work for you besides other funny solutions I read. ^^
Here we go:
Firstly do a backup of your device or just the file were are going to change, do it like you prefer. Saver is an full nand-backup.
Secondly grab the Rom you want to flash and replace the apns-conf.xml in /system/etc inside the zip with the one I provide.
Thirdly wipe everything like always and flash the zip, reboot and be happy if apns get loaded for you. ;-)
If it is not, maybe your carrier is not in the file, so check this first.
This may not work:
Second grab the apns-conf.xml attached with this post. Extract the xml file.
Copy the file onto your device and than move it with an root browser to /system/etc. You could also adb push the file to /system/etc, if you know how to.
I think a reboot is necessary.
You could also push the file via adb when you are in the recovery after doing a backup, so you haven't to start up the system move the file and reboot again.
Let me know if it works, other ways to solve this are welcome.
Hope it helps some of you.
Credits to the Cyanogenmod-Team and the others how worked on this file.
lightwars said:
Hey all,
I read some have problems setting up an apn in the settings menu, caused by a so-called funny sim. I did not encounter such a problem with the roms I used from the devs here.
But I want to give a you something that might work for you besides other funny solutions I read. ^^
Here we go:
First do a backup of your device or just the file were are going to change, do it like you prefer. Saver is an full nand-backup.
Second grab the apns-conf.xml attached with this post. Extract the xml file.
Copy the file onto your device and than move it with an root browser to /system/etc. You could also adb push the file to /system/etc, if you know how to.
I think a reboot is necessary.
You could also push the file via adb when you are in the recovery after doing a backup, so you haven't to start up the system move the file and reboot again.
Let me know if it works, other ways to solve this are welcome.
Hope it helps some of you.
Click to expand...
Click to collapse
The zip file is damaged. From what I found, the version of the apns could be the cause of this problem.
Reupload
yewsiong said:
The zip file is damaged. From what I found, the version of the apns could be the cause of this problem.
Click to expand...
Click to collapse
Yes, right you are. I reuploaded a working one. Tried it myself ;-)
lightwars said:
Yes, right you are. I reuploaded a working one. Tried it myself ;-)
Click to expand...
Click to collapse
Did u try it on Cow v7 ROM?
yewsiong said:
Did u try it on Cow v7 ROM?
Click to expand...
Click to collapse
First like wrote, I never encounter some issues relating apn.
But I tested Cow v7 Rom.
I take the zip file and replace the apn-conf.xml in the archive with the one I provided. Then I wipe everything and flashed the Zip.
After the boot I look up the apn settings in the menu and a set of entries were loaded for my carrier. So, I would say for me I worked.
Just doing a little other way, than I described in OP. I will write it down there.
lightwars said:
First like wrote, I never encounter some issues relating apn.
But I tested Cow v7 Rom.
I take the zip file and replace the apn-conf.xml in the archive with the one I provided. Then I wipe everything and flashed the Zip.
After the boot I look up the apn settings in the menu and a set of entries were loaded for my carrier. So, I would say for me I worked.
Just doing a little other way, than I described in OP. I will write it down there.
Click to expand...
Click to collapse
Yup~ I have tried it too. It works~
I try on cm9 but unlucky for me, it still didn't work.. I still can not add apn in my device..
But thanks anyways..
^.^
Sent from my GT-I8150 using XDA
yewsiong said:
Yup~ I have tried it too. It works~
Click to expand...
Click to collapse
Great, it did for you. ^^
yufenn said:
I try on cm9 but unlucky for me, it still didn't work.. I still can not add apn in my device..
But thanks anyways..
^.^
Sent from my GT-I8150 using XDA
Click to expand...
Click to collapse
Sorry to hear, have you look into the file, if your carrier is listed. Just search inside the file for the name, cause there are so many. If not try to copy a existing apn config in the file and change it to your carriers settings.
By the way if it works, you don't have to set up a apn, cause it will be loaded after the start, maybe just wait a minute or soo. But it could be that CM9 and ICS in general handles apns a different way.
Have you got an good idea for helping the others??
Hey,
I want to encourrage everyone to post, if he or she has an idea to try out.
Am I thought falsely that more than just a handfull had problems with apn settings?!?
And if you had tried out your idea, post it please.
Maybe another solution could be in the frame-res.apk there you found the file apns.xml. But I was not successful in building the apk with apktool after modifying it.
Can some try it, or know a way to build the apk from a folder?
Gesendet von meinem GT-I8150
lightwars said:
Maybe another solution could be in the frame-res.apk there you found the file apns.xml. But I was not successful in building the apk with apktool after modifying it.
Can some try it, or know a way to build the apk from a folder?
Gesendet von meinem GT-I8150
Click to expand...
Click to collapse
After u recompile it by using apktool, there will be an apk in dist folder. U need to sign the apk before using it.
Alternatively, after recompiling the apk, there will be a folder called "build" and it has a file called resources.arsc, use 7-zip to open the original framework-res.apk and replace the resources.arsc
Then u are done.
yewsiong said:
After u recompile it by using apktool, there will be an apk in dist folder. U need to sign the apk before using it.
Alternatively, after recompiling the apk, there will be a folder called "build" and it has a file called resources.arsc, use 7-zip to open the original framework-res.apk and replace the resources.arsc
Then u are done.
Click to expand...
Click to collapse
Thanks,I read about that how to do it and not take the own, which was built. But the apktool fail to built anything.I will upload a pic soon, to show you.
Gesendet von meinem GT-I8150
lightwars said:
Thanks,I read about that how to do it and not take the own, which was built. But the apktool fail to built anything.I will upload a pic soon, to show you.
Gesendet von meinem GT-I8150
Click to expand...
Click to collapse
That will be great. Did u use the correct command?
for decompile:
Code:
apktool d -f framework-res.apk
for recompile
Code:
apktool b -f framework-res
Yeah I used them, but never mind. Somehow it worked this time, but with some errors, maybe I changed the file in a way it could not be resolved from the compiler or something like this.
I also use now a other program to modify it.
Alternative Method
My solution is slightly different
(note your phone must be rooted)
Install stock rom 2.3.6 for your region and set up phone.
Using root explorer copy csc folder, found in the system folder, to your computer.
Using WinRAR or similar open (do not extract) the rom zip you wish to flash ( note only roms based on 2.3.6 will work), drill down to the system and open it if you find a csc folder there open it and compare with yours, most custom roms don't have this folder.
Add your csc folder using WinRAR and check it has worked Close WinRAR it should have rebuilt the zip.

7-zip cant modify files

I am looking to modify my phone.apk to change the color of a few buttons and the android guy that shows up when in a call. I have done this in the past and it seemed like then it was as simple as deleting the files in 7-zip and replacing with the file I wanted. Am I missing something or is it not that simple. Every time I try to move a file or delete it its says "not Implimented" or un supported compression method. I know how to push and pull files through adb so if I could just get the .png images where I want them then I would be all set. I have looked everywhere but cant seem to come up with a solution.
Thanks Jason
PS. the files are from another rom I am simply trying to use them in my current rom so the .png file should not be corrupt or broken.
You can't edit apk's with any zip extractors
Sent from my Incredible using xda premium
Albinoman said:
You can't edit apk's with any zip extractors
Sent from my Incredible using xda premium
Click to expand...
Click to collapse
Not true, regular image files can (should) be able to be draged out, edited, and droped back in an apk using 7-zip.
nighthawklude99 said:
I am looking to modify my phone.apk to change the color of a few buttons and the android guy that shows up when in a call. I have done this in the past and it seemed like then it was as simple as deleting the files in 7-zip and replacing with the file I wanted. Am I missing something or is it not that simple. Every time I try to move a file or delete it its says "not Implimented" or un supported compression method. I know how to push and pull files through adb so if I could just get the .png images where I want them then I would be all set. I have looked everywhere but cant seem to come up with a solution.
Thanks Jason
PS. the files are from another rom I am simply trying to use them in my current rom so the .png file should not be corrupt or broken.
Click to expand...
Click to collapse
My guess would be that the apk was decompiled at some point before, but not recompiled right, or with the right program. Which phone.apk are you having issues with, the one on your phone or the one your pulling the pngs from?
I am having problems with the phone.apk I pull from my phone with adb, with the phone.apk that is in the original rom, and the phone.apk that is in a nanadroid back up. The rom I am running is anthem 3.3. I am starting to think that there is a problem with 7-zip on my computer. Is there a setting I need to change? I have even ran 7-zip as administrator to see if that helped.
nighthawklude99 said:
I am having problems with the phone.apk I pull from my phone with adb, with the phone.apk that is in the original rom, and the phone.apk that is in a nanadroid back up. The rom I am running is anthem 3.3. I am starting to think that there is a problem with 7-zip on my computer. Is there a setting I need to change? I have even ran 7-zip as administrator to see if that helped.
Click to expand...
Click to collapse
Sounds like your install of 7z may be messed up. I just tried it to make sure something didnt change in an update and it works fine for me still with default configuration.

[Q] Edit system/framework/services.jar ?

I got tired of waiting for a nice custom ROM or Xposed to drop, so I decided to look into doing my own mods. I've been wanting to learn for the longest time.
My Googling suggests things I mostly want (such as the five-way-reboot and disabling of screen-on when plugged/unplugged) are options that can be change in services.jar.
But I'm not finding the classes.dex in my services.jar file.
Can anyone point me in the right direction to get started?
Maybe toss a link my way to read?
I got brain tired after 20 minutes of Googling only led me to how-to guides that aren't working out because I don't have this classes.dex thing?
CZ Eddie said:
I got tired of waiting for a nice custom ROM or Xposed to drop, so I decided to look into doing my own mods. I've been wanting to learn for the longest time.
My Googling suggests things I mostly want (such as the five-way-reboot and disabling of screen-on when plugged/unplugged) are options that can be change in services.jar.
But I'm not finding the classes.dex in my services.jar file.
Can anyone point me in the right direction to get started?
Maybe toss a link my way to read?
Click to expand...
Click to collapse
Pull the .jar file to your local machine and open it in an archiver that supports .zip compression. Many files including 'classes.dex' are inside the .jar file. Simplest way is to extract the classes.dex then decompile it using backsmali.
mostyle said:
Pull the .jar file to your local machine and open it in an archiver that supports .zip compression.
Click to expand...
Click to collapse
Right, but there is only one file inside the services.jar and it's not classes.dex. It's just the META-INF folder wiht MANIFEST.MF inside.
As well, the services.jar is only 318 Bytes.
I use 7zip on my computer or Root Explorer on the phone.
Good Job Eddie!
While you are learning can you incorporate a dark background in the app drawer.
Keep up the good work.
CZ Eddie said:
Right, but there is only one file inside the services.jar and it's not classes.dex. It's just the META-INF folder wiht MANIFEST.MF inside.
As well, the services.jar is only 318 Bytes.
I use 7zip on my computer or Root Explorer on the phone.
Click to expand...
Click to collapse
Same here. I suspect the dex code you are looking for has moved either to an APK or a different JAR.
Have you looked at the classes.dex in framework-res.apk?
There are a LOT of 318 byte files in /system/framework. This tells me most definitely that the code has been offloaded elsewhere and that these files were likely left as legacy reference. Apologies for not looking at the files before replying.
Now that you mention it, I did try all the other jar's in /system/framework.
The only one that had a classes.dex was embmslibrary.jar.
But I got errors when trying to unpack it.
Wish I'd saved the errors to post here.
Figured I'd give some of the ROM building utilities a go but have not had success yet. I'm only still just starting out though.
I'm thinking we'll probably need an all new ROM Kitchen for 7.1 due to many significant changes.
Which are probably what's holding up ROM development so far.
I got the Nexu.... uh, Pixel because I figured we'd have a bunch of cool AOSP ROM's within a week or two. doh.
DIXZ06 said:
Good Job Eddie!
While you are learning can you incorporate a dark background in the app drawer.
Keep up the good work.
Click to expand...
Click to collapse
There are already mods out there for the Pixel Launcher.
I use Nova Launcher though, which has color and transparency options built right into it.
XDA's Chef Central subforum:
http://forum.xda-developers.com/chef-central/android
The reason you're not seeing the classes.dex file in any of the jar files is because the system is odexed. The classes.dex file is actually services.odex in /system/framework/oat/arm64.
Good to know, thank you!
It's a bummer about all these Android Kitchen variations out there.
None work with the Pixel yet.
I'm not having warm & fuzzy feelings about development for this phone.
Has anyone found a way to deodex the Pixel 7.1 yet?
I'm not finding any "utilities" that support Pixel yet.
disable screen on when plugged in can be disabled by editing "bools.xml" in the framework-res.apk
i can do it for you if you want
flex360 said:
disable screen on when plugged in can be disabled by editing "bools.xml" in the framework-res.apk
i can do it for you if you want
Click to expand...
Click to collapse
Thank you!
Holy moly, I've already found 18 bools.xml's in framework-res.apk and there are still about two hundred folders to manually open to see what's in there.
Do you know which one to edit? I'd like to learn all this myself.
I'm using APK Studio and really wish it had a better search function.
CZ Eddie said:
Thank you!
Holy moly, I've already found 18 bools.xml's in framework-res.apk and there are still about two hundred folders to manually open to see what's in there.
Do you know which one to edit? I'd like to learn all this myself.
I'm using APK Studio and really wish it had a better search function.
Click to expand...
Click to collapse
the one in the "values" folder
Ahh. There are like five million Values folders.
But only one value folder.
I missed that. lol
Thanks
CZ Eddie said:
Thank you!
Holy moly, I've already found 18 bools.xml's in framework-res.apk and there are still about two hundred folders to manually open to see what's in there.
Do you know which one to edit? I'd like to learn all this myself.
I'm using APK Studio and really wish it had a better search function.
Click to expand...
Click to collapse
And you thought this was going to be easy why??? LOL
You're not kidding.
Just one roadblock after another.
And all my Googling leads to old research/faq's that just don't seem to work on the Pixel.
I need to go buy an old Nexus running Gingerbread just to get some of this stuff to work.
My current roadblock is trying to write to /system via ADB.
It pretends to let me write.
But after a reboot, all my changes are gone and it's gone back to the original files again.
adb root
adb remount
adb push filename /system/folder/filename.
It's like yeahhhh, 100% write complete.
PSYCH! Then you reboot and it's like you never wrote anything.
I even tried replacing the framework file using Root Explorer but it just immediately reboots and bootloops.
I did sign the apk succesfully before trying that.
FINALLY I have success.
I'm now able to unplug my phone without the screen turning on.
This was a huge frustration when car-docked.
Now I can work on a few other things and come back and play with some more mods later. :good:
So my stumbling blocks were permissions (duh) and being unable to decompile, recompile and then sign the apk and get it onto the phone without bootlooping.
I still don't have a good way of dcompiling/recompiling without doing some 7zip magic afterwards. But at least I have some success and a footprint to move forward with learning some further mods. :good:
And I had to get this done using Root Explorer, so I still need to figure out a proper way to mount the system and push system files with ADB and get them to stick.
Well, so my ultimate goal was to do a bunch of mods and then release a custom stock-based ROM to the community.
But holy moly, more stumbling blocks.
Couldn't figure out how to create a simple flashable ROM zip.
So I just released my mods in the Themes & Apps subforum:
http://forum.xda-developers.com/pixel-xl/themes/framework-mods-disable-screen-off-usb-t3508322
Thanks for the help, guys. :good:
I'll get back at the custom ROM thing another time.
I'll tell you what though.
I have tons more respect for devs after trying all this on my own.
Even if it's something you know how to do, there is a LOT of time and work spent on modding.
And then figuring out something new for the first time is incredibly frustrating.

Categories

Resources