Hey Guys ,
I am writing this small guide for people who have just started off with Android Development recently..
as am not a great developer at my end so any corrections and suggestions are always welcome
Credits : To Vegeta1. He give me the idea and helped me patiently with every question i got to finish this!
To my great Omega Team Mates! You guys and girl know my feelings.
So here we gonna learn how to decompile/recompile/ sign Apks
Things needed :
1. jdk/java Get It from here--> http://www.java.com/en/
2. Apktool: Using any according to your liking is ok or you can get all the Stuff needed In this Link
http://forum.xda-developers.com/showthread.php?t=1755243
Thanks To iBotPeaches For The Superb Tool...
3. Notepad++ to make changes in Xmls
4: winrar/7zip
So first up we are gonna set up the Framework for the current Firmware we are using.
For that get framework-res.apk, twframework-res.apk from your rom. You can always find that in the root location
/system/framework/
So lets say you have placed your apktool in your C:\ drive
now open click on start > run > type cmd ( this is for command prompt )
for example you are on C:\>User. Click in the command line cd.. and hit enter.
You should see now C:\>, as next step you type cd apktool and click enter. Here you see how it should look:
C:\apktool>
Now first up installing framework-res.apk and twframework-res.apk.
Place both these Files in your apktool folder that you have placed in C Drive or any drive you are comfortable with.
Code for Installing frameworks :
C:\apktool>apktool if framework-res.apk
C:\apktool>apktool if twframework-res.apk
this will get both your frameworks installed .
Now decompiling the Apk ...
Lets say you want to decompile SecMms.apk / or any Apk you like
place the Apk in the apktool folder.
Code to decompile the apk:
C:\ apktool > apktool d SecMms.apk
If you done and set up things accordingly your Apks will be decompiled properly
in the apktool folder you have placed in C:\ apktool
you will get the decompiled SecMms folder... so you can now make changes to it
Now the Recompiling Part:
If you have made correct changes it won´t give you any issues :
To recompile the apk the code needed in the command prompt :
c:\ apktool>apktool b SecMms ( its the decompiled Folder , now the original apk )
when you are done with recompiling in the SecMms folder you will get these :
assets
build
dist
res
smali
AndroidManifest.xml
apktool.yml
Now again , if the changes you made are correct the recompiling wont give any issues
Now its still not over we need to sign the apk:
So in your apktool folder you have your Original SecMms.apk file open that with winrar/7zip
and extract
META-INF
AndroidManifest.xml
in the apktool folder and move them to
( Decompiled )SecMms > build > apk >
then again start cmd and again run the recompiling code again one more time
c:\ apktool > apktool b SecMms
this should sign your apk
and the final apk , you will find it in c:\apktool\SecMms\Dist\
.
So Guys that's about it , for decompiling/recompiling/signing your Apks , hope you have no issues and find my post helpful
Chris_84 said:
Hey Guys ,
I am writing this small guide for people who have just started off with Android Development recently..
as am not a great developer at my end so any corrections and suggestions are always welcome
Credits : To Vegeta1. He give me the idea and helped me patiently with every question i got to finish this!
To my great Omega Team Mates! You guys and girl know my feelings.
So here we gonna learn how to decompile/recompile/ sign Apks
Things needed :
1. jdk/java Get It from here--> http://www.java.com/en/
2. Apktool: Using any according to your liking is ok or you can get all the Stuff needed In this Link
http://forum.xda-developers.com/showthread.php?t=1755243
Thanks To iBotPeaches For The Superb Tool...
3. Notepad++ to make changes in Xmls
4: winrar/7zip
So first up we are gonna set up the Framework for the current Firmware we are using.
For that get framework-res.apk, twframework-res.apk from your rom. You can always find that in the root location
/system/framework/
So lets say you have placed your apktool in your C:\ drive
now open click on start > run > type cmd ( this is for command prompt )
for example you are on C:\>User. Click in the command line cd.. and hit enter.
You should see now C:\>, as next step you type cd apktool and click enter. Here you see how it should look:
C:\apktool>
Now first up installing framework-res.apk and twframework-res.apk.
Place both these Files in your apktool folder that you have placed in C Drive or any drive you are comfortable with.
Code for Installing frameworks :
C:\apktool>apktool if framework-res.apk
C:\apktool>apktool if twframework-res.apk
this will get both your frameworks installed .
Now decompiling the Apk ...
Lets say you want to decompile SecMms.apk / or any Apk you like
place the Apk in the apktool folder.
Code to decompile the apk:
C:\ apktool > apktool d SecMms.apk
If you done and set up things accordingly your Apks will be decompiled properly
in the apktool folder you have placed in C:\ apktool
you will get the decompiled SecMms folder... so you can now make changes to it
Now the Recompiling Part:
If you have made correct changes it won´t give you any issues :
To recompile the apk the code needed in the command prompt :
c:\ apktool>apktool b SecMms ( its the decompiled Folder , now the original apk )
when you are done with recompiling in the SecMms folder you will get these :
assets
build
dist
res
smali
AndroidManifest.xml
apktool.yml
Now again , if the changes you made are correct the recompiling wont give any issues
Now its still not over we need to sign the apk:
So in your apktool folder you have your Original SecMms.apk file open that with winrar/7zip
and extract
META-INF
AndroidManifest.xml
in the apktool folder and move them to
( Decompiled )SecMms > build > apk >
then again start cmd and again run the recompiling code again one more time
c:\ apktool > apktool b SecMms
this should sign your apk
and the final apk , you will find it in c:\apktool\SecMms\Dist\
.
So Guys that's about it , for decompiling/recompiling/signing your Apks , hope you have no issues and find my post helpful
Click to expand...
Click to collapse
Great guide Chris... I will try it tomorrow... Thanks for all you do for S3 and Omega community...
Ninolina said:
Great guide Chris... I will try it tomorrow... Thanks for all you do for S3 and Omega community...
Click to expand...
Click to collapse
Thanks Nina! If you got question you know where I am.
Throwing out of the window from my flying Ferrari killer S3 driven by a proud omega team member
Thanks Chris84. I need this. This guide its wery good. Regards.
Wysłane z mojego GT-I9300 za pomocą Tapatalk 2
wiecho65 said:
Thanks Chris84. I need this. This guide its wery good. Regards.
Wysłane z mojego GT-I9300 za pomocą Tapatalk 2
Click to expand...
Click to collapse
Glade you like it. If you got questions just ask.
Throwing out of the window from my flying Ferrari killer S3 driven by a proud omega team member
nice one chris
bala_gamer said:
nice one chris
Click to expand...
Click to collapse
Thank you very much mate! You now it's a honor for me to get such a good feedback from you! Really appreciate that!
Throwing out of the window from my flying Ferrari killer S3 driven by a proud omega team member
Really glad to be a part of a great team and great team members ....
Good luck my friend
Sent from my GT-I9300 using Tapatalk 2
This is great, you are bringing noobs like me to the next level.
Sent from my GT-I9300 using Tapatalk 2
Chris_84 said:
Thanks Nina! If you got question you know where I am.
Throwing out of the window from my flying Ferrari killer S3 driven by a proud omega team member
Click to expand...
Click to collapse
I assume it works on Windows? Maybe it will be good to add that to the Title of the Tread. Just a suggestion...
Ninolina said:
I assume it works on Windows? Maybe it will be good to add that to the Title of the Tread. Just a suggestion...
Click to expand...
Click to collapse
Yes it does. Thanks Nina for your suggestion!
Throwing out of the window from my flying Ferrari killer S3 driven by a proud omega team member
Thnx.
Always welcome a HowTo of this kind...
Verzonden door mijn GT-I9300 met xda premium
vegeta1 said:
Really glad to be a part of a great team and great team members ....
Good luck my friend
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Without you my friend I never had come this far!
KeesStolk said:
This is great, you are bringing noobs like me to the next level.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
So you're now a advanced noob.
Throwing out of the window from my flying Ferrari killer S3 driven by a proud omega team member
Hey Chris! Really nice guide you have here, quick & simple. Decompiling worked for me, however, when I try to compile back I get this:
D:\apktool1.5.0>java -jar apktool.jar d BW.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\MM\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-hdpi/forecast_fly_child_bg_pressed.
9.png". Renaming it to *.png.
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
D:\apktool1.5.0>java -jar apktool.jar b BW
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: D:\apktool1.5.0\BW\res/drawable-land-xhdpi
invalid resource directory name: D:\apktool1.5.0\BW\res/drawable-xhdpi
invalid resource directory name: D:\apktool1.5.0\BW\res/drawable-xhdpi-v11
invalid resource directory name: D:\apktool1.5.0\BW\res/drawable-xxhdpi
invalid resource directory name: D:\apktool1.5.0\BW\res/layout-xlarge
invalid resource directory name: D:\apktool1.5.0\BW\res/layout-xlarge-land
invalid resource directory name: D:\apktool1.5.0\BW\res/values-sw600dp
invalid resource directory name: D:\apktool1.5.0\BW\res/values-w360dp
invalid resource directory name: D:\apktool1.5.0\BW\res/values-w480dp
invalid resource directory name: D:\apktool1.5.0\BW\res/values-w500dp
invalid resource directory name: D:\apktool1.5.0\BW\res/values-w600dp
invalid resource directory name: D:\apktool1.5.0\BW\res/values-xlarge
invalid resource directory name: D:\apktool1.5.0\BW\res/values-xlarge-land
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 8, --target-sdk-vers
ion, 17, -F, C:\Users\MM\AppData\Local\Temp\APKTOOL3965827226790767193.tmp, -I,
C:\Users\MM\apktool\framework\1.apk, -S, D:\apktool1.5.0\BW\res, -M, D:\apktool1
.5.0\BW\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 8, --target-sdk-version, 17, -F, C:\Users\MM\AppData\Local\Temp\APKTO
OL3965827226790767193.tmp, -I, C:\Users\MM\apktool\framework\1.apk, -S, D:\apkto
ol1.5.0\BW\res, -M, D:\apktool1.5.0\BW\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more
Click to expand...
Click to collapse
I installed both frameworks & updated java, tried from both hdd partitions. Then I tried a different apktool version, happens again. Do you have any idea what could be the reason for this? Maybe the fact I have 2 java versions installed (v5.0 update 12 & v7 update 10).
MMWolverine said:
Hey Chris! Really nice guide you have here, quick & simple. Decompiling worked for me, however, when I try to compile back I get this:
I installed both frameworks & updated java, tried from both hdd partitions. Then I tried a different apktool version, happens again. Do you have any idea what could be the reason for this? Maybe the fact I have 2 java versions installed (v5.0 update 12 & v7 update 10).
Click to expand...
Click to collapse
I could only imagine that is not compatible this the framework you use. I get the same yesterday then I was trying recompile again Google plus. Decompile no problem but recompile give me error. Sounds a little bit crazy but what you can try is decompile with stock framework and recompile it with the one from omega or try it the other way decompile with omegas framework and recompile with stock framework. But between the steps you got install the framework new.
Throwing out of the window from my flying Ferrari killer S3 driven by a proud omega team member
Thanks, I'll test it & report back.
MMWolverine said:
Thanks, I'll test it & report back.
Click to expand...
Click to collapse
Your feedback is much appreciated! Thanks my friend!
Throwing out of the window from my flying Ferrari killer S3 driven by a proud omega team member
Ok, tried with XXELL5 stock framework and tested some others as well, but no luck I'm afraid. The app is BeautifulWidgets, which I'm trying to translate into Slovenian language. The problem is I cannot even recompile unchanged folders/files, let alone changing strings.xml. So the pursue for a solution continues.
MMWolverine said:
Ok, tried with XXELL5 stock framework and tested some others as well, but no luck I'm afraid. The app is BeautifulWidgets, which I'm trying to translate into Slovenian language. The problem is I cannot even recompile unchanged folders/files, let alone changing strings.xml. So the pursue for a solution continues.
Click to expand...
Click to collapse
That's very strange. I will take look at that cause I even turned on my laptop. Will keep you informed.
Edit: Mate I checked it. And I also fail. The strange thing is I got also an older apk from version 4 of beautiful widgets and had no problem with it. Then I checked the newer version 5 and then the failure set in. I tried to take the files like android manifest from the older apk but still fail.
Throwing out of the window from my flying Ferrari killer S3 driven by a proud omega team member
Guys can you post the apk here ?? Il try it out tomorrow... as im gonna fall asleep any moment...
Sent from my GT-I9300 using Tapatalk 2
Related
Note: This Guide Is Specified For Android 4.0.# ICS, but also work with GingerBread.
Before we mod our Android Device, we need to set up a modding environment right?
1. Install JDK.
Search Download and install. The installation of JDK needs JRE (Simply if Java is installed into your computer)
2. Download APK Manager for ICS here
http://db.tt/tuhzSEEl. Extract it.
3. Install framework. Copy your phone's system/framework/framework-res.apk to 'other' folder inside APKManager folder. If there are any additional framework files, copy it into the folder too. More information will be given at the buttom of thr thread. Hold the Shift Key on keyboard amd right click the "other" folder inside APKManager folder and, click "Open CMD Window here". Type:
Code:
java -jar apktool.jar if framework-res.apk
And, if any additional framework files,
Code:
java -jar apktool.jar if *.apk
Replace * by your filename.
OK, delete all the framework apks from the "other" folder.
4. Copy the apk that you want to mod.
Most probably system/framework/framework-res.apk and system/app/SystemUI.apk to "APKManager/place-apk-here-for-modding".
Then, start modding apk processes.
1.When you decompile apk (not necessary for framework-res.apk) , copy the 3 files from "APKManager/other/Original Apktool/" to "APKManager/other/" , replaces the old files.
2. Open script.bat, enter 22 to select the current project (Enter the code of the apk you want to mod then press enter!)
3.Enter 9 Enter to start decompiling process. Do not close the SCRIPT window!
4. "APKManager/projects/*.apk/" here contains the decompiled apk.
5. Do your mod.
6. When you compiling any ICS System apks(unnecessary for normal GingerBread apks), copy the 3 files from "/other/ICS Apktool/" to "/other/", replaces the old files.
6. Return to the SCRIPT window. Enter 11 enter to start compiling apk.
7. NOTE: You [mustn't] sign the apk if it is a system apk. Only sign user apks.
8. Make a flashable zip for your apk.
9. Flash via CWM. (Must with a full nandroid backup before flashing anything!)
Reserved.
Reserved.
Nice tut mate!
Right for beginners like me
Short and has a point. Very good guide. :good:
Thanks friend for this tutorial
Gustavo RD78 said:
Thanks friend for this tutorial
Click to expand...
Click to collapse
papabubadio said:
Short and has a point. Very good guide. :good:
Click to expand...
Click to collapse
M90 said:
Nice tut mate!
Right for beginners like me
Click to expand...
Click to collapse
Thank you too!
Sent from my ST25i using xda premium
dont sign ?
thanks
Thank you!!!!
Greetings.
Enviado desde mi Motorola Atrix
x-dira said:
dont sign ?
thanks
Click to expand...
Click to collapse
You don't have to sign apks if the apk is a system apk.
Sent from my ST25i using xda premium
so, can i add CRT ANIMATION using this method??
j.r.j said:
so, can i add CRT ANIMATION using this method??
Click to expand...
Click to collapse
Good guide, but I think you need to expand on the point about making a flashable zip (unless the APK Manager does this - sorry don't use Windows)
Yes,
Go framework-res.apk/res/values/bools.xml
Change the value from TRUE to FALSE in the line like...
config_animateScreenLight
Great tut brov.... +1
to sign non-system apks:-
java -jar signapk.jar certificate.pem key.pk8 your-app.apk your-app-signed.apk
Example: java -jar signapk.jar certificate.pem key.pk8 ttpod.apk ttpod-signed.apk
danist727 said:
Yes,
Go framework-res.apk/res/values/bools.xml
Change the value from TRUE to FALSE in the line like...
config_animateScreenLight
Click to expand...
Click to collapse
ok, i found framework-res.apk/res but cant find the " values/ " path..
i attached my framework-res.apk
thx for replying
真的很谢谢你:silly:
First off, this is my very FIRST publically posted Android mod, and my second one ever - I made the first one earlier today. In other words, I'm new and may make mistakes.
These steps work for me, though!
Exactly what this guide does:
When you enable "Blocking mode" in the Samsung JB ROMs, an "ongoing" (and thus unremovable) notification is shown AT ALL TIMES, even if Blocking mode is only active for a certain time period (at night in my case).
This mod will entirely remove that notification. It will not show up even when blocking mode IS in fact blocking calls etc.
IMO the ideal behavior would be to show it during the time it's active, but that would be a much harder mod to make, as you'd need to add new (byte)code.
Now, with that out of the way...
Requirements:
* DEODEXED AND ROOTED Samsung Jelly Bean ROM (I use WanamLite XXDLIH v3.9, google it - I can't post the link)
* 7-zip (google it)
* Galaxy S III - not sure if other models than the i9300 will work, my guess is that they will. I can't test on other phones than my own, though, so you're on your own in that case! Also no idea if Note models will work, I've never used one.
* A Windows computer - unless the tools are available for other platforms.
* Java -- if you can do Start -> Run -> "java" -> OK without an error, you should be fine.
* A bit of patience
As always, this is on your own risk!
Steps to hack:
0) BACK UP YOUR PHONE! My suggestion would be to take a nandroid backup before getting started.
1) Get an apktool that works with JB APKs.
Here's the one I use (assemble the link): mediafire . com / ?ufzdylekbkloffy
(Sorry for doing that, but surely posting guides constitutes making helpful contributions? )
The ZIP contains two apktool versions, one for decoding and one for building.
Thing is, I'm not 100% sure on where I got the apktool JARs. I think one of them is the unmodified 1.4.2 JAR, and one is modified to work with ICS (and newer) APKs.
I couldn't get EITHER of them to both decode AND build, so I made two separate batch scripts.
I do promise that the thing's safe, but if you don't trust me, you can find them elsewhere - I'm just not sure exactly where. I found them by trial and error.
2) Unpack the tools to a directory, e.g. "apktool" on your desktop. (If you want to follow this guide to the letter, you need to use that folder too.)
3) Start a command prompt - Start -> Run -> enter "cmd" -> click OK
4) Connect your phone via USB, and make sure USB debugging is enabled on it (under Settings -> Developer Options)
5) Enter the following commands, exactly as specified, in order of course:
Code:
cd Desktop\apktool
adb pull /system/framework/framework-res.apk
java -jar apktool-BUILD.jar if framework-res.apk
adb pull /system/app/SecSettings.apk
apktool-d SecSettings.apk SecSettings-mod
You should now have a "SecSettings-mod" directory (under Desktop\apktool) with the contents of the APK.
6) Browse to SecSettings-mod\smali\com\android\settings\dormantmode, right-click "DormantModeNotiReceiver.smali" and Open With... -> Notepad (or right-click and "Edit", if that choice exists)
7) Click the Edit menu -> Find..., and search for "notificationCreate" (no quotes). The first hit should be ".method public notificationCreate [... etc]"; click Find Next.
The next hit should be something like
Code:
invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/Context;)V
8) Comment that line out by adding a # as the very first character, so you end up with
Code:
# invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/Context;)V
9) A few lines down (10 or so), there's another invoke-virtual, for notificationClear. Comment this out as well, aagin by adding a # as the first character on the line.
When you're done, save and exit.
10) OK, we're getting there. Time to rebuild the modded APK.
Go back to the command prompt (or start a new one, see above).
Run this command:
Code:
apktool-b SecSettings-mod SecSettings-new.apk
This may take a LONG while, it takes a bit over 11 minutes for me (nearly all of it to build resources). Be patient!
When it's completed, open up both the ORIGINAL .apk and the modded one in separate 7-zip windows. Delete "AndroidManifest.xml" from the modified apk, then select and copy "META-INF" and "AndroidManifest.xml" from the original to the modified APK. Exit 7-zip.
11) Time to get the modded file over to your phone! Run these commands:
Code:
adb remount
adb push SecSettings-new.apk /system/app
adb shell
12) You should now have the file on your phone, and have an adb shell open. Almost there!
If you're not root (i.e. if the command line ends with $ rather than #), run "su".
Then:
Code:
cd /system/app
mv SecSettings.apk SecSettings.apk.OLD
mv SecSettings-new.apk SecSettings.apk
... and you're finally DONE, if all went well.
"exit" the adb shell, and reboot your phone. When it boots up, the notification should be gone, but blocking mode still works.
Let me know if you have problems, and we'll see if I'm qualified to help solve them.
Before
After
(I would show that blocking mode is active, but the toggle was offscreen in the "before" shot, and I don't want to revert to snap a new one!)
I've also modded away the brightness bar + rearranged the quick-setting icons via this guide - the steps are essentially the same as this guide, except you edit SystemUI.apk and change different files (two XML files instead of the .smali).
To get rid of the brightness bar, follow that guide but also look in values/bools.xml where you can change a brightness value and auto-brightness-button to false. (Change both!)
Great work, Does anyvbody have this as a flashable zip??
carrd said:
Great work, Does anyvbody have this as a flashable zip??
Click to expand...
Click to collapse
Hmm, I'm not sure whether simply using the finished SecSettings.apk is a good idea or not. If a ROM has changed it, those changes would be lost.
The alternative might be to have all this done by a script on the phone (in CWM), but I'm not sure whether that's possible or not. Anyone?
exscape said:
Hmm, I'm not sure whether simply using the finished SecSettings.apk is a good idea or not. If a ROM has changed it, those changes would be lost.
The alternative might be to have all this done by a script on the phone (in CWM), but I'm not sure whether that's possible or not. Anyone?
Click to expand...
Click to collapse
Here's a CW Zip. I've built this based on the XXDLIH build one.
The script will backup the original file to /system/app/SecSettings.apk.orig so worse case scenario you just need to rename it using a root explorer (any will do).
Let me know, however like anything you flash with CWM, make a backup FIRST and I'm not to be held responsible for your phone becoming Self Aware or owt.
Also, The guide at the top is basically right, however there's a lot of steps missing, I'll knock something up if anyone wants it to fill in the gaps (setting up the environment for a start etc).
However this 'should' work on all XXDLIH builds (but AFAICT should work on XXDLIB as well)
Here's the link to the file https://www.dropbox.com/s/kov1bdluu0pt8x8/Blocking_Mode_Icon_Remover.zip
i've intalled you mod by cwm in wannamlite 3.9 and every thing went like a charme. i have a few mods intalled and nothing was deleted. thanks a lote really nice job.
Sent from my GT-I9300 using Tapatalk 2
mocas said:
i've intalled you mod by cwm in wannamlite 3.9 and every thing went like a charme. i have a few mods intalled and nothing was deleted. thanks a lote really nice job.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
No probs, anything to help.
Thanks to exscape for the source.
the_ape said:
Also, The guide at the top is basically right, however there's a lot of steps missing, I'll knock something up if anyone wants it to fill in the gaps (setting up the environment for a start etc).
Click to expand...
Click to collapse
Hmm, which environment? All the files (adb, apktool + their dependencies) should be included.
Anyway, thanks for the zip
exscape said:
Hmm, which environment? All the files (adb, apktool + their dependencies) should be included.
Anyway, thanks for the zip
Click to expand...
Click to collapse
You need to pull the various frameworks from the device, and put them in the right place. This is all documented elsewhere on the site, but for quickness sake, here's a down and dirty.
Download the 7Z Below (latest versions of aapt etc from http://forum.xda-developers.com/showthread.php?t=1792937), unpack them somewhere. Make sure Jave JRE is installed.
To pull from device, plug the Phone in then
Goto unpack folder
Let's get the frameworks from the device, so plugin the device, and ADB Devices and make sure you get a deviceID back.
pull_framework.bat
pull_twframework.bat
Now get the frameworks installed
set_framework-res.bat
set_twframework.res.bat
Let's get the APK we want to work with, so....
adb pull /system/app/SecSettings.apk .\apk\SecSettings.apk
OK, file in the right place, so let's get it unpacked to work with.
apktool d apk\SecSettings.apk working\SecSettings
That will take a few minutes, as it's got to sort out the framework dependencies etc, so give it a second or two. It should then look a little like the following
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\YourUserName\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
Now lets edit the smali for the fix (thanks to exscape for this, so click his thanks button)
notepad .\working\SecSettings\smali\com\android\settings\dormantmode\DormantModeNotiReceiver.smali
<CTRL>-F notificationCreate
Find Next one
change invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/ContextV
to
#invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/ContextV
and a bit further down
change invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationClear(Landroid/content/ContextV
to
#invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationClear(Landroid/content/ContextV
OK, edit done, save and back to the command prompt
start .\apk
Open the APK in 7-Zip/WinRar/Whatnot
Select the AndroidManifest.xml and the META-INF folder, and extract them to the working folder
We have all our bits, so let's put it back together in a usable APK
First we need to create an unsigned build (without the real manifest and META-INF)
apktool b working\SecSettings built\SecSettings-Unsigned.apk
This will take a while to run, as it's compiling everything it needs, should look a bit like this
: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Right, now we need a signed version, so copy the manifest XML and META-INF folders to \build\apk in the SecSettings folder.
move .\working\AndroidManifest.xml .\working\SecSettings\build\apk
move .\working\META-INF .\working\SecSettings\build\apk
Let's now compile the nice signed version, this will take moments, as it's just integrating the Manifest with the already compiled stuff.
apktool b working\SecSettings built\SecSettings.apk
And there we are, job done.
Copy to device in any way that you want, easiest is probably
adb push .\built\SecSettings.apk /system/app/SecSettings.apk
Remember that will overwrite the original (but you have a backup in the APK folder remember), just launch settings now on the device and you should be good to go.
Having said that, easier just to flash the zip
Ohh, I forgot the framework step. Sorry about that. I changed step #5 to include it now.
That's all I've done as far as frameworks go, and I've both used the guide myself (before I wrote it ) and tried it once after... So it should work now.
exscape said:
Ohh, I forgot the framework step. Sorry about that. I changed step #5 to include it now.
That's all I've done as far as frameworks go, and I've both used the guide myself (before I wrote it ) and tried it once after... So it should work now.
Click to expand...
Click to collapse
You will deffo need the TW Framework as well, else it wont be able to decompile. If you want to make sure, try
rd /s %userprofile%\apktool
Then try the process you have out, and you should get issues as the twframework is not available
the_ape said:
You will deffo need the TW Framework as well, else it wont be able to decompile.
Click to expand...
Click to collapse
I just deleted the entire \Users\x\apktool folder, re-added framework-res and decompiled the SecSettings APK with no errors. I'm sure I've never used the 'apktool if' command with anything else prior, too. Hmm.
mocas said:
i've intalled you mod by cwm in wannamlite 3.9 and every thing went like a charme. i have a few mods intalled and nothing was deleted. thanks a lote really nice job.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
exscape said:
I just deleted the entire \Users\x\apktool folder, re-added framework-res and decompiled the SecSettings APK with no errors. I'm sure I've never used the 'apktool if' command with anything else prior, too. Hmm.
Click to expand...
Click to collapse
Cool, just making sure, if it works then cracking.
However setting up the fw's that way is the 'correct way' to do them.
hi again, is it possible for u to make a flashable zip with remove blocking mode and smart rotation?
when i install smart rotation i lose blocking mode and vice versa. thanks a lote.
Sent from my GT-I9300 using Tapatalk 2
mocas said:
hi again, is it possible for u to make a flashable zip with remove blocking mode and smart rotation?
when i install smart rotation i lose blocking mode and vice versa. thanks a lote.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
I can certainly have a look, can you post a link to the rotation hack your using please?
Sorted, I'll compile and upload shortly, not a problem.
here is the link, thanks a lot again.
http://forum.xda-developers.com/showthread.php?t=1933519
Sent from my GT-I9300 using Tapatalk 2
mocas said:
here is the link, thanks a lot again.
http://forum.xda-developers.com/showthread.php?t=1933519
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Here we go, https://www.dropbox.com/s/mtycq38lfw3sl4z/Blocking_Mode_Icon_Remover_With_Smart_Rotate-DLIH.zip
Should work just fine, works Fine on mine anyhow.
Let me know if there's issue, and click thanks if you appreciate
thanks a lot, no issues what so ever... every thing went just fine.
Sent from my GT-I9300 using Tapatalk 2
mocas said:
thanks a lot, no issues what so ever... every thing went just fine.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Most welcome
Would this excellent mod work on a Note II, by any chance?
Hello peeps,
I found myself a li'l bit lazy to decompile/re-compile apk files through a command line window each and every time by instructing it
So I decided to build a GUI version of apktool that will help me, and ofcourse others, to decompile and re-build apk files in just a single click.
UPDATED v3.5 with signapk, dex2jar and smali tools.
What is x-TOOLS?
x-TOOLS (previously known as x-APKTool) is a set of GUI-based android engineering tools.
x-TOOLS lets you do forward/reverse engineering in an easy and more convenient way. :good:
Features:
• One-click decompile apk file.
• One-click compile/re-compile edited apk file.
• One-click sign apk and update.zip file.
• One-click conversion of .dex file to .jar file and vice versa.
• One-click conversion of smali files to human readable form and vice versa.
• Detailed logs of output and error (if found).
• Save detailed log in text file.
• Keep recent files record for fast access.
• One-click install framework-res.apk to decompile and recompile stock/custom rom’s dependent apk files.
• One-click install SemGenericUxpRes.apk or resources.apk file.
• Working to build more new features…
Minimum requirements of x-TOOLS:
1. .net framework 3.5 or higher. Download here (if you are on Windows 7 or higher you don’t need to install it.)
2. JRE 1.6 or higher. Download here
NOTE: There was an old problem with Samsung Smali codes that gave error in baksmali process. So if you want to decompile your apk (extracted from Samsung devices), you have to first remove classes.dex file from apk using 7-zip/Winrar and then tried decompiling the apk.
Tested and suggested by aadroid.dev at here
Screenshot:
Attached at bottom of OP.
Changelog:
V3.5:
1. x-APKTool is now formally known as x-TOOLS.
2. Added GUI-based dex2jar tool.
3. Added GUI-based smali tool.
4. Added GUI-based separate apk and update.zip signing tool.
5. Added an option to select,copy and save detailed log in text file. (right click on log window to get these options)
6. Icon improved
7. Added (minor) Google licence info.
8. Fixed some minor bugs.
v1.5:
1. Added automatically signing apk after compilation.
2. Added more info about processing apk file.
3. Added more info about processing apk file.
4. Fixed path name and file name related issues.
5. Fixed a major bug that occurred while forcely decompiling apk file.
6. Fixed some minor bugs.
v1.0:
1. Initial release
Click to expand...
Click to collapse
Download link: download here
Mirror: Download here
Report me for any bug/error. Request/suggestions are always welcome..
i am try.thanks.
error...
=======================================
Re-compiling com.aac.cachemate.apk...please wait...
=======================================
I: Smaling...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Dr\AppData\Local\Temp\APKTOOL635373159047239252.tmp, -I, C:\Users\Dr\apktool\framework\1.apk, -S, C:\Users\Dr\Desktop\com.aac.cachemate\res, -M, C:\Users\Dr\Desktop\com.aac.cachemate\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Dr\AppData\Local\Temp\APKTOOL635373159047239252.tmp, -I, C:\Users\Dr\apktool\framework\1.apk, -S, C:\Users\Dr\Desktop\com.aac.cachemate\res, -M, C:\Users\Dr\Desktop\com.aac.cachemate\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, Sistem belirtilen dosyay? bulam?yor
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: CreateProcess error=2, Sistem belirtilen dosyay? bulam?yor
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
===========> Task terminated due to above error(s)! <===========
Are you using the same of apktool you used to decompile the file
Sent from my GT-N7000 using xda app-developers app
klem__ said:
Are you using the same of apktool you used to decompile the file
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
+1
Guys dont be a fool he stole it from here http://forum.xda-developers.com/showthread.php?t=33815550
check his threads.. He is posting it in diffirent forum.
Report to your forum moderator..
m.h.mahadi said:
Guys dont be a fool he stole it from here http://forum.xda-developers.com/showthread.php?t=33815550
check his threads.. He is posting it in diffirent forum.
Report to your forum moderator..
Click to expand...
Click to collapse
Excuse me, before blaming me or spreading spam here and there I just want to ask one thing, did you check my and his tool??
Did you find GUI common?? Do you think that I stole his work?? If you think so then check his and mine work before blaming me
BTW dont spam here and and my other threads, just follow the rules
Apktool shows error while Compiling.
gagan.u20 said:
Excuse me, before blaming me or spreading spam here and there I just want to ask one thing, did you check my and his tool??
Did you find GUI common?? Do you think that I stole his work?? If you think so then check his and mine work before blaming me
BTW dont spam here and and my other threads, just follow the rules
Click to expand...
Click to collapse
Apktool shows error while compiling... please repair this problem....
vishav420 said:
Apktool shows error while compiling... please repair this problem....
Click to expand...
Click to collapse
post the error...
updated to v3.5
see OP.
thanks alot :good: :good: :good:
that's really a great tool
Looks good, I thought it will work but... Nope.
When I decompile a apk it says decompiled, I click on open decompiled folder and the folder is just empty =/
And if I decompile it using another tool, and try to recompile it using this tool it tells me that there's a system file missing (or something like that) and reinstalling x-TOOLS might fix it.
Tried reinstalling a lot but still same problems.
I already installed framework-res.apk and SemcGenericUxpRes.apk (I have Z1)
Regards,
~J2C
Hi guys! I see many people trying to learn how to make roms, Here i show the easiest and shortest way on how anyone can begin making roms for the Galaxy S3.
Requirements:
Prepared CWM Stock Package.
Apktool
7-zip
Notepad ++
Setting Up, and Introduction
IF you have downloaded firmware from sammobile instead of zoot1's package, use this part for Setting up and introduction: http://forum.xda-developers.com/showpost.php?p=37812381&postcount=33
OR ELSE THE EASIER WAY
To start with, Download the prepared CWM Stock Rom by zoot1 here: http://forum.xda-developers.com/showthread.php?t=1868004
I personally use firmware from sammobile, because i like to do everything myself. Though this method would be easier for beginners.
Extract the zip file to folder called "ROM".
Now lets head towards the customizing.
Thanks to Prawesome alot for this part. I took some info from his guide.
So now, open up the system folder. You'll find loads of folders in it. Here is a brief introduction to each of those folders:
1. apps
When you open this folder. You will find apk's. An apk is an install-able app package for any Android Device.
You can delete specific apps incase you want to delete. But take extra precautions on what you're deleting. As some apps are useful. You can add apps here as well in formats of apk's. But note, adding Play Store apps to the system/app folder is not recommended. For example you don't want Google Talk in your rom, you just have to delete the Talk.apk.
2. bin
Nothing really to mod in this folder. Full of advanced techy stuff. xD
3. etc
Here is where most of the tweaks come in. There is a folder called init.d where mods like the V6 Supercharger or multi-tasking fixes can be applied. Note! Don't add more than 1 or 2 scripts. Most of them usually conflict with each other.
In the gps.conf file, you can edit your gps info to make the gps more accurate. Pretty good guides about this, search them out.
Next is the hosts file. Devs use this to block sites from generating ads, and keeping their roms ad-free. Take a look at my DroidS3 hosts file, there are over 20,000 hosts blocked. You can use the same hosts file for your rom too.
4. Fonts
Very easy folder to understand. All you need to do here is replace ttf files, and you'll change the fonts.
5. Framework
Here is where the big mods come in. I'll explain further on about this. It contains the android.policy.jar, a useful element to add many mods. Framework-res is used to change wallpapers and theme the rom. I'll explain later.
6. libs
Contains all the libs needed for specific system apps to work. Don't mess here unless you're adding a mod.
7. Folders like csc, hdic, sipdb, wakeupdata, vendor, excetra..
These are the folders, there isn't much to do. Csc folder contains the feature.xml where some mods can be added. Search the forums for that. The rest contain multi-languages and more stuff.
8. xbin folder
Used to add scripts like busybox, dexdump, openvpn support. More like the bin folder but smaller.
9. Build.prop
Ever wondered how some roms have android 5.0, when it hasn't even released? All you need to change is the ro.build.version.release to any number you like. Even Android 20! Go change it, and fool some noobs out there. More mods can be added to this file. e.g:
Code:
debug.sf.hw=1
video.accelerate.hw=1
debug.performance.tuning=1
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
ro.config.nocheckin=1
ro.media.enc.jpeg.quality=100
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
ro.telephony.call_ring.delay=0
ro.lge.proximity.delay=15
mot.proximity.delay=15
ro.ril.disable.power.collapse=0
pm.sleep_mode=1
ro.config.nocheckin=1
The codes listed above are for improving jpeg quality, saving some battery life, reducing call delay and more. Search for build.prop mods, you'll find loads of them. Now, a small explanation of the Meta-inf folder.
In Meta-Inf you'll find the updater-script.
Since this is aimed at beginners, I'll just show you how to change what text is shown during install in CWM.
Just edit what's in the quotes of the ui_print code in the file, and enter your own text. e.g:
Code:
ui_print("Hi, This message in quotes is displayed in recovery");
Modding!
It's time for the modding to begin.
Get apktool from: http://forum.xda-developers.com/showthread.php?t=1755243
Now, first copy your framework-res from the /system/framework directory to where you extracted apktool files. Let's call this folder "apktool"
Open the folder apktool, press shift and right click. Click on "Open command window here". Type:
Code:
apktool if framework-res.apk
Now you are ready to decompile apk's.
I'm going to show you how to mod different files. Copy over:
SystemUI.apk
android.policy.jar
framework-res.apk
1. SystemUI.apk
Just showing you basic modding here. Copy over SystemUI.apk to apktool folder. In the command prompt, type
Code:
apktool d SystemUI.apk
After it's done, you should see a SystemUI folder in the apktool directory.
I'm going to show you how to make the status bar transparent, thanks to raubkatze for this part.
Navigate to res/layout/tw_super_status_bar.xml and change android:background to match the red line.
Code:
<com.android.systemui.statusbar.phone.StatusBarWindowView [B][COLOR="Red"]android:background="#00000000[/COLOR][/B]" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Save and close.
Then navigate to /res/values/drawables.xml
Edit to match:
Code:
<item type="drawable" name="status_bar_background">[COLOR="red"][B]#00000000[/B][/COLOR]</item>
That's it. Save and close.
Go back to your command prompt and type
Code:
apktool b SystemUI SystemUI-new.apk
After it's done, probably will take around 5-10 minutes. You'll find SystemUI-new.apk in your apktool folder. Open both SystemUI.apk and SystemUI-new.apk with 7-zip. Delete AndroidManifest.xml from SystemUI-new.apk and copy AndroidManifest.xml and META-INF from SystemUI.apk to SystemUI-new.apk
That's it. Close the zip files.
If you have adb or android-sdk push SystemUI-new.apk to your phone using:
Code:
adb remount
adb push SystemUI-new.apk /system/app/SystemUI.apk
adb reboot
If you don't have adb, just copy over SystemUI-new.apk to your phone. Rename it to SystemUI.apk and copy to system/app with root explorer. Reboot.
There you have transparent statusbar now!
2. android.policy.jar
Decompile android.policy.jar with:
Code:
apktool d android.policy.jar
You will find android.policy.jar.out, open it and use Cristiano Matos guide to mod the files: http://forum.xda-developers.com/showthread.php?t=2018633
After that use:
Code:
apktool b android.policy.jar.out
Open the android.policy.jar.out folder, you will find a dist folder created and inside that is your modified android.policy.jar.
You can use adb again by:
Code:
adb push android.policy.jar /system/framework
or the normal root explorer method.
3. framework-res.apk
Here i'll show you small mods.
Decompile it using
Code:
apktool d framework-res.apk
Navigate to res/values/bools.xml. Here you can add these. Thanks to DSA for this! :
4 Way Rotation:
Code:
Code:
<bool name="config_allowAllRotations">false</bool>
Change to:
Code:
Code:
<bool name="config_allowAllRotations">true</bool>
Lock Screen Rotation:
Code:
Code:
<bool name="config_enableLockScreenRotation">false</bool>
Change to:
Code:
Code:
<bool name="config_enableLockScreenRotation">true</bool>
and
Code:
Code:
<bool name="lockscreen_isPortrait">true</bool>
change to
Code:
Code:
<bool name="lockscreen_isPortrait">false</bool>
Disable Keyboard Switch In StatusBar When Typing
Code:
Code:
<bool name="show_ongoing_ime_switcher">true</bool>
Change to:
Code:
Code:
<bool name="show_ongoing_ime_switcher">false</bool>
Unplugging From USB doesn't Turn Screen On
Code:
Code:
<bool name="config_unplugTurnsOnScreen">true</bool>
Change to:
Code:
Code:
<bool name="config_unplugTurnsOnScreen">false</bool>[/indent]
Now to change wallpaper. Change the default_wallpaper.jpg in drawable-xhdpi and to change lockscreen wallpaper change keyguard_default_wallpaper.jpg.
Now recompile using:
Code:
apktool b framework-res framework-new.apk
Delete AndroidManifest.xml from framework-new. Copy AndroidManifest.xml and META-INF from framework-res.apk to framework-new.apk
To test use adb:
Code:
adb push framework-new.apk /system/framework/framework-res.apk
Or rename to framework-res.apk and copy to system/framework using root explorer. Reboot.
Once you've added everything, your modified apks. Ui_print mods, A custom kernel (just replace boot.img) it's time to compile. Now this is really easy. Just highlight all the folders/files like system, meta-inf and boot.img. Right click. Hover over 7-zip and click Add to Rom.zip. Wait for it to be done, and copy Rom.zip to your sd card and flash. Voila! You've made your rom!!
You can get more mods to add from here: http://forum.xda-developers.com/showpost.php?p=26583654&postcount=4
I was a beginner once, everyone was a beginner once. People helped me, and now I want to help people.
Press the Thanks button, and/or rate this thread 5 stars to show your support.
FAQ
- How do i add a mod?
To add a mod, just download it. Open it and copy over all the folders from the zip file EXCEPT the META-INF.
- How can i set up apktool on windows?
To set up apktool on windows, you need aapt, apktool.jar and apktool.bat
- My modified apk is not working?
Do some testing and get to know what went wrong. I'm always here. I'll be glad to help.
- Are these the only apps i can modify?
Ofcourse not! Any apk can be modified. Just decompile it, and make your changes.
- I'm looking for a guide on something i want to learn. Can you add it here?
I'll try my best.
Reserved
Reserved one more.
Any feedback guys? I hope this is useful.
Forget that i had to reserve one more.
R: [GUIDE] Beginners/Ref Guide to Making Roms.
Looks interesting...when i will finish my exam i will check with more attention
Sent from my GT-I9300 using xda app-developers app
Willy89 said:
Looks interesting...when i will finish my exam i will check with more attention
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Thanks. Glad it's of help.
Sent from my GT-I9300 using xda premium
Thnx for making this thread.
It's always useful to read thread's like this.
Nice job.
Verzonden door mijn GT-I9300 met xda premium
Great guide, thanks, I will point Theshawty in this direction :thumbup::thumbup:
slaphead20 said:
Great guide, thanks, I will point Theshawty in this direction :thumbup::thumbup:
Click to expand...
Click to collapse
Too late old man. Not interested in building roms anymore.
Thanks guys.
If there's anything you'd like to have added.
Let me know.
AW: [GUIDE] Beginners/Ref Guide to Making Roms.
Thanks. That's it what i searched for to start. Great.
weli..this would be intersting..and will c hw thread moves...
I Need Help In Building the ROM
Hi,
I am steinert. i need your help in biulding the rom, actually i finished everything but getting the problem while flashing the rom. when i googled it. i came to know that the problem lies in updater-script. i used root explorer to find out the reason. it was like.
FINISHED EXECUTING SCRIPT FILE
EXIT VALUE:126
STDOUT:
NULL
STDERR:
SH:<STDIN>[1]:/CACHE/RECOVERY/LAST_LOG:CAN'T EXECUTEERMISSION DENIED.
I Hope that You help a NOOB like me....
Thank you in advance....
Jacqueline Steinert said:
Hi,
I am steinert. i need your help in biulding the rom, actually i finished everything but getting the problem while flashing the rom. when i googled it. i came to know that the problem lies in updater-script. i used root explorer to find out the reason. it was like.
FINISHED EXECUTING SCRIPT FILE
EXIT VALUE:126
STDOUT:
NULL
STDERR:
SH:<STDIN>[1]:/CACHE/RECOVERY/LAST_LOG:CAN'T EXECUTEERMISSION DENIED.
I Hope that You help a NOOB like me....
Thank you in advance....
Click to expand...
Click to collapse
After flashing the rom.
Check the error through Advanced > Show recovery log in recovery.
Post results here.
I : checking for entendedcommand..
I : skipping execution of extendedcommand, file not found...
Jacqueline Steinert said:
I : checking for entendedcommand..
I : skipping execution of extendedcommand, file not found...
Click to expand...
Click to collapse
Huh?
Get me a screenshot of your meta-inf/com/google/android directory.
What exactly did you modify? It should work if you left the meta-inf untouched.
masterex567 said:
Huh?
Get me a screenshot of your meta-inf/com/google/android directory.
What exactly did you modify? It should work if you left the meta-inf untouched.
Click to expand...
Click to collapse
I just removed all the apps and inserted new apps...!!
Should i send you my updater-script?
Jacqueline Steinert said:
I just removed all the apps and inserted new apps...!!
Should i send you my updater-script?
Click to expand...
Click to collapse
Removed all?
Some are core apps like SystemUI, etc.
Get me a screenshot of your rom.zip..
masterex567 said:
Removed all?
Some are core apps like SystemUI, etc.
Get me a screenshot of your rom.zip..
Click to expand...
Click to collapse
{
"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"
}
This is the screenshot of my rom..! and before also i got the same problem with out changing the system .apk's
Jacqueline Steinert said:
View attachment 1700664
This is the screenshot of my rom..! and before also i got the same problem with out changing the system .apk's
Click to expand...
Click to collapse
Highlight those 3 and in 7zip options click add to " ".zip
Sent from my GT-I9300 using xda premium
[Hey guys Aditya here. After a month or so i'm posting tutorial and basic decompiling compiling using adb command!
THINGS YOU WILL NEED
ON WINDOWS PC
1) Winrar
2) 7zip
3) Java
4) Apktool and adb tools!!!!! (Many tools are available download anyone of them)
5) notepad+ AWESOME THING
ON UBUNTU
1) Java
2) Android SDK
3) APKTOOL ofcourse
Let's get started! I asume you using a Windows PC
First of all download and install JAVA
From here
Download Latest Apktool, extract to :
Windows XP : C:\Document and setting\folder your computer name
Windows 7 : C:\user\folder your computer name
copy your apk & framework-res.apk/SemcGenericUxpRes.apk/framework 2 to same folder with apktool
Now you can start Editing apk
Example Editing Walkman
Open Command Prompt (CMD)
TO DECOMPILE
Code:
java -jar apktool.jar if framework-res.apk
java -jar apktool.jar d semcmusic.apk ( can be whatever name you give to your apk )
Some apks need dependies like tw-framework.apk
Code:
java -jar apktool.jar if framework-res.apk
java -jar apktool.jar if semcgenericuxpres.apk
java -jar apktool.jar d your.apk ( can be whatever name you give to your apk )
Now you can edit what you like to. E.g. Res layout etc!
(For more detalis refer Post #3)
TO COMPILE
To compile back the edited apk
Code:
java -jar apktool.jar yourapkname.apk
For signing apk just drop the android manifest and meta inf of older apk or original apk!!!!!!
F.A.Q
A.I'm getting error while compiling apk??
Check if you have installed framework-res.apk most of compiling errors are becoz of this
B.Can apktool batch decompile and recompile apk's??
Yes,many of modded apk manegers or tools can batch decompile and recompile apk's!!
C.Can i MOD any system app using apk tool?
Yes it can mod all types of apk's just make sure you have correctly installed framework and all other dependices!!!!
D.My modded apk is not working! What should i do???
This question is mostly asked to me! Firstly check weather you have put the Meta-Inf from original APK as this folder contain signatures required for apk to get install.Secondly if you have modded some xml check its correct or some code or values are wrong.If any values or wrong code can lead us to FC or Bootloop..!!!
Using ADB and taking logcat!!!!!
USING ADB AND TAKING LOGCAT
What ia adb??
adb stands for Android Debugging Bridge
For what it is used for
adb is commonly used to pull,push,taking system dumpFOR TAKING LOGCAT
What you will need
On windows
1) Java (Hmmm not needed but u should have. )
2) adb tools by me http://d-h.st/vHJ
Now to make it easy first of all check you have enabled USB Debugging in phone its in Developer Options.
PROCDURE
Make a new folder in C Drive
Extract these tools into it (Asume you folder name is adb)
Now open cmd
Code:
type cd..
cd.. again
cd adb
adb
Now you have installed adb on your PC!
TAKING LOGCAT
Code:
adb logcat>logcat.txt
For only redio related log type
Code:
adb -r logcat>logcatr.txt
For only errors type
Code:
adb -v logcat>logcate.txt
Push and pulling apps from system!
Pushing Apps
Pushing app is installing app on its intenrnal memory!Its simple and doesn't need extra powers!
Code:
adb push yourappname.apk /system/app or /system/framework
Place the app in the adb folder
Pulling Apps
Pulling app is to take out your system apps or frameworks etc!
Code:
adb pull /system/app or /framework yourapp.apk
By this method you can take a system dump
Code:
adb pull /system
Understanding Logcats!!!!!
Some keyword's that represent's error'
Code:
"E/" - error
"E/dalvikvm" - possibly crucial system error
"No such file or directory" - says it all
"couldn't" - android likes that, mostly shows faulty things.
"fail"/"failed" - mostly crucial error
"W/"/"warning" - says it all, but not always warn could be a boot failure cause
"exception"(especially NullPointerException) - points you that something went wrong in framework or application work
These type of errors help us understand the error's and we can easily call out from these bugs or errors!!!
Most common errors occuring in an logcat!
"couldn't find native method", the most common reason of a bootloop.
This error causes most of bootloop problems!!!
For example
Code:
E/dalvikvm( 100): ERROR: couldn't find native method
E/dalvikvm( 100): Requested: Landroid/view/GLES20Canvas;.nStartTileRendering:(IIIII)V
E/JNIHelp ( 100): RegisterNatives failed for 'android/view/GLES20Canvas', aborting
As you can see! The main reson for this error is smali present in android/view of framework.jar called GLES20Canvas.smali
This happens while you are trying to port ROMS!!!!
Now if you are having bugs in other apkor jars how can u find ahem! i.e logcat gives us only the location of smali files and not the name of apk or jar! For that you have to study hole android code sources! Some common folders i have posted here!!
Code:
"com/android/server" - services.jar (there is the same folder at framework.jar but most likely you don't need to touch it).
another place we could be mixed up:
"com/android/internal" - framework.jar
"com/android/internal/policy/impl/" - android.policy.jar
for framework.jar path ends up on internal, which represents telephony folder. policy/impl is the only android.policy.jar folder.
Other frameworks are actually not used in port as they contain core android functionality which is common.
Simple MOD's
Now you guy's have idea about how to take a Logcat,use adb,use apktool.
NOW SOME REAL STUFF
MOD's Related to SystemUI.apk
We will start with simple MOD's! Like replacing icons and to some extend changing layout!
Now we will start will replacing icons inside the SystemUI.apk
First of all pull app from /system/app using adb Refer #2
Then copy that app to apktool folder! Type this cmd
Code:
java -jar apktool.jar d SystemUI.apk
Now go to out folder of SystemUI.apk!
Will find META-INF! RES! ANDROID.manifest
Now Navigate to res/drawable-hdpi as our device uses HPDI
You will find many icons now be carefull here! If youare expert n photoshop or any bitmap editor eit these icons! Or search it! Google it you will find many!
Replace these default icons by ur edited once or downloaded once!!
XML EDITING
Some XML's are not so complicated as other once! Some xml's have just true or false! Example
Code:
<bool name="config_hardwareAccelerated">true</bool>
This tells me that Hardware Acceleration is enabled you can disable it by replacing true by false! You just need to experiment around!
Smali Editing!
Coming soon!
Patching!
Coming soon :d
Changelog
CHANGELOG
1 July Monday 6.04pm -- Inital Editing
Old info but very usefull for noobs. Keep it up
:thumbup:
Hit thanks if you think I helped you.
Sent from LG Nexus 4
Thats really awesome keep it coming am a noob and I rly want to learn n b a part of z dev team
Sent from my GT-I9082 using xda app-developers app
For apk editing there are many 3rd party softwares which doesn't requires one to write such huge codes for signing and etc .
Kinda old method
Make.Believe
Razor! said:
For apk editing there are many 3rd party softwares which doesn't requires one to write such huge codes for signing and etc .
Kinda old method
Make.Believe
Click to expand...
Click to collapse
Yup . Like chotu tools
Sent from my GT-I9082 using xda premium