[GUIDE][5.0][NOOBS]Add rom banner in about phone. - Android General

Hi, in this tut, ill show you how to add rom banners in about phone settings of your lollipop rom.
Files required-
-Zip in attachments
-DEODEXED rom
-Brain(link?)
Part One-
-Extract the zip
-Copy these files into the folder--->
Code:
/system/priv-app/Settings/Settings.apk
And
Code:
/system/framework/framework-res.apk
-Run cmd.exe and run this command--->
Code:
apktool if framework-res.apk
This will install the framework.
-Then run this command to decompile settings.apk--->
Code:
apktool d Settings.apk
Part two-
-In apktool folder goto Settings/res/layout and create a logo.xml file
-Open it, and paste the following lines in it--->
-----------------------------------------------------------------------------------------------------------------------------------
"<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/logo" />
</LinearLayout>"
------------------------------------------------------------------------------------------------------------------------------------
-Resize your banner (which should be a PNG file) to 500x123 and rename it to logo.png. Then copy it to Settings/res/drawable
Part Three-
-Navigate to Settings/res/xml and open device_info_settings.xml.
-Add this line--->
------------------------------------------------------------------------------------------------------------------------------------
"<PreferenceScreen android:enabled="false" android:layout="@layout/logo" android:selectable="false" android:key="logo" />
------------------------------------------------------------------------------------------------------------------------------------
Right below this line--->
------------------------------------------------------------------------------------------------------------------------------------
"xmlns:android="http://schemas.android.com/apk/res/android">"
------------------------------------------------------------------------------------------------------------------------------------
-It should look like this--->
-----------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings"
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen android:enabled="false" android:layout="@layout/logo" android:selectable="false" android:key="logo" />
------------------------------------------------------------------------------------------------------------------------------------
Part four-
-Now open cmd.exe and type this to recompile--->
Code:
apktool b Settings
Part Five and most important!!
-After the last command finishes, goto Settings/original and copy everything inside it to
Settings/build/apk and replace the file if prompted
-Then again run--->
Code:
apktool b Settings
-Now you have your settings.apk in Settings/dist/
-Copy it to /system/priv-app/Settings/ and replace the old file, set rw-r-r- permissions and reboot!
NOTE- THIS HAS BEEN TESTED ON AOSP BASED LOLLIPOP ROM. I DO NOT GUARANTEE WORKING ON CUSTOMIZED ROMS LIKE TOUCHWIZ OR LG ROMS. ALL LINES MUST BE ADDED WITHOUT THE "(QUOTES) MARK AT THEIR STARTING AND ENDING.
It should look like this--->
{
"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"
}
HIT THNX IF IT HELPED!!!

Thanks alot i was looking for a guide like this but for 5.0+ also i dont see any xml code in the code parts?

Are u using xda app?
Whoops! I remember adding em. Anyways, I'll do it.
Would it be OK if I add em in few hrs? I hv school.

Related

[guide] [xperia] fix cm10 & miui jb mass storage |

in the name of god​
hi all
as you know , we have two select in usb conect mod in cm 10
media device
camera
{
"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"
}
and just mtp in miui 5 (jb)
i think this simple guide can help u
Quote:
you need :
apk tool ( & apk manager & ...) - to decompile and recompile framework-res.apk
notepad++ - to edit the xml file
root explorer - to copy file from rom to sd card​
Click to expand...
Click to collapse
================================================== ==============================
1- copy framework-res.apk to your pc from /system/framework
2- decompile it with apk tool
3- go to created framework-res.apk/res/xml/
4-open " storage_list.xml " with notepad++
5- in this line
Code:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:maxFileSize="4096" />
add this line Among its
Code:
Code:
android:allowMassStorage="true"
after edit you must have this
Code:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:allowMassStorage="true" android:maxFileSize="4096" />
screen shot
6- save edit and recompile the framework-res.apk
7- copy build.prop in pc and open it with notepad++
8-
for cm 10​
edit this line
Code:
Code:
persist.sys.usb.config=mtp
to
Code:
Code:
persist.sys.usb.config=mass_storage
for miui 5 (jb)​
edit this line
Code:
Code:
persist.sys.usb.config=mtp
to
Code:
Code:
persist.sys.usb.config=mass_storage,adb
9- save change and replace build.prop and framework-res.apk in rom
you can putt them in flashable zip and install with recovery (attached for u)
reserved....
this method worked for me
Hello guys, this method worked for me.
I have a Xperia Neo, with CM10-20131006-NIGHTLY-hallon (JB 4.1.2)
I used root explorer for copy the files from PC to Phone.
Regards,

