Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,588 Members 46,975 Now Online
XDA Developers Android and Mobile Development Forum

How to customize sview cover display by VonerK

Tip us?
 
vonerk
Old
(Last edited by vonerk; 18th February 2014 at 01:27 PM.)
#1  
vonerk's Avatar
Member - OP
Thanks Meter 37
Posts: 68
Join Date: Nov 2011
Location: Philadelphia
Default How to customize sview cover display by VonerK

How to set custom Sview Background Image
Or change Time Out for Sview Display of Note 3_ 4.3 Deodexed Roms and Odexed Stock Roms



DISCLAIMER!: I DID NOT FORCE YOU TO TRY THIS! IF YOU BORK UP YOUR PHONE, IT'S NOT MY FAULT!
For Kit Kat see post #14 By:hilmi94zul

Things you will need:


Safestrap Recovery
Favorite "DEODEXED" Rom.
7zip

For Odexed Stock Rom you will need Root file system explorer/editor (I used Root Explorer PRO, because I think it's awesome.) and these files under "NoModdedTimeOut" like the name says there is not a modded time out but you can get custom SView Background with Stock Rom HERE Please Create your own custom "mainbg_pattern_mainarea.png" from step 1 then proceed to step 7 for Stock 4.3 .

Notepad++
Android Multitool
Anything you need to get Android Multitool working on your computer.

Step 1.
Getting the files you need:

First off get a custom background image you want in .png format 1002x954 pixels.

Rename it "mainbg_pattern_mainarea.png"

If you are trying this for STOCK ODEXED 4.3 ROM go to Step 7 otherwise continue on.

Put your custom "mainbg_pattern_mainarea.png" in AndroidMultitool folder.

Put Favorite "DEODEXED" Rom.zip in AndroidMultitool folder.

Open Favorite "DEODEXED" Rom with 7zip. Right click-->7-Zip-->Open Archive. DO NOT EXTRACT!

7zip window will open and you will see the folders inside the ROM.

Double Click "system" folder.

Double Click "framework" folder.

Double Click "framework-res.apk"

Open " res --> drawable-sw360dp-xxhpdi" folder

Find "mainbg_pattern_mainarea.png" and rename it "mainbg_pattern_mainareaX.png"

Drag your custom "mainbg_pattern_mainarea.png" in to 7zip window

Click Folder with green arrow beside directory path 3 times so you are back in AndroidMultitool\ ROM \system\framework

Right Click "android.policy.jar"-->Copy to-->OK

Right Click "framework-res.apk"-->Copy to-->OK

Right Click "twframework-res.apk"-->Copy to-->OK

Close the 7zip Window
Step 2.
Decompile the files:

Copy the "android.policy.jar, framework-res.apk, and twframework-res.apk" files from step 1 to the "Files" folder inside "AndroidMultitool" folder.

Run Android Multitool.

Install framework-res and twframework-res .apk Click box with 3 dots, pick file, then click install. (I don't know if this step is needed but I always do it just in case.)

Decompile android.policy.jar .Click on selector box under "Decompiling" make sure it is set to "jar". Click box with 3 dots, pick file, then click decompile.

I leave "use baksmali" unchecked for above steps.
Step 3.
Edit Files:


Open "Decompiled_jar" folder inside "AndroidMultitool" folder.

Open "android.policy --> com --> android --> internal --> policy --> impl --> sviewcover

Open "SViewCoverManager.smali" with Notepad++

I have found a couple things here.

S_VIEW_COVER_DISPLAY_TIMEOUT_DEFAULT:I=0x1770
0x1770 hex = 6000 decimal, I think this is milliseconds.
The s view display is on for about 6 seconds.
So if you want the screen on for 30 seconds that's 30000 milliseconds and hex for 30000 is 0x7530
1 minute would be 60000 or 0xea60
Click on binoculars in toolbar and find next "alpha" you will see the lines

const/16 v1, 0x1a

invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageAlpha(I)V

The Hex value in "const/16 v1,0x1a" is 0x1a which is 26 which is roughly 10%
Tranparent =0 = hex 0x00
Opaque=255 = hex 0xff
So change line
const/16 v1, 0x1a
to
const/16 v1, 0xff

Do find next "alpha" 4 times. Two values are 0x1a and two are 0x10 I changed all 4 to 0xff

Save file

Close Notepad++

Step 4.
Compile files:

Get back to AndroidMultitool

Under Compiling

Compile "android.policy.jar" .Click on selector box under "Compiling" make sure it is set to "jar". Click box with 3

dots, pick file(AndroidMultitool --> Decompiled_jar --> android.policy click "OK"), then click "compile".

Close android multitool program

Open "AndroidMultitool\Files"

Right click "android.policy.jar" --> 7-Zip --> Open archive

Select "META-INF" Right click --> Copy to --> AndroidMultitool\Compiled_jar\android.policy .Click "OK"

Open "AndroidMultitool\Compiled_jar\android.policy"

Select "META-INF" and "classes.dex" Right click --> 7-Zip --> Add to "android.policy.zip"

Rename "android.policy.zip" to "android.policy.jar"

Copy "android.policy.jar" to "AndroidMultitool" folder
Step 5.
Putting Modded Files Back into Rom:


Open Favorite "DEODEXED" Rom with 7zip. Right click-->7-Zip-->Open Archive. DO NOT EXTRACT!

7zip window will open and you will see the folders inside the ROM.

Double Click "system" folder.

Double Click "framework" folder.

Drag "android.policy.jar" into 7zip window.

Close 7zip
Step 6.
Install:
Now install your new rom with Safe Strap!

For some reason it took a couple minutes for my Phone to boot up. But afterwards no problems!

IF YOU DIDN'T START OUT ON STEP 7 YOU ARE DONE! DON'T WORRY ABOUT STEP 7!


Step 7.
Stock Rom Downloaded files:
Open Downloaded framework-res.apk with 7zip DO NOT EXTRACT!
Open framework-res\res\drawable-sw360dp-xxhdpi
Copy your custom background image from Step 1 here.
Close 7zip window.
Copy/Paste your modded "framework-res.apk" and downloaded "android.policy.odex" to system/framework with your root explorer/editor. When you do this you will get an automatic reboot. android.policy.odex should have rw-r--r-- permission. If you have problems try fixing permissions in Safe Strap


Thanks:
tcitchicruise for letting us know where the background image was.
Flextrick for making Android Multitool!
Hashcode for Safestrap Recovery!
hilmi94zul for Kit Kat Method

The Following 11 Users Say Thank You to vonerk For This Useful Post: [ Click to Expand ]
 
tchitchicruise
Old
#2  
tchitchicruise's Avatar
Senior Member
Thanks Meter 358
Posts: 551
Join Date: Mar 2008
Location: France
Yeeees! Excellent JOB Bro !!

THX very much for that !
IF you like my work, if I helped you, or if you find my post useful, please, click THANKS

http://www.forum-generationmobiles.net/
Have a look at http://gearfaces.com/ there my creations, and many other, watches created for watch styler

GALAXY NOTE 3 N9005 XEF ,rooted, knox 0x1 ROM---> All ... lol
GALAXY GEAR V700 XEF ,rooted, ROM---> Null ... lol

2-HTC HD7 32Go (sandisk class2)
-OS: 7.10.7740.10 Mango Official unlocked

 
hilmi94zul
Old
(Last edited by hilmi94zul; 16th February 2014 at 10:29 AM.)
#3  
Member
Thanks Meter 32
Posts: 52
Join Date: Mar 2013
just one question, is it possible to edit in stock rom? @vonerk

---------- Post added at 06:48 PM ---------- Previous post was at 06:23 PM ----------

why my image name like this --> global_action_view_mainbg_pattern_mainarea.png ?? im on kitkat
 
salahfathi
Old
#4  
Member
Thanks Meter 6
Posts: 96
Join Date: Mar 2011
Can we do a flashable zip

Sent from my SM-N9005 using XDA Premium 4 mobile app
 
SimonGleinert
Old
#5  
Senior Member
Thanks Meter 55
Posts: 184
Join Date: Apr 2013
Location: Neuss
Yeees! Best Men ever
 
tchitchicruise
Old
(Last edited by tchitchicruise; 16th February 2014 at 12:37 PM.)
#6  
tchitchicruise's Avatar
Senior Member
Thanks Meter 358
Posts: 551
Join Date: Mar 2008
Location: France
vonerk

I think that tuto is for ROM 4.3 !
in 4.4.2 KK values are différents !

I have decompiled ROM N3_Echoe_v8_08FEB. (framework-res.apk twframework-res and android.policy.jar)


I can't found "alpha"
SVIEW_COVER_DISPLAY_TIMEOUT_DEFAULT:I = 0x1f40 (8 seconds) is different too

and i have default:
const/4 v2, 0x0
const/4 v1, 0x1
const/4 v8, -0x1
const/4 v7, 0x1
const/4 v6, 0x0
const/16 v5, 0x832
const/16 v5, 0xc00
const/4 v5, 0x2
const/high16 v5, 0x48
const/4 v0, 0x0
const/4 v0, 0x0
const/4 v0, 0x1
const/4 v1, 0x0
const/4 v1, 0x2

I think that perhaps , the method for KK is différent no ?
IF you like my work, if I helped you, or if you find my post useful, please, click THANKS

http://www.forum-generationmobiles.net/
Have a look at http://gearfaces.com/ there my creations, and many other, watches created for watch styler

GALAXY NOTE 3 N9005 XEF ,rooted, knox 0x1 ROM---> All ... lol
GALAXY GEAR V700 XEF ,rooted, ROM---> Null ... lol

2-HTC HD7 32Go (sandisk class2)
-OS: 7.10.7740.10 Mango Official unlocked

 
hilmi94zul
Old
#7  
Member
Thanks Meter 32
Posts: 52
Join Date: Mar 2013
@tchitchicruise image name also different..

Sent from my SM-N9005 using XDA Premium 4 mobile app
 
vonerk
Old
#8  
vonerk's Avatar
Member - OP
Thanks Meter 37
Posts: 68
Join Date: Nov 2011
Location: Philadelphia
Yes I am on 4.3 sorry KitKats! I haven't had a chance to dig through that code yet.

Sent from my SAMSUNG-SM-N900A using xda app-developers app
The Following User Says Thank You to vonerk For This Useful Post: [ Click to Expand ]
 
vonerk
Old
(Last edited by vonerk; 16th February 2014 at 10:37 PM.)
#9  
vonerk's Avatar
Member - OP
Thanks Meter 37
Posts: 68
Join Date: Nov 2011
Location: Philadelphia
About the stock rom or odexed Roms...

I'm trying to, but odexed files are different. If I could actually figure out how to "re-odex" a file it would be a piece of cake. I have followed many threads on odexing and it's making my head spin!

Sent from my SAMSUNG-SM-N900A using xda app-developers app
 
tchitchicruise
Old
#10  
tchitchicruise's Avatar
Senior Member
Thanks Meter 358
Posts: 551
Join Date: Mar 2008
Location: France
Strange because echorom v8 and v9 4.4.2 are deodexed no?
IF you like my work, if I helped you, or if you find my post useful, please, click THANKS

http://www.forum-generationmobiles.net/
Have a look at http://gearfaces.com/ there my creations, and many other, watches created for watch styler

GALAXY NOTE 3 N9005 XEF ,rooted, knox 0x1 ROM---> All ... lol
GALAXY GEAR V700 XEF ,rooted, ROM---> Null ... lol

2-HTC HD7 32Go (sandisk class2)
-OS: 7.10.7740.10 Mango Official unlocked


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes