[SOLUTION] External_SD Writable Fix on Kitkat 4.4 - Motorola Atrix HD

Hello guys after searching and searching for all the Ported CM and AOSP 4.4 roms looking for a fix to external sd cards to be able to write I came to the frustrating conclusion that there is nothing yet posted to address this.
So I went into the files system to look into it to try to find anything suspicious that is bugging out the ext_sd.
I found that the platform.xml have some external sd writable properties I see that is missing a line so apps can write to the external_sd
Here is the fix;
Get or Download Root Explorer app or any File Manager with ROOT access from the PlayStore to be able to access the system files.
Locate the platform.xml file in the system/etc/permissions folder.
Create a backup of the original file before you go any further in case you need to revert back.
Either open this file up on your phone or copy it to your PC for editing with Notepad++.
At the file open, scroll down until you find a row beginning name=”android.permission.WRITE_EXTERNAL_STORAGE” >, I believe is on line 71 in the file.
On a new line under lines” and “, you need to add , and save the file.
Just make sure you keep the line right below the other ones like shown in the picture below for organize purposes.
It should loom like this
Code:
<permission name="android.permission.READ_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
</permission>
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="media_rw" />
</permission>
<permission name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE" >
<group gid="sdcard_r" />
<group gid="sdcard_rw" />
<group gid="sdcard_all" />
</permission>
<permission name="android.permission.WRITE_MEDIA_STORAGE" >
<group gid="media_rw" />
</permission>
Done, save the changes, or copy the file back from your PC, and overwrite the original version.
Set permissions
Reboot your phone and the fix will be applied.
This Method should work on any device except for the already edited file attached.
If this have help in any way please a Thank and a credit will be great

SVLAN said:
Hello guys after searching and searching for all the Ported CM and AOSP 4.4 roms looking for a fix to external sd cards to be able to write I came to the frustrating conclusion that there is nothing yet posted to address this.
So I went into the files system to look into it to try to find anything suspicious that is bugging out the ext_sd.
I found that the platform.xml have some external sd writable properties I see that is missing a line so apps can write to the external_sd
Here is the fix;
Get or Download Root Explorer app or any File Manager with ROOT access from the PlayStore to be able to access the system files.
Locate the platform.xml file in the system/etc/permissions folder.
Create a backup of the original file before you go any further in case you need to revert back.
Either open this file up on your phone or copy it to your PC for editing with Notepad++.
At the file open, scroll down until you find a row beginning name=”android.permission.WRITE_EXTERNAL_STORAGE” >, I believe is on line 71 in the file.
On a new line under lines”<group gid="sdcard_r" /> and <group gid=”sdcard_rw” />“, you need to add <group gid=”media_rw” />, and save the file.
Just make sure you keep the line right below the other ones like shown in the picture below for organize purposes.
{
"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"
}
Done, save the changes, or copy the file back from your PC, and overwrite the original version.
Reboot your phone and the fix will be applied.
This Method should work on any device except for the already edited file attached.
Now looking at the system files to try increase network signal to stock signal strength and LTE
If this have help in any way please a Thank and a credit will be great
Click to expand...
Click to collapse
Thanks for finding this! We need to remember to add this to source....

Don't quote the whole op man really?
But good job man definitely gonna try it.
Sent from my PACMAN MATRIX HD MAXX

Thanks, good find. Submitted this as a pull request to the dev team, giving you credits in the commit message. Also starting a new kk build with that included and whatever AOSP updates have happened.....I haven't bothered checking, but I noticed a few updates during the repo sync.

Thanks skeevy, i dont have a github so I couldnt. I was actually waiting for you to tell you.lol
Sent from my MB886 using XDA Premium 4 mobile app

SVLAN said:
Thanks skeevy, i dont have a github so I couldnt. I was actually waiting for you to tell you.lol
Sent from my MB886 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
All I need is to just see a post like that and it's done. Should have a new 4.4 AOSP up in two hours if it fully builds....should, it's never failed yet.

This worked for me, thx a ton!
Sent from my XT907 using Tapatalk

i tried this and it messed up my phone. had to reflash the rom.

jjosph said:
i tried this and it messed up my phone. had to reflash the rom.
Click to expand...
Click to collapse
Use root explorer or similar app, rename the original xml file with extension (.bak) and copy/paste the attached (OP) xml file and set permission correctly (644). Worked fine for me.

thanks it works now.

this confirmed working on Galaxy s4 GE 4.4. thanks OP

Glad it worked for you guys

Galaxy S4 running hyperdrive 10.2 this worked for me, I added the "ACCESS_ALL_EXTERNAL_STORAGE" section, I already had the other lines...

thanks man.. hope this change is taken care of in future builds of 4.4 :cyclops:

dlt

This mod is for mostly be able to write on your external card and not for using it to install apps on external SD.

True but all well designed apps allow storing the document files on the external card. Sadly many do not.
Sent from my MB886 / Maxx /CM11 using Tapatalk.

I stupidly forgot to make a backup before overwritting and now neither the internal nor the external card files can be seen!
Could someone post the ORIGINAL platform.xml file here please? thnx

What device do you have and what rom?

i9505 as in my signature

Related

[TUTORIAL] Selectable Browser User Agent

BACKGROUND
If you use an Android tablet to surf the web, you often face the issue that if you visit a web site that has a mobile version, the server checks your User Agent and says "Android, eh? You're a phone!" - and bumps you to mobile.nfl.com instead of www.nfl.com, which sucks because phone optimized web sites tend to look bad on a 10.1" 1280x800. For example, you want this not this.
So, you can handle that quite easily, you ask the browser to present itself as something else.
CAUSE
Default, my tablet presents itself as...
Mozilla/5.0 (Linux; U; Android 3.1; en-gb; GT-P7500 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13
...and that's when all the web sites say "Android, aha! You're a phone!"
But I can instruct the tablet browser to present itself as anything else, for example...
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.215 Safari/535.1
...which is handy because it makes all the web sites say "Aha! You're a Chrome browser running on MacOS X 10.7 Lion!", therefore showing me the proper web sites.
ONE SOLUTION
You can do this by decompiling /system/framework/framework-res.apk
Open /res/values/strings.xml, search for the string "web_user_agent" and you'll see this:
<string name="web_user_agent" formatted="false">Mozilla/5.0 (Linux; U; Android %s) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 %sSafari/534.13</string>
You can change this blue string into whatever you want.
However, if you do this you're stuck without a proper "android" user agent.
That could be a pain in the ass if you've got an app that relies on a hidden browser window to complete a sign-in authentication, checking the user agent in the process...*cough*NFLGamePassForAndroidTablet*cough*
ANOTHER, MORE ELEGANT, SOLUTION
The more elegant version, however is decompiling /system/app/Browser.apk
Open the file /res/xml/advanced_preferences.xml if you want the menu item in Advanced settings
or open the file /res/xml/general_preferences.xml if you want the menu item in General settings
Insert this…
<ListPreference android:entries="@array/pref_development_ua_choices" android:title="@string/pref_development_uastring" android:key="user_agent" android:defaultValue="0" android:entryValues="@array/pref_development_ua_values" />
... somewhere, between/above/below some other node. I've put it over the ...
<com.android.browser.search.SearchEnginePreference …
... node, giving me this new menu item in Advanced...
... opening this menu ...
Compile it back and there you go.
This fix is basically just shortcutting around the about:debug route by moving the option out of the hidden debug menu, but it's quite convenient to have the option easily accessible without entering debug mode, and you're not stuck without an "Android" user agent.
HOW TO DO THIS, STEP BY STEP.
(mirrored from post #25)
Teaching has never been my strong feat but I'll give it a shot.
Please note:
The "Setup to build" part is for Windows, recreated from memory, and may be inaccurate. I love you guys but I'm not gonna wipe my system and start over just to retrace my steps
For the entire guide, I'm pre-supposing basic computer skills, a rudimentary understanding of ADB, folder structures, file management, text editing and "what do you mean command line??!"
== Set up to build:
If you don't have Java installed, download and install Java from java.com
Download APK Manager 5 and remember to thank the guy.
Place it in a folder in C:\ so you have a directory stucture like this:
C:\apkmanager5
C:\apkmanager5\other
C:\apkmanager5\place-apk-here-for-modding
...etc
C:\apkmanager5 is the home dir for our purposes, so from now on assume we're in C:\apkmanager5 unless I say otherwise.
Run Script.bat
Select 24 "Exit"
(this should create any dirs and logfiles that may be missing)
== Get the required files and prepare for editing
Pull the following .APKs from your phone via ADB or extract them from your ROM.zip to /place-apk-here-for-modding in our homedir. You should make a backup of at least Browser.apk, just in case.
/system/app/Browser.apk
/system/framework/framework-res.apk
/system/framework/twframework-res.apk
Run the following commands from a command prompt in our home dir:
java -jar other/apktool.jar if place-apk-here-for-modding/framework-res.apk
java -jar other/apktool.jar if place-apk-here-for-modding/twframework-res.apk
The command line will return:
I: Framework installed to: C:\Users\((username))\apktool\framework\1.apk
I: Framework installed to: C:\Users\((username))\apktool\framework\2.apk
== Decompile and edit
Run Script.bat
(this will open the apkmanager window)
Enter 19 "Select compression level for apk's"
Enter 0 (compression=0)
Enter 22 "Set current project"
{
"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"
}
Select the number for "Browser.apk"
Select 9 "Decompile apk"
It'll say "Decompiling apk" and hang for a while.
Open a file explorer/total commander/whatever on your computer, and go to /projects in our home dir. You'll see that we now have the decompiled Browser.apk in there.
Go to /projects/Browser.apk/res/xml/ and open general_preferences.xml with a text editor. Notepad, Notepad++, Ultraedit or something, not Word
Add the purple code, so the content looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
[COLOR="Indigo"][I][B]<ListPreference android:entries="@array/pref_development_ua_choices" android:title="@string/pref_development_uastring" android:key="user_agent" android:defaultValue="0" android:entryValues="@array/pref_development_ua_values" />[/B][/I][/COLOR]
<com.android.browser.BrowserHomepagePreference android:hint="@string/http" android:maxLength="8192" android:title="@string/pref_content_homepage" android:key="homepage" android:inputType="textMultiLine|textUri" />
<PreferenceCategory android:title="@string/pref_general_sync_title">
<Preference android:title="@string/pref_personal_sync_with_chrome" android:key="sync_with_chrome" android:summary="@string/pref_personal_sync_with_chrome_summary" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_general_autofill_title">
<CheckBoxPreference android:title="@string/pref_autofill_enabled" android:key="autofill_enabled" android:summary="@string/pref_autofill_enabled_summary" android:defaultValue="true" />
<PreferenceScreen android:title="@string/pref_autofill_profile_editor" android:key="autofill_profile" android:summary="@string/pref_autofill_profile_editor_summary" android:fragment="com.android.browser.AutoFillSettingsFragment" />
</PreferenceCategory>
</PreferenceScreen>
The purple code shows the UAstring item in General Preferences just above the "Set homepage" item.
== Compile
Go back to the apkmanager window.
Select 11 "Compile apk"
It'll output "Building Apk" and think about it for a while.
Apkmanager will ask, "Is this a system Apk?"
"y" - yes it is.
Then it will ask, "Aside from the signatures, would you like to copy over any additional files that you didn't modify from the original apk in order to ensure least # of errors?"
"y" - yes, you want to do that.
apkmanager will extract those original files and then present you with this screen:
Read that, then I'll explain it
Right. At this point apkmanager has made a copy of the original, compiled Browser.apk files in C:\apkmanager5\keep
As the name "keep" suggests, whatever is in here will be kept and carried on to your new build, so:
For every file that you have changed in /projects/Browser.apk/, you need to delete the counterpart in /keep/.
That way, apkmanager knows to keep your unchanged files unchanged but grab your changed file(s) from /projects/Browser.apk. It may seem like dumb way of doing it but it makes sense that you don't want your computer to compile more than it has to. Compiling takes time and CPU, and...well...the less is done, the less can go wrong.
In this case you edited /projects/Browser.apk/res/xml/general_preferences.xml
So you have to delete /keep/res/xml/general_preferences.xml
AND you have to delete /keep/resources.arsc as well!
Whenever you have changed any XML in an .apk, you also have to delete /keep/resources.arsc when compiling. The apk's resource table is compiled into resources.arsc, so if you dont delete it from keep/, you're gonna keep that and carry it over into your new, modified Browser.apk, and your changes won't come through
Ok, after deleting those two files, you "Press any key to continue ...", all the resources are compressed, and now you have a modified Browser.apk in place-apk-here-for-modding/
Wrap it in a flashable zip and flash it.
("How" is outside the scope of this guide)
As it turns out, this is actually a rather general guide on decompiling, editing and recompiling stuff for honeycomb. You can use the exact same method to edit other apks like, framework-res.apk and SystemUI.apk.
Flashble zip?
Credits to the original devs who found these? (DocRambone,alterbridge86) Otherwise nice guide.
PhantomHacker said:
Credits to the original devs who found these? (DocRambone,alterbridge86) Otherwise nice guide.
Click to expand...
Click to collapse
lol, i love how you give the credits. Phantom.... you are a posterchild!
task650 said:
lol, i love how you give the credits. Phantom.... you are a posterchild!
Click to expand...
Click to collapse
I try.
Sent from my GT-P7510 using Tapatalk
Can someone tell me how to decompile in win7?
Preferably the very easiest way with the easiest tool.
Thanks.
Sent from my GT-P7500 using Tapatalk
PhantomHacker said:
Credits to the original devs who found these? (DocRambone,alterbridge86) Otherwise nice guide.
Click to expand...
Click to collapse
Thanks.
As for credits, I assure you I've figured this out all by myself, so how about I give myself a pat on the back then?
I know that DocRambone has a thread where he supplies flashable zips of the the fix in framework-res.apk/res/values/strings.xml but as far as I can see, he doesn't share how. I asked him in PM but he didn't answer, and all he writes in his thread seems to be "You have to decompile the apk and change some of the xml's and then recompile it again.".
So I had to figure it out myself, and it wasn't exactly hard. So far so good.
The selectable browser version is a fairly straightforward solution, since I'm simply moving an existing setting out in the open from a hidden debug menu, but I cannot for the life of me see any other published info about it.
So again, I haven't published anything I haven't figured out myself, and as I've been unfortunate enough to see my own original creation in someone else's 2 dollar Market app, I'm slightly sensitive to the issue of copying.
If you were trolling, consider me trolled.
Hooolm said:
doesn't share how
Click to expand...
Click to collapse
ot: Its a bit like that these days... It seems a lot harder to gather needed information than it was in WM6.X times.
pkoper said:
ot: Its a bit like that these days... It seems a lot harder to gather needed information than it was in WM6.X times.
Click to expand...
Click to collapse
Yeah, it's just... I've never stolen anything, and I get really pissed spending a couple of hours figuring out something cool, and sharing it with the community then being told "pretty pictures - now credit those who told you how"
Edit..
All good, but I need to learn to do more search before asking, iam sorry
And here is a little offtopic question. Why does it look like this in rootexplorer when iam about to edit the xml file
Sent from my GT-P7510 using xda premium
Hooolm said:
Yeah, it's just... I've never stolen anything, and I get really pissed spending a couple of hours figuring out something cool, and sharing it with the community then being told "pretty pictures - now credit those who told you how"
Click to expand...
Click to collapse
I didn't see an issue with your original post. It would have been different if you had posted Doc's zips as your own creation, but you didn't. Yours was simply a tutorial to teach and explain how such a thing could be done. It's the difference between you showing me a Ferrari Italia and telling me you built it, versus simply telling me HOW they built it.
In any case, you mention Doc never answered your requests. Does anybody know what the heck happened to him? I stopped following his threads when he went MIA.
bd85 said:
Edit..
All good, but I need to learn to do more search before asking, iam sorry
And here is a little offtopic question. Why does it look like this in rootexplorer when iam about to edit the xml file
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
Prob cuz root explorer isnt an xml viewer/editor?
DT3CH said:
Prob cuz root explorer isnt an xml viewer/editor?
Click to expand...
Click to collapse
In can open the andrpidmanifest.Xml that is in browser apk just fine, but when I go to the xml res folder and open the xml there it looks like my earlier Screenshots.
This works but not the xml i want to edit, strange
Sent from my GT-P7510 using xda premium
bd85 said:
In can open the andrpidmanifest.Xml that is in browser apk just fine, but when I go to the xml res folder and open the xml there it looks like my earlier Screenshots.
This works but not the xml i want to edit, strange
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
The resource table is compiled into resources.arsc
You have to decompile the entire .apk to edit the xml and compile again afterwards.
Use something like apkmanager, it's real easy to set up. There's a thread for it in the 10.1 dev forum ;-)
i hope phantomhacker can include this in the 3.2 rom don't really want to try this out myself in case i screw this up
Hooolm said:
The resource table is compiled into resources.arsc
You have to decompile the entire .apk to edit the xml and compile again afterwards.
Use something like apkmanager, it's real easy to set up. There's a thread for it in the 10.1 dev forum ;-)
Click to expand...
Click to collapse
Have you actually done this, does it work? I'm interested, and tried with apkmanager, but the recompiled browser wont work. I think its a problem with my install of apkmanager, but I'm not sure.
blulite said:
Have you actually done this, does it work? I'm interested, and tried with apkmanager, but the recompiled browser wont work. I think its a problem with my install of apkmanager, but I'm not sure.
Click to expand...
Click to collapse
Yeah, I've done it several times. For task650 v6.1, stock XWKH7 and XXKI1.
I decompile it with framework-res.apk and twframework-res.apk installed and compile it back as a system app.
Edit:
I've used this ApkManager 4.9 HC edition without problems
bd85 said:
In can open the andrpidmanifest.Xml that is in browser apk just fine, but when I go to the xml res folder and open the xml there it looks like my earlier Screenshots.
This works but not the xml i want to edit, strange
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
Ahh, weird indeed
decompile works great on my mac, but compile does not work.
Please make your decision: 10
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
i've also tried this:
http://forum.xda-developers.com/showpost.php?p=7064736&postcount=447
didnt work
My Mac isn't set up to build, I can't help you there.
I'm building on a Windows Server remotely.
How about asking in the apkmanager thread? I'm sure they know more about it

[MOD][CM10.1][4.2.2][GUIDE] Enable Multiuser (for noobs)

This is the noob-proof multiuser enabler guide for the CM10.1 - GS3 only!!
Want to enable multiuser on your galaxy S3 under CM10.1?? This is the easiest way to do it.
Updates - based on cm-10.1-2013XXXX-NIGHTLY-i9300.zip:
Multi_20130306
Multi_20130303
Multi_20130302
Multi_20130222
This is very simple: just flash the zip file and you're done!! just need to create the users under settings!! Can create up to 8 users!!
P.S. You need to reflash it for every new nightly installed!!!!
IMPORTANT INFORMATION!!!
I just found out a way to reduce FC in secondary user. Create 2 other users... delete the second, reboot and the third user should now be the second but without the FCs... well it should, it worked for me...
Screenshots:
{
"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"
}
Next is the tool I used to create the flashable mod zip. In case you wanna try for yourself or need to remake the mod for futures nightlies just download and follow the steps:
Links:
. JDK and JRE for windows 32bits - (are you under windows x64? Install the 32bits javas anyway)
. FrameworkFlasher Adapted from the wesf90 Original Thread and Updated from iBotPeaches Original Thread to run on CM10.1
1) Install JDK and JRE and Unzip FrameworkFlasher
2) copy your phone's framework-res.apk to the folder "place-framework-res-here"
3) run "RunMe.bat"
4) press 1 to decompile
5) Make the necessary changes under the folder "files-to-edit" ****
6) run 2 to recompile
7) run 3 and 4 to sign and zip the apk
8) Just flash your new zip and be happy!
**** In order to enable multiuser, it's necessery to change some xml file inside framework-res.apk and this is only possible by doing this decompile/compile process...
The files you need to change are:
. framework-res.apk\res\values\integers.xml
look for config_multiuserMaximumUsers and change the number of users (min 2)
Code:
<integer name="config_multiuserMaximumUsers">8</integer>
. framework-res.apk\res\layout-port\keyguard_host_view.xml
need to add this after the second </FrameLayout>
Code:
<FrameLayout androidprv:paddingTop="7.0dip" 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>
I made more changes than this so I advice to use mine own keyguard_host_view.xml
Thanks for the great work.... it worked perfectly. However, I have a feedback:
Few findings
- Unable to find option "Enable USB Debugging
- Unable to add facebook contact sync for secondary user
- Facebook sync not working
santoshtalluri
Unfortunetly multiuser feature still very limited and buggy... not my fault, it's Android/Cm10.1 fault... you also cant make/receive calls and themes cause fc in a secundary user...
santoshtalluri said:
Thanks for the great work.... it worked perfectly. However, I have a feedback:
Few findings
- Unable to find option "Enable USB Debugging
- Unable to add facebook contact sync for secondary user
- Facebook sync not working
Click to expand...
Click to collapse
Try tapping on the "Build Number" in settings 7-8 times to enable Developer Options.
Developer options only in primary user
help with decompile
I get the following failure when trying to decomile my apk. I am on the Sprint GS3 and d2spr CM10.1 2013-01-31 nightly. Any help would be appreciated. Also, I am making the leap that the same technique here works for any SG3 framework-res.apk and not just for the i9300. If that is an invalide assumption, then please set me straight. Thanks in advance...
---------------------------------------------------------------------
| Log - Sat 02/02/2013 -- 17:34:26.62 | Documents\Desktop\FrameworkFlasher-1.1.4\LogSimple.txt
---------------------------------------------------------------------
THE LOG BELOW IS FOR YOUR MOST RECENT PROCESS ONLY.
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x01080293 drawable/ic_ab_back_holo_dark, config=-xhdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
@ swiggs98
Yes... probably works for your phone too....
The compile/decompile process can cause several erros when one or more conditions are not satisfied, so make sure:
1. Latest Java JDK/JRE 32 bits are installed
2. FrameworkFlasher is updated (the one I posted is updated, so use mine)
3. The folder name where FrameworkFlasher is running should not have spaces
4. framework-res.apk is not corrupted (I use WIFI file explorer to download framework-res.apk to my PC)
5. Wrong changes in framework-res files also ruins the process
Re: [MOD][CM10.1][4.2.1][GUIDE] Enable Multiuser (for noobs)
rfmalta said:
@ swiggs98
Yes... probably works for your phone too....
The compile/decompile process can cause several erros when one or more conditions are not satisfied, so make sure:
1. Latest Java JDK/JRE 32 bits are installed
2. FrameworkFlasher is updated (the one I posted is updated, so use mine)
3. The folder name where FrameworkFlasher is running should not have spaces
4. framework-res.apk is not corrupted (I use WIFI file explorer to download framework-res.apk to my PC)
5. Wrong changes in framework-res files also ruins the process
Click to expand...
Click to collapse
Thx. It was the version I had. Same version number but from the original forum.
bootlooping when after flashing the zip!
@ varund7726
according to your signature you're running AOKP ROM with a custom kernel Syiah... my mod is made for official CM10.1 ROM only...
rfmalta said:
This is the noob-proof multiuser enabler guide for the CM10.1 - GS3 only!!
Want to enable multiuser on your galaxy S3 under CM10.1?? This is the easiest way to do it.
Update 1 (based on build cm-10.1-20130204-NIGHTLY-i9300.zip)
1. Multi_user
This is very simple: just flash the zip file and you're done!! just need to create the users under settings!! Can create up to 5 users!!
P.S. You need to reflash these zips for every new nightly installed!!!!
Screenshots:
Next is the tool I used to create these flashable mods zips. In case you wanna try for yourself or need to remake the mods for futures nightlies just download and follow the steps:
Links:
2. JDK and JRE for windows 32bits - (are you under windows x64? Install the 32bits javas anyway)
3. FrameworkFlasher Adapted from the wesf90 Original Thread and Updated from iBotPeaches Original Thread to run on CM10.1
1) Install JDK and JRE and Unzip FrameworkFlasher
2) copy your phone's framework-res.apk to the folder "place-framework-res-here"
3) run "RunMe.bat"
4) press 1 to decompile
5) Make the necessary changes under the folder "files-to-edit" ****
6) run 2 to recompile
7) run 3 and 4 to sign and zip the apk
8) Just flash your new zip and be happy!
**** In order to enable multiuser, it's necessery to change some xml file inside framework-res.apk and this is only possible by doing this decompile/compile process...
The files you need to change are:
. framework-res.apk\res\values\integers.xml
look for config_multiuserMaximumUsers and change the number of users (min 2)
. framework-res.apk\res\layout-port\keyguard_host_view.xml
need to add <include layout="@layout/keyguard_multi_user_selector" /> before the second </FrameLayout> ---in my mods there are more changes than this so I advice to copy and paste this file from my mod to this new one---
Click to expand...
Click to collapse
My S3 (CM10.1 updated, stock kernel) is having FC with everything with a new user. The "Setup Wizard" can't start.
lucasdeeiroz
some native apps crash a lot but apps from play should work as I installed several games and facebook at my secondary user... so try removing second user and create it again...
rfmalta said:
lucasdeeiroz
some native apps crash a lot but apps from play should work as I installed several games and facebook at my secondary user... so try removing second user and create it again...
Click to expand...
Click to collapse
but i can't use anything with the new user: i can't configure it and i can't do anything 'cause the FC window appear for Wizard Setup, Contacts, Apollo, and it never stops. The only thing I can do is tap ok for FCs (no one app starts, neither launcher) and go to lockscreen to switch to original user.
Maybe the latest nightly release is not compatible with the old mod... so I have updated it to match 20130206... remove your secondary user under settings and reflash the new mod... create the new user and then you tell me if it works
rfmalta said:
Maybe the latest nightly release is not compatible with the old mod... so I have updated it to match 20130206... remove your secondary user under settings and reflash the new mod... create the new user and then you tell me if it works
Click to expand...
Click to collapse
tried wiping cache, fixing permissions, reflashing ROM AND MOD, deleting and recreating the user, but nothing works. the same FC problem. even the new 07/02's ROM and MOD.
it can be the gapps? the new user can't open the Wizard Setup (and I think it's part of gapps). I really want the multi user on my S3, so thanks for your work on it.
SOLVED! The problem is with the system theme. With the default theme, it worked!.
We can't apply themes to the system with multi user
Yes... themes cause FCs on secondary users... great to know it worked for you
rfmalta said:
Yes... themes cause FCs on secondary users... great to know it worked for you
Click to expand...
Click to collapse
superuser don't work on second user. is it a known issue or it never will work?
It's a known issue and its up to superuser developer to fix
Re: [MOD][CM10.1][4.2.1][GUIDE] Enable Multiuser (for noobs)
Will this work with aosp
Sent from my GT-I9300 using xda premium
@ sharingan92
maybe yes, maybe no... you gonna have to try... remember to backup first

