[MOD][TUT] Add ROM version into Settings with Build.prop control - Galaxy S Advance I9070 Themes and Apps

With this mod, you can add an item about the version of your rom, making it editable from the build.prop.
What you need:
-Apktool
-Settings.apk
-A text editor
-Notepad++ recommended
Let's begin!
Open command promot and move to your Apktool's folder. Then, type this:
Code:
apktool d Settings.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"
}
When the file is decompiled, go to Settings/res/xml, find and open (with Notepad++) device_info_settings.xml.
In device_info_settings.xml, find the line wich begins:
Code:
<Preference android:title="@string/mod_version" android:key="mod_version"
or if it's a PAC rom, line could begin with:
Code:
<Preference android:title="@string/mod_version" android:key="mod_version"
Add before (preferred) or after this line (depends if you want to see your rom version before or after of Cyanogenmod Version):
Code:
<Preference android:title="@string/rom_version" android:key="rom_version" android:summary="@string/rom_version_default" style="?android:preferenceInformationStyle" />
The file should look like this:
Save and close the file.
Now go to Settings/res/values and open strings.xml.
Go at the end of file (before </resources>) and add these two lines: (replace Your_ROM with your rom name)
Code:
<string name="rom_version">Your_ROM version</string>
<string name="rom_version_default">Unknown</string>
Final result will be this:
Save and close.
For other languages, procedure is identical but instead to go to res/values, go to res/values-** (**=language). For example, for italian translation, go res/values-it instead res/values and change from "NextCyan version" to italian translation or rather "Versione NextCyan".
We have just added a item into Settings--> About device. Now we have to create support for changing the version from build.prop. And here perhaps comes the hard part.
Go to Settings/smali/com/android/settings/DeviceInfoSettings.smali
Now press Ctrl+f and type "mod_version" or "cm_version" in case it's a PAC rom.
In various results, look for lines similar to these:
Select lines from .line XX to .line XY, where is contained "mod_version" or "cm_version" as follows:
Copy the lines (Ctrl+C).
Now, if you have added the line before "Cyanogenmod version" (into device_info_settings.xml) open this spoiler
Paste the code (Ctrl+V) above .line XX (in my case above .line 94) and make some empty lines, like this:
In new lines, you need to replace "mod_version" (or "cm_version") with rom_version.
The second thing to do, is edit the line to write into the build.prop, then edit "ro.cm.version" to "ro.rom.version".
else, if you have added the line after "Cyanogenmod version", open this
In this case is needed to paste the code before .line 96 (for me) and making some empty lines, you'll see this:
In new lines, you need to replace "mod_version" (or "cm_version") with rom_version.
The second thing to do, is edit the line to write into the build.prop, then edit "ro.cm.version" to "ro.rom.version".
Save and close the file.
Come back to the main folder, where's place apktool and type:
Code:
apktool b settings
Now, with WinRAR/Winzip/7-Zip, extract Settings.apk in a folder called Settings-new.
Go to Settings/build/apk and copy all files and folders and paste them into Settings-new folder replacing old files.
Compress all content of Settings-new folder...
...and rename from Settings-new.zip to Settings.apk --> File Ready
Screen of build.prop
Screen "About device"
Sorry for my bad english (x100)
Tested on:
-Samsung Galaxy S Advance
-Samsung Galaxy Mini
Click to expand...
Click to collapse
Credits:
[email protected] for test it on Galaxy Mini
Click to expand...
Click to collapse

Reserved Just in case

Reserved2

Related

[GUIDE][ICS]Use PNG Images as Notification Background for Stock / Stock Based ROM

