[TUT] compiling and decompiling for noobs - Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A

Hey Guys.....
I faced some problems and issues while compiling and decompiling apks.
I am using stock ics 4.1.b.0,587. So to compile you have to use following tools.
Files Required:
framework-res.apk
SemcGenericUxpRes.apk
SystemUI.apk
Note that you type correctly in command prompt window.
Softwares Required:
ThemeTool
Link:
http://forum.xda-developers.com/showthread.php?t=1374394
Thanx to XperienceD for this awesome guide.
Follow this guide for java path etc.
MediaFire Link:
http://www.mediafire.com/?tkjxk94yklm2rdu
Apk Manager r5
MediFire Link:
http://www.mediafire.com/?708sbbr0b7d5pbr
Now step by steps..follow these
Place apk in themetool folder.
Open command prompt from theme tool folder...Click Shift and right mouse click.
View attachment 1629889
Now ,
Enter commands
apktool if framework-res.apk
apktool d framework-res.apk
apktool if SemcGenericUxpRes.apk
apktool d SemcGenericUxpRes.apk
apktool if SystemUI.apk
apktool d SystemUi.apk
{
"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"
}
Our files are added to system.
Now we will use apkmanager to decompile and edit apks and then again compile/build apks.
Open Script window from apk manager.
Enter 22
Select your current project i.e 1 (for framework-res.apk)
Enter 9
It will decompile Framework-res.apk
repeat above for other two apks.
Now we have to edit our decompiled files that are present in project folder.
Select any folder i.e systemui.apk
then edit as you like.
Now See that your current project is set to the one you are modding.
Enter 11 to build apk
Enter y & y....
After that a keep folder will be created by apkmanager ....delete files that you have replaced(i.e original files are shown ,delete them .dont delete any xml file you edited,only delete icons,images etc & also delete resources.arsc from keep folder)
Press Enter.
All done.
Your new apk will be named as UnsignedSystemUI.apk..Note that dont sign or anything else for system apks. otherwise you will get problem i.e bootloop or other.
Copy your apk to sdcard and move to system/app....set permissions.
Reboot & enjoy.
For framework files,if you moded,do adbpush.
Hit thanx if i helped you.

Related

[REQ][HELP]Settings.apk Compiling Error Using Apktool