Settings_Plus Application (Version 2) for All ROMS - Alert ROM Developers

This was the reason why I created this App:​
Why should, Advanced setting added to my settings app??? Why cant I put them all in a separate app just like another settings app???
Click to expand...
Click to collapse
And here I go with all new app called SETTINGS PLUS. All ROM developers can put their Advanced settings right over here...
So, how can I do that???
ChangeLog:
Version 2:
* Fixed some issues
* Now you can add 'Long press Back to Kill" like options right in this APP.
Version 1:
* Advanced settings from Settings.apk can be put in this small App.
Click to expand...
Click to collapse
Implementation:-
Here are the steps to be implemented...
Step 1: Download attached Settings_Plus.apk below
Step 2: Now Decompile Settings_Plus.apk.. Below are the commands:
{
"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"
}
Step 3: If you want icon before any option, add icon image to /res/drawable-hdpi folder. (Better to have good icon size, for reference you can use icon.png size attributes)
Step 4: To add new preference to Settings_Plus, open /res/xml/preferences_header1.xml in NOTEPAD++
You should see something like this:
Explanation of Each Tag and purpose:
Step 5: This is it. Now, compile your apk and SIGN IT. If you don’t sign it, you can’t install it. After signing, install Settings_Plus on your phone. Now, your Settings_Plus app should display your list item as well...
Click to expand...
Click to collapse
Where to find Package & Class Names???
For package Name:
Download and install APKSKY latest version from here : http://forum.xda-developers.com/showthread.php?t=1115021
You should put APKSPY in AAPT.EXE (used to decompile APK/Jar files) folder. And then drag and drop your APK. It will show you package name.
For Class / Activity Name:
From Above process, you can compile Settings_Plus.apk You can see AndroidManifest.xml file right in the first folder. Open it with NOTEPAD++
Above pic gives more information than words...
And Ofcourse, Compile and SIGN APK.
Click to expand...
Click to collapse
How to hide an app from Launcher ???
From AndroidMainfest.XML file, change below line
<category android:name="android.intent.category.LAUNCHER" />
Click to expand...
Click to collapse
as
<category android:name="android.intent.category.DEFAULT" />
Click to expand...
Click to collapse
And Ofcourse, Compile and SIGN APK.
Click to expand...
Click to collapse
Screenshots Attached
TroubleShooting : Hmmm, Whats WRONG???
Lets find it out here...
Go to application mainfest of the file that you want to put in Settings_Plus app. If you see something like this:
<intent-filter />
Click to expand...
Click to collapse
This means your app can not be launched. May be because it doesnt have any intent. I mean check this for the Mainactivity...
NOW change add intents as shown below:
<intent-filter >
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter >
Click to expand...
Click to collapse
Now your app is visible... It took full overnight to find this out... If you don't do this, you will be getting PERMISSION DENIAL error.
Other possible exception is CLASS NOT FOUND. this means, the app you put in Settings_Plus doesn't have any associated app installed in your phone.
Click to expand...
Click to collapse
===>>> If you wanna try, then install All packages from "EXAMPLE PACKAGE" attached. Just install all of them as Normal Packages.
Screenshots Attached
Where's the download link ?
Download link is up
Some useful intent codes:
SystemUI Preferences for Tabbed View:
<header android:icon="@drawable/systemuipreferences" android:title="SystemUI Preferences">
<intent android:targetPackage="com.serajr.systemui.preferences" android:targetClass="com.serajr.systemui.preferences.SystemUIPreferencesActivity" />
</header>
On Screen Buttons:
<header android:icon="@drawable/osb" android:title="Navigation Buttons">
<intent android:targetPackage="cn.kyle.gn.NavBar" android:action="android.intent.action.MAIN" android:targetClass="cn.kyle.gn.NavBar.GnNavBarActivity" />
</header>
CPU Nofills:
<header android:icon="@drawable/overclock" android:title="CPU Overclock">
<intent android:targetPackage="it.sineo.android.noFrillsCPUClassic" android:action="android.intent.action.MAIN" android:targetClass="it.sineo.android.noFrillsCPUClassic.activity.MainActivity" />
</header>
QuickPanel Settings:
<header android:title="Quick Settings">
<intent android:targetPackage="com.lidroid.quickpanel" android:action="android.intent.action.MAIN" android:targetClass="com.lidroid.quickpanel.MainActivity" />
</header>
Long Press Back to kill:
<CheckBoxPreference android:title="@string/kill_app_longpress_back" android:key="kill_app_longpress_back" android:summary="@string/kill_app_longpress_back_summary" />
Click to expand...
Click to collapse
- Hit Thanks if I help you
nice ...like :cyclops:
Nice idea...ill try it soon.
Great Idea!
How to hide an app from Launcher..
Find in Manifest:
Code:
<category android:name="android.intent.category.LAUNCHER" /
Change to
Code:
<category android:name="android.intent.category.DEFAULT" /
Thanks for input
jader13254 said:
Great Idea!
How to hide an app from Launcher..
Find in Manifest:
Code:
<category android:name="android.intent.category.LAUNCHER" /
Change to
Code:
<category android:name="android.intent.category.DEFAULT" /
Click to expand...
Click to collapse
Thanks for the input... I will update first post... And, we can get class names from Manifest file. I will update that aswell...
srihari210 said:
Thanks for the input... I will update first post... And, we can get class names from Manifest file. I will update that aswell...
Click to expand...
Click to collapse
Thanks, after a little change your app works fine (sorry for pm).
Perfect work!
Looks awesome!
Gonna try it soon...!
Juz be the smart Geek
Added Example Package - Check it out
All,
I have added example package for your reference.. check it out... its working perfectly..
Cheers,
Srihari G.
Hi friend is a good idea...
Setting plus include in settins ... is a best idea...
Advanced settings menu ... OC, RAM manager
Sesme said:
Hi friend is a good idea...
Setting plus include in settins ... is a best idea...
Advanced settings menu ... OC, RAM manager
Click to expand...
Click to collapse
Yes, Anything... Everything (Any APP) you can put in Settings_Plus menu...
You know, if you want to put some shortcuts from settings, then, you can..
For example, directly open Connectivity option (MSC or MTC).. here you can code... This code should exist in SETTINGS.apk.. You just need to put the correct one and put in here.. thats it, so easy..
srihari210 said:
Yes, Anything... Everything (Any APP) you can put in Settings_Plus menu...
You know, if you want to put some shortcuts from settings, then, you can..
For example, directly open Connectivity option (MSC or MTC).. here you can code... This code should exist in SETTINGS.apk.. You just need to put the correct one and put in here.. thats it, so easy..
Click to expand...
Click to collapse
There is a little spelling mistake
Attached a SS, btw, you can make a cwm package if you want, for the included apps or the app will fc when they arent available
jader13254 said:
There is a little spelling mistake
Attached a SS, btw, you can make a cwm package if you want, for the included apps or the app will fc when they arent available
Click to expand...
Click to collapse
Haahaaa... I know, I will make spelling mistakes...
And, They can install EXAMPLE Package, if they want to try... Example Package works just fine... They just need to install as normal package...
May Be i should mention that in first post
srihari210 said:
Haahaaa... I know, I will make spelling mistakes...
And, They can install EXAMPLE Package, if they want to try... Example Package works just fine... They just need to install as normal package...
May Be i should mention that in first post
Click to expand...
Click to collapse
Ohh, sorry I just checked yesterday and it wasn't upload there! Nice!
Hi, all ! Great work
How to add Colored text ?
.....................................
android:textColor not working
.....................................
Thank you for good and usefully application
MicQo said:
Hi, all ! Great work
How to add Colored text ?
.....................................
android:textColor not working
.....................................
Thank you for good and usefully application
Click to expand...
Click to collapse
Hmm, I dont think, you can put colors to this text. I mean, its same like SETTINGS APP.
These are PREFERENCE Headers and NOT NORMAL LIST... Anyway, I havent tried coloring text, till now..
srihari210 said:
Hmm, I dont think, you can put colors to this text. I mean, its same like SETTINGS APP.
These are PREFERENCE Headers and NOT NORMAL LIST... Anyway, I havent tried coloring text, till now..
Click to expand...
Click to collapse
Thank you, helped me.
@srihari210
would you plz share the source codes?
tnx

