[mod] extended power menu - need help! - Samsung Galaxy W I8150

Hey guy, I'm trying to port the extended power menu using this guide
http://forum.xda-developers.com/showthread.php?t=1169443
I managed to make the first part work.
However with the second part (editing android.policy.jar) I get stuck on the first static Samsung logo after reboot.
Does anyone have a clue, or is anyone willing to help?
I attached my modified files. I'm using GingerICE 2.1 ROM.

This is definitely what we need pressing the power button allows to reboot...reboot to recovery or power off like CM...
Poke me if I am wrong...just sharing..
Sent from my GT-I8150 using xda premium

fender90 i have decompilied your android.policy.jar and in GlobalAction.smali it looks all good
...but in the folder you forgot to create the files GlobalAction$10.smali and $11 and $12 like it say in the howto, read this part:
Code:
c/ Come on, we're almost there ...
Now copy the "out/com/android/internal/policy/impl/GlobalActions$4.Smali" to "out/com/android/internal/policy/impl/GlobalActions$8.Smali".
We choose #4 because it is one that contains the shutdown of the phone. We will rename it 8 because it's 8 in the next free issue ...
Remember this if ever in a future version of the files they are change.
d/ Now open the new file "out/com/android/internal/policy/impl/GlobalActions$8.Smali" and replace in, all occurrences of "\GlobalActions$4" with "\GlobalActions$8"
Then, Replace :
Code:
const/4 v1, 0x1
invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V
With :
Code:
const/4 v1, 0x1
const-string v2, "now"
invoke-static {v0, v2, v1}, Lcom/android/internal/app/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V
e/ Save the file and copy it to "out/com/android/internal/policy/impl/GlobalActions$9.Smali"
Open it and replace in, all occurrences of "\GlobalActions$8" with "\GlobalActions$9
and
const-string v2, "now" with const-string v2, "recovery"
f/ Save the file and copy it to "out/com/android/internal/policy/impl/GlobalActions$10.Smali"
Open it and replace in, all occurrences of "\GlobalActions$9" with "\GlobalActions$10
and
const-string v2, "recovery" with const-string v2, "download"
Save the file and then ... compile it all!
I think this is the problem,maybe

Amazing, I'll try when I get back home!
Inviato dal mio GT-I8150 usando Tapatalk

fender90 said:
Amazing, I'll try when I get back home!
Inviato dal mio GT-I8150 usando Tapatalk
Click to expand...
Click to collapse
Use this guide http://forum.xda-developers.com/showthread.php?t=811532 This is what I used on the exhibit and that guide does not edit the framework.jar and when you do the edit make sure your placing it where it says look at the code above and below

Update: i mixed those guides because neither of them matches the Wonder files, and this time, and I got some progress: the phone boots!
However, when pressing the power button, I get a force close and it reloads the launcher.
I'm attaching the modified files, so you guys can help me spot the mistake

fender90 said:
Update: i mixed those guides because neither of them matches the Wonder files, and this time, and I got some progress: the phone boots!
However, when pressing the power button, I get a force close and it reloads the launcher.
I'm attaching the modified files, so you guys can help me spot the mistake
Click to expand...
Click to collapse
Probably this afternoon i'll give it a look, i like this mod

Have you boys tried last Black note hybrid? I think is that what you looking for
Sent from my GT-I8150 using XDA

pemati said:
Have you boys tried last Black note hybrid? I think is that what you looking for
Sent from my GT-I8150 using XDA
Click to expand...
Click to collapse
I don't know it has this mod, i still use stock rom
However...fender90, u have done a very little error in GlobalActions.smali, if u see ur file in line 647 and then in line 659 u surely understand there are two 0x3
Instead in GlobalAction$10.smali, and also 11 and 12, u have to delete line 54 cause u use sput command in line 52 that do what we want.
I attach the files modified by me, rename in .smali and try them

pemati said:
Have you boys tried last Black note hybrid? I think is that what you looking for
Sent from my GT-I8150 using XDA
Click to expand...
Click to collapse
i think what u r saying is the extended "NOTIFICATION" menu, but fender90 is working on the extended "POWER" menu, its the menu when u press the power button long enough, a window will pop up with options like shutdown, airplane mode, etc

Yes you right but in that panel under reboot option are options for recovery or download mode. Hope is that what is fender looking for
Sent from my GT-I8150 using XDA

pemati said:
Have you boys tried last Black note hybrid? I think is that what you looking for
Sent from my GT-I8150 using XDA
Click to expand...
Click to collapse
Stop TrollinLaLa!
Sent from my GT-I8150 using xda premium

Any progress for this file. Its really helps for other modified stock roms.

vhick said:
Any progress for this file. Its really helps for other modified stock roms.
Click to expand...
Click to collapse
what rom are u using? im using bionicv2 and ive flashed this http://forum.xda-developers.com/showthread.php?t=1597368 , i dont know if it will work on stock rom though

I used stock rom that is modified using dsixda Kitchen. I will try this though.
Thanks

andynroid said:
This is definitely what we need pressing the power button allows to reboot...reboot to recovery or power off like CM...
Poke me if I am wrong...just sharing..
Sent from my GT-I8150 using xda premium
Click to expand...
Click to collapse
+1
I really want it too...

a.fontenele said:
+1
I really want it too...
Click to expand...
Click to collapse
This mod is already available to our device. Just take a look at the Theme&Apps section.

If you are taking about http://forum.xda-developers.com/showthread.php?t=1658833 I already checked... It's for deoxed ROMs though...
Sent from my GT-I8150B using Tapatalk 2

a.fontenele said:
If you are taking about http://forum.xda-developers.com/showthread.php?t=1658833 I already checked... It's for deoxed ROMs though...
Sent from my GT-I8150B using Tapatalk 2
Click to expand...
Click to collapse
Yes, of course. Deodex enables theme editing. I haven't seen any theme for odex rom so far.

yewsiong said:
Yes, of course. Deodex enables theme editing. I haven't seen any theme for odex rom so far.
Click to expand...
Click to collapse
one question buddy, what do we need to deodex? and what does deodexing does to our phone? sorry for my bad english.

Related

[Q] Bootanimation + remove recent apps from notificationbar