Hello mates!
So i wanted to use Slim ICS in my own language and wanted to start with Settings.apk from Slim 4.2.
btw.I succesfully installed adb on my computer.(checked with cmd)
I'm using latest apktool and i typed;
apktool d Settings.apk
Successfully decompiled.Settings folder created and all of the stuff is in there.
{
"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 JUST changed a string in res/values .Then tried to compile it ... And the problem occours....
Help me please.At least i want to do this...
Sorry if i opened the thread in to wrong section but this thing is about developing so..
Have a nice day to all people!
Just typed this earlier in another post but I think it applies with the Setting.apk also. Your framework files will be different, but hopefully it helps you..
NOTE: For all of the above you will need to set the framework for apktool before you will be able to de/recompile apks.
-Drop copies of framework-res.apk, moto-res.apk, blur-res.apk, and SystemUI.apk into the same folder as apktool (with APK Manager it's the "other" folder)
-Open the command prompt on the folder where apktool is (by right-clicking or holding Shift and right-clicking)
-Type the following for each apk in the command prompt:
Code:
apktool if framework-res.apk
-Hit enter
Code:
apktool if moto-res.apk
-Hit enter, and do the same for the other two apks
-Now you should have no de/recompiling problems (well I shouldn't say no... watch them .9.pngs and check the log for errors)
Click to expand...
Click to collapse
Sent from my phone's mind
http://www.blindndumb.com/2012/04/android-tutorial-how-to.html
Follow that guide to the tee and i garuntee you will not have a single issue
alteredlikeness said:
Just typed this earlier in another post but I think it applies with the Setting.apk also. Your framework files will be different, but hopefully it helps you..
Sent from my phone's mind
Click to expand...
Click to collapse
Hmm.I just had framework-re.apk in there and typed apktool if ramework-res.apk ..... Gonna try it today!
Sent from my GT-I9000 using Tapatalk 2
Me too

[Q]Problems building a custom framework-res.apk

{
"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 managed to make a few changes to the framework-res.apk a custom rom (to display the buttons on the screen with a resolution pesonalized) i could decompile the file, but now I can not compile it again ... I'm using Apktool ..
Any idea´s?
Change apktool b framework-res.apk to apktool b framework-res
framework-res is your folder name,not framework-res.apk
neectron said:
Change apktool b framework-res.apk to apktool b framework-res
framework-res is your folder name,not framework-res.apk
Click to expand...
Click to collapse
A new error I do not want to give up...
Something to do with languages?
Check out this thread much of problem with apktool are solved there http://forum.xda-developers.com/showthread.php?t=1755243
neectron said:
Something to do with languages?
Check out this thread much of problem with apktool are solved there http://forum.xda-developers.com/showthread.php?t=1755243
Click to expand...
Click to collapse
I replace aapt.exe and i get a new problem
My original Framework-res.apk = 21mb
The new Framework-res.apk = 15mb
I have no idea what happens now
It is compressed that's all.
You can try ziping all the file in build folder with 0 compression.
neectron said:
It is compressed that's all.
You can try ziping all the file in build folder with 0 compression.
Click to expand...
Click to collapse
and how I can do that?
or I can use that file directly without problem?
In build folder,you will have apk folder.
This is how do it to with winrar
Select those files in apk folder -> Right Click -> Add to archive
Archive format zip
Compression method -> store
Ok.
Then rename extension of that archive to .apk.
Copy Meta-Inf and AndroidManifest.xml from orignal apk to new one.
neectron said:
In build folder,you will have apk folder.
This is how do it to with winrar
Select those files in apk folder -> Right Click -> Add to archive
Archive format zip
Compression method -> store
Ok.
Then rename extension of that archive to .apk.
Copy Meta-Inf and AndroidManifest.xml from orignal apk to new one.
Click to expand...
Click to collapse
How do you copy Meta-Inf and AndroidManifest.xml from orignal apk to new one?

[tutorial]how to get nav-bar on jb/ics rom

Hello guys..
Here i present you the mod how to enable navigation bar(on screen buttons) on JB/ICS roms..
its very simple and easy..
REQUIRMENT
1)Apktool
2)Notepad++
1> add the following line at the end of buid.prop file
"qemu.hw.mainkeys=0
now on reboot we will have nav-bar like on nexus so its size would be bigger
2>To get the bar resized you will need to edit Framework-res.apk, so first decompile the framework-res.apk of the rom you are using with the help of apktool or any other tool that u might prefer..
3> now go to res/values and open dimens.xml file using Notepad++(these will be present in framework-res folder created on decompiling apk)
4>here look for 3 lines which refers to navigation bar height and width, they must be in first several lines
5>now change the DPI as you're requirment i prefer height between 25-27 and width 21-23. save the edit file and close notepad++
6> now compile the framework-res, so we will get a build folder inside the framework-res folder created on decompiling the apk as said above
7> here in build folder just go to apk folder and copy the “resources.arsc” file to the original framework-res.apk(you can use 7-zip to open frmework-res.apk(original) and then drag and drop the “resources.arsc” file in it, just replase the “resources.arsc” present in the file as it will prompt)
well you are done now you need to put the framework-res.apk(original) on to the phone as you want by flashing a zip or manually..
and reboot
enjoy..:good:
you can also add some new buttons by editing systemui.apk as i have done here..
http://forum.xda-developers.com/showthread.php?t=1971225
thank you man amazing topic
but i can't find dimens.xml in res/values
how can i resize my navigation bar ?
i've samsung galaxy s2
Are you on cm10 rom..
->Sid said:
Are you on cm10 rom..
Click to expand...
Click to collapse
no
I haven't used any other rom as im using a x8 which is an old phn and thus v don't have other much jb roms except cm10.. But it must be same.. Which rom are u using? Can u provide framework-res.apk..
The nav buttons don't show up on lockscreen. Just blank space.
Well I'm on xperia J but with Jellybean. It worked but not for the lockscreen.
{
"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"
}

[TUTORIAL] How to Decompile and Recompile ICS .Apk Files][Easy ONE]

This is an Easy Tutorial, How to Decompile .apk and Recompile .apk Files​If u like this Tutorial, Hit THANKS Button​CREDITS
Memnoc - For Gud Ideas.
Xavierjohn22 - the amazing author of AutoApktool go Here, Hit thanks to Him Too.
Sandy7-For Motivation.
Requirements
Java (last version)
JDK (last version)
JDR (last version, usually included in JDK or Java)
Auto_Apktool 2.0.0 (DOWNLOAD THIS ONE NOT OTHERS)
HOW TO DO
NOTE: before start, select Apktool version with option 21, YOU MUST CHOOSE 1.4.1 version
1) Download and simply unpack Auto_ApkTool
2)Click on "autoapktoolmain.bat", prompt will open
{
"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"
}
3)put the apk you want to EDIT, in "_INPUT_APK"
4) Nw u Should Choose "option 6" for 'decompiling .apk
5) when option 6 is being selected, drag the apk from _INPUT_APK folder into the windows prompt and click enter
6) A Note window will appear, and will show IF the decompiling process has been done properly. Once you close that window, you will see the decompiled folder in _INPUT_APK folder
7) do your edits (xml, smali, or png, WHATEVER)
8) recompile with option 7 (NOTE: this time you MUST drag all the FOLDER, NOT the apk)
9) Once recompiling finished, u will Get a Dcompiled NOTE window that Shows your apk is sucessfully Compiled, Close that Window, Once open the decompiled folder, go to "dist" folder, and here you got your edited apk
10) NOW this is the Last step, since u cannot Sign System app, u will have to Copy the META-INF foldrer frm the Orginal apk to the edited apk, for more Info See the "Screen"
11) Rename the apk if Needed, and push it.
Reserved for tutorial on editing, decompiling/recompiling .jar files :thumbup:
For video tutorial!:thumbup:
FAQ's​Why can't we use Apktool???
Well, you can, but it's more difficult, that's it.
Why do you say "must use 1.4.1 apktool version"??
The reason why is that since 1.4.2 version, apktool generate java code while recompiling process is going on, and this lead to errors that 9/10 makes decompile process fail