[GUIDE[CM11] How to create themes for the new Theme Chooser

{
"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"
}
- Section One -
Hey guys! I'm back again with another contribution to the community, this time I'm posting a guide on behalf of my theme, Svelte UI.
I have noticed there is a very few amount of theme's available for the new CyanogenMod Theme Chooser out there. And hopefully I can change this.
This guide will cover everything needed to create a Theme, from creating the initial project to theming itself. And some tips on how I theme.
And to make all you lovely people even happier. I will provide all code and even a sample .apk
And also I don't want to add screenshots of my desktop to this thread, because the resolution will be way to big. Instead I'll have links. So let's get started shall we?
VIDEO TUTORIALS
[x] One - Create Project
[x] Two - Initial Setup
More coming.
- Section One -
This section is vital for you to accomplish your theme, so please do not skim through it.
For the requirements, you need an IDE. Yes I will be showing you how build the theme from scratch and not a template.
Use an IDE that you're comfortable with, I wont be showing yo how to use it. I will be using Eclipse for this tutorial.
You will need an image editing program, I am going to use Paint.NET. It's free, advanced, and does the job as good as Photoshop.
We are also going to need patience. Yeap. Theming takes allot of time and patience, it is frustrating especially if you're doing precise editing but it's worth it at the end.
One more thing we are going to need is, an APK decompiler. So download one you like, install the required .apk's for it to work properly.
Then get hold of the SystemUI.apk and Framework-res.apk, we're going to use this later.
- Section One -
Okay, now go ahead and open up your IDE, and create a new Project, give it a name and an appropriate package name.
For example mine is "Svelte UI" and "com.ascendapps.sui". [View Screenshot]
Now click next till you end the project setup. Once your project has been created.
- Section Two -
Go ahead and delete the following folders.
[src, layout, menu, values-sw600dp, and values-sw720dp-land also delete drawable-ldpi if you want] [View Screenshot]
Now in the values folder, create a new xml and call it "public.xml" and make sure to delete the "dimens.xml" file.
Inside the xml file (public.xml) add the following code - [View Screenshot]
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="drawable" name="ic_launcher" id="0x7f020000" />
<public type="string" name="app_name" id="0x7f030000" />
<public type="style" name="AppBaseTheme" id="0x7f040000" />
<public type="style" name="AppTheme" id="0x7f040001" />
</resources>
- Section Three -
Now go ahead and save it. Make you save things when working throughout your project, better be safe than sorry.
Open up AndroidManifest.xml, and add the following code and do what it tells you - [View Screenshot]
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="7" android:versionName="1.0" package="com.ascendapps.sui" <!-- Enter the package name of your project that you had done in the setup earlier -->
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="org.cyanogenmod.theme" android:required="true" />
<application android:label="Svelte" android:icon="@drawable/ic_launcher" android:hasCode="false" /> <!-- Change label to theme name -->
<meta-data android:name="org.cyanogenmod.theme.name" android:value="Svelte" /> <!-- Name of Theme -->
<meta-data android:name="org.cyanogenmod.theme.author" android:value="Krish Gounder" /> <!-- Your Name -->
</manifest>
.
Please make sure to delete the Info statements once you've finished editing the xml.
For example delete the lines in green. Which is the following -
Code:
<!-- Your Name -->
<!-- Name of Theme -->
<!-- Change label to theme name -->
<!-- Enter the package name of your project that you had done in the setup earlier -->
- Section Four -
Now save your project, and close everything. Once closed, navigate to your project workspace. In there you should see your projects name.
Like this . [View Screenshot]
Open the the project then inside the work folder open the "Assets" folder. This is where everything comes to life.
Go ahead, and create the things you want to be included in your theme.
- fonts - If you wish to use different fonts in your theme.
- images - The images that are displayed when applying the theme.
- overlays - You must create this folder, this is where all the theming images are kept.
- wallpapers - If you want to add a wallpaper to your theme. Use .jpg
- bootanimation- Add a .zip file of your bootanimation in here.
- alarms - If you want to add alarm sounds to your theme.
- lockscreen - Add a lockscreen wallpaper. Use .jpg
- notifications - If you want notification sounds.
- ringtones - If you want to have ringtone sounds.
I will be using images, overlays and wallpapers.
So inside the images folder you will need -
lockscreen_preview.jpg if you are having a lockscreen wallpaper.
styles_preview.jpg just add your wallpaper.
wallpaper_preview.jpg Just use the wallpaper and add an icon in the middle of the image.
Add your wallpaper in the wallpapers folder and name it - wallpaper1.jpg
[Screenshot One] - [Screenshot Two] Now we've completed this section.
- Section One -
For theming you'll need a reasonable image editing software, Paint.NET works quite well.
So you want to know how to theme apps and components? Let's start with the framework-res.apk.
Earlier, I had stated that you'll need an APK Decompiler. So using the decompiler, decompile the framework-res.apk.
Open up to decompiled project and navigate to the folder you wish to work on. for example, drawable-xxhdpi.
Now in your theme work folder, go into "overlays" and create a folder called "android"
Inside there, create a folder called "res" and inside "res" create drawable-xxhdpi or the folder you chose.
Now go back to the project you decompiled earlier, and copy in all the .png files that you know you'll theme.
- Section Two -
How to them other apps and get it to work. the way the theme chooser knows what to them is by package names.
So if you want to theme an app you''l need to find out it's package name. For example Instagram is - com.android.instagram
If you make a folder with that name, and inside you have to create the res folder, it's basically the same layout but the initial name is the package name.
- Section Three -
It's often weird to work with .9.png's when you come face to face with it the first time. The best way to edit them is by working with the image inside the borders.
By this I mean, when you open the image in an editor it has these black lines around the edges, using a selecting tool. select everything inside the border, and do not select the border.
These borders help the Android system with stretching the image.
CREDITS -
[x] Me for preparing this guide.
[x] CyanogenMod Team for the Theme Chooser.
[x] Imgur
[x] XDA
[x] Eclipse
[x] QuickMod Dev
[x] And curiosity.
RESERVED
This section is user based, so if you need help with theming something.
Let me know and I'll update this thread post and I'll directly link you to the info.
When theming a specific application, whether it's a system app or a normal app.
You will need to give the folder the package name so the system knows what to theme.
So if you want to theme the settings app you'll have to name the folder "com.android.settings".
Thanks to @Vincentmrl He requested me to add these so people have a better idea and don't get confused.
The names on the left correspond to the app to right.
android (framework-res.apk)
com.android.dialer (Dialer.apk)
com.android.email (Email.apk)
com.android.keyguard (Keyguard.apk , lockscreen theming)
com.android.settings (Settings.apk)
com.android.systemui (SystemUI.apk)
I will be adding more to these. And easy way of finding the apps package name is by looking at its PlayStore url.
Or by checking in android app manager.
- Section One - Add your own custom background
First of all, you'll need to create or find your own image.
Make sure it's a reasonable size, this is basically a common sense statement.
Don't use a really small image. Okay once you've gotten your image.
Change the name of the image to the following - background_holo_dark.png
Place this image in the following folder - /overlays/android/res/drawable-nodpi
Once done, you need a way for the system to find the image, you can do this by creating a new styles.xml in the values folder.
So go ahead and create a file named styles.xml in the values folder.
The next thing you have to do is add this code inside your xml file.
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Black" parent="@*android:style/Theme">
<item name="android:colorBackground">@color/transparent</item>
<item name="android:windowBackground">@drawable/background_holo_dark</item>
</style>
</resources>
Save the file and you're done.
Thank you guy, I love it, maybe I'll do one
GæxD said:
Thank you guy, I love it, maybe I'll do one
Click to expand...
Click to collapse
Goodluck! let me know when you make it. I'll be glad to check it out. :]
Sent from my Nexus 5 using Tapatalk
krishneelg3 said:
Goodluck! let me know when you make it. I'll be glad to check it out. :]
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Thanks again
I have one question, how to change this colors? Example, I marked the colors in red:
The switch button can be change in the framework-res.apk.
And the text can be changed in colors.xml. it should be displayed as "primary_text" and "secondary_text".
Edit - You may need to look in Settings.apk for the text colors. If they don't work, then look for it in framework-res.apk.
It will be a trial and error thing, so you'll have to test many times.
Sent from my Nexus 5 using Tapatalk
krishneelg3 said:
The switch button can be change in the framework-res.apk.
And the text can be changed in colors.xml. it should be displayed as "primary_text" and "secondary_text".
Edit - You may need to look in Settings.apk for the text colors. If they don't work, then look for it in framework-res.apk.
It will be a trial and error thing, so you'll have to test many times.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Okay
You can make a tutorial explaining better this part of colors and others things to put in OP. Other peoples may also have the same doubt =)
GæxD said:
Okay
You can make a tutorial explaining better this part of colors and others things to put in OP. Other peoples may also have the same doubt =)
Click to expand...
Click to collapse
Thanks, I will be sure to add more info about this when I prepare it later.
I look forward
I have a theme in the works. ?
HI thank you for the guide but i keep getting 'Errorublic symbol style/AppBaseTheme declared here is not defined.' while using android studio. how do i solve this? it wont let me compile my apk.
RealiableCandy4 said:
HI thank you for the guide but i keep getting 'Errorublic symbol style/AppBaseTheme declared here is not defined.' while using android studio. how do i solve this? it wont let me compile my apk.
Click to expand...
Click to collapse
Use eclipse dude, with one click you install your apk on device and test the theme
What version of Eclipse are you guys using? I downloaded the Standard version and it keeps me prompting an error whenever I try to create the public.xml file. Any ideas?
torresfelipe said:
What version of Eclipse are you guys using? I downloaded the Standard version and it keeps me prompting a error whenever I try to create the public.xml file. Any ideas?
Click to expand...
Click to collapse
Eclipse Kepler, is the current one. I don't think you need a specific version.
Sent from my Nexus 5 using Tapatalk
torresfelipe said:
What version of Eclipse are you guys using? I downloaded the Standard version and it keeps me prompting an error whenever I try to create the public.xml file. Any ideas?
Click to expand...
Click to collapse
Eclipse Standard/SDK
Version: Kepler Service Release 2
Build id: 20140224-0627
Thanks guys. I might have done something wrong, but it's working now. I'm using the latest release, 4.4 Luna.
GæxD said:
Use eclipse dude, with one click you install your apk on device and test the theme
Click to expand...
Click to collapse
Thanks for the reply i fixed it by adding
Code:
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"></style>
in the styles.xml file
I used Generator to generate png/9.png files of my theme. Problem is that all of files look like this themename_background.png, themename_tab.png etc. (you know what i mean). How to make theme work with that named images? I need to edit some code to audo add this or how? Its not so easy to rename all pngs (takes alot of time)
I just cant do it.Downloaded eclipse with android SDK and aplication wizzard isnt that easy: next, next, next. Also i dont have folders what you said to delete... For me (newbie) its useless guide.. Just trying and still cant do anything because dont know how...
And finally when i will make any project how to build it to be ready to install?
@baciany Check your Pm
@TheArc;
Which APK Decompiler do you use? Do you think that something simple as http://www.decompileandroid.com/ would work?

