FORUMS
Remove All Ads from XDA
Honor CEO Thread

[GUIDE]MAKE APK'S ON YOUR PHONE-for kustom live w'paper app ONLY- inc playstore ready

1,282 posts
Thanks Meter: 3,242
 
By Pug123, Recognized Themer on 17th August 2015, 07:24 PM
Post Reply Email Thread
This tutorial is for lollipop & marshmallow rom users only !


Works with or without Root !

For making apk's for kustom live wallpaper app only !

The apk's should run on any ROM 4.4 upwards

Newbie Friendly !

DISCLAIMER

I, in no way take responsibility for any damage you may cause to your phone by following this tutorial as ApKTOOL app is capable of accessing your system folders and thereby you changing or deleting something you shouldn't,
That said the instructions I give do not use any system locations, so if you follow them properly you will be OK!



Welcome to my tutorial for making apk's for kustom live wallpaper ( klwp ) on your PHONE.

Please don't be put off by the length of the tutorial, its IMHO very easy to follow and I have tried to write it in such a way that anybody can follow and understand it and have an end result without too much head scratching.

No major knowledge needed, just the skill of being able to navigate around your phone files and being able to follow instructions as is, and finally, the ability to revel in your own glory for making your first pc-less apk.

Top tip, (as if you didn't know this already)
Have this tutorial up on your PC whilst following it, no keep swapping between recents on your phone then.


I would like to thank @plegdroid AKA Pete Nolan for introducing me too and walking me through the stages needed to use ApkTOOL

If your making apk's for personal use to share from a cloud I.e. dropbox etc, you do not need to use zipsigner as the ApKTOOL app can sign for this kind of sharing.
Apps and stuff you will need to download for this 'magic' to take place are...

ApkTOOL, download here (github link here).

Klwp sample apk, download here
Komp sample apk, download here

Android asset studio (launcher icon generator) link here (bookmark this !)

Droid edit, play store link here

Zipsigner (only if you want to publish to play store), play store link here

Photo Editor (if you don't already have one), play store link here

!!Do not install ApKTOOL or klwp/komp sample apk's yet, please wait for instruction to tell you to do so!!

Sounds like a lot to do, right?....
Setting up everything up the first time takes a bit of time, But once you've done it, and got used to the fairly simple instructions, you'll be making apk's in MINUTES on your phone....


FYI.

I deleted and uninstalled all associated with this tutorial so that I could write the instructions as a person following this tutorial I.e. installing the apps first then writing the instructions step by step as I went through each stage, thereby hopefully getting them as clear and succinct as possible

There is a thread for ApkTOOL here for kitkat, although it is a general thread as ApKTOOL can do much more than just make apk's for kustom, but please don't post on this thread about it as I don't use it on kitkat and only use it for kustom, so if this interest's you please post your queries there.

Also as this is my first "proper" tutorial, I would really appreciate any feedback...
How easy it was to follow.
Any problems you had.
Conformation that it worked for you
Suggestions
Etc.

CREDITS

@plegdroid - for all your help(and contiued help)
@rkucheran - for also helping out (and continued help)
@Brut.all - original creator of ApkTOOL
@iBotPeaches - current maintainer of ApkTOOL
@frankmonza - for klwp app and sample apk's
Roman Nurik - for android asset studio
André Restivo - for droid edit
Ken Ellinwood - for zipsigner
Dev.macgyver - for photo editor
@browcantor - for confirming, working without root .
@TheKrates - for confirming working on marshmallow ROM

If you find this tutorial helpful then please take the time out to subscribe and rate thread, oh and press thanks if you feel like it

Let's get started, move on to post 2.
The Following 41 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
 
 
17th August 2015, 07:24 PM |#2  
Pug123's Avatar
OP Recognized Themer
Flag *ZION*
Thanks Meter: 3,242
 
More
Camera
Installing ApKTOOL
And getting things ready

Using your file explorer for steps 1, 2 and 3..

1, Make a folder on your sd card (internal memory, not on micro SD) and call it Apktool.

2, Move ApKTOOL.apk to the folder you just created and install ApKTOOL.apk, (If you can't install the ApKTOOL.apk, then goto your phone settings select security then check allow unknown sources, then install ApKTOOL.apk again.) when its finished installing press open, it will then ask you to install an update, install the update and when its finished press done.

3, Also move klwp.sample.apk and komp.sample.apk to the Apktool folder you created in step 1, BUT DO NOT INSTALL THEM.

4, Go into your app drawer and open ApKTOOL app.
(If you are rooted open the three dot menu top right of the screen, press settings, scroll to the bottom and check the root option, there's no need to really do this, I do just because I can )

5, Navigate to sdcard then the Apktool folder you made earlier,select it, now your screen should now look like this...



6, Click on the klwp.sample.apk and pick decompile resources, leave it to do its thing for some moments (sometimes up to 40 seconds), once complete you should get this on your screen...



Press OK.

7, Your Apktool folder should now have the decompiled apk called klwp.sample_src in it and should look like this...




Now thats all set up, lets move onto next post
The Following 13 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
17th August 2015, 07:25 PM |#3  
Pug123's Avatar
OP Recognized Themer
Flag *ZION*
Thanks Meter: 3,242
 
More
Making your asset (launcher) icons
These are the small pictures that show on people's phone's when they use klwp app.
You can skip this post if you want to use Andi as your asset launcher icon..

he comes as default.
Note..
Also if you already have a ic_launcher.zip from previous apk's you have made then you can skip straight to step 5.

1, Firstly using a photo editor, make, crop or resize a picture to a size of 256x256, it can be whatever you like a photo, an image you've made or just text on a background, remember it will end up small though so too much detail may be hard to see and if making an app for playsore be considerate of copyright laws etc..then save it.

2, Goto Android asset studio (that I asked you to bookmark in post 1) In your browser, and click the word 'image' near the top of the page, this will then give you the option of choosing an action . Navigate to the image you made in step 1 and pick it..

3, The Android asset studio page should now look like this, but obviously with your picture .



You can play about with the settings on the page if you like, but I just leave them the way they are.

4, Press the download zip button, this will then put the zip in your downloads folder, it will be called ic_launcher.zip.

For steps 5, 6, 7, 8 and 9, use your file explorer.

5, Go into your download folder and extract the ic_launcher.zip, once extracted open the folder which will be called ic_launcher and then open the res folder and delete the mipmap-xxxhdpi folder as this is not needed. Copy the other 4 'mipmap' folders.

6, Navigate to your sdcard then open your Apktool folder, click on the klwp.sample_SRC folder, select res folder and paste the 4 'mipmap' folders you copied, in there.

7, click on mipmap-hdpi and copy ic.launcher.png, then go back into the res folder and click on drawable-hdpi folder then paste the image you just copied, you should get a prompt with options , choose overwrite.

8, Copy step 7 for the remaining 3 mipmap folders, taking care to make sure you copy and paste/overwrite from and into the correct folders

9, Now delete the four mipmap folders (not the drawable folders, which I did once and had to do the whole procedure over again ) and exit your file explorer..

Suggestion.
If you are planning to make ultra fast apk's as detailed in post#7, then use a default ic_launcher pic I.e.your avatar that way you can use the same launcher pics for all your apk's and can skip this post

Right, that's the boring bit over, Let's get to the cool geeky bit and start building ..
The Following 12 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
17th August 2015, 07:25 PM |#4  
Pug123's Avatar
OP Recognized Themer
Flag *ZION*
Thanks Meter: 3,242
 
More
Building your APK

Due to changes in the way that klwp saves your wallpapers or komponent you now need to rename your klwp/komp file with a .zip at the end either before or when you place them in the assets folder

Use your file explorer for step 1

1, Decide which klwp zip/s (yes you can add more than one) you want to make into an apk, you can find these in your kustom/wallpaper folder, copy the one/s you want and navigate back to your Apktool folder and select it, then click on klwp.sample_src and then select the assets folder, then select wallpapers folder , paste the klwp zip/s you copied here, (you will see a read me file here also, it just tells you to put your wallpaper zips in this folder, delete it), exit your file explorer.

2, Open ApKTOOL app from your app drawer and navigate to Apktool folder and click on it then click on klwp.sample_src folder select browse
your screen should now look like this.



3, Just to check you zip is in there click on assets, then click on wallpapers
And your screen should look like this, with one or more zips (obviously your zip name will be different)



4, Navigate back to your klwp.sample_src folder, then select res folder then click on values folder then click strings.xml, you will then be prompted to open with, pick the droid edit app you downloaded from post#1.
Your screen should now look like this.



On this screen only edit (with your app name and description )what is written in WHITE, Using only text and numbers you may also use capital letters and spaces...like so..



If you delete anything else by accident, unless you know what your doing I suggest you exit droid editor and start from step 4 again.
Once edited press the little icon I've arrowed on the left of the option ribbon.



And press save

5, Navigate back to your klwp.sample_src folder, then click on AndroidManifest.XML, again you will receive a promt and again open with droid edit and edit (with your app name ) ONLY what I've highlighted in next pic.Use lowercase text only and no spaces.



So it looks like this



Click on the little icon I arrowed earlier and press save

6, Navigate back to your Apktool folder and click on klwp.sample_src folder, select recompile if you have done everything correctly you should get a pop up that looks like this..



Click OK.

7, you should now have an extra apk in your Apktool folder called klwp.sample_src.apk with ( if you have made one) your own launcher icon..



Click on your new klwp.sample_src.apk and pick sign you should then get a pop up like this..



Press OK

Then you will notice another apk in your Apktool folder called klwp.sample_src_sign.apk if you long press on this apk and select rename you can then name it the name of your app but don't forget to leave the .apk on the end..(if you are using the apk for the play store, don't rename it yet this will happen in following posts). Like so..



if you want to go onto the next stage and make the apk play store ready, then keep the klwp.sample_src.apk otherwise you can delete it.

8, you can now test your newly built apk by installing it, either by clicking on it now and selecting install or installing it the usual way you install apk's, its also ready for you to share via your favorite cloud etc..

Note....
To make a komponent/s apk follow the same instructions from post#2 step 6 but instead use the komp.sample.apk. (But obviously copy your komponent zip/s into the komponent folder in post#4 'building your apk, step 1.

Suggestions...
Do not delete the decompiled klwp.sample_src folder as this can be used for making ultra fast apk's as detailed in post#7.

If you are planning to update your app then leave the finished apk in the Apktool folder for ease of update (copy it somewhere else for backup if you want, though).
The Following 12 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
17th August 2015, 07:26 PM |#5  
Pug123's Avatar
OP Recognized Themer
Flag *ZION*
Thanks Meter: 3,242
 
More
Making your apk play store ready.

1, Using ApKTOOL app, navigate to your Apktool folder, click on it then select klwp.sample_src.apk then from the menu list select zipalign. You should get a pop up like this.



Click OK.

You should now have a klwp.sample_src_zipalign.apk in your Apktool folder, as below..



Exit ApKTOOL app.

2, Open zipsigner app from your app drawer, press the 3dot menu on top right of screen, select my keys from the menu list then press the 3dot menu again and select new keystore scroll to the bottom of the new page and click continue and fill in the form like so..



Note.You can change the directory if you want but I use my internal storage (sdcard0) then after I have finished all the steps to register my keystore I find the keystore file on my sdcard0 and copy it to my sdcard1 (external storage/micro sd card) as a backup.
Click continue then fill out the next page like so..



Obviously I have blacked out my key name/alias, it is 'cert' by default but you can change it if you like and for the key/verify passwords make sure you use the same one that you entered on the previous page, don't change anything else on this page unless you understand what it means. Press continue.
On the next page leave the defaults as they are (unless you know what your doing) and fill out the form as per the instructions (I just put my name and country code I.e.GB (GreatBritain). Close zipsigner app.

3, Now we can sign your new apk...
Open zipsigner app again, and press underneath the key/mode option which will bring up a menu and amongst the options will be either cert (if you didn't change your key name/alias) or your new key name/alias (you may have to scroll the menu to find it. Then select it.
Next click choose in/out this will bring up a page of folders select Apktool/ then select klwp.sample_src_zipalign.apk, your screen should now look something like this..



(I have blacked out the key/mode as its my alias and you may not have the word 'emulated' in your file names that's just a quirk of my old galaxy s3 i9300 I think )
Click sign the file, you will then get a pop up screen asking you to enter your keystore password, enter it and press OK. You should then get a toast message saying file signing operation succeeded!

Note...
For future apk's that you make you now have you keystore and can skip steps 1 and 2.

4, last bit ......
Open ApKTOOL app from your app drawer and navigate to your Apktool folder and open it, you should now have an apk called klwp.sample_src_zipalign_signed.apk, like so...



Long press on the klwp.sample_src_zipalign_signed.apk and select rename from the menu, then rename it the name of your apk remembering to leave the .apk on the end (and you can delete the other stage apk's now if you want, just long press on them and select delete)
like so...



Your APK is now ready to publish to the Play Store.



VoilĂ 



Suggestion...
If you are planning to update your play store app then leave the finished apk in the Apktool folder for ease of update (copy it somewhere else for backup if you want, though).
Important notice
If you are publishing to the play store and you are using other people's klwp or komponent ,as is or altered,
Please ask for thier consent first ....
Especially if you are publishing it as a PAID app.
The Following 15 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
17th August 2015, 07:26 PM |#6  
Pug123's Avatar
OP Recognized Themer
Flag *ZION*
Thanks Meter: 3,242
 
More
How to update app version for Play store.


1, Using ApKTOOL app, navigate to your Apktool folder, click on it then select the 'play store'.apk you wish to update, mines called taxi (obviously yours will be different so from now on certain folders I reference I will write 'your app name') click on it and select decompile resources and wait for it to do its thing...you then should get a pop up like this...



Click OK.

You should now have a new folder called 'your app name'_src like so...



Use your file explorer for step 2.

2, Depending on what you are updating....

If you're adding a klwp.Zip/s to a collection then copy the extra klwp.Zip/s you want to add from kustom/wallpaper folder then goto Apktool folder then click on 'your app name'_src then assets select wallpapers and paste the klwp.zip/s here.

If you are updating an existing klwp.zip, then firstly goto Apktool folder then click on 'your app name'_src then assets select wallpapers and delete the klwp.zip already there, then copy your updated zip from kustom/wallpaper folder, navigate back to Apktool folder then click on 'your app name'_src then assets select wallpapers and paste the updated klwp.zip here.
Exit file explorer.

3, Open ApKTOOL app again from your app drawer and navigate to Apktool folder and click on it, then select 'your app name'_src folder and from the pop up select browse .
(You can check if your zips are in the assets/wallpapers folder if you want)
Click on apktool.yml file. Open with droid edit app, then this should be on your screen.



4, Edit the version code to 2 and edit the version name to 1.1 as highlighted below.



Any further versions will be increments of 1 also I.e. 3 & 1.2 etc
Now press the little icon arrowed in post#4 and press save. Exit droid edit app.

5, Open ApKTOOL app again from your app drawer and navigate to Apktool folder then click on 'your app name'_src then click recompile. You will now have a folder called 'your app name_src.apk, click on this folder and select zipalign, you will now have a folder called 'your app name'_src_zipalign.apk

6, now open zipsigner app and press the choose in/out button and select the 'your app name'_src_zipalign.apk then press sign the file (your key mode should still be the same as previously used I.e cert or your own alias) and enter your keystore password.
Exit zipsigner app.

7, Open ApKTOOL app again from your app drawer and navigate to Apktool folder then click on it.
You should now have a 'your app name'_src_zipalign-signed.apk, like so.



Now you can delete 'your app name'_src.apk and 'your app name'_src_zipalign.apk, and also the 'your app name'_src folder, by long pressing on them and selecting delete.
Lastly long press on the 'your app name'_src_zipalign-signed.apk select rename and rename it 'your app name' V1.1.apk

Your updated APK is now ready to publish to the Play Store.



And Hey-presto..
The Following 12 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
17th August 2015, 07:26 PM |#7  
Pug123's Avatar
OP Recognized Themer
Flag *ZION*
Thanks Meter: 3,242
 
More
Sign
Make personal apk's ultra fast!

Now everthings set up we can make personal apk's I.e to share via cloud (not play store) by just changing zips and XML's.


Using your file explorer for step 1.

1, You should already have a decompiled klwp.sample_src folder in your Apktool folder as per suggestion at the end of post#4.
Copy which kustom wallpaper you wish to apk next, from kustom/wallpaper folder. Navigate to Apktool folder,open it then click on klwp.sample_src folder, then assets, then click on wallpapers and paste your copied wallpaper here, then delete the previous wall (unless you wish to keep it in the apk)
Exit file explorer.

2, Open ApkTOOL app and navigate to Apktool folder, open it and click on klwp.sample_src folder and select browse, then click on res then values then click on strings.xml and open with droid edit.

3, Edit the names you have previously used to your new name, only using upper/lower case letters and also spaces (as per highlighted pic)



Now press the little icon arrowed in post#4 and press save. Exit droid edit app.

4, Navigate back to klwp.sample_src and select AndroidManifest.xml and open with droid edit app and edit to your new app name, only using lower case letters with no spaces (as per highlighted pic)



Again press the little icon arrowed in post#4 and press save. Exit droid edit app.

5, Open ApkTOOL app and navigate to Apktool folder and click on it. Then click on the klwp.sample_src folder and select recompile from the pop up list, and wait for a few seconds for it to recompile, and if you've done everything correctly you should get a pop up like this..



Press OK.

6, Now you should have an extra apk in your Apktool folder called klwp.sample_src.apk, click on this and select sign from the pop up list and click OK on the next pop up .

7, Now you will have another apk in your Apktool folder called klwp.sample_src_sign.apk, long press on it and select rename, then rename it to your new app name.
You now have your new apk ready for sharing via your favorite cloud etc.
Delete the klwp.sample_src.apk now as its no longer needed.

So to summarize your ultra fast apk build
Transfer new klwp zip/s
Edit strings.xml
Edit AndroidManifest.xml
Sign
Rename
Done
The Following 17 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
17th August 2015, 07:26 PM |#8  
Pug123's Avatar
OP Recognized Themer
Flag *ZION*
Thanks Meter: 3,242
 
More
Reserved
The Following 7 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
17th August 2015, 07:27 PM |#9  
Pug123's Avatar
OP Recognized Themer
Flag *ZION*
Thanks Meter: 3,242
 
More
Reserved one more
The Following 4 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
17th August 2015, 07:27 PM |#10  
Pug123's Avatar
OP Recognized Themer
Flag *ZION*
Thanks Meter: 3,242
 
More
Might as well reserve this one also
The Following 5 Users Say Thank You to Pug123 For This Useful Post: [ View ] Gift Pug123 Ad-Free
21st August 2015, 03:40 PM |#11  
Frank Castle's Avatar
RC-RT Committee Lead / Senior Moderator - "Si vis pacem, para bellum"
Thanks Meter: 53,051
 
1010101010
More
First! Ha, moved here and if any more assistance is needed, just ping JJD. Thanks and great job here.
The Following 4 Users Say Thank You to Frank Castle For This Useful Post: [ View ] Gift Frank Castle Ad-Free
Post Reply Subscribe to Thread

Tags
apktool, klwp, kustom, make apk, play store ready apk

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes