[MOD] Add top number row to Swype - Android Software Development

Hello guys,
Since I use a Samsung device, I'm used to the extra number row on top of the keyboard so I modded Swype to have that extra row. However since Swype is to be purchased and not distributed, I'll only tell here how to do it for your legally purchased copy. And this is a bit complicated and for advanced users and you need to be rooted. You also need Root Explorer. Here we go:
1- First buy/download Swype from Google Play.
2- Go to /mnt/asec/com.nuance.swype.dtc-1 folder, copy pkg.apk to your sdcard, rename it to com.nuance.swype.dtc-1.apk.(keep a backup of this file at all times)
3- Go to /mnt/asec/com.nuance.swype.dtc-1/lib folder copy the files (libnmsp_speex.so and libswypecore.so) to your sdcard.
4- Using apktool (I used version 1.52) decompile com.nuance.swype.dtc-1.apk.,
5- Go to decompiled folder\res\xml folder. kbd file pertaining to your language is to be edited, I edit kbd_qwerty.xml for English using Notepad++.
6- Check the attached kbd_qwerty.xml in portrait folder and notice the extra row section I added to the top. You can in fact add secondary characters to numbers or customize the keyboard completely, rearrange letters, add symbols etc.
7- Once done, save the file and go to decompiled folder\res\xml-land folder and edit the landscape for the layout, kbd_qwerty.xml file, notice the attached file in landscape folder.
8- Once done, save the file and go to decompiled folder\res\values folder and edit the dimens.xml file. Here I raise the height of the keyboard and height of the key to 270dip and 54dip respectively, check the top rows of the attached dimens.xml. Also increase the keyboard height for landscape (if you want) by changing the dimens.xml under res\values-land folder.
9- Once done, recompile the folder with apktool, go to decompiled folder\dist folder and copy the apk here to a different folder and rename it to temp.apk.zip
10- Open temp.apk.zip with 7z/winrar and copy the resources.arsc and kbd_qwerty.xml files from res\xml and res\xml-land folders to your PC(obviously keep the 2 files in seperate folders not to overwrite)
11- Then, rename the original apk from step 2 to com.nuance.swype.dtc-1.apk.zip , open with winrar and first delete resources.arsc file, then drag the resources.arsc file from step 10 to the archive, it will be added. Staying in winrar, go to res\xml folder and replace the file with kbd_qwerty.xml from step 10 (the portrait version). Do the same with res\xml-land folder and the landcape file.
12- Once finished rename the file back to com.nuance.swype.dtc-1.apk, don't sign it, don't delete META-INF folder, leave it as it is.
13- Now, on your phone, uninstall Swype. Reinstall it from the apk file on Step 2. Go to /data/app-lib/com.nuance.swype.dtc-1 folder and move the 2 files (libnmsp_speex.so and libswypecore.so) to system/lib folder. You have to mount the System R/W from Root Explorer on this step. Fix the permissions so these 2 files have the same permissions with other files there. If you can't find these files just use the ones from Step 3.
14- Once done, copy com.nuance.swype.dtc-1.apk from Step 12 to /system/app and fix the permissions so that it has the same permissions as other files there.
15- Then delete the com.nuance.swype.dtc-1.apk from /data/app/ folder. Restart your phone.
This should be it if you followed it exactly, tracing and Dragon voice dictation also works. While you're doing all this work (takes 10 minutes by the way), you might also consider changing how Swype looks (theming) and changing many other things like swype thickness, colors etc. Please note that this is for advanced and rooted users and please don't ask me to give you the modded apk, you have to do it on your legally bought version. You might consider doing backups just in case anything goes wrong. Have fun.
And a quick tip: if you swype from swype icon to symbol key(123), arrow keyboard opens up.
You can also add arrow keys by copying arrow keys from kbd_edit.xml, check the 2nd screenshot.
Please hit the thanks button if you think this is useful.

Nice how to. But may u should tell that the latest Android versions store purchased apps in data/app-asec as asec version, this need special procedure to get a apk from the asec format.

Can you please update this tutorial to 4.3 ? I couldn't find the files in the mentioned paths. . I'm on stock rooted 4.3 on gt9500
Sent from my GT-I9500 using XDA Premium 4 mobile app

lesalloum said:
Can you please update this tutorial to 4.3 ? I couldn't find the files in the mentioned paths. . I'm on stock rooted 4.3 on gt9500
Sent from my GT-I9500 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
It works same for me on 4.3 stock rooted i9500, maybe you could do a file search to find the necessary folder. Here is another screenshot with the updated Swype(1.6.2.22328), where I made number buttons smaller like original Samsung Keyboard and hide the suggestions bar to save space.

ozkaya said:
Hello guys...
9- Once done, recompile the folder with apktool, go to decompiled folder\dist folder and copy the apk here to a different folder and rename it to temp.apk.zip
....
Click to expand...
Click to collapse
using the current play store version (1.6.3.22544), i decompiled com.nuance.swype.dtc-1.apk (/mnt/asec/com.nuance.swype.dtc-1/pkg.apk) using APKTool 1.52. i made no changes and attempted to recompile without success.
the first error displayed by apktool is:
"C:\Users\Phil\apktool\com.nuance.swype.dtc-1\res\values\arrays.xml:545: error: Found tag dimen-array where item is expected"
i do use APKTool successfully to mod other apps so i am familiar with the process.
QUESTION: what frameworks file are you using when making your mods? are you using a TW ROM frameworks? that's the only other variable i can think of...
EDIT: well, i just tried using TW framework too without success

PhilDX said:
using the current play store version (1.6.3.22544), i decompiled com.nuance.swype.dtc-1.apk (/mnt/asec/com.nuance.swype.dtc-1/pkg.apk) using APKTool 1.52. i made no changes and attempted to recompile without success.
the first error displayed by apktool is:
"C:\Users\Phil\apktool\com.nuance.swype.dtc-1\res\values\arrays.xml:545: error: Found tag dimen-array where item is expected"
i do use APKTool successfully to mod other apps so i am familiar with the process.
QUESTION: what frameworks file are you using when making your mods? are you using a TW ROM frameworks? that's the only other variable i can think of...
EXIT: well, i just tried using TW framework too without success
Click to expand...
Click to collapse
Latest version of Swype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.

ozkaya said:
Latest version of Skype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
Click to expand...
Click to collapse
i'll give this a shot tomorrow, thanks a lot!

ozkaya said:
Latest version of Swype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
Click to expand...
Click to collapse
it works!!!
thanks man, appreciate the help and info!

I've been going nuts trying to edit swype for a week now and still can't seem to get it to work. All I want to do is change the suggested word color and maybe a few other minor color related things. I assumed just changing the color codes in /res/values/styles.xml that seemed to pertain to the holo theme would work but I can't ever get the app to install. Not even sure where to begin to ask for help on this one but if anyone has any advice I'd greatly appreciate it.

Ok I've tried this a hundred times following all the steps completely and it just wont work.
Once I go to install the final apk it always tries to install then sais App Not Installed.

TeknoGodz said:
Ok I've tried this a hundred times following all the steps completely and it just wont work.
Once I go to install the final apk it always tries to install then sais App Not Installed.
Click to expand...
Click to collapse
You don't install the final apk, in fact you can't since the certificate is no longer valid. You copy the final apk in place as in Step 14.

I would love this! I have used Swype for years but I would love a number row. To be honest I have no idea how to follow those instructions! I have a rooted phone - what can I do?

Am I right in concluding that you can't use TB to backup and restore the finished product and this will have to be done manually? I did this on my rooted Note 3 and I keep going back to my stock image because I don't want to have to keep doing the steps when I flash a new ROM or ROM update.
Would I maybe just have to do steps 12 onward every time?

mr.BeBoT said:
Am I right in concluding that you can't use TB to backup and restore the finished product and this will have to be done manually? I did this on my rooted Note 3 and I keep going back to my stock image because I don't want to have to keep doing the steps when I flash a new ROM or ROM update.
Would I maybe just have to do steps 12 onward every time?
Click to expand...
Click to collapse
When you install a new ROM, you install original Swype from apk file then you move the lib files to /system/lib, copy the modded apk to /system/app and delete original apk from /data/app folder. So it is 4 steps once you have the modded apk ready, should take no more than 5 minutes.

thumm138 said:
I've been going nuts trying to edit swype for a week now and still can't seem to get it to work. All I want to do is change the suggested word color and maybe a few other minor color related things. I assumed just changing the color codes in /res/values/styles.xml that seemed to pertain to the holo theme would work but I can't ever get the app to install. Not even sure where to begin to ask for help on this one but if anyone has any advice I'd greatly appreciate it.
Click to expand...
Click to collapse
This is similar. Please go through the steps, you don't (can't) install the modded apk, you move it in place.

