dissesembling android.policy.jar - T-Mobile myTouch 4G Slide

ok i am having a hard time figuring out how to get the autoapktool to baksmali my android.policy.jar. i keep getting this error:
[*] C:\xdaAutoAPKTool_V3.0.2\_Jar_Files\android.policy.jar
decompiling C:\xdaAutoAPKTool_V3.0.2\_Jar_Files\android.policy.jar...
'jar' is not recognized as an internal or external command,
operable program or batch file.
Can't find the file _JAR_FILES\android.policy.dex\classes.dex
if anyone could help me with this i would be appreciative. or if maybe you know a better program to use to accomplish this task. any help would be amazing.

By the looks of it your typing a wrong command here
paste the one you type here and we'll correct it.

Riyal said:
By the looks of it your typing a wrong command here
paste the one you type here and we'll correct it.
Click to expand...
Click to collapse
It is an automatic tool I don't use any commands let me find the link.
Here it is http://forum.xda-developers.com/showthread.php?t=1053227
2nd post. Maybe a manual method would be better? A better tool?

try apktool it work wonders
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
download here: Link

Riyal said:
try apktool it works wonders
download here: Link
Click to expand...
Click to collapse
sweet!!!! thanks a lot it worked!!! could i get the command to put it back together?

mattlowry said:
sweet!!!! thanks a lot it worked!!! could i get the command to put it back together?
Click to expand...
Click to collapse
Should be apktool b android.policy. jar.out or whatever apktool named the folder
Sent from my myTouch_4G_Slide using Tapatalk 2

strapped365 said:
Should be apktool b android.policy. jar.out or whatever apktool named the folder
Sent from my myTouch_4G_Slide using Tapatalk 2
Click to expand...
Click to collapse
its telling me could not find resources

mattlowry said:
its telling me could not find resources
Click to expand...
Click to collapse
When you installed apktool did you run the apktool if miui-framework-res.apk to install miui resources
Sent from my myTouch_4G_Slide using Tapatalk 2

strapped365 said:
When you installed apktool did you run the apktool if miui-framework-res.apk to install miui resources
Sent from my myTouch_4G_Slide using Tapatalk 2
Click to expand...
Click to collapse
No but it worked it still created the jar file that fixed my screen orientation problem with miui

Big thanks to you guys for helping me out!!!!

Ok I guess it's solved but here's a little tip.
It's telling you "could not find resources" because android.policy.jar doesn't have any resources. It's just a plain dex file and no resources.arsc nor res folder. So it's not a bug or failed compilation it's just a warning
Also on some apks it should be asking you for unknown resource all you have to do is isntall all the needed resource files and it should fix almost all common problems.
Here's a couple of frameworks you could install.
SystemUI.apk
framework-res.apk
com.htc.resource.apk
framework-htc-res.apk
you could install it using
apktool if <framework file here>
for a list of commands just type "apktool"

Riyal said:
Ok I guess it's solved but here's a little tip.
It's telling you "could not find resources" because android.policy.jar doesn't have any resources. It's just a plain dex file and no resources.arsc nor res folder. So it's not a bug or failed compilation it's just a warning
Also on some apks it should be asking you for unknown resource all you have to do is isntall all the needed resource files and it should fix almost all common problems.
Here's a couple of frameworks you could install.
SystemUI.apk
framework-res.apk
com.htc.resource.apk
framework-htc-res.apk
you could install it using
apktool if <framework file here>
for a list of commands just type "apktool"
Click to expand...
Click to collapse
I'm learning so many things lately! I don't know what to do next......

mattlowry said:
I'm learning so many things lately! I don't know what to do next......
Click to expand...
Click to collapse
Sleep

Riyal said:
Sleep
Click to expand...
Click to collapse
best advice yet...lol

Related

