Related
I'm trying to mod the framework to enable the ICS onscreen navigation keys but I can't get framework-res.apk to recompile after the mod has been made.
Anybody know what's going on?
Tried doing it using apktool 1.4.2/1.4.3 plus latest version of aapt. I've also tries the APK Mod toolkit thing, I just can't get it to recompile.
P.S. For those of you that ask "Why would you want On screen nav when there's physical/capacitive buttons?" I want to turn it on, then mod the key config to disable the back and menu keys and turn the home key into a dedicated camera key.
Any pointers, or a working framework-res upload would be great.
Also, I'm using the "stock" DeOdexed/Rooted LG2 release.
Try using 7zip to just replace the target file
Sent from my SPH-L710 using xda premium
gtuansdiamm said:
Try using 7zip to just replace the target file
Sent from my SPH-L710 using xda premium
Click to expand...
Click to collapse
Haha, I haven't gone that route. But it sounds so idiotically simple that I'll bet it works.
-Edit-
Can't get access to the values folder in which the bools.xml resides.
Anybody get this to work? I would love a flashable!!!!
Sent from my SAMSUNG-SGH-I717 using Tapatalk 2
I've made a couple. I'll post a new zip tomorrow. This would be for stock LG2 Deodexed?
Sent from my SPH-L710 using Tapatalk 2
I bet you are having the plurals errors. Try this...
in res\values\plurals.xml
look for
Code:
<item quantity="other">%d of %d</item>
make it
Code:
<item quantity="other">%d of %%d</item>
res\values-en-rUS\plurals.xml
look for:
Code:
<item quantity="other">%d of %d</item>
make it
Code:
<item quantity="other">%d of %%d</item>
res\values-es\plurals.xml
look for:
Code:
<item quantity="other">%d de %d</item>
make it
Code:
<item quantity="other">%d de %%d</item>
It should compile just fine after that. I had the same errors.
Yes. Fergie. I have been using your Navy bar from blazer. I would like the bar to have the back and recent button reversed back to stock positions. Like the galaxy nexus button order. I sent a pm a fee days ago. THANKS
Sent from my galaxy s3
Tsudeily said:
I bet you are having the plurals errors. Try this...
in res\values\plurals.xml
look for
Code:
<item quantity="other">%d of %d</item>
make it
Code:
<item quantity="other">%d of %%d</item>
res\values-en-rUS\plurals.xml
look for:
Code:
<item quantity="other">%d of %d</item>
make it
Code:
<item quantity="other">%d of %%d</item>
res\values-es\plurals.xml
look for:
Code:
<item quantity="other">%d de %d</item>
make it
Code:
<item quantity="other">%d de %%d</item>
It should compile just fine after that. I had the same errors.
Click to expand...
Click to collapse
YES!
This would be sick if someone could get it working.
thekendog said:
This would be sick if someone could get it working.
Click to expand...
Click to collapse
I'm almost to my computer. If all goes well, I'll post the framework-res.apk shortly.
Good luck. If it doesn't compile let me know and I'll give a shot at enabling the on screen buttons. I just need to know the tutorial to follow.
holysmokesbatty said:
I'm almost to my computer. If all goes well, I'll post the framework-res.apk shortly.
Click to expand...
Click to collapse
Tsudeily said:
Good luck. If it doesn't compile let me know and I'll give a shot at enabling the on screen buttons. I just need to know the tutorial to follow.
Click to expand...
Click to collapse
Looks like it compiled, I'm about to backup my current framework and push this over, will report back in a minute.
Good to hear.
holysmokesbatty said:
Looks like it compiled, I'm about to backup my current framework and push this over, will report back in a minute.
Click to expand...
Click to collapse
Tsudeily said:
Good to hear.
Click to expand...
Click to collapse
Aaaaaand... Bootloop. Though weirdly when I copied framework-res.apk to /framework, the icon turned into the airplane mode icon just before I reboot, soo... I'm going to give this another shot.
Edit: Still no luck. I shouldn't be signing the apk, should I?
Did you give it the right permissions? 0644 I believe.
holysmokesbatty said:
Aaaaaand... Bootloop. Though weirdly when I copied framework-res.apk to /framework, the icon turned into the airplane mode icon just before I reboot, soo... I'm going to give this another shot.
Edit: Still no luck. I shouldn't be signing the apk, should I?
Click to expand...
Click to collapse
Tsudeily said:
Did you give it the right permissions? 0644 I believe.
Click to expand...
Click to collapse
How do I set permissions?
Depends on what you are using.. If Root Explorer, I believe you get the option if you tap and hold the file.
holysmokesbatty said:
How do I set permissions?
Click to expand...
Click to collapse
Tsudeily said:
Depends on what you are using.. If Root Explorer, I believe you get the option if you tap and hold the file.
Click to expand...
Click to collapse
I got it to boot. Sort of. But then it would have an error. SecPhone force closed, which was causing a soft boot.
This was after adb pushing the file instead of moving with Root Explorer. And whenever I replace system files using Root Explorer I always drop the file in root, which usually resets the permissions anyways.
Maybe adb push, boot to recovery and chmod from there?
If that would work, what's the shell command I should use to chmod for setting the permissions right?
Post the apk. Maybe we can get it to boot. And root explorer doesn't change the permissions for me. I have to do it manually.
Okay, so pushing the signed framework gets a boot but it crashes, and pushing an unsigned one causes a bootloop.
Gimme a sec, I'm upping to mediafire.
http://www.mediafire.com/?ff89zjoli50houi
That's the signed apk that sort of boots.
how can i remove the stock toggles in Notification bar
I want it similar to the real ics
Mohad.O.F said:
how can i remove the stock toggles in Notification bar
I want it similar to the real ics
Click to expand...
Click to collapse
It's very easy
Just edit SystemUI.apk/res/layout/tw_status_bar_expanded.xml
Add
Code:
android:visibility="gone"
into this line
Code:
<HorizontalScrollView android:id="@id/quicksetting_scroller"
raubkatze said:
It's very easy
Just edit SystemUI.apk/res/layout/tw_status_bar_expanded.xml
Add
Code:
android:visibility="gone"
into this line
Code:
<HorizontalScrollView android:id="@id/quicksetting_scroller"
Click to expand...
Click to collapse
thnx but how i can edit the tw_status_bar_expanded.xml (What is the program) to open the .xml to add the line
Mohad.O.F said:
thnx but how i can edit the tw_status_bar_expanded.xml (What is the program) to open the .xml to add the line
Click to expand...
Click to collapse
http://code.google.com/p/android-apktool/
raubkatze said:
It's very easy
Just edit SystemUI.apk/res/layout/tw_status_bar_expanded.xml
Add
Code:
android:visibility="gone"
into this line
Code:
<HorizontalScrollView android:id="@id/quicksetting_scroller"
Click to expand...
Click to collapse
again learned something
leamoor said:
again learned something
Click to expand...
Click to collapse
Enjoy but there are much more here - http://developer.android.com/reference/android/widget/package-summary.html
raubkatze said:
Enjoy but there are much more here - http://developer.android.com/reference/android/widget/package-summary.html
Click to expand...
Click to collapse
Thank you for sharing this link,
and you has been to teach,i really thank you!
leamoor said:
Thank you for sharing this link,
and you has been to teach,i really thank you!
Click to expand...
Click to collapse
You're welcome
Is there a before and after pic for this? Also can this be used to remove the sideways slide motion when you open the pull down?
StormtrooprDave said:
Is there a before and after pic for this? Also can this be used to remove the sideways slide motion when you open the pull down?
Click to expand...
Click to collapse
It should be added once into the line I've pointed and it has noting to do with auto scroll effect when open notification pulldown. It only hides current frame from the screen.
raubkatze said:
It's very easy
Just edit SystemUI.apk/res/layout/tw_status_bar_expanded.xml
Add
Code:
android:visibility="gone"
into this line
Code:
<HorizontalScrollView android:id="@id/quicksetting_scroller"
Click to expand...
Click to collapse
Toggle buttons are deleted, but will remain only blank space... how this blank space remove? (notifications moved completely up!) Thank you very much!
PS. I have Samsung Note II ROM v.4.1.2
Hi,
Can anyone tell me about adding an .apk or adding its features to settings.apk.
I have added togglebar to MMB-ICS 4.0.4 but it requires an apk to modifiy it and i want to add this apk or its features into system.apk 'cos i don't want to app to be seen in the menu.is it possible to do that.
ThankYou :good:
toorentz said:
Hi,
Can anyone tell me about adding an .apk or adding its features to settings.apk.
I have added togglebar to MMB-ICS 4.0.4 but it requires an apk to modifiy it and i want to add this apk or its features into system.apk 'cos i don't want to app to be seen in the menu.is it possible to do that.
ThankYou :good:
Click to expand...
Click to collapse
It's possibble. You put the app in app folder and in one of xml file in settings.apk you add a line for run this app.
And I know is possibble to hide this application from menu but I do not know how to do it.
WYPIERDAALAAC said:
It's possibble. You put the app in app folder and in one of xml file in settings.apk you add a line for run this app.
And I know is possibble to hide this application from menu but I do not know how to do it.
Click to expand...
Click to collapse
which app folder and which xml file????
Ask saldymhmd he did it in his jellybread v4 rom.
Sent from my GT-S5660 using xda app-developers app
toorentz said:
which app folder and which xml file????
Click to expand...
Click to collapse
I think I understand you.
For example if you want have LiveWallpapersPicker.apk in Settings, put this app in system/app folder next
recompile the Settings.apk and go to Settings\res\xml.
Find the xml file (in this case) about Wallpaper and write a line.
For example
Code:
<PreferenceScreen android:title="Live Wallpaper" android:summary="LiveWallpaperPicker">
<intent android:targetPackage="com.android.wallpaper.livepicker" android:action="android.intent.action.MAIN" android:targetClass="com.android.wallpaper.livepicker.LiveWallpaperListActivity" />
</PreferenceScreen>
all lines you can find in AndroidManifest.xml file in app folder.
If this is not what you meant I'm sorry.
WYPIERDAALAAC said:
I think I understand you.
For example if you want have LiveWallpapersPicker.apk in Settings, put this app in system/app folder next
recompile the Settings.apk and go to Settings\res\xml.
Find the xml file (in this case) about Wallpaper and write a line.
For example
Code:
<PreferenceScreen android:title="Live Wallpaper" android:summary="LiveWallpaperPicker">
<intent android:targetPackage="com.android.wallpaper.livepicker" android:action="android.intent.action.MAIN" android:targetClass="com.android.wallpaper.livepicker.LiveWallpaperListActivity" />
</PreferenceScreen>
all lines you can find in AndroidManifest.xml file in app folder.
If this is not what you meant I'm sorry.
Click to expand...
Click to collapse
Thanks,thats what i wanted to know
WYPIERDAALAAC said:
Code:
<PreferenceScreen android:title="Live Wallpaper" android:summary="LiveWallpaperPicker">
<intent android:targetPackage="com.android.wallpaper.livepicker" android:action="android.intent.action.MAIN" android:targetClass="com.android.wallpaper.livepicker.LiveWallpaperListActivity" />
</PreferenceScreen>
all lines you can find in AndroidManifest.xml file in app folder.
If this is not what you meant I'm sorry.
Click to expand...
Click to collapse
I can't find the required xml file to edit.Actually the apk i want to put in setting is a 3rd part.need help here.
toorentz said:
I can't find the required xml file to edit.Actually the apk i want to put in setting is a 3rd part.need help here.
Click to expand...
Click to collapse
settings.xml can be.
like for launcher
Code:
<com.android.settings.IconPreferenceScreen android:title="@string/launcher_settings_title" android:key="launcher_settings" settings:icon="@drawable/ic_settings_launcher">
<intent android:targetPackage="com.android.launcher" android:action="android.intent.action.MAIN" android:targetClass="com.android.launcher.MyLauncherSettings" />
</com.android.settings.IconPreferenceScreen>
in this case you must add icon in drawable-mdpi and name in the line.
Just try
Lock your Galaxy Young Like a Boss
THREAD UPDATED
I manager to do this (and think of this) when I type *#*#0588#*#* on dialer.
It gives me an idea to go to lockscreen using our proximity sensor. This will also
avoid you to use the power button frequently, because power button is easy to
be broken
Update:Less battery consumption! hehe. How? I catch intents if the screen was off or on,
if the screen is off, it unregisters the proximity so it will not drain your batt
when your phone is on your pocket, or any tiny place that will always
use the proximity sensor. It just activates when screen is on.
Watch this video on how this thing work:
https://www.youtube.com/watch?v=OH3j44UUTgM
WARNING! :
Doing this guide makes your battery to drain
faster than before. (Because Sensor is always active).
Click to expand...
Click to collapse
Steps:
1.) Decompile SystemUI.apk
2.) Extract ProximityLock.zip on smali folder.
3.) Go to res/layout/status_bar.xml and add this code below line with an @id/icons:
Code:
<com.tenten.SensorLock android:layout_height="0.0dip" android:layout_width="0.0dip" />
4.) Recompile SystemUI.apk.
5.) Install CustomizableParts.apk to enable/disable it.
6.) Flash and Do some action like a boss. (Dont forget to jump high xD) if not working, please post a logcat!
Java source: (OUTDATED)https://github.com/tentenponce/Proximity_and_Shake/tree/Gingerbread
Credits
StackOverflow.com
*#*#0588#*#* Samsung Code xD
LenoxDevs
PotatoInc
Reserve for more actions
EDIT: Actions were canceled.
Play/Pause: Proximity detects two times, so it just pause then play again music and vice versa. (It f*cks me).
STILL feel free to suggest what kind of action on proximity except going to lockscreen. Make sure it will be good/useful (And also make sure i can do it, because im not a magician and will just magic it for you xD)
wow! gonna try it
EDIT: works great! thanks..
waiting for the next update
This is too awesome
Thanks sir :good:
tentenponce said:
Lock your Galaxy Young Like a Boss
Watch this video on how this thing work: https://www.youtube.com/watch?v=OH3j44UUTgM
How I made it: Type *#*#0588#*#*. This thing inspires me to do this xD
Steps:
1.) Decompile SystemUI.apk
2.) Extract ProximityLock.zip on smali folder.
3.) Go to res/layout/status_bar.xml and add this code below line with an @id/icons:
Code:
<com.tenten.SensorLock android:layout_height="0.0dip" android:layout_width="0.0dip" />
4.) Recompile SystemUI.apk.
5.) Install CustomizableParts.apk to enable/disable it.
6.) Flash and Do some action like a boss. (Dont forget to jump high xD) tell me if not working.
Credits
StackOverflow.com
*#*#0588#*#* Samsung Code xD
LenoxDevs
PotatoInc
Click to expand...
Click to collapse
Freaking awesome man! Could you please make a single app ? For this mod? I MEAN, without the other options of the other mods of yours I hope you can. THANKS FOR THIS MOD. (Y)
Thx. it`s work for my LG P713 4.1.2
Pls make app for this mod without the other options of the other mods of yours
And can you make Proximity Unlock?
RikudouSennin said:
Freaking awesome man! Could you please make a single app ? For this mod? I MEAN, without the other options of the other mods of yours I hope you can. THANKS FOR THIS MOD. (Y)
Click to expand...
Click to collapse
Just transfer the checkbox preference to your settings, or just uninstall it because it will still work
tentenponce said:
Just transfer the checkbox preference to your settings, or just uninstall it because it will still work
Click to expand...
Click to collapse
Sorry for this question here, but, can you make a guide for this (put a preference of an app in settings)?
I already tried using smalis, ids, values, res, of original app to implement in a new activity of settings but i never can recompile again because give "short id" or others unknown (unknown to me xD) errors in smali's...
Sorry again for question, but i always wanted to learn this.
Thanks.
RBDoMGaM said:
Sorry for this question here, but, can you make a guide for this (put a preference of an app in settings)?
I already tried using smalis, ids, values, res, of original app to implement in a new activity of settings but i never can recompile again because give "short id" or others unknown (unknown to me xD) errors in smali's...
Sorry again for question, but i always wanted to learn this.
Thanks.
Click to expand...
Click to collapse
Decompile CustomizableParts.apk and get the smali and the res/xml/main, recompile then get the public id of the main.xml, go to tenten.smali find this line and replace it to your public id:
Code:
0x7f04
to:
Code:
(yourpublicid)
then go to res/xml/settings.apk and add this code BEFORE </PreferenceScreen>:
Code:
<com.android.settings.IconPreferenceScreen android:title="Proximity Settings" settings:icon="@drawable/ic_settings_about">
<intent android:targetPackage="com.tenten" android:action="android.intent.action.MAIN" android:targetClass="com.tenten.tenten" />
</com.android.settings.IconPreferenceScreen>
go again to res/xml/main and remove the preference you dont want.
It will make a shortcut to your settings.apk to customizableparts.
tentenponce said:
Decompile CustomizableParts.apk and get the smali and the res/xml/main, recompile then get the public id of the main.xml, go to tenten.smali find this line and replace it to your public id:
Code:
0x7f04
to:
Code:
(yourpublicid)
then go to res/xml/settings.apk and add this code BEFORE </PreferenceScreen>:
Code:
<com.android.settings.IconPreferenceScreen android:title="Proximity Settings" settings:icon="@drawable/ic_settings_about">
<intent android:targetPackage="com.tenten" android:action="android.intent.action.MAIN" android:targetClass="com.tenten.tenten" />
</com.android.settings.IconPreferenceScreen>
go again to res/xml/main and remove the preference you dont want.
It will make a shortcut to your settings.apk to customizableparts.
Click to expand...
Click to collapse
Can we make it without install Customizableparts.apk ? So preference in Customizableparts.apk moved to settings.apk
GSculerlor said:
Can we make it without install Customizableparts.apk ? So preference in Customizableparts.apk moved to settings.apk
Click to expand...
Click to collapse
Follow it and you dont need to install customizableparts.apk.
tentenponce said:
Decompile CustomizableParts.apk and get the smali and the res/xml/main, recompile then get the public id of the main.xml, go to tenten.smali find this line and replace it to your public id:
Code:
0x7f04
to:
Code:
(yourpublicid)
then go to res/xml/settings.apk and add this code BEFORE </PreferenceScreen>:
Code:
<com.android.settings.IconPreferenceScreen android:title="Proximity Settings" settings:icon="@drawable/ic_settings_about">
<intent android:targetPackage="com.tenten" android:action="android.intent.action.MAIN" android:targetClass="com.tenten.tenten" />
</com.android.settings.IconPreferenceScreen>
go again to res/xml/main and remove the preference you dont want.
It will make a shortcut to your settings.apk to customizableparts.
Click to expand...
Click to collapse
Decompile CustomizableParts.apk and get the smali and the res/xml/main, recompile then get the public id of the main.xml, go to tenten.smali find this line and replace it to your public id: -- Sorry sir but i dont really get it Can you please explain further sir ? Im so slow
very cool,i try for sure.great work.thx hitted!!!!
tentenponce said:
Lock your Galaxy Young Like a Boss
Watch this video on how this thing work: https://www.youtube.com/watch?v=OH3j44UUTgM
How I made it: Type *#*#0588#*#*. This thing inspires me to do this xD
Steps:
1.) Decompile SystemUI.apk
2.) Extract ProximityLock.zip on smali folder.
3.) Go to res/layout/status_bar.xml and add this code below line with an @id/icons:
Code:
<com.tenten.SensorLock android:layout_height="0.0dip" android:layout_width="0.0dip" />
4.) Recompile SystemUI.apk.
5.) Install CustomizableParts.apk to enable/disable it.
6.) Flash and Do some action like a boss. (Dont forget to jump high xD) tell me if not working.
Credits
StackOverflow.com
*#*#0588#*#* Samsung Code xD
LenoxDevs
PotatoInc
Click to expand...
Click to collapse
can you make a video step by step to do this ? i don't have any idea. decompile bla bla. please tell me how to do this step by step process. thanks in advanced. Good Job.
ChristianMonteon said:
can you make a video step by step to do this ? i don't have any idea. decompile bla bla. please tell me how to do this step by step process. thanks in advanced. Good Job.
Click to expand...
Click to collapse
Sorry
, but all i can make is a guide, before doing this, you need basic knowledge about decompiling/using apktool and a little xml thing.
RikudouSennin said:
Decompile CustomizableParts.apk and get the smali and the res/xml/main, recompile then get the public id of the main.xml, go to tenten.smali find this line and replace it to your public id: -- Sorry sir but i dont really get it Can you please explain further sir ? Im so slow
Click to expand...
Click to collapse
Learn first how to decompile using apktool, then after that, decompile customizableparts.apk, get the smali and transfer it on settings.apk, (you must also decompile settings.apk) then also the main.xml that will be found on customizableparts/res/xml/main.xml to settings.apk also. then follow the above instructions. I know there's a guide on how to add extra activity on settings.
Pls make app for this mod without the other options of the other mods of yours
And can you make Proximity Unlock?
the_vanya1 said:
Pls make app for this mod without the other options of the other mods of yours
And can you make Proximity Unlock?
Click to expand...
Click to collapse
try to follow the guide that i quote on rikudousennin. If i will put proximity unlock, it will be bug maybe if you put your phone on you pocket, facedown on something, etc.. because it will unlock, lock, unlock, lock , infinite. xD but still finding a solution, but for now, it will be impossible
-CALIBAN666- said:
very cool,i try for sure.great work.thx hitted!!!!
Click to expand...
Click to collapse
Thanks sir xD just got the idea on *#*#0588#*#* xD thanks to samsung xD
i know it, but it can be on or off, and you can upgrade this function later
I found this guide here and this is what I did differently from it to make this work for us. You can use the linked file to click an app to change the icon or you can add it into settings in your rom. For those that don't know what this does this probably isn't the thread for you. Just wait until you see it popping up in the roms you use. This should work universally for ND8 builds.
http://forum.xda-developers.com/showthread.php?t=2730108
Now instead of following all of his steps and not finding what you're searching for I will simplify this some to make it quicker. You will want to search for this and replace it throughout the smali file in your decompiled systemui.apk (\SystemUI\smali\com\android\systemui\statusbar\ph one\PhoneStatusBar.smali)
Find all instances of
Code:
Lcom/android/systemui/statusbar/policy/BatteryController;
and replace with
Code:
Lcom/ghareeb/BatteryMod/BatteryController;
Then open (\SystemUI\res\layout\status_bar.xml) and find [This may already be changed if you used tdunham's 1% battery mod]
Code:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="12.0dip" android:layout_height="18.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="5.0dip" />
and replace it with
Code:
<ImageView android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0.0dip" android:layout_marginStart="2.0dip" />
Now most importantly you need to add these smali files to your systemui so they're in (systemui/smali/com/ghareeb/BatteryMod)
http://forum.xda-developers.com/attachment.php?attachmentid=2706746&stc=1&d=1398368939
Then add the OGBatterymod.apk of your choice to system/app. I didn't provide one in this guide sorry but maybe I will upload one eventually. You can easily look for one to add, all the old ones should work.
To add it to secsettings under display
Decompile secsettings.apk and open (\SecSettings\res\xml\display_settings.xml)
Find
Code:
<PreferenceScreen android:title="@string/notification_panel_title" android:key="notification_panel_edit" android:fragment="com.android.settings.NotificationPanelMenu" />
Add this under that line
Code:
<PreferenceScreen android:title="@string/battery_mod" android:summary="@string/battery_mod_desc">
<intent android:targetPackage="com.ghareeb.battery" android:action="android.intent.action.MAIN" android:targetClass="com.ghareeb.battery.Settings" />
</PreferenceScreen>
Now open (\SecSettings\res\values\string.xml) and add this
Code:
<string name="battery_mod">OGBattery Mod</string>
<string name="battery_mod_desc">Change battery icon and charging animation.</string>
For those who don't want to add this to settings for some reason you can find one with the icon so you can just open the app here: http://forum.xda-developers.com/showthread.php?t=2758088
Thanks to @OsamaGhareeb and @meawww also @axel06 for his that I linked with the icon instead of having to have it in settings if anyone would like to do it this way.
Dude you are awesome! I can't wait to get on this. Have to wait till the weekend though.
BTW this works great! Thanks again.
talkingmonkeys said:
I found this guide here and this is what I did differently from it to make this work for us. You can use the linked file to click an app to change the icon or you can add it into settings in your rom. For those that don't know what this does this probably isn't the thread for you. Just wait until you see it popping up in the roms you use. This should work universally for ND8 builds.
http://forum.xda-developers.com/showthread.php?t=2730108
Now instead of following all of his steps and not finding what you're searching for I will simplify this some to make it quicker. You will want to search for this and replace it throughout the smali file in your decompiled systemui.apk (\SystemUI\smali\com\android\systemui\statusbar\ph one\PhoneStatusBar.smali)
Find all instances of
Code:
Lcom/android/systemui/statusbar/policy/BatteryController;
and replace with
Code:
Lcom/ghareeb/BatteryMod/BatteryController;
Then open (\SystemUI\res\layout\status_bar.xml) and find [This may already be changed if you used tdunham's 1% battery mod]
Code:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="12.0dip" android:layout_height="18.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="5.0dip" />
and replace it with
Code:
<ImageView android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0.0dip" android:layout_marginStart="2.0dip" />
Now most importantly you need to add these smali files to your systemui so they're in (systemui/smali/com/ghareeb/BatteryMod)
http://forum.xda-developers.com/attachment.php?attachmentid=2706746&stc=1&d=1398368939
Then add the OGBatterymod.apk of your choice to system/app. I didn't provide one in this guide sorry but maybe I will upload one eventually. You can easily look for one to add, all the old ones should work.
To add it to secsettings under display
Decompile secsettings.apk and open (\SecSettings\res\xml\display_settings.xml)
Find
Code:
<PreferenceScreen android:title="@string/notification_panel_title" android:key="notification_panel_edit" android:fragment="com.android.settings.NotificationPanelMenu" />
Add this under that line
Code:
<PreferenceScreen android:title="@string/battery_mod" android:summary="@string/battery_mod_desc">
<intent android:targetPackage="com.ghareeb.battery" android:action="android.intent.action.MAIN" android:targetClass="com.ghareeb.battery.Settings" />
</PreferenceScreen>
Now open (\SecSettings\res\values\string.xml) and add this
Code:
<string name="battery_mod">OGBattery Mod</string>
<string name="battery_mod_desc">Change battery icon and charging animation.</string>
For those who don't want to add this to settings for some reason you can find one with the icon so you can just open the app here: http://forum.xda-developers.com/showthread.php?t=2758088
Thanks to @OsamaGhareeb and @meawww also @axel06 for his that I linked with the icon instead of having to have it in settings if anyone would like to do it this way.
Click to expand...
Click to collapse
Great guide man. I've been trying to get this mod going using some of the other guides out there, but no luck. Glad I found this. A couple of questions; I don't see a \ph one\ folder in my statusbar smali. Is that typo? Should it be: \SystemUI\smali\com\android\systemui\statusbar\PhoneStatusBar.smali. If so, I followed all steps but I get the following error when trying to recompile. Is it a syntax error?
Edit: Sorry about the path question. Dummy me. As for the recompile error, I think it has something to do with one of the smali files in the Ghareeb zip?
nyfl2004 said:
Great guide man. I've been trying to get this mod going using some of the other guides out there, but no luck. Glad I found this. A couple of questions; I don't see a \ph one\ folder in my statusbar smali. Is that typo? Should it be: \SystemUI\smali\com\android\systemui\statusbar\PhoneStatusBar.smali. If so, I followed all steps but I get the following error when trying to recompile. Is it a syntax error?
Edit: Sorry about the path question. Dummy me. As for the recompile error, I think it has something to do with one of the smali files in the Ghareeb zip?
Click to expand...
Click to collapse
Try using a different apktool. I think I used 2 beta. The different apk tools use different parameters and I can't remember exactly what you need to change it to for it to recompile just this minute
talkingmonkeys said:
Try using a different apktool. I think I used 2 beta. The different apk tools use different parameters and I can't remember exactly what you need to change it to for it to recompile just this minute
Click to expand...
Click to collapse
Thanks man. I can recompile your edits with no problem. I can't recompile once I add the Ghareeb smali files. I'll keep trying. Thanks again..
nyfl2004 said:
Thanks man. I can recompile your edits with no problem. I can't recompile once I add the Ghareeb smali files. I'll keep trying. Thanks again..
Click to expand...
Click to collapse
Try tickle my android. Chad suggested it to me and it worked. You can send me the file too and I'll have a look. Might not have a chance until Thursday to look at it but I think I know whats wrong its just explaining it drunk isn't too easy
talkingmonkeys said:
Try tickle my android. Chad suggested it to me and it worked. You can send me the file too and I'll have a look. Might not have a chance until Thursday to look at it but I think I know whats wrong its just explaining it drunk isn't too easy
Click to expand...
Click to collapse
Thanks man. I'll give Trickle my Android a shot later after work. If I can't manage, I'll send you the file. I really appreciate your help!