yashsingh1/xdaforums huggingface dataset:
[Galaxy Note GT-N7000 Android Development] badge2033:
hi majdi

thanks for your great work

i'm working on my own deodexed xxlt4 rom

and i try to make the launcher icon number mod as i though it's the easiest one to begin with

the mod compiles ok

but when i flash it to my device he doesn't find the launcher and hangs at startup?

i think i followed all the steps thouroughly

what am i doing wrong?

thanks
[Galaxy Note GT-N7000 Android Development] Goldie:
You broke the xml so you have a mismatched tag. You need to look again how you removed as you either removed too much or not enough
[Galaxy Note GT-N7000 Android Development] Kamy:
Great! Thanks~ Tied again and succeeded. :good:

How about those strings left over in values folder? Won't cause any issue later?
[Galaxy Note GT-N7000 Android Development] panda00:
If I want to resize the ink preview in settings' drawables... From xhdpi (680x396) how much would the resolution be?
[Galaxy Note GT-N7000 Android Development] Saife El:
you are the best thank you very much
[Galaxy Note GT-N7000 Android Development] majdinj:
You can't remove resources, either image or string from modified apk as well as ids...

leaving them will not harm if you didn't point to them in any xml file..

Use android image resizer it will give you all sizes:

http://code.google.com/p/9patch-resizer/
[Galaxy Note GT-N7000 Android Development] burtcom:
Unbranded LT5 4-way reboot

I prefer not to have the name of the ROM in my 4-way reboot menu, and it seems everyone wants to do this these days :)

Attached is an android.policy.jar for XXLT5 that does not have a ROM name in the 4-way reboot menu, it just says "Choose..."

It goes in /system/framework
[Galaxy Note GT-N7000 Android Development] anoopva:
Thanks alot bro

it work fine in Pristine XXLT5 ROM
[Galaxy Note GT-N7000 Android Development] panda00:
Okay so long story short, I was try to port ink effect to my S2P.

When I recompiled secsettings, and decompiled it again, public.xml didn't show ink_none, started from red directly... and the order of things in the smali file were the same as the order in public.xml. Is that supposed to mean I did something wrong?
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Great and very Colossal job you did with these tutorials, it helped me a lot to mod my rom.

Thanks to you.

May I ask you the authorization to translate it in French to another Forum (All credits will go to you naturally ^^)?
[Galaxy Note GT-N7000 Android Development] majdinj:
yeah sure.. go a head man
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Thanks a lot man ^^.
[Galaxy Note GT-N7000 Android Development] klurosu:
Ink Effect works fine for me
[Galaxy Note GT-N7000 Android Development] hara74:
request

hi majdinj and all others,

I would really like to know how to add the torch by pressing the Homebutton at Lockscreen,

like in Eybee´s XXLSZ or Rocket Rom Reloaded, I guess

Torch on Lockscreen (thx @ Robbie Hood)

that´s a very nice feature :good:

thanks for all answers in advance

greetings

hara
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Hello, I have a question, I try to use your guide to add ink effect to my custom rom (xxlt5) and when I flash a patch, I always have bootloops, I follow your guide but I can't fix the problem, have you ever had this bootloops problem with the ink effect?

May someone help me with this problem? I could send the modified files if somenone wants to help me ^^.
[Galaxy Note GT-N7000 Android Development] Goldie:
You need to use logcat. It could be anything
[Galaxy Note GT-N7000 Android Development] ezaechiel:
How could I use logcat on my note when I boot after flashing? (Sorry but I'm a newbie, I have a lot to learn ^^)
[Galaxy Note GT-N7000 Android Development] Goldie:
http://xdaforums.com/showthread.php?t=2141817
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Thanks a lot I'll go read that ;)
[Galaxy Note GT-N7000 Android Development] badge2033:
hi majdi

thx alot for you guides

i don't know what i am doin wrong

all the mods that involve resources are wworking fine (xml and images)

the mods that deal with smali all result in bootloop.

is there some signing that i'm not doing or something else?

maybe i should wipe dalvik cache if the smali code changed?
[Galaxy Note GT-N7000 Android Development] Goldie:
See reply to previous guys question... ;)
[Galaxy Note GT-N7000 Android Development] hara74:
no one knows :confused:

sent from my G-Note
[Galaxy Note GT-N7000 Android Development] ezaechiel:
After 6 tries I finally succeed in implementation of the ink effect, thanks majdinj for the guide and Goldieking for the advice (logcat ;)).
[Galaxy Note GT-N7000 Android Development] hara74:
Torch at Lockscreen

I get it to work, with help from kmokhtar79 :laugh:

I used the android.policity.jar and torch.apk from Rocket Rom Reload and copied over

android.policity.jar to system/framework and set the right permission

and torch.apk to system/app also set right permission (but maybe install it again the normal way, I had to)

reboot

and tada, Torch on Lockscreen :good:

p.s. I don´t know if the android.policity.jar has negative effects on my Energy Bean Rom, because it´s smaller as the original one,

but so far no problems here on my side ;)

I will report if something strange will happen

so long

hara

Edit: first thing what changed is that 'kill apk' by holding menu button is gone on Energy Bean :(
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Normal android.policy.jar was modified to add kill apk ^_^

I'll analyzed rocket rom today especially android.policy.jar to find what modify to add lockscreen torch, wish me good luck ^_^
[Galaxy Note GT-N7000 Android Development] hara74:
:thumbup:

sent from my G-Note
[Galaxy Note GT-N7000 Android Development] ezaechiel:
I find files you have to change : PhoneWindowManager.smali, KeyguardViewMediator.smali, KeyguardViewMediator$4.smali in android.policy.jar

So to avoid any problem with the compatibility I recommend you to make a diff between your files and the files from rocket rom and apply modification (beware there is some change in constant et condition) so because I haven't time enough I copied this 3 files and KeyguardViewMediator$1.smali, KeyguardViewMediator$2.smali, KeyguardViewMediator$3.smali and KeyguardViewMediator$5.smali in my backsmali folder of android.policy.jar (7 files to replace, beware you haven't modified these files for another mod) and smali it, replace the classes.dex in android.policy.jar by the new one then create a flash zip with this file and the apk : torch.apk (from the rocket rom /system/app/ folder) in a folder /system/app/

If you want an example of the zip files you could see mine ^^ here (beware don't apply to your rom, it contains all my modifications for xxlt5 it's just an example of the final zip flashable mod).
[Galaxy Note GT-N7000 Android Development] Droidlover123:
Pls tell me if it will work on other Samsung devices???

I have galaxy tab 2:rolleyes:
[Galaxy Note GT-N7000 Android Development] ezaechiel:
No you have to port it for other devices, it's not compatible between galaxy SIII and Note (files are different) so I think it's different between tab and note :s
[Galaxy Note GT-N7000 Android Development] hara74:
first I wanna thank u for ur guide,

but unfortunately it´s the same,

I replaced the seven files from Rocket to Energy and the torch is working,

but the menu button now starts the search function not kill apk anymore :crying:

but it´s not so important, maybe Eybee or Robbie will post a how to in future,

or even you find the time to make it :fingers-crossed:

so thanks again
[Galaxy Note GT-N7000 Android Development] ezaechiel:
You're welcome ^^.

Maybe Energy has touch the same files ;) so It'll be in conflict.

I hope, I asked Robbie but unfortunately he has'nt time to do it :s. The only guide I found is for Galaxy SIII but no time to port it to note for the moment :s
[Galaxy Note GT-N7000 Android Development] hara74:
tonight after work I'll try a little bit around,

maybe I find out ;)

I'll report here if I get it to work

sent from my G-Note
[Galaxy Note GT-N7000 Android Development] majdinj:
I see you guys overwhelming with torch home button,,, this mod has a lot to change in smali files:

1. smali/com/android/internal/policy/impl/KeyguardViewMediator$4.smali

2. smali/com/android/internal/policy/impl/KeyguardViewMediator.smali

3. smali/com/android/internal/policy/impl/PhoneWindowManager.smali

I have some troubles with my research project (oh dear!!!); I will try to post here as soon as possible but in the meanwhile we could all of us look at these changes by comparing these files with stock LSZ android.policy.jar; personally I use notepad++ with compare plugin, you have to pay attention to each cond code and so you could link them with each other using same cond!!!

GOOD LUCK
[Galaxy Note GT-N7000 Android Development] ezaechiel:
That's what I do and it's very very very tricky lol.
[Galaxy Note GT-N7000 Android Development] hara74:
sorry guys that´s to high for me little themer (copy and past) :crying:

this is work for the pro´s around here ;)

have to wait for a clear and exact "how to" :fingers-crossed:
[Galaxy Note GT-N7000 Android Development] maskerwsk:
The menu to kill mod is in phonewindowmanager.smali so if you replaced yours with the one from rocket it will have gone

Edit - ive attached the 2 files with lockscreen torch and long press menu to kill app added from my rom.

just download file, extract it and copy both files into androidpolicy and recompile :)
[Galaxy Note GT-N7000 Android Development] hara74:
Thanks m8,

Will try later ;)

sent from my G-Note
[Galaxy Note GT-N7000 Android Development] hara74:
@ maskerwsk

I did what u said, copied over the two files into the android.policy.jar and recompiled it,

put it into Note and

Kill App is working again :good:

but now the Torch at Lockscreen is gone :crying:

maybe u use a different Torch.apk :confused:

or it´s something else with the Energy Bean jar

but thanks anyway
[Galaxy Note GT-N7000 Android Development] maskerwsk:
Did you use the other files from rocket rom? U need to do what is outlined in the tutorial above (copy over the 7 files). But then copy in the 2 files i provided
[Galaxy Note GT-N7000 Android Development] hara74:
no I didn´t, tried only ur two files :(

but now I copied all 7 files what´s recommended and also ur two files into my Energy Bean android.policy.jar, recompiled,

copied over to my note, set permissions and owner and rebooted

and

tada, all is working, on lockscreen the torch by pressing the Homebutton

and also Kill App by pressing the Menubutton

so all is fine now

a big thanks to all who helped me to sort it out :good: :D :laugh:
[Galaxy Note GT-N7000 Android Development] maskerwsk:
Glad u got it in end bud ;)
[Galaxy Note GT-N7000 Android Development] hara74:
yup :laugh: (but not without your, ezaechiel, kmokhtar79 and majdinj help)

maybe majdinj could post the 7-9 files for other users who like to have both,

Torch on Lockscreen and Kill App (I love both :p)

till we get a exact "how to" :fingers-crossed:

but that´s only a suggestion ;)
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Yes but a very good suggestion :p
[Galaxy Note GT-N7000 Android Development] majdinj:
Yep it is a good suggestion for GT-N7000 users of JB 4.1.2, it will be tacking in mind if I couldn't succeed finding the way how :p

Cheers

Edit 1:

I am working on it (LockScreen Torch mod) right now and I will give you the results after I finish.. stay tune
[Galaxy Note GT-N7000 Android Development] majdinj:
Succeed to have [How To] LockScreen Torch mod... :good:

Writing tutorial now :cool: hopefully you can see it tonight ;)
[Galaxy Note GT-N7000 Android Development] hara74:
great news m8

thanks a lot for ur work :thumbup:

sent from my G-Note
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Great, you're a boss ^_^
[Galaxy Note GT-N7000 Android Development] majdinj:
LockScreen Torch

Added to post # 74 here:

http://xdaforums.com/showpost.php?p=35727915&postcount=74

There will be a separated thread as well in app/theme section for those who search xda for this mod.. :fingers-crossed:

Stay safe

Cheers
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Wow, nice tuto and fast writing ^^. You're the best.

I have a question, is there a tutorial guide for kill apps button ? Is it planned or not at all?

I know I ask too much but since I followed your guide, my custom is more efficient thanks to you ;)
[Galaxy Note GT-N7000 Android Development] majdinj:
I didn't try that before... Mirko_ddd wrote about it before!!!

Is it the one using back captive button??
[Galaxy Note GT-N7000 Android Development] ezaechiel:
The one with menu button ^_^, those we talked some posts before with PhoneWindowManager.smali and PhoneWindowManager$KillConcept.smali

The long press to kill apps :D

Forget about my request I'll make a diff between original and modified files :D
[Galaxy Note GT-N7000 Android Development] hara74:
I guess he meant by long pressing the menu button like in Energy Bean Rom

edit: I'm writing definitely to slow ;)

sent from my G-Note
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Exactly, that's what I meant.
[Galaxy Note GT-N7000 Android Development] majdinj:
OK if you have modified smali for that mod only (we need it pure), we could compare it with stock one and then we could know how to do the menu button to kill mod!!!
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Unfortunately I have torchlight too on PhoneWindowManager.smali but I have version without menu to kill app and with menu to kill app, both with torch so I can do a diff between these files.
[Galaxy Note GT-N7000 Android Development] majdinj:
No problem.. I will try my best to port it and have tutorial for it... but could you provide me who is the mod inspire, so I can give him credits in the tutorial later on!!
[Galaxy Note GT-N7000 Android Development] hara74:
maskerwsk's http://xdaforums.com/showthread.php?p=41626735

this is the first thread, I guess

but it was in Energy Bean Rom too

so I don't know who was first :o

sent from my G-Note
[Galaxy Note GT-N7000 Android Development] maskerwsk:
Hi guys.

Here is the tutorial i followed for long press to kill apps.

http://xdaforums.com/showthread.php?p=33591204

That tut is for long press BACK button.

However to make it for MENU button you just use the first part of tut and change the phonewindowmanager$9 to the kill smali instead of the phonewindowmanager$10

My files are uploaded a few pages back if anyone wanted to look at the file if it would help :)
[Galaxy Note GT-N7000 Android Development] majdinj:
OK.. thank you..

yup I have seen the diff smali code..

Edit1:

Now it is done... I will write the tutorial.. stay tune

Credits to maskerwsk

Edit2:

Long press menu button to kill app

See post # 74:

http://xdaforums.com/showpost.php?p=35727915&postcount=74
[Galaxy Note GT-N7000 Android Development] hara74:
yeah m8,

you're really the best :thumbup:

sent from my G-Note
[Galaxy Note GT-N7000 Android Development] ezaechiel:
You're just amazingly quick ^_^
[Galaxy Note GT-N7000 Android Development] hednik:
Used about 7of these mods on the US galaxy S3 with little or no changes needed to get it to work.

Thanks for these.

Got a question do you know how to mod the TW clear all button to be like the aosp one, in the top right hand corner ?
[Galaxy Note GT-N7000 Android Development] yanuricasper:
Thanks ... good tutor

GT-N7100
[Galaxy Note GT-N7000 Android Development] joosh3:
[MENTION=369057]majdinj[/MENTION]

Hey majdinj, I noticed a missing part on CRT Off Effect.

As you know peoples reported that there's a glitch turning off the screen while CRT Off is enabled, turning again on the screen, and that's really annoying.

So here you go the workaround I used on my Ultimate N7000 ROM, to add on android.policy.jar

Let's start.

Baksmali android.policy.jar

Then just follow this path:

\class\com\android\internal\policy\impl\PhoneWindowManager.smali

Open PhoneWindowManager.smali with Notepad++ and add the following lines:

At beginning of .smali file add the colored text:

.class public Lcom/android/internal/policy/impl/PhoneWindowManager;
.super Ljava/lang/Object;
.source "PhoneWindowManager.java"

# interfaces
.implements Landroid/view/WindowManagerPolicy;
[COLOR="DarkRed"][B].implements Ljava/lang/Runnable;[/B][/COLOR]

After that check this part:

.line 6683
.end local v12 #isAllowed:Z
.end local v21 #kioskMode:Landroid/app/enterprise/kioskmode/KioskMode;
:cond_68
:goto_68

and before

return v25

add the following colored lines:

.line 6683
.end local v12 #isAllowed:Z
.end local v21 #kioskMode:Landroid/app/enterprise/kioskmode/KioskMode;
:cond_68
:goto_68
[COLOR="DarkRed"][B]and-int/lit8 v0, v25, 0x4

if-eqz v0, :cond_71

and-int/lit8 v25, v25, -0x5

move-object/from16 v0, p0

invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sleepDelay()V

:cond_71[/B][/COLOR]
return v25

At the end of PhoneWindowsManager.smali just add these last lines:

[COLOR="DarkRed"][B].method public sleepDelay()V
.locals 10

iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;

const-wide v2, 0x64

check-cast p0, Ljava/lang/Runnable;

invoke-virtual {v0, p0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

return-void
.end method

.method public run()V
.locals 10

.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;

const-string v1, "power"

invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v0

check-cast v0, Landroid/os/PowerManager;

invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

move-result-wide v2

const-wide/16 v6, 0x3e8

add-long/2addr v2, v6

invoke-virtual {v0, v2, v3}, Landroid/os/PowerManager;->goToSleep(J)V

return-void
.end method[/B][/COLOR]

Smali and it's finished.
[Galaxy Note GT-N7000 Android Development] majdinj:
Thanks a lot Joosh.. will link your post from OP :good:

Update:

I have found a short way to adjust timeout for long press menu button to kill app,,, I will update that post short after I come home.
[Galaxy Note GT-N7000 Android Development] joosh3:
Nice :D
[Galaxy Note GT-N7000 Android Development] Kamy:
Anybody has seen this mod (V3):

http://xdaforums.com/showthread.php?t=2233204

It really nice, tried it once but no idea about framework part (how to add new modified values in public.xml)

Actually to have this mod, firstly we need implement codes from this mod (V2):

http://xdaforums.com/showthread.php?t=2233204

Hope somebody can mod or help me in.
[Galaxy Note GT-N7000 Android Development] majdinj:
I will look at it later on,,,

Update:

Added extra step to change timeout delay in Long press to kill app in post #74
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Hello majdinj, I apply almost all your mods on my new custom and I just want to tell you a real big thanks :D, my custom is like a Swiss clock ^_^

And thanks to joosh3 for the correction of CRT Off effect. :D

It would be great if the mod proposed by kmokhtar79 could be described (if it's possible) , I looked at it and have some problem to find ids without original files.
[Galaxy Note GT-N7000 Android Development] majdinj:
So glad to hear that,,, I hope you all the best
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Thanks a lot :D
[Galaxy Note GT-N7000 Android Development] Mr0lala:
Hi majdinj,

First, I want to say thank you for great guide :good:, I try to port for my phone Galaxy S2HD it work almost :victory:

Now i try to follow your guide: LockScreen Torch but in step mod PhoneWindowManager.smali i can't find exact line to mod :(, because I have many line same same like your guide =.=! and it make my phone bootloop all times :(. Can you check my PhoneWindowManager.smali or add more line?. It's will be easier for me to find exact line to mod this :cool:
[Galaxy Note GT-N7000 Android Development] majdinj:
As you know, each ROM has its specific values; although the concept is the same, you will need to have sometimes several trials of failure then succeed..!!!

Anyhow, you seems to be stuck in const and cond values (I know it is tough mod), but here is your file after modification in the attachment..

N.B: I have deleted one line in your smali because I think it might interrupt with code, but if got bootloop, just return it back..

Here is where you should put the line that I deleted:

.line 3356
invoke-interface/range {v38 .. v38}, Lcom/android/internal/statusbar/IStatusBarService;->cancelPreloadRecentApps()V
:try_end_38c
.catch Landroid/os/RemoteException; {:try_start_383 .. :try_end_38c} :catch_3e6

.line 3364
.end local v38 #statusbar:Lcom/android/internal/statusbar/IStatusBarService;
:cond_38c
:goto_38c
const/16 v46, 0x0

move/from16 v0, v46

move-object/from16 v1, p0

iput-boolean v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z

invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchHomeFromHotKey()V

[B][COLOR="Blue"]invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->goHome()Z[/COLOR][/B]

.line 3365

Make sure that you edited the other smali in a correct way..!!!
[Galaxy Note GT-N7000 Android Development] Mr0lala:
Thanks for your help but unfortunately my phone still bootloop :crying::crying: even I add the blue code or not :(
[Galaxy Note GT-N7000 Android Development] majdinj:
Are the other 2 smali edited correctly?

Use logcat to locate problem
[Galaxy Note GT-N7000 Android Development] Mr0lala:
Sure, I think I edited KeyguardViewMediator$4.smali and KeyguardViewMediator.smali. Here is my android.policy.jar I edited, can you check it?

Logcat will be not work if phone bootloop , is this true? Because when I use logcat it say waitting for devices...., Logcat only work when phone go to main menu, right? (sorry my bad English :( )
[Galaxy Note GT-N7000 Android Development] ezaechiel:
I have a question, does we have to set compression level to 0 for framework-res.apk in the screenshot guide?
[Galaxy Note GT-N7000 Android Development] Kamy:
Noob question:How to link ids to public.xml?
[Galaxy Note GT-N7000 Android Development] Goldie:
Look up the id for permlab_forceback in public then change the 0x10xxxxx id in the smali so the last five digits match the id you found
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Just have to deompile framework-res.apk and find id for permlab_forceback and change the one in PhoneWindowManager$KillConcept.smali by the one you found in public.xml ^^.

EDIT :

Oups too late, you already answered ^^.
[Galaxy Note GT-N7000 Android Development] hara74:
I didn´t as I implemented in xxlt4 Pristine

nothing changed at the compression

hope it helps
[Galaxy Note GT-N7000 Android Development] ezaechiel:
In fact when I flash the mods separately it works great without changing compression, but it doesn't work when I put the file directly in the install zip of the rom ^^. I'll test it tonight with a compression of 0 to see it something change ;).

Thanks for your answer.
[Galaxy Note GT-N7000 Android Development] danivancouver:
Thanks for everything, I'm learning a lot

Enviado desde mi GT-N7000 usando Tapatalk 2
[Galaxy Note GT-N7000 Android Development] majdinj:
for some reason, APK-Multi tool manager will ruin framework-res.apk signature (even if you compile as system to preserve signature!!!:confused:)

what I do usually, I just open the original framework-res.apk and extract assets, META-INF, and AndroidManifest.xml, then I open the new modded framework-res.apk and just darg and drop those file and folders inside it and that's all...

By doing this method, you will not worry about compression level even if it is set to 9 :)
[Galaxy Note GT-N7000 Android Development] ezaechiel:
Ok thanks because after ten tries, I always have this problem. So I'll try your method, Hope it solve my problem ^^. Will let you know if I succeed.

EDIT : It works great, you're my hero :D
[Galaxy Note GT-N7000 Android Development] grilleld:
hi [MENTION=369057]majdinj[/MENTION]

Awesome guide..i have a question do you know how to make Long press volume button to skip song