[Tool] ICS APKTool - GUI APK Compile & Decompile Tool

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hello I am a developer in Korea.
Sorry my bad English...
I have made ICS APK Decompile & Compile tool.
This is the GUI!
This tool is ICS framework-res.apk completely decompile and compile.
Thank you. ^^
does this work with .jar files too?
Hmm...
I can't decompile a second time, an error appears
Sorry...
dinesh690 said:
does this work with .jar files too?
Click to expand...
Click to collapse
Sorry, this tool does not work with .jar files.
many thx
work great !
Good idea!
Unfortunately, it has many errors. Hangs on this screen and stands:
same here!
It looks to me like you are violating the license of several tools you are including, you may want to fix that.
Go read what the apache and LPGL licenses say about redistributing in binary form.
error
iodes said:
Hello I am a developer in Korea.
Sorry my bad English...
I have made ICS APK Decompile & Compile tool.
This is the GUI!
This tool is ICS framework-res.apk completely decompile and compile.
Thank you. ^^
Click to expand...
Click to collapse
hi i have this error wen i compile fremawork-res. I use fremawork-res from ics LPQ SGS
ERROR in screen
thx for help me
Very interesting this utility! Ready to use it
thanks, will try it
chudy_85 said:
hi i have this error wen i compile fremawork-res. I use fremawork-res from ics LPQ SGS
ERROR in screen
thx for help me
Click to expand...
Click to collapse
I've got that too, I didn't have it...
In the end of compiling operation there is an error..
i hope this project is not death.its very helpfull tool but need some more work..geting error as others posted already
thanks!
I also I have a GUI created for personal use, as have the 8 required the annoying messages publishes
just used this program,
it works finally able to compile since I always had that problem.
dinesh690 said:
does this work with .jar files too?
Click to expand...
Click to collapse
Just rename the .jar extension to .apk
Does it work with CM9 themes?
Ah! Great!
Fantastic Work Developer. this Tool is Both simple and efficient! it works Great on my Computer Running Win7 HP x64
-Moon
I have error too

Android 4.1 and Encrypted APKs?

