For ROM developers, themers and advanced users!
This guide is a reference for the smali code changed that must be made inside of services.jar to hide certain status bar icons. This reference assumes that you already know how to recompile a framework file using smali/baksmali.
Warning: As always, you assume all responsibility for any changes that you make to your phone. Always backup your phone before making any changes.
All code is within services.jar under com/android/server/status
Location
HtcCdmaStatusBar.smali
LINES: 679 & 724
VISIBLE (Default)
Line 679
Code:
invoke-virtual {v0, v1, v4}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Line 724
Code:
invoke-virtual {v0, v1, v4}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
HIDDEN
Changes: v4 to v6
Line 679
Code:
invoke-virtual {v0, v1, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Line 724
Code:
invoke-virtual {v0, v1, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Clock
StatusBarPolicy.smali
LINE: 656
VISIBLE (Default)
Code:
.line 574
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V
HIDDEN
Changes: Add line underneath line 656
Code:
.line 574
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Battery
StatusBarPolicy.smali
LINE: 696
VISIBLE (Default)
Code:
iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryIcon:Landroid/os/IBinder;
HIDDEN
Changes: Add line underneath line 696
Code:
iput-object v3, p0, Lcom/android/server/status/StatusBarPolicy;->mBatteryIcon:Landroid/os/IBinder;
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Alarm
StatusBarPolicy.smali
LINE: 3440
VISIBLE (Default)
Code:
.line 944
const-string v1, "alarmSet"
const/4 v2, 0x0
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
HIDDEN
Thanks to rmk40 for collaboration and testing.
This one is a little tricky. Follow the steps below:
Step 1: Delete lines 3446 through 3449 (shown below).
Code:
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
Step 2: Add line below line 3442 (shown below).
Code:
.line 944
const/4 v0, 0x0
const-string v1, "alarmSet"
const/4 v2, 0x0
is this just for Sense or can I do this with an AOSP ROM too?
nothing to see here...
TylerD004 said:
is this just for Sense or can I do this with an AOSP ROM too?
Click to expand...
Click to collapse
All of these except the location should work for AOSP, but the line numbers might be different.
Most AOSP ROMs like CM6 have built in utilities to do this for you however.
Noob question !
How do i edit the services.jar file ?
Can you put the finished product for removing the Alarm clock so I can match it with what I have? Our line counts differ.
Thanks.
EDIT: What does line 3442 say? I'm counting the lines and pretending they are 344x lines and pasting there but it doesn't seem to be working. Thanks for the help.
EDIT#2 Okay, I figured it out by downloading someone elses work and matching mine with theirs. Thanks for the references, this **** makes my phone looks so sexy! On to my next task!
drgopoos said:
Noob question !
How do i edit the services.jar file ?
Click to expand...
Click to collapse
Decompile it using apktool.
i am trying to modify Lou's Redemptive rEVOloution rom to have a no battery. I have been on it for 2 days. I am a noob on this part of it but very whiling to learn. He told me to pull the services.jar file and modify it. I have pulled the file.... i read on here to decompile it with apktool.... well i have apktool, but need a push start from here. The rom thread has been no help. Any help or direction would be great, thank you.
kmcrane said:
i am trying to modify Lou's Redemptive rEVOloution rom to have a no battery. I have been on it for 2 days. I am a noob on this part of it but very whiling to learn. He told me to pull the services.jar file and modify it. I have pulled the file.... i read on here to decompile it with apktool.... well i have apktool, but need a push start from here. The rom thread has been no help. Any help or direction would be great, thank you.
Click to expand...
Click to collapse
Assuming your using windows:
Extract the two apktool .tar files to your /windows root directory. Make a directory for the services.jar file and copy it in. Open a command prompt and change to that directory you just created. Command line to decompile is apktool d services.jar
Thats as far as i can get you.. I just started learning last night. hope that helps.
normg said:
Assuming your using windows:
Extract the two apktool .tar files to your /windows root directory. Make a directory for the services.jar file and copy it in. Open a command prompt and change to that directory you just created. Command line to decompile is apktool d services.jar
Thats as far as i can get you.. I just started learning last night. hope that helps.
Click to expand...
Click to collapse
Yes!! Sorry, I am using windows...
thanks for your help and this thread. I have made my changes, now i need to "recompile" (sorry if it is the wrong term). but i need to make the services.jar.out into a file so i can put it into my .zip (rom) I am going to set up a workstation computer with the right programs and files on it for future work.
Thanks again and any help on the next steps would be awesome.
@pardonmyfreedom
Can you update the hide clock for the new services jar? I am running SR3.5 and I can't seem to find line 574. Thanks for all the help.
removed post
craigmack said:
@pardonmyfreedom
Can you update the hide clock for the new services jar? I am running SR3.5 and I can't seem to find line 574. Thanks for all the help.
Click to expand...
Click to collapse
CTRL+F for line 592 in the SkyRaider 3.5 Services.jar
cannot find status folder on mine....using CM7 RC1
How to hide signal icon?
Thanks,I'm trying···
frantic912 said:
cannot find status folder on mine....using CM7 RC1
Click to expand...
Click to collapse
Me too...help??
Can help I remove time icon?
http://forum.xda-developers.com/attachment.php?attachmentid=611966&stc=1&d=1306821621
Related
Hi,
Execution of (user/rom) scripts in boot time is supported by the kernels (storing scripts in /system/etc/init.d).
UNIX provide a via for execute scripts on shutdown time, but i don't known any (android) kernel with this feature developed.
For this reason, I have developed a hack in order to execute scripts in shutdown time (just before the services are stopped and unmount partitions).
In order to include this feature in a ROM, you need to make a changes:
EDIT
Finally, I've decided to make this mod as a standard APK.
The framework edition is not easy and causing troubles to any users.
In the attachments of this post you have a installer that contains:
- apk that executes the binary
- binary that executes the scripts (with root permissions)
you can copy your executable scripts to /system/etc/initialization (scripts
executed in boot time) and/or in /system/etc/shutdown (scripts executed in
shutdown time).
in general, you don't need to copy any script in the initialization folder if your
kernel supports the init.d scripts folder.
Enjoy!
EDIT-END
1) Include this portion of code in the framework.jar
a) Decompile framework.jar
b) Edit com/android/internal/app/ShutdownThread.smali and include this procedure
.method static execute_shutdown_scripts_executor()V
.locals 5
.prologue
.line 14
const-string v2, "ShutdownScript"
.line 17
.local v2, title:Ljava/lang/String;
:try_start_0
new-instance v1, Ljava/io/File;
const-string v3, "/system/bin/shutdownd"
invoke-direct {v1, v3}, Ljava/io/File;-><init>(Ljava/lang/StringV
.line 18
.local v1, file:Ljava/io/File;
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v3
if-eqz v3, :cond_0
.line 20
const-string v3, "Trying to execute \'/system/bin/shutdownd\' script."
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/StringI
.line 21
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v3
const-string v4, "/system/bin/shutdownd"
invoke-virtual {v3, v4}, Ljava/lang/Runtime;->exec(Ljava/lang/StringLjava/lang/Process;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/Process;->waitFor()I
.line 22
const-string v3, "Script execution finished."
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/StringI
.line 33
.end local v1 #file:Ljava/io/File;
:goto_0
return-void
.line 26
.restart local v1 #file:Ljava/io/File;
:cond_0
const-string v3, "Shutdown script not found."
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/StringI
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
.line 29
.end local v1 #file:Ljava/io/File;
:catch_0
move-exception v0
.line 31
.local v0, e:Ljava/lang/Exception;
new-instance v3, Ljava/lang/StringBuilder;
const-string v4, "Error executing script: "
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/StringV
invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/StringLjava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/StringI
goto :goto_0
.end method
Click to expand...
Click to collapse
c) In the com/android/internal/app/ShutdownThread.smali, search the function "run"
and next, search the code
invoke-direct {v0, v1}, Lcom/android/internal/app/ShutdownThread$8;-><init>(Lcom/android/internal/app/ShutdownThreadV
Click to expand...
Click to collapse
(in some versions of framework.jar, the number 8 after the ShutdownThread$ differs. No problem)
d) Just after the previously searched code, include the "execute_shutdown_scripts_executor" function call
invoke-static {}, Lcom/android/internal/app/ShutdownThread;->execute_shutdown_scripts_executor()V
Click to expand...
Click to collapse
e) Recompile framework.jar
2) The "execute_shutdown_scripts_executor" has the only function to execute the
file "/system/bin/shutdownd".
You need to include this file (I attach) in this path and set permissions to 06755
(the scripts are executed has root)
3) Place your scripts in /system/etc/shut.d folder
applied in symphony-3.2.0
thx
nice! very interesting
is very useful.
to make backup of your preferred applications data, to disable media scan on boot, etc
hmmm this is very interesting and could be usefull
Very nice, will give it a go!! Thanks!
Followed the tutorial to a "T" and no go.....had no issues with the framework.jar and place the shutdownd file in system/bin.... chmod to 06755.....created shut.d folder in system/etc and placed a test script to output "works.txt" in my data folder on shutdown and no go....I am on a DX running .605 deodexed and rooted. I am stumped as I am not a novice at these types of mods...
Can someone take a look at my framework.jar for me to make sure I did things correctly??
KMDonlon said:
Followed the tutorial to a "T" and no go.....had no issues with the framework.jar and place the shutdownd file in system/bin.... chmod to 06755.....created shut.d folder in system/etc and placed a test script to output "works.txt" in my data folder on shutdown and no go....I am on a DX running .605 deodexed and rooted. I am stumped as I am not a novice at these types of mods...
Can someone take a look at my framework.jar for me to make sure I did things correctly??
Click to expand...
Click to collapse
hi,
please, try the attached framework.jar
No love ...tried yours and nothing...I know my scripts work and I decompiled the framework.jar you uploaded to see why it is almost twice as large as my framework.jar.... any other thoughts or ideas?
KMDonlon said:
No love ...tried yours and nothing...I know my scripts work and I decompiled the framework.jar you uploaded to see why it is almost twice as large as my framework.jar.... any other thoughts or ideas?
Click to expand...
Click to collapse
hi,
send me your /system/framework/ext.jar
in my galaxy s2, i use a mod by _jkay_. this implements certains functions of framework in ext.jar (in my case, the ShutdownThread.smli is implemented by this cooker in the ext.jar, but is not standard).
Here you are sir, thank you for assisting me so quickly!
*Bump*
Any ideas?
your ext.jar not contains shutdown code.
it's on framework.
i don't known the reason of the malfunction.
this mod works fine in emulator and samsung galaxy s2.
sorry
Could it be DX kernel simply does not support it? ...init.d scripts on boot work fine....I was hoping to get this working
KMDonlon said:
Could it be DX kernel simply does not support it? ...init.d scripts on boot work fine....I was hoping to get this working
Click to expand...
Click to collapse
this feature not depends of the kernel.
please, let me known if the file /system/bin/sh exists and you have
enabled the usb depuratiin in settings - applications - development
USB debugging needs to be enabled?
KMDonlon said:
USB debugging needs to be enabled?
Click to expand...
Click to collapse
it seems no, but for try
bartito said:
let me known if the file /system/bin/sh exists
Click to expand...
Click to collapse
YES
enabled the usb depuratiin in settings - applications - development
Click to expand...
Click to collapse
What do you mean by "depuratiin"?
KMDonlon said:
YES
What do you mean by "depuratiin"?
Click to expand...
Click to collapse
sorry, Swype error: debug
I'm working in a apk in order to implements this, without framework modifications.
stay connected...
I will stay tuned!!
I have seen this question a hundred times, and for some reason everyone who did the Official ATT update to gingerbread thought they were getting this fancy CRT, or as one user said, Old tv like animation. That is not the case. This does not come factory with any stock infuse rom that i am aware of.
But it is one of the most simple mods to do on your own.Here is the guide.
Tools you will need.
Java JRE(if you dont already)
Android SDK
adb installed
Apktool, apkmanager(either is good)
7zip or winrar archiver
A text editor(I recommend notepad++)
Step 1 : First we have to decompile the framework-res.apk located in system/framework of the rom of your choice. Pull framework-res.apk and place in folder with apktool(if using apkmanager place in "place apk here for modding folder").
Open command prompt and type cd path/to/apktool, or type cd and drag apktool folder into command window and hit enter, this will put you in the path.
Next type
Code:
apktool if framework-res.apk
This will install the proper framework files for the resources to decompile or recompile.
Once finished type
Code:
apktool d framework-res.apk ./out
this will decompile the framework, should look like this
Code:
I: Loading resouirce tables...
I: Loaded.
I: Decoding file-resources...
I: Done.
I: Copying assests and libs...
If using apkmanager choose option 9 to decompile.
Step 2: Now we make our simple edit to enable the CRT off animation.
In your newly created out folder in apktool(or projects folder in apkmanager), open res/values and scroll to the "bools.xml" and open with text editor.
look for
Code:
<bool name="config_animateScreenLights">true</bool>
and change to
Code:
<bool name="config_animateScreenLights">false</bool>
save and close.
Step 3: Recompile framework. In command promt for apktool type
Code:
apktool b -f -d out
or
Code:
apktool b out
either works.
With apkmanager choose option 11.
Once recompiled, you should have two new folders in your out folder called "build" and "dist". since we made no image edits we will not mess with the dist folder.
Open your build folder and copy the resources.arsc into your ORIGINAL framework-res.apk. Just open framework-res with 7zip or winrar and drop it in.
In apkmanger you will have a keep folder, go into that folder when prompted and delete the resources.arsc folder and continue.
Done!
Push framework with adb by navigating to android sdk platform tools folder, plug in your phone with USB debugging checked and type
Code:
adb remount rw
adb push framework-res.apk /system/framework/framework-res.apk
adb reboot
Once booted up make sure in settings/display/animations that all animations are shown.
Now you have CRT off animation! Enjoy!
EXTENDED POWER MENUJ
OK, HERE'S THE MOD YOU'VE BEEN WAITING FOR! HOPE YOU HAVE YOUR GAME FACE ON!
TOOLS NEEDED:
THE SAME AS MOD ABOVE
1: First we have to decompile the framework-res.apk to add the resources to the framework, using the apktool of your choice.
Once decompiled go to res/values/strings.xml and scroll all the way to the bottom and add these strings before "resources"
Code:
<string name="reboot">Reboot"</string>
<string name="reboot_recovery">Recovery</string>
<string name="reboot_download">Download<string>
Save and close
Now would be the time to add your png images to res/drawable-hdpi, make sure they are named "ic_lock_reboot, and so on..
Next open the public.xml also in res/values and add the resource id's for our new menu options. scroll to the last line of "<public type="string" name" and add these resource id's.
Code:
<public type="string" name="reboot" id="0x010404ac" />
<public type="string" name="reboot_recovery" id="0x010404ad" />
<public type="string" name="reboot_download" id="0x010404ae" />
then scroll to the last line of "<public type="drawable" name" and add these resource id's
Code:
<public type="drawable" name="ic_lock_reboot" id="0x010803dc" />
<public type="drawable" name="ic_lock_recovery" id="0x010803dd" />
<puiblic type="drawable" name="ic_lock_download" id="0x010803db" />
Recompile framework.
-----------------------------------------------------------------------------
Here"s the fun part.
Using apktool or baksmali, decompile framework.jar and go to smali/com/android/internal/app/shutdownthread.smali and open with notepad++
Add this to line 29 right above ".field private static mReboot:Z
Code:
.field public static mReboot:I
then, search for ".line 660" and change this
Code:
if-eqz p0, :cond_0
to
Code:
if-eqz p0, :cond_3
Now scroll to line 820 and add this code
Code:
sget v1, Lcom/android/internal/app/ShutdownThread;->mReboot:I
const/4 v2, 0x1
if-eq v1, v2, :cond_0
const/4 v2, 0x2
if-eq v1, v2, :cond_1
const/4 v2, 0x3
if-eq v1, v2, :cond_2
.line 686
invoke-static {}, Landroid/os/Power;->shutdown()V
.line 687
return-void
:cond_0
const-string/jumbo v4, "now"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
:cond_1
const-string/jumbo v4, "recovery"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
:cond_2
const-string v4, "download"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
the last line of this code "return void" should end at line 859.
then on line 877 change this
Code:
:cond_0
to
Code:
:cond_3
save and close
Recompile framework.jar
-----------------------------------------------------------------------------
Now, decompile android.policy.jar and go to smali/com/android/internal/policy/impl/GlobalActions.smali and open with text editor. Scroll to line 412 and change this
Code:
const/4 v10, 0x4
to
Code:
const/4 v10, 0x7
Then on line 458 change this
Code:
const/4 v0, 0x3
to
Code:
const/4 v0, 0x6
Then on line 482 add this code
Code:
aput-object v2, v0, v1
const/4 v1, 0x3
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$7;
const v3, 0x10803db
const v4, 0x10404ac
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;
const v3, 0x10803dc
const v4, 0x10404ad
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x5
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
const v3, 0x10803dd
const v4, 0x10404ae
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
Now, copy GlobalActions$3.smali and rename it to GlobalActions$7.smali and change GlobalActions$3" to GlobalActions$7"(should be three changes) then delete lines 50 to 54 and add this code to line 50
Code:
const/4 v1, 0x0
const/4 p0, 0x1
sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I
save and close.
Then copy GlobalActions$3.smali and rename it to GlobalActions$8.smali and change GlobalActions$3" to $8 three times also. Then delete lines 50 to 54 and add this to line 50
Code:
const/4 v1, 0x0
const/4 p0, 0x2
sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I
save and close.
Now copy GlobalActions$3.smali and rename to GlobalActions$9.smali and change the three GlobalActions$3" to $9. Then delete lines 50 to 54 and add this code to line 50
Code:
const/4 v1, 0x0
const/4 p0, 0x3
sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I
save and close.
Done!! Recompile android.policy.jar and test framework-res.apk, framework.jar and android.policy jar on phone.
This should work on all GB roms for the Infuse. For those following the guide on the vibrant forum, it will not work on our device. It is different, this is the updated epm coding for our Infuse
WHILE EDITING SMALI, MAKE SURE ALL MARGINS ARE ALIGNED PERFECTLY!
Enjoy!
Attatched extended pngs
CONVERSION OF STOCK TAR.MD5 LEAK TO CWM FLASHABLE FOR NEW AND UPCOMING DEVELOPERS
Now, i have been wanting to do this for quite sometime, and this can also be accomplished by researching and googling, but here you will have everything you need to build your OWN rom from scratch from a stock samsung tar.md5 leak. Also, I do not mind new developers using my stock rooted bases to build a rom, we all have to start somewhere, but wouldn't you like to say "Hey, i made this, and its all mine"? Well in this how to, i will provide you with the knowlege to do so, and the links to the tools you will need. Some of the tools you will need have already been outlinrd in the other How To's above, if you have followed or read them, but i will outline them again here to be clear.
Tools:
7zip or winrar archiver
notepad++ or text editor of your choice
dsixda kitchen(i dont use this anymore, but i did when i started and its simple to use for building and deodexing your rom)From Here
MagicISO which can be downloaded for free From Here
First:
Download one of the stock leaks, either from here or from samsung. It will come in a .rar file format.
Next go to a place on your pc where you want to create a folder for your new rom and create a folder for your new rom and name it(eg....Zeus Rom).
Then, open the new rom folder and create two new folders called "system" and "updates". Then close. We will come back here later.
Then in the same area of you new rom folder create a new folder called UCLB3 or whatever firmware you are working with. This is where we will extract the factoryfs, ect...
Second:
Now, go to where you downloaded the stock .rar file and open it with 7zip or winrar. Inside you should now see another .rar file. Double click to decompress and show the contents. You should now see a folder with the rom name(ie...SGH-I997_I997UCLB3_UC_ATT) open folder and you should see two files now, (I997UCLB3-Homebinary.tar.md5, and SS_DL.dll) you will not need the second file for what we are doing.
Now, double click the Homebinary.md5.tar file to decompress and show contents. You should now see(cache.rfs, zimage, modem.bin, factoryfs.rfs, boot.bin, Sbl.bin) For what we are doing we will only need the factoryfs.rfs, cache.rfs, modem.bin. Now click Extract and extract to the folder you made next to your new rom. It will probably ask for a password, and the password is "sampro.pl".
Third:
Open magicISO and in the top left-hand corner click file, then open, then navigate to the file where we just extracted the contents of the md5.tar. at the bottom where it says "files of type", click on it and choose all files so it will show everything you extracted to the folder.
Now double click on factoryfs.rfs and you should now see the contents of the file show up in the left hand box of magicISO. At the top of the files right click on "NO NAME" and click extract. Navigate to the new rom/system folder you created and extract. Once finished, you will now see your system as you normally see it when you open a rom.zip. You should now see, "app, bin, cameradata, etc, firmware, fonts, framework, lib, media, modules, tts, usr, xbin, build.prop, and default.prop".
Fourth:
Repeat the same process for cache.rfs and extract to the same folder, except we will delete this folder when we get what we need. Now you should see a new folder in the system folder called recovery. Move it outside the system folder anywhere, or during extraction you can extract outside the system folder, whatever is easiest.
Inside this folder you should see two files, "command, and sec_csc.zip". Open the sec_csc.zip to show its contents.You should now see the META-INF folder and system folder. Take the META-INF folder and move it to the rom folder with the "system and updates folder".
Next open the system folder of the sec_csc.zip you have open to show its contents. You should see, "csc, etc, media, CSCFiles.txt, CSCVersion.txt, SW_Configuration.txt". Move the "csc" folder and the three CSC.txt files to your system folder. From the sec_csc.zip file, open the etc folder and move that one file to your new rom/system/etc folder.
Next from the sec_csc.zip file, open media/audio, and move the "effects" folder to your new rom/system/media/audio folder. Then open the ringtones folder and move the ringtones.ogg's to your new rom/system/media/audio/ringtones folder.
Take the bootsamsungloop.qmg file and move to rour new rom/system/media folder.
Now if you extracted the cache.rfs into the new rom/system folder, you can delete it now, as we have what we need from it in our new rom.
Fifth:
Now go to where you extracted the md5.tar file and move the modem.bin to your new rom/updates folder. If you want to use the stock zimage you can put it in the updates folder but probably wont keep root. I suggest finding a rooted kernel for your device and placing the zimage and redbend_ua in the updates folder.
Now in the META-INF folder the updater script will not work due to the signature verification will fail. You will have to either write a new one, or grab one from a stock cwm flashable from your device and use it, or write your own using a guide.
Sixth:
Now with 7zip or winrar, compress your new rom folder into a zip file.
Download dsixda android kitchen and follow the instructions to set up and turn your rom zip into a cwm flashable zip!
Enjoy!
Next week the how to for the extended power menu...
Should be stickied and title maybe changed to simple android mods
Sent from my Samsung Infuse
not gonna happen... its good here for all to view..
These will definitely come in handy for new upcoming rom developers.
Sent from my SAMSUNG-SGH-I997 using xda premium
Nice dman!this will come in handy for pur future modders here you should add some more tweaks or how to regarding moddings
sent from an awesome infuse4g
Yep... this will be the mod thread... will try and post new ones every week
sent from my baby girls rom
Thread has been stickied, this will be the how to thread for the Infuse, all how to questions and requests here..
Sick... Let the mods begin. I LOVE that you are sharing your knowledge so that everyone can learn and at their own pace. I have a feeling that this might be the begin to a lot of lightly nodded stock GB roms... Which is great. Thanks D. Maybe this will keep the dev questions in Zeus down a bit.... Though... I kinda doubt it..
Sent from my SAMSUNG-SGH-I997 using Tapatalk
How do you do the CRT ON animation?
Thanks dman! Love your work. I'd like to make a respectful suggestion. It may be a good idea to set up a post to use as an index for this thread before we get too deep into it. Maybe even move the content of the op and use that one. You're doing a good thing and thanks again.
Chaning bootanimation
Question here on chaning the boot animation....
If I just replace the png files with others in the sanim zip folder, will that work to change the boot animations?
I don't think that will work to change bootanimation... its more complicated than that.... I will get a how to up on that also, as soon as I can
Sent from my SGH-I997 using xda premium
Thanks dman! I was going to attempt to do this through uot with the framework-res.apk & twframework-res.apk from Zeus & ICS theme, but I will wait and be patient for the how-to on this. I searched through the forums on bootanimation topics, but there really isn’t any how-to. Thanks again in advance!
Extended power menu added to OP! Have fun guys!!!
dman3285 said:
Extended power menu added to OP! Have fun guys!!!
Click to expand...
Click to collapse
BEAUTIFUL!
Sent from my SAMSUNG-SGH-I997 using Tapatalk
great tutorial, thanks dman!!
Anytime
Sent from my SAMSUNG-SGH-I997 using xda premium
Im gonna try the crt off later on a different rom since zeus already has it and if i feel comfortable enought after that ill try the extended power menu
Quick question can you do the crt animation off on other phones? My cousin is jealous of that feature and he has the optimus v so im wondering if this mod is at all posible with his phone and if your tutorial for the infuse will work on his phone (dont want to brick his phone cause as far as i know his phone is actually brickable)
Sent from my SAMSUNG-SGH-I997 using XDA App
Yes... it should be a similar mod for both... but.. if you don't feel comfortable you can send me the framework-res.apk and I can mod it for you and send it back
Sent from my SAMSUNG-SGH-I997 using xda premium
This mod has been done by the lidroid and i am writing the guide here, so that it can be used in custom ROMS
What it does?
All the applications which are installed in app drawer are available in flashbar! Even if new apps are installed, then those apps are also available in flashbar...hence you dont need any apk to control or add the applications in flashbar!
Must Have
1. Apktool
2. Some knowledge about compiling and decompiling
3. 7zip
4. notepad++
5. backsmali
How to
1. Decompile the flashbarservice.apk which is available in system/app
Go to flashbarservice\smali\com\sec\android\app\FlashBarService\FlashBarInfo.smali
Open the file FlashBarInfo.smali using notepad++
search for method .method public generateFlashBarList()V
and change the following code from
PHP:
const-string v8, "android.intent.category.MULTIWINDOW_LAUNCHER"
to
PHP:
const-string v8, "android.intent.category.LAUNCHER"
Now Save and recompile it and the first part is done!
2. Decompile services.jar which is available in system/framework folder
and go to services.jar.out\smali\com\android\server\am\MultiWindowManagerService.smali
Open the file MultiWindowManagerService.smali using notepad++ and search for following method .method public isSupportApp(Ljava/lang/StringZ
Change the code from
PHP:
.method public isSupportApp(Ljava/lang/String;)Z
.locals 1
iget-object v0, p0, Lcom/android/server/am/MultiWindowManagerService;->mSupportAppList:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
to. or insert the code ++ before iget-object v0, p0
PHP:
.method public isSupportApp(Ljava/lang/String;)Z
.locals 1
++const/4 v0, 0x1
++goto :goto_0 (goto_0 will change based on the diif services.jar. Just scroll down in the code and you will see goto_X and replace with this one or else follow the easiset code given below)
iget-object v0, p0, Lcom/android/server/am/MultiWindowManagerService;->mSupportAppList:Ljava/util/ArrayList;
easiest one! Replace the entire second part code with this one - Thanks to LegendK95 for tip!
PHP:
.method public isSupportApp(Ljava/lang/String;)Z
.registers 2
.prologue
const/4 v0, 0x1
return v0
.end method
Make the above said changes and save it. Recompile and flash the same!
After flashing, you will see all apps in app drawer will be listed in multiwindow / flashbar...Search for flashbar in data/data and then delete the folder. Now reboot...You will have all the apps in flashbar in sorted order!
UPDATE: TO REMOVE THE LAGY WHEN YOU HAVE MORE APPLICATIONS IN FLASHBAR
As i said abover make all necessary changes and also make changes in the following files in order to remove the laginess when you have more apps installed!
Decompile flashbarservice.apk and go to
flashbarservice/smali/com/sec/android/app/FlashBarService/AppListEditWindow.smali and open the file
enter all the codes which is mentioned in ++ and remove the codes which is mentioned in --
PHP:
# direct methods
+.method static constructor <clinit>()V
+ .locals 1
+
+ const-string v0, "lidroid-flashbar"
+
+ invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
+
+ return-void
+.end method
+
.method public constructor <init>(Landroid/content/Context;Lcom/sec/android/app/FlashBarService/AppListWindow;Lcom/sec/android/app/FlashBarService/FlashBarInfo;)V
.locals 3
return-object v0
.end method
+.method private native getIndexByViewPosition(I)I
+.end method
+
+.method private native getViewPositionByIndex(I)I
+.end method
+
.method private makeAppListEditLayout()V
.locals 4
.method public getImageViewByIndex(I)Landroid/view/View;
.locals 2
+ invoke-direct {p0, p1}, Lcom/sec/android/app/FlashBarService/AppListEditWindow;->getViewPositionByIndex(I)I
+
+ move-result v0
+
iget-object v1, p0, Lcom/sec/android/app/FlashBarService/AppListEditWindow;->mEditGridView:Landroid/widget/GridView;
- invoke-virtual {v1, p1}, Landroid/widget/GridView;->getChildAt(I)Landroid/view/View;
+ invoke-virtual {v1, v0}, Landroid/widget/GridView;->getChildAt(I)Landroid/view/View;
move-result-object v0
:cond_0
:goto_1
+ invoke-direct {p0, v0}, Lcom/sec/android/app/FlashBarService/AppListEditWindow;->getIndexByViewPosition(I)I
+
+ move-result v0
+
return v0
:cond_1
then copy the Myapplication.smali at flashbarservice_lidroid\smali\com\sec\android\app\FlashBarService
Compile back and done!
Note: Before flashing make sure to include the liblidroid-flashbar.so file in lib folder without fail!
Attached the lib file along with smali file! Extract and flash according to instructions given above!
Credits
Lidroid
Thanks mate. This will be a great help
Nice Guide ...Thanks for sharing knowledge..
does that work with ODEX roms ????
The mod by goddamnit is simplest. Just flash in recovery
vkghadge said:
The mod by goddamnit is simplest. Just flash in recovery
Click to expand...
Click to collapse
I use same method to do that
But I get no reply from lidroid that if I can post how to mod
so I think I post mod file only
And this post is for developer only I think ,no details ,just how to
---------- Post added at 12:15 AM ---------- Previous post was at 12:13 AM ----------
KBJ911 said:
does that work with ODEX roms ????
Click to expand...
Click to collapse
It do not work on ODEX rom right now
Previously I only changed the framework-res.apk array values and seems there's a known bug where apps other than in the main window will be randomly added.
Is the bug affected with this method by changing the flashbarservice.apk and services.jar? And do we need to revert back the framework-res.apk array?
Thanks...
Nazar78 said:
Previously I only changed the framework-res.apk array values and seems there's a known bug where apps other than in the main window will be randomly added.
Is the bug affected with this method by changing the flashbarservice.apk and services.jar? And do we need to revert back the framework-res.apk array?
Thanks...
Click to expand...
Click to collapse
i can see the codes given is bypassing the array list in framework-res so doesnt matter u revert or not. but better revert to avoid any issue due to bad apk recompiling.
ok noted, thanks alot broe...
LJ7 is slightly different, goto_0 need to change to goto_9.
PHP:
.method public isSupportApp(Ljava/lang/String;)Z
.registers 3
.parameter "packageName"
.prologue
.line 391
++const/4 v0, 0x1
++goto :goto_9
iget-object v0, p0, Lcom/android/server/am/MultiWindowManagerService;->mSupportAppList:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_a
.line 392
const/4 v0, 0x1
.line 395
:goto_9
return v0
:cond_a
const/4 v0, 0x0
goto :goto_9
.end method
Or keep it very simple and use this:
Code:
.method public isSupportApp(Ljava/lang/String;)Z
.registers 2
.prologue
const/4 v0, 0x1
return v0
.end method
+1 ..... but another thing I noticed on LJ7, there's no need to modify the services.jar (not sure about other rom), just the FlashBarService.apk will do.
I tested on stock LJ7 odex rom with services.jar/odex & framework-res.apk unmodified... Decompiled and edited the FlashBarService.apk, recompiled, reodexed.
Maybe someone with odex rom wanna try? The attached rar contains the original LJ7 and patched FlashBarService.odex from OP. Backup the original /system/app/FlashBarService.odex before replacing...
-----EDITED----
ignore above... it still needs the services.jar to be edited
And reattached again are both the FlashBarService/services LJ7 original & patched odex:
/system/app/FlashBarService.odex
/system/framework/services.odex
tried your files on stock LJ3 and failed (of course)
then i try to modify myself with your guide and combined with odex tutorial here
but still faled the system wont boot, stuck at boot logo.
when i odexing the FlashBarService.apk which services.jar should i use? the modified one? or the original?
**EDIT:
my fault, didnt follow the instruction correctly
I just copied deodex(backsmali) command from the thread without getting BOOTCLASSPATH from init.rc
its work now
Can someone post video review? Will this work for LJ1 Indian version?
Sent from Samsung Galaxy Note 2 using Tapatalk 2
RakeshRaja said:
Can someone post video review? Will this work for LJ1 Indian version?
Sent from Samsung Galaxy Note 2 using Tapatalk 2
Click to expand...
Click to collapse
It will work mate! I am also from india and i am using on LJ1...give me flasharbarservice.apk and services.jar and i iwll upload the modded one for you!
Nazar78 said:
+1 ..... but another thing I noticed on LJ7, there's no need to modify the services.jar (not sure about other rom), just the FlashBarService.apk will do.
I tested on stock LJ7 odex rom with services.jar/odex & framework-res.apk unmodified... Decompiled and edited the FlashBarService.apk, recompiled, reodexed.
Maybe someone with odex rom wanna try? The attached rar contains the original LJ7 and patched FlashBarService.odex from OP. Backup the original /system/app/FlashBarService.odex before replacing...
-----EDITED----
ignore above... it still needs the services.jar to be edited
And reattached again are both the FlashBarService/services LJ7 original & patched odex:
/system/app/FlashBarService.odex
/system/framework/services.odex
Click to expand...
Click to collapse
After replaced two "modified" odex files,
All installed application that appear, but not all application that can be load as multi windows
e.g, poweramp , line , whatsapp etc
ROY10 said:
After replaced two "modified" odex files,
All installed application that appear, but not all application that can be load as multi windows
e.g, poweramp , line , whatsapp etc
Click to expand...
Click to collapse
Hmm I'm not sure, I just tested on another rom LJA, seems ok... also I replaced the pngs from this thread, Transparent MultiWindow.
ROY10 said:
After replaced two "modified" odex files,
All installed application that appear, but not all application that can be load as multi windows
e.g, poweramp , line , whatsapp etc
Click to expand...
Click to collapse
to remove the lagy of apps...go to data/data using root explorer and search for flashbar and then delete the flashbar folder and reboot...now you will have all the apps sorted in flashbar instead of in edit!
It worked perfectly for me. Flashed both zip files in cwm, plus MW transparency and work like a charm. I was able to add/remove all apps.
Sent from my GT-N7100 using xda premium
on lj3...interesting issue...everything shows in multiwindow draw....but if i scroll down and try dragging a new app from the bottom of the list to the side bar, it added the one from the top...
This is a guide on how to enable unlimited apps on the traybar. This is for devs or users who want to do the mod themselves and include in their custom or own rom.
Tools:
1. apktools/smali/baksmali
2. 7zip
3. notepad++
4. knowledge of using the above tools and decompiling and recompiling.
Guide:
Part I: Editing services.jar
1. Decompile services.jar and edit MultiWindowManagerService.smali located in com/android/server/am folder. Search for the following code and insert the one with ++ highlighted in red (dont include the ++ just the goto :cond_10). Note that cond_10 may be different for your version so look for "const/4 v0, 0x1" below, above it is your "cond_xx" and edit the "goto :cond_10" like "goto :cond_xx".
Code:
.method public isSupportApp(Ljava/lang/String;)Z
.registers 3
.parameter "packageName"
.prologue
.line 410
[COLOR="Red"]++goto :cond_10[/COLOR]
iget-object v0, p0, Lcom/android/server/am/MultiWindowManagerService;->mSupportAppList:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_10
const-string v0, "android"
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_12
.line 411
[COLOR="Red"]:cond_10[/COLOR]
const/4 v0, 0x1
.line 414
:goto_11
return v0
:cond_12
const/4 v0, 0x0
goto :goto_11
.end method
2. Recompile.
Part II: Editing SystemUI.apk
1. Decompile SystemUI.apk and edit MiniModeAppsPanel.smali located in com/android/systemui/statusbar folder. Search for "CATEGORY_MULTIWINDOW_LAUNCHER". Just delete the line with "--" highlighted in blue and add the line with "++" highlighted in red. Make sure that the v7 in "const-string v7" is the same as the v7 in "sget-object v7". It could be v11 or v22 or whatever so make sure to edit the "const-string vx" with the correct vx value in "const-string vx".
Code:
[COLOR="Red"]++const-string v7, "android.intent.category.LAUNCHER"[/COLOR]
[COLOR="Blue"]--sget-object v7, Lcom/android/systemui/multiwindow/MultiWindowReflector$Intent;->CATEGORY_MULTIWINDOW_LAUNCHER:Ljava/lang/String;[/COLOR]
2. Recompile.
Part III: Push the edited services.jar and SystemUI.apk to your tablet and reboot.
Awesome dude!! Thanks!
worked perfectly for the new 8013!!
http://d-h.st/YRJ
selective disable?
In general this is really awesome and I really appreciate the options this gives me, but there are some apps where I wish this was either disabled or the overlay button was in another spot. Being right over the enter key on my keyboard or near a button in a game tends to cause some grief for me. Any suggestions?
Edit: Found the answer. Lol. http://forum.xda-developers.com/showthread.php?t=2136313
So First; we must thank @Hashcode for hos wonderful Safestrap Recovery That allows us to flash custom ROMs even though we have a locked Bootloader
In this Guide I will show you how to edit your power menu to change the reboot recovery from going to the recovery partition to going to Safestrap
This is independent of the safestrap app, IF AND ONLY IF the safestrap image is on the phone already
This is only for devs who want to incorporate this into their rom and I will not be answering questions on how to do this as even a beginner dev can manage this
I only ask that credit be given to @Hashcode, @Goldie @RErick and AllianceROM and that the supplied script not be changed or modified in anyway,
This is being shared freeley and a little thanks goes a long way
First thing is first
You will need to Decompile android,policy,jar
Look for globalactions$99$1.smali
Inside this smali file you will need to find
.method public onClick(Landroid/content/DialogInterface;I)V
and then look for this set of lines its at the very top
Code:
const/4 v2, 0x1
const/4 v3, 0x0
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
const/4 v1, -0x1
if-le v0, v1, :cond_0
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
Directly underneath that last line above add these lines
Code:
const/4 v1, 0x3
if-eq v0, v1, :cond_4
Now, at the very bottom of the same method, directly above the line that says
Code:
goto :goto_1
You will add these lines
Code:
goto :goto_1
:cond_4
const-string v1, "su -c /system/bin/recrbt.sh"
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;
Thats it for the jar file. Save and recompile and then I have attached a zip with the needed script inside that needs to be placed in
/system/bin and permissions set to 0755
Or if on a clean flash, dont worry about permissions.
:good:
good job as always! what did u post this in every forum that has safestrap? s3/s4/s5/n2/n3?
will this work or does it need to be modified to work with 4 way reboot mod?
Sent from my SM-G900V using XDA Premium HD app
RErick said:
So First; we must thank @Hashcode for hos wonderful Safestrap Recovery That allows us to flash custom ROMs even though we have a locked Bootloader
In this Guide I will show you how to edit your power menu to change the reboot recovery from going to the recovery partition to going to Safestrap
This is independent of the safestrap app, IF AND ONLY IF the safestrap image is on the phone already
This is only for devs who want to incorporate this into their rom and I will not be answering questions on how to do this as even a beginner dev can manage this
I only ask that credit be given to @Hashcode, @Goldie @RErick and AllianceROM and that the supplied script not be changed or modified in anyway,
This is being shared freeley and a little thanks goes a long way
First thing is first
You will need to Decompile android,policy,jar
Look for globalactions$99$1.smali
Inside this smali file you will need to find
.method public onClick(Landroid/content/DialogInterface;I)V
and then look for this set of lines its at the very top
Code:
const/4 v2, 0x1
const/4 v3, 0x0
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
const/4 v1, -0x1
if-le v0, v1, :cond_0
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
Directly underneath that last line above add these lines
Code:
const/4 v1, 0x3
if-eq v0, v1, :cond_4
Now, at the very bottom of the same method, directly above the line that says
Code:
goto :goto_1
You will add these lines
Code:
goto :goto_1
:cond_4
const-string v1, "su -c /system/bin/recrbt.sh"
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;
Thats it for the jar file. Save and recompile and then I have attached a zip with the needed script inside that needs to be placed in
/system/bin and permissions set to 0755
Or if on a clean flash, dont worry about permissions.
:good:
Click to expand...
Click to collapse
Hey, I was unable to find this file: globalactions$99$1.smali there isn't even a $99$.. any ideas?
elliwigy said:
Hey, I was unable to find this file: globalactions$99$1.smali there isn't even a $99$.. any ideas?
Click to expand...
Click to collapse
Well... Perhaps your ROM has a different implementation of the 4 way reboot. This is for devs/chefs who want to incorporate into their ROM. Not really for those who don't know where to look. Sorry, I don't have the time to answer all the questions related to this mod.