ozkaya said:
This is similar. Please go through the steps, you don't (can't) install the modded apk, you move it in place.
Click to expand...
Click to collapse
Yeah I realized that after I posted and still nothing. I'm no programmer but I've never NOT been able to change a few things and recompile. Not sure how just changing a few color codes is causing such a problem. Shame such a nice keyboard has such little customization and few themes. Don't get me wrong I like orange but it really doesn't mesh at all with the rest of the UI. Thanks for the reply though.

ozkaya said:
This is similar. Please go through the steps, you don't (can't) install the modded apk, you move it in place.
Click to expand...
Click to collapse
I did all that and it changed the height of the keyboard, but didn't add any additional number row.
kdb_qwerty or whatever it's called is the default that comes up when you install it, right? Becuase I tried again and specifically made sure to use this one and it just wont give me the extra row, just the height.

TeknoGodz said:
I did all that and it changed the height of the keyboard, but didn't add any additional number row.
kdb_qwerty or whatever it's called is the default that comes up when you install it, right? Becuase I tried again and specifically made sure to use this one and it just wont give me the extra row, just the height.
Click to expand...
Click to collapse
It depends on your system language. Try kbd_qwerty_panlatin.xml.

ozkaya said:
Latest version of Swype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
Click to expand...
Click to collapse
Thank you for this change, this is exactly what I was looking for to compile.
Once again my Swype is blue!!! :victory:

here's my creation, what do you guys think?
the theme is "Lucid" from the pay store: https://play.google.com/store/apps/...lucid&pcampaignid=APPU_8szYUoedK9PNsAThnoDQDQ

Related

[Q] How to edit theme images and not have phone hang on boot?

I've figured out all apk files are really just zip files, but why am I not able to unzip the framework-res.apk file, edit the images within, then save it again without causing my phone to hang on boot?
Is there some step I am missing? I've tried rezipping with normal compression, store only, and only photoshopping and resaving a single image within the apk and still it fails.
How are images edited and updated? What am I missing?
I use apkmanager myself for most theming. You might look into it
Sent from my SCH-I500 using XDA App
An apk is a zip, but it's a *signed* zip
Sent from my SCH-I500 using XDA App
Here is the way I do it. I use 7zip to do this and I think it is the only program that can do it.
The way you can do it is to extract the drawable-hdpi folder within the framework-res.apk then do all your edits and save them with the exact same file names. Then you can go back into your framework-res.apk and drag and drop the drawable-hdpi folder back in and it will over write the original ones. Now just hit the Up (like to move up a directory) button until you see the message "framework-res.apk has been changed. Update it in the archive?" then click yes. Now you can put it on your phone without force closing. If you were just editing framework-res and it was not within another .zip file then you won't get that message and that is fine.
APK Manager.
You can use extract/zip (2/3) for image-only edits, but you need to decompile/compile (9/11) to mess with xml files.
Do *not* sign system apks (like framework-res.apk). Do sign other apks.
Btw, this is in the wrong forum.
(Next step: learn about the update.zip packaging script. Remember to name it something besides update.zip afterwards, because on the Fascinate we're installing everything through Clockwork, which should be the only file actually called update.zip.)
s44 said:
APK Manager.
You can use extract/zip (2/3) for image-only edits, but you need to decompile/compile (9/11) to mess with xml files.
Do *not* sign system apks (like framework-res.apk). Do sign other apks.
Click to expand...
Click to collapse
Oooh! I didn't know this app made xml's editable. That opens up a whole new set of theming fun. I can't wait to release my new theme. It should be well received (I hope)
Btw, this is in the wrong forum.
Click to expand...
Click to collapse
I considered putting this in Themes, but this was a theme development question, so here it ended up. If the Theme and Development forums ever hook up and have a few drinks, then spawn a sub-forum, Theme Development, I assure you it would have been a much easier decision to make
Thanks everyone for helping me out. My last time playing with a phone is an old WinMo 5 device. Anroid seems limiting in it's own ways (no dedicated theme files (can't update without losing the apk theme), but much better for customizing for a 'look' of the OS.

[APP] Mms.apk Contact Box Fix for CodeROM