can someone help me on editing framework-res.apk

i need help i needed to edit androidmanifest of framework-res.apk...
after compiling successully got bootloop
how to rectify it...pls help someone
ansebovi said:
how to rectify it...pls help someone
Click to expand...
Click to collapse
What did you mod and did you do it correctly?
XperienceD said:
What did you mod and did you do it correctly?
Click to expand...
Click to collapse
i modded to have theme.holo.light
i dont kno to sign androidmanifest.xml and nw i want to kno how to sign framework-res.apk with androidmanifest.xml modified...i dont care about signature because modded service jar to skip sign check...now problem is how to sign framework-res.apk
ansebovi said:
now problem is how to sign framework-res.apk
Click to expand...
Click to collapse
..
XperienceD said:
Signing
Before using the new apk you will need to sign it, to do this you need to extract (open the apk and simply drag and drop them to the dist folder) from the original apk the resources.arsc (only if you haven't changed anything in the values folder, the AndroidManifest.xml and META-INF folder (if it exists), then copy them into the new apk. In WinRar it will give you the option to choose the compression method, and it's vital that you choose Store as the compression method because if you don't then you WILL BOOT LOOP after restarting your Phone!
{
"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"
}
NOTE: If you have edited anything in the values folder then extract the resources.arsc from the new apk and copy (drag and drop) it back in the same manner described above.
Alternatively you can use the following command...
Code:
[B]java -jar signapk.jar testkey.x509.pem testkey.pk8[/B] framework-res.apk.apk framework-resS.apk
...notice the extra "S", the output name has to differ from the input name otherwise it will give an error, if done right it will create a new apk called framework-resS.apk, just remember to rename it back to the original before using it on your Phone.
Click to expand...
Click to collapse
XperienceD said:
..
Click to expand...
Click to collapse
bro the problem is i edited androidmanifest.xml
u r saying for unedited androidmanifest.xml
ansebovi said:
bro the problem is i edited androidmanifest.xml
Click to expand...
Click to collapse
First of all I'm not sure why you've edited that and not the styles.xml, and even if you have edited the manifest then the principles are the same, extract it from the new apk then drag and drop it back.

Categories

Resources