Hi All,
Forgive me if this has been asked - searching XDA results in hundreds of spurious hit since the search tool does not appear to honor quotes in a search term (i.e., "encrypted apk"). My apologies for the choice of forums. I was not allowed to ask in the Android forums. Sorry about the perverted reference below. I'm not allowed to add references, either.
Android 4.1 allows encryption of an APK (see "App Encryption" at H T T P developer-dot-android-dot-com-slash-about-slash-versions-slash-jelly-bean-dot-html). What tools are folks using to decrypt the APK and get it ready for something like APKTOOL or Dex2Jar?
Jeff
noloader said:
Android 4.1 allows encryption of an APK (see "App Encryption" at H T T P developer-dot-android-dot-com-slash-about-slash-versions-slash-jelly-bean-dot-html). What tools are folks using to decrypt the APK and get it ready for something like APKTOOL or Dex2Jar?
Click to expand...
Click to collapse
Ping...
Is there anyway to get this moved to an Android developers forum? Thats where it belongs.
I would also be interested in this.
Sent from my SPH-D710 using xda app-developers app
wtf with this?
You can view or decrypt the XML files of an Android APKfile with apktool.
Just copy the APK file also in that directory and run the following command in your command prompt:
Code:
apktool d HelloWorld.apk ./HelloWorld,
This will create and directory "HelloWorld"in your current directory. Inside it you can find the AndroidManifest.xmlfile in decrypted form and you can also find other XMLfiles inside the "HelloWorld/res/layout" directory.
Here HelloWorld.apk is yourAndroidAPKfile.
See the below screen shot for more information:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my SAMSUNG-SGH-I747 using xda premium
Apex_Strider said:
You can view or decrypt the XML files of an Android APKfile with apktool.
Just copy the APK file also in that directory and run the following command in your command prompt:
Code:
apktool d HelloWorld.apk ./HelloWorld,
Click to expand...
Click to collapse
apktool development was abandoned some time ago. The last release built and offered for download is from December 2011 (https://code.google.com/p/android-apktool/downloads/list). I seriously doubt it can do anything with an Encrypted APK (a featured added in August 2012 with Jelly Bean).
apktools or smali/baksmali is broken with respect to debug information. apktools and smali debugging: https://code.google.com/p/android-apktool/issues/detail?id=339. smali/baksmali debug issue (I should have filed it as a bug report): https://code.google.com/p/smali/issues/detail?id=139. I know there is another apktool by ibotpeaches, but its broken too: https://code.google.com/p/smali/issues/detail?id=139.
More details on Encrypted APKs (outside of the marketing literature) can be found at https://groups.google.com/group/android-security-discuss/browse_thread/thread/81f51e4faa895940.
Jeff
noloader said:
More details on Encrypted APKs (outside of the marketing literature) can be found at https://groups.google.com/group/android-security-discuss/browse_thread/thread/81f51e4faa895940.
Jeff
Click to expand...
Click to collapse
Agreed. That link is a decent place to start reading up on them. It's an interesting idea, I'm curious to see how encrypted APK distribution pans out....
This is interesting
noloader said:
apktool development was abandoned some time ago. The last release built and offered for download is from December 2011 (https://code.google.com/p/android-apktool/downloads/list). I seriously doubt it can do anything with an Encrypted APK (a featured added in August 2012 with Jelly Bean).
apktools or smali/baksmali is broken with respect to debug information. apktools and smali debugging: https://code.google.com/p/android-apktool/issues/detail?id=339. smali/baksmali debug issue (I should have filed it as a bug report): https://code.google.com/p/smali/issues/detail?id=139. I know there is another apktool by ibotpeaches, but its broken too: https://code.google.com/p/smali/issues/detail?id=139.
More details on Encrypted APKs (outside of the marketing literature) can be found at https://groups.google.com/group/android-security-discuss/browse_thread/thread/81f51e4faa895940.
Jeff
Click to expand...
Click to collapse
APKTool development was picked back up by iBotPeaches

Help Modding Framework-res.apk

Hi Guys,
I am trying to mod framework-res.apk from the Sky-ICS Rom (http://forum.xda-developers.com/showthread.php?t=1763195) in order to get Bluetooth Tethering enabled.
All I have to do is mod the lines in array.xml from this thread (http://forum.xda-developers.com/showpost.php?p=25808002&postcount=114)
I pull framework-res.apk
I decompile the apk using Apk_Manager_ICS
I make my mods to res\values\arrays.xml
recompile
then I grab the resources.arsc from the new APK and add it into the original APK file using 7-zip in STORE mode
push it back to the skyrocket
adb shell in and reset permissions (chmod) to 644
reboot
Never ending Loop
Can someone please point me in the right direction
I've done / used every method to try and get framework-res.apk recompiled and working but no dice!!
You postin in the wrong section
Sent from my SGH-I727 using Tapatalk 2
Mods give me back my report button before I go troll mode grrrrr
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
Instead of copying the res file from the new apk to the original, copy the META-INF folder from the original to the new apk. The META-INF folder contains the signatures, just FYI. And next time, post things like this in the Q&A thread.
Sent from outer space
MikeySmikey said:
Instead of copying the res file from the new apk to the original, copy the META-INF folder from the original to the new apk. The META-INF folder contains the signatures, just FYI. And next time, post things like this in the Q&A thread.
Sent from outer space
Click to expand...
Click to collapse
Ok, Thanks Mikey, I'll give it a try, and sorry about posting in the wrong section....
I thought since my question was related to development, this was the place for it.
MODS, please move my thread, Thank you!!
http://forum.xda-developers.com/showthread.php?p=21113455#post21113455
this tool works flawlessly on ICS. I had to replace the aapt file in the resources folder from the latest SDK, then recompiled with ease, zip, sign, enjoy.
HELP!!!
I think I have tried EVERY APKtool out there (I even built an XP machine to try them in), and i'm still not having luck. I dont know if its something that I'm doing wrong, but i'm all out of options.
I suspect that it may be something with the ROM because even after I restore the backed up, stock framework-res, it still bootloops.
Anyway, if someone can do me a huge favor, take the attached framework-res.apk and add the xml to the /res/values folder and send it back to me, that way I can test to see if its a problem with my system or the ROM
Thanks in Advanced!!
ruben00 said:
HELP!!!
I think I have tried EVERY APKtool out there (I even built an XP machine to try them in), and i'm still not having luck. I dont know if its something that I'm doing wrong, but i'm all out of options.
I suspect that it may be something with the ROM because even after I restore the backed up, stock framework-res, it still bootloops.
Anyway, if someone can do me a huge favor, take the attached framework-res.apk and add the xml to the /res/values folder and send it back to me, that way I can test to see if its a problem with my system or the ROM
Thanks in Advanced!!
Click to expand...
Click to collapse
there is no "values" folder under res directory/folder in the framework apk file
vincom said:
there is no "values" folder under res directory/folder in the framework apk file
Click to expand...
Click to collapse
After decompiling I get....
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Values folder is one of the folders that ends up in the resources.arcs file in the apk after complying
Sent from my A500 using Tapatalk 2
StolenVW said:
Values folder is one of the folders that ends up in the resources.arcs file in the apk after complying
Sent from my A500 using Tapatalk 2
Click to expand...
Click to collapse
Yes I know, I then grab resources.arcs from the unsigned-framework-res.apk and copy it to the original framework-res.apk in store mode
push it to the device, set permissions, reboot...
bootloop
I really dont know how, but the Developer has been using Unsigned (missing META folder), I had to go all the way back to his original ROM and download and get the SIG from there.
Problem Solved.
Thanks everyone who tried to help!!

[REQ]Zipalign Tool for windows

hi guys, can i request a tool for windows for zipaligning a android app(sorry for my english) because i need that tool for zipaligning my modified systemui.apk and framework-res.apk
thanks... PLEASE REPLY! Dont be a newbie
R: [REQ]Zipalign Tool for windows
Renz29 said:
hi guys, can i request a tool for windows for zipaligning a android app(sorry for my english) because i need that tool for zipaligning my modified systemui.apk and framework-res.apk
thanks... PLEASE REPLY! Dont be a newbie
Click to expand...
Click to collapse
I'll make one tomorrow but you have to wait
Inviato dal mio GT-I9070 con Tapatalk 2
Zipalign
Ok here you are
A tool for zipaligning SystemUI.apk and framework-res.apk
It's automatic and user friendly so run the script and enjoy!
KINGbabasula said:
Ok here you are
A tool for zipaligning SystemUI.apk and framework-res.apk
It's automatic and user friendly so run the script and enjoy!
Click to expand...
Click to collapse
thanks bro...
KINGbabasula said:
Ok here you are
A tool for zipaligning SystemUI.apk and framework-res.apk
It's automatic and user friendly so run the script and enjoy!
Click to expand...
Click to collapse
@KINGbabasula
i can zipalign with apkmultitool ? if the answer is yes you can tell me how i can ? please
Javho said:
@KINGbabasula
i can zipalign with apkmultitool ? if the answer is yes you can tell me how i can ? please
Click to expand...
Click to collapse
Yes with option 5
Not to compete, but here's a more reusable script to zipalign any APKs...just place them in the folder named "Input", then run b-zipa.bat...they will be in "Output"...remember not to leave spaces between the names of the APKs..."b-zipa" actually means "Batch ZIPAlign", so you can place any number of APKs in "Input" and the script will zipalign them all...
KINGbabasula said:
Yes with option 5
Click to expand...
Click to collapse
but where should I put the file folder to zipalign?
For Windows OS users, I wrote a script to incorporate Zipalign.exe in Right-Click Context Menu for super easy zipalingn apk anywhere in your hard drive,,
Here is a pic from my PC after Right-Click and showing Context Menu.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
And after Zipalingn process.
I will search my computer and share it with you all :laugh:
KINGbabasula said:
Yes with option 5
Click to expand...
Click to collapse
majdinj said:
For Windows OS users, I wrote a script to incorporate Zipalign.exe in Right-Click Context Menu for super easy zipalingn apk anywhere in your hard drive,,
Here is a pic from my PC after Right-Click and showing Context Menu.
And after Zipalingn process.
I will search my computer and share it with you all :laugh:
Click to expand...
Click to collapse
aaah and i got one question more, if possible zipalign .jar archives ? look like android.policy.jar ?
Javho said:
aaah and i got one question more, if possible zipalign .jar archives ? look like android.policy.jar ?
Click to expand...
Click to collapse
OK, I will do some changes to the script to support all android files..
Edit:
Done..
I opened a thread in Android Software and Hacking General Section..
http://forum.xda-developers.com/showthread.php?p=43950205#post43950205
thanks
KINGbabasula said:
Ok here you are
A tool for zipaligning SystemUI.apk and framework-res.apk
It's automatic and user friendly so run the script and enjoy!
Click to expand...
Click to collapse
This tool works great. Thank you for sharing it.
hi i made a small apk file for my company website, i use a link online to do the app but i cant upload it to the play store because the zipalign i have the apk file and i download Android Studio and eclipse and i update skd tools and everything ask for update
can anyone explain to me how i can zipalign the apk file i been searching for few days i got tried no one have post away how to import the apk file into Android Studio and eclipse
i really need to upload this apk file to the play store
all what it do after you open it it take you to the company website
ill attach the apk file might someone help me

[Q] Why can't I recompile modified apk?

I am trying to add 1% battery mod to my ROM. I decompiled my SystemUI.apk perfectly with the latest version of apktool. I modified the files I needed then I went to recompile using
Code:
apktool b -f -d SystemUI.apk SystemUI-new.apk
Here's (poor) screenshots of my errors:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I tried manually installing apktool in /usr/local/bin and I also tried Apk-Multi-Tool version 2.0. I'm running the latest version of Mint (17 I believe) and everything is up to date, including Java JRE. I cannot find any related help on Google so any help that u can give is greatly appreciated. Thx
Nick_73 said:
I am trying to add 1% battery mod to my ROM. I decompiled my SystemUI.apk perfectly with the latest version of apktool. I modified the files I needed then I went to recompile using
Code:
apktool b -f -d SystemUI.apk SystemUI-new.apk
Here's (poor) screenshots of my errors:
I tried manually installing apktool in /usr/local/bin and I also tried Apk-Multi-Tool version 2.0. I'm running the latest version of Mint (17 I believe) and everything is up to date, including Java JRE. I cannot find any related help on Google so any help that u can give is greatly appreciated. Thx
Click to expand...
Click to collapse
your error says your lacking of resourses., you need to install also your framework_res.apk, then try to decompile/recompile.,
edit: you can use this awesome tool to decimpile/compile apk or even deodexing., Tickle My Android (TMA) by @Ticklefish here:
http://forum.xda-developers.com/showthread.php?t=1633333
Use apkmultitool for a better experience. In this u dnt gve any command lines. There is a numbers for decompile & recompile . Hit >>>>>>> THANKS
Sent from my GT-S6102 using XDA Free mobile app
airupthere_23 said:
your error says your lacking of resourses., you need to install also your framework_res.apk, then try to decompile/recompile.,
edit: you can use this awesome tool to decimpile/compile apk or even deodexing., Tickle My Android (TMA) by @Ticklefish here:
http://forum.xda-developers.com/showthread.php?t=1633333
Click to expand...
Click to collapse
Say my name and I appear...
It's hard to know quite what the problem is here as the screenshots are missing most of the error message. Including the first error, which is often the key to solving the problem.
By the looks of things though, I would say that you haven't added your png files. These error messages are all saying that you have a reference to image files in your xml..but no actual image files.
(Oh, and TMA isn't available on Linux...yet. But if the OP has access to a Windows PC, I can definitely suggest it!)
Ticklefish said:
Say my name and I appear...
It's hard to know quite what the problem is here as the screenshots are missing most of the error message. Including the first error, which is often the key to solving the problem.
By the looks of things though, I would say that you haven't added your png files. These error messages are all saying that you have a reference to image files in your xml..but no actual image files.
(Oh, and TMA isn't available on Linux...yet. But if the OP has access to a Windows PC, I can definitely suggest it!)
Click to expand...
Click to collapse
Ha thx so much I think that's it I forgot to put my pngs on the system ui.
Fixed one issue, now I got these:
I didn't even modify the public.xml file...
Nick_73 said:
Fixed one issue, now I got these:
I didn't even modify the public.xml file...
Click to expand...
Click to collapse
You should never modify the public.xml file...
I'll be honest, it's really hard to tell what's going just from screenshots of part of the error. Can you provide the entire error message please? And it would help if you're able to provide the screen output from when you decompiled as well.
What type of phone/rom are you using?
Ticklefish said:
You should never modify the public.xml file...
I'll be honest, it's really hard to tell what's going just from screenshots of part of the error. Can you provide the entire error message please? And it would help if you're able to provide the screen output from when you decompiled as well.
What type of phone/rom are you using?
Click to expand...
Click to collapse
I didn't mod it...
When I get back on my computer I'll copy the whole thing

Categories

Resources