I patched a copy of the Mms.apk to remove the green bars behind the contact photo.
Tested with CodeROM NexusAce and CodeROMv2, should work CodeROMv1.
Note:
Skins feature is disabled.
Instructions:
1. Download the modified Mms.apk (Attached file)
2. Make a backup of your old Mms.apk in /system/app (Use Root Explorer).
3. Mount /system/app as R/W
3. Copy the modified Mms.apk to /system/app
4. Set the permissions to ---rwxr-x
5. Chane the file owner and group to 0 - root
6. Reboot
7. Hit the Thanks button if it worked
Update:
- Smaller file size.
Maybe i can help or give you an idea:
1. The Skin Option in menu is activated via the preferences.xml included in the MMS.apk file (you can copy from XXKPE, and try to install the MMS.apk, however whatever skin you select it does not change) which i think you need to do the next part.
2. The actual implementation of the skin is under the coding of classes.dex, which i dont know how to decompile.
thanks, it works
i will be waiting for the update for the skins
worked for me!
Thanks a lot!
vertcam9 said:
2. The actual implementation of the skin is under the coding of classes.dex, which i dont know how to decompile.
Click to expand...
Click to collapse
thanks for this, can't get past this one though...
I found out that there must have been a miss declaration of an image res file in the class.dex or in the Mms.apk's before compiling. Its calling progressbar_indeterminate4.png instead of quickcontact_badge_small_unpressed.9.png or quickcontact_badge_unpressed.9.png from the /system/framework/framework-res.apk file.
Updated the first post.
- Smaller file size.
- Still no support for skins [May not be updated to support this feature. Sorry]
help!!
after reboot message icon in now inside menu and gone in the launcher, however the green thing is gone.
now there are only 3 icons in launcher ( keypad, contacts, menu )
update:
thanks i got fixed it myself, btw it is working but no skins.
mikko3024 said:
Updated the first post.
- Smaller file size.
- Still no support for skins [May not be updated to support this feature. Sorry]
Click to expand...
Click to collapse
Mikko3024, how did you get by the problem? was it via the XML files?
vertcam9 said:
Mikko3024, how did you get by the problem? was it via the XML files?
Click to expand...
Click to collapse
The problem is in the classes.dex of the apk.
I copied a properly working classes.dex from another version of the Mms.apk and patched the res files to match the appearance of CodeROM's Mms.apk. But the new classes.dex either does not support the skin features or there is something in conflict.
As mentioned by vertcam9, preferences.xml activates the skin selection in the settings part of the app, but does not apply any changes whatever skin is selected. Proper classes.dex is necessary.

Battery mod links