[GUIDE][GB] Change path thickness of Pattern Lockscreen to ICS style

Guide to changing path thickness of Pattern Lockscreen to ICS style​
I wandered places searching this off. I found some traces in direction of my destiny but none of them worked fully correctly
So, as stated, I searched a lot for this mod and came face to face with failures and smali errors. So, I had to figure it out myself some modification to do in it to make it work.
Note: IT is not COMPLETELY my mod but I have done modifications in it to make it work. This is based on a guide for Froyo outside of XDA.
Pre-Requisites:
1. PC with Java JDK or JRE
2. Deodexed ROM
3. 7-Zip
4. classes.dex decompiling tool
5. Notepad++
6. Patience
7. Carefulness for editing smali files
Let's Start
1. First we would have to decompile classes.dex inside framework.jar
For that, you can use my Tool ROM Tool v2
First using 7zip, Right click on your framework.jar and open it as archive and drag and drop classes.dex in input folder of the tool
(Note: If you don't have classes.dex in framework.jar [only META-INF and preloaded-classes.dex], then your framework isn't deodexed)
Now, open Script.bat and choose 1 (Decompile classes.dex)
2. Now, we will make the changes. Go to decompiled folder and go to \classout\com\android\internal\widget and open LockPatternView.smali in Notepad++
Search for mDiameterFactor:F [Ctrl+F]​
See the code above it.
It should be like this:-
Code:
const[COLOR="Red"]/high16[/COLOR] v2, 0x3f00
If it is, then you will have to remove red part /high16
Because it will not allow the change of code we will be doing which will have a different hexadecimal value which will not be supported till this code is in effect
Now, it will look like this:-
Code:
const v2, 0x[COLOR="Red"]3f00[/COLOR]
Now, we will change the thickness value 3f00 to 3dcccccd
Final code will look like this
Code:
const v2, 0x3dcccccd
Save it
I am attaching final and before smali for comparison below.
View attachment Smali.zip
(Note: If you don't have /high16, it's good , then just just change the value and save)
3. Go to Script.bat again and choose 2 (Recompile classes.dex) and after it's done, you will get classes.dex
Drop it in framework.jar
4. Push framewotk.jar in /system/framework
Eg:
Copy it in platform-tools folder of android SDK and type following with pressing Enter after each command
Code:
adb remount
adb push framework.jar /system/framework/
adb shell chmod 644 /system/framework/framework.jar
adb shell killall system_server
Last command will Hot Reboot your phone to apply changes. It is fast and better than rebooting phone.
5. Enjoy
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"
}
Before
After
Credits​
A member from other forum to answer a question to other member of that forum
Google for letting me search somethings
Samsung Galaxy Ace s5830i members for supporting me so much
RESERVED
Very nice, made here and was show!
thank

[GUIDE] Add search engines to the stock browser (root access required)