Hello,
I have 2 problems changing my HTC Wildfire S (Stock, Android version 2.3.5, HTC sense 2.1, Softwarenr. 2.26.401.3) to my personal needs
1] bootanimation
I tried every guide i found to get my custom bootanimation on my phone. Using a guide (http://www.vikitech.com/10661/complete-guide-customizing-android-boot-animation) I first created a zip file and then placed it instead of the original bootanimation.zip file at /system/customize/resource. When i booted i just get a black screen for a minute or 2 and then the phone is booted. So the phone boots without bootanimation, just black screen.
Here is a link to my zip file https://www.dropbox.com/s/ugzbbq2jcfpbf3s/htcbeatsgoogle_bootanimation.zip
Can someone take a look, maybe i did something wrong?
2] remove recent apps from notification bar
I just can't get this done. I tried for 3 days and tried every guide i found.
Including this guides:
http://forum.xda-developers.com/showthread.php?t=1225558
http://forum.xda-developers.com/showthread.php?t=1760697
http://forum.xda-developers.com/showthread.php?t=1208320
Do i have to try something different?
Thanks in advance!
jonasdhondt said:
Hello,
2] remove recent apps from notification bar
I just can't get this done. I tried for 3 days and tried every guide i found.
Including this guides:
http://forum.xda-developers.com/showthread.php?t=1225558
http://forum.xda-developers.com/showthread.php?t=1760697
http://forum.xda-developers.com/showthread.php?t=1208320
Do i have to try something different?
Thanks in advance!
Click to expand...
Click to collapse
For remove recent apps you have to add one more line like 'const/4 v0, 0x0' before the mentioned line. It'll work.
check the link here:
http://androidforums.com/4650478-post1.html
Hope this may be useful (If really press 'Thanks")
I be uploaded the edited system you and made thread in deveelopment look it up.
Sent from my HTC Wildfire S A510e using xda app-developers app
Senthamil said:
For remove recent apps you have to add one more line like 'const/4 v0, 0x0' before the mentioned line. It'll work.
check the link here[/url]
Hope this may be useful (If really press 'Thanks")
Click to expand...
Click to collapse
Senthamil, thanks for your reply but the link you give me suggests the following:
Code:
:goto_0
const/4 v0, 0x0
sput-boolean v0, Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z
but my code gives the following:
Code:
:goto_[B][COLOR="red"]27[/COLOR][/B]
sput-boolean v0, Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z
I can't find goto_0... ?
I allready tried the following:
Code:
:goto_27
const/4 v0, 0x0
sput-boolean v0, Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z
and
Code:
:goto_27
sput-boolean v[B][COLOR="Red"]2[/COLOR][/B], Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z
.
What should i do?
baluuu said:
I be uploaded the edited system you and made thread in deveelopment look it up.
Sent from my HTC Wildfire S A510e using xda app-developers app
Click to expand...
Click to collapse
Baluuu, i did what your thread said and user your file (sense 2.1) but it just doesn't works. When i paste it in the system/app the statusbar wants to close and i get the repeating error for that, when i reboot the statusbar is gone....
What am i doing wrong?
Is the somebody who knows how to solve this problems? I spended all day searching for the sollution. It seems like my phone is different :s.
Sent from my HTC Wildfire S A510e using xda app-developers app
jonasdhondt said:
Is the somebody who knows how to solve this problems? I spended all day searching for the sollution. It seems like my phone is different :s.
Sent from my HTC Wildfire S A510e using xda app-developers app
Click to expand...
Click to collapse
I don't understand why i can't find any answers..
jonasdhondt said:
Hello,
I have 2 problems changing my HTC Wildfire S (Stock, Android version 2.3.5, HTC sense 2.1, Softwarenr. 2.26.401.3) to my personal needs
1] bootanimation
I tried every guide i found to get my custom bootanimation on my phone. Using a guide (http://www.vikitech.com/10661/complete-guide-customizing-android-boot-animation) I first created a zip file and then placed it instead of the original bootanimation.zip file at /system/customize/resource. When i booted i just get a black screen for a minute or 2 and then the phone is booted. So the phone boots without bootanimation, just black screen.
Here is a link to my zip file https://www.dropbox.com/s/ugzbbq2jcfpbf3s/htcbeatsgoogle_bootanimation.zip
Can someone take a look, maybe i did something wrong?
Thanks in advance!
Click to expand...
Click to collapse
I changed the zip compression method from normal to store.
Try the attached zip...your boot animation should work now.
For the bootanimation you can try this tool http://forum.xda-developers.com/showthread.php?t=1678540
Sent from my HTC Wildfire S A510e using xda app-developers app
jonasdhondt said:
I don't understand why i can't find any answers..
Click to expand...
Click to collapse
as with the recent app, it's a bit tricky if you are on a custom rom.
tools available like the autoapktool often fails in compiling systemui apk if it has been moded already.
you have to start with a stock systemui apk and encorporate all your modifications into it.
klacenas said:
as with the recent app, it's a bit tricky if you are on a custom rom.
tools available like the autoapktool often fails in compiling systemui apk if it has been moded already.
you have to start with a stock systemui apk and encorporate all your modifications into it.
Click to expand...
Click to collapse
I have a custom rom, but can't find how to disable the recent apps...
Tera Tike said:
I changed the zip compression method from normal to store.
Try the attached zip...your boot animation should work now.
Click to expand...
Click to collapse
It works fine, what did you changed? compression method to store? explain plz.

[MOD][SecPhone] Enable Call Recording on Jelly bean

This is a simple howto enable Call recording on the Galaxy S3 Firmewares for Jelly bean Roms.
If you take a look at the source code, you will notice that call rec is default enabled for some Countries (KOR,JAP...), what i did is just enabling it after all CSC checks.
You need to decompile SecPhone.apk, use my repacked Apk_Manager (it should work for any ICS file 4.0.3/4.0.4/4.1.1).
Open "SecPhone.apk\smali\com\android\phone\PhoneFeature .smali", go to "makeFeature()V" method, and make the changes :
Code:
.line 792
invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForJapan()V
.line 796
:cond_d
invoke-static {}, Lcom/android/phone/PhoneFeature;->makeFeatureForUsa()V
.line 797
[COLOR=Green] ++sget-object v0, Lcom/android/phone/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
[/COLOR] [COLOR=Green] ++const-string v2, "voice_call_recording"
[/COLOR] [COLOR=Green] ++const/4 v4, 0x1
[/COLOR] [COLOR=Green] ++invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
[/COLOR] [COLOR=Green] ++move-result-object v3
[/COLOR] [COLOR=Green] ++invoke-virtual {v0, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;[/COLOR]
return-void
Compile and enjoy.
Attached cwm patch works on Deodexed LI2 Roms only.
Nice.
Tried it and it worked properly. Great work as always.
great mod,
mate, can you please provide a CWM recovery path for DLI1 firmware too?
thanks
This only works for stock roms right? SlimBean for instance has no SecPhone.asp.
Hy wanam,
please could you make a XXDLI5 version ?
I tried the apk manager but when decompiling i get errors....
First time doing this and I get a "java not installed"
where do I put this thing to get java working when It IS installed on my PC??
Thanks.
Hy wanam,
i extracted the secphone.apk from your wanamlite 3.3 and put it in mey kristofpetho JB 1.6 rom and works perfect. So not need anymore
MasterTB said:
First time doing this and I get a "java not installed"
where do I put this thing to get java working when It IS installed on my PC??
Thanks.
Click to expand...
Click to collapse
Is your java set up correctly? is it in your path?
apk manager is best used in the root of c drive
That's what I thought and there's where I put it but I still get the error. Win7 32bits and 64bits...
Same issue on both pc's.
MasterTB said:
That's what I thought and there's where I put it but I still get the error. Win7 32bits and 64bits...
Same issue on both pc's.
Click to expand...
Click to collapse
dirty fix:
install BOTH 32 bit & 64 bit version...one should go in programs, the other should auto install in x86 programs
no guarantees....
java doesnt seem to like w7 64bit..it messes around with folder locations and reg entries
Hi, I can't understand how to "use" (install) this Apk_Manager so I can decompile SecPhone.apk. Do you install it on the S3? on the computer?? How? I just can't get it working. Sorry & Thanx for the hepl!
Can you please provide a CWM recovery path for DLI7 firmware too? Thank's
bhavadas said:
Hi, I can't understand how to "use" (install) this Apk_Manager so I can decompile SecPhone.apk. Do you install it on the S3? on the computer?? How? I just can't get it working. Sorry & Thanx for the hepl!
Click to expand...
Click to collapse
same doubts.
OP can you plz elaborate a bit more for noobs like me ?
bhavadas said:
Hi, I can't understand how to "use" (install) this Apk_Manager so I can decompile SecPhone.apk. Do you install it on the S3? on the computer?? How? I just can't get it working. Sorry & Thanx for the hepl!
Click to expand...
Click to collapse
NOT install just unzip on your PC C:drive
put you need to modify apk on the place-apk-here-for-modding
click script
Here is XXDLI7 latest JB leak deodexed and moded SecPhone.apk with call recording.
Thank's to Wanam.
ausdim said:
Here is XXDLI7 latest JB leak deodexed and moded SecPhone.apk with call recording.
Thank's to Wanam.
Click to expand...
Click to collapse
Doesn't work
Sent from my GT-I9300 using xda premium
M_aqui said:
Doesn't work
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
Working good.
You are doing something worng.
This is for deodexed roms.
If you have odexed dont forget to delete SecPhone.odex
Sent from my GT-I9300 using Tapatalk 2
ausdim said:
Working good.
You are doing something worng.
This is for deodexed roms.
If you have odexed dont forget to delete SecPhone.odex
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
You're right, I forgot to delete SecPhone.odex
Thank's :good:
Nice work wanam! does it work on CM10? Or CM9 for your ICS fix?
Its not working for me, maybe my mistake, I try it again..
Sent from my GT-I9300 using xda app-developers app

[MOD/ HOW TO] Enable WiFi Tethering

THIS IS FOR THE BRAVE PEOPLE ONLY!!!
I deodexed my own system in order to do this modification.
I replaced the files manually using an on device file explorer.
I do not recommend doing this if you aren't comfortable dealing with smali.
I got tethering working by modifying:
TetheringProvision.apk
/com/sec/tetheringprovision/TetheringProvisionActivity$5.smali
--return -1 instead of 0
Code:
.line 990
iget-object v0, p0, Lcom/sec/tetheringprovision/TetheringProvisionActivity$5;->this$0:Lcom/sec/tetheringprovision/TetheringProvisionActivity;
[COLOR=Red]-- const/4 v1, 0x0
[/COLOR][COLOR=YellowGreen]++ const/4 v1, -0x1[/COLOR]
#calls: Lcom/sec/tetheringprovision/TetheringProvisionActivity;->sendResult(I)V
invoke-static {v0, v1}, Lcom/sec/tetheringprovision/TetheringProvisionActivity;->access$800(Lcom/sec/tetheringprovision/TetheringProvisionActivity;I)V
Click to expand...
Click to collapse
&&
/com/sec/tetheringprovision/TetheringProvisionActivity$TetheringPlanCheckTask.smali
--change auth links to localhost
Code:
.line 1081
const-string v0, "[COLOR=Red]127.0.0.1[/COLOR]"
iput-object v0, p0, Lcom/sec/tetheringprovision/TetheringProvisionActivity$TetheringPlanCheckTask;->ATTTetheringPlanCheckURL:Ljava/lang/String;
.line 1082
const-string v0, "[COLOR=Red]127.0.0.1[/COLOR]"
iput-object v0, p0, Lcom/sec/tetheringprovision/TetheringProvisionActivity$TetheringPlanCheckTask;->ATTMHSPlanCheckURL:Ljava/lang/String;
Click to expand...
Click to collapse
It fails the authentication quickly and anonymously by calling localhost (127.0.0.1) and allows hot spot enabling after.
The modified APK is attached. Rename existing APK and ODEX file to .BAK then place modded APK in system/app and reboot.
UPDATE: The attached APK is out of date and obsolete. See my dev-resources thread for an updated deodexed system installer based on the newest system release that includes this mod.
I'm content with just using Foxfi/PDANet, haha. Works fine, i tested it last night
nice, thanks for the info OP!
breakingspell said:
I'm content with just using Foxfi/PDANet, haha. Works fine, i tested it last night
Click to expand...
Click to collapse
Does the S4 need to be rooted to use Foxfi/pdanet?
newbie101 said:
Does the S4 need to be rooted to use Foxfi/pdanet?
Click to expand...
Click to collapse
Supposedly not, that's their selling point.
I guess I'm not that familiar with .smali but how did you get root permission?
Sent from my SAMSUNG-SGH-I337 using xda premium
n311.dunkle said:
I guess I'm not that familiar with .smali but how did you get root permission?
Sent from my SAMSUNG-SGH-I337 using xda premium
Click to expand...
Click to collapse
Really man? How did he root? Spend 30 seconds looking at the forum.
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
geoldr said:
Really man? How did he root? Spend 30 seconds looking at the forum.
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
Click to expand...
Click to collapse
Harsh much? The "original" Android development forum had one topic and one sticky. I didn't even think to look there. My bad but seriously I hate when people post rude comments that don't even answer the question asked. Keep it to yourself if you don't feel like being helpful.
Sent from my SAMSUNG-SGH-I337 using xda premium
Since you modified the apk already we should be able to push the apk into the system and change the permissions using a root Explorer. Even if you mess up this apk won't brink anything. The worst case is your tethering just won't work. You can even just rename the old system files to .bak just incase.
Can you post up the modified apk...
Sent from my SAMSUNG-SGH-I337 using xda premium
breakingspell said:
I'm content with just using Foxfi/PDANet, haha. Works fine, i tested it last night
Click to expand...
Click to collapse
I jut tried the free version to see if it would work, and it did not work for me.
BigDogPooh said:
Since you modified the apk already we should be able to push the apk into the system and change the permissions using a root Explorer. Even if you mess up this apk won't brink anything. The worst case is your tethering just won't work. You can even just rename the old system files to .bak just incase.
Can you post up the modified apk...
Sent from my SAMSUNG-SGH-I337 using xda premium
Click to expand...
Click to collapse
Posted modded APK in OP.
alwayslearning said:
I jut tried the free version to see if it would work, and it did not work for me.
Click to expand...
Click to collapse
You installed PDAnet from their website, right? The Foxfi branded version is blocked for AT&T customers on the play store
breakingspell said:
You installed PDAnet from their website, right? The Foxfi branded version is blocked for AT&T customers on the play store
Click to expand...
Click to collapse
yes I did, I only installed FoxFi off the PDA site because it could be tired before you buy. Has anyone else gotten the free one to work? Or do you need to have the full version?
alwayslearning said:
yes I did, I only installed FoxFi off the PDA site because it could be tired before you buy. Has anyone else gotten the free one to work? Or do you need to have the full version?
Click to expand...
Click to collapse
The free version works fine for me, no extra configuration or anything. Are you rooted?
breakingspell said:
The free version works fine for me, no extra configuration or anything. Are you rooted?
Click to expand...
Click to collapse
no I am full stock, but I do need this to work. I will re-download and re-install to see if that works.
alwayslearning said:
no I am full stock, but I do need this to work. I will re-download and re-install to see if that works.
Click to expand...
Click to collapse
I'm rooted, but PDAnet never requested root access. Does it give you a specific error or message?
breakingspell said:
I'm rooted, but PDAnet never requested root access. Does it give you a specific error or message?
Click to expand...
Click to collapse
it just stops and says "unfortunately, FoxFi has stopped
I think you guys should make a discussion thread for FoxFi in another section.
Please keep discussion here in regard to the posted mod.
breakingspell said:
I'm rooted, but PDAnet never requested root access. Does it give you a specific error or message?
Click to expand...
Click to collapse
okay, I got it to work :good:
I had gone to the FoxFi website like it said in the store, I now went to PDANet+ site and downloaded the bundle and it worked, thanks for the tip this will help a lot until the custom ROMs come out.
Thanks for this. I will def try it out when I get my phone. can't wait to start hacking it.

[MOD]Native Hotspot Hack[ALL OTAs + LP][Odex][DeOdex]

HUGE Thanks to Metalboy94 for his vigorous attempts to get this working for us Sprint users. He doesn't even own a Sprint device, so please show him some love!
How to Install
- Download File based on ROM type.
- Flash File via TWRP or Philz recovery.
- Wipe Cache/Davlik.
- Reboot System
- Upon boot, update Profile/PRL and reboot again to ensure functionality.
- Profit!
Mirrors
Mediafire
Contributors
Justinswidebody, Bullghost, Metalboy94, Ascertion, SaintZ93, Lefty1409,
Tabp0le
Version Information
Status: Stable
Created 2013-12-25
Last Updated 2015-4-28
Mine.
Yay time to paypal
Sent from my LG-LS980 using XDA Premium 4 mobile app
Errr
Sent from my LG-LS980 using XDA Premium 4 mobile app
fatboypup said:
Errr
Sent from my LG-LS980 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Are you on v8 based ROM?
I just tried the same zip and it's working for me.
Sent from my LG-LS980
Ascertion said:
HUGE Thanks to Metalboy94 for his vigorous attempts to get this working for us Sprint users. He doesn't even own a Sprint device, so please show him some love!
Click to expand...
Click to collapse
And thanks to you for all your testing! Any chance we can get an odexed version for those of us still running the stock ROM? (I'll look into converting deodexed to odexed, but no experience w/ it yet).
Great job guys! Merry Christmas!
Errr **** im on the odex rom time to flash to ice
Sent from my LG-LS980 using XDA Premium 4 mobile app
fatboypup said:
Errr **** im on the odex rom time to flash to ice
Sent from my LG-LS980 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Lol. I'd recommend flashing the v1.1 test. Page 5 of IceROM. Then the Email fix. 100% awesome combo.
Sent from my LG-LS980
Ascertion said:
Lol. I'd recommend flashing the v1.1 test. Page 5 of IceROM. Then the Email fix. 100% awesome combo.
Sent from my LG-LS980
Click to expand...
Click to collapse
will do
Guide - Make your own native hotspot mod
I will try to keep it as simple as possible.
1. Decompile /system/framework/services.jar (or services.odex) with your favorite smali tool.
2. Inside the folder where you decompiled it, go to com/android/server/connectivity and open TetherNetwork.smali with a text editor (preferably Notepad++).
3. Replace the following:
Code:
.line 118
const/4 v0, -0x1
with
Code:
.line 118
const/4 v0, 0x1
and
Code:
.line 718
const/4 v0, -0x1
with
Code:
.line 718
const/4 v0, 0x1
and
Code:
.method public isTetherNetworkAvail()Z
.locals 1
.prologue
.line 331
iget-object v0, p0, Lcom/android/server/connectivity/TetherNetwork;->mTetherNetworkDataTrans:Lcom/android/server/connectivity/TetherNetworkDataTransition;
if-eqz v0, :cond_0
.line 332
iget-object v0, p0, Lcom/android/server/connectivity/TetherNetwork;->mTetherNetworkDataTrans:Lcom/android/server/connectivity/TetherNetworkDataTransition;
invoke-virtual {v0}, Lcom/android/server/connectivity/TetherNetworkDataTransition;->isPamPdnDataProfileEnabled()Z
move-result v0
.line 334
:goto_0
return v0
:cond_0
const/4 v0, 0x1
goto :goto_0
.end method
with
Code:
.method public isTetherNetworkAvail()Z
.locals 1
.prologue
.line 331
const/4 v0, 0x1
return v0
.end method
BONUS: If you want to be sure you removed (at least aesthetically) the tethering plan dialog, replace:
Code:
invoke-direct {p0, v0, v1}, Lcom/android/server/connectivity/TetherNetwork;->showDialog(Landroid/content/Context;I)V
with
Code:
#invoke-direct {p0, v0, v1}, Lcom/android/server/connectivity/TetherNetwork;->showDialog(Landroid/content/Context;I)V
4. Recompile services.jar/odex(odexed ROM users, there are a few guides on XDA on how to use dexopt-wrapper to recompile framework stuff with odexes)
5. Push it back to the phone (make sure you set the right permissions)
6. Reboot and enjoy.
Will this work with a stock rooted rom? I just flash it?
Will definitely donate.. Ive been wanting this since day 1.
Sent from my LG-LS980 using xda app-developers app
Omg thank you!!
o0adam0o said:
Will this work with a stock rooted rom? I just flash it?
Will definitely donate.. Ive been wanting this since day 1.
Sent from my LG-LS980 using xda app-developers app
Click to expand...
Click to collapse
Nope
Sent from my LG-LS980 using xda premium
mchlbenner said:
Nope
Sent from my LG-LS980 using xda premium
Click to expand...
Click to collapse
I'm working on a version that will work w/ the stock rom, but being somewhat of a n00b to all this, I'm currently stuck trying to re-odex the classes.dex file I obtained from smali. I don't have a fully rooted device (only root adb shell via g2_security), so I don't have busybox on my phone in order to run dexopt-wrapper .... I also don't have a nandroid since I haven't rooted, so I'm a bit weary of [semi]bricking my phone if I don't get this just right ... trying to follow some tutorials online. Anyone else here have experience editing services.odex files?
I'm working on it. Give me a few
Sent from my LG-LS980 using XDA Premium 4 mobile app
James7Bond007 said:
I'm working on a version that will work w/ the stock rom, but being somewhat of a n00b to all this, I'm currently stuck trying to re-odex the classes.dex file I obtained from smali. I don't have a fully rooted device (only root adb shell via g2_security), so I don't have busybox on my phone in order to run dexopt-wrapper .... I also don't have a nandroid since I haven't rooted, so I'm a bit weary of [semi]bricking my phone if I don't get this just right ... trying to follow some tutorials online. Anyone else here have experience editing services.odex files?
Click to expand...
Click to collapse
I think you can sideload busybox and then use dexopt-wrapper.. Would be a lot easier then trying to do it from PC. That said, I'm sure someone is working on it already, but if not, I'll try doing it after work tomorrow.
souleman said:
I think you can sideload busybox and then use dexopt-wrapper.. Would be a lot easier then trying to do it from PC. That said, I'm sure someone is working on it already, but if not, I'll try doing it after work tomorrow.
Click to expand...
Click to collapse
That worked fine ... I now have a hacked services.odex, so theoretically I could just replace it with my existing one and I'd be good to go. Only problem is that when I decompiled the hacked services.odex and compared what I got with what I had in the decompiled original services.odex file, there are over 400 files that are now different (I was hoping for just the TetherNetwork.smali to have changed). Ah well, I think I'll be a bit patient and try to figure out the reason for all the differences while waiting for justinswidebody.
Update: reason for the files being different was there are now extra comments in the smali files for the deodexed version ... so maybe it's time to give this thing a shot!
What did you use to odex? I keep getting errors
Sent from my LG-LS980 using XDA Premium 4 mobile app
Great work. Looking forward to seeing native hotspot mod on the stock rom.
Sent from my LG G2 LS980 using Tapatalk
justinswidebody said:
What did you use to odex? I keep getting errors
Click to expand...
Click to collapse
I used the tools from here:
http://dl.xda-developers.com/attach...3/6/8/1/4/0/8/all_for_deodexing_reodexing.zip
I used this line to decompile services.odex:
java -jar ..\baksmali-2.0.2.jar -d . -x services.odex
and then edited the smali file per MetalBoy's instructions.
After running
java -jar ..\smali-2.0.2.jar out
...to create the .dex file, I used 7zip to put the classes.dex file into services.jar. I then copied the new services.jar to the phone and ran:
dexopt-wrapper ./services.jar ./services.odex
...and received the lines you're supposed to (according to http://forum.xda-developers.com/showthread.php?t=1208320):
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=7194
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
...I then did the line:
dd if=/system/framework/services.odex of=./services.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
and verified the response was:
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.002042 seconds, 9.6KB/s
...I then used baksmali-2.0.2 to decompile the odex'ed services.odex and KDiff3 to compare the hacked service.odex to the original to verify everything was kosher.
The wife said I can use her phone to try this out on, so ... here goes nothing!
Update: well, it didn't work ....phone didn't boot up (just a black screen with pulsating LED). But at least I didn't brick her phone. At first when I ran adb shell I didn't get a root shell, which got the heart racing a bit since I was thinking WTF am I going to do to restore the services.odex backup I had made. I then tried an adb reboot recovery and that gave me the root shell again. Phew! I think I'm a bit [way] in over my head, but at least I can go to bed without worrying about a bricked phone / staying up all night to learn how to use LG's flash tools (coming from the Samsung GS2, it seemed a lot easier to just boot into download mode and flash ROMs with Odin)

[DEVS][Safestrap][How-To] Reboot To Safestrap Recovery Via Power Menu

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:
Great job :thumbup:
Sent from my SCH-I545 using XDA Premium 4 mobile app
Surge1223 said:
Great job :thumbup:
Sent from my SCH-I545 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Thanks Bro!
This is one of those things that will benefit the entire community and shouldnt be kept to
ourselves. This shouldnt be an Alliance exclusive as much as I want it to be.:good:
Surge1223 said:
Great job :thumbup:
Sent from my SCH-I545 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Oh, and you need to get an AllianceROM dev signature like the rest of us:highfive::good:
Nice write up, appreciate this...I never implemented the 4-way reboot method just because of Safestrap. Appreciate you sharing
Edit: Just put this together and tested, works as advertised...thanks again. Interesting that the OS asks for root privileges for this action.
Excellent write up!
If this was implemented into Roms what effect would it have on DE users who are not strapped to SS?
awesome ryan and u shared!!
ps it wont work for dev editions u gotta get creative and have both in there
BeansTown106 said:
awesome ryan and u shared!!
ps it wont work for dev editions u gotta get creative and have both in there
Click to expand...
Click to collapse
Did younever get that figured out?
oh, a crafty dev could also make TWO ROMs. The only difference being the ap jar
RErick said:
Did younever get that figured out?
oh, a crafty dev could also make TWO ROMs. The only difference being the ap jar
Click to expand...
Click to collapse
OR....:sly:
Sent from my SCH-I545 using XDA Premium 4 mobile app
Surge1223 said:
OR....:sly:
Sent from my SCH-I545 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Hey! I need that! Optimize ftw!
NIce on RErick!!
This is sweet. Thank you.
Wanted to add, I did this on a S4 and worked perfectly.
Just wondering if this would work on a aosp rom made for s4 safestrap. I got it to work on tw for safestrap. Just wondering if any one has tried.
Surge1223 said:
OR....:sly:
Sent from my SCH-I545 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
If you don't mind me asking, what Optimize System script are you using and also could you possibly share that script?
Nice
Good deal. Thanks for this. Gonna get this working today on DB

Categories

Resources