Now here's tutorial on how to put any PNG image as notification pulldown background..
Here I'm using lidroid's modified SystemUI, should work on other stock based SystemUI
First you need to decompile your SystemUI.apk
Open res/values/drawable.xml with any good xml editor (here I'm using NP++)
Delete this line:
Code:
<item type="drawable" name="notification_tracking_bg">#xxxxxxxx</item>
the #xxxxxxxx value maybe vary in each ROM, just delete the whole line )
Save
Prepare your desired .png file, can be opaque or transparent, and can be in any size/dimension (the system will resize it to match the screen)
Rename it to notification_tracking_bg.png and put it in res/drawable-hdpi
Recompile your SystemUI.apk, push to your phone and you are.......
Done !!
The result will be looked like these :
{
"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"
}
Remember to
ALWAYS MAKE BACKUP !!
before doing anything above..
I don't responsible of any negative things like bootloop, bricked device, burned SD card, you late to go to school, or the third world war caused by the guide above..
You have been warned !!
Click to expand...
Click to collapse
Good luck..
iiandskater said:
Now here's tutorial on how to put any PNG image as notification pulldown background..
Here I'm using lidroid's modified SystemUI, should work on other stock based SystemUI
First you need to decompile your SystemUI.apk
Open res/values/drawable.xml with any good xml editor (here I'm using NP++)
Delete this line:
Code:
<item type="drawable" name="notification_tracking_bg">#xxxxxxxx</item>
the #xxxxxxxx value maybe vary in each ROM, just delete the whole line )
Save
Prepare your desired .png file, can be opaque or transparent, and can be in any size/dimension (the system will resize it to match the screen)
Rename it to notification_tracking_bg.png and put it in res/drawable-hdpi
Recompile your SystemUI.apk, push to your phone and you are.......
Done !!
Good luck..
Click to expand...
Click to collapse
First I like your guide and i tried to do follow that, but i need your help. Can you explain more cleary, i used apk manager to de-compile systemui.apk then copied to sd and used Root explorer to move it to system/app and set permission 6-4-4 and then reboot phone, But when the phone started, i lost my notification and got alert mess com.adroid.systemui stopped. Force close
p/s sorry for my poor english

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

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

[DISCONTINUED][GUIDE] Adding PIE Controls to ROM [4.0+]

PIE Controls in 4.0+ ROMS
{
"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"
}
In this guide i will be telling you how to implement PIE Controls in any ICS or above roms!!
Click to expand...
Click to collapse
Requirements:
Code:
* Apktool or anyother tool to decompile/recompile apks
* [URL="http://forum.xda-developers.com/showthread.php?t=1330150"]LMT Launcher[/URL]
* Settings.apk
Step 1:
Decompile your settings.apk and your LMTLauncher.apk as well.
Step 2:
Inside of the decompiled LMT launcher, open the AndroidManifest.xml file and delete the below line. Now save and exit.
Code:
<category android:name="android.intent.category.LAUNCHER" />
Step 3:
Navigate to the res->xml folder inside of your decompiled settings apk and open the settings_headers.xml file.
Paste the code below where you feel fit.
I have chosen to place the code under the "<intent android:action="com.android.settings.MANUFACTURER_ APPLICATION_SETTING" />" line.
Code:
</header>
<header android:title="@string/navigation_settings" />
<header android:id="@id/pienav_settings" android:title="@string/pienav_label">
<intent android:targetPackage="com.android.lmt" android:action="android.intent.action.MAIN" android:targetClass="com.android.lmt.LMT" />
Step 4:
Navigate to the res->values folder inside of you decompiled settings apk and open the strings.xml file.
Paste the following code at the bottom of the file above the "</resources>" line.
Code:
<string name="navigation_settings">Navigation</string>
<string name="pienav_label">Pie Controls</string>
Step 5:
Navigate to the res->values folder inside of you decompiled settings apk and open the ids.xml file.
Paste the following code at the bottom of the file above the "</resources>" line
Code:
<item type="id" name="pienav_settings">false</item>
Step 6:
Recompile the apks!!! Probably you wont get any errors!! If so post your errors i will try my best to help you out!!!
Step 7:
You may need to sign your LMTLauncher.apk as you have modded the AndroidManifest.xml file but no need of Settings.apk!!
Step 8:
Create a flashable zip and flash it!!! Using adb or using root explorer to replace apps may not work at times!!!
Credits:
Code:
* Xda
* Google

[GUIDE] Export Your Kernel Adiutor Settings to init.d Script

Hi, there.
The reason I make this thread is just want to share some tips to export your Kernel Adiutor profile settings to make it as a script running via init.d on your device and also as a backup for reasons. Since I'm having some trouble with Kernel Adiutor such as fail to apply on boot on restart, reseting all of my tweaks for no reason after restart, switching from different ROMs, etc. that really grind my gears.
NOTE : I prefer doing this work on PC and using Notepad++ or other text editor since its more easier.
1. Make sure your device is already have working init.d
2. Open your Kernel Adiutor, make some tweaks and save it as a profile in Hamburger Menu - Profile
3. Go to /data/data/com.grarak.kerneladiutor/files/ and copy profiles.json to somewhere else
4. Open profiles.json in Text Editor and copy all of its contents to clipboard
5. Go to https://www.browserling.com/tools/json-to-text to convert .json to txt, just paste it on the text box provided and click convert!.
6. Copy the text inside the text box and create a new files, paste onto it.
7. From this point we will edit the lines and remove unused lines so pay attention to avoid deleting the useful one
8. As you can see there are lines begins with "command" and "path", delete all the lines that start with the "path".
9. After you done with that, next is ONLY delete the words "command" from all lines. you will see fewer lines of codes after all this step. Then don't forget to save it as file without extension ex. : 69mykernelsettings
10. If you want to make sure you did copy the correct code, just do quick cross-check from Kernel Adiutor - Profile and see Information and compare it to the profile you use with the file we just made.
11. Last step copy your file to /etc/init.d/ , dont forget to give it permissions rwxr-xr-x (0755) or it wont executed on boot.
Here are some screenshot example from my profile :
{
"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"
}
Maybe this method is so convensional and too much hassle but it works for me and if you have a better method feel free to share in this thread and give some feedback
Very helpful bro, thanks
Gonna do this
arundhiman said:
Very helpful bro, thanks
Gonna do this
Click to expand...
Click to collapse
but that didnt worked for me , i m using android q and there is just "init" folder not that init.d
Looking for a another simple method now
In android q and above service.d folder works as init.d, you could found that folder in adb magisk

AndroidManifest Error (No resource identifier found for attribute resizeableActivity)

I am trying to hack a game called MilkChoco - Online FPS. I can confirm that this game uses "xigncode" to block hacking tools such as Lucky Patcher, Game Killer etc... I am so close to hacking this game by removing xigncode detection but at this very last step, I am having problems. Let me describe what I've done (the modifications) and the problem at the end.
1) I decompiled the .apk with apktool.
{
"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"
}
2) I go to the folder with all xigncode related files.
C:\Users\Dell\Desktop\apktool\MilkChoco_1.3.4\smali\com\wellbia\xigncode
3) I use Notepad++ to go to the above directory and search the following
.method public initialize(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;Lcom/wellbia/xigncode/XigncodeClientSystem$Callback
4) I double clicked on the result to directly go to that file. This is what appears.
5) I simple added this to the .prologue line so that it appears like this.
.prologue
const/4 v0, 0x1
return v0
I believe this will remove xigncode detection. This is all I did with the modification for the .apk file. If I'm wrong that this will not remove xigncode detection, please let me know.
6) I save the file and recompiled the app. However there is this error.
C:\Users\Dell\Desktop\apktool\MilkChoco_1.3.4\AndroidManifest.xml:9: error: No resource 'resizableActivity' in package 'android'
Here is the full display of the error.
I did some google searches for 'resizableActivity' but couldn't find anything useful. Here is the ORIGINAL AndroidManifest.xml when I decompiled the apk.
As you can see in Line 9, 'resizableActivity' is mentioned. Lacking my knowledge, is there any error in the above screenshot, especially in Line 9?
I did these changes to the line. The first two doesn't work, however the error does not occur after my third change.
1) Changed "false" to "true" (at the end of the line) DOESN'T WORK
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:resizeableActivity="true">
2) Changed "true" to "false" (near the beginning of the line) DOESN'T WORK
<application android:allowBackup="false" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:resizeableActivity="false">
3) Original code is:
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:resizeableActivity="false">
I deleted the last part of the code so it looked like this
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher">
The error does not occur after this change. I can successfully recompile the apk. HOWEVER, when I tried to install the apk, it says "error parsing the package". I'm really loosing my mind over this. I would strongly appreciate it if someone could explain why the error is mentioning AndroidManifest.xml. Thank you.

Categories

Resources