Hello, this is my first "guide" and I'm not sure if it's placed correctly so please move it if not.
----------
Now that it's clear that google and all the other big search providers track you and hand out your data to the nsa etc, I wanted to use startpage.com as my default search engine in the android stock browser, but unfortunatly you cannot add any search engines inside the app.
---
After some research I found a method that does let you add search engines though, and I wanted to share it with all of you:
1. Get APKTool (on Windows which I used, you can just download the gui based Tool) - please search the forum for the link
2. Grab your Browser.apk from /system/app/ and the framework-res.apk from /system/framework/ and put them into the apktool directory.
3. Install the framework-res.apk and then decompile the Browser.apk (both with/inside the apktool)
4. Open the following file in the browser directory created by apktool: /res/values/arrays.xml
5. Scroll down until you find an entry like this and copy/paste it below:
Code:
<string-array name="duckduckgo">
<item>DuckDuckGo</item>
<item>duckduckgo.com</item>
<item>https://duckduckgo.com/favicon.ico</item>
<item>https://duckduckgo.com/?q={searchTerms}</item>
<item>UTF-8</item>
<item></item>
</string-array>
6. Edit the copy to whatever search engine you want to add. For example to add startpage.com:
Code:
<string-array name="startpage">
<item>Startpage</item>
<item>startpage.com</item>
<item>https://startpage.com/favicon.ico</item>
<item>https://startpage.com/do/m/mobilesearch?query={searchTerms}</item>
<item>UTF-8</item>
<item></item>
</string-array>
If you dont want the mobile site:
Code:
<string-array name="startpage">
<item>Startpage</item>
<item>startpage.com</item>
<item>https://startpage.com/favicon.ico</item>
<item>https://startpage.com/do/search?query={searchTerms}</item>
<item>UTF-8</item>
<item></item>
</string-array>
7. Now scroll down further until you find:
Code:
<string-array name="search_engines">
8. Add the search engine you just added above (make sure the name matches that name you chose) inside a "<item></item>"-Tag. Example for Startpage.com:
Code:
<item>startpage</item>
9. Recompile the Browser.apk with the apktool. (you will need the android_meta stuff from the old apk - apktool explains that)
10. Push it back onto the device inside /system/app/ and change rights/owner if necessary. (root/root with rw-r-r)
11. Reboot and now you should be able to choose the newly added search engine in the browser.
A little confused, because duckduckgo already exists without the need for me to edit anything, yet it doesn't show up as a search engine option... Yet Ask Jeeves DOES, and it shouldn't.
{
"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"
}
Your phone is country coded or smth - you prolly need to change the arrays.xml in /res/values-en-rGB ?
I'm running Cyanogenmod 10.1.2(stable) on a Nexus 4.
I didn't realise they had UK specific builds...?

[GUIDE] Adding Extra Details in About Phone in Settings.apk [NOOB-FRIENDLY]

Hi guyz,
Today I want to share something about settings.apk mod….
Its about adding small details in about phone section…
{
"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"
}
NOTE: I have not copied it... Actually I was playing with some codes and got success. I don’t know if there is any guide about this… There is guides about this, but those are hard for newbies because those are complex and there is some work in strings.xml... But in my guide there are no work of that .... I think this is the easiest way.....
So lets start…
Requirments
Apktool, Java Runtime
NotePad++, 7zip
Knowledge about decompiling, recompiling
A little respect (must)
And your Settings.apk & framework-res.apk
Step 1..
Decompile your Settings.apk
Step 2..
Go to res > xml
Open device_info_settings.xml
Now Copy This Code
Code:
<Preference android:title=" TITLE " android:summary=" SUMMARY " style="?android:preferenceInformationStyle" />
And paste it before </PreferenceScreen>
See the Image… I have added 2 lines… And You can write there anything……
Step 3..
Now Recompile your settings
Step 4..
Open decompiled Settings folder then go to build/apk, there u will find AndroidManifest.xml file…
Now open original Settings.apk using 7zip then copy the META-INF folder and AndroidManifest.xml file…
paste both the files in build/apk folder, if asked to replace, click yes..
now go to a folder in settings folder named dist, there u will find Settings.apk which u compiled.....
now delete it. We never use the first Settings.apk that we compile, because we need to add the META-INF and AndroidManifest.xml files for signing purposes.
Once you have deleted the 1st compiled Settings.apk, return to the command prompt and again compile the Settings using this code
Code:
apktool b Settings
After it is compiled go to dist folder there u will find new and fresh compiled Settings.apk which u can use it…
Step 5..
Using Root Explorer push it into system/app folder and set permissions to rw-r-r-
That's it!
Credit goes to YOU if you get success :fingers-crossed:
Nice tut sir