Ok, So after copying 200 or so png's in the Drawable_xlarge_mdpi and the drawable_mdpi folder, I get my image mods after flashing.
But, they still only show the stock number of images, 9 or 10. Charging works ok.
So somewhere, there are some xml files I need to edit to reflect the filename additions?
Or am I missing something else?
A501 HC 3.2
Thanks guys and girls!
Battery_Charge.xml & Battery_Discharge.xml should be what your looking for.
Sent from my DROIDX using Xparent Red Tapatalk
DRTMI said:
Battery_Charge.xml & Battery_Discharge.xml should be what your looking for.
Sent from my DROIDX using Xparent Red Tapatalk
Click to expand...
Click to collapse
Thanks. I kind of figgured those were the xml files I was looking for. Problem is, I'm playing hell with de-compiling my framework-res to be able to edit the xml files.
Can't make much progress with the apktools available, even when including the dependancy apk's. So clearly I am a noob with decompiling framework-res
So my next question, is there any difference between a com gen 1 stat_battery_charge.xml; for the a500 and 501? If not, is it feasible to switch the modified xml to replace the current stock one?
here is how i mod those files as well as the icons and so on
i copy the system ui.apk to a folder on my desktop
i open it with winrar.. DO NOT EXTRACT IT.. pull out the folder containing the png files or xms you want to edit.. Just drag and drop them to another folder..
edit them to your hearts desire.
open the system.ui apk again in win rar.. drag the edited folder back into the system.ui.. push it to your tablet.. to say download folder..
then copy it to the original place it will ask you to replace say yes.. your tablet will CRASH .. REBOOT then if you edited the files corectly it will boot and show your changes.
i dont know if this is the correct way easiest way .. but IT DID WORK FOR ME.. USE AT YOUR OWN DESCRESSION..
I could send you the apktool I am using. Its the only one I have found that works worth honeycomb.
Sent from a phone.
NunHugger said:
I could send you the apktool I am using. Its the only one I have found that works worth honeycomb.
Sent from a phone.
Click to expand...
Click to collapse
Would be much appreciated Just send a link, and thanks!
erica_renee said:
USE AT YOUR OWN DESCRESSION..
Click to expand...
Click to collapse
Thanks Erica! That's what I've been doing Actually, wanted to do some editing to the xml files itself. It's easy for png's, at they don't get compiled.
Anytime we take the first step, and install iconiaroot, we do so at our own discretion
Here's an updated apk_manager if you prefer that method.
I normally use a CWM zip since I have to reboot anyway. You can usually start with any theme zip and just make sure their updater-script copies /system to /system and just look through the zip to see what it copies, and if it looks normal, you can make the directory structure the same but copy your own over the old ones (and delete any orginal files that you won't be overwriting). i.e. it should look like:
system/app/SystemUI.apk
system/framework/framework-res.apk
system/fonts/blah.ttf
Just drag your files into the zip in the same place and use it.
And then as a precautionary measure, just do this once or any time you mess with more files (for inexperienced modders): Make a 2nd copy of that zip and call it blah-revert.zip then copy the orginal files over those modified files. Once you have both zips on the device, if anything goes wrong you can flash the revert to get back quick.

[GUIDE] How to easily edit/modify .apk files! (Simple, Noob Friendly)

Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Just hit the thanks button, he doesn't bite your finger!
This is an easy way to edit the images only(icons,wallpaper,etc),not XML files,Smali's and such.I do this using the kitchen,easy way if you theme alot.
Diablo67 said:
This is an easy way to edit the images only(icons,wallpaper,etc),not XML files,Smali's and such.I do this using the kitchen,easy way if you theme alot.
Click to expand...
Click to collapse
You don't have to use this guide just for images. That was just the example. You can use it for almost any file inside an .apk. I was just saying that SOME folders aren't there.
Can you guide me to how do i keep same apps of diff versions.
i tried to modify a 3rd party app e.g whatsapp and when i tried installing i got an error which said "the app is not signed", may u kindly assist!
tendyfish said:
i tried to modify a 3rd party app e.g whatsapp and when i tried installing i got an error which said "the app is not signed", may u kindly assist!
Click to expand...
Click to collapse
You also have this tool
Easy Apk Dissassembler
http://forum.xda-developers.com/showthread.php?p=14049173
How do I use a flashable to get rid of .apks??? ₩
On the app I have here it returns 20 results that it scrapes from a website. I only want it to return 3 or 4. How do I get in there and change that value?
I want to change values on touchwiz launcher on my note 3, to use it in 440 dpi. When I use it there is so much margin on all sides, and I need to reduce. I need to add a new icon row as well. Can I do that just by modifying the app?
Sent from my GT-I9505 using Tapatalk
are the .xml files encrypted or something? when i try to edit them, it is a bunch of strange characters
Hi,
I would like to modify the tinychat.apk so that i can find how to change my device info/platform from android to something else, like pc or whatever. I dont want to be identified as using an android device. Is this possible?
Regards.
ksaul said:
are the .xml files encrypted or something? when i try to edit them, it is a bunch of strange characters
Click to expand...
Click to collapse
Yes, depending on what tool you use to decompile the apk files it may or may not decrypt them. I use apktool and it decrypts them just fine.
I think this method is no longer working for 4.3+
Modify JAR files
littlejoelgriffo said:
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Click to expand...
Click to collapse
That's very helpful thank you for sharing. Is there a way to modify JAR files the same way?
gilbertgk said:
That's very helpful thank you for sharing. Is there a way to modify JAR files the same way?
Click to expand...
Click to collapse
rename the jar to apk..after done,rename it back to jar
zamzameir said:
rename the jar to apk..after done,rename it back to jar
Click to expand...
Click to collapse
Can this work on my note 3 4.3 not rooted?
gilbertgk said:
Can this work on my note 3 4.3 not rooted?
Click to expand...
Click to collapse
idk..but you can try n report back
littlejoelgriffo said:
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!
Step 1 - Getting the .apk
Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:
a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my case system -> app -> settings.apk) and drag the .apk file onto your desktop.
b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.
Step 2 - Editing/Modifying your .apk
Now is the important part. Install Winrar by clicking the link. http://www.win-rar.com/download.html?&L=0 Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.
NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.
Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!
Step 3 - Putting the new .apk back where it belongs
Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:
a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!
b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!
NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).
Click to expand...
Click to collapse
Thnax for great guide but,my gopro app has a update and I have changed the icon on it but the app store dosent show me the update button. How to fix so I can update?
What do I need to change in an app to substitute it for another app?
OK so I've installed a new ROM and it comes with a kernel setting app preinstalled. This app has been integrated into the system settings portion of the ROM. I want to replace this kernel settings app with one of my choice but I want to be able to integrate it into the system settings like the original app is. I tried disguising the new app by changing the name of the app and .apk files but that didn't work. Closest I got was being able to convert my app to system app but even though I changed the name, the app, when installed goes back to it's original name. Or what permissions or files do I need to change to allow the integration of my app into the settings interface. Thanks ahead of time, it's appreciated.

[Guide] How to enable multi-user?

hello friends, I have a nice question for you!
I state that this is google translation so it will be the best.
anyway back to us ....
you own a nice tablet?
and maybe you are engaged or married and you have photos of your woman on the device in question, and maybe you do not want others to see,
or simply your friends are never their own business, and then maybe you want to make private your tablet, maybe with a secondary account, but do not know how to do it because the tablet does not support multi-user ...
well do not give up, this guide will do for you ...
I do not take any responsibility for what might happen to your device
these are the requirements:
-root
-this app : https://www.dropbox.com/s/wmc4vg8n1lyv1o1/4_2_multiple_user_enabler_root_1.2.apk
-a file manager with root permissions as root browser or other
-user app share (which allows you to decide the content to display to other accounts) is on play store or in this link https://www.dropbox.com/s/nh3vaqetj9fogzs/MultiUserAppShare.apk
well, now first download the app before "4.2 multi user enabler"
copy it to the sd of your dear and beloved tablet.
after this app copied to the folder system of your tablet, change permissions (I usually do I enable them all)
after that install the app . from the app enable the multi-user, reboot your tablet and you're done!
multi user share app you need to decide what to use the other account
Now you might ask: why not just install the app?
Try it! it will seem to work but when you restart the account will vanish,
Intead with this guide it will be ever
if you have been useful on press thanks
By friends!
Simix93 said:
hello friends, I have a nice question for you!
I state that this is google translation so it will be the best.
anyway back to us ....
you own a nice tablet?
and maybe you are engaged or married and you have photos of your woman on the device in question, and maybe you do not want others to see,
or simply your friends are never their own business, and then maybe you want to make private your tablet, maybe with a secondary account, but do not know how to do it because the tablet does not support multi-user ...
well do not give up, this guide will do for you ...
I do not take any responsibility for what might happen to your device
these are the requirements:
-root
-this app : https://www.dropbox.com/s/wmc4vg8n1lyv1o1/4_2_multiple_user_enabler_root_1.2.apk
-a file manager with root permissions as root browser or other
-user app share (which allows you to decide the content to display to other accounts) is on play store or in this link https://www.dropbox.com/s/nh3vaqetj9fogzs/MultiUserAppShare.apk
well, now first download the app before "4.2 multi user enabler"
copy it to the sd of your dear and beloved tablet.
after this app copied to the folder system of your tablet, change permissions (I usually do I enable them all)
after that install the app . from the app enable the multi-user, reboot your tablet and you're done!
multi user share app you need to decide what to use the other account
Now you might ask: why not just install the app?
Try it! it will seem to work but when you restart the account will vanish,
Intead with this guide it will be ever
if you have been useful on press thanks
By friends!
Click to expand...
Click to collapse
The easiest way to enable multiuser support especially for our Galaxy Tab 3.0 is to edit the framework-res.apk with apktool and change the max user in there. The best thing with this way, your account will not vanish when you restart the device.. :laugh::laugh:
faruqmunshif said:
The easiest way to enable multiuser support especially for our Galaxy Tab 3.0 is to edit the framework-res.apk with apktool and change the max user in there. The best thing with this way, your account will not vanish when you restart the device.. :laugh::laugh:
Click to expand...
Click to collapse
ah I did not know .. you tell me how to do? maybe put to me now if there is. Anyway .. this is useful for anyone who is not practical to make changes to the framework
@Simix93
Here is the alternative, modifying framework-res.apk.
What I've done on my Galaxy Tab 3 10.1 (GT-P5210) :
- Modifying framework-res\res\values\integers.xml (locate the entry, and put X, where X <= 8 instead of 1, X = the number of allowed max users) :
Code:
<integer name="config_multiuserMaximumUsers">8</integer>
- Modifying framework-res\res\layout-port\keyguard_host_view.xml (to show user selector on lockscreen) :
>> Adding this after the second </FrameLayout>
Code:
<FrameLayout androidprv:paddingTop="@dimen/status_bar_height" androidprv:layout_width="fill_parent" androidprv:layout_height="wrap_content">
<include androidprv:layout_gravity="top|center" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_multi_user_selector" />
</FrameLayout>
- Adding framework-res\res\layout-port\keyguard_multi_user_selector.xml file
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/keyguard_user_selector" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:contentDescription="@string/keyguard_accessibility_user_selector" android:layout_childType="userSwitcher"
xmlns:androidprv="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.internal.policy.impl.keyguard.KeyguardLinearLayout android:layout_gravity="bottom|center" android:orientation="horizontal" android:id="@id/keyguard_users_grid" android:layout_width="wrap_content" android:layout_height="@dimen/keyguard_avatar_size" android:layout_marginBottom="400.0dip" />
</com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView>
- After that, copied from the original framework-res.apk AndroidManifest.xml file and META-INF directory to your newly compiled one (using a zip file utility) so I can bypass the sign process (like you should do with auto sign tool - signapk.jar)
And voilà, after putting back my modified framework-res.apk to the device and rebooting, i'm able to add new users in settings
Regards
i have tried to modify my framework-res.apk, but it's not succesful.
I installed framework-res with this command:
java -jar apktool.jar if Framework-Res.apk
This installed a file named 1.apk in my users-directory.
After that i extract the framework-res.apk with this command:
java -jar apktool.jar d Framework-Res.apk
Everythings seems to be fine, a directory with the name Framework-Res is created.
I modified the 3 files "integers.xml", "keyguard_host_view.xml" and "keyguard_multi_user_selector.xml" as described.
Now i pack it together with this command:
java -jar apktool.jar b Framework-Res
Get 2 errors with PNG-Files "File is case-insensitive" and correct the filenames (uppercase .PNG to lowercase .png).
After that i found in the folder "dist" the framework-res.apk.
The filesize is less about 12mb then before, it's now round about 36mb.
I put this file in my /system/framework folder and reboot. But the system is still displaying the Samsung-Logo.
Replaceing the file with the original file and everything is ok.
What do i wrong?
with best regards,
Detlef
ok, now it works.
i have forgot to add the sign-process to the new .apk file.
now my tab 3 8.0 have the multi-user function, thank you!
Spatz said:
i have tried to modify my framework-res.apk, but it's not succesful.
I installed framework-res with this command:
java -jar apktool.jar if Framework-Res.apk
This installed a file named 1.apk in my users-directory.
After that i extract the framework-res.apk with this command:
java -jar apktool.jar d Framework-Res.apk
Everythings seems to be fine, a directory with the name Framework-Res is created.
I modified the 3 files "integers.xml", "keyguard_host_view.xml" and "keyguard_multi_user_selector.xml" as described.
Now i pack it together with this command:
java -jar apktool.jar b Framework-Res
Get 2 errors with PNG-Files "File is case-insensitive" and correct the filenames (uppercase .PNG to lowercase .png).
After that i found in the folder "dist" the framework-res.apk.
The filesize is less about 12mb then before, it's now round about 36mb.
I put this file in my /system/framework folder and reboot. But the system is still displaying the Samsung-Logo.
Replaceing the file with the original file and everything is ok.
What do i wrong?
with best regards,
Detlef
Click to expand...
Click to collapse
Before recompile your framework-res.apk, you should find the png files with uppercase (.PNG) from your decompiled framework-res.apk/res/ and rename them to lowercase (.png).
when finished, flash it using CWM or other recovery.
Does anyone have working framework-res.apk for T310 ? I've updated mine, but I do not see anything new. When I flash zip fro T311 from a different thread, I have this options, but some labels in the system are missing and messed up.
slobodan.bogdanovic said:
Does anyone have working framework-res.apk for T310 ? I've updated mine, but I do not see anything new. When I flash zip fro T311 from a different thread, I have this options, but some labels in the system are missing and messed up.
Click to expand...
Click to collapse
Just follow the guide in this thread to make your framework-res.apk working with multiuser. or if you have no time, just give me your framework-res.apk and i will try to decompile it for you,
Spatz said:
ok, now it works.
i have forgot to add the sign-process to the new .apk file.
now my tab 3 8.0 have the multi-user function, thank you!
Click to expand...
Click to collapse
You can also copy from your original framework-res.apk AndroidManifest.xml file and META-INF directory to your newly compiled one so you can bypass the sign process
I have an issue when having multiple users enabled.
When I am logged in as the owner (first user) I am able to connect device via usb and transfer files.
When I am logged in as the second user, and when I try to connect device vis usb, it is not recognized. MTP Driver installation fails in this case.
Anyone has the same issue?
Simix93 said:
hello friends, I have a nice question for you!
I state that this is google translation so it will be the best.
anyway back to us ....
you own a nice tablet?
and maybe you are engaged or married and you have photos of your woman on the device in question, and maybe you do not want others to see,
or simply your friends are never their own business, and then maybe you want to make private your tablet, maybe with a secondary account, but do not know how to do it because the tablet does not support multi-user ...
well do not give up, this guide will do for you ...
I do not take any responsibility for what might happen to your device
these are the requirements:
-root
-this app : https://www.dropbox.com/s/wmc4vg8n1lyv1o1/4_2_multiple_user_enabler_root_1.2.apk
-a file manager with root permissions as root browser or other
-user app share (which allows you to decide the content to display to other accounts) is on play store or in this link https://www.dropbox.com/s/nh3vaqetj9fogzs/MultiUserAppShare.apk
well, now first download the app before "4.2 multi user enabler"
copy it to the sd of your dear and beloved tablet.
after this app copied to the folder system of your tablet, change permissions (I usually do I enable them all)
after that install the app . from the app enable the multi-user, reboot your tablet and you're done!
multi user share app you need to decide what to use the other account
Now you might ask: why not just install the app?
Try it! it will seem to work but when you restart the account will vanish,
Intead with this guide it will be ever
if you have been useful on press thanks
By friends!
Click to expand...
Click to collapse
Working on Tab3 7" ?
Leehtaeyeon said:
Working on Tab3 7" ?
Click to expand...
Click to collapse
I do not know, I have not tried it, so you head to the end you just have to move an app
Leehtaeyeon said:
Working on Tab3 7" ?[/QUOT
Multiuser only supported by Android 4.2.2 or higher. As i know, the android version in Tab 3 7" is 4.1.2. If you want to use multiuser, wait until tab 3 7" recieved update for 4.2.2..
Click to expand...
Click to collapse
faruqmunshif said:
Leehtaeyeon said:
Working on Tab3 7" ?
Click to expand...
Click to collapse
Multiuser only supported by Android 4.2.2 or higher. As i know, the android version in Tab 3 7" is 4.1.2. If you want to use multiuser, wait until tab 3 7" recieved update for 4.2.2..
Click to expand...
Click to collapse
Don' work =/
I do not believe he will get more 4.2.2.
I think like other devices, it will jump to 4.4
Spatz said:
ok, now it works.
i have forgot to add the sign-process to the new .apk file.
now my tab 3 8.0 have the multi-user function, thank you!
Click to expand...
Click to collapse
Spatz-is there any chance you could post detailed instructions? Or can you post your framework res.apk file?
Sent from my SM-T310 using xda app-developers app
@chaz
I used your procedure to modify the framework-res.apk file and it doesn't work on my Galaxy Tab 3 10.1 (GT-P5210). It keeps boot-looping. I managed to put back the original framework-res.apk and it's working, so I didn't killed it completely!
I do it this way:
1. Use apktool to decompile the apk file (apktool.jar).
2. Modify the xml files with Notepad++.
3. Use apktool to recompile the apk file.
4. Sign the file with autosign tool found on XDA (signapk.jar).
5. Put the framework-res.apk file back using ADB in recovery mode and set the right permissions on the file.
What tools have you used? Did you do it differently than me?
Thank you.
i am curious about this, but i'd like to know how multi user works. How do I "log" in to the tab and use my gmail, etc? And then how would my wife log in and user her email and etc? Are there profiles or something similar?
thanks
EDIT
never mind
http://www.dummies.com/how-to/content/how-to-add-another-user-to-your-android-tablet.html
Hi. I see this method does not work very well. I recommend the app SwitchMe. It's much easier and just requires root permission which everyone should have. I can't post links because I'm a newbie, so just search for it on the Play Store. :good:
alfreddallaire said:
@chaz
I used your procedure to modify the framework-res.apk file and it doesn't work on my Galaxy Tab 3 10.1 (GT-P5210). It keeps boot-looping. I managed to put back the original framework-res.apk and it's working, so I didn't killed it completely!
I do it this way:
1. Use apktool to decompile the apk file (apktool.jar).
2. Modify the xml files with Notepad++.
3. Use apktool to recompile the apk file.
4. Sign the file with autosign tool found on XDA (signapk.jar).
5. Put the framework-res.apk file back using ADB in recovery mode and set the right permissions on the file.
What tools have you used? Did you do it differently than me?
Thank you.
Click to expand...
Click to collapse
As I mentionned some posts before, I did not use the signapk.jar but instead copied signed informations from my original framework-res.apk to the new one.
See my post http://forum.xda-developers.com/showpost.php?p=48429541&postcount=10 there.
I updated my tuto post to include this in the process (http://forum.xda-developers.com/showpost.php?p=48315919&postcount=4)
Regards,
Chaz

Categories

Resources