[guide][wip]all you need to learn about an apk

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Let's start by know what's an APK
Android application package (APK) is the package file format used to distribute and install application software and middleware onto Google's Android operating system, and certain other operating systems, such as Blackberry 10 Devices with the OS version 10.2.1 or higher.
Read more here:http://en.wikipedia.org/wiki/Android_application_package
XDA PORTAL POST:http://www.xda-developers.com/apk-files-modifications/
What's inside an APK
AndroidManifest.xml It contains the valuable information for an application to function well.The permission it takes from the android system,the libraries it requires for proper functioning ,the minimum sdk version/api level/or in general the android version required and much more.
res(Resources) folder The most important folder inside an apk .It contains the all the things that an apk has.It got the xml codes which tell about diffrent sizes of things in apk the different colors ,labels ,icons ect.
lib folder this may or mayn't be present .It contains the few library files required especially for the application to work properly
assets folder
an odex apk also contains class.dex the java part of the apk.
smali folder the java part of the apk in deodexed apk
How to Re-Engineer or Decompile &Recompile an APK
There are many tools that you will find floating over the internet for this very purpose but actually the main tool over which these tools have been built is the APKTOOL .
check out:code.google.com/p/android-apktool/
Install your apktool.
I'll recommend you to install the Android SDK or use my reduced sdk in the attachments below (if you use windows)
Once you have installed the apktool.(I'm considering you have completly installed and configured java well)It's time to get started!
So we are going to pull the framework files from the system.
type in command prompt (cd it to the folder containing adb i.e. android-sdk/platform-tools or my the reduced sdk )
abd pull /system/framework/framework-res.apk framework
Click to expand...
Click to collapse
pull all the framework files from system/framework (only the apks) and systemui from the app folder .
Now let's install the framework
Open command prompt cd to the folder containing the pulled framework and type:-
apktool if framework-res.apk
Click to expand...
Click to collapse
Similarly install all resources.
Now let's decompile the an APK.
if you have an APK thats nice but if you don't let's pull some form the system
adb pull /system/app/ applications
Click to expand...
Click to collapse
Lets say we are decompiling an APK names xxx.apk
Open cmd ,cd to the folder containg the apk and type
apktool d xxx.apk xxx
Click to expand...
Click to collapse
let's recompile the apk back
cd the cmd to the folder containing the decompile apk i.e. if /a/b/c contains folder xxx i.e. the decompiled apk then cd to a/b/c.
type
apktool b xxx xxx_new.apk
Click to expand...
Click to collapse
For more information on signing zipaling and other tools that were developed over apktool and offering more features checkout: http://forum.xda-developers.com/showthread.php?t=2295002
Thanks to @XperienceD for this awesome write up.
Understanding the Decompiled apk
Let's get started
Apktool.yml :It contains some of the basic information regarding the apk it version the its file name(It's not the name that you see but you can say it be a like a code name of the apk that actually plays role in linking of the application).
version: 2.0.0-3d2e93-SNAPSHOT
apkFileName: framework-res.apk
isFrameworkApk: true
sdkInfo:
minSdkVersion: '19'
targetSdkVersion: '19'
packageInfo:
forced-package-id: '1'
versionInfo:
versionCode: '19'
versionName: 4.4.2-937116
compressionType: false
Click to expand...
Click to collapse
It contains the min. sdk version and the sdk version which for which this application was actually made.It also the compression level to which this application was compiled and at times you also find some extra information related to the vendor.
Editting this you can change the version name the min sdk version so that the app. can run on lower versions of android aswell but it's always not possible to lower all application to a lower level or a very lower sdk level.
Android Manifest : Lets do this in bit detail.
1.
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserLabel="@string/app_label" package="com.android.calendar">
Click to expand...
Click to collapse
the UserLable is the App-Drawer Name of the application.It's the name or say the data in res/values/strings.xml and string app_label.
the package/codename for this application is "com.android.calendar"
2.the Permissions part
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.READ_CALENDAR"/>
<uses-permission android:name="android.permission.WRITE_CALENDAR"/>
<uses-permission android:name="com.sonymobile.permission.READ_LUNAR"/>
<uses-permission android:name="com.sonymobile.permission.WRITE_LUNAR"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/>
<uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.mail"/>
<uses-permission android:name="com.sonymobile.email.intent.permission.SEND_CALENDAR_EMAIL"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.android.email.permission.ACCESS_PROVIDER"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<permission android:description="@string/tasks_provider_permdesc_readTasks_txt" android:label="@string/tasks_provider_permlab_readTasks_txt" android:name="com.sonymobile.tasks.provider.permission.READ_TASKS" androidermissionGroup="android.permission-group.PERSONAL_INFO" androidrotectionLevel="dangerous"/>
<permission android:description="@string/tasks_provider_permdesc_writeTasks_txt" android:label="@string/tasks_provider_permlab_writeTasks_txt" android:name="com.sonymobile.tasks.provider.permission.WRITE_TASKS" androidermissionGroup="android.permission-group.PERSONAL_INFO" androidrotectionLevel="dangerous"/>
<uses-permission android:name="com.sonymobile.tasks.provider.permission.READ_TASKS"/>
<uses-permission android:name="com.sonymobile.tasks.provider.permission.WRITE_TASKS"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.READ_SYNC_STATS"/>
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Click to expand...
Click to collapse
These permissions can be easily found in /system/etc/permissions the *.xmls most of the these are already integrated in the android system .. but the some especially the vendor related ..these permissions can be granted through applications .
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.APP_CALENDAR"/>
</intent-filter>
Click to expand...
Click to collapse
If you see this " <category android:name="android.intent.category.LAUNCHER"/>" line in the manifest then you'll find the application in your lancher's apdrawer unless you have hid it
3.Libraries
<uses-library android:name="android.test.runner"/>
<uses-library android:name="com.sonymobile.provider.tasks_1" android:required="false"/>
<uses-library android:name="com.sonyericsson.uxpres" android:required="false"/>
Click to expand...
Click to collapse
these permissions can be in the apk itself or in the /system/lib
Assets : The name says it's all the assets require for an application to do it all .
The res folderIt got most of the important part of the APK .The icon images you see in the apk are stored in the drawable-ydpi where y can be m,h,x,xx,xxx dpi.
now the /res/value folder contains the stylees :the design the theme of the APK ,bools are the boolean part of the APK enable/disable can be easily controlled by editing the bools.xml the dimensions part of the apk are in /res/values/dimens.xml
As I stated above the Appdrawer name of the application,
/res/values/strings.xml
search app_label and you find a line like this
<string name="app_label">Calendar</string>
Click to expand...
Click to collapse
Now replace the name as in here"calendar" with say your name
to make it
<string name="app_label">My name</string>
Click to expand...
Click to collapse
compile the application back install it and you'll see the apppdrawer name is now My name from Calendar
Smali folder It contains the java based codes for the apk file.
Understanding the framework-res
framework-res.apk is the most important apk of the android system.Without this android system wouldn't boot properly it will bootloop and if it is poorly edited it will still be the same i.e. bootloop.
To begin with the assets folder
1.It has a images and sound folder which contain the sound and the images which act as the bootup sound and bootanimation if the bootanimation.zip is missing from the system folder
2.It contains a webkit folder:if you open it you'll understand what are those yourself
The res folder :
Lets thing what all we can do with the android system by editing framework res..
The capabilities of the the bool.xml
->enable/disable WImax
->enable/disable nav bar
->enable/disable turning on of screen after plugging in or removing the charger.
each(most) line in bools.xml can help in enabling disabling some or the other feature
dimens.xml
These mods related to Bools.xml was part of a question at an event which was conducted by me and @Dev Jaskirat .And this was his question so thanks bro :good:
Dimens stands for dimensions so it makes it clears THAT it is used to change the dimestions of diffrent things eg. say nav bar the face unlock
now lets go to strings.xml
Have you ever wiped up dalik and seen Android is upgrading..??
If yes lets make it something new and classy
<string name="android_upgrading_title">Android is upgrading…</string>
<string name="android_upgrading_apk">Optimizing app %1$d of %2$d.</string>
<string name="android_upgrading_starting_apps">Starting apps.</string>
<string name="android_upgrading_complete">Finishing boot.</string>
Click to expand...
Click to collapse
%1$d of %2$d is the app count .
Edit everything else as you wish
nice!
NIce thread finally knew what i was doing wrong while decompiling apps. I wasn't pulling all frameworks but only framework-res and systemui. After reading this found that in system/framework was mediatek-res after installing this too my systemui decompiled succesfully and finally ported lolipop checkboxes
Keep Going!
this post rocks
well a very great description for a newbie and very clearly mentioned.
The thread has been updated with few more information
Nice compilation of commands.... highly appreciated...
can you add more variation? by providing with more details... it would be great
c0d3r!pp3r said:
Nice compilation of commands.... highly appreciated...
can you add more variation? by providing with more details... it would be great
Click to expand...
Click to collapse
I know it is too late to comment here , but after attending a workshop and talking to some friends I feel that it's good that the guide is kinda incomplete .Android has no boundries and thus even one of the smallest part of our systen the APK can't be just explained with a guide .APK and its structure is a very vast topic and you must try things yourself .I am always here to help you out if and when needed .
If you think you should not post a question here then you can PM me
Aman_Arora said:
I know it is too late to comment here , but after attending a workshop and talking to some friends I feel that it's good that the guide is kinda incomplete .Android has no boundries and thus even one of the smallest part of our systen the APK can't be just explained with a guide .APK and its structure is a very vast topic and you must try things yourself .I am always here to help you out if and when needed .
If you think you should not post a question here then you can PM me
Click to expand...
Click to collapse
i have been moved to more deep in to the ROM building.. but i would love to share my experiences as well.... :good:
hi Guys sent me
Apk tools new version

Categories

Resources