[Q] Attempting to build liquidsmooth, running into issues.

So I'm trying to build the lollipop branch of liquidsmooth, but I have a couple issues. Mainly trying to do
Code:
$ . build/envsetup.sh
$ breakfast bacon
this leaves me with this error
{
"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"
}
So I read the cyanogenmod guide on building it here: http://wiki.cyanogenmod.org/w/Build_for_bacon#Prepare_the_Build_Environment
and I decide to go and extract the blobs using the steps given(on today's official CM build 5.0.2). I do that, get another error
I type "croot" to go to my main directory, and do the same 2 commands at the top, and I still get the same error as before.
What do I do? I'm getting quite infuriated right now... I REALLY want this to work.
_ASSASSIN_ said:
So I'm trying to build the lollipop branch of liquidsmooth, but I have a couple issues. Mainly trying to do
...
this leaves me with this error
So I read the cyanogenmod guide on building it here: http://wiki.cyanogenmod.org/w/Build_for_bacon#Prepare_the_Build_Environment
and I decide to go and extract the blobs using the steps given(on today's official CM build 5.0.2). I do that, get another error
...
I type "croot" to go to my main directory, and do the same 2 commands at the top, and I still get the same error as before.
What do I do? I'm getting quite infuriated right now... I REALLY want this to work.
Click to expand...
Click to collapse
Hi.
On getting blob files, rather than installing CM12 ROMs and fetching blob files using cable data, I found it is easier and practical to first decompress lollipop dat files by following guide on this thread (especially post #2).
After decompressing done, I copy files in directory "output" to somewhere else (lets say to directory "/android/CM12Files/")
Edit file device/oppo/msm8974-common/extract-files.sh, commenting out two lines containing "adb pull /system/$DEST $2/$DEST" and add "cp /android/CM12Files/system/$DEST $2/$DEST" below them as follows:
Code:
# Try CM target first
[COLOR="Red"] #adb pull /system/$DEST $2/$DEST
cp /android/CM12Files/system/$DEST $2/$DEST[/COLOR]
# if file does not exist try OEM target
if [ "$?" != "0" ]; then
[COLOR="Red"] #adb pull /system/$FILE $2/$DEST
cp /android/CM12Files/system/$FILE $2/$DEST[/COLOR]
fi
Then run extract-files.sh in directory device/oneplus/bacon
BTW, I tried decompressing latest CM12 nightly ROM, and there was no vendor/lib/liblisten.so
I attached the (zipped) lib file below...been using it for compiling DU (forgot from where I got the lib file), so I think it is safe to use it...finger crossed
Hope this helps.
_ASSASSIN_ said:
So I'm trying to build the lollipop branch of liquidsmooth, but I have a couple issues. Mainly trying to do
...
this leaves me with this error
...
Click to expand...
Click to collapse
On getting repos for device, vendor, and kernel tree, could you try using codes below as content of .repo/local_manifests/local_manifest.xml ?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="kernel_oneplus_msm8974" path="kernel/oneplus/msm8974" remote="lsd" revision="lollipop" />
<project name="device_oppo_common" path="device/oppo/common" remote="lsd" revision="lollipop" />
<project name="android_device_oneplus_bacon" path="device/oneplus/bacon" remote="lsd" revision="lollipop" />
<project name="android_device_qcom_common" path="device/qcom/common" remote="cm" revision="cm-12.0" />
<project name="android_device_oppo_msm8974-common" path="device/oppo/msm8974-common" remote="lsd" revision="lollipop" />
<project name="proprietary_vendor_oneplus" path="vendor/oneplus" remote="tm" revision="cm-12.0" />
<project name="proprietary_vendor_oppo" path="vendor/oppo" remote="tm" revision="cm-12.0" />
<project name="android_frameworks_opt_connectivity" path="frameworks/opt/connectivity" remote="cm" revision="cm-11.0" />
</manifest>

Categories

Resources