I'm trying to extract internal and hiddent files for my Bionic 4.1.2.
The instructions I found online said to basically
1.) extract the framework.jar (adb pull /system/framework/framework.jar - not a problem)
2.) rename it to framework.zip and unzip - not a problem
3.) retrieve classes.dex - problem there is no classes.dex
I can't move any further because classes.dex is not in my framework.jar on the emulator or physical device.
Is the file Classes.dex located somewhere else for this version of Andorid?
Is there another or better method to get internal and hidden files to utilize in applications?
I need this so I can build some special needs applications for my father who has ALS.
Any help provided would be appreciated. Thanks.
Related
I got this figured out already, sorry about that.
Who ever thanked me, I wasn't posting a guide but a question.
I am trying from a fresh firmware base to learn from scratch but no idea how to get that framework to compile correctly.
did you install framework first?
Code:
apktool if framework-res.apk
Easy
I had problems with the apk tool and recompiling. The way I ended up doing it is:
I didnt decompile the framework-res.apk.
rename the file framework-res.apk.zip
open it with 7zip.
Extract the files you are wanting to work on
Do what ever work on the files you need done
Drag and drop the files back in the directories they go into while file is open in 7zip
Close 7zip
Rename file back to framework-res.apk
push to phone with adb
No decompile or recompile.
Hope this helps
Chadw1985 said:
I had problems with the apk tool and recompiling. The way I ended up doing it is:
I didnt decompile the framework-res.apk.
rename the file framework-res.apk.zip
open it with 7zip.
Extract the files you are wanting to work on
Do what ever work on the files you need done
Drag and drop the files back in the directories they go into while file is open in 7zip
Close 7zip
Rename file back to framework-res.apk
push to phone with adb
No decompile or recompile.
Hope this helps
Click to expand...
Click to collapse
If you just want to modify one of the 'normal' XML files or an image then that approach will work fine. The problem is he wants to edit the bool.xml file and that is contained in the 'resources.asrc' file and you need to decompile it first.
I am in the same situation although someone managed to edit the file for me and recompile it so I got there in the end, just not by doing it myself.
I followed the instructions you describe and the file never recompiled properly - or at least my device never booted with the one I recompiled
Try it like this:
1. Place APK in "place-apk-here-for-modding"
2. Choose "9" to Decompile
3. Grab resource "resources.arsc" from framework-res.apk
4. Do my edit in projects\framework-res.apk\res\values\bools.xml
5. Compile - Yes (system app) - Yes (copy files)
6. Go to "keep" folder and delete "resources.arsc" and the bools.xml file
7. Press any key
8. Either push by ADB or Root Explorer or Flash
nickiberli said:
Try it like this:
1. Place APK in "place-apk-here-for-modding"
2. Choose "9" to Decompile
3. Grab resource "resources.arsc" from framework-res.apk
4. Do my edit in projects\framework-res.apk\res\values\bools.xml
5. Compile - Yes (system app) - Yes (copy files)
6. Go to "keep" folder and delete "resources.arsc" and the bools.xml file
7. Press any key
8. Either push by ADB or Root Explorer or Flash
Click to expand...
Click to collapse
I have tried exactly like this and it didn't work for me. I downloaded lots of different APK tools and tried them all - there were comments about using older versions of apktool.jar etc. I kept getting different sizes of the output file depending on which one I used. I gave up in the end as someone edited the file for me and it was only one specific entry in bool.xmls I wanted changing. As far I could tell we were both doing exactly the same thing.
The last thing I said I was going to do was wipe the PC I was attempting to do this on. I never got round to doing it... I'd be interested to know why I could never get this working though
Andy
Give me the framework and tell me what u want to do.
I will do that for u
Btw is the framework ICS based?
Sent from my Micromax_A70 using Tapatalk 2 Beta-4
You have resigned?
Greets!
Hey everyone,
My stock rom on my phone has issues with MVNO's (mobile virtual network operator). Basically this means that my data connection only works when Roaming. This is a know issue that has already been fixed on several roms (but not on mine).
To fix this I would like to modify the source of the framework.jar file (`/system/framework/framework.jar`), more specific the file : `/com/android/internal/telephony/gsm/GsmServiceStateTracker.java`
To start I will list the steps I have take to show you where I'm stuck at the momoment:
- I have fully deodexed my stock rom, both the JAR files and the APK files in both /system/framework/ and /system/app
- I have downloaded the deodexed framework.jar file and extracted the classes.dex file from it
- I have decompiled the classes.dex file using baksmali to end up with several *.class files
- I have converted these *.class files to a .jar file using dex2jar
- I have unpacked opened this jar file using jdqui to end up with several *.java files
This is where I'm stuck, I need to figure out how to edit the java file I want and end up with a working framework.jar again that I can upload to my phone.
Am I doing this the wrong way? Any other way to resolve my issue? I hope to get some help from people who have experience in doing this...
Any help would be appreciated!
Bump, anyone?
Hi,
I'm trying to figure out why a modified QuickSnote.apk doesn't work on Jelly 'Beans' Rom - Build 4->http://forum.xda-developers.com/showthread.php?t=2032447
This is a problem (for me) because it used to work on build 3 just two days ago.
Here is what I did,
0. Install framework-res.apk, SystemUI.apk, and twframework-res.apk that I extracted from root (build 4)
1. Download and decompile the '/system/app/QuickSnote.apk' using 'apktool'
2. Overwrite QuickSnote/res/raw/popupnote_sound.ogg with a dummy ogg file.
3. Recompile the 'QuickSnote.apk' using 'apktool'
4. Copy&paste jar-res directory from the original apk into newly created apk (it's missing from the new apk for some reason)
5. Sign the apk using 'signapk'
6. Finally, overwrite /system/app/QuickSnote.apk with the new&signed apk
After doing this, I assumed that the only difference in the MANIFEST.MF files would be the SHA1Digest of the 'popupnote_sound.ogg' file. However, many other digests seem to be different.
Could this be the reason why it's not working?
Please assist me with this.
Thanks.
Have you tried to copy :
assets
META-INF
android-manifest.xml
from the original to the new one?
I had same problem with framework-res.apk and it solved it
I'm trying to extract internal and hiddent files for my Bionic 4.1.2.
The instructions I found online said to basically
1.) extract the framework.jar (adb pull /system/framework/framework.jar - not a problem)
2.) rename it to framework.zip and unzip - not a problem
3.) retrieve classes.dex - problem there is no classes.dex
I can't move any further because classes.dex is not in my framework.jar on the emulator or physical device.
Is the file Classes.dex located somewhere else for this version of Andorid?
Is there another or better method to get internal and hidden files to utilize in applications?
I need this so I can build some special needs applications for my father who has ALS.
Any help provided would be appreciated. Thanks.
Utilizing Android Internal/Hidden files
Is there another or better method to get internal and hidden files to utilize in applications?
sbrammer said:
I'm trying to extract internal and hiddent files for my Bionic 4.1.2.
The instructions I found online said to basically
1.) extract the framework.jar (adb pull /system/framework/framework.jar - not a problem)
2.) rename it to framework.zip and unzip - not a problem
3.) retrieve classes.dex - problem there is no classes.dex
I can't move any further because classes.dex is not in my framework.jar on the emulator or physical device.
Is the file Classes.dex located somewhere else for this version of Andorid?
Is there another or better method to get internal and hidden files to utilize in applications?
I need this so I can build some special needs applications for my father who has ALS.
Any help provided would be appreciated. Thanks.
Click to expand...
Click to collapse
Thought id share this since it can be quite a hassle to find everything needed if you wanna translate stuff yourself or edit something for personal needs.
This was done on miui stable 8.1.3.0 from xiami.eu on a mi5 but should work on other miui versions and roms (with slight modification)
Download Bursoft apktool (http://bursoft-portable.blogspot.se/p/blog-page_23.html) and unzip to C:\BatchApkTool
Make sure you have java installed (www.java.com)
You will also need root
Fetch the following files/folders from your phone and copy them to C:\BatchApkTool\_framework
system/framework/framework-res.apk
system/framework/framework-ext-res/
system/app/miui/
system/app/miuisystem/
system/priv-app/miuisystemUI/
Place the apk you wanna modify in C:\BatchApkTool\_INPUT_APK\
Execute BatchApkTool.exe in c:\BatchApkTool\
Press 1 to decompile
Go to your C:\BatchApkTool\_INPUT_APK\ folder and if everything worked alright then open the newly created folder from the apk file you just decompiled and make whatever change you wanna do. If you wanna translate, then open the \res\ folder and make a new folder called values-sv (if you wanna add swedish language for example) then you can either copy strings.xml from another language folder and edit them or grab xml from a partially (or fully but not 100% voted) translated source like crowdin or github
Do not use caps or anything other wierd stuff or it wont compile afterwards
You can now return to batchapktool and press 3 to recompile and hopefully no errors, otherwise check log to determine possible cause.
Do not sign the apk!
Now open the recently modified compiled apk with winrar (your w/e zip program you prefer) and grab resources.arsc out of there. Now open a copy of the original apk and paste the resources.arsc into it (replacing the existing resources.arsc).
Plug in the phone to the computer and copy the apk to the internal memory
Open your favourite root browser (using romtoolbox filemanager myself) and go to the location of the original apk and rename it (or make a backup incase any error occurs), now copy the modified apk you copied earlier into the folder of the apk you wanna replace, e.g system/app/ or system/priv-app/
Kill/close app (incase it was started earlier) and restart it and see if the changes are live!
Edit: After you replaced the files, then you need to chmod those aswell to 0644 and possibly clear cache in twrp
Might have forgotten something but just